Skip to content

upgrade: cursor package upgrade for Solid 2.0#869

Draft
davedbase wants to merge 1 commit intosolidjs-community:nextfrom
davedbase:update/v2/cursor
Draft

upgrade: cursor package upgrade for Solid 2.0#869
davedbase wants to merge 1 commit intosolidjs-community:nextfrom
davedbase:update/v2/cursor

Conversation

@davedbase
Copy link
Copy Markdown
Member

Solid 2.0 migration

  • createEffect updated to the split compute/apply model — cleanup is returned from apply instead of onCleanup
  • isServer import moved from solid-js/web@solidjs/web
  • Tests updated with flush() after createRoot and each signal write, since Solid 2.0 defers effects by default
  • Peer deps bumped to solid-js@^2.0.0-beta.10 + @solidjs/web@^2.0.0-beta.10

New primitives

  • makeBodyCursor(cursor) / makeElementCursor(target, cursor) — imperative, non-reactive; call anywhere, get a cleanup function back. makeBodyCursor delegates to makeElementCursor(document.body, cursor) to avoid duplication
  • createDragCursor(target, options?) — sets "grab" on the element and switches to "grabbing" on the body during drag. The body-targeting trick is necessary because element inline styles beat body inline styles even with !important, so the element cursor is cleared during drag to let the body cursor inherit through
  • cursorRef(cursor) — ref factory for <div ref={cursorRef("pointer")}>, accepts a static value or signal

@davedbase davedbase added this to the Solid 2.0 Migration milestone May 4, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: 8cfd3f8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solid-primitives/cursor Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@davedbase davedbase changed the title upgrade: history package upgrade for Solid 2.0 upgrade: cursor package upgrade for Solid 2.0 May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant