diff --git a/.changeset/pre.json b/.changeset/pre.json index 15aaaabeb..68c985f71 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -86,7 +86,108 @@ "@solid-primitives/utils": "6.4.0", "@solid-primitives/virtual": "0.2.3", "@solid-primitives/websocket": "1.3.2", - "@solid-primitives/workers": "0.4.3" + "@solid-primitives/workers": "0.4.3", + "@solid-primitives/a11y": "0.0.100", + "@solid-primitives/controlled-signal": "0.0.100", + "@solid-primitives/form": "0.0.100", + "@solid-primitives/interaction": "0.1.0", + "@solid-primitives/list-state": "0.1.0", + "@solid-primitives/mediastream": "0.1.0", + "@solid-primitives/notification": "0.0.100", + "@solid-primitives/orientation": "0.0.100", + "@solid-primitives/queue": "0.1.0", + "@solid-primitives/sensors": "0.1.0", + "@solid-primitives/vibrate": "0.0.100", + "@solid-primitives/video": "0.0.100" }, - "changesets": [] + "changesets": [ + "a11y-solid2-initial", + "active-element-solid2-migration", + "audio-solid2-migration", + "bounds-solid2-migration", + "broadcast-channel-solid2-migration", + "clipboard-solid-2", + "connectivity-solid2-migration", + "context-solid2-migration", + "controlled-props-solid2-migration", + "controlled-signal-solid2-initial", + "cookies-solid2-migration", + "cursor-solid2-migration", + "date-solid2-migration", + "deep-solid2-migration", + "destructure-solid2-migration", + "devices-solid2-migration", + "eleven-baths-build", + "eleven-buttons-jump", + "event-bus-solid2-migration", + "event-dispatcher-solid2-migration", + "event-props-solid2-migration", + "filesystem-solid2-migration", + "flux-store-solid2-migration", + "focus-solid2-migration", + "form-solid2-initial", + "fullscreen-solid-2-migration", + "geolocation-solid2-async-reactivity", + "gestures-solid2-migration", + "graphql-solid2-migration", + "history-solid2-migration", + "i18n-solid2-migration", + "idle-solid2-migration", + "immutable-solid2-migration", + "input-mask-solid2-migration", + "interaction-solid2-migration", + "jsx-tokenizer-solid2-migration", + "keyboard-solid2-migration", + "keyed-solid2-migration", + "lifecycle-solid2-migration", + "list-solid2-migration", + "list-state-solid2-migration", + "map-solid2-migration", + "marker-solid2-migration", + "masonry-solid2-migration", + "match-solid2-migration", + "media-solid2-migration", + "mediastream-solid2-migration", + "memo-solid2-migration", + "mouse-solid2-migration", + "mutable-solid2-migration", + "mutation-observer-solid2-migration", + "notification-initial", + "orientation-initial", + "page-utilities-solid2-migration", + "pagination-solid2-migration", + "platform-solid2-migration", + "pointer-solid2-migration", + "presence-solid2-migration", + "promise-solid2-migration", + "props-solid2-migration", + "queue-initial", + "raf-solid2-migration", + "range-solid2-migration", + "redesign-intersection-observer-primitives", + "refs-solid2-migration", + "resize-observer-solid2-migration", + "restore-make-intersection-observer", + "scheduled-solid2-migration", + "script-loader-solid2-migration", + "scroll-solid2-migration", + "selection-solid2-migration", + "sensors-new-package", + "set-solid2-migration", + "share-solid2-migration", + "signal-builders-solid2-migration", + "spring-solid2-migration", + "sse-solid2-async-reactivity", + "state-machine-solid2-migration", + "styles-solid2-migration", + "sweet-olives-talk", + "transition-group-solid2-migration", + "trigger-solid2-migration", + "tween-solid2-migration", + "upload-solid-2-migration", + "vibrate-initial", + "video-initial", + "virtual-solid2-migration", + "websocket-solid-2-async" + ] } diff --git a/packages/a11y/CHANGELOG.md b/packages/a11y/CHANGELOG.md new file mode 100644 index 000000000..7fae12106 --- /dev/null +++ b/packages/a11y/CHANGELOG.md @@ -0,0 +1,13 @@ +# @solid-primitives/a11y + +## 1.0.0-next.0 + +### Major Changes + +- 9b2475d: Initial release targeting Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 diff --git a/packages/a11y/package.json b/packages/a11y/package.json index f1552745a..5efce6e40 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/a11y", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "Accessibility primitives for Solid.js — labeled field groups, ARIA graph helpers, and more.", "author": "David Di Biase ", "contributors": [], diff --git a/packages/active-element/CHANGELOG.md b/packages/active-element/CHANGELOG.md index 488cd4b99..bacd22153 100644 --- a/packages/active-element/CHANGELOG.md +++ b/packages/active-element/CHANGELOG.md @@ -1,5 +1,31 @@ # @solid-primitives/active-element +## 3.0.0-next.0 + +### Major Changes + +- 1e9a524: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `makeFocusListener` and `createFocusSignal` have moved to `@solid-primitives/focus`. Import them from there instead: + ```ts + // Before + import { makeFocusListener, createFocusSignal } from "@solid-primitives/active-element"; + // After + import { makeFocusListener, createFocusSignal } from "@solid-primitives/focus"; + ``` + - `isServer` is now sourced from `@solidjs/web` internally (no user-facing API change) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + ## 2.1.5 ### Patch Changes diff --git a/packages/active-element/package.json b/packages/active-element/package.json index ebe234225..779e4c849 100644 --- a/packages/active-element/package.json +++ b/packages/active-element/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/active-element", - "version": "2.1.5", + "version": "3.0.0-next.0", "description": "A reactive document.activeElement. Check which element is currently focused.", "author": "Damian Tarnawski @thetarnav ", "contributors": [ diff --git a/packages/audio/CHANGELOG.md b/packages/audio/CHANGELOG.md index 85c011612..6cedfa0f2 100644 --- a/packages/audio/CHANGELOG.md +++ b/packages/audio/CHANGELOG.md @@ -1,5 +1,40 @@ # @solid-primitives/audio +## 3.0.0-next.0 + +### Major Changes + +- d50d75a: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/audio` + + - `isServer` now imported from `@solidjs/web` + - Signals use `ownedWrite: true` option for derived writable signals + - `createEffect` uses the split compute/apply form for reactive source changes + - `duration` accessor throws `NotReadyError` until audio metadata loads, integrating with ``. Previously returned `NaN` before load; resets to pending whenever the source changes. + + ```tsx + // Before (Solid 1.x): duration() returned NaN before metadata loaded + // After (Solid 2.0): wrap in to handle the pending state + + {audio.duration()}s + + ``` + + - SSR: `duration()` throws `NotReadyError` on the server (was previously `NaN`). + - Added `test/server.test.ts` to verify safe SSR behavior + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/static-store@1.0.0-next.0 + ## 2.0.0 ### Major Changes diff --git a/packages/audio/package.json b/packages/audio/package.json index 07e284a0e..cf0a0c069 100644 --- a/packages/audio/package.json +++ b/packages/audio/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/audio", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "Primitives to manage audio and single sounds.", "author": "David Di Biase ", "license": "MIT", diff --git a/packages/bounds/CHANGELOG.md b/packages/bounds/CHANGELOG.md index da6ca4b89..0864afa12 100644 --- a/packages/bounds/CHANGELOG.md +++ b/packages/bounds/CHANGELOG.md @@ -1,5 +1,30 @@ # @solid-primitives/bounds +## 1.0.0-next.0 + +### Major Changes + +- fa549e1: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/bounds` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `onMount` replaced by `onSettled` for post-render initialization + - `sharedConfig.context` replaced by `sharedConfig.hydrating` for hydration detection + - Inline `ResizeObserver` usage with split `createEffect` (compute/apply) replaces the `@solid-primitives/resize-observer` dependency — the `@solid-primitives/resize-observer` package is no longer a dependency + - `@solid-primitives/static-store` dependency removed — bounds reactive object now built with `createMemo` directly for full Solid 2.0 type compatibility + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + ## 0.1.5 ### Patch Changes diff --git a/packages/bounds/package.json b/packages/bounds/package.json index af3968419..c10227c2a 100644 --- a/packages/bounds/package.json +++ b/packages/bounds/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/bounds", - "version": "0.1.5", + "version": "1.0.0-next.0", "description": "Primitives for tracking HTML element size and position on screen as it changes.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/broadcast-channel/CHANGELOG.md b/packages/broadcast-channel/CHANGELOG.md index addf051b2..f4926a540 100644 --- a/packages/broadcast-channel/CHANGELOG.md +++ b/packages/broadcast-channel/CHANGELOG.md @@ -1,5 +1,18 @@ # @solid-primitives/broadcast-channel +## 1.0.0-next.0 + +### Major Changes + +- df9779c: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + - `createEffect` usage follows the split compute/apply pattern required by Solid 2.0 — single-argument `createEffect` is no longer supported + ## 0.1.1 ### Patch Changes diff --git a/packages/broadcast-channel/package.json b/packages/broadcast-channel/package.json index 3dbd99777..9085d1ec9 100644 --- a/packages/broadcast-channel/package.json +++ b/packages/broadcast-channel/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/broadcast-channel", - "version": "0.2.0", + "version": "1.0.0-next.0", "description": "Primitives to manage Broadcast Channel API", "author": "Caleb Taylor ", "contributors": [], diff --git a/packages/clipboard/CHANGELOG.md b/packages/clipboard/CHANGELOG.md index ee2018ce0..7cc9c3f3e 100644 --- a/packages/clipboard/CHANGELOG.md +++ b/packages/clipboard/CHANGELOG.md @@ -1,5 +1,25 @@ # @solid-primitives/clipboard +## 2.0.0-next.15 + +### Major Changes + +- c05d43f: Upgrade to Solid 2.0 (`solid-js@^2.0.0-beta.14`). + + **`createClipboard`** — replaced `createResource` with a Solid 2.0 async `createMemo`. The accessor starts as `[]` synchronously (no initial suspension) and resolves asynchronously after `refetch()`. Use `isPending(() => clipboard())` for a loading indicator instead of ``. + + **`copyToClipboard`** — converted from a `use:` directive to a `ref` directive factory. Replace `use:copyToClipboard={opts}` with `ref={copyToClipboard(opts)}`. + + **`isServer`** — moved from `solid-js/web` to `@solidjs/web` in Solid 2.0; the package now imports from `@solidjs/web`. + + **`createEffect` + `on`** — `on` helper removed; replaced with the Solid 2.0 split `createEffect(compute, effect)` form with explicit defer-by-default behavior. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 2.0.0-beta.0 ### Major Changes diff --git a/packages/clipboard/package.json b/packages/clipboard/package.json index 3e9920977..21a94e5aa 100644 --- a/packages/clipboard/package.json +++ b/packages/clipboard/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/clipboard", - "version": "2.0.0-beta.14", + "version": "2.0.0-next.15", "description": "Primitives for reading and writing to clipboard.", "author": "David Di Biase ", "contributors": [ diff --git a/packages/connectivity/CHANGELOG.md b/packages/connectivity/CHANGELOG.md index c0675ecb7..cc3438451 100644 --- a/packages/connectivity/CHANGELOG.md +++ b/packages/connectivity/CHANGELOG.md @@ -1,5 +1,33 @@ # @solid-primitives/connectivity +## 1.0.0-next.0 + +### Major Changes + +- 6f25a4a: Migrate to Solid.js v2.0 (beta.14) and add Network Information API primitives. + + ## New + + - `makeNetworkInformation(callback)` — low-level listener combining `window` online/offline events with `navigator.connection` change events; fires a `NetworkState` snapshot on any change + - `createNetworkInformation()` → `{ online, downlink, downlinkMax, effectiveType, rtt, saveData, type }` — independent reactive signals for the full network state; useful for adaptive loading strategies + - `useNetworkInformation()` — singleton root variant of `createNetworkInformation` + - Exported types: `NetworkState`, `NetworkInformationReturn`, `EffectiveConnectionType`, `ConnectionType` + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now sourced from `@solidjs/web` internally (no user-facing API change) + - The internal connectivity signal uses `ownedWrite: true` to support event listeners that may fire synchronously within reactive scopes + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + ## 0.4.5 ### Patch Changes diff --git a/packages/connectivity/package.json b/packages/connectivity/package.json index 13cc9e127..1fd7748a0 100644 --- a/packages/connectivity/package.json +++ b/packages/connectivity/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/connectivity", - "version": "0.4.5", + "version": "1.0.0-next.0", "description": "A navigator.onLine signal.", "author": "Klemen Slavič ", "contributors": [ diff --git a/packages/context/CHANGELOG.md b/packages/context/CHANGELOG.md index 4ed19184e..55cfb6cfb 100644 --- a/packages/context/CHANGELOG.md +++ b/packages/context/CHANGELOG.md @@ -1,5 +1,25 @@ # @solid-primitives/context +## 2.0.0-next.0 + +### Major Changes + +- bca95a8: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `Context` is now used directly as the provider component — `Context.Provider` no longer exists in Solid 2.0. `createContextProvider` and `MultiProvider` both reflect this change. + - `ContextProviderComponent` is now a proper export from `solid-js`; the previous workaround importing from an internal `node_modules` path has been removed. + - `JSX.Element` replaced with `Element` from `solid-js` throughout the public API types, matching Solid 2.0's renderer-neutral type model. + - `MultiProvider` no longer falls back to accessing `.Provider` on non-function items — contexts passed in `values` must be functions (which all `Context` objects now are in Solid 2.0). + + ## New APIs + + - `createContextProvider` now returns `Exclude` from its `useContext` helper, matching Solid 2's throwing behavior for missing context values. + - Added `createOptionalContextProvider` — uses an internal Symbol fallback and returns `undefined` when the context is missing or its value is `undefined`. Accepts an optional default value for missing providers. + ## 1.0.0 ### Major Changes diff --git a/packages/context/package.json b/packages/context/package.json index 61bd9931e..d9bc49fde 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/context", - "version": "1.0.0", + "version": "2.0.0-next.0", "description": "Primitives simplifying or extending the SolidJS Context API", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/controlled-props/CHANGELOG.md b/packages/controlled-props/CHANGELOG.md index b31938c83..2855faebb 100644 --- a/packages/controlled-props/CHANGELOG.md +++ b/packages/controlled-props/CHANGELOG.md @@ -1,5 +1,31 @@ # @solid-primitives/controlled-props +## 1.0.0-next.0 + +### Major Changes + +- a4dd17f: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + **Signal writes are now batched**: In Solid 2.0 all signal writes are batched by default. When calling a setter returned by `createControlledProp` or `createControlledProps`, the updated value is not visible synchronously — call `flush()` from `solid-js` before reading it in tests or imperative code. + + **`ownedWrite` on internal signal**: The signal created by `createControlledProp` now uses `{ ownedWrite: true }` so setters can safely be called from within reactive scopes (component bodies, effects). This matches Solid 2.0's requirement that signals written inside an owned scope opt in explicitly. + + ## New Features + + **`RangeProp` component**: A new exported component that renders a range slider (``). Use it standalone or via `createControlledProp` with `type: "range"`. + + **`step` option**: `createControlledProp` now accepts `step` in `TestPropOptions` and forwards it to `NumberProp` and `RangeProp`, enabling discrete value increments. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/controlled-props/package.json b/packages/controlled-props/package.json index bb697d34c..9d815a235 100644 --- a/packages/controlled-props/package.json +++ b/packages/controlled-props/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/controlled-props", - "version": "0.1.3", + "version": "1.0.0-next.0", "description": "The primitives in this package allow you to create controlls for component props.", "author": "Alex Lohr ", "contributors": [], diff --git a/packages/controlled-signal/CHANGELOG.md b/packages/controlled-signal/CHANGELOG.md index 7a4d5a41a..fc074065b 100644 --- a/packages/controlled-signal/CHANGELOG.md +++ b/packages/controlled-signal/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/controlled-signal +## 1.0.0-next.0 + +### Major Changes + +- 9b2475d: Initial release targeting Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.0.100 Initial release. diff --git a/packages/controlled-signal/package.json b/packages/controlled-signal/package.json index b1858d4ea..272709814 100644 --- a/packages/controlled-signal/package.json +++ b/packages/controlled-signal/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/controlled-signal", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "Reactive signals that support both controlled (externally managed) and uncontrolled (internally managed) state — a pattern commonly used in headless UI components.", "author": "David Di Biase ", "contributors": [ diff --git a/packages/cookies/CHANGELOG.md b/packages/cookies/CHANGELOG.md index 2192ecc8b..7f1a1c336 100644 --- a/packages/cookies/CHANGELOG.md +++ b/packages/cookies/CHANGELOG.md @@ -1,5 +1,22 @@ # @solid-primitives/cookies +## 1.0.0-next.0 + +### Major Changes + +- 2ca051c: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` and `getRequestEvent` are now imported from `@solidjs/web` (were `solid-js/web`) + - `createEffect` follows the split compute/apply pattern required by Solid 2.0 — the internal cookie-sync effect now separates reactive tracking from the `document.cookie` write + + ## New + + - Full test suite added: 19 browser tests and 6 SSR tests covering `parseCookie`, `getCookiesString`, `createServerCookie`, and `createUserTheme` + ## 0.0.3 ### Patch Changes diff --git a/packages/cookies/package.json b/packages/cookies/package.json index 47ee259b1..ab5ab18d1 100644 --- a/packages/cookies/package.json +++ b/packages/cookies/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/cookies", - "version": "0.0.3", + "version": "1.0.0-next.0", "description": "Reactive, signal-based cookie primitives for isomorphic use on client and server", "author": "Thomas Beer (https://github.com/Tommypop2)", "contributors": [ diff --git a/packages/cursor/CHANGELOG.md b/packages/cursor/CHANGELOG.md index 0ac857de0..8a9fc6aad 100644 --- a/packages/cursor/CHANGELOG.md +++ b/packages/cursor/CHANGELOG.md @@ -1,5 +1,31 @@ # @solid-primitives/cursor +## 1.0.0-next.0 + +### Major Changes + +- 8cfd3f8: Migrate to Solid.js v2.0 and add new primitives + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `createElementCursor` and `createBodyCursor` updated to the split compute/apply effect pattern required by Solid 2.0 — cleanup is returned from the apply phase instead of using `onCleanup` + + ## New Exports + + - `makeBodyCursor(cursor)` — sets cursor on body immediately, returns a cleanup function + - `makeElementCursor(target, cursor)` — sets cursor on an element immediately, returns a cleanup function + - `createDragCursor(target, options?)` — reactively sets `"grab"` on a target element and switches to `"grabbing"` on the body during pointer drag + - `cursorRef(cursor)` — ref factory for inline JSX use: `
` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/cursor/package.json b/packages/cursor/package.json index 4839eca19..d3c8ec4dd 100644 --- a/packages/cursor/package.json +++ b/packages/cursor/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/cursor", - "version": "0.2.0", + "version": "1.0.0-next.0", "description": "Primitives for setting CSS cursor property reactively.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/date/CHANGELOG.md b/packages/date/CHANGELOG.md index 89adf1d01..3696a724c 100644 --- a/packages/date/CHANGELOG.md +++ b/packages/date/CHANGELOG.md @@ -1,5 +1,28 @@ # @solid-primitives/date +## 3.0.0-next.0 + +### Major Changes + +- 607d43c: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now imported from `@solidjs/web` (not `solid-js/web`) + - `createStore` is now imported from `solid-js` (not `solid-js/store`) + - `@solid-primitives/timer` and `@solid-primitives/memo` dependencies removed; `TimeoutSource` type is now defined locally + - `createDateNow`: `createEffect` converted to split `(compute, apply)` form required by Solid 2.0; cleanup returned from apply phase instead of `onCleanup` + - `createCountdown`: `createComputed` (removed in Solid 2.0) replaced with `createRenderEffect(compute, apply)` + - `createDate`: `createWritableMemo` (removed in Solid 2.0) replaced with `createSignal(fn)` overload + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 2.1.6 ### Patch Changes diff --git a/packages/date/package.json b/packages/date/package.json index 784807e9f..48e317e2a 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/date", - "version": "2.1.6", + "version": "3.0.0-next.0", "description": "Collection of reactive primitives and utility functions, providing easier ways to deal with dates in SolidJS", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/deep/CHANGELOG.md b/packages/deep/CHANGELOG.md index b9056088e..679c6a344 100644 --- a/packages/deep/CHANGELOG.md +++ b/packages/deep/CHANGELOG.md @@ -1,5 +1,29 @@ # @solid-primitives/deep +## 1.0.0-next.0 + +### Major Changes + +- 7e247f2: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/deep` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - Store imports (`createStore`, `reconcile`, `snapshot`) moved from `solid-js/store` to `solid-js` + - `unwrap` replaced by `snapshot` — returns a plain non-reactive copy of a store + - Store setters now use draft-first form: `setState(s => { s.prop = value; })` replaces path-based setters + - `createEffect` in examples updated to required split compute/apply form + - `trackStore` now correctly handles getters (subscribes to reactive deps accessed through getters) and rejects plain object wrappers around stores (`pojo: false` behavior preserved) + +### Patch Changes + +- Updated dependencies [9b2475d] + - @solid-primitives/memo@2.0.0-next.0 + ## 0.3.5 ### Patch Changes diff --git a/packages/deep/package.json b/packages/deep/package.json index ed494647e..ec42f3731 100644 --- a/packages/deep/package.json +++ b/packages/deep/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/deep", - "version": "0.3.5", + "version": "1.0.0-next.0", "description": "Primitives for tracking and observing nested reactive objects in Solid.", "author": "Samuel Burbano ", "contributors": [ diff --git a/packages/destructure/CHANGELOG.md b/packages/destructure/CHANGELOG.md index c553e1c63..f6fbf4ebc 100644 --- a/packages/destructure/CHANGELOG.md +++ b/packages/destructure/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/destructure +## 1.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/destructure/package.json b/packages/destructure/package.json index 1db0a5489..0ff8eb5e3 100644 --- a/packages/destructure/package.json +++ b/packages/destructure/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/destructure", - "version": "0.3.0", + "version": "1.0.0-next.0", "description": "Primitives for destructuring reactive objects – like props or stores – or signals of them into a separate accessors updated individually.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/devices/CHANGELOG.md b/packages/devices/CHANGELOG.md index 1fbe4dc6c..45e8959e5 100644 --- a/packages/devices/CHANGELOG.md +++ b/packages/devices/CHANGELOG.md @@ -1,5 +1,21 @@ # @solid-primitives/devices +## 3.0.0-next.0 + +### Major Changes + +- 8b5c942: Migrate to Solid.js v2.0 (beta.14). `createAccelerometer` and `createGyroscope` have been moved to the new `@solid-primitives/sensors` package. + + Breaking changes: + + - `solid-js` peer dependency updated to `^2.0.0-beta.14` + - `@solidjs/web` is now a required peer dependency + - `createAccelerometer` removed — use `@solid-primitives/sensors` instead + - `createGyroscope` removed — use `@solid-primitives/sensors` instead + - `createMemo` initialValue arg removed (Solid 2.0 API change) + - `isServer` imported from `@solidjs/web` + - `createStore` imported from `solid-js` (not `solid-js/store`) + ## 1.3.1 ### Patch Changes diff --git a/packages/devices/package.json b/packages/devices/package.json index 6b3e58482..cfa46ece2 100644 --- a/packages/devices/package.json +++ b/packages/devices/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/devices", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "Reactive primitives for enumerating and filtering media input/output devices (microphones, speakers, cameras).", "author": "Alex Lohr ", "contributors": [ diff --git a/packages/event-bus/CHANGELOG.md b/packages/event-bus/CHANGELOG.md index be55eaa8b..b4f068d75 100644 --- a/packages/event-bus/CHANGELOG.md +++ b/packages/event-bus/CHANGELOG.md @@ -1,5 +1,37 @@ # @solid-primitives/event-bus +## 3.0.0-next.0 + +### Major Changes + +- 37b1bab: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + ### `batchEmits` + + In Solid 2.0, all signal writes are automatically batched via microtasks. `batchEmits` is now a no-op that returns the bus unchanged. The `batch` wrapper has been removed. + + ### `toEffect` + + Updated to use the Solid 2.0 split `createEffect(compute, apply)` signature. The `on()` helper (removed in Solid 2.0) has been replaced with the split effect pattern. The reactive owner is now explicitly captured at creation time and forwarded via `runWithOwner` in the apply phase, since the apply phase is unowned in Solid 2.0. + + ### `createEventStack` + + The internal stack signal is created with `{ ownedWrite: true }` to allow writes from event listeners called within reactive contexts (e.g. `createRoot`, effects). Signal reads are now deferred in Solid 2.0, so the stack value emitted in event payloads is now computed inside the setter callback to ensure it reflects the updated state. + + ### Tests + + Tests that read signal values after `emit()` now require `flush()` to commit pending signal updates before assertions. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.1.3 ### Patch Changes diff --git a/packages/event-bus/package.json b/packages/event-bus/package.json index 5553d7e6e..449a0c971 100644 --- a/packages/event-bus/package.json +++ b/packages/event-bus/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/event-bus", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "A collection of SolidJS primitives providing various features of a pubsub/event-emitter/event-bus.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/event-dispatcher/CHANGELOG.md b/packages/event-dispatcher/CHANGELOG.md index 01015d443..b94a6f119 100644 --- a/packages/event-dispatcher/CHANGELOG.md +++ b/packages/event-dispatcher/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/event-dispatcher +## 1.0.0-next.0 + +### Major Changes + +- 3c42625: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now sourced from `@solidjs/web` internally (no user-facing API change) + ## 0.1.1 ### Patch Changes diff --git a/packages/event-dispatcher/package.json b/packages/event-dispatcher/package.json index aab6c9453..0a69ecace 100644 --- a/packages/event-dispatcher/package.json +++ b/packages/event-dispatcher/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/event-dispatcher", - "version": "0.1.1", + "version": "1.0.0-next.0", "description": "A primitive to dispatch component events.", "author": "Aylo Srd ", "contributors": [], diff --git a/packages/event-listener/CHANGELOG.md b/packages/event-listener/CHANGELOG.md index 49dfebf9a..81cb39454 100644 --- a/packages/event-listener/CHANGELOG.md +++ b/packages/event-listener/CHANGELOG.md @@ -1,5 +1,53 @@ # @solid-primitives/event-listener +## 3.0.0-next.0 + +### Major Changes + +- 4a5bf32: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/media` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - Requires Solid.js v2 — `classList` is replaced by `class` with object/array forms in consuming code + + ### `@solid-primitives/utils` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSignal`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) for hydration detection + - `INTERNAL_OPTIONS`: `{ internal: true }` changed to `{ pureWrite: true }` to match Solid 2.0 `SignalOptions` + - `defaultEquals` now aliases `isEqual` (was `equalFn`) + - `defer`: `AccessorArray` type replaced with `Accessor[]` (type was removed in Solid 2.0) + + ### `@solid-primitives/static-store` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createStaticStore`: uses `getObserver` (was `getListener`) and `{ pureWrite: true }` (was `{ internal: true }`) + - Removed explicit `batch()` calls — updates are automatically batched in Solid 2.0 + - `createHydratableStaticStore`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) + + ### `@solid-primitives/rootless` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSingletonRoot`: uses `sharedConfig.hydrating` (was `sharedConfig.context`) + - `createRootPool`: removed `batch()` calls — Solid 2.0 auto-batches on microtasks + + ### `@solid-primitives/event-listener` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` across all source files + - `createEventListener` and `createRenderEffect` converted to split compute/apply effect pattern required by Solid 2.0 + - `eventListener` directive converted to split effect pattern; cleanup is returned from apply phase instead of using `onCleanup` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 2.4.5 ### Patch Changes diff --git a/packages/event-listener/package.json b/packages/event-listener/package.json index 158f02b2d..489baace7 100644 --- a/packages/event-listener/package.json +++ b/packages/event-listener/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/event-listener", - "version": "2.4.5", + "version": "3.0.0-next.0", "description": "SolidJS Primitives to manage creating event listeners.", "author": "David Di Biase ", "contributors": [ diff --git a/packages/event-props/CHANGELOG.md b/packages/event-props/CHANGELOG.md index 30e0b2c03..a45106820 100644 --- a/packages/event-props/CHANGELOG.md +++ b/packages/event-props/CHANGELOG.md @@ -1,5 +1,20 @@ # @solid-primitives/event-props +## 1.0.0-next.0 + +### Major Changes + +- 135a600: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + ### `@solid-primitives/event-props` + + - Requires Solid.js v2 — signal writes from event handlers fire outside any reactive scope (as they always do from DOM events), consistent with Solid 2.0's owned-scope write restrictions + - Signal writes are microtask-batched in Solid 2.0; reads reflect the committed value after the next microtask or an explicit `flush()` + ## 0.3.1 ### Patch Changes diff --git a/packages/event-props/package.json b/packages/event-props/package.json index 92f25671e..b807ae9a8 100644 --- a/packages/event-props/package.json +++ b/packages/event-props/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/event-props", - "version": "0.3.1", + "version": "1.0.0-next.0", "description": "Primitive to manage events in a reactive way.", "author": "Alex Lohr ", "license": "MIT", diff --git a/packages/filesystem/CHANGELOG.md b/packages/filesystem/CHANGELOG.md index f42c79525..3df39026a 100644 --- a/packages/filesystem/CHANGELOG.md +++ b/packages/filesystem/CHANGELOG.md @@ -1,5 +1,20 @@ # @solid-primitives/filesystem +## 3.0.0-next.0 + +### Major Changes + +- 591095f: Migrate to Solid.js v2.0 (beta.14). + + Breaking changes: + + - `solid-js` peer dependency updated to `^2.0.0-beta.14` + - `@solidjs/web` is now a required peer dependency + - `isServer` is now imported from `@solidjs/web` + - `createSyncFileSystem` and `createAsyncFileSystem` internal signals use `ownedWrite: true` to support writes from reactive scopes + - `createAsyncFileSystem` no longer uses `createResource` — reads are backed by plain signals with manual `Promise`-based fetching, eliminating `ResourceActions` from the API + - The `toPromise` helper in `tools.ts` uses the Solid 2.0 split `createEffect(compute, apply)` pattern + ## 1.3.3 ### Patch Changes diff --git a/packages/filesystem/package.json b/packages/filesystem/package.json index 654a6059a..b7e8c918e 100644 --- a/packages/filesystem/package.json +++ b/packages/filesystem/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/filesystem", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "A primitive for convenient file system access.", "author": "Alex Lohr ", "contributors": [], diff --git a/packages/flux-store/CHANGELOG.md b/packages/flux-store/CHANGELOG.md index 8a2bdbd7d..262412796 100644 --- a/packages/flux-store/CHANGELOG.md +++ b/packages/flux-store/CHANGELOG.md @@ -1,5 +1,49 @@ # @solid-primitives/flux-store +## 1.0.0-next.0 + +### Major Changes + +- c50bb56: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` is now required. + + **Store setter is now draft-first.** The `setState` function received in the `actions` callback no longer accepts path-style arguments. Instead, pass a draft mutator function: + + ```ts + // Before (Solid 1.x) + actions: setState => ({ + increment(by = 1) { + setState("value", p => p + by); + }, + reset() { + setState("value", 0); + }, + }); + + // After (Solid 2.0) + actions: setState => ({ + increment(by = 1) { + setState(s => { + s.value += by; + }); + }, + reset() { + setState(s => { + s.value = 0; + }); + }, + }); + ``` + + **`produce` helper removed.** Solid 2.0 stores use draft-first mutation by default, so `produce` is no longer necessary or available. Replace any `setState(produce(s => ...))` calls with `setState(s => ...)`. + + **`batch` wrapper removed from `createAction`.** All writes in Solid 2.0 are auto-batched, so the explicit `batch()` wrap has been removed from `createAction`. Actions remain `untrack`ed. + + **Import paths updated:** `createStore` and `StoreSetter` (formerly `SetStoreFunction`) are now imported from `solid-js` directly (store types were merged into the main package). + ## 0.1.1 ### Patch Changes diff --git a/packages/flux-store/package.json b/packages/flux-store/package.json index b622ebd32..9401aa6af 100644 --- a/packages/flux-store/package.json +++ b/packages/flux-store/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/flux-store", - "version": "0.1.1", + "version": "1.0.0-next.0", "description": "SolidJS Primitive to simplify the creation of global stores and the ability to access and mutate them.", "author": "Zalexios ", "contributors": [], diff --git a/packages/focus/CHANGELOG.md b/packages/focus/CHANGELOG.md index ac009a623..4eac68943 100644 --- a/packages/focus/CHANGELOG.md +++ b/packages/focus/CHANGELOG.md @@ -1,5 +1,55 @@ # @solid-primitives/focus +## 1.0.0-next.0 + +### Major Changes + +- ddf4ecd: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `autofocus` is now a **ref callback factory** (`use:autofocus` directive removed; Solid 2.0 no longer supports `use:` directives): + + ```tsx + // Before + + // After + + + // Before + + // After + + ``` + + - `JSX` type is now imported from `@solidjs/web` (was `solid-js`) + - `onMount` replaced by `onSettled` from `solid-js` + - `createAutofocus` uses split `createEffect(compute, apply)` form with proper timeout cleanup on re-focus + + ## New Primitives + + `makeFocusListener` and `createFocusSignal` have moved here from `@solid-primitives/active-element`: + + - **`makeFocusListener(target, callback, useCapture?)`** — attaches `focus`/`blur` listeners to an element, calling `callback` with the new boolean focus state. Returns a cleanup function. + ```ts + const clear = makeFocusListener(el, isFocused => console.log(isFocused)); + clear(); // remove listeners + ``` + - **`createFocusSignal(target)`** — reactive signal that tracks whether `target` is focused. + ```ts + const isFocused = createFocusSignal(() => el); + isFocused(); // boolean + ``` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + ## 0.1.4 ### Patch Changes diff --git a/packages/focus/package.json b/packages/focus/package.json index 0bde91d43..5d44f88fd 100644 --- a/packages/focus/package.json +++ b/packages/focus/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/focus", - "version": "0.2.0", + "version": "1.0.0-next.0", "description": "Primitives for autofocusing HTML elements and trapping focus within a container", "author": "jer3m01 ", "contributors": [ diff --git a/packages/form/CHANGELOG.md b/packages/form/CHANGELOG.md new file mode 100644 index 000000000..16badb86b --- /dev/null +++ b/packages/form/CHANGELOG.md @@ -0,0 +1,16 @@ +# @solid-primitives/form + +## 1.0.0-next.0 + +### Major Changes + +- 9b2475d: Initial release targeting Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [9b2475d] +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/a11y@1.0.0-next.0 + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 diff --git a/packages/form/package.json b/packages/form/package.json index 1f5c43323..4043976f3 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/form", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "Reactive form primitive for Solid.js with per-field signals, sync/async validation, validateOn control, and DOM binding.", "author": "David Di Biase ", "contributors": [], diff --git a/packages/fullscreen/CHANGELOG.md b/packages/fullscreen/CHANGELOG.md index e45166978..5464a43ba 100644 --- a/packages/fullscreen/CHANGELOG.md +++ b/packages/fullscreen/CHANGELOG.md @@ -1,5 +1,41 @@ # @solid-primitives/fullscreen +## 2.0.0-next.1 + +### Major Changes + +- a25fa88: Migrate `@solid-primitives/fullscreen` to Solid.js 2.0 (beta.14). + + **Breaking changes:** + + - Peer dependency updated from `solid-js ^1.6.12` to `solid-js ^2.0.0-beta.14` and `@solidjs/web ^2.0.0-beta.14`. + - The `use:createFullscreen` JSX directive (Solid 1.x `use:` namespace) is removed. Use the new `fullscreen()` ref directive factory instead: + + ```tsx + // Before (Solid 1.x) +
+ + // After (Solid 2.0) +
+ ``` + + **New exports:** + + - `fullscreen(active?, options?)` — ref directive factory that wraps `createFullscreen` for direct use on JSX elements via the `ref` prop. + + **Internal changes:** + + - `isServer` now imported from `@solidjs/web` (was `solid-js/web`). + - `createEffect` updated to Solid 2.0 split compute/effect signature. + - Test mock fixed: `document.fullscreenElement` is now a dynamic getter reflecting current fullscreen state; `document.exitFullscreen` now dispatches `fullscreenchange` matching browser behaviour. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + ## 2.0.0-beta.0 ### Breaking Changes diff --git a/packages/fullscreen/package.json b/packages/fullscreen/package.json index 65fd63b06..1d7a721f4 100644 --- a/packages/fullscreen/package.json +++ b/packages/fullscreen/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/fullscreen", - "version": "2.0.0-beta.0", + "version": "2.0.0-next.1", "description": "Primitive that wraps the fullscreen API.", "author": "Alex Lohr ", "license": "MIT", diff --git a/packages/geolocation/CHANGELOG.md b/packages/geolocation/CHANGELOG.md index 608f5e78e..6b4cc6168 100644 --- a/packages/geolocation/CHANGELOG.md +++ b/packages/geolocation/CHANGELOG.md @@ -1,5 +1,43 @@ # @solid-primitives/geolocation +## 3.0.0-next.0 + +### Major Changes + +- aadb2ce: Adapt geolocation primitives for Solid 2.0 async reactivity. + + ## `createGeolocationWatcher` — breaking changes + + **Pending state via `NotReadyError` (replaces `undefined`):** `location()` now throws `NotReadyError` until the first GPS fix arrives, integrating with `` boundaries. Previously it returned `undefined` (which was cast away) using the Solid 1.x `` suspension mechanism. + + ```tsx + // Before — undefined was returned silently (Solid 1.x Suspense behavior) + const { location } = createGeolocationWatcher(true); + location() // undefined before first fix + + // After — throws NotReadyError (Solid 2.0 pattern) + const { location } = createGeolocationWatcher(true); + location() // throws NotReadyError before first fix + + // Integrate with : + + + + ``` + + **Reactive options now correctly restart the watcher:** Previously `options` was read inside the effect handler (untracked), so changing a reactive `options` accessor had no effect. The effect source now tracks both `enabled` and `options` — when `options` changes while the watcher is active, the watcher is closed and reopened with the new options. + + ## SSR stubs — breaking changes + + `createGeolocation` and `createGeolocationWatcher` now throw `NotReadyError` on the server instead of a plain `Error`. This means SSR renders show the `` fallback (pending state) rather than hitting the `` boundary, which is the correct behavior for client-side-only APIs that will hydrate and resolve client-side. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/static-store@1.0.0-next.0 + ## 2.0.0 ### Major Changes diff --git a/packages/geolocation/package.json b/packages/geolocation/package.json index ee58bd2a6..c9b4c6319 100644 --- a/packages/geolocation/package.json +++ b/packages/geolocation/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/geolocation", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "Primitives to query geolocation and observe changes.", "author": "David Di Biase ", "license": "MIT", diff --git a/packages/gestures/CHANGELOG.md b/packages/gestures/CHANGELOG.md index 5d14ad788..03c8e447a 100644 --- a/packages/gestures/CHANGELOG.md +++ b/packages/gestures/CHANGELOG.md @@ -1,5 +1,46 @@ # @solid-primitives/gestures +## 3.0.0-next.0 + +### Major Changes + +- 972f355: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` is now required. + + - All gesture primitives have been converted from Solid v1 `use:` directives to **ref factory functions**. Pass the result of the factory call to the `ref` prop instead of using `use:name`. + + ```tsx + // Before (Solid v1 directive) +
+ + // After (ref factory) +
+ ``` + + - Props are now passed as **plain objects** rather than accessors. Callbacks can close over reactive state directly if dynamic behavior is needed. + + ```ts + // Before — directive convention wrapped props in an accessor + export const pan = (node: HTMLElement, props: () => Props) => { props().callback(...) } + + // After — plain object + export function pan(props: PanProps): (node: HTMLElement) => void + ``` + + - The `declare module "solid-js"` JSX augmentations for `use:pan`, `use:pinch`, `use:rotate`, `use:swipe`, and `use:tap` have been removed (directives no longer exist in Solid v2). + - `PanProps`, `PinchProps`, `RotateProps`, `SwipeProps`, and `TapProps` are now exported named types. + - `tap`: the `minimumTapLength` check now uses `>=` instead of `>`, so `minimumTapLength: 0` (the default) correctly accepts instantaneous taps. + - **`pan` no longer suppresses events outside the element bounds.** With pointer capture now active, coordinates during a drag may be negative or exceed the element's width/height. This is the expected behavior for draggable UIs. Downstream code that previously relied on the implicit bounds gate should add an explicit check. + + ## New Features + + - **`longPress`** — new primitive that fires once after a pointer is held stationary past a configurable `threshold` (default 500ms). Cancels on movement beyond `moveThreshold` (default 10px), early release, or a second pointer down. + - **Pointer capture** — all gesture primitives now call `setPointerCapture` on `pointerdown`. This ensures `pointermove` and `pointerup` events continue to fire on the element even when the pointer leaves its bounds during a gesture, eliminating the "stuck gesture" problem. + - **`touch-action` guidance** — README documents adding `touch-action: none` (or a more specific value) to prevent browser scroll/zoom from interfering with gesture handlers on touch devices. + ## 2.0.0 ### Major Changes diff --git a/packages/gestures/package.json b/packages/gestures/package.json index 5fd3a355c..ded2f1df3 100644 --- a/packages/gestures/package.json +++ b/packages/gestures/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/gestures", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "Ref factories to react to gestures", "author": "Moshe Uminer", "license": "MIT", diff --git a/packages/graphql/CHANGELOG.md b/packages/graphql/CHANGELOG.md index 289f2b5e3..9d771fe28 100644 --- a/packages/graphql/CHANGELOG.md +++ b/packages/graphql/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/graphql +## 3.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 2.2.5 ### Patch Changes diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 66bafdfc7..5ae3d74ad 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/graphql", - "version": "2.2.5", + "version": "3.0.0-next.0", "description": "Primitive that generates a client and reactive GraphQL queries", "author": "David Di Biase ", "contributors": [ diff --git a/packages/history/CHANGELOG.md b/packages/history/CHANGELOG.md index dc41d65dd..2bb8bc327 100644 --- a/packages/history/CHANGELOG.md +++ b/packages/history/CHANGELOG.md @@ -1,5 +1,29 @@ # @solid-primitives/history +## 1.0.0-next.0 + +### Major Changes + +- ae3016f: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/history` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `batch()` removed from `undo()` and `redo()` — Solid 2.0 batches signal updates automatically; call `flush()` before reading `canUndo()`/`canRedo()` in tests or non-reactive (non-render) contexts + - Internal count signal uses `{ pureWrite: true }` for Solid 2.0 signal semantics + - `createMemo` initial state is now managed via an explicit `initialState` reference — Solid 2.0's `createMemo` passes `undefined` as `prev` on the first call, unlike Solid 1.x which passed the `init` argument + - Added SSR test coverage (`test/server.test.ts`) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.3.0 ### Minor Changes diff --git a/packages/history/package.json b/packages/history/package.json index 1a2ffb868..d6032f162 100644 --- a/packages/history/package.json +++ b/packages/history/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/history", - "version": "0.2.3", + "version": "1.0.0-next.0", "description": "Primitives for managing undo/redo history in Solid.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/i18n/CHANGELOG.md b/packages/i18n/CHANGELOG.md index adc8b8005..6bf5b8a80 100644 --- a/packages/i18n/CHANGELOG.md +++ b/packages/i18n/CHANGELOG.md @@ -1,5 +1,24 @@ # @solid-primitives/i18n +## 3.0.0-next.0 + +### Major Changes + +- 8a0f3dc: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + ### `@solid-primitives/i18n` + + - `createResource` is removed in Solid 2.0 — use `createMemo` with an async function for dynamic dictionary loading, or a synchronous `createMemo` for static dictionaries + - `Suspense` is replaced by `Loading` from `solid-js` for wrapping async dictionary reads + - `useTransition` is removed — use `isPending()` from `solid-js` to observe transition state + - `onMount` replaced by `onSettled` for post-hydration lifecycle callbacks + - `createEffect` now requires the split compute/apply form: `createEffect(compute, effect)` — single-argument usage is no longer supported + - The `jsx` entry in test dictionaries no longer returns JSX elements; the test helper `setup.tsx` is renamed to `setup.ts` with plain object returns + ## 2.2.1 ### Patch Changes diff --git a/packages/i18n/package.json b/packages/i18n/package.json index e55bfe640..075e0241a 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/i18n", - "version": "2.2.1", + "version": "3.0.0-next.0", "description": "Library of primitives for providing internationalization support.", "author": "Alexandre Mouton-Brady ", "contributors": [ diff --git a/packages/idle/CHANGELOG.md b/packages/idle/CHANGELOG.md index 770a7e9a9..4741157c7 100644 --- a/packages/idle/CHANGELOG.md +++ b/packages/idle/CHANGELOG.md @@ -1,5 +1,25 @@ # @solid-primitives/idle +## 1.0.0-next.0 + +### Major Changes + +- fb86c45: Migrate to Solid.js v2.0 (beta.14) + + - Updated peer dependencies to `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` + - Changed `isServer` import from `solid-js/web` to `@solidjs/web` + - Replaced `onMount` with `onSettled` + - Removed `batch` calls (Solid 2.0 batches automatically via microtasks) + - Added `INTERNAL_OPTIONS` (`ownedWrite: true`) to signals to prevent owned-scope write warnings + - Used `noop` from `@solid-primitives/utils` for server-side no-op methods + - Fixed default events list: removed duplicate `"wheel"` entry (was listed twice as `"wheel"` and `"mousewheel"`) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.2.2 ### Patch Changes diff --git a/packages/idle/package.json b/packages/idle/package.json index 1f8820a32..9382a9e4a 100644 --- a/packages/idle/package.json +++ b/packages/idle/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/idle", - "version": "0.2.2", + "version": "1.0.0-next.0", "description": "A primitive to observe the user's idle status and react to its changes.", "author": "Aylo Srd ", "contributors": [], diff --git a/packages/immutable/CHANGELOG.md b/packages/immutable/CHANGELOG.md index f35fd3124..28be65768 100644 --- a/packages/immutable/CHANGELOG.md +++ b/packages/immutable/CHANGELOG.md @@ -1,5 +1,19 @@ # @solid-primitives/immutable +## 2.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [8526767] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/keyed@3.0.0-next.0 + ## 1.1.4 ### Patch Changes diff --git a/packages/immutable/package.json b/packages/immutable/package.json index 19ddc63a9..51df1a090 100644 --- a/packages/immutable/package.json +++ b/packages/immutable/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/immutable", - "version": "1.1.4", + "version": "2.0.0-next.0", "description": "Primitive for rectifying immutable values and dealing with immutability in Solid.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/input-mask/CHANGELOG.md b/packages/input-mask/CHANGELOG.md index d1af29d9b..9b6eeb843 100644 --- a/packages/input-mask/CHANGELOG.md +++ b/packages/input-mask/CHANGELOG.md @@ -1,5 +1,22 @@ # @solid-primitives/input-mask +## 1.0.0-next.0 + +### Major Changes + +- b6642c5: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + - The `solid-js/web` sub-path no longer exists in Solid 2.0; consumers using `render` must import it from `@solidjs/web` + + ## Fixes + + - Corrected `maskArrayToFn` export name in README examples (was incorrectly documented as `arrayMaskToFn`) + - Fixed optional-letter mask character documentation: `o` (was incorrectly documented as `z`) + ## 0.3.1 ### Patch Changes diff --git a/packages/input-mask/package.json b/packages/input-mask/package.json index ffcf604ee..8603fe05d 100644 --- a/packages/input-mask/package.json +++ b/packages/input-mask/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/input-mask", - "version": "0.3.1", + "version": "1.0.0-next.0", "description": "input masking event primitive.", "author": "Alex Lohr ", "contributors": [], diff --git a/packages/interaction/CHANGELOG.md b/packages/interaction/CHANGELOG.md new file mode 100644 index 000000000..c19b4d925 --- /dev/null +++ b/packages/interaction/CHANGELOG.md @@ -0,0 +1,13 @@ +# @solid-primitives/interaction + +## 1.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 diff --git a/packages/interaction/package.json b/packages/interaction/package.json index 3cf337417..1893887c4 100644 --- a/packages/interaction/package.json +++ b/packages/interaction/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/interaction", - "version": "0.1.0", + "version": "1.0.0-next.0", "description": "SolidJS primitive for detecting interactions outside a given element.", "author": "David Di Biase ", "license": "MIT", diff --git a/packages/intersection-observer/CHANGELOG.md b/packages/intersection-observer/CHANGELOG.md index 476e5ea7a..cb69c2dfa 100644 --- a/packages/intersection-observer/CHANGELOG.md +++ b/packages/intersection-observer/CHANGELOG.md @@ -1,5 +1,120 @@ # @solid-primitives/intersection-observer +## 3.0.0-next.0 + +### Major Changes + +- 16a45a9: Redesign intersection-observer primitives for Solid 2.0 async reactivity. + + ## `createIntersectionObserver` — breaking changes + + **Return type changed** from a plain store array to a tuple `[entries, isVisible]`. + + ```ts + // Before + const entries = createIntersectionObserver(elements, options); + + // After + const [entries, isVisible] = createIntersectionObserver(elements, options); + ``` + + **Added `isVisible(el)` helper** — a pending-aware accessor that throws `NotReadyError` until the first observation fires for a given element, then returns `entry.isIntersecting` reactively. Integrates with `` for a natural loading fallback: + + ```tsx + const [entries, isVisible] = createIntersectionObserver(targets); + + Checking…

}> + +

Visible!

+
+
; + ``` + + **Removed** the `onChange` callback parameter. **Added** a store array as the return value. + + ```ts + // Before + createIntersectionObserver(elements, entries => console.log(entries), options); + + // After + const [entries] = createIntersectionObserver(elements, options); + createEffect(() => entries.forEach(e => console.log(e.isIntersecting))); + ``` + + **Why a store instead of a signal or callback?** + Each element's intersection state changes independently. With a plain signal the entire array would be a single reactive dependency — any element's change re-runs every computation reading it. A store array gives per-slot granularity: reading `entries[i].isIntersecting` only re-runs the computation that reads slot `i`, not those reading other slots. + + **Reactive options (new):** + `options` may now be a reactive accessor (`MaybeAccessor`). When the accessor's value changes, the observer is disconnected and recreated with the new options, and all currently tracked elements are re-observed. + + ## `createViewportObserver` — breaking changes + + **Removed `use:` directive support.** The `add` function now supports a curried ref form instead, which is nearly as terse and compatible with Solid 2.0 (RFC 07 removed the `use:` directive namespace): + + ```tsx + // Before + const [intersectionObserver] = createViewportObserver() +
console.log(e.isIntersecting)}>
+ + // After + const [add] = createViewportObserver() +
console.log(e.isIntersecting))}>
+ ``` + + `add(callback)` returns a `(el) => void` ref callback. The imperative `add(el, callback)` form is unchanged. + + ## `createVisibilityObserver` — breaking changes + + **Pending state (new):** When `initialValue` is omitted, `visible()` now throws `NotReadyError` until the first `IntersectionObserver` callback fires, integrating with `` for a loading fallback. Previously the signal defaulted to `false`. + + ```tsx + // Before — returned false immediately + const visible = createVisibilityObserver(() => el); + visible(); // false + + // After — pending until first IO fires + const visible = createVisibilityObserver(() => el); + visible(); // throws NotReadyError (caught by ) + + // Opt out with initialValue: + const visible = createVisibilityObserver(() => el, { initialValue: false }); + visible(); // false immediately + ``` + + **Removed** the curried factory pattern. The element is now the first argument. + + ```ts + // Before + const useVisibilityObserver = createVisibilityObserver({ threshold: 0.8 }); + const visible = useVisibilityObserver(() => el); + + // After + const visible = createVisibilityObserver(() => el, { threshold: 0.8 }); + ``` + + **Removed `runWithOwner`:** Signal writes from the `IntersectionObserver` callback no longer use `runWithOwner`. Solid 2.0 allows signal writes from external callbacks without owner binding. + + ## `Occurrence`, `DirectionX`, `DirectionY` — breaking changes + + Converted from TypeScript `enum` to `const` objects with type aliases. This makes them tree-shakeable and avoids TypeScript enum pitfalls. + + ```ts + // Before (enum) + import { Occurrence } from "@solid-primitives/intersection-observer"; + Occurrence.Entering; // works, but enum carries runtime overhead + + // After (const object) + import { Occurrence } from "@solid-primitives/intersection-observer"; + Occurrence.Entering; // "Entering" — plain string, tree-shakeable + ``` + +### Patch Changes + +- e1fe5e6: Remove `@deprecated` tag from `makeIntersectionObserver` and add it to the README. The deprecation was never documented and the primitive remains useful for imperative, non-reactive use cases. +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 2.2.4 ### Patch Changes diff --git a/packages/intersection-observer/package.json b/packages/intersection-observer/package.json index fce11322a..c2017f20e 100644 --- a/packages/intersection-observer/package.json +++ b/packages/intersection-observer/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/intersection-observer", - "version": "2.2.4", + "version": "3.0.0-next.0", "description": "Primitives to support using the intersection observer API.", "author": "David Di Biase ", "contributors": [ diff --git a/packages/jsx-tokenizer/CHANGELOG.md b/packages/jsx-tokenizer/CHANGELOG.md index a5c537449..e58b4fa3c 100644 --- a/packages/jsx-tokenizer/CHANGELOG.md +++ b/packages/jsx-tokenizer/CHANGELOG.md @@ -1,5 +1,38 @@ # @solid-primitives/jsx-tokenizer +## 3.0.0-next.0 + +### Major Changes + +- 1700c98: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### API changes + + - `isServer` is now imported from `@solidjs/web` (not `solid-js/web`) + - `JSX` types are now imported from `@solidjs/web` + - `ResolvedJSXElement` type renamed to `ResolvedElement` (from `solid-js`) in `resolveTokens` overloads + - `renderToString` in SSR tests moved to `@solidjs/web` + + ### Usage changes + + - `createEffect` now requires the split compute/apply form — update any `createEffect` calls in consuming code + - Context is now its own provider: `` replaces `` + - `classList` is replaced by the `class` object/array form + + ### Vitest config + + - Added `moduleName: "@solidjs/web"` to the shared vitest config `solid` option so JSX transforms target `@solidjs/web` instead of the removed `solid-js/web` subpath. This affects all packages with `.tsx` test files. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.1.3 ### Patch Changes diff --git a/packages/jsx-tokenizer/package.json b/packages/jsx-tokenizer/package.json index fb7f9c42b..66c76f22b 100644 --- a/packages/jsx-tokenizer/package.json +++ b/packages/jsx-tokenizer/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/jsx-tokenizer", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "A primitive to tokenize your solid-components to enable custom parsing.", "author": "Vincent Van Dijck ", "contributors": [ diff --git a/packages/keyboard/CHANGELOG.md b/packages/keyboard/CHANGELOG.md index 7e832a0e5..9f652da26 100644 --- a/packages/keyboard/CHANGELOG.md +++ b/packages/keyboard/CHANGELOG.md @@ -1,5 +1,48 @@ # @solid-primitives/keyboard +## 2.0.0-next.0 + +### Major Changes + +- d2e5c43: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### Removed deprecated tuple API from `useKeyDownList` + + The old destructuring form is no longer supported: + + ```ts + // ❌ removed + const [keys, { event }] = useKeyDownList(); + + // ✅ use the dedicated primitives instead + const keys = useKeyDownList(); + const event = useKeyDownEvent(); + ``` + + ### `isServer` import source + + `isServer` is now sourced from `@solidjs/web` instead of `solid-js/web` (handled internally — no consumer change needed). + + ### `createShortcut` — synchronous `preventDefault` + + `createShortcut` now registers a direct `keydown` event listener instead of using a reactive effect. This fixes `preventDefault` calling correctly within the same event dispatch, which was not guaranteed with Solid 2.0's deferred effect scheduling. + + ### `createKeyHold` — side-effect-free memo + + The `preventDefault` side effect has been moved out of the reactive `createMemo` into a dedicated `keydown` listener, aligning with Solid 2.0's guidance against side effects in memos. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + ## 1.3.5 ### Patch Changes diff --git a/packages/keyboard/package.json b/packages/keyboard/package.json index 7b6c58346..28a56fd37 100644 --- a/packages/keyboard/package.json +++ b/packages/keyboard/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/keyboard", - "version": "1.3.5", + "version": "2.0.0-next.0", "description": "A library of reactive promitives helping handling user's keyboard input.", "author": "Damian Tarnwski ", "contributors": [], diff --git a/packages/keyed/CHANGELOG.md b/packages/keyed/CHANGELOG.md index 2778363b5..58f1327ee 100644 --- a/packages/keyed/CHANGELOG.md +++ b/packages/keyed/CHANGELOG.md @@ -1,5 +1,20 @@ # @solid-primitives/keyed +## 3.0.0-next.0 + +### Major Changes + +- 8526767: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + - `JSX` type is now imported from `@solidjs/web` (was `solid-js`) + - `Rerun` props: `on` type changed from `AccessorArray | Accessor` to `Accessor[] | Accessor` (`AccessorArray` was removed from `solid-js`) + - Internal signals in `keyArray` now use `ownedWrite: true` to satisfy Solid 2.0's owned-scope write restrictions + ## 1.5.3 ### Patch Changes diff --git a/packages/keyed/package.json b/packages/keyed/package.json index 626333d93..d90b7644c 100644 --- a/packages/keyed/package.json +++ b/packages/keyed/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/keyed", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "Control Flow primitives and components that require specifying explicit keys to identify or rerender elements.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/lifecycle/CHANGELOG.md b/packages/lifecycle/CHANGELOG.md index c634e7375..874a148cd 100644 --- a/packages/lifecycle/CHANGELOG.md +++ b/packages/lifecycle/CHANGELOG.md @@ -1,5 +1,23 @@ # @solid-primitives/lifecycle +## 1.0.0-next.0 + +### Major Changes + +- 9453354: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + - `onMount` replaced with `onSettled` — `createIsMounted` now schedules its signal update after the owner settles + - `getListener` replaced with `getObserver` — `isHydrated` uses `getObserver` to detect reactive context + - `sharedConfig.context` replaced with `sharedConfig.hydrating` — `isHydrated` now reads the boolean `hydrating` flag + - `renderToString` in server tests now imported from `@solidjs/web` (was `solid-js/web`) + + No changes to the public API: `createIsMounted`, `isHydrated`, and `onElementConnect` signatures are unchanged. + ## 0.1.2 ### Patch Changes diff --git a/packages/lifecycle/package.json b/packages/lifecycle/package.json index 457ee1037..ab8c53902 100644 --- a/packages/lifecycle/package.json +++ b/packages/lifecycle/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/lifecycle", - "version": "0.1.2", + "version": "1.0.0-next.0", "description": "Package providing extra layer of lifecycle primitives for Solid.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/list-state/CHANGELOG.md b/packages/list-state/CHANGELOG.md index e75d67e06..fdc037876 100644 --- a/packages/list-state/CHANGELOG.md +++ b/packages/list-state/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/list-state +## 1.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.0 ### Initial Release diff --git a/packages/list-state/package.json b/packages/list-state/package.json index 18d24e52a..c0d2b4b13 100644 --- a/packages/list-state/package.json +++ b/packages/list-state/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/list-state", - "version": "0.1.0", + "version": "1.0.0-next.0", "description": "Keyboard navigable list state management primitives", "author": { "name": "Jasmin Noetzli", diff --git a/packages/list/CHANGELOG.md b/packages/list/CHANGELOG.md index 42723631d..ee3eb215a 100644 --- a/packages/list/CHANGELOG.md +++ b/packages/list/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/list +## 1.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.2 ### Patch Changes diff --git a/packages/list/package.json b/packages/list/package.json index fe7166060..5a54f0482 100644 --- a/packages/list/package.json +++ b/packages/list/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/list", - "version": "0.2.0", + "version": "1.0.0-next.0", "description": "A List component, an alternative to For and Index.", "author": "Maciek50322 <34212298+maciek50322@users.noreply.github.com>", "contributors": [], diff --git a/packages/map/CHANGELOG.md b/packages/map/CHANGELOG.md index 7ae48bbbf..32b6f892f 100644 --- a/packages/map/CHANGELOG.md +++ b/packages/map/CHANGELOG.md @@ -1,5 +1,23 @@ # @solid-primitives/map +## 1.0.0-next.0 + +### Major Changes + +- 56e6762: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `batch` is no longer used internally — Solid 2.0 auto-batches all writes, so multiple `dirty()` calls within a single `set`, `delete`, or `clear` are naturally coalesced + - Added `test/server.test.ts` to verify safe SSR behavior + +### Patch Changes + +- Updated dependencies [254a964] + - @solid-primitives/trigger@3.0.0-next.0 + ## 0.8.0 ### Major Changes diff --git a/packages/map/package.json b/packages/map/package.json index 212e66e50..6682d2cf9 100644 --- a/packages/map/package.json +++ b/packages/map/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/map", - "version": "0.8.0", + "version": "1.0.0-next.0", "description": "The Map & WeakMap data structures as a reactive signals.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/marker/CHANGELOG.md b/packages/marker/CHANGELOG.md index baa8ea75d..9e27411bd 100644 --- a/packages/marker/CHANGELOG.md +++ b/packages/marker/CHANGELOG.md @@ -1,5 +1,23 @@ # @solid-primitives/marker +## 2.0.0-next.0 + +### Major Changes + +- 5457e3a: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + ### `createMarker` + + **`createRoot` second parameter removed** — In Solid 1.x the second argument to `createRoot` was a parent owner. In Solid 2.0 the API changed to an options object; the parent is now implicitly the current reactive context. The implementation now uses `runWithOwner(owner, () => createRoot(...))` to explicitly parent cached element roots to the marker's creation-time owner, preserving the existing lifecycle semantics. + + **Signal `ownedWrite: true`** — In Solid 2.0, writing to a signal from inside an owned reactive scope (component body, `createRoot` callback, effect compute phase) throws by default. The internal per-match signal is now created with `{ ownedWrite: true }` so that `set()` can be called when the marker function is invoked from any reactive context. + + **Deferred signal reads after `set()`** — In Solid 2.0 all signal writes are deferred until the next microtask flush. When a cached match element is reused and its text is updated via `set(newText)`, reading the signal accessor immediately returns the previously committed value. Call `flush()` from `solid-js` before reading a reused element's accessor if synchronous access is required (e.g. in tests). + ## 0.2.2 ### Patch Changes diff --git a/packages/marker/package.json b/packages/marker/package.json index 45112395d..f8a0a86e5 100644 --- a/packages/marker/package.json +++ b/packages/marker/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/marker", - "version": "1.0.0", + "version": "2.0.0-next.0", "description": "A reactive primitive for marking matching parts of a string.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/masonry/CHANGELOG.md b/packages/masonry/CHANGELOG.md index f36b6e371..efc95b447 100644 --- a/packages/masonry/CHANGELOG.md +++ b/packages/masonry/CHANGELOG.md @@ -1,5 +1,29 @@ # @solid-primitives/masonry +## 2.0.0-next.0 + +### Major Changes + +- 034e07c: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + ### `@solid-primitives/masonry` + + - `mapArray` callback signature changed: the first argument is now `Accessor` (not `T` directly). The implementation now calls `source()` internally, so the public API is unchanged. + - `createMemo` no longer accepts a separate initial-value argument. The `getColumns` memo options (`equals`) are now passed as the second argument directly. + - `createSignal` with `ownedWrite: true` — allows `createMasonry` to be called from within reactive scopes (component bodies, `createRoot`, effects) without throwing `SIGNAL_WRITE_IN_OWNED_SCOPE`. + - Signal writes inside tests moved outside `createRoot` scope to match Solid 2.0 owned-scope write rules. + - `flush()` added after reactive signal writes in tests to commit pending values before assertions. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/masonry/package.json b/packages/masonry/package.json index b023e48be..b065360a7 100644 --- a/packages/masonry/package.json +++ b/packages/masonry/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/masonry", - "version": "1.0.0", + "version": "2.0.0-next.0", "description": "Primitives for creating a reactive masonry layout.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/match/CHANGELOG.md b/packages/match/CHANGELOG.md index 9712b0c3a..f53e44e45 100644 --- a/packages/match/CHANGELOG.md +++ b/packages/match/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/match +## 1.0.0-next.0 + +### Major Changes + +- 9a698ea: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `JSX` types are now sourced from `@solidjs/web` per Solid 2.0 conventions + ## 0.1.0 ### Major Changes diff --git a/packages/match/package.json b/packages/match/package.json index 59cb0f69d..525999420 100644 --- a/packages/match/package.json +++ b/packages/match/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/match", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "A template primitive example.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/media/CHANGELOG.md b/packages/media/CHANGELOG.md index 9587ce236..782b3efef 100644 --- a/packages/media/CHANGELOG.md +++ b/packages/media/CHANGELOG.md @@ -1,5 +1,56 @@ # @solid-primitives/media +## 4.0.0-next.0 + +### Major Changes + +- 4a5bf32: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/media` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - Requires Solid.js v2 — `classList` is replaced by `class` with object/array forms in consuming code + + ### `@solid-primitives/utils` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSignal`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) for hydration detection + - `INTERNAL_OPTIONS`: `{ internal: true }` changed to `{ pureWrite: true }` to match Solid 2.0 `SignalOptions` + - `defaultEquals` now aliases `isEqual` (was `equalFn`) + - `defer`: `AccessorArray` type replaced with `Accessor[]` (type was removed in Solid 2.0) + + ### `@solid-primitives/static-store` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createStaticStore`: uses `getObserver` (was `getListener`) and `{ pureWrite: true }` (was `{ internal: true }`) + - Removed explicit `batch()` calls — updates are automatically batched in Solid 2.0 + - `createHydratableStaticStore`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) + + ### `@solid-primitives/rootless` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSingletonRoot`: uses `sharedConfig.hydrating` (was `sharedConfig.context`) + - `createRootPool`: removed `batch()` calls — Solid 2.0 auto-batches on microtasks + + ### `@solid-primitives/event-listener` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` across all source files + - `createEventListener` and `createRenderEffect` converted to split compute/apply effect pattern required by Solid 2.0 + - `eventListener` directive converted to split effect pattern; cleanup is returned from apply phase instead of using `onCleanup` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + - @solid-primitives/static-store@1.0.0-next.0 + ## 2.3.5 ### Patch Changes diff --git a/packages/media/package.json b/packages/media/package.json index 0f871b47f..36c7b1938 100644 --- a/packages/media/package.json +++ b/packages/media/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/media", - "version": "3.0.0", + "version": "4.0.0-next.0", "description": "Primitives for media query and device features", "author": "David Di Biase ", "contributors": [ diff --git a/packages/mediastream/CHANGELOG.md b/packages/mediastream/CHANGELOG.md index 91ca6b9d9..59bd051ac 100644 --- a/packages/mediastream/CHANGELOG.md +++ b/packages/mediastream/CHANGELOG.md @@ -1,5 +1,31 @@ # @solid-primitives/mediastream +## 1.0.0-next.0 + +### Major Changes + +- 21acc8a: Initial release of `@solid-primitives/mediastream`, replacing `@solid-primitives/stream` for Solid.js v2. + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/mediastream` + + - `createStream` and `createScreen` now return `[Accessor, { stop, mute }]` instead of `[Resource, ResourceActions & { stop, mute }]`. The `mutate` and `refetch` controls are removed — source reactivity drives re-acquisition automatically. + - `createAmplitudeStream` second element is now `{ stream, stop }` (no `mutate` / `refetch`). + - `ResourceActions` type export removed; no longer depends on `createResource`. + - Loading state: use `` from `@solidjs/web` to handle the pending state. + - Error state: use `` from `@solidjs/web` to handle stream acquisition errors. + - `isServer` imported internally from `@solidjs/web` (not `solid-js/web`). + - All `createEffect` calls use the Solid 2.0 split compute/apply form. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.0 ### Major Changes diff --git a/packages/mediastream/package.json b/packages/mediastream/package.json index 6d59c9666..f73627709 100644 --- a/packages/mediastream/package.json +++ b/packages/mediastream/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/mediastream", - "version": "0.1.0", + "version": "1.0.0-next.0", "description": "Primitives to work with media streams from microphones, cameras, and the screen", "author": "Alex Lohr ", "contributors": [ diff --git a/packages/memo/CHANGELOG.md b/packages/memo/CHANGELOG.md index 6a27b3fb6..c2a90c05b 100644 --- a/packages/memo/CHANGELOG.md +++ b/packages/memo/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/memo +## 2.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.4.5 ### Patch Changes diff --git a/packages/memo/package.json b/packages/memo/package.json index a4b47f78d..8b40036d5 100644 --- a/packages/memo/package.json +++ b/packages/memo/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/memo", - "version": "1.4.5", + "version": "2.0.0-next.0", "description": "Collection of custom memo primitives. They extend Solid's createMemo functionality while keeping the usage similar.", "author": "Damian Tarnawski @thetarnav ", "contributors": [], diff --git a/packages/mouse/CHANGELOG.md b/packages/mouse/CHANGELOG.md index 62c0857a3..ca4e10d48 100644 --- a/packages/mouse/CHANGELOG.md +++ b/packages/mouse/CHANGELOG.md @@ -1,5 +1,32 @@ # @solid-primitives/mouse +## 4.0.0-next.0 + +### Major Changes + +- 4a930d0: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/mouse` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `onMount` replaced by `onSettled` for post-render initialization + - `sharedConfig.context` replaced by `sharedConfig.hydrating` for hydration detection + - `createEffect` migrated to split compute/apply form — reactive target re-attachment now uses explicit cleanup return from the apply phase + - Added `test/server.test.ts` with SSR safety coverage for `createMousePosition` and `createPositionToElement` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + - @solid-primitives/static-store@1.0.0-next.0 + ## 2.1.6 ### Patch Changes diff --git a/packages/mouse/package.json b/packages/mouse/package.json index 7bfc2d770..63cfc6326 100644 --- a/packages/mouse/package.json +++ b/packages/mouse/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/mouse", - "version": "3.0.0", + "version": "4.0.0-next.0", "description": "A collection of Solid Primitives, that capture current mouse cursor position, and help to deal with common related usecases.", "author": "Damian Tarnawski ", "license": "MIT", diff --git a/packages/mutable/CHANGELOG.md b/packages/mutable/CHANGELOG.md index 6cf3d6133..5c9ea4040 100644 --- a/packages/mutable/CHANGELOG.md +++ b/packages/mutable/CHANGELOG.md @@ -1,5 +1,57 @@ # @solid-primitives/mutable +## 3.0.0-next.0 + +### Major Changes + +- 981dd12: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `modifyMutable` API change + + The modifier function now receives the **mutable proxy** directly instead of the unwrapped raw object: + + ```ts + // Before (v1) — modifier received the raw unwrapped object + modifyMutable(state, reconcile({ firstName: "Jake" })); + modifyMutable( + state, + produce(s => { + s.firstName = "Jake"; + }), + ); + + // After (v2) — modifier receives the proxy; mutate it directly + modifyMutable(state, s => { + s.firstName = "Jake"; + }); + ``` + + `produce` no longer exists in Solid 2.0 — store setters are now draft-first by default, so plain mutation functions replace it. `reconcile` still exists but is now imported from `solid-js` directly (not `solid-js/store`). + + ### `solid-js/store` removed + + `solid-js/store` no longer exists as a separate entrypoint. Store utilities (`reconcile`, `snapshot`, etc.) are now exported from `solid-js` directly. + + ### Auto-batching + + Explicit `batch()` calls are no longer needed — all signal writes in Solid 2.0 are automatically batched to the next microtask. Call `flush()` (from `solid-js`) in tests when you need synchronous application of pending writes. + + ### Non-reactive reads reflect writes immediately + + Reading a mutable property outside a reactive context (effects, memos, JSX) always returns the most current value without needing `flush()`. + + ## Internal changes + + - Imports migrated: `solid-js/web` → `@solidjs/web`, store APIs → `solid-js` + - `getListener` renamed to `getObserver` (Solid 2.0 API) + - `batch()` removed throughout — Solid 2.0 auto-batches all writes + - Signal creation uses `{ ownedWrite: true }` to allow writes from reactive scopes + - `isWrappable` is now a local implementation (plain objects + arrays only; excludes frozen objects and class instances) + ## 1.1.1 ### Patch Changes diff --git a/packages/mutable/package.json b/packages/mutable/package.json index 47732a8cb..15f2582ce 100644 --- a/packages/mutable/package.json +++ b/packages/mutable/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/mutable", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "A primitive for creating a mutable store, an alternative to Solid's createStore.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/mutation-observer/CHANGELOG.md b/packages/mutation-observer/CHANGELOG.md index 8dc515592..847764d25 100644 --- a/packages/mutation-observer/CHANGELOG.md +++ b/packages/mutation-observer/CHANGELOG.md @@ -1,5 +1,28 @@ # @solid-primitives/mutation-observer +## 3.0.0-next.0 + +### Major Changes + +- 975b175: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/mutation-observer` + + - `onMount` replaced with `onSettled` — observation starts after the component fully settles (async-aware) rather than after initial synchronous render + - `isServer` now imported from `@solidjs/web`; `isSupported` returns `false` on the server without touching `window` + - `start()` is a no-op on the server, guarding against missing DOM globals in Node.js + - Added `test/server.test.ts` to verify safe SSR behavior + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 2.0.0 ### Major Changes diff --git a/packages/mutation-observer/package.json b/packages/mutation-observer/package.json index e7ef56040..1dfc2bc33 100644 --- a/packages/mutation-observer/package.json +++ b/packages/mutation-observer/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/mutation-observer", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "Primitive providing the ability to watch for changes made to the DOM tree.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/notification/CHANGELOG.md b/packages/notification/CHANGELOG.md new file mode 100644 index 000000000..43b7a3fbb --- /dev/null +++ b/packages/notification/CHANGELOG.md @@ -0,0 +1,24 @@ +# @solid-primitives/notification + +## 1.0.0-next.0 + +### Major Changes + +- cf498ee: Add `@solid-primitives/notification` package (Stage 0) + + New primitives for the browser [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API). + + - **`isNotificationSupported()`** — SSR-safe runtime check for Notifications API availability. + - **`makeNotification(title, options?)`** — Non-reactive helper returning `[show, close]`. `show()` creates and returns a `Notification` instance (or `null` when permission is not `"granted"`); calling it again replaces the previous notification. No Solid lifecycle dependency. + - **`createNotification(title, options?)`** — Reactive primitive returning `{ show, close, notification, supported }`. Accepts reactive accessors for `title` and `options` — their current values are read at `show()` time. The `notification` accessor tracks the live instance, updating to `null` when it is dismissed by the OS or closed programmatically. Cleans up automatically on owner disposal. + - **`createNotificationPermission()`** — Reactive permission manager returning `{ permission, requestPermission }`. The `permission` accessor reflects `Notification.permission` and updates after each `requestPermission()` call. Degrades gracefully to `"unknown"` on the server or when the Notifications API is unsupported. + + Peer dependencies: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14`. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] +- Updated dependencies [88833b5] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/permission@2.0.0-next.0 diff --git a/packages/notification/package.json b/packages/notification/package.json index 4aa227042..5af5478e6 100644 --- a/packages/notification/package.json +++ b/packages/notification/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/notification", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "Primitives for the browser Notifications API with reactive permission management", "author": "David Di Biase ", "contributors": [], diff --git a/packages/orientation/CHANGELOG.md b/packages/orientation/CHANGELOG.md new file mode 100644 index 000000000..e469771cf --- /dev/null +++ b/packages/orientation/CHANGELOG.md @@ -0,0 +1,20 @@ +# @solid-primitives/orientation + +## 1.0.0-next.0 + +### Major Changes + +- 2372425: Add `@solid-primitives/orientation` package (Stage 0) + + New primitives for tracking screen orientation via the Screen Orientation API. + + - **`makeOrientation(onChange)`** — Non-reactive base primitive. Attaches a listener for `screen.orientation` `change` events (or the legacy `orientationchange` event as fallback) and returns a cleanup function. Does not fire on mount. + - **`createOrientation()`** — Reactive primitive returning `angle` and `type` signal accessors, initialized to the current orientation and updated on every change. SSR-safe: returns static defaults (`angle: 0`, `type: "portrait-primary"`) on the server. + + Peer dependencies: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14`. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 diff --git a/packages/orientation/package.json b/packages/orientation/package.json index 95718ad12..e2fb41494 100644 --- a/packages/orientation/package.json +++ b/packages/orientation/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/orientation", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "Primitives to track screen orientation using the Screen Orientation API", "author": "David Di Biase ", "contributors": [], diff --git a/packages/page-utilities/CHANGELOG.md b/packages/page-utilities/CHANGELOG.md index 4ee387b1a..15e483870 100644 --- a/packages/page-utilities/CHANGELOG.md +++ b/packages/page-utilities/CHANGELOG.md @@ -1,5 +1,25 @@ # @solid-primitives/page-utilities +## 3.0.0-next.0 + +### Major Changes + +- 5bff218: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + ## 2.1.5 ### Patch Changes diff --git a/packages/page-utilities/package.json b/packages/page-utilities/package.json index d66cd6297..c034b3dd4 100644 --- a/packages/page-utilities/package.json +++ b/packages/page-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/page-utilities", - "version": "2.1.5", + "version": "3.0.0-next.0", "description": "Primitives for page visibility and navigation blocking", "author": "David Di Biase ", "contributors": [ diff --git a/packages/pagination/CHANGELOG.md b/packages/pagination/CHANGELOG.md index e2d538336..f9f9b52ac 100644 --- a/packages/pagination/CHANGELOG.md +++ b/packages/pagination/CHANGELOG.md @@ -1,5 +1,29 @@ # @solid-primitives/pagination +## 1.0.0-next.0 + +### Major Changes + +- b3a91c6: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/pagination` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `createPagination`: page clamping when pages count decreases is now implemented via a derived memo instead of `createComputed` (which was removed in Solid 2.0). The clamping is reactive and automatic. + - `createInfiniteScroll`: removed `createResource` dependency (removed in Solid 2.0). Fetching is now implemented with `createEffect` and a cancellation pattern. The `pages.loading` and `pages.error` resource properties are no longer available; use `end()` or wrap the fetcher to handle errors externally. + - `batch()` calls removed — Solid 2.0 batches updates automatically via microtasks. Tests require `flush()` after signal writes to observe committed values. + - All internal signals use `{ ownedWrite: true }` to allow setters to be called from reactive scopes and event handlers without triggering ownership warnings. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.5.1 ### Patch Changes diff --git a/packages/pagination/package.json b/packages/pagination/package.json index 9416e59ed..b08e2196d 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/pagination", - "version": "0.5.1", + "version": "1.0.0-next.0", "description": "A primitive that creates all the reactive data to manage your pagination.", "author": "Alex Lohr ", "contributors": [ diff --git a/packages/permission/CHANGELOG.md b/packages/permission/CHANGELOG.md index 320eefcb0..88dc50b0e 100644 --- a/packages/permission/CHANGELOG.md +++ b/packages/permission/CHANGELOG.md @@ -1,5 +1,11 @@ # @solid-primitives/permission +## 2.0.0-next.0 + +### Major Changes + +- 88833b5: updated to Solid-2.0 + ## 1.3.2 ### Patch Changes diff --git a/packages/permission/package.json b/packages/permission/package.json index dc94bd82a..e7881e389 100644 --- a/packages/permission/package.json +++ b/packages/permission/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/permission", - "version": "1.3.2", + "version": "2.0.0-next.0", "description": "Primitive that wraps permission queries", "author": "Alex Lohr ", "license": "MIT", diff --git a/packages/platform/CHANGELOG.md b/packages/platform/CHANGELOG.md index 791362c64..af7fcd132 100644 --- a/packages/platform/CHANGELOG.md +++ b/packages/platform/CHANGELOG.md @@ -1,5 +1,19 @@ # @solid-primitives/platform +## 1.0.0-next.0 + +### Major Changes + +- 0eb977c: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/platform` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + ## 0.2.1 ### Patch Changes diff --git a/packages/platform/package.json b/packages/platform/package.json index c03fb1df3..4c29afbf2 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/platform", - "version": "0.2.1", + "version": "1.0.0-next.0", "description": "A set of const boolean variables identifying device and browser type.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/pointer/CHANGELOG.md b/packages/pointer/CHANGELOG.md index c3d03e27c..0941fb096 100644 --- a/packages/pointer/CHANGELOG.md +++ b/packages/pointer/CHANGELOG.md @@ -1,5 +1,27 @@ # @solid-primitives/pointer +## 1.0.0-next.0 + +### Major Changes + +- 5a96993: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + - `JSX` type is now imported from `@solidjs/web` (was `solid-js`) — `JSX.Element` moved to the web renderer package + - Added `test/server.test.ts` with SSR safety coverage for all primitives + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + ## 0.3.5 ### Patch Changes diff --git a/packages/pointer/package.json b/packages/pointer/package.json index 4d9943535..daa70eb09 100644 --- a/packages/pointer/package.json +++ b/packages/pointer/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/pointer", - "version": "0.3.5", + "version": "1.0.0-next.0", "description": "A collection of primitives, giving you a nicer API to handle pointer events in a reactive context.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/presence/CHANGELOG.md b/packages/presence/CHANGELOG.md index e8842e83c..61164514a 100644 --- a/packages/presence/CHANGELOG.md +++ b/packages/presence/CHANGELOG.md @@ -1,5 +1,27 @@ # @solid-primitives/presence +## 1.0.0-next.0 + +### Major Changes + +- 2ea3768: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + ### `@solid-primitives/presence` + + - `createEffect` calls converted to the split compute/apply pattern required by Solid 2.0; cleanup is returned from the apply phase instead of calling `onCleanup` + - Internal signals now use `{ ownedWrite: true }` to allow writes from the effect apply phases + - No changes to the public `createPresence` API or `PresenceResult` type + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/presence/package.json b/packages/presence/package.json index dcd5ad9c7..cf10c1d82 100644 --- a/packages/presence/package.json +++ b/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/presence", - "version": "0.1.3", + "version": "1.0.0-next.0", "description": "Utility to animate the presence of an element based on the existence of data or lack thereof.", "author": "Ethan Standel ", "license": "MIT", diff --git a/packages/promise/CHANGELOG.md b/packages/promise/CHANGELOG.md index 13d0b7649..74eb78bdc 100644 --- a/packages/promise/CHANGELOG.md +++ b/packages/promise/CHANGELOG.md @@ -1,5 +1,27 @@ # @solid-primitives/until +## 2.0.0-next.0 + +### Major Changes + +- bdaaa8c: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` is now required. + + ### `@solid-primitives/promise` + + - `createEffect` now uses the split compute/apply pattern required by Solid 2.0 — the reactive condition is evaluated in the compute phase and the resolve/dispose side-effect runs in the apply phase. + - Resolution of `until` is now deferred to after the reactive flush rather than being synchronous with the signal write. This matches the standard async nature of the returned `Promise`, so existing `await`-based usage is unaffected. + - Added `test/server.test.ts` to verify safe SSR behavior. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.1.3 ### Patch Changes diff --git a/packages/promise/package.json b/packages/promise/package.json index ff77c51e5..0396a6891 100644 --- a/packages/promise/package.json +++ b/packages/promise/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/promise", - "version": "1.1.3", + "version": "2.0.0-next.0", "description": "Promised one-time watch for changes. Await a reactive condition.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/props/CHANGELOG.md b/packages/props/CHANGELOG.md index 7c919df35..dbb4f8854 100644 --- a/packages/props/CHANGELOG.md +++ b/packages/props/CHANGELOG.md @@ -1,5 +1,37 @@ # @solid-primitives/props +## 4.0.0-next.0 + +### Major Changes + +- 7eff30e: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + **`classList` support removed**: Solid 2.0 removes the `classList` JSX prop in favour of the `class` prop accepting objects and arrays. `combineProps` no longer handles a `classList` key. Use `class` with an object or array instead: + + ```tsx + // Before + combineProps(props, { classList: { active: isActive() } }); + + // After + combineProps(props, { class: { active: isActive() } }); + ``` + + **`class` combining updated**: When all combined `class` values are strings they are joined with a space (unchanged). When any value is a `ClassList` object or array, the result is a flat array accepted by Solid 2.0's `class` prop. + + **`merge` replaces `mergeProps`**: The internal call to `mergeProps` has been updated to Solid 2.0's `merge`. Non-special props now follow `merge` semantics — an explicit `undefined` in a later source overrides earlier values (previously `undefined` was skipped). + + **`createMemo` second argument**: `createPropsPredicate` used `createMemo(fn, undefined, options)` — the removed `initialValue` arg. It now correctly passes `createMemo(fn, options)`. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 3.2.3 ### Patch Changes diff --git a/packages/props/package.json b/packages/props/package.json index 44bf33427..58dc19248 100644 --- a/packages/props/package.json +++ b/packages/props/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/props", - "version": "3.2.3", + "version": "4.0.0-next.0", "description": "Library of primitives focused around component props.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/queue/CHANGELOG.md b/packages/queue/CHANGELOG.md index 90b129515..cb8d3f35a 100644 --- a/packages/queue/CHANGELOG.md +++ b/packages/queue/CHANGELOG.md @@ -1,5 +1,26 @@ # @solid-primitives/queue +## 1.0.0-next.0 + +### Major Changes + +- e4c9991: Initial release of `@solid-primitives/queue` + + Six primitives for managing queues: + + - **`makeQueue(initialValues?)`** — non-reactive FIFO queue backed by a plain array. + - **`createQueue(initialValues?)`** — reactive FIFO queue backed by Solid signals. Exposes reactive accessors (`queue`, `first`, `last`, `size`, `isEmpty`) and imperative methods (`add`, `remove`, `clear`). + - **`makePriorityQueue(q, comparator)`** — queue modifier that turns any existing queue into a priority queue by overriding its `add` method to maintain comparator-sorted order. Returns the same queue object with `add` patched in place. + - **`createPriorityQueue(comparator, initialValues?)`** — reactive priority queue; same interface as `createQueue`. + - **`createTaskQueue()`** — reactive async task queue. Tasks execute one at a time in FIFO order. `enqueue(task)` returns a `Promise`. Exposes reactive `size` (pending count) and `active` (`boolean`). + - **`createConcurrentTaskQueue(concurrency)`** — reactive async task queue running up to `concurrency` tasks simultaneously. `active` is a count (`Accessor`). + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.0 ### Initial release diff --git a/packages/queue/package.json b/packages/queue/package.json index 77ab7e079..a3d8ff275 100644 --- a/packages/queue/package.json +++ b/packages/queue/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/queue", - "version": "0.1.0", + "version": "1.0.0-next.0", "description": "Queue primitives — FIFO, priority, and concurrent task queues", "author": "David Di Biase ", "contributors": [], diff --git a/packages/raf/CHANGELOG.md b/packages/raf/CHANGELOG.md index 4f899746b..eb3760220 100644 --- a/packages/raf/CHANGELOG.md +++ b/packages/raf/CHANGELOG.md @@ -1,5 +1,27 @@ # @solid-primitives/raf +## 4.0.0-next.0 + +### Major Changes + +- ec17f08: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/raf` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `createRAF`: `running` signal created with `{ ownedWrite: true }` to allow `start()`/`stop()` to be called from within reactive scopes + - Added `test/server.test.ts` verifying SSR no-op behaviour for `createRAF`, `targetFPS`, and `createMs` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 2.3.4 ### Patch Changes diff --git a/packages/raf/package.json b/packages/raf/package.json index 4ab650965..7207b52d5 100644 --- a/packages/raf/package.json +++ b/packages/raf/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/raf", - "version": "3.0.0", + "version": "4.0.0-next.0", "description": "Primitive that facilitates RAF functionality", "author": "David Di Biase ", "contributors": [ diff --git a/packages/range/CHANGELOG.md b/packages/range/CHANGELOG.md index 77b549adc..120ac592d 100644 --- a/packages/range/CHANGELOG.md +++ b/packages/range/CHANGELOG.md @@ -1,5 +1,28 @@ # @solid-primitives/range +## 1.0.0-next.0 + +### Major Changes + +- fa2a427: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + - `JSX` types are now imported from `@solidjs/web` (was `solid-js`) + - `indexRange` internal signals now use `ownedWrite: true` so they can be updated from inside reactive scopes (e.g. when `IndexRange` wraps in `createMemo`) + - `createEffect` usage in user code must use the split compute/apply form required by Solid 2.0 — see updated README examples + - Signal writes are now batched by default; call `flush()` after writing signals before reading the resulting mapped array + - `` is **deprecated** — Solid 2.0 ships an equivalent built-in `` in `@solidjs/web`. See the README for migration guidance. The `repeat` primitive continues to be supported for cases that require incremental child creation/disposal. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.2.4 ### Patch Changes diff --git a/packages/range/package.json b/packages/range/package.json index ca6d088e3..e84afc5fc 100644 --- a/packages/range/package.json +++ b/packages/range/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/range", - "version": "0.2.4", + "version": "1.0.0-next.0", "description": "Control Flow Primitives for number ranges: createNumericRange, mapRange, indexRange, repeat, and their JSX component counterparts.", "author": "Damian Tarnawski @thetarnav ", "contributors": [], diff --git a/packages/refs/CHANGELOG.md b/packages/refs/CHANGELOG.md index ac46dd08f..ea5a40d92 100644 --- a/packages/refs/CHANGELOG.md +++ b/packages/refs/CHANGELOG.md @@ -1,5 +1,23 @@ # @solid-primitives/refs +## 3.0.0-next.0 + +### Major Changes + +- 56f5c8a: Migrate to Solid.js 2.0 (beta.14). + + **Breaking changes:** + + - Requires `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` + - Removed deprecated re-exports of `ResolvedChildren` and `ResolvedJSXElement` from `solid-js/types` + - `Refs` and `Ref` components now use split `createEffect` (compute/apply) instead of the removed `createComputed`; the callback fires asynchronously on the next microtask after children change (consistent with Solid 2.0's deferred reactivity model) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.1.3 ### Patch Changes diff --git a/packages/refs/package.json b/packages/refs/package.json index a38272b55..fef2d7595 100644 --- a/packages/refs/package.json +++ b/packages/refs/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/refs", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "Library of primitives, components and directives for SolidJS that help managing references to JSX elements.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/resize-observer/CHANGELOG.md b/packages/resize-observer/CHANGELOG.md index 22f3127ed..c9e044d39 100644 --- a/packages/resize-observer/CHANGELOG.md +++ b/packages/resize-observer/CHANGELOG.md @@ -1,5 +1,32 @@ # @solid-primitives/resize-observer +## 4.0.0-next.0 + +### Major Changes + +- 68b803a: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/resize-observer` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `createResizeObserver`: internal `createEffect` converted to the Solid 2.0 split compute/apply pattern + - `createElementSize`: internal `createEffect` converted to split compute/apply pattern; element cleanup (`unobserve`) is returned from apply phase instead of using `onCleanup` + - `createElementSize`: `sharedConfig.context` replaced with `sharedConfig.hydrating` for hydration detection + - `createStore` setter in consuming code now requires a function argument (Solid 2.0 store API change) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + - @solid-primitives/static-store@1.0.0-next.0 + ## 2.1.5 ### Patch Changes diff --git a/packages/resize-observer/package.json b/packages/resize-observer/package.json index 55a165dd2..3edd87a4c 100644 --- a/packages/resize-observer/package.json +++ b/packages/resize-observer/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/resize-observer", - "version": "3.0.0", + "version": "4.0.0-next.0", "description": "Reactive primitives for observing resizing of HTML elements.", "author": "Moshe Udimar", "contributors": [ diff --git a/packages/rootless/CHANGELOG.md b/packages/rootless/CHANGELOG.md index 6b77debb8..6e4f301b5 100644 --- a/packages/rootless/CHANGELOG.md +++ b/packages/rootless/CHANGELOG.md @@ -1,5 +1,53 @@ # @solid-primitives/rootless +## 2.0.0-next.0 + +### Major Changes + +- 4a5bf32: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/media` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - Requires Solid.js v2 — `classList` is replaced by `class` with object/array forms in consuming code + + ### `@solid-primitives/utils` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSignal`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) for hydration detection + - `INTERNAL_OPTIONS`: `{ internal: true }` changed to `{ pureWrite: true }` to match Solid 2.0 `SignalOptions` + - `defaultEquals` now aliases `isEqual` (was `equalFn`) + - `defer`: `AccessorArray` type replaced with `Accessor[]` (type was removed in Solid 2.0) + + ### `@solid-primitives/static-store` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createStaticStore`: uses `getObserver` (was `getListener`) and `{ pureWrite: true }` (was `{ internal: true }`) + - Removed explicit `batch()` calls — updates are automatically batched in Solid 2.0 + - `createHydratableStaticStore`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) + + ### `@solid-primitives/rootless` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSingletonRoot`: uses `sharedConfig.hydrating` (was `sharedConfig.context`) + - `createRootPool`: removed `batch()` calls — Solid 2.0 auto-batches on microtasks + + ### `@solid-primitives/event-listener` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` across all source files + - `createEventListener` and `createRenderEffect` converted to split compute/apply effect pattern required by Solid 2.0 + - `eventListener` directive converted to split effect pattern; cleanup is returned from apply phase instead of using `onCleanup` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.5.3 ### Patch Changes diff --git a/packages/rootless/package.json b/packages/rootless/package.json index c7bf37ca5..16050f48d 100644 --- a/packages/rootless/package.json +++ b/packages/rootless/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/rootless", - "version": "1.5.3", + "version": "2.0.0-next.0", "description": "A collection of helpers that aim to simplify using reactive primitives outside of reactive roots, and managing disposal of reactive roots.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/scheduled/CHANGELOG.md b/packages/scheduled/CHANGELOG.md index d5e04fb83..3b79b7289 100644 --- a/packages/scheduled/CHANGELOG.md +++ b/packages/scheduled/CHANGELOG.md @@ -1,5 +1,53 @@ # @solid-primitives/scheduled +## 2.0.0-next.0 + +### Major Changes + +- 6f5960d: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `isServer` import source + + `isServer` is now sourced from `@solidjs/web` instead of `solid-js/web` (handled internally — no consumer change needed). + + ### `createScheduled` — `getListener` renamed to `getObserver` + + Uses `getObserver` from `solid-js` internally (Solid 2.0 rename of `getListener`). No consumer API change. + + ### `createScheduled` — `ownedWrite: true` on internal signal + + The internal invalidation signal now uses `{ ownedWrite: true }` to allow synchronous writes from within reactive computation scopes. This is required when using `leading`-edge schedules, which fire the invalidation callback synchronously from inside an effect's compute phase. + + ### `createScheduled` with `createEffect` — two-arg form required + + In Solid 2.0, `createEffect` requires a compute function and a separate apply function. The `scheduled()` accessor should be called in the compute phase: + + ```ts + // ✅ Solid 2.0 + createEffect( + () => { + const value = count(); + const dirty = scheduled(); + return { value, dirty }; + }, + ({ value, dirty }) => { + if (dirty) console.log("count", value); + }, + ); + + // ❌ Solid 1.x (no longer works) + createEffect(() => { + const value = count(); + if (scheduled()) console.log("count", value); + }); + ``` + + `createScheduled` continues to work with `createMemo` unchanged. + ## 1.5.3 ### Patch Changes diff --git a/packages/scheduled/package.json b/packages/scheduled/package.json index 6b692958a..44a39ad5b 100644 --- a/packages/scheduled/package.json +++ b/packages/scheduled/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/scheduled", - "version": "1.5.3", + "version": "2.0.0-next.0", "description": "Primitives for creating scheduled — throttled or debounced — callbacks.", "contributors": [ "David Di Biase ", diff --git a/packages/script-loader/CHANGELOG.md b/packages/script-loader/CHANGELOG.md index dc8ba8b6f..cb793a27c 100644 --- a/packages/script-loader/CHANGELOG.md +++ b/packages/script-loader/CHANGELOG.md @@ -1,5 +1,23 @@ # @solid-primitives/script-loader +## 3.0.0-next.0 + +### Major Changes + +- a874e98: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/script-loader` + + - `isServer` and `spread` now imported from `@solidjs/web` (not `solid-js/web`) + - `ComponentProps` and `JSX` types now sourced from `@solidjs/web` for correct intrinsic element resolution + - `splitProps` (removed in Solid 2.0) replaced with plain object extraction + - Static script attributes applied via `assign` synchronously before reactive src tracking; this means attributes like `type` and `async` are set before the script is appended to the document, which is the correct order for browser loading + - `createRenderEffect` converted to the split compute/apply pattern required by Solid 2.0; src accessor is tracked in the compute phase and the DOM update applied in the apply phase + ## 2.3.2 ### Patch Changes diff --git a/packages/script-loader/package.json b/packages/script-loader/package.json index d5905d16d..4facbfaae 100644 --- a/packages/script-loader/package.json +++ b/packages/script-loader/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/script-loader", - "version": "2.3.2", + "version": "3.0.0-next.0", "description": "Primitive to load scripts dynamically", "author": "Alex Lohr ", "contributors": [ diff --git a/packages/scroll/CHANGELOG.md b/packages/scroll/CHANGELOG.md index 5adb8c6db..0862f2168 100644 --- a/packages/scroll/CHANGELOG.md +++ b/packages/scroll/CHANGELOG.md @@ -1,5 +1,34 @@ # @solid-primitives/scroll +## 3.0.0-next.0 + +### Major Changes + +- 4cb6ec9: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/scroll` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `onMount` replaced with `onSettled` for post-render position refresh + - `sharedConfig.context` replaced with `sharedConfig.hydrating` for hydration detection + - Internal signal pattern replaced: Solid 2.0's `createSignal(fn)` creates a derived signal rather than storing a function value; now uses a version counter to drive memo re-evaluation on scroll events + - Signal uses `{ ownedWrite: true }` to allow writes from DOM event handlers within reactive scopes + - Tests updated: `createComputed` removed (no longer in Solid 2.0), replaced with direct reactive reads and `flush()` for synchronous assertions; `createSignal` in tests uses `{ ownedWrite: true }` + - README: `onMount` example updated to `onSettled` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + - @solid-primitives/static-store@1.0.0-next.0 + ## 2.1.5 ### Patch Changes diff --git a/packages/scroll/package.json b/packages/scroll/package.json index 0e795c79f..d9a68818c 100644 --- a/packages/scroll/package.json +++ b/packages/scroll/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/scroll", - "version": "2.1.5", + "version": "3.0.0-next.0", "description": "Reactive primitives to react to element/window scrolling, and to prevent scroll outside of a given element.", "author": "David Di Biase ", "contributors": [ diff --git a/packages/selection/CHANGELOG.md b/packages/selection/CHANGELOG.md index 16f9a1187..4aae18cea 100644 --- a/packages/selection/CHANGELOG.md +++ b/packages/selection/CHANGELOG.md @@ -1,5 +1,30 @@ # @solid-primitives/selection +## 1.0.0-next.0 + +### Major Changes + +- 479ba79: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/selection` + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + - `createEffect` for applying selection converted to the split compute/apply pattern required by Solid 2.0 + - Event listeners are now registered directly with `onCleanup` rather than inside a `createEffect` with no reactive dependencies + - Internal signals now use `{ ownedWrite: true }` (via `INTERNAL_OPTIONS`) to allow `setSelection` to be called from within reactive scopes + - Added `test/server.test.ts` verifying SSR no-op behaviour for `createSelection` + - No changes to the public `createSelection` API or `HTMLSelection` type + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/selection/package.json b/packages/selection/package.json index ceaebbb76..8b7fe0c43 100644 --- a/packages/selection/package.json +++ b/packages/selection/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/selection", - "version": "0.1.3", + "version": "1.0.0-next.0", "description": "selection primitive.", "author": "Alex Lohr ", "contributors": [], diff --git a/packages/sensors/CHANGELOG.md b/packages/sensors/CHANGELOG.md index 96cb6014c..92afde67b 100644 --- a/packages/sensors/CHANGELOG.md +++ b/packages/sensors/CHANGELOG.md @@ -1,5 +1,22 @@ # @solid-primitives/sensors +## 1.0.0-next.0 + +### Major Changes + +- 8b5c942: New package. Provides sensor primitives following the Solid Primitives `make*`/`create*` convention (`make*` = raw listener, returns cleanup, no Solid lifecycle; `create*` = reactive accessor or store, integrates with `onCleanup`). + + - `makeSensor(SensorClass, onChange, options?)` — generic raw Generic Sensor API listener, returns cleanup + - `createSensor(SensorClass, options?)` — reactive accessor for any Generic Sensor API sensor + - `makeAccelerometer(onChange, options?)` — raw `devicemotion` event listener, returns cleanup + - `createAccelerometer(includeGravity?, interval?)` — reactive accessor backed by `devicemotion` events + - `makeGyroscope(onChange, options?)` — raw `deviceorientation` event listener, returns cleanup + - `createGyroscope(interval?)` — reactive store `{ alpha, beta, gamma }` backed by `deviceorientation` events + - `makeCompass(onChange, options?)` — raw compass/orientation event listener, returns cleanup + - `createCompass(options?)` — reactive store for compass heading/orientation + - `makeBattery(onChange)` — raw Battery Status API listener, returns cleanup + - `createBattery()` — reactive accessor for battery status `{ level, charging, … }` + ## 0.1.0 ### Minor Changes diff --git a/packages/sensors/package.json b/packages/sensors/package.json index 8388dce60..dc948628e 100644 --- a/packages/sensors/package.json +++ b/packages/sensors/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/sensors", - "version": "0.1.0", + "version": "1.0.0-next.0", "description": "Primitives for device sensors: accelerometer, gyroscope, compass, battery, and generic Sensor API.", "author": "David Di Biase ", "contributors": [], diff --git a/packages/set/CHANGELOG.md b/packages/set/CHANGELOG.md index 57e3d0cf2..cc2665fc1 100644 --- a/packages/set/CHANGELOG.md +++ b/packages/set/CHANGELOG.md @@ -1,5 +1,28 @@ # @solid-primitives/set +## 1.0.0-next.0 + +### Major Changes + +- a7f09be: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ## New Exports + + - **`union(a, b)`** — reactive `Accessor>` of all elements in either set. + - **`intersection(a, b)`** — reactive `Accessor>` of elements present in both sets. + - **`difference(a, b)`** — reactive `Accessor>` of elements in `a` not in `b`. + - **`symmetricDifference(a, b)`** — reactive `Accessor>` of elements in either set but not both. + - **`readonlySet(set)`** — casts a `ReactiveSet` to `ReadonlySet` (type-only, zero runtime cost). + +### Patch Changes + +- Updated dependencies [254a964] + - @solid-primitives/trigger@3.0.0-next.0 + ## 0.7.3 ### Patch Changes diff --git a/packages/set/package.json b/packages/set/package.json index 9326da99c..86d60f5c8 100644 --- a/packages/set/package.json +++ b/packages/set/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/set", - "version": "0.7.3", + "version": "1.0.0-next.0", "description": "Reactive Set and WeakSet primitives with set-algebra operations: union, intersection, difference, and symmetricDifference.", "author": "Damian Tarnawski @thetarnav ", "license": "MIT", diff --git a/packages/share/CHANGELOG.md b/packages/share/CHANGELOG.md index fed0f2643..98bea7145 100644 --- a/packages/share/CHANGELOG.md +++ b/packages/share/CHANGELOG.md @@ -1,5 +1,20 @@ # @solid-primitives/share +## 4.0.0-next.0 + +### Major Changes + +- f68a71f: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/share` + + - `isServer` is now imported from `@solidjs/web` (was `solid-js/web`) + - `createWebShare` — internal `createEffect` converted to the split compute/apply pattern required by Solid 2.0; the `on` helper (removed in Solid 2.0) is no longer used + ## 2.2.4 ### Patch Changes diff --git a/packages/share/package.json b/packages/share/package.json index 878819c4d..9472e8584 100644 --- a/packages/share/package.json +++ b/packages/share/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/share", - "version": "3.0.0", + "version": "4.0.0-next.0", "description": "Primitives to help with sharing content on social media and beyond.", "author": "David Di Biase ", "contributors": [ diff --git a/packages/signal-builders/CHANGELOG.md b/packages/signal-builders/CHANGELOG.md index 021c1d1df..91bca98e4 100644 --- a/packages/signal-builders/CHANGELOG.md +++ b/packages/signal-builders/CHANGELOG.md @@ -1,5 +1,24 @@ # @solid-primitives/signal-builders +## 1.0.0-next.0 + +### Major Changes + +- 1d6c9d3: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` is now required. + + - The `on` helper from `solid-js` (used internally by `capitalize`) is removed in Solid 2.0; `capitalize` now uses a plain `createMemo` which is equivalent + - `get` and `merge` now correctly return reactive `Accessor` values via `createMemo` — previously they returned plain (non-reactive) values despite their type signatures claiming otherwise; any code that was working around this bug by calling the result as a plain value will break + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/signal-builders/package.json b/packages/signal-builders/package.json index e4b57a4c3..b31e88823 100644 --- a/packages/signal-builders/package.json +++ b/packages/signal-builders/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/signal-builders", - "version": "0.2.3", + "version": "1.0.0-next.0", "description": "A collection of chainable and composable reactive signal calculations, aka Signal Builders.", "author": "Damian Tarnawski ", "license": "MIT", diff --git a/packages/spring/CHANGELOG.md b/packages/spring/CHANGELOG.md index 8ce8d021f..878e85054 100644 --- a/packages/spring/CHANGELOG.md +++ b/packages/spring/CHANGELOG.md @@ -1,5 +1,29 @@ # @solid-primitives/spring +## 1.0.0-next.0 + +### Major Changes + +- a944d2b: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14`, `@solidjs/web@^2.0.0-beta.14`, and `@solid-primitives/utils@^6.4.0` are now required. + + ### `@solid-primitives/spring` + + - `isServer` is now imported from `@solidjs/web` (not `solid-js/web`) + - Internal animated value signal is created with `{ ownedWrite: true }`, allowing `set` (the spring setter) to be called from within reactive scopes such as effect apply phases + - `createDerivedSpring`: effect converted to split compute/apply form with `{ defer: true }` — avoids re-animating the initial value that was already set at construction time; apply phase correctly does not return the setter Promise + - Animation cleanup function is extracted explicitly (no longer relying on `onCleanup` return value) + - Tests updated to call `flush()` after signal writes and after RAF frame ticks, reflecting Solid 2.0's microtask-batched signal updates + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.2 ### Patch Changes diff --git a/packages/spring/package.json b/packages/spring/package.json index bd0cc3a75..44b4df7cc 100644 --- a/packages/spring/package.json +++ b/packages/spring/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/spring", - "version": "0.2.0", + "version": "1.0.0-next.0", "description": "Primitive that creates spring physics functions.", "author": "Carlo Taleon ", "contributors": [ @@ -57,7 +57,7 @@ "test:ssr": "pnpm run vitest --mode ssr" }, "peerDependencies": { - "@solid-primitives/utils": "^6.4.0", + "@solid-primitives/utils": "^7.0.0-next.0", "@solidjs/web": "^2.0.0-beta.15", "solid-js": "^2.0.0-beta.15" }, diff --git a/packages/sse/CHANGELOG.md b/packages/sse/CHANGELOG.md index 929eaec00..85509d08c 100644 --- a/packages/sse/CHANGELOG.md +++ b/packages/sse/CHANGELOG.md @@ -1,5 +1,80 @@ # @solid-primitives/sse +## 1.0.0-next.0 + +### Major Changes + +- ce9b27a: Align `createSSE` with Solid 2.0 async reactivity patterns + + ### Breaking changes + + **`pending` removed from `SSEReturn`** + + Use `` for initial load UI and `isPending(() => data())` for stale-while-revalidating. Both are re-exported from this package. + + ```tsx + // Before + const { data, pending } = createSSE(url); +

{data()}

+ + // After — declarative initial load + Connecting…

}> +

{data()}

+
+ + // After — stale-while-revalidating (only true once a value exists and new data is pending) + data())}>

Refreshing…

+ ``` + + **`error` removed from `SSEReturn`** + + Terminal errors (connection CLOSED with no retries left) now propagate through `data()` to ``. Non-terminal errors (browser reconnecting) are still surfaced via `onError` callback. + + ```tsx + // Before + const { data, error } = createSSE(url); +

Error: {error()?.type}

+ + // After — single error path via Errored boundary +

Connection failed

}> + Connecting…

}> +

{data()}

+
+
+ ``` + + **`data` type narrowed from `Accessor` to `Accessor`** + + The `| undefined` loading hole is removed. When `data()` is not ready it throws `NotReadyError` (caught by ``) or the terminal error (caught by ``); it never returns `undefined` due to pending state. + + **SSR stub**: `data()` now throws `NotReadyError` on the server when no `initialValue` is provided (consistent with browser behaviour). Provide `initialValue` for a non-throwing SSR default. + + ### New primitives + + **`makeSSEAsyncIterable(url, options?)`** + + Wraps an SSE endpoint as a standard `AsyncIterable`. Each message is one yielded value; terminal errors are thrown. Cleanup runs automatically when the iterator is abandoned. + + ```ts + for await (const msg of makeSSEAsyncIterable(url)) { + console.log(msg); + } + ``` + + **`createSSEStream(url, options?)`** + + Minimal reactive alternative to `createSSE` — returns only a `data: Accessor` backed by an async iterable. Same `` / `` integration, no `source` / `readyState` / `close` / `reconnect`. + + ```ts + const data = createSSEStream<{ msg: string }>(url, { transform: JSON.parse }); + ``` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.0.102 ### Patch Changes diff --git a/packages/sse/package.json b/packages/sse/package.json index f0822a730..7fc70aaef 100644 --- a/packages/sse/package.json +++ b/packages/sse/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/sse", - "version": "0.0.102", + "version": "1.0.0-next.0", "description": "Primitives for Server-Sent Events (SSE) using the browser's EventSource API.", "author": "David Di Biase ", "contributors": [], diff --git a/packages/state-machine/CHANGELOG.md b/packages/state-machine/CHANGELOG.md index f031740b8..76afd6a4e 100644 --- a/packages/state-machine/CHANGELOG.md +++ b/packages/state-machine/CHANGELOG.md @@ -1,5 +1,25 @@ # @solid-primitives/state-machine +## 1.0.0-next.0 + +### Major Changes + +- 9adf2d2: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependencies**: `solid-js@^2.0.0-beta.14` is now required. + + - Signal writes are now batched by default; call `flush()` from `solid-js` after calling `state.to.*()` before reading reactive state in tests or synchronous non-reactive code. + - `@solid-primitives/utils` is now a runtime dependency (used for `INTERNAL_OPTIONS` / `ownedWrite` signal option). + - State callbacks called during machine initialization that immediately transition to another state will now require a `flush()` before reading the resulting state. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.2.0 ### Major Changes diff --git a/packages/state-machine/package.json b/packages/state-machine/package.json index 501716a29..6f9b84666 100644 --- a/packages/state-machine/package.json +++ b/packages/state-machine/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/state-machine", - "version": "0.1.1", + "version": "1.0.0-next.0", "description": "A primitive for creating reactive state machines.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/static-store/CHANGELOG.md b/packages/static-store/CHANGELOG.md index 48919ae98..3b50ba30f 100644 --- a/packages/static-store/CHANGELOG.md +++ b/packages/static-store/CHANGELOG.md @@ -1,5 +1,53 @@ # @solid-primitives/static-store +## 1.0.0-next.0 + +### Major Changes + +- 4a5bf32: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/media` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - Requires Solid.js v2 — `classList` is replaced by `class` with object/array forms in consuming code + + ### `@solid-primitives/utils` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSignal`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) for hydration detection + - `INTERNAL_OPTIONS`: `{ internal: true }` changed to `{ pureWrite: true }` to match Solid 2.0 `SignalOptions` + - `defaultEquals` now aliases `isEqual` (was `equalFn`) + - `defer`: `AccessorArray` type replaced with `Accessor[]` (type was removed in Solid 2.0) + + ### `@solid-primitives/static-store` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createStaticStore`: uses `getObserver` (was `getListener`) and `{ pureWrite: true }` (was `{ internal: true }`) + - Removed explicit `batch()` calls — updates are automatically batched in Solid 2.0 + - `createHydratableStaticStore`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) + + ### `@solid-primitives/rootless` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSingletonRoot`: uses `sharedConfig.hydrating` (was `sharedConfig.context`) + - `createRootPool`: removed `batch()` calls — Solid 2.0 auto-batches on microtasks + + ### `@solid-primitives/event-listener` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` across all source files + - `createEventListener` and `createRenderEffect` converted to split compute/apply effect pattern required by Solid 2.0 + - `eventListener` directive converted to split effect pattern; cleanup is returned from apply phase instead of using `onCleanup` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/static-store/package.json b/packages/static-store/package.json index 5e95f2a9c..2049705d5 100644 --- a/packages/static-store/package.json +++ b/packages/static-store/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/static-store", - "version": "0.1.3", + "version": "1.0.0-next.0", "description": "Primitives for creating small reactive objects that doesn't change their shape over time - don't need a proxy wrapper.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/storage/CHANGELOG.md b/packages/storage/CHANGELOG.md index 740ae3ab3..e88970ca1 100644 --- a/packages/storage/CHANGELOG.md +++ b/packages/storage/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/storage +## 5.0.0-next.0 + +### Major Changes + +- 9404090: **`makePersisted`** - simplify setter, Solid 2.0 adaption, simpler types using function overloads + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 4.3.4 ### Patch Changes diff --git a/packages/storage/package.json b/packages/storage/package.json index 8d58908ad..7a3469127 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/storage", - "version": "4.3.4", + "version": "5.0.0-next.0", "description": "Primitive that provides reactive wrappers for storage access", "author": "Alex Lohr ", "contributors": [ diff --git a/packages/styles/CHANGELOG.md b/packages/styles/CHANGELOG.md index 05fce7a21..230cc6e34 100644 --- a/packages/styles/CHANGELOG.md +++ b/packages/styles/CHANGELOG.md @@ -1,5 +1,27 @@ # @solid-primitives/styles +## 1.0.0-next.0 + +### Major Changes + +- 4777730: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/styles` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - Requires Solid.js v2 — signal writes from browser callbacks (e.g. ResizeObserver) are microtask-batched; reads reflect the new value immediately but effects are deferred until the next microtask or `flush()` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/rootless@2.0.0-next.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/styles/package.json b/packages/styles/package.json index b1c4cf096..815a3ae78 100644 --- a/packages/styles/package.json +++ b/packages/styles/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/styles", - "version": "0.1.3", + "version": "1.0.0-next.0", "description": "Collection of reactive primitives focused on styles.", "author": "Damian Tarnawski ", "contributors": [ diff --git a/packages/transition-group/CHANGELOG.md b/packages/transition-group/CHANGELOG.md index fa561ce29..bf632842a 100644 --- a/packages/transition-group/CHANGELOG.md +++ b/packages/transition-group/CHANGELOG.md @@ -1,5 +1,17 @@ # @solid-primitives/transition-group +## 2.0.0-next.0 + +### Major Changes + +- 9b2475d: Migrate to Solid.js v2.0 (beta.14) + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.1.2 ### Patch Changes diff --git a/packages/transition-group/package.json b/packages/transition-group/package.json index 47f08331f..7c0eb28f8 100644 --- a/packages/transition-group/package.json +++ b/packages/transition-group/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/transition-group", - "version": "1.1.2", + "version": "2.0.0-next.0", "description": "Reactive primitives for implementing transition effects in SolidJS", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/trigger/CHANGELOG.md b/packages/trigger/CHANGELOG.md index 295cdcd98..aa51338e6 100644 --- a/packages/trigger/CHANGELOG.md +++ b/packages/trigger/CHANGELOG.md @@ -1,5 +1,28 @@ # @solid-primitives/trigger +## 3.0.0-next.0 + +### Major Changes + +- 254a964: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/trigger` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `getListener` replaced by `getObserver` (renamed in Solid 2.0) + - Signal options updated: `internal: true` removed, `ownedWrite: true` added — allows `dirty()` and `dirtyAll()` to be called from within reactive scopes + - Added `test/server.test.ts` verifying SSR no-op behaviour for `createTrigger` and `createTriggerCache` + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 1.2.3 ### Patch Changes diff --git a/packages/trigger/package.json b/packages/trigger/package.json index 20b2a93f9..37d7a3d78 100644 --- a/packages/trigger/package.json +++ b/packages/trigger/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/trigger", - "version": "2.0.0", + "version": "3.0.0-next.0", "description": "A set of primitives based on Solid signals, used to trigger computations.", "author": "Damian Tarnawski ", "contributors": [], diff --git a/packages/tween/CHANGELOG.md b/packages/tween/CHANGELOG.md index 50cde4006..fc34a4041 100644 --- a/packages/tween/CHANGELOG.md +++ b/packages/tween/CHANGELOG.md @@ -1,5 +1,22 @@ # @solid-primitives/tween +## 2.0.0-next.0 + +### Major Changes + +- 098c39f: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/tween` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - `createEffect` updated to the two-argument compute/apply form required by Solid 2.0 — the removed `on()` helper is no longer used + - Cleanup (cancelling the in-flight `requestAnimationFrame`) is now returned from the apply function instead of calling `onCleanup` + - `current()` snapshot at tween start is now read inside `untrack()` to silence strict-mode warnings about untracked reads in apply callbacks + ## 1.4.1 ### Patch Changes diff --git a/packages/tween/package.json b/packages/tween/package.json index e0bc56cdb..0e3e9631e 100644 --- a/packages/tween/package.json +++ b/packages/tween/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/tween", - "version": "1.4.1", + "version": "2.0.0-next.0", "description": "Primitive that creates tween functions", "author": "Ryan Carniato ", "license": "MIT", diff --git a/packages/upload/CHANGELOG.md b/packages/upload/CHANGELOG.md index 34fa30f4e..93c6a59d5 100644 --- a/packages/upload/CHANGELOG.md +++ b/packages/upload/CHANGELOG.md @@ -1,5 +1,21 @@ # @solid-primitives/upload +## 1.0.0-next.0 + +### Major Changes + +- 94ff872: Migrate to Solid.js 2.0 (beta.14) + + - Updated peer dependencies to `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` + - `isServer` is now imported from `@solidjs/web` (moved out of `solid-js/web`) + - `createDropzone`: now returns a `setRef` ref callback; event listeners are attached when the ref is assigned and cleaned up via `onCleanup` registered through `runWithOwner` back into the reactive owner scope + - `fileUploader`: replaced the `use:fileUploader` directive (removed in Solid 2.0) with a **ref callback factory** — use `ref={fileUploader(opts)}` instead of `use:fileUploader={opts}` + +### Patch Changes + +- Updated dependencies [4a5bf32] + - @solid-primitives/event-listener@3.0.0-next.0 + ## 0.1.4 ### Patch Changes diff --git a/packages/upload/package.json b/packages/upload/package.json index ca971d56b..46da21bdc 100644 --- a/packages/upload/package.json +++ b/packages/upload/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/upload", - "version": "0.2.0", + "version": "1.0.0-next.0", "description": "Primitives for uploading files.", "author": "Rustam Ashurmatov ", "license": "MIT", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 6f33f59b2..f9af12164 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,51 @@ # @solid-primitives/utils +## 7.0.0-next.0 + +### Major Changes + +- 4a5bf32: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/media` + + - `isServer` now imported from `@solidjs/web` (not `solid-js/web`) + - Requires Solid.js v2 — `classList` is replaced by `class` with object/array forms in consuming code + + ### `@solid-primitives/utils` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSignal`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) for hydration detection + - `INTERNAL_OPTIONS`: `{ internal: true }` changed to `{ pureWrite: true }` to match Solid 2.0 `SignalOptions` + - `defaultEquals` now aliases `isEqual` (was `equalFn`) + - `defer`: `AccessorArray` type replaced with `Accessor[]` (type was removed in Solid 2.0) + + ### `@solid-primitives/static-store` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createStaticStore`: uses `getObserver` (was `getListener`) and `{ pureWrite: true }` (was `{ internal: true }`) + - Removed explicit `batch()` calls — updates are automatically batched in Solid 2.0 + - `createHydratableStaticStore`: uses `onSettled` (was `onMount`) and `sharedConfig.hydrating` (was `sharedConfig.context`) + + ### `@solid-primitives/rootless` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` + - `createHydratableSingletonRoot`: uses `sharedConfig.hydrating` (was `sharedConfig.context`) + - `createRootPool`: removed `batch()` calls — Solid 2.0 auto-batches on microtasks + + ### `@solid-primitives/event-listener` + + - `isServer` import moved from `solid-js/web` to `@solidjs/web` across all source files + - `createEventListener` and `createRenderEffect` converted to split compute/apply effect pattern required by Solid 2.0 + - `eventListener` directive converted to split effect pattern; cleanup is returned from apply phase instead of using `onCleanup` + +### Minor Changes + +- 89c5324: new wrapSetter primitive to wrap the setters of signals and stores + ## 6.4.0 ### Minor Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index 94658d7ff..bd980747c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/utils", - "version": "6.4.0", + "version": "7.0.0-next.0", "description": "A bunch of reactive utility types and functions, for building primitives with Solid.js", "author": "Damian Tarnawski @thetarnav ", "contributors": [ diff --git a/packages/vibrate/CHANGELOG.md b/packages/vibrate/CHANGELOG.md new file mode 100644 index 000000000..046a4e08a --- /dev/null +++ b/packages/vibrate/CHANGELOG.md @@ -0,0 +1,24 @@ +# @solid-primitives/vibrate + +## 1.0.0-next.0 + +### Major Changes + +- fb1e4ad: Add `@solid-primitives/vibrate` package (Stage 0) + + New primitives for device haptic feedback via the [Vibration API](https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API). + + - **`isVibrationSupported()`** — runtime check for Vibration API availability. + - **`makeVibrate(pattern, options?)`** — non-reactive helper returning `[start, stop]`. Supports optional `interval` for repeating patterns. No-ops when the API is unavailable. + - **`createVibrate(pattern, options?)`** — reactive primitive returning `{ vibrating, start, stop, supported }`. Accepts a reactive accessor for `pattern`: changing it while vibrating restarts automatically. Stops and cleans up on owner disposal. + - **`frequencyToPattern(hz, dutyCycle?)`** — converts a frequency in Hz to a single-cycle `[onMs, offMs]` pattern. + - **`makePulse(hz, options?)`** — non-reactive helper that vibrates continuously at `hz` cycles per second using a repeating chunk strategy. + - **`createPulse(hz, options?)`** — reactive pulse primitive returning `{ pulsing, start, stop, supported }`. Accepts a reactive `hz` accessor: changing frequency while pulsing restarts immediately at the new rhythm. + + Peer dependencies: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14`. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 diff --git a/packages/vibrate/package.json b/packages/vibrate/package.json index 5174725c6..dd59defc7 100644 --- a/packages/vibrate/package.json +++ b/packages/vibrate/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/vibrate", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "Primitives to trigger and manage device vibration via the Vibration API", "author": "David Di Biase ", "contributors": [], diff --git a/packages/video/CHANGELOG.md b/packages/video/CHANGELOG.md new file mode 100644 index 000000000..57892faf6 --- /dev/null +++ b/packages/video/CHANGELOG.md @@ -0,0 +1,36 @@ +# @solid-primitives/video + +## 1.0.0-next.0 + +### Major Changes + +- 98a57ab: New package: `@solid-primitives/video` + + Layered primitives for managing HTML video playback, built for Solid 2.0 (beta.14). + + ### `makeVideo` + + Non-reactive base. Creates an `HTMLVideoElement` with optional event handlers and initial configuration (`autoPlay`, `loop`, `muted`, `preload`). Returns a `[player, cleanup]` tuple. No Solid owner required. + + ### `makeVideoPlayer` + + Wraps `makeVideo` with imperative controls: `play`, `pause`, `seek`, `setVolume`, `setMuted`, `setPlaybackRate`, and `setLoop`. + + ### `createVideo` + + Reactive primitive covering essential playback state: `playing`/`setPlaying`, `currentTime`/`seek`, `ended`, `seeking`, `error` (`MediaError | null`), and `duration` (throws `NotReadyError` until metadata loads — integrates with ``). Accepts a static or reactive `VideoSource` and optional `VideoOptions`. + + ### `createVideoPlayer` + + Extends `createVideo` with the full control surface: `volume`/`setVolume`, `muted`/`setMuted`, `playbackRate`/`setPlaybackRate`, `loop`/`setLoop`, `buffered`, `readyState`, `videoWidth`, and `videoHeight`. Accepts `VideoControlsOptions` which adds `volume` and `playbackRate` initial values to `VideoOptions`. + + ### Design notes + + `createVideo` and `createVideoPlayer` are composable — `createVideoPlayer` calls `createVideo` internally and layers additional `createEventListenerMap` bindings on the same player element. Choose the primitive that matches your needs; the non-reactive `make*` layer remains available when no Solid owner is present. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + - @solid-primitives/event-listener@3.0.0-next.0 diff --git a/packages/video/package.json b/packages/video/package.json index e9a00d66f..6c7fbec3c 100644 --- a/packages/video/package.json +++ b/packages/video/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/video", - "version": "0.0.100", + "version": "1.0.0-next.0", "description": "Primitives to manage HTML video playback.", "author": "David Di Biase ", "contributors": [], diff --git a/packages/virtual/CHANGELOG.md b/packages/virtual/CHANGELOG.md index 76194c97b..6c95f9cee 100644 --- a/packages/virtual/CHANGELOG.md +++ b/packages/virtual/CHANGELOG.md @@ -1,5 +1,27 @@ # @solid-primitives/virtual +## 1.0.0-next.0 + +### Major Changes + +- 49acc0f: Migrate to Solid.js v2.0 (beta.14) + + ## Breaking Changes + + **Peer dependency**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. + + ### `@solid-primitives/virtual` + + - **`createVirtualList`**: returns `[Accessor, onScroll]` — the first element is now an Accessor that must be called to read `containerHeight`, `viewerTop`, and `visibleItems`. + - **`VirtualList` children**: the child render function now receives `(item: Accessor, index: Accessor)` — `item` is an Accessor and must be called as `item()` to get the value. This matches Solid 2.0's `` component behavior. + - **`{ ownedWrite: true }`**: the internal scroll offset signal uses `ownedWrite` to allow writes from the `onScroll` event handler outside the owning reactive scope. + +### Patch Changes + +- Updated dependencies [89c5324] +- Updated dependencies [4a5bf32] + - @solid-primitives/utils@7.0.0-next.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/virtual/package.json b/packages/virtual/package.json index 38ef720a5..c2a4d6e9b 100644 --- a/packages/virtual/package.json +++ b/packages/virtual/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/virtual", - "version": "0.3.0", + "version": "1.0.0-next.0", "description": "A virtualized list component for performantly rendering lists with many elements", "author": "Spencer Whitehead ", "contributors": [], diff --git a/packages/websocket/CHANGELOG.md b/packages/websocket/CHANGELOG.md index 04bb848db..e5bd96ed6 100644 --- a/packages/websocket/CHANGELOG.md +++ b/packages/websocket/CHANGELOG.md @@ -1,5 +1,38 @@ # @solid-primitives/websocket +## 2.0.0-next.1 + +### Major Changes + +- e8ef648: Upgrade to Solid.js 2.0 (`^2.0.0-beta.14`) and add async-reactive message primitives. + + **Breaking changes** + + - Peer dependency is now `solid-js@^2.0.0-beta.14`. All `createEffect` examples in docs now use the Solid 2.0 split form: `createEffect(compute, effect)`. + + **New: `createWSMessage`** + + Reactive `Accessor` for the most recently received WebSocket message. Cleans up its event listener on owner disposal via `onCleanup`. + + ```ts + const message = createWSMessage(ws); + return

