Skip to content

Releases

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Minor Changes

  • a176399: Support variable row heights: rowHeight can now be a (index) => number function, and an opt-in measured mode (estimatedRowHeight plus measureElement, using ResizeObserver) records real heights. createVirtualList returns a third helpers tuple element (getRowOffset, getRowHeight, measureElement, unmeasureElement, resetMeasurements, scrollToIndex) and the state gains offsets. The fixed-height path is unchanged.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:31
ee0e31a

Minor Changes

  • a176399: Add makePausableTimer and createPausableTimer: one-shot timeouts that track remaining time across pause/resume, with a reactive delay, signal accessors (remaining, isActive, isPaused) and an opt-in pauseWhenHidden option.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Minor Changes

  • a176399: Add opt-in requestAnimationFrame throttling: createScrollPosition(target, { throttle: "raf" }), a non-reactive makeScrollPositionListener, and useWindowScrollPositionRaf. Default behavior is unchanged.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:41
94c849d

Minor Changes

  • 4046354: Add createDebounced and createThrottled derived accessors. They are built on Solid 2's createDeferred, so a held-back value stays visible while isPending() reports the wait, and the landing participates in the normal reactive graph. Both support leading / trailing edge options; createDebounced also supports maxWait.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Minor Changes

  • a176399: Add getVisualViewport, makeVisualViewportListener, createVisualViewport and useVisualViewport for tracking window.visualViewport (size, offsets, pinch-zoom scale) with a window.innerWidth/innerHeight fallback and SSR/hydration-safe defaults.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Minor Changes

  • a176399: Add opt-in animation-aware transitions: animations: true waits for element.getAnimations({ subtree: true }) to settle (CSS transitions, CSS animations, Web Animations) instead of the fixed duration, falling back to the timer when no element is known or getAnimations is unavailable. The element comes from the new element option or the returned ref. Also returns attrs() with data-starting-style / data-ending-style for styling hooks. Fully backward compatible.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Patch Changes

  • 6457c24: Fix the createInfiniteScroll loader throwing CLEANUP_IN_FORBIDDEN_SCOPE when used as a JSX ref callback (#1143).

    The loader called onCleanup inside the ref callback, which Solid 2 forbids. It now observes the element (unobserving a previous sentinel) and returns a teardown; observation is also torn down with the owner of createInfiniteScroll.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Patch Changes

  • 6457c24: Fix mutationObserver(options, callback) throwing PRIMITIVE_IN_EFFECT_CALLBACK when used as a JSX ref (#1143).

    The observer was created inside the ref callback, where Solid 2 forbids onSettled, onCleanup and other primitives. It is now created once when mutationObserver(...) is evaluated (the component body) and the ref callback only calls observe. It disconnects with the owner of that call, and one factory value can be used on several elements.

    createMutationObserver (and so mutationObserver) also mints a matching owner on the server, so the hydration ids of elements rendered after it stay aligned with the client.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Patch Changes

  • 6457c24: Fix the README createStream and createScreen examples, which created an effect inside a JSX ref callback and threw PRIMITIVE_IN_EFFECT_CALLBACK in Solid 2 (#1143). They now keep the element in a signal via ref={setVideo} and assign srcObject from an effect in the component body. Documentation only, no source change.

    The examples also no longer wrap in <Loading> (stream() is a plain signal, so it never shows a fallback; they render their own loading state) and createScreen now starts from a click, since getDisplayMedia requires a user gesture. The same inaccurate <Loading> claim is removed from the JSDoc.

@solid-primitives/[email protected]

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:30
ee0e31a

Patch Changes

  • 6457c24: Fix onElementConnect throwing CLEANUP_IN_FORBIDDEN_SCOPE inside a ref callback (#1143). It no longer calls onCleanup and now returns a disposer. Add createConnectRef for ref usage that also cleans up with the owner.