Skip to content

deps: Update dependency nipplejs to v1#653

Merged
renovate[bot] merged 1 commit intomainfrom
deps/nipplejs-1.x
Mar 25, 2026
Merged

deps: Update dependency nipplejs to v1#653
renovate[bot] merged 1 commit intomainfrom
deps/nipplejs-1.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 24, 2026

This PR contains the following updates:

Package Change Age Confidence
nipplejs (source) ^0.10.2^1.0.1 age confidence

Release Notes

yoannmoinet/nipplejs (nipplejs)

v1.0.1

Compare Source

v1.0.0

Compare Source

NippleJS v1.0.0

A complete ground-up rewrite of NippleJS — now TypeScript-first, zero dependencies, with a modern build pipeline and a brand new documentation website.

🌐 Documentation · 🎮 Interactive Demos · 📦 npm


✨ New Features

color: { front, back } — Full visual control

The color option now accepts a string or a { front, back } object. Since it sets the CSS background property, gradients, images, and any CSS background value work out of the box. (f244978)

nipplejs.create({
    color: {
        front: 'linear-gradient(135deg, #​818cf8, #​38bdf8)',
        back: 'radial-gradient(circle, rgba(99,102,241,0.15) 40%, transparent)',
    },
});
collection.reposition() + automatic ResizeObserver

Manually recalculate the zone bounding box and joystick positions after layout changes. The zone is also automatically watched with a ResizeObserver, so most resize scenarios are handled without any code. See the API docs. (075ab9b)

manager.reposition();
baseDelta in move event data (follow: true)

When the joystick base follows the thumb past the radius, the move event now includes baseDelta: { x, y } — the per-frame displacement of the base. Use vector for fine control and baseDelta for camera/world panning. See it in action in the Space Observatory demo. (f9e2095, 6b94695)

manager.on('move', (evt) => {
    const { vector, baseDelta } = evt.data;
    camera.x += baseDelta.x * panSpeed;
});
logLevel API

Control the library's console output globally. See the Logging docs. (f6b6ca8)

nipplejs.setLogLevel('debug');   // all logs
nipplejs.setLogLevel('warning'); // warnings and errors (default)
nipplejs.setLogLevel('none');    // silent
nipplejs.getLogLevel();          // returns current level
Zone position warning

The library now warns at creation time if the zone element has position: static, which causes joysticks to be positioned incorrectly. (f84205d)

move event fires continuously

The move event now fires on every pointermove, not only when the direction changes. This was a long-standing bug in v0. See the Events reference. (c438f2b)


🐛 Bug Fixes

  • Multitouch broken on mobilepreventDefault() on pointerdown interfered with dual-stick setups. Now only called on move events; touch-action: none on the zone handles the rest. (ca330c4)
  • _domHandlers_ memory leakunbindEvt never removed entries from the internal Map. (ce66ba0)
  • Duplicate added eventaddToDom() fired the event redundantly on every start(). (d94f3bd)
  • cleanInactiveTouches spreading native events — prototype properties were lost, producing NaN positions. (d94f3bd)
  • Throttle closure leak — Factory resize/scroll handlers created new closures per event, leaking timers Map entries. (d94f3bd)
  • trigger() Set mutation — handlers modifying the Set during iteration could skip callbacks. Now snapshots before iterating. (d94f3bd)
  • applyPosition zero handlingundefined coordinates were silently treated as 0. (d94f3bd)
  • createJoystick crash on invalid position — missing return after error log caused undefined variable access. (d94f3bd)
  • Semi mode infinite recursion — added depth guard to processOnStart. (d94f3bd)
  • display: 'hidden' invalid CSS — was display instead of visibility. (ce66ba0)

🏗️ Infrastructure

  • TypeScript throughout — branded types (Uid, Identifier), strict mode, full .d.ts exports
  • Yarn 4 monorepo with workspaces: nipplejs, docs, tests, tools, assets
  • Rollup bundler — ESM (.mjs) + CJS (.js) + type declarations (.d.ts)
  • ESLint flat config + Prettier (e35ca20)
  • 196 unit tests (Jest) + 50 e2e tests (Playwright) (291649e, 4235b4d, fc0e27f)
  • CI — unit tests, e2e tests, linting, typecheck (including docs) on every PR (e08fed6, c5ce457)
  • Release workflow — publish to NPM with OIDC provenance on GitHub release or manual dispatch (e08fed6)
  • SSR-safewindow access guarded with typeof checks, removed IE MSPointer dead code (d94f3bd)

🌐 Documentation Website

A brand new documentation site built with Astro 6 + Tailwind CSS 4, featuring an "Aurora Neon" dark theme with animated gradient blobs, frosted glass surfaces, and a cursor-following grid highlight.

5 Interactive Game Demos

Each game demo showcases a specific nipplejs option with a live code pane and debug overlay:

Game Option Docs
🐍 Neon Snake mode: 'static' mode
☄️ Asteroid Dodge lockX: true lockX
🎯 Dual-Stick Arena multitouch Getting Started
🔭 Space Observatory follow: true + baseDelta follow
🚀 Space Drift restJoystick: false restJoystick
Carousel with fullscreen mode

Games are displayed in a flex-based horizontal carousel with perspective tilt, blur effects (with Firefox detection fallback), dot indicators, and keyboard/arrow navigation. Each game supports fullscreen mode. (d8defa1, c99bd81)

Mobile optimized

Logo particles and grid highlight disabled on touch devices, game loops paused on non-active carousel slides, simplified transforms. (695bb8a)

GitHub Pages

Auto-deployed on push to master. (011e880)


⚠️ Breaking Changes (v0 → v1)

v0 v1
maxNumberOfNipples maxNumberOfJoysticks
destroyed event joystickDestroyed
joystick.el joystick.ui.el
show(), hide(), add(), remove() Removed
manager.get() manager.getJoystickByUid() or manager.all
manager.id manager.uid
manager.ids Removed
(evt, data) => {} (evt) => { evt.data }
move fires on direction change only move fires on every pointermove

See the full migration guide for details.


Configuration

📅 Schedule: Branch creation - "after 12pm on Tuesday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pointland Ready Ready Preview, Comment Mar 24, 2026 9:00pm

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Mar 24, 2026
@renovate renovate bot force-pushed the deps/nipplejs-1.x branch from 16ecf5f to 79f2cfa Compare March 24, 2026 21:00
@renovate renovate bot merged commit 31ea449 into main Mar 25, 2026
5 checks passed
@renovate renovate bot deleted the deps/nipplejs-1.x branch March 25, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants