Skip to content

Releases: solidjs-community/solid-primitives

@solid-primitives/async@0.0.101-next.0

Pre-release

Choose a tag to compare

@github-actions github-actions released this 01 Jul 13:40
203ee2b

Patch Changes

  • 6b02a3a: new package: async (to partially replace resource)

@solid-primitives/virtual@1.0.0-next.0

Pre-release

Choose a tag to compare

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<VirtualState>, 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<T>, index: Accessor<number>)item is an Accessor and must be called as item() to get the value. This matches Solid 2.0's <For> 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

@solid-primitives/video@1.0.0-next.0

Pre-release

Choose a tag to compare

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 <Loading>). 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

@solid-primitives/upload@1.0.0-next.0

Pre-release

Choose a tag to compare

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

@solid-primitives/trigger@3.0.0-next.0

Pre-release

Choose a tag to compare

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

@solid-primitives/styles@1.0.0-next.0

Pre-release

Choose a tag to compare

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

@solid-primitives/signal-builders@1.0.0-next.0

Choose a tag to compare

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<T> 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

@solid-primitives/share@4.0.0-next.0

Pre-release

Choose a tag to compare

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

@solid-primitives/set@1.0.0-next.0

Pre-release

Choose a tag to compare

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<ReadonlySet<T>> of all elements in either set.
    • intersection(a, b) — reactive Accessor<ReadonlySet<T>> of elements present in both sets.
    • difference(a, b) — reactive Accessor<ReadonlySet<T>> of elements in a not in b.
    • symmetricDifference(a, b) — reactive Accessor<ReadonlySet<T>> 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

@solid-primitives/sensors@1.0.0-next.0

Pre-release

Choose a tag to compare

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, … }