Repository navigation
Releases
@solid-primitives/[email protected]
Minor Changes
- a176399: Support variable row heights:
rowHeightcan now be a(index) => numberfunction, and an opt-in measured mode (estimatedRowHeightplusmeasureElement, usingResizeObserver) records real heights.createVirtualListreturns a thirdhelperstuple element (getRowOffset,getRowHeight,measureElement,unmeasureElement,resetMeasurements,scrollToIndex) and the state gainsoffsets. The fixed-height path is unchanged.
@solid-primitives/[email protected]
Minor Changes
- a176399: Add
makePausableTimerandcreatePausableTimer: one-shot timeouts that track remaining time across pause/resume, with a reactive delay, signal accessors (remaining,isActive,isPaused) and an opt-inpauseWhenHiddenoption.
@solid-primitives/[email protected]
Minor Changes
- a176399: Add opt-in
requestAnimationFramethrottling:createScrollPosition(target, { throttle: "raf" }), a non-reactivemakeScrollPositionListener, anduseWindowScrollPositionRaf. Default behavior is unchanged.
@solid-primitives/[email protected]
Minor Changes
- 4046354: Add
createDebouncedandcreateThrottledderived accessors. They are built on Solid 2'screateDeferred, so a held-back value stays visible whileisPending()reports the wait, and the landing participates in the normal reactive graph. Both supportleading/trailingedge options;createDebouncedalso supportsmaxWait.
@solid-primitives/[email protected]
Minor Changes
- a176399: Add
getVisualViewport,makeVisualViewportListener,createVisualViewportanduseVisualViewportfor trackingwindow.visualViewport(size, offsets, pinch-zoom scale) with awindow.innerWidth/innerHeightfallback and SSR/hydration-safe defaults.
@solid-primitives/[email protected]
Minor Changes
- a176399: Add opt-in animation-aware transitions:
animations: truewaits forelement.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 orgetAnimationsis unavailable. The element comes from the newelementoption or the returnedref. Also returnsattrs()withdata-starting-style/data-ending-stylefor styling hooks. Fully backward compatible.
@solid-primitives/[email protected]
Patch Changes
-
6457c24: Fix the
createInfiniteScrollloader throwingCLEANUP_IN_FORBIDDEN_SCOPEwhen used as a JSXrefcallback (#1143).The loader called
onCleanupinside 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 ofcreateInfiniteScroll.
@solid-primitives/[email protected]
Patch Changes
-
6457c24: Fix
mutationObserver(options, callback)throwingPRIMITIVE_IN_EFFECT_CALLBACKwhen used as a JSXref(#1143).The observer was created inside the ref callback, where Solid 2 forbids
onSettled,onCleanupand other primitives. It is now created once whenmutationObserver(...)is evaluated (the component body) and the ref callback only callsobserve. It disconnects with the owner of that call, and one factory value can be used on several elements.createMutationObserver(and somutationObserver) 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]
Patch Changes
-
6457c24: Fix the README
createStreamandcreateScreenexamples, which created an effect inside a JSXrefcallback and threwPRIMITIVE_IN_EFFECT_CALLBACKin Solid 2 (#1143). They now keep the element in a signal viaref={setVideo}and assignsrcObjectfrom 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) andcreateScreennow starts from a click, sincegetDisplayMediarequires a user gesture. The same inaccurate<Loading>claim is removed from the JSDoc.