{message()}

; + ``` + + > Note: uses a signal internally, so under burst conditions only the final message before a flush is tracked by effects. For every-message processing, use the planned `wsMessageIterable` / `createWSData` primitives. + + **`createWSState` signal fix** + + Internal signal now uses `{ ownedWrite: true }` to suppress the Solid 2.0 dev-mode `SIGNAL_WRITE_IN_OWNED_SCOPE` diagnostic, which would fire if `ws.close()` is called from inside a component body or reactive computation. + + **Planned for next minor: async message primitives** + + The following are designed and documented but not yet implemented, based on Solid 2.0's `createMemo(AsyncIterable)` model: + + - `wsMessageIterable` — buffered `AsyncIterable` that never drops burst messages; works with `makeReconnectingWS` + - `createWSData` — async memo over `wsMessageIterable`; suspends `` until first message; integrates with `isPending` and `latest` + - `createWSStore` — reactive store driven by WS messages as draft-mutation patches via `createStore(fn, seed)` + ## 2.0.0-beta.0 ### Major Changes diff --git a/packages/websocket/package.json b/packages/websocket/package.json index f62b74e32..a364645fe 100644 --- a/packages/websocket/package.json +++ b/packages/websocket/package.json @@ -1,6 +1,6 @@ { "name": "@solid-primitives/websocket", - "version": "2.0.0-beta.0", + "version": "2.0.0-next.1", "description": "Primitive to create a web socket connection", "author": "David Di Biase ", "contributors": [