@wardic/solid 0.0.0-stage → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +26 -2
- package/THIRD_PARTY_NOTICES.md +145 -0
- package/dist/browser/animation-controls.js +150 -0
- package/dist/browser/animation-controls.js.map +1 -0
- package/dist/browser/animation-frame.js +29 -0
- package/dist/browser/animation-frame.js.map +1 -0
- package/dist/browser/appear.js +727 -0
- package/dist/browser/appear.js.map +1 -0
- package/dist/browser/arc.js +21 -0
- package/dist/browser/arc.js.map +1 -0
- package/dist/browser/bridge.js +69 -0
- package/dist/browser/bridge.js.map +1 -0
- package/dist/browser/complete.js +30 -0
- package/dist/browser/complete.js.map +1 -0
- package/dist/browser/config.js +2 -0
- package/dist/browser/config.js.map +1 -0
- package/dist/browser/create-animate.js +41 -0
- package/dist/browser/create-animate.js.map +1 -0
- package/dist/browser/create-ward.js +1001 -0
- package/dist/browser/create-ward.js.map +1 -0
- package/dist/browser/cycle-index.js +17 -0
- package/dist/browser/cycle-index.js.map +1 -0
- package/dist/browser/cycle.js +31 -0
- package/dist/browser/cycle.js.map +1 -0
- package/dist/browser/directive.js +80 -0
- package/dist/browser/directive.js.map +1 -0
- package/dist/browser/drag-constraints.js +76 -0
- package/dist/browser/drag-constraints.js.map +1 -0
- package/dist/browser/drag-controls.js +51 -0
- package/dist/browser/drag-controls.js.map +1 -0
- package/dist/browser/drag-samples.js +40 -0
- package/dist/browser/drag-samples.js.map +1 -0
- package/dist/browser/drag-sensor.js +35 -0
- package/dist/browser/drag-sensor.js.map +1 -0
- package/dist/browser/drag-track.js +817 -0
- package/dist/browser/drag-track.js.map +1 -0
- package/dist/browser/drag-transition.js +56 -0
- package/dist/browser/drag-transition.js.map +1 -0
- package/dist/browser/drag.js +44 -0
- package/dist/browser/drag.js.map +1 -0
- package/dist/browser/element-style.js +67 -0
- package/dist/browser/element-style.js.map +1 -0
- package/dist/browser/element.js +353 -0
- package/dist/browser/element.js.map +1 -0
- package/dist/browser/feature-section.js +17 -0
- package/dist/browser/feature-section.js.map +1 -0
- package/dist/browser/feature.js +261 -0
- package/dist/browser/feature.js.map +1 -0
- package/dist/browser/features/all.js +10 -0
- package/dist/browser/features/all.js.map +1 -0
- package/dist/browser/features/colors.js +33 -0
- package/dist/browser/features/colors.js.map +1 -0
- package/dist/browser/features/dom-animation.js +7 -0
- package/dist/browser/features/dom-animation.js.map +1 -0
- package/dist/browser/features/dom-max.js +4 -0
- package/dist/browser/features/dom-max.js.map +1 -0
- package/dist/browser/features/drag.js +28 -0
- package/dist/browser/features/drag.js.map +1 -0
- package/dist/browser/features/focus.js +18 -0
- package/dist/browser/features/focus.js.map +1 -0
- package/dist/browser/features/hover.js +18 -0
- package/dist/browser/features/hover.js.map +1 -0
- package/dist/browser/features/in-view.js +18 -0
- package/dist/browser/features/in-view.js.map +1 -0
- package/dist/browser/features/input.js +30 -0
- package/dist/browser/features/input.js.map +1 -0
- package/dist/browser/features/keys.js +19 -0
- package/dist/browser/features/keys.js.map +1 -0
- package/dist/browser/features/layout.js +33 -0
- package/dist/browser/features/layout.js.map +1 -0
- package/dist/browser/features/pan.js +18 -0
- package/dist/browser/features/pan.js.map +1 -0
- package/dist/browser/features/press.js +12 -0
- package/dist/browser/features/press.js.map +1 -0
- package/dist/browser/focus-sensor.js +23 -0
- package/dist/browser/focus-sensor.js.map +1 -0
- package/dist/browser/frame-time.js +40 -0
- package/dist/browser/frame-time.js.map +1 -0
- package/dist/browser/gesture-callbacks.js +172 -0
- package/dist/browser/gesture-callbacks.js.map +1 -0
- package/dist/browser/gesture-features.js +29 -0
- package/dist/browser/gesture-features.js.map +1 -0
- package/dist/browser/gesture-info.js +43 -0
- package/dist/browser/gesture-info.js.map +1 -0
- package/dist/browser/hover-sensor.js +29 -0
- package/dist/browser/hover-sensor.js.map +1 -0
- package/dist/browser/imperative.js +614 -0
- package/dist/browser/imperative.js.map +1 -0
- package/dist/browser/index.js +165 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/instant.js +51 -0
- package/dist/browser/instant.js.map +1 -0
- package/dist/browser/layout-group.js +27 -0
- package/dist/browser/layout-group.js.map +1 -0
- package/dist/browser/layout-member.js +362 -0
- package/dist/browser/layout-member.js.map +1 -0
- package/dist/browser/layout-projection.js +19 -0
- package/dist/browser/layout-projection.js.map +1 -0
- package/dist/browser/layout.js +91 -0
- package/dist/browser/layout.js.map +1 -0
- package/dist/browser/live-style.js +313 -0
- package/dist/browser/live-style.js.map +1 -0
- package/dist/browser/live-value.js +252 -0
- package/dist/browser/live-value.js.map +1 -0
- package/dist/browser/motion-props.js +172 -0
- package/dist/browser/motion-props.js.map +1 -0
- package/dist/browser/owner-scope.js +29 -0
- package/dist/browser/owner-scope.js.map +1 -0
- package/dist/browser/page-point.js +92 -0
- package/dist/browser/page-point.js.map +1 -0
- package/dist/browser/presence-controller.js +1324 -0
- package/dist/browser/presence-controller.js.map +1 -0
- package/dist/browser/presence-record.js +27 -0
- package/dist/browser/presence-record.js.map +1 -0
- package/dist/browser/presence.js +207 -0
- package/dist/browser/presence.js.map +1 -0
- package/dist/browser/press-sensor.js +30 -0
- package/dist/browser/press-sensor.js.map +1 -0
- package/dist/browser/press.js +24 -0
- package/dist/browser/press.js.map +1 -0
- package/dist/browser/provider.js +445 -0
- package/dist/browser/provider.js.map +1 -0
- package/dist/browser/reactivity.js +9 -0
- package/dist/browser/reactivity.js.map +1 -0
- package/dist/browser/reorder-input.js +46 -0
- package/dist/browser/reorder-input.js.map +1 -0
- package/dist/browser/reorder.js +543 -0
- package/dist/browser/reorder.js.map +1 -0
- package/dist/browser/retarget-legs.js +1019 -0
- package/dist/browser/retarget-legs.js.map +1 -0
- package/dist/browser/runtime.js +249 -0
- package/dist/browser/runtime.js.map +1 -0
- package/dist/browser/sensors.js +172 -0
- package/dist/browser/sensors.js.map +1 -0
- package/dist/browser/server-interpolators.js +20 -0
- package/dist/browser/server-interpolators.js.map +1 -0
- package/dist/browser/server.js +20 -0
- package/dist/browser/server.js.map +1 -0
- package/dist/browser/solid-reactivity.js +26 -0
- package/dist/browser/solid-reactivity.js.map +1 -0
- package/dist/browser/spine.js +2939 -0
- package/dist/browser/spine.js.map +1 -0
- package/dist/browser/stagger.js +13 -0
- package/dist/browser/stagger.js.map +1 -0
- package/dist/browser/unstable/v2/bridge.js +76 -0
- package/dist/browser/unstable/v2/bridge.js.map +1 -0
- package/dist/browser/unstable/v2/complete.js +29 -0
- package/dist/browser/unstable/v2/complete.js.map +1 -0
- package/dist/browser/unstable/v2/config-view.js +111 -0
- package/dist/browser/unstable/v2/config-view.js.map +1 -0
- package/dist/browser/unstable/v2/create-animate.js +102 -0
- package/dist/browser/unstable/v2/create-animate.js.map +1 -0
- package/dist/browser/unstable/v2/cycle.js +30 -0
- package/dist/browser/unstable/v2/cycle.js.map +1 -0
- package/dist/browser/unstable/v2/drag-sensor.js +34 -0
- package/dist/browser/unstable/v2/drag-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/element.js +393 -0
- package/dist/browser/unstable/v2/element.js.map +1 -0
- package/dist/browser/unstable/v2/feature-section.js +27 -0
- package/dist/browser/unstable/v2/feature-section.js.map +1 -0
- package/dist/browser/unstable/v2/focus-sensor.js +23 -0
- package/dist/browser/unstable/v2/focus-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/hover-sensor.js +28 -0
- package/dist/browser/unstable/v2/hover-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/index.js +114 -0
- package/dist/browser/unstable/v2/index.js.map +1 -0
- package/dist/browser/unstable/v2/layout-projection.js +18 -0
- package/dist/browser/unstable/v2/layout-projection.js.map +1 -0
- package/dist/browser/unstable/v2/layout.js +71 -0
- package/dist/browser/unstable/v2/layout.js.map +1 -0
- package/dist/browser/unstable/v2/lifecycle.js +455 -0
- package/dist/browser/unstable/v2/lifecycle.js.map +1 -0
- package/dist/browser/unstable/v2/live-value.js +264 -0
- package/dist/browser/unstable/v2/live-value.js.map +1 -0
- package/dist/browser/unstable/v2/presence-handle.js +146 -0
- package/dist/browser/unstable/v2/presence-handle.js.map +1 -0
- package/dist/browser/unstable/v2/presence-hooks.js +142 -0
- package/dist/browser/unstable/v2/presence-hooks.js.map +1 -0
- package/dist/browser/unstable/v2/presence.js +124 -0
- package/dist/browser/unstable/v2/presence.js.map +1 -0
- package/dist/browser/unstable/v2/press-sensor.js +29 -0
- package/dist/browser/unstable/v2/press-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/provider.js +457 -0
- package/dist/browser/unstable/v2/provider.js.map +1 -0
- package/dist/browser/unstable/v2/reorder.js +663 -0
- package/dist/browser/unstable/v2/reorder.js.map +1 -0
- package/dist/browser/unstable/v2/sensors.js +138 -0
- package/dist/browser/unstable/v2/sensors.js.map +1 -0
- package/dist/browser/unstable/v2/solid-reactivity.js +82 -0
- package/dist/browser/unstable/v2/solid-reactivity.js.map +1 -0
- package/dist/browser/unstable/v2/variant-node.js +395 -0
- package/dist/browser/unstable/v2/variant-node.js.map +1 -0
- package/dist/browser/unstable/v2/w.js +23 -0
- package/dist/browser/unstable/v2/w.js.map +1 -0
- package/dist/browser/unstable/v2/waiters.js +185 -0
- package/dist/browser/unstable/v2/waiters.js.map +1 -0
- package/dist/browser/unstable/v2/ward.js +1620 -0
- package/dist/browser/unstable/v2/ward.js.map +1 -0
- package/dist/browser/unstable/v2/wardic-config.js +40 -0
- package/dist/browser/unstable/v2/wardic-config.js.map +1 -0
- package/dist/browser/unstable/v2/wardic.js +16 -0
- package/dist/browser/unstable/v2/wardic.js.map +1 -0
- package/dist/browser/variant-node.js +308 -0
- package/dist/browser/variant-node.js.map +1 -0
- package/dist/browser/variant-target.js +224 -0
- package/dist/browser/variant-target.js.map +1 -0
- package/dist/browser/variant-tree.js +394 -0
- package/dist/browser/variant-tree.js.map +1 -0
- package/dist/browser/variants.js +43 -0
- package/dist/browser/variants.js.map +1 -0
- package/dist/browser/w.js +25 -0
- package/dist/browser/w.js.map +1 -0
- package/dist/browser/ward-keys.js +2 -0
- package/dist/browser/ward-keys.js.map +1 -0
- package/dist/browser/wardic-component.js +74 -0
- package/dist/browser/wardic-component.js.map +1 -0
- package/dist/browser/wardic-config-value.js +91 -0
- package/dist/browser/wardic-config-value.js.map +1 -0
- package/dist/browser/wardic-config.js +42 -0
- package/dist/browser/wardic-config.js.map +1 -0
- package/dist/browser/wardic.js +31 -0
- package/dist/browser/wardic.js.map +1 -0
- package/dist/server/animation-controls.js +150 -0
- package/dist/server/animation-controls.js.map +1 -0
- package/dist/server/animation-frame.js +29 -0
- package/dist/server/animation-frame.js.map +1 -0
- package/dist/server/appear.js +727 -0
- package/dist/server/appear.js.map +1 -0
- package/dist/server/arc.js +21 -0
- package/dist/server/arc.js.map +1 -0
- package/dist/server/bridge.js +69 -0
- package/dist/server/bridge.js.map +1 -0
- package/dist/server/complete.js +30 -0
- package/dist/server/complete.js.map +1 -0
- package/dist/server/config.js +2 -0
- package/dist/server/config.js.map +1 -0
- package/dist/server/create-animate.js +41 -0
- package/dist/server/create-animate.js.map +1 -0
- package/dist/server/create-ward.js +1001 -0
- package/dist/server/create-ward.js.map +1 -0
- package/dist/server/cycle-index.js +17 -0
- package/dist/server/cycle-index.js.map +1 -0
- package/dist/server/cycle.js +31 -0
- package/dist/server/cycle.js.map +1 -0
- package/dist/server/directive.js +80 -0
- package/dist/server/directive.js.map +1 -0
- package/dist/server/drag-constraints.js +76 -0
- package/dist/server/drag-constraints.js.map +1 -0
- package/dist/server/drag-controls.js +51 -0
- package/dist/server/drag-controls.js.map +1 -0
- package/dist/server/drag-samples.js +40 -0
- package/dist/server/drag-samples.js.map +1 -0
- package/dist/server/drag-sensor.js +35 -0
- package/dist/server/drag-sensor.js.map +1 -0
- package/dist/server/drag-track.js +817 -0
- package/dist/server/drag-track.js.map +1 -0
- package/dist/server/drag-transition.js +56 -0
- package/dist/server/drag-transition.js.map +1 -0
- package/dist/server/drag.js +44 -0
- package/dist/server/drag.js.map +1 -0
- package/dist/server/element-style.js +67 -0
- package/dist/server/element-style.js.map +1 -0
- package/dist/server/element.js +353 -0
- package/dist/server/element.js.map +1 -0
- package/dist/server/feature-section.js +17 -0
- package/dist/server/feature-section.js.map +1 -0
- package/dist/server/feature.js +261 -0
- package/dist/server/feature.js.map +1 -0
- package/dist/server/features/all.js +10 -0
- package/dist/server/features/all.js.map +1 -0
- package/dist/server/features/colors.js +33 -0
- package/dist/server/features/colors.js.map +1 -0
- package/dist/server/features/dom-animation.js +7 -0
- package/dist/server/features/dom-animation.js.map +1 -0
- package/dist/server/features/dom-max.js +4 -0
- package/dist/server/features/dom-max.js.map +1 -0
- package/dist/server/features/drag.js +28 -0
- package/dist/server/features/drag.js.map +1 -0
- package/dist/server/features/focus.js +18 -0
- package/dist/server/features/focus.js.map +1 -0
- package/dist/server/features/hover.js +18 -0
- package/dist/server/features/hover.js.map +1 -0
- package/dist/server/features/in-view.js +18 -0
- package/dist/server/features/in-view.js.map +1 -0
- package/dist/server/features/input.js +30 -0
- package/dist/server/features/input.js.map +1 -0
- package/dist/server/features/keys.js +19 -0
- package/dist/server/features/keys.js.map +1 -0
- package/dist/server/features/layout.js +33 -0
- package/dist/server/features/layout.js.map +1 -0
- package/dist/server/features/pan.js +18 -0
- package/dist/server/features/pan.js.map +1 -0
- package/dist/server/features/press.js +12 -0
- package/dist/server/features/press.js.map +1 -0
- package/dist/server/focus-sensor.js +23 -0
- package/dist/server/focus-sensor.js.map +1 -0
- package/dist/server/frame-time.js +40 -0
- package/dist/server/frame-time.js.map +1 -0
- package/dist/server/gesture-callbacks.js +172 -0
- package/dist/server/gesture-callbacks.js.map +1 -0
- package/dist/server/gesture-features.js +29 -0
- package/dist/server/gesture-features.js.map +1 -0
- package/dist/server/gesture-info.js +43 -0
- package/dist/server/gesture-info.js.map +1 -0
- package/dist/server/hover-sensor.js +29 -0
- package/dist/server/hover-sensor.js.map +1 -0
- package/dist/server/imperative.js +614 -0
- package/dist/server/imperative.js.map +1 -0
- package/dist/server/index.js +165 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/instant.js +51 -0
- package/dist/server/instant.js.map +1 -0
- package/dist/server/layout-group.js +27 -0
- package/dist/server/layout-group.js.map +1 -0
- package/dist/server/layout-member.js +362 -0
- package/dist/server/layout-member.js.map +1 -0
- package/dist/server/layout-projection.js +19 -0
- package/dist/server/layout-projection.js.map +1 -0
- package/dist/server/layout.js +90 -0
- package/dist/server/layout.js.map +1 -0
- package/dist/server/live-style.js +313 -0
- package/dist/server/live-style.js.map +1 -0
- package/dist/server/live-value.js +252 -0
- package/dist/server/live-value.js.map +1 -0
- package/dist/server/motion-props.js +172 -0
- package/dist/server/motion-props.js.map +1 -0
- package/dist/server/owner-scope.js +29 -0
- package/dist/server/owner-scope.js.map +1 -0
- package/dist/server/page-point.js +92 -0
- package/dist/server/page-point.js.map +1 -0
- package/dist/server/presence-controller.js +1324 -0
- package/dist/server/presence-controller.js.map +1 -0
- package/dist/server/presence-record.js +27 -0
- package/dist/server/presence-record.js.map +1 -0
- package/dist/server/presence.js +207 -0
- package/dist/server/presence.js.map +1 -0
- package/dist/server/press-sensor.js +30 -0
- package/dist/server/press-sensor.js.map +1 -0
- package/dist/server/press.js +24 -0
- package/dist/server/press.js.map +1 -0
- package/dist/server/provider.js +439 -0
- package/dist/server/provider.js.map +1 -0
- package/dist/server/reactivity.js +9 -0
- package/dist/server/reactivity.js.map +1 -0
- package/dist/server/reorder-input.js +46 -0
- package/dist/server/reorder-input.js.map +1 -0
- package/dist/server/reorder.js +543 -0
- package/dist/server/reorder.js.map +1 -0
- package/dist/server/retarget-legs.js +1019 -0
- package/dist/server/retarget-legs.js.map +1 -0
- package/dist/server/runtime.js +249 -0
- package/dist/server/runtime.js.map +1 -0
- package/dist/server/sensors.js +172 -0
- package/dist/server/sensors.js.map +1 -0
- package/dist/server/server-interpolators.js +20 -0
- package/dist/server/server-interpolators.js.map +1 -0
- package/dist/server/server.js +20 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/solid-reactivity.js +26 -0
- package/dist/server/solid-reactivity.js.map +1 -0
- package/dist/server/spine.js +2939 -0
- package/dist/server/spine.js.map +1 -0
- package/dist/server/stagger.js +13 -0
- package/dist/server/stagger.js.map +1 -0
- package/dist/server/unstable/v2/bridge.js +76 -0
- package/dist/server/unstable/v2/bridge.js.map +1 -0
- package/dist/server/unstable/v2/complete.js +29 -0
- package/dist/server/unstable/v2/complete.js.map +1 -0
- package/dist/server/unstable/v2/config-view.js +111 -0
- package/dist/server/unstable/v2/config-view.js.map +1 -0
- package/dist/server/unstable/v2/create-animate.js +102 -0
- package/dist/server/unstable/v2/create-animate.js.map +1 -0
- package/dist/server/unstable/v2/cycle.js +30 -0
- package/dist/server/unstable/v2/cycle.js.map +1 -0
- package/dist/server/unstable/v2/drag-sensor.js +34 -0
- package/dist/server/unstable/v2/drag-sensor.js.map +1 -0
- package/dist/server/unstable/v2/element.js +402 -0
- package/dist/server/unstable/v2/element.js.map +1 -0
- package/dist/server/unstable/v2/feature-section.js +27 -0
- package/dist/server/unstable/v2/feature-section.js.map +1 -0
- package/dist/server/unstable/v2/focus-sensor.js +23 -0
- package/dist/server/unstable/v2/focus-sensor.js.map +1 -0
- package/dist/server/unstable/v2/hover-sensor.js +28 -0
- package/dist/server/unstable/v2/hover-sensor.js.map +1 -0
- package/dist/server/unstable/v2/index.js +114 -0
- package/dist/server/unstable/v2/index.js.map +1 -0
- package/dist/server/unstable/v2/layout-projection.js +18 -0
- package/dist/server/unstable/v2/layout-projection.js.map +1 -0
- package/dist/server/unstable/v2/layout.js +88 -0
- package/dist/server/unstable/v2/layout.js.map +1 -0
- package/dist/server/unstable/v2/lifecycle.js +455 -0
- package/dist/server/unstable/v2/lifecycle.js.map +1 -0
- package/dist/server/unstable/v2/live-value.js +264 -0
- package/dist/server/unstable/v2/live-value.js.map +1 -0
- package/dist/server/unstable/v2/presence-handle.js +146 -0
- package/dist/server/unstable/v2/presence-handle.js.map +1 -0
- package/dist/server/unstable/v2/presence-hooks.js +142 -0
- package/dist/server/unstable/v2/presence-hooks.js.map +1 -0
- package/dist/server/unstable/v2/presence.js +142 -0
- package/dist/server/unstable/v2/presence.js.map +1 -0
- package/dist/server/unstable/v2/press-sensor.js +29 -0
- package/dist/server/unstable/v2/press-sensor.js.map +1 -0
- package/dist/server/unstable/v2/provider.js +475 -0
- package/dist/server/unstable/v2/provider.js.map +1 -0
- package/dist/server/unstable/v2/reorder.js +733 -0
- package/dist/server/unstable/v2/reorder.js.map +1 -0
- package/dist/server/unstable/v2/sensors.js +138 -0
- package/dist/server/unstable/v2/sensors.js.map +1 -0
- package/dist/server/unstable/v2/solid-reactivity.js +82 -0
- package/dist/server/unstable/v2/solid-reactivity.js.map +1 -0
- package/dist/server/unstable/v2/variant-node.js +395 -0
- package/dist/server/unstable/v2/variant-node.js.map +1 -0
- package/dist/server/unstable/v2/w.js +23 -0
- package/dist/server/unstable/v2/w.js.map +1 -0
- package/dist/server/unstable/v2/waiters.js +185 -0
- package/dist/server/unstable/v2/waiters.js.map +1 -0
- package/dist/server/unstable/v2/ward.js +1653 -0
- package/dist/server/unstable/v2/ward.js.map +1 -0
- package/dist/server/unstable/v2/wardic-config.js +49 -0
- package/dist/server/unstable/v2/wardic-config.js.map +1 -0
- package/dist/server/unstable/v2/wardic.js +16 -0
- package/dist/server/unstable/v2/wardic.js.map +1 -0
- package/dist/server/variant-node.js +308 -0
- package/dist/server/variant-node.js.map +1 -0
- package/dist/server/variant-target.js +224 -0
- package/dist/server/variant-target.js.map +1 -0
- package/dist/server/variant-tree.js +394 -0
- package/dist/server/variant-tree.js.map +1 -0
- package/dist/server/variants.js +43 -0
- package/dist/server/variants.js.map +1 -0
- package/dist/server/w.js +25 -0
- package/dist/server/w.js.map +1 -0
- package/dist/server/ward-keys.js +2 -0
- package/dist/server/ward-keys.js.map +1 -0
- package/dist/server/wardic-component.js +74 -0
- package/dist/server/wardic-component.js.map +1 -0
- package/dist/server/wardic-config-value.js +91 -0
- package/dist/server/wardic-config-value.js.map +1 -0
- package/dist/server/wardic-config.js +42 -0
- package/dist/server/wardic-config.js.map +1 -0
- package/dist/server/wardic.js +31 -0
- package/dist/server/wardic.js.map +1 -0
- package/dist/solid/animation-controls.d.ts +104 -0
- package/dist/solid/animation-controls.d.ts.map +1 -0
- package/dist/solid/animation-controls.js +129 -0
- package/dist/solid/animation-controls.js.map +1 -0
- package/dist/solid/animation-frame.d.ts +11 -0
- package/dist/solid/animation-frame.d.ts.map +1 -0
- package/dist/solid/animation-frame.js +31 -0
- package/dist/solid/animation-frame.js.map +1 -0
- package/dist/solid/appear.d.ts +205 -0
- package/dist/solid/appear.d.ts.map +1 -0
- package/dist/solid/appear.js +519 -0
- package/dist/solid/appear.js.map +1 -0
- package/dist/solid/arc.d.ts +25 -0
- package/dist/solid/arc.d.ts.map +1 -0
- package/dist/solid/arc.js +21 -0
- package/dist/solid/arc.js.map +1 -0
- package/dist/solid/bridge.d.ts +53 -0
- package/dist/solid/bridge.d.ts.map +1 -0
- package/dist/solid/bridge.js +66 -0
- package/dist/solid/bridge.js.map +1 -0
- package/dist/solid/complete.d.ts +31 -0
- package/dist/solid/complete.d.ts.map +1 -0
- package/dist/solid/complete.js +27 -0
- package/dist/solid/complete.js.map +1 -0
- package/dist/solid/config.d.ts +693 -0
- package/dist/solid/config.d.ts.map +1 -0
- package/dist/solid/config.js +2 -0
- package/dist/solid/config.js.map +1 -0
- package/dist/solid/create-animate.d.ts +17 -0
- package/dist/solid/create-animate.d.ts.map +1 -0
- package/dist/solid/create-animate.js +42 -0
- package/dist/solid/create-animate.js.map +1 -0
- package/dist/solid/create-ward.d.ts +278 -0
- package/dist/solid/create-ward.d.ts.map +1 -0
- package/dist/solid/create-ward.jsx +874 -0
- package/dist/solid/create-ward.jsx.map +1 -0
- package/dist/solid/cycle-index.d.ts +7 -0
- package/dist/solid/cycle-index.d.ts.map +1 -0
- package/dist/solid/cycle-index.js +17 -0
- package/dist/solid/cycle-index.js.map +1 -0
- package/dist/solid/cycle.d.ts +21 -0
- package/dist/solid/cycle.d.ts.map +1 -0
- package/dist/solid/cycle.js +31 -0
- package/dist/solid/cycle.js.map +1 -0
- package/dist/solid/directive.d.ts +21 -0
- package/dist/solid/directive.d.ts.map +1 -0
- package/dist/solid/directive.js +76 -0
- package/dist/solid/directive.js.map +1 -0
- package/dist/solid/drag-constraints.d.ts +46 -0
- package/dist/solid/drag-constraints.d.ts.map +1 -0
- package/dist/solid/drag-constraints.js +49 -0
- package/dist/solid/drag-constraints.js.map +1 -0
- package/dist/solid/drag-controls.d.ts +50 -0
- package/dist/solid/drag-controls.d.ts.map +1 -0
- package/dist/solid/drag-controls.js +51 -0
- package/dist/solid/drag-controls.js.map +1 -0
- package/dist/solid/drag-samples.d.ts +34 -0
- package/dist/solid/drag-samples.d.ts.map +1 -0
- package/dist/solid/drag-samples.js +28 -0
- package/dist/solid/drag-samples.js.map +1 -0
- package/dist/solid/drag-sensor.d.ts +23 -0
- package/dist/solid/drag-sensor.d.ts.map +1 -0
- package/dist/solid/drag-sensor.js +33 -0
- package/dist/solid/drag-sensor.js.map +1 -0
- package/dist/solid/drag-track.d.ts +227 -0
- package/dist/solid/drag-track.d.ts.map +1 -0
- package/dist/solid/drag-track.js +631 -0
- package/dist/solid/drag-track.js.map +1 -0
- package/dist/solid/drag-transition.d.ts +20 -0
- package/dist/solid/drag-transition.d.ts.map +1 -0
- package/dist/solid/drag-transition.js +31 -0
- package/dist/solid/drag-transition.js.map +1 -0
- package/dist/solid/drag.d.ts +23 -0
- package/dist/solid/drag.d.ts.map +1 -0
- package/dist/solid/drag.js +44 -0
- package/dist/solid/drag.js.map +1 -0
- package/dist/solid/element-style.d.ts +60 -0
- package/dist/solid/element-style.d.ts.map +1 -0
- package/dist/solid/element-style.js +50 -0
- package/dist/solid/element-style.js.map +1 -0
- package/dist/solid/element.d.ts +73 -0
- package/dist/solid/element.d.ts.map +1 -0
- package/dist/solid/element.jsx +326 -0
- package/dist/solid/element.jsx.map +1 -0
- package/dist/solid/feature-section.d.ts +18 -0
- package/dist/solid/feature-section.d.ts.map +1 -0
- package/dist/solid/feature-section.js +13 -0
- package/dist/solid/feature-section.js.map +1 -0
- package/dist/solid/feature.d.ts +114 -0
- package/dist/solid/feature.d.ts.map +1 -0
- package/dist/solid/feature.js +248 -0
- package/dist/solid/feature.js.map +1 -0
- package/dist/solid/features/all.d.ts +10 -0
- package/dist/solid/features/all.d.ts.map +1 -0
- package/dist/solid/features/all.js +10 -0
- package/dist/solid/features/all.js.map +1 -0
- package/dist/solid/features/colors.d.ts +12 -0
- package/dist/solid/features/colors.d.ts.map +1 -0
- package/dist/solid/features/colors.js +34 -0
- package/dist/solid/features/colors.js.map +1 -0
- package/dist/solid/features/dom-animation.d.ts +11 -0
- package/dist/solid/features/dom-animation.d.ts.map +1 -0
- package/dist/solid/features/dom-animation.js +7 -0
- package/dist/solid/features/dom-animation.js.map +1 -0
- package/dist/solid/features/dom-max.d.ts +10 -0
- package/dist/solid/features/dom-max.d.ts.map +1 -0
- package/dist/solid/features/dom-max.js +4 -0
- package/dist/solid/features/dom-max.js.map +1 -0
- package/dist/solid/features/drag.d.ts +5 -0
- package/dist/solid/features/drag.d.ts.map +1 -0
- package/dist/solid/features/drag.js +28 -0
- package/dist/solid/features/drag.js.map +1 -0
- package/dist/solid/features/focus.d.ts +5 -0
- package/dist/solid/features/focus.d.ts.map +1 -0
- package/dist/solid/features/focus.js +16 -0
- package/dist/solid/features/focus.js.map +1 -0
- package/dist/solid/features/hover.d.ts +5 -0
- package/dist/solid/features/hover.d.ts.map +1 -0
- package/dist/solid/features/hover.js +16 -0
- package/dist/solid/features/hover.js.map +1 -0
- package/dist/solid/features/in-view.d.ts +5 -0
- package/dist/solid/features/in-view.d.ts.map +1 -0
- package/dist/solid/features/in-view.js +16 -0
- package/dist/solid/features/in-view.js.map +1 -0
- package/dist/solid/features/input.d.ts +26 -0
- package/dist/solid/features/input.d.ts.map +1 -0
- package/dist/solid/features/input.js +31 -0
- package/dist/solid/features/input.js.map +1 -0
- package/dist/solid/features/keys.d.ts +70 -0
- package/dist/solid/features/keys.d.ts.map +1 -0
- package/dist/solid/features/keys.js +26 -0
- package/dist/solid/features/keys.js.map +1 -0
- package/dist/solid/features/layout.d.ts +32 -0
- package/dist/solid/features/layout.d.ts.map +1 -0
- package/dist/solid/features/layout.js +34 -0
- package/dist/solid/features/layout.js.map +1 -0
- package/dist/solid/features/pan.d.ts +5 -0
- package/dist/solid/features/pan.d.ts.map +1 -0
- package/dist/solid/features/pan.js +16 -0
- package/dist/solid/features/pan.js.map +1 -0
- package/dist/solid/features/press.d.ts +11 -0
- package/dist/solid/features/press.d.ts.map +1 -0
- package/dist/solid/features/press.js +10 -0
- package/dist/solid/features/press.js.map +1 -0
- package/dist/solid/focus-sensor.d.ts +19 -0
- package/dist/solid/focus-sensor.d.ts.map +1 -0
- package/dist/solid/focus-sensor.js +23 -0
- package/dist/solid/focus-sensor.js.map +1 -0
- package/dist/solid/frame-time.d.ts +21 -0
- package/dist/solid/frame-time.d.ts.map +1 -0
- package/dist/solid/frame-time.js +41 -0
- package/dist/solid/frame-time.js.map +1 -0
- package/dist/solid/gesture-callbacks.d.ts +53 -0
- package/dist/solid/gesture-callbacks.d.ts.map +1 -0
- package/dist/solid/gesture-callbacks.js +184 -0
- package/dist/solid/gesture-callbacks.js.map +1 -0
- package/dist/solid/gesture-features.d.ts +28 -0
- package/dist/solid/gesture-features.d.ts.map +1 -0
- package/dist/solid/gesture-features.js +29 -0
- package/dist/solid/gesture-features.js.map +1 -0
- package/dist/solid/gesture-info.d.ts +59 -0
- package/dist/solid/gesture-info.d.ts.map +1 -0
- package/dist/solid/gesture-info.js +23 -0
- package/dist/solid/gesture-info.js.map +1 -0
- package/dist/solid/hover-sensor.d.ts +19 -0
- package/dist/solid/hover-sensor.d.ts.map +1 -0
- package/dist/solid/hover-sensor.js +23 -0
- package/dist/solid/hover-sensor.js.map +1 -0
- package/dist/solid/imperative.d.ts +195 -0
- package/dist/solid/imperative.d.ts.map +1 -0
- package/dist/solid/imperative.js +536 -0
- package/dist/solid/imperative.js.map +1 -0
- package/dist/solid/index.d.ts +180 -0
- package/dist/solid/index.d.ts.map +1 -0
- package/dist/solid/index.js +165 -0
- package/dist/solid/index.js.map +1 -0
- package/dist/solid/instant.d.ts +44 -0
- package/dist/solid/instant.d.ts.map +1 -0
- package/dist/solid/instant.js +49 -0
- package/dist/solid/instant.js.map +1 -0
- package/dist/solid/layout-group.d.ts +14 -0
- package/dist/solid/layout-group.d.ts.map +1 -0
- package/dist/solid/layout-group.js +27 -0
- package/dist/solid/layout-group.js.map +1 -0
- package/dist/solid/layout-member.d.ts +117 -0
- package/dist/solid/layout-member.d.ts.map +1 -0
- package/dist/solid/layout-member.js +164 -0
- package/dist/solid/layout-member.js.map +1 -0
- package/dist/solid/layout-projection.d.ts +22 -0
- package/dist/solid/layout-projection.d.ts.map +1 -0
- package/dist/solid/layout-projection.js +19 -0
- package/dist/solid/layout-projection.js.map +1 -0
- package/dist/solid/layout.d.ts +76 -0
- package/dist/solid/layout.d.ts.map +1 -0
- package/dist/solid/layout.jsx +80 -0
- package/dist/solid/layout.jsx.map +1 -0
- package/dist/solid/live-style.d.ts +147 -0
- package/dist/solid/live-style.d.ts.map +1 -0
- package/dist/solid/live-style.js +304 -0
- package/dist/solid/live-style.js.map +1 -0
- package/dist/solid/live-value.d.ts +144 -0
- package/dist/solid/live-value.d.ts.map +1 -0
- package/dist/solid/live-value.js +223 -0
- package/dist/solid/live-value.js.map +1 -0
- package/dist/solid/motion-props.d.ts +75 -0
- package/dist/solid/motion-props.d.ts.map +1 -0
- package/dist/solid/motion-props.js +314 -0
- package/dist/solid/motion-props.js.map +1 -0
- package/dist/solid/owner-scope.d.ts +16 -0
- package/dist/solid/owner-scope.d.ts.map +1 -0
- package/dist/solid/owner-scope.js +31 -0
- package/dist/solid/owner-scope.js.map +1 -0
- package/dist/solid/page-point.d.ts +35 -0
- package/dist/solid/page-point.d.ts.map +1 -0
- package/dist/solid/page-point.js +87 -0
- package/dist/solid/page-point.js.map +1 -0
- package/dist/solid/presence-controller.d.ts +122 -0
- package/dist/solid/presence-controller.d.ts.map +1 -0
- package/dist/solid/presence-controller.js +1207 -0
- package/dist/solid/presence-controller.js.map +1 -0
- package/dist/solid/presence-record.d.ts +167 -0
- package/dist/solid/presence-record.d.ts.map +1 -0
- package/dist/solid/presence-record.js +26 -0
- package/dist/solid/presence-record.js.map +1 -0
- package/dist/solid/presence.d.ts +95 -0
- package/dist/solid/presence.d.ts.map +1 -0
- package/dist/solid/presence.jsx +195 -0
- package/dist/solid/presence.jsx.map +1 -0
- package/dist/solid/press-sensor.d.ts +20 -0
- package/dist/solid/press-sensor.d.ts.map +1 -0
- package/dist/solid/press-sensor.js +24 -0
- package/dist/solid/press-sensor.js.map +1 -0
- package/dist/solid/press.d.ts +24 -0
- package/dist/solid/press.d.ts.map +1 -0
- package/dist/solid/press.js +19 -0
- package/dist/solid/press.js.map +1 -0
- package/dist/solid/provider.d.ts +263 -0
- package/dist/solid/provider.d.ts.map +1 -0
- package/dist/solid/provider.jsx +411 -0
- package/dist/solid/provider.jsx.map +1 -0
- package/dist/solid/reactivity.d.ts +27 -0
- package/dist/solid/reactivity.d.ts.map +1 -0
- package/dist/solid/reactivity.js +9 -0
- package/dist/solid/reactivity.js.map +1 -0
- package/dist/solid/reorder-input.d.ts +22 -0
- package/dist/solid/reorder-input.d.ts.map +1 -0
- package/dist/solid/reorder-input.js +45 -0
- package/dist/solid/reorder-input.js.map +1 -0
- package/dist/solid/reorder.d.ts +241 -0
- package/dist/solid/reorder.d.ts.map +1 -0
- package/dist/solid/reorder.jsx +427 -0
- package/dist/solid/reorder.jsx.map +1 -0
- package/dist/solid/retarget-legs.d.ts +189 -0
- package/dist/solid/retarget-legs.d.ts.map +1 -0
- package/dist/solid/retarget-legs.js +825 -0
- package/dist/solid/retarget-legs.js.map +1 -0
- package/dist/solid/runtime.d.ts +179 -0
- package/dist/solid/runtime.d.ts.map +1 -0
- package/dist/solid/runtime.js +237 -0
- package/dist/solid/runtime.js.map +1 -0
- package/dist/solid/sensors.d.ts +95 -0
- package/dist/solid/sensors.d.ts.map +1 -0
- package/dist/solid/sensors.js +154 -0
- package/dist/solid/sensors.js.map +1 -0
- package/dist/solid/server-interpolators.d.ts +13 -0
- package/dist/solid/server-interpolators.d.ts.map +1 -0
- package/dist/solid/server-interpolators.js +20 -0
- package/dist/solid/server-interpolators.js.map +1 -0
- package/dist/solid/server.d.ts +9 -0
- package/dist/solid/server.d.ts.map +1 -0
- package/dist/solid/server.js +20 -0
- package/dist/solid/server.js.map +1 -0
- package/dist/solid/solid-reactivity.d.ts +3 -0
- package/dist/solid/solid-reactivity.d.ts.map +1 -0
- package/dist/solid/solid-reactivity.js +19 -0
- package/dist/solid/solid-reactivity.js.map +1 -0
- package/dist/solid/spine.d.ts +597 -0
- package/dist/solid/spine.d.ts.map +1 -0
- package/dist/solid/spine.js +2761 -0
- package/dist/solid/spine.js.map +1 -0
- package/dist/solid/stagger.d.ts +29 -0
- package/dist/solid/stagger.d.ts.map +1 -0
- package/dist/solid/stagger.js +13 -0
- package/dist/solid/stagger.js.map +1 -0
- package/dist/solid/unstable/v2/bridge.d.ts +33 -0
- package/dist/solid/unstable/v2/bridge.d.ts.map +1 -0
- package/dist/solid/unstable/v2/bridge.js +76 -0
- package/dist/solid/unstable/v2/bridge.js.map +1 -0
- package/dist/solid/unstable/v2/complete.d.ts +21 -0
- package/dist/solid/unstable/v2/complete.d.ts.map +1 -0
- package/dist/solid/unstable/v2/complete.js +27 -0
- package/dist/solid/unstable/v2/complete.js.map +1 -0
- package/dist/solid/unstable/v2/config-view.d.ts +49 -0
- package/dist/solid/unstable/v2/config-view.d.ts.map +1 -0
- package/dist/solid/unstable/v2/config-view.js +114 -0
- package/dist/solid/unstable/v2/config-view.js.map +1 -0
- package/dist/solid/unstable/v2/create-animate.d.ts +31 -0
- package/dist/solid/unstable/v2/create-animate.d.ts.map +1 -0
- package/dist/solid/unstable/v2/create-animate.js +102 -0
- package/dist/solid/unstable/v2/create-animate.js.map +1 -0
- package/dist/solid/unstable/v2/cycle.d.ts +20 -0
- package/dist/solid/unstable/v2/cycle.d.ts.map +1 -0
- package/dist/solid/unstable/v2/cycle.js +30 -0
- package/dist/solid/unstable/v2/cycle.js.map +1 -0
- package/dist/solid/unstable/v2/drag-sensor.d.ts +23 -0
- package/dist/solid/unstable/v2/drag-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/drag-sensor.js +32 -0
- package/dist/solid/unstable/v2/drag-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/element.d.ts +178 -0
- package/dist/solid/unstable/v2/element.d.ts.map +1 -0
- package/dist/solid/unstable/v2/element.jsx +325 -0
- package/dist/solid/unstable/v2/element.jsx.map +1 -0
- package/dist/solid/unstable/v2/feature-section.d.ts +12 -0
- package/dist/solid/unstable/v2/feature-section.d.ts.map +1 -0
- package/dist/solid/unstable/v2/feature-section.js +23 -0
- package/dist/solid/unstable/v2/feature-section.js.map +1 -0
- package/dist/solid/unstable/v2/focus-sensor.d.ts +13 -0
- package/dist/solid/unstable/v2/focus-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/focus-sensor.js +23 -0
- package/dist/solid/unstable/v2/focus-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/hover-sensor.d.ts +12 -0
- package/dist/solid/unstable/v2/hover-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/hover-sensor.js +22 -0
- package/dist/solid/unstable/v2/hover-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/index.d.ts +131 -0
- package/dist/solid/unstable/v2/index.d.ts.map +1 -0
- package/dist/solid/unstable/v2/index.js +114 -0
- package/dist/solid/unstable/v2/index.js.map +1 -0
- package/dist/solid/unstable/v2/layout-projection.d.ts +21 -0
- package/dist/solid/unstable/v2/layout-projection.d.ts.map +1 -0
- package/dist/solid/unstable/v2/layout-projection.js +18 -0
- package/dist/solid/unstable/v2/layout-projection.js.map +1 -0
- package/dist/solid/unstable/v2/layout.d.ts +47 -0
- package/dist/solid/unstable/v2/layout.d.ts.map +1 -0
- package/dist/solid/unstable/v2/layout.jsx +62 -0
- package/dist/solid/unstable/v2/layout.jsx.map +1 -0
- package/dist/solid/unstable/v2/lifecycle.d.ts +267 -0
- package/dist/solid/unstable/v2/lifecycle.d.ts.map +1 -0
- package/dist/solid/unstable/v2/lifecycle.js +457 -0
- package/dist/solid/unstable/v2/lifecycle.js.map +1 -0
- package/dist/solid/unstable/v2/live-value.d.ts +146 -0
- package/dist/solid/unstable/v2/live-value.d.ts.map +1 -0
- package/dist/solid/unstable/v2/live-value.js +235 -0
- package/dist/solid/unstable/v2/live-value.js.map +1 -0
- package/dist/solid/unstable/v2/presence-handle.d.ts +55 -0
- package/dist/solid/unstable/v2/presence-handle.d.ts.map +1 -0
- package/dist/solid/unstable/v2/presence-handle.js +119 -0
- package/dist/solid/unstable/v2/presence-handle.js.map +1 -0
- package/dist/solid/unstable/v2/presence-hooks.d.ts +51 -0
- package/dist/solid/unstable/v2/presence-hooks.d.ts.map +1 -0
- package/dist/solid/unstable/v2/presence-hooks.js +115 -0
- package/dist/solid/unstable/v2/presence-hooks.js.map +1 -0
- package/dist/solid/unstable/v2/presence.d.ts +89 -0
- package/dist/solid/unstable/v2/presence.d.ts.map +1 -0
- package/dist/solid/unstable/v2/presence.jsx +107 -0
- package/dist/solid/unstable/v2/presence.jsx.map +1 -0
- package/dist/solid/unstable/v2/press-sensor.d.ts +13 -0
- package/dist/solid/unstable/v2/press-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/press-sensor.js +23 -0
- package/dist/solid/unstable/v2/press-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/provider.d.ts +239 -0
- package/dist/solid/unstable/v2/provider.d.ts.map +1 -0
- package/dist/solid/unstable/v2/provider.jsx +423 -0
- package/dist/solid/unstable/v2/provider.jsx.map +1 -0
- package/dist/solid/unstable/v2/reorder.d.ts +292 -0
- package/dist/solid/unstable/v2/reorder.d.ts.map +1 -0
- package/dist/solid/unstable/v2/reorder.jsx +525 -0
- package/dist/solid/unstable/v2/reorder.jsx.map +1 -0
- package/dist/solid/unstable/v2/sensors.d.ts +91 -0
- package/dist/solid/unstable/v2/sensors.d.ts.map +1 -0
- package/dist/solid/unstable/v2/sensors.js +124 -0
- package/dist/solid/unstable/v2/sensors.js.map +1 -0
- package/dist/solid/unstable/v2/solid-reactivity.d.ts +61 -0
- package/dist/solid/unstable/v2/solid-reactivity.d.ts.map +1 -0
- package/dist/solid/unstable/v2/solid-reactivity.js +62 -0
- package/dist/solid/unstable/v2/solid-reactivity.js.map +1 -0
- package/dist/solid/unstable/v2/variant-node.d.ts +51 -0
- package/dist/solid/unstable/v2/variant-node.d.ts.map +1 -0
- package/dist/solid/unstable/v2/variant-node.js +336 -0
- package/dist/solid/unstable/v2/variant-node.js.map +1 -0
- package/dist/solid/unstable/v2/w.d.ts +42 -0
- package/dist/solid/unstable/v2/w.d.ts.map +1 -0
- package/dist/solid/unstable/v2/w.jsx +22 -0
- package/dist/solid/unstable/v2/w.jsx.map +1 -0
- package/dist/solid/unstable/v2/waiters.d.ts +72 -0
- package/dist/solid/unstable/v2/waiters.d.ts.map +1 -0
- package/dist/solid/unstable/v2/waiters.js +175 -0
- package/dist/solid/unstable/v2/waiters.js.map +1 -0
- package/dist/solid/unstable/v2/ward.d.ts +393 -0
- package/dist/solid/unstable/v2/ward.d.ts.map +1 -0
- package/dist/solid/unstable/v2/ward.jsx +1475 -0
- package/dist/solid/unstable/v2/ward.jsx.map +1 -0
- package/dist/solid/unstable/v2/wardic-config.d.ts +68 -0
- package/dist/solid/unstable/v2/wardic-config.d.ts.map +1 -0
- package/dist/solid/unstable/v2/wardic-config.jsx +28 -0
- package/dist/solid/unstable/v2/wardic-config.jsx.map +1 -0
- package/dist/solid/unstable/v2/wardic.d.ts +28 -0
- package/dist/solid/unstable/v2/wardic.d.ts.map +1 -0
- package/dist/solid/unstable/v2/wardic.jsx +16 -0
- package/dist/solid/unstable/v2/wardic.jsx.map +1 -0
- package/dist/solid/variant-node.d.ts +32 -0
- package/dist/solid/variant-node.d.ts.map +1 -0
- package/dist/solid/variant-node.js +257 -0
- package/dist/solid/variant-node.js.map +1 -0
- package/dist/solid/variant-target.d.ts +102 -0
- package/dist/solid/variant-target.d.ts.map +1 -0
- package/dist/solid/variant-target.js +180 -0
- package/dist/solid/variant-target.js.map +1 -0
- package/dist/solid/variant-tree.d.ts +349 -0
- package/dist/solid/variant-tree.d.ts.map +1 -0
- package/dist/solid/variant-tree.js +358 -0
- package/dist/solid/variant-tree.js.map +1 -0
- package/dist/solid/variants.d.ts +21 -0
- package/dist/solid/variants.d.ts.map +1 -0
- package/dist/solid/variants.js +43 -0
- package/dist/solid/variants.js.map +1 -0
- package/dist/solid/w.d.ts +42 -0
- package/dist/solid/w.d.ts.map +1 -0
- package/dist/solid/w.jsx +23 -0
- package/dist/solid/w.jsx.map +1 -0
- package/dist/solid/ward-keys.d.ts +236 -0
- package/dist/solid/ward-keys.d.ts.map +1 -0
- package/dist/solid/ward-keys.js +2 -0
- package/dist/solid/ward-keys.js.map +1 -0
- package/dist/solid/wardic-component.d.ts +50 -0
- package/dist/solid/wardic-component.d.ts.map +1 -0
- package/dist/solid/wardic-component.js +74 -0
- package/dist/solid/wardic-component.js.map +1 -0
- package/dist/solid/wardic-config-value.d.ts +87 -0
- package/dist/solid/wardic-config-value.d.ts.map +1 -0
- package/dist/solid/wardic-config-value.js +106 -0
- package/dist/solid/wardic-config-value.js.map +1 -0
- package/dist/solid/wardic-config.d.ts +69 -0
- package/dist/solid/wardic-config.d.ts.map +1 -0
- package/dist/solid/wardic-config.jsx +30 -0
- package/dist/solid/wardic-config.jsx.map +1 -0
- package/dist/solid/wardic.d.ts +45 -0
- package/dist/solid/wardic.d.ts.map +1 -0
- package/dist/solid/wardic.jsx +31 -0
- package/dist/solid/wardic.jsx.map +1 -0
- package/package.json +98 -4
- package/src/animation-controls.ts +204 -0
- package/src/animation-frame.ts +32 -0
- package/src/appear.ts +804 -0
- package/src/arc.ts +34 -0
- package/src/bridge.ts +98 -0
- package/src/complete.ts +45 -0
- package/src/config.ts +805 -0
- package/src/create-animate.ts +41 -0
- package/src/create-ward.tsx +1271 -0
- package/src/cycle-index.ts +18 -0
- package/src/cycle.ts +34 -0
- package/src/directive.ts +87 -0
- package/src/drag-constraints.ts +103 -0
- package/src/drag-controls.ts +94 -0
- package/src/drag-samples.ts +54 -0
- package/src/drag-sensor.ts +46 -0
- package/src/drag-track.ts +937 -0
- package/src/drag-transition.ts +43 -0
- package/src/drag.ts +58 -0
- package/src/element-style.ts +112 -0
- package/src/element.tsx +400 -0
- package/src/feature-section.ts +33 -0
- package/src/feature.ts +342 -0
- package/src/features/all.ts +18 -0
- package/src/features/colors.ts +36 -0
- package/src/features/dom-animation.ts +15 -0
- package/src/features/dom-max.ts +11 -0
- package/src/features/drag.ts +30 -0
- package/src/features/focus.ts +17 -0
- package/src/features/hover.ts +17 -0
- package/src/features/in-view.ts +17 -0
- package/src/features/input.ts +42 -0
- package/src/features/keys.ts +89 -0
- package/src/features/layout.ts +54 -0
- package/src/features/pan.ts +17 -0
- package/src/features/press.ts +17 -0
- package/src/focus-sensor.ts +32 -0
- package/src/frame-time.ts +45 -0
- package/src/gesture-callbacks.ts +212 -0
- package/src/gesture-features.ts +35 -0
- package/src/gesture-info.ts +81 -0
- package/src/hover-sensor.ts +32 -0
- package/src/imperative.ts +782 -0
- package/src/index.ts +334 -0
- package/src/instant.ts +90 -0
- package/src/layout-group.ts +32 -0
- package/src/layout-member.ts +300 -0
- package/src/layout-projection.ts +28 -0
- package/src/layout.tsx +127 -0
- package/src/live-style.ts +449 -0
- package/src/live-value.ts +378 -0
- package/src/motion-props.ts +325 -0
- package/src/owner-scope.ts +31 -0
- package/src/page-point.ts +98 -0
- package/src/presence-controller.ts +1483 -0
- package/src/presence-record.ts +189 -0
- package/src/presence.tsx +269 -0
- package/src/press-sensor.ts +33 -0
- package/src/press.ts +40 -0
- package/src/provider.tsx +526 -0
- package/src/reactivity.ts +29 -0
- package/src/reorder-input.ts +53 -0
- package/src/reorder.tsx +703 -0
- package/src/retarget-legs.ts +1048 -0
- package/src/runtime.ts +388 -0
- package/src/sensors.ts +189 -0
- package/src/server-interpolators.ts +33 -0
- package/src/server.ts +21 -0
- package/src/solid-reactivity.ts +21 -0
- package/src/spine.ts +3385 -0
- package/src/stagger.ts +31 -0
- package/src/unstable/v2/bridge.ts +79 -0
- package/src/unstable/v2/complete.ts +47 -0
- package/src/unstable/v2/config-view.ts +156 -0
- package/src/unstable/v2/create-animate.ts +123 -0
- package/src/unstable/v2/cycle.ts +33 -0
- package/src/unstable/v2/drag-sensor.ts +44 -0
- package/src/unstable/v2/element.tsx +478 -0
- package/src/unstable/v2/feature-section.ts +32 -0
- package/src/unstable/v2/focus-sensor.ts +31 -0
- package/src/unstable/v2/hover-sensor.ts +30 -0
- package/src/unstable/v2/index.ts +270 -0
- package/src/unstable/v2/layout-projection.ts +27 -0
- package/src/unstable/v2/layout.tsx +89 -0
- package/src/unstable/v2/lifecycle.ts +612 -0
- package/src/unstable/v2/live-value.ts +414 -0
- package/src/unstable/v2/presence-handle.ts +159 -0
- package/src/unstable/v2/presence-hooks.ts +157 -0
- package/src/unstable/v2/presence.tsx +174 -0
- package/src/unstable/v2/press-sensor.ts +31 -0
- package/src/unstable/v2/provider.tsx +524 -0
- package/src/unstable/v2/reorder.tsx +880 -0
- package/src/unstable/v2/sensors.ts +169 -0
- package/src/unstable/v2/solid-reactivity.ts +69 -0
- package/src/unstable/v2/variant-node.ts +446 -0
- package/src/unstable/v2/w.tsx +49 -0
- package/src/unstable/v2/waiters.ts +212 -0
- package/src/unstable/v2/ward.tsx +2068 -0
- package/src/unstable/v2/wardic-config.tsx +84 -0
- package/src/unstable/v2/wardic.tsx +41 -0
- package/src/variant-node.ts +368 -0
- package/src/variant-target.ts +234 -0
- package/src/variant-tree.ts +638 -0
- package/src/variants.ts +47 -0
- package/src/w.tsx +59 -0
- package/src/ward-keys.ts +343 -0
- package/src/wardic-component.ts +96 -0
- package/src/wardic-config-value.ts +150 -0
- package/src/wardic-config.tsx +78 -0
- package/src/wardic.tsx +59 -0
package/src/runtime.ts
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a `WardicProvider` holds, for the Solid 1 binding and the Solid 2 one
|
|
3
|
+
* (`@wardic/solid/unstable/v2`, #209) alike: the Environment's types, the runtime and the services
|
|
4
|
+
* built over it on first need, and what a server render holds instead. Solid-free: each binding's
|
|
5
|
+
* provider is a thin shell over it, so the two can't drift.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import type * as Announcer from "@wardic/core/Announcer"
|
|
10
|
+
import type * as Clock from "@wardic/core/Clock"
|
|
11
|
+
import * as DefaultTransition from "@wardic/core/DefaultTransition"
|
|
12
|
+
import type * as FrameLoop from "@wardic/core/FrameLoop"
|
|
13
|
+
import * as InterpolatorRegistry from "@wardic/core/InterpolatorRegistry"
|
|
14
|
+
import * as Probe from "@wardic/core/Probe"
|
|
15
|
+
import * as ReducedMotion from "@wardic/core/ReducedMotion"
|
|
16
|
+
import * as RefreshFrameSource from "@wardic/core/RefreshFrameSource"
|
|
17
|
+
import * as Renderer from "@wardic/core/Renderer"
|
|
18
|
+
import * as FlushGate from "@wardic/dom/FlushGate"
|
|
19
|
+
import * as ProjectionSystem from "@wardic/dom/ProjectionSystem"
|
|
20
|
+
import * as Report from "@wardic/dom/Report"
|
|
21
|
+
import * as Arr from "effect/Array"
|
|
22
|
+
import * as Context from "effect/Context"
|
|
23
|
+
import * as Effect from "effect/Effect"
|
|
24
|
+
import { constVoid } from "effect/Function"
|
|
25
|
+
import type * as Fiber from "effect/Fiber"
|
|
26
|
+
import * as Layer from "effect/Layer"
|
|
27
|
+
import * as ManagedRuntime from "effect/ManagedRuntime"
|
|
28
|
+
import * as Option from "effect/Option"
|
|
29
|
+
import * as Predicate from "effect/Predicate"
|
|
30
|
+
import { AtomRegistry } from "effect/reactivity"
|
|
31
|
+
import * as UndefinedOr from "effect/UndefinedOr"
|
|
32
|
+
import type { ServerAppear } from "./appear.ts"
|
|
33
|
+
import { clientRegistry, type FeatureRegistry, type FeatureSection, serverRegistry } from "./feature.ts"
|
|
34
|
+
import { type InstantAnimations, makeInstantAnimations, NO_INSTANT } from "./instant.ts"
|
|
35
|
+
import { settingOf as configSettingOf, type WardicConfigValue } from "./wardic-config-value.ts"
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The full Wardic environment a `WardicProvider` requires: core's service contracts but the
|
|
39
|
+
* `InputSource`, the `RefreshFrameSource` the Clock ticks on and the flush gate requests its
|
|
40
|
+
* flushes from, core's Frame loop over the Clock (`FrameLoop.layer`, which runs every
|
|
41
|
+
* animation the binding starts), and the `AtomRegistry` that backs reactive service
|
|
42
|
+
* inputs. Satisfied by `@wardic/dom`'s `DomLive` (real browser) or `@wardic/test`'s
|
|
43
|
+
* `TestLive` (headless). `ER` and `R` are `never`: a fully self-contained Layer. The `InputSource` is
|
|
44
|
+
* the gesture Features': built with the first one, over the page, unless
|
|
45
|
+
* the Environment gives one, as `TestLive` does, which they take.
|
|
46
|
+
*/
|
|
47
|
+
export type WardicEnv = Layer.Layer<WardicServices, never, never>
|
|
48
|
+
|
|
49
|
+
/** The services a `WardicProvider`'s runtime gives the code run on it: Wardic's Environment, as a union of Effect services. */
|
|
50
|
+
export type WardicServices =
|
|
51
|
+
| Clock.Clock
|
|
52
|
+
| RefreshFrameSource.RefreshFrameSource
|
|
53
|
+
| FrameLoop.FrameLoop
|
|
54
|
+
| Renderer.Renderer
|
|
55
|
+
| Probe.Probe
|
|
56
|
+
| InterpolatorRegistry.InterpolatorRegistry
|
|
57
|
+
| ReducedMotion.PositionalKeys
|
|
58
|
+
| DefaultTransition.DefaultTransition
|
|
59
|
+
| Announcer.Announcer
|
|
60
|
+
| AtomRegistry.AtomRegistry
|
|
61
|
+
|
|
62
|
+
/** A `WardicProvider`'s Effect runtime: a `ManagedRuntime` of its {@link WardicServices}. */
|
|
63
|
+
export type WardicRuntime = ManagedRuntime.ManagedRuntime<WardicServices, never>
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* What a client provider hands its projection system (#511): whether reduced motion applies now
|
|
67
|
+
* (ADR-0029), and the app's scale correctors (#443). The `layout` Feature's Layer reads it from the
|
|
68
|
+
* provider's runtime, as the projection system is no longer built with it.
|
|
69
|
+
*/
|
|
70
|
+
export class ProjectionOptions extends /*#__PURE__*/ Context.Service<ProjectionOptions, ProjectionSystem.Options>()("@wardic/solid/ProjectionOptions") {}
|
|
71
|
+
|
|
72
|
+
/** What a provider's runtime holds: its Environment, and its flush gate and projection options over it. */
|
|
73
|
+
export type ProviderServices = WardicServices | FlushGate.FlushGate | ProjectionOptions
|
|
74
|
+
|
|
75
|
+
/** A provider's runtime, as its Features build on it. */
|
|
76
|
+
export type ProviderRuntime = ManagedRuntime.ManagedRuntime<ProviderServices, never>
|
|
77
|
+
|
|
78
|
+
/** A server render's Positional keys: it builds no runtime, and reduced motion never applies there. */
|
|
79
|
+
export const SERVER_POSITIONAL_KEYS: ReducedMotion.PositionalKeys["Service"] = { isPositional: ReducedMotion.isTransform }
|
|
80
|
+
|
|
81
|
+
/** A server render's Default transition: it runs no animation (its Appear animations read the DOM's, #48). */
|
|
82
|
+
export const SERVER_DEFAULT_TRANSITION: DefaultTransition.DefaultTransition["Service"] = { transitionFor: () => DefaultTransition.ONE_SPRING, keyframes: DefaultTransition.ONE_TWEEN }
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The value a `WardicProvider` carries down the tree: the single Effect runtime
|
|
86
|
+
* plus the provider-owned flush gate (ADR-0006) built atop it.
|
|
87
|
+
*/
|
|
88
|
+
export interface WardicContextValue {
|
|
89
|
+
readonly runtime: WardicRuntime
|
|
90
|
+
readonly gate: FlushGate.Shape
|
|
91
|
+
/**
|
|
92
|
+
* Its projection system (ADR-0009), once its `layout` Feature is built (#511): by an element whose
|
|
93
|
+
* section has it, or a component that brings it. Read as it's needed, so nothing waits on it; and
|
|
94
|
+
* `undefined` until then, as during a server render, which builds none (ADR-0021).
|
|
95
|
+
*/
|
|
96
|
+
readonly projection: ProjectionSystem.Shape | undefined
|
|
97
|
+
/** Whether reduced motion applies now (ADR-0029): read when each animation starts. */
|
|
98
|
+
readonly reducedMotion: () => boolean
|
|
99
|
+
/**
|
|
100
|
+
* Whether reduced motion applies now under `setting` (#434): a `WardicConfig`'s, else the
|
|
101
|
+
* provider's, with the user's preference. Read when each animation starts.
|
|
102
|
+
*/
|
|
103
|
+
readonly reducedMotionUnder: (setting: ReducedMotion.Config | undefined) => boolean
|
|
104
|
+
/**
|
|
105
|
+
* The provider's own `reducedMotion` setting (#443): `undefined` when it gives none. Tracked, so a
|
|
106
|
+
* hook that reads it follows a change of it (#584); animations read it untracked, as each starts.
|
|
107
|
+
*/
|
|
108
|
+
readonly reducedMotionSetting: () => ReducedMotion.Config | undefined
|
|
109
|
+
/** The Environment's Positional keys (ADR-0036), read once: which keys reduced motion Snaps. */
|
|
110
|
+
readonly positionalKeys: ReducedMotion.PositionalKeys["Service"]
|
|
111
|
+
/** The Environment's Default transition (ADR-0051), read once: what a key with no transition of its own runs on. */
|
|
112
|
+
readonly defaultTransition: DefaultTransition.DefaultTransition["Service"]
|
|
113
|
+
/**
|
|
114
|
+
* The Environment's Renderer (ADR-0003), read once: what each element and presence projects its
|
|
115
|
+
* values with and commits them through.
|
|
116
|
+
*/
|
|
117
|
+
// #618 (M1): each element read it through `runSync` as it mounted, 196 ns and ~340 B (Node).
|
|
118
|
+
readonly renderer: Renderer.Renderer["Service"]
|
|
119
|
+
/** A server render's Appear animations (#48, ADR-0044); none on the client, or with `appear={false}`. */
|
|
120
|
+
readonly appear?: ServerAppear | undefined
|
|
121
|
+
/** Whether its animations are instant now (#443, an Instant change's); never on a server. */
|
|
122
|
+
readonly instant: InstantAnimations
|
|
123
|
+
/**
|
|
124
|
+
* Its **Features** (#511, ADR-0067), each built once on first need into the runtime's `MemoMap`; a
|
|
125
|
+
* server render's run their `server` part alone. Disposing them disposes the runtime after.
|
|
126
|
+
*/
|
|
127
|
+
readonly features: FeatureRegistry
|
|
128
|
+
/**
|
|
129
|
+
* Build what a first element would (#535): the runtime, its Environment and the gate, and the first
|
|
130
|
+
* animation's code warmed through the interpolators nearly every app uses. A provider runs it at
|
|
131
|
+
* the browser's idle time once it has mounted; a first element before then builds them itself.
|
|
132
|
+
* Nothing on a server.
|
|
133
|
+
*/
|
|
134
|
+
readonly prepare: () => void
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** What a client provider builds on first need (#51): everything in its context but the runtime. */
|
|
138
|
+
interface Built {
|
|
139
|
+
readonly gate: FlushGate.Shape
|
|
140
|
+
readonly reducedMotion: () => boolean
|
|
141
|
+
readonly reducedMotionUnder: (setting: ReducedMotion.Config | undefined) => boolean
|
|
142
|
+
readonly positionalKeys: ReducedMotion.PositionalKeys["Service"]
|
|
143
|
+
readonly defaultTransition: DefaultTransition.DefaultTransition["Service"]
|
|
144
|
+
readonly renderer: Renderer.Renderer["Service"]
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A client provider's runtime and context value. The runtime is made once from `env`, over which
|
|
149
|
+
* it builds the flush gate, running a frame's Starting-style switches through `batch` (ADR-0034:
|
|
150
|
+
* Solid 1's `batch`, Solid 2's apply-then-`flush()`), a service built by its Layer and ended by its
|
|
151
|
+
* Scope (#132, ADR-0041). Making it builds nothing (it's Effect's `ManagedRuntime`). The projection
|
|
152
|
+
* system is the `layout` Feature's (#511), built on the runtime when it's first needed, and ended
|
|
153
|
+
* before it.
|
|
154
|
+
*
|
|
155
|
+
* The rest is built on first need (#51, ADR-0021 *Amendment (#51)*): together, the first time a
|
|
156
|
+
* Wardic element or hook reads any of it from the context value, which is during the first
|
|
157
|
+
* element's render. A provider with no Wardic element under it builds nothing. Reading the runtime
|
|
158
|
+
* alone builds none of it. `reducedMotion` is the provider's setting, read untracked by the caller.
|
|
159
|
+
*/
|
|
160
|
+
export const clientContext = (
|
|
161
|
+
env: WardicEnv,
|
|
162
|
+
batch: (apply: () => void) => void,
|
|
163
|
+
reducedMotion: () => ReducedMotion.Config | undefined,
|
|
164
|
+
reducedMotionSetting: () => ReducedMotion.Config | undefined,
|
|
165
|
+
scaleCorrectors?: ProjectionSystem.Options["scaleCorrectors"],
|
|
166
|
+
): WardicContextValue => {
|
|
167
|
+
let built: Built | undefined
|
|
168
|
+
const build = (): Built => {
|
|
169
|
+
if (Predicate.isNotUndefined(built)) return built
|
|
170
|
+
// The flush gate, one per WardicProvider (ADR-0006): reading it builds the runtime, the
|
|
171
|
+
// Environment and the gate together.
|
|
172
|
+
const gate = runtime.runSync(FlushGate.FlushGate)
|
|
173
|
+
// Whether reduced motion applies now (ADR-0029): the app's setting (a `WardicConfig`'s, #434, else
|
|
174
|
+
// the provider's) and the user's preference through the Probe's atom. Read when each animation
|
|
175
|
+
// starts, so a change applies from the next one.
|
|
176
|
+
const registry = runtime.runSync(AtomRegistry.AtomRegistry)
|
|
177
|
+
const probe = runtime.runSync(Probe.Probe)
|
|
178
|
+
const under = (setting: ReducedMotion.Config | undefined): boolean =>
|
|
179
|
+
ReducedMotion.applies(settingOf(setting, reducedMotion), registry.get(probe.prefersReducedMotion))
|
|
180
|
+
const applies = (): boolean => under(undefined)
|
|
181
|
+
// Which keys reduced motion Snaps: the Environment's Positional keys (ADR-0036), read once, as
|
|
182
|
+
// the Probe is.
|
|
183
|
+
const positionalKeys = runtime.runSync(ReducedMotion.PositionalKeys)
|
|
184
|
+
// What a key with no transition of its own runs on: the Environment's Default transition
|
|
185
|
+
// (ADR-0051), read once too.
|
|
186
|
+
const defaultTransition = runtime.runSync(DefaultTransition.DefaultTransition)
|
|
187
|
+
// The Renderer every element projects and commits through (ADR-0003), read once too.
|
|
188
|
+
const renderer = runtime.runSync(Renderer.Renderer)
|
|
189
|
+
built = { gate, reducedMotion: applies, reducedMotionUnder: under, positionalKeys, defaultTransition, renderer }
|
|
190
|
+
return built
|
|
191
|
+
}
|
|
192
|
+
// What the `layout` Feature builds its projection system with (#511): reduced motion read as each
|
|
193
|
+
// layout animation starts, and the app's scale correctors.
|
|
194
|
+
const projectionOptions: ProjectionSystem.Options = { reducedMotion: () => build().reducedMotion(), scaleCorrectors }
|
|
195
|
+
const runtime: ProviderRuntime = ManagedRuntime.make(
|
|
196
|
+
Layer.merge(FlushGate.layer({ batch }), Layer.succeed(ProjectionOptions)(projectionOptions)).pipe(Layer.provideMerge(env)),
|
|
197
|
+
)
|
|
198
|
+
const features = clientRegistry(runtime)
|
|
199
|
+
// Its Instant changes (#443), timed by its Environment's Refresh frames, found at the first.
|
|
200
|
+
const instant = makeInstantAnimations(() => runtime.runSync(RefreshFrameSource.RefreshFrameSource).requestFrame)
|
|
201
|
+
const prepare = (): void => {
|
|
202
|
+
build()
|
|
203
|
+
warmInterpolators(runtime)
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
runtime,
|
|
207
|
+
reducedMotionSetting,
|
|
208
|
+
instant,
|
|
209
|
+
features,
|
|
210
|
+
prepare,
|
|
211
|
+
get gate() {
|
|
212
|
+
return build().gate
|
|
213
|
+
},
|
|
214
|
+
get projection() {
|
|
215
|
+
return projectionIn(features.built())
|
|
216
|
+
},
|
|
217
|
+
get reducedMotion() {
|
|
218
|
+
return build().reducedMotion
|
|
219
|
+
},
|
|
220
|
+
get reducedMotionUnder() {
|
|
221
|
+
return build().reducedMotionUnder
|
|
222
|
+
},
|
|
223
|
+
get positionalKeys() {
|
|
224
|
+
return build().positionalKeys
|
|
225
|
+
},
|
|
226
|
+
get defaultTransition() {
|
|
227
|
+
return build().defaultTransition
|
|
228
|
+
},
|
|
229
|
+
get renderer() {
|
|
230
|
+
return build().renderer
|
|
231
|
+
},
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Whether reduced motion applies now for an element under `config` (#434): its nearest
|
|
237
|
+
* `WardicConfig`'s setting, else the provider's; with no config above, the provider's reader as it is.
|
|
238
|
+
*/
|
|
239
|
+
export const reducedMotionWith = (value: WardicContextValue, config: WardicConfigValue | undefined): (() => boolean) => {
|
|
240
|
+
if (Predicate.isUndefined(config)) return value.reducedMotion
|
|
241
|
+
const under = value.reducedMotionUnder
|
|
242
|
+
return () => under(config.reducedMotion())
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* The reduced-motion setting that applies to an element under `config` (#443, Motion's
|
|
247
|
+
* `useReducedMotionConfig`): its nearest `WardicConfig`'s, else the provider's, else `"user"`.
|
|
248
|
+
*/
|
|
249
|
+
export const reducedMotionSettingWith = (value: WardicContextValue, config: WardicConfigValue | undefined): (() => ReducedMotion.Config) =>
|
|
250
|
+
() => settingOf(configSettingOf(config), value.reducedMotionSetting)
|
|
251
|
+
|
|
252
|
+
/** A setting: the given one (a `WardicConfig`'s), else the provider's, else `"user"`. */
|
|
253
|
+
const settingOf = (setting: ReducedMotion.Config | undefined, provider: () => ReducedMotion.Config | undefined): ReducedMotion.Config => {
|
|
254
|
+
if (Predicate.isNotUndefined(setting)) return setting
|
|
255
|
+
return Option.getOrElse(Option.fromUndefinedOr(provider()), () => "user" as const)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* A server provider's context value (ADR-0021, decisions 1 and 3): an unbuilt runtime (`make`
|
|
260
|
+
* alone builds nothing, 0.92 µs, so code that grabs it at setup and uses it after mount keeps
|
|
261
|
+
* working), an inert gate, no projection system, reduced motion never applying, and the render's
|
|
262
|
+
* Appear animations when it has them.
|
|
263
|
+
*/
|
|
264
|
+
export const serverContext = (env: WardicEnv, appear: ServerAppear | undefined, reducedMotion: () => ReducedMotion.Config | undefined): WardicContextValue => {
|
|
265
|
+
const runtime = ManagedRuntime.make(env)
|
|
266
|
+
return {
|
|
267
|
+
runtime,
|
|
268
|
+
// A server render's elements take the lean path and never read it: read at each use if one does.
|
|
269
|
+
get renderer() {
|
|
270
|
+
return runtime.runSync(Renderer.Renderer)
|
|
271
|
+
},
|
|
272
|
+
features: serverRegistry(runtime),
|
|
273
|
+
prepare: constVoid,
|
|
274
|
+
gate: FlushGate.inert,
|
|
275
|
+
projection: undefined,
|
|
276
|
+
reducedMotion: () => false,
|
|
277
|
+
reducedMotionUnder: () => false,
|
|
278
|
+
reducedMotionSetting: reducedMotion,
|
|
279
|
+
positionalKeys: SERVER_POSITIONAL_KEYS,
|
|
280
|
+
defaultTransition: SERVER_DEFAULT_TRANSITION,
|
|
281
|
+
appear,
|
|
282
|
+
instant: NO_INSTANT,
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Pairs nearly every app animates (#535): a number (opacity, the transform shorthands), a length and a
|
|
288
|
+
* colour. Resolving them runs the registry's selection, parsers and blends once, so a first animation
|
|
289
|
+
* after it runs them warm. Its cache is by the pair's own strings, so it's the code they warm.
|
|
290
|
+
*/
|
|
291
|
+
const WARM_PAIRS: ReadonlyArray<readonly [number | string, number | string]> = [
|
|
292
|
+
[0, 1],
|
|
293
|
+
["0px", "10px"],
|
|
294
|
+
["rgb(0, 0, 0)", "rgb(255, 255, 255)"],
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
/** Resolve {@link WARM_PAIRS} on `runtime`'s registry, and blend each once. */
|
|
298
|
+
const warmInterpolators = (runtime: ProviderRuntime): void => {
|
|
299
|
+
const registry = runtime.runSync(InterpolatorRegistry.InterpolatorRegistry)
|
|
300
|
+
Arr.forEach(WARM_PAIRS, ([from, to]) => {
|
|
301
|
+
runtime.runSync(Effect.map(registry.resolve(from, to), (blend) => blend(0.5)))
|
|
302
|
+
})
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/** How long a provider's {@link whenIdle} waits for an idle moment at most (#535), in ms. */
|
|
306
|
+
const IDLE_TIMEOUT_MS = 250
|
|
307
|
+
|
|
308
|
+
/** Where there's no `requestIdleCallback` (Safari), the timer it runs on instead (#535), in ms. */
|
|
309
|
+
const IDLE_FALLBACK_MS = 50
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Run `fn` at the browser's idle time, within {@link IDLE_TIMEOUT_MS} (#535), or after
|
|
313
|
+
* {@link IDLE_FALLBACK_MS} where there's no `requestIdleCallback`. Returns its cancel.
|
|
314
|
+
*/
|
|
315
|
+
export const whenIdle = (fn: () => void): (() => void) => {
|
|
316
|
+
if (Predicate.isFunction(globalThis.requestIdleCallback)) {
|
|
317
|
+
const handle = globalThis.requestIdleCallback(fn, { timeout: IDLE_TIMEOUT_MS })
|
|
318
|
+
return () => globalThis.cancelIdleCallback(handle)
|
|
319
|
+
}
|
|
320
|
+
const handle = setTimeout(fn, IDLE_FALLBACK_MS)
|
|
321
|
+
return () => clearTimeout(handle)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* What a provider builds at the browser's idle time once it has mounted (#535): `value`'s `prepare`,
|
|
326
|
+
* and `section`'s Features, its own. A failure here is left to the first element, whose own build
|
|
327
|
+
* fails the same way and reports it where it renders.
|
|
328
|
+
*/
|
|
329
|
+
export const prepareIdle = (value: WardicContextValue, section: FeatureSection): void => {
|
|
330
|
+
try {
|
|
331
|
+
value.prepare()
|
|
332
|
+
section.services()
|
|
333
|
+
} catch {
|
|
334
|
+
// Left to the first element's build, which reports it.
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** Reads `pick` off a provider's context value, or throws `name`'s clear error outside one. */
|
|
339
|
+
export const fromContext = <A>(value: WardicContextValue | undefined, name: string, pick: (value: WardicContextValue) => A): A => {
|
|
340
|
+
if (Predicate.isUndefined(value)) throw new Error(`${name} must be used within a <WardicProvider>`)
|
|
341
|
+
return pick(value)
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/** The projection system among `services`, the `layout` Feature's (#511), or `undefined` when they hold none. */
|
|
345
|
+
export const projectionIn = (services: Context.Context<never>): ProjectionSystem.Shape | undefined =>
|
|
346
|
+
Option.getOrUndefined(Context.getOption(services as Context.Context<ProjectionSystem.ProjectionSystem>, ProjectionSystem.ProjectionSystem))
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* `useAnimateLayout()`'s function: `animateLayout(fn, options?)` runs `fn` at once, animates the
|
|
350
|
+
* layout change it makes, and returns what `fn` returns. `options.onSettled` is called once every
|
|
351
|
+
* layout animation the change started has ended.
|
|
352
|
+
*/
|
|
353
|
+
// A Declared layout change (#4, ADR-0038); `onSettled` is #191's, ADR-0039.
|
|
354
|
+
export type AnimateLayout = <A>(fn: () => A, options?: ProjectionSystem.AnimateLayoutOptions) => A
|
|
355
|
+
|
|
356
|
+
const NO_OPTIONS: ProjectionSystem.AnimateLayoutOptions = {}
|
|
357
|
+
|
|
358
|
+
/** During a server render nothing is measured: `fn` just runs, and with nothing to animate it has settled (ADR-0021). */
|
|
359
|
+
const runOnly: AnimateLayout = (fn, options = NO_OPTIONS) => {
|
|
360
|
+
const result = fn()
|
|
361
|
+
UndefinedOr.map(options.onSettled, (onSettled) => onSettled())
|
|
362
|
+
return result
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* A provider's `animateLayout` (#4, ADR-0038), its projection system's read at each call (#511): `fn`
|
|
367
|
+
* just run until a section builds `layout`, as with no layout element there's nothing to animate, and
|
|
368
|
+
* during a server render.
|
|
369
|
+
*/
|
|
370
|
+
export const animateLayoutOf = (value: WardicContextValue | undefined): AnimateLayout =>
|
|
371
|
+
fromContext(
|
|
372
|
+
value,
|
|
373
|
+
"useAnimateLayout",
|
|
374
|
+
(v): AnimateLayout =>
|
|
375
|
+
(fn, options) =>
|
|
376
|
+
UndefinedOr.match(v.projection, { onUndefined: () => runOnly(fn, options), onDefined: (projection) => projection.animateLayout(fn, options) }),
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* A fiber's effect as `runScoped` runs it: a failure logged at Error, `wardic.runScoped: a fiber
|
|
381
|
+
* failed`, with its cause, and reported to the Environment's `ErrorReporter`s (ADR-0030, decision
|
|
382
|
+
* 4); an interruption is neither. The fiber still fails with it.
|
|
383
|
+
*/
|
|
384
|
+
export const reported = <A, E>(effect: Effect.Effect<A, E, WardicServices>): Effect.Effect<A, E, WardicServices> =>
|
|
385
|
+
effect.pipe(Effect.tapCause((cause) => Report.failure("wardic.runScoped: a fiber failed", cause)))
|
|
386
|
+
|
|
387
|
+
/** A fiber that has already ended by interruption, on no Wardic runtime (1.1 µs): what a server render starts. */
|
|
388
|
+
export const interrupted = <A, E>(): Fiber.Fiber<A, E> => Effect.runFork(Effect.interrupt) as unknown as Fiber.Fiber<A, E>
|
package/src/sensors.ts
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Low-level sensor hooks (`createX`) — the thin Solid surface over core's
|
|
3
|
+
* recognizers and reactive service inputs (ADR-0006).
|
|
4
|
+
*
|
|
5
|
+
* Each boolean/sample sensor runs the matching core watch with `watchToSignal`
|
|
6
|
+
* (#318, #379): the recognizer's `wardic.*` span, and a Scope of its own with no
|
|
7
|
+
* fiber, closed on the consuming component's unmount (dropping the shared feed's
|
|
8
|
+
* count). `createReducedMotion` bridges
|
|
9
|
+
* `Probe.prefersReducedMotion` (an `Atom`) via {@link fromAtom}, `createReducedMotionConfig` lays the
|
|
10
|
+
* nearest config's setting over it, and `createPageInView` bridges `Probe.pageVisible` (#443). `createTransform` moved to
|
|
11
|
+
* `live-value.ts`, with `createSpring` (#130).
|
|
12
|
+
*
|
|
13
|
+
* All hooks MUST be called within a component/owner (they register `onCleanup`
|
|
14
|
+
* through the bridges and read the runtime from context).
|
|
15
|
+
*/
|
|
16
|
+
import * as Probe from "@wardic/core/Probe"
|
|
17
|
+
import * as Recognizer from "@wardic/core/Recognizer"
|
|
18
|
+
import * as ReducedMotion from "@wardic/core/ReducedMotion"
|
|
19
|
+
import * as Bool from "effect/Boolean"
|
|
20
|
+
import { constFalse } from "effect/Function"
|
|
21
|
+
import * as Predicate from "effect/Predicate"
|
|
22
|
+
import * as UndefinedOr from "effect/UndefinedOr"
|
|
23
|
+
import { type Accessor, createComputed, createSignal, getOwner, runWithOwner, untrack } from "solid-js"
|
|
24
|
+
import { fromAtom, watchToSignal } from "./bridge.ts"
|
|
25
|
+
import type { WardicViewport } from "./config.ts"
|
|
26
|
+
import { inViewOptionsOf } from "./gesture-callbacks.ts"
|
|
27
|
+
import { useWardicReducedMotionSetting, useWardicRuntime } from "./provider.tsx"
|
|
28
|
+
import { isServer } from "./server.ts"
|
|
29
|
+
|
|
30
|
+
export type { CreateDragOptions } from "./drag-samples.ts"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/** Whether an element's config wants each of its gesture recognizers (#87, #273). */
|
|
34
|
+
export interface Wants<C> {
|
|
35
|
+
readonly hover: (config: C) => boolean
|
|
36
|
+
readonly press: (config: C) => boolean
|
|
37
|
+
readonly inView: (config: C) => boolean
|
|
38
|
+
readonly focus: (config: C) => boolean
|
|
39
|
+
readonly pan: (config: C) => boolean
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Each gesture recognizer's start: the layers' state signals, and pan's watch (it sets no layer). */
|
|
43
|
+
export interface Starts {
|
|
44
|
+
readonly hover: () => Accessor<boolean>
|
|
45
|
+
readonly press: () => Accessor<boolean>
|
|
46
|
+
readonly inView: () => Accessor<boolean>
|
|
47
|
+
readonly focus: () => Accessor<boolean>
|
|
48
|
+
readonly pan: () => void
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The layer recognizers {@link createWhenWanted} has started: each its state's accessor, absent until
|
|
53
|
+
* it starts.
|
|
54
|
+
*/
|
|
55
|
+
export interface Started {
|
|
56
|
+
readonly hover?: Accessor<boolean> | undefined
|
|
57
|
+
readonly press?: Accessor<boolean> | undefined
|
|
58
|
+
readonly inView?: Accessor<boolean> | undefined
|
|
59
|
+
readonly focus?: Accessor<boolean> | undefined
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const NONE_STARTED: Started = {}
|
|
63
|
+
|
|
64
|
+
/** No layer recognizer started, for good: an element that can never want one (#525). */
|
|
65
|
+
export const NEVER_STARTED: Accessor<Started> = () => NONE_STARTED
|
|
66
|
+
|
|
67
|
+
/** A layer's state: its recognizer's, `false` until it starts. */
|
|
68
|
+
export const stateOf = (started: Accessor<boolean> | undefined): boolean =>
|
|
69
|
+
UndefinedOr.match(started, { onUndefined: constFalse, onDefined: (state) => state() })
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* An element's gesture recognizers, each started only once its config wants it (#87, ADR-0040;
|
|
73
|
+
* #273), and kept from then on. Motion's rule: its hover, tap, inView, focus and pan features attach
|
|
74
|
+
* only once their props are set. An element that never wants one starts no fiber and no
|
|
75
|
+
* subscription; one that stops wanting it keeps the recognizer, so a prop that toggles starts it
|
|
76
|
+
* once. A pointer already resting on the element when hover starts counts from its next entry, as
|
|
77
|
+
* Motion's does.
|
|
78
|
+
*
|
|
79
|
+
* One computation reads `config()` once a change for them all: a `wardic.*` element's config is
|
|
80
|
+
* rebuilt at each read. The layers' recognizers started are one signal, so a reader tracks it once,
|
|
81
|
+
* and then each started one's state ({@link stateOf}): Solid 1 tracks every read, the same signal's
|
|
82
|
+
* again included. Each start runs under the caller's owner, not this computation, so its recognizer
|
|
83
|
+
* lives and ends with the caller (its `onCleanup`), not with the next change.
|
|
84
|
+
*/
|
|
85
|
+
export const createWhenWanted = <C,>(config: Accessor<C>, wants: Wants<C>, starts: Starts): Accessor<Started> => {
|
|
86
|
+
const owner = getOwner()
|
|
87
|
+
const [started, setStarted] = createSignal<Started>(NONE_STARTED)
|
|
88
|
+
let panning = false
|
|
89
|
+
createComputed(() => {
|
|
90
|
+
const c = config()
|
|
91
|
+
const was = untrack(started)
|
|
92
|
+
let now = was
|
|
93
|
+
if (Predicate.isUndefined(was.hover)) {
|
|
94
|
+
if (wants.hover(c)) now = { ...now, hover: runWithOwner(owner, starts.hover) }
|
|
95
|
+
}
|
|
96
|
+
if (Predicate.isUndefined(was.press)) {
|
|
97
|
+
if (wants.press(c)) now = { ...now, press: runWithOwner(owner, starts.press) }
|
|
98
|
+
}
|
|
99
|
+
if (Predicate.isUndefined(was.inView)) {
|
|
100
|
+
if (wants.inView(c)) now = { ...now, inView: runWithOwner(owner, starts.inView) }
|
|
101
|
+
}
|
|
102
|
+
if (Predicate.isUndefined(was.focus)) {
|
|
103
|
+
if (wants.focus(c)) now = { ...now, focus: runWithOwner(owner, starts.focus) }
|
|
104
|
+
}
|
|
105
|
+
if (now !== was) setStarted(now)
|
|
106
|
+
if (Bool.not(panning)) {
|
|
107
|
+
if (wants.pan(c)) {
|
|
108
|
+
panning = true
|
|
109
|
+
runWithOwner(owner, starts.pan)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
return started
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* `true` while `target` is in view, `false` otherwise. What "in view" means is a `viewport`'s, as on a
|
|
118
|
+
* Wardic element: `root`, a scrolling container (the window if none); `margin`, grown around it, as
|
|
119
|
+
* CSS `rootMargin`; `amount` of the element that must show, `"some"`, `"all"` or 0 to 1; and `once`,
|
|
120
|
+
* to stay `true` after the first entry. `false` until the first entry. `target` is the element itself,
|
|
121
|
+
* and `root` is read as it's called, so call it where both exist. Motion's `useInView`.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* const visible = createInView(props.card, { amount: "all", once: true })
|
|
125
|
+
* @see https://wardic.dev/reference/solid/gestures/create-in-view
|
|
126
|
+
*/
|
|
127
|
+
// The core in-view watch (#318), its options mapped as the element's `viewport` is (#273): `root` read
|
|
128
|
+
// as it starts.
|
|
129
|
+
export const createInView = (target: unknown, viewport?: WardicViewport): Accessor<boolean> =>
|
|
130
|
+
watchToSignal<boolean>(({ on, onDefect }) => Recognizer.watchInView(target, inViewOptionsOf(viewport), { on: (transition) => on(transition.active), onDefect }), false)
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Whether the visitor's system asks for reduced motion, as an accessor. A server renders `false`, and a
|
|
134
|
+
* hydrating page keeps it until it has mounted, so markup that depends on it hydrates. Wardic's
|
|
135
|
+
* animations honour the setting either way. Motion's `useReducedMotion`, which gives `null` on a server.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* const reduced = createReducedMotion()
|
|
139
|
+
* <Show when={!reduced()} fallback={<img src={still} />}><video autoplay src={clip} /></Show>
|
|
140
|
+
* @see https://wardic.dev/reference/solid/utilities/create-reduced-motion
|
|
141
|
+
*/
|
|
142
|
+
// The Probe's `prefersReducedMotion` Atom, held until mount (the Hydration hold, ADR-0021 decision 8).
|
|
143
|
+
// The engine reads the preference as each animation starts, and snaps its positional keys (ADR-0029).
|
|
144
|
+
export const createReducedMotion = (): Accessor<boolean> => {
|
|
145
|
+
// Before the provider is asked for: a server render needs none, as Solid 2's doesn't (#583).
|
|
146
|
+
if (isServer) return () => false
|
|
147
|
+
const runtime = useWardicRuntime()
|
|
148
|
+
// Resolve the Probe service once to read its reactive atom; a Context.Service
|
|
149
|
+
// key is itself an Effect, so running it yields the service instance.
|
|
150
|
+
const probe = runtime.runSync(Probe.Probe)
|
|
151
|
+
return fromAtom(probe.prefersReducedMotion, { serverValue: false })
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Whether reduced motion applies here, as Wardic's animations here honour it: the nearest
|
|
156
|
+
* `WardicConfig`'s `reducedMotion`, else the provider's, over the visitor's setting. `"always"` is
|
|
157
|
+
* `true`, `"never"` `false`, and `"user"` follows the system. A server renders `"always"` as `true` and
|
|
158
|
+
* the rest as `false`, kept until the page has mounted. Motion's `useReducedMotionConfig`.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* const reduced = createReducedMotionConfig()
|
|
162
|
+
* const path = () => (reduced() ? undefined : arc())
|
|
163
|
+
* @see https://wardic.dev/reference/solid/utilities/create-reduced-motion
|
|
164
|
+
*/
|
|
165
|
+
// #443; tracked since #584.
|
|
166
|
+
export const createReducedMotionConfig = (): Accessor<boolean> => {
|
|
167
|
+
const setting = useWardicReducedMotionSetting()
|
|
168
|
+
const prefers = createReducedMotion()
|
|
169
|
+
return () => ReducedMotion.applies(setting(), prefers())
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Whether the page is shown: `false` while it's hidden, in a tab in the background or a minimised
|
|
174
|
+
* window. Pause what nobody can see, such as a carousel's autoplay. A server renders `true`, and a
|
|
175
|
+
* hydrating page keeps it until it has mounted. Motion's `usePageInView`.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* const visible = createPageInView()
|
|
179
|
+
* createEffect(() => (visible() ? player.play() : player.pause()))
|
|
180
|
+
* @see https://wardic.dev/reference/solid/gestures/create-page-in-view
|
|
181
|
+
*/
|
|
182
|
+
// #443, the Probe's `pageVisible`. The Hydration hold keeps `true` until mount, as Motion's starts
|
|
183
|
+
// `true` and corrects itself after its first render.
|
|
184
|
+
export const createPageInView = (): Accessor<boolean> => {
|
|
185
|
+
const runtime = useWardicRuntime()
|
|
186
|
+
if (isServer) return () => true
|
|
187
|
+
const probe = runtime.runSync(Probe.Probe)
|
|
188
|
+
return fromAtom(probe.pageVisible, { serverValue: true })
|
|
189
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DOM's Interpolators as a server render runs them: what its Appear animations sample and its
|
|
3
|
+
* `createTransform`s map with (a server projects with the DOM's `project`, ADR-0021 decision 2). Built
|
|
4
|
+
* from `DomInterpolators.layer` on first use, and kept: one while no colour spaces are registered, one
|
|
5
|
+
* after. The `colors` Feature registers its spaces for the whole process (`Color.registerSpaces`), and a
|
|
6
|
+
* registry keeps the blends it resolved by their strings, so one kept from before would blend `oklch()`
|
|
7
|
+
* as it's written for every render after (FS3, FV2). Registering is one way, so two are all it takes.
|
|
8
|
+
*/
|
|
9
|
+
// #618 (M6): each Appear element, each of its Blend legs and each server `createTransform` built the
|
|
10
|
+
// Layer again: 4.7 µs a call, against 1.5 with one context (Bun).
|
|
11
|
+
import type * as InterpolatorRegistry from "@wardic/core/InterpolatorRegistry"
|
|
12
|
+
import * as Color from "@wardic/dom/Color"
|
|
13
|
+
import * as DomInterpolators from "@wardic/dom/DomInterpolators"
|
|
14
|
+
import type * as Context from "effect/Context"
|
|
15
|
+
import * as Effect from "effect/Effect"
|
|
16
|
+
import * as Layer from "effect/Layer"
|
|
17
|
+
import * as Predicate from "effect/Predicate"
|
|
18
|
+
|
|
19
|
+
// Module state (#460, Q7): a server's Interpolators, the same for every request, by whether the colour
|
|
20
|
+
// spaces were registered when they were built. Nothing registers on them here; what they keep is a
|
|
21
|
+
// bounded cache of blends by their strings, which is the same for every request in either state.
|
|
22
|
+
const kept = new Map<boolean, Context.Context<InterpolatorRegistry.InterpolatorRegistry>>()
|
|
23
|
+
|
|
24
|
+
/** `effect` with a server render's Interpolators, for the colour spaces registered now. */
|
|
25
|
+
export const withServerInterpolators = <A, E>(effect: Effect.Effect<A, E, InterpolatorRegistry.InterpolatorRegistry>): Effect.Effect<A, E> => {
|
|
26
|
+
const registered = Color.spacesRegistered()
|
|
27
|
+
let context = kept.get(registered)
|
|
28
|
+
if (Predicate.isUndefined(context)) {
|
|
29
|
+
context = Effect.runSync(Effect.scoped(Layer.build(DomInterpolators.layer)))
|
|
30
|
+
kept.set(registered, context)
|
|
31
|
+
}
|
|
32
|
+
return Effect.provideContext(effect, context)
|
|
33
|
+
}
|
package/src/server.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the binding renders (ADR-0021, decision 3). The ONE server check in
|
|
3
|
+
* `@wardic/solid` is Solid's `isServer`: it says what Solid is doing (rendering to a
|
|
4
|
+
* string), not which globals exist, so a server that defines `window` (a jsdom test) is
|
|
5
|
+
* still a server. Internal, not a package export.
|
|
6
|
+
*
|
|
7
|
+
* A server render builds no runtime; a hydrating client renders what the server rendered
|
|
8
|
+
* until the element mounts (the **Hydration hold**, decision 8), then runs as a
|
|
9
|
+
* client-only render does.
|
|
10
|
+
*/
|
|
11
|
+
import { sharedConfig } from "solid-js"
|
|
12
|
+
|
|
13
|
+
export { isServer } from "solid-js/web"
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Whether this setup runs inside a hydration of server-rendered markup: Solid 1.9 sets
|
|
17
|
+
* `sharedConfig.context` for the length of `hydrate()` (web/dist/web.js:357-366; its own
|
|
18
|
+
* `isHydrating` isn't exported). Read it at setup. Solid 2's flag differs (see
|
|
19
|
+
* docs/plans/upgrade-targets.md).
|
|
20
|
+
*/
|
|
21
|
+
export const isHydrating = (): boolean => sharedConfig.context != null
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solid 1's {@link Reactivity}, for the Solid-free modules the Solid 1 binding runs (#209).
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { createComputed, createRoot, createSignal, on, untrack } from "solid-js"
|
|
7
|
+
import type { Reactivity } from "./reactivity.ts"
|
|
8
|
+
|
|
9
|
+
export const reactivity: Reactivity = {
|
|
10
|
+
untrack,
|
|
11
|
+
trigger: () => {
|
|
12
|
+
const [track, notify] = createSignal(undefined, { equals: false })
|
|
13
|
+
return { track, notify: () => notify() }
|
|
14
|
+
},
|
|
15
|
+
// A Solid 1 root isn't disposed with the owner it's made under.
|
|
16
|
+
watch: (accessor, onChange) =>
|
|
17
|
+
createRoot((dispose) => {
|
|
18
|
+
createComputed(on(accessor, onChange, { defer: true }))
|
|
19
|
+
return dispose
|
|
20
|
+
}),
|
|
21
|
+
}
|