@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
|
@@ -0,0 +1,1271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `createWard` — the primary motion spine of the Solid binding (ADR-0005).
|
|
3
|
+
*
|
|
4
|
+
* This is the fixed orchestration spine the binding contract prescribes:
|
|
5
|
+
*
|
|
6
|
+
* Recognizers (hover/press) -> Override stack -> Override.resolve -> reactive
|
|
7
|
+
* `target()` -> a settling primitive (spring/Retarget by default, tween for
|
|
8
|
+
* `transition.type: "tween"`) -> per-frame `gate.write(id, values)` -> the
|
|
9
|
+
* gate projects the `Patch` and commits it onto the element (ADR-0034).
|
|
10
|
+
*
|
|
11
|
+
* `createWard` returns a **Ward**, a callable: `<div {...ward()}>` spreads `ref` (wires
|
|
12
|
+
* the element on mount, where the gate commits) and a reactive `style` getter: the
|
|
13
|
+
* Starting style until the first commit, then the user's style without the keys the
|
|
14
|
+
* gate holds (ADR-0034). No frame goes through Solid.
|
|
15
|
+
*
|
|
16
|
+
* SSR contract (ADR-0003): the Starting style is resolved synchronously and
|
|
17
|
+
* purely as `project(resolveInitial(config))` — never by spinning the engine.
|
|
18
|
+
* That one resolved value is the `style` until the first commit (so the server /
|
|
19
|
+
* pre-mount render emits it with no flash) AND the spring's `from` Snapshot (so frame 1
|
|
20
|
+
* flows continuously out of the seed). `initial` is a static map / variant name
|
|
21
|
+
* (SSR-serializable) at `createWard`'s boundary; the component layer unwraps an
|
|
22
|
+
* accessor `initial` once before passing it in (see {@link WardConfig.initial}).
|
|
23
|
+
*
|
|
24
|
+
* Scope (v0.1, this step): `initial` / `animate` / `whileHover` / `whileTap`.
|
|
25
|
+
* NO variant-tree propagation, NO drag, NO exit/layout. Mixed numeric+string
|
|
26
|
+
* targets are handled by routing numeric keys through `springValues` and any
|
|
27
|
+
* string/color keys through `springBlend`, the same spring on a progress (both
|
|
28
|
+
* writing into the same gate id) — see core's `Values.split`.
|
|
29
|
+
*/
|
|
30
|
+
import type * as Drag from "@wardic/core/Drag"
|
|
31
|
+
import { tapPropagates } from "./press.ts"
|
|
32
|
+
import * as Renderer from "@wardic/core/Renderer"
|
|
33
|
+
import type * as Values from "@wardic/core/Values"
|
|
34
|
+
import * as DomRenderer from "@wardic/dom/DomRenderer"
|
|
35
|
+
import type * as FlushGate from "@wardic/dom/FlushGate"
|
|
36
|
+
import type * as ProjectionSystem from "@wardic/dom/ProjectionSystem"
|
|
37
|
+
import * as Style from "@wardic/dom/Style"
|
|
38
|
+
import * as Svg from "@wardic/dom/Svg"
|
|
39
|
+
import { mergeRefs } from "@solid-primitives/refs"
|
|
40
|
+
import * as Arr from "effect/Array"
|
|
41
|
+
import type * as Context from "effect/Context"
|
|
42
|
+
import * as Bool from "effect/Boolean"
|
|
43
|
+
import { constUndefined, identity, pipe } from "effect/Function"
|
|
44
|
+
import * as Option from "effect/Option"
|
|
45
|
+
import * as Predicate from "effect/Predicate"
|
|
46
|
+
import * as Rec from "effect/Record"
|
|
47
|
+
import * as UndefinedOr from "effect/UndefinedOr"
|
|
48
|
+
import { Atom } from "effect/reactivity"
|
|
49
|
+
import {
|
|
50
|
+
type Accessor,
|
|
51
|
+
type Component,
|
|
52
|
+
createComputed,
|
|
53
|
+
createEffect,
|
|
54
|
+
createMemo,
|
|
55
|
+
createSignal,
|
|
56
|
+
createUniqueId,
|
|
57
|
+
DEV,
|
|
58
|
+
getOwner,
|
|
59
|
+
type JSX,
|
|
60
|
+
on,
|
|
61
|
+
onCleanup,
|
|
62
|
+
runWithOwner,
|
|
63
|
+
untrack,
|
|
64
|
+
} from "solid-js"
|
|
65
|
+
import { type ControlsChange, controlledConfigOf, controlledElement, isAnimationControls, subscribe, uncontrolledOf, type WardicAnimationControls } from "./animation-controls.ts"
|
|
66
|
+
import { fromAtom, watchToSignal } from "./bridge.ts"
|
|
67
|
+
import { pointMapOptionOf, settingOf, type WardicConfigValue, withConfigTransition } from "./wardic-config-value.ts"
|
|
68
|
+
import { dragTransitionOf, type DragTrack, type DragTrackConfig, runDragTrackWith } from "./drag.ts"
|
|
69
|
+
import { createElementStyle } from "./element-style.ts"
|
|
70
|
+
import { createLiveStyle, type LiveSource, type LiveStyle, readLive, serverRegistryOf, split } from "./live-style.ts"
|
|
71
|
+
import { createVariantNode } from "./variant-node.ts"
|
|
72
|
+
import { type GestureStates, type NameOrchestration, type ServerVariantNode, serverVariantNode, startingValuesOf, startsQuiet } from "./variant-tree.ts"
|
|
73
|
+
import { registerAnimatable } from "./imperative.ts"
|
|
74
|
+
import { projectionNodeOf, useLayoutGroupId } from "./layout.tsx"
|
|
75
|
+
import { layoutOptionsOf, wantsLayoutNode } from "./layout-member.ts"
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
import { GESTURE_WORDS, hasService, serviceIn } from "./gesture-features.ts"
|
|
82
|
+
import { handoffOf, setsAnimation } from "./appear.ts"
|
|
83
|
+
import { type PresenceContextValue, presenceBlocksInitial, presenceHold, usePresenceContext } from "./presence.tsx"
|
|
84
|
+
import { type PresenceSeed, presenceSeedOf } from "./presence-record.ts"
|
|
85
|
+
import type { PresenceRecord } from "./presence-record.ts"
|
|
86
|
+
import { createWhenWanted, NEVER_STARTED, type Started, stateOf, type Wants } from "./sensors.ts"
|
|
87
|
+
import { type GestureCallbacks, gestureCallbacksOf, inViewOptionsOf, wantsFocus, wantsHover, wantsInView, wantsPan, wantsPress } from "./gesture-callbacks.ts"
|
|
88
|
+
import { type Feature, type FeatureRegistry, type FeatureSection, LAYOUT_PROPS, missingMessage, unreadColorIn } from "./feature.ts"
|
|
89
|
+
import { runWatch, useBuiltProjection, useElementFeatures, useFeatureRegistry, useWardicAppear, useWardicDefaultTransition, useWardicGate, useWardicPositionalKeys, useWardicReducedMotion, useWardicRenderer, useWardicRuntime, useWardicSkipAnimations } from "./provider.tsx"
|
|
90
|
+
import { useWardicConfig } from "./wardic-config.tsx"
|
|
91
|
+
import { transformPagePointOf } from "./wardic-config-value.ts"
|
|
92
|
+
import { projectionIn, type WardicRuntime } from "./runtime.ts"
|
|
93
|
+
import { isHydrating, isServer } from "./server.ts"
|
|
94
|
+
import { reactivity } from "./solid-reactivity.ts"
|
|
95
|
+
import {
|
|
96
|
+
accessorOf,
|
|
97
|
+
type Active,
|
|
98
|
+
animationCallbacks,
|
|
99
|
+
applyDragDefaults,
|
|
100
|
+
dragAxisOf,
|
|
101
|
+
dragDefaultsOf,
|
|
102
|
+
draggingWithWillChange,
|
|
103
|
+
drawnAtRest,
|
|
104
|
+
followTemplate,
|
|
105
|
+
heldTransformFor,
|
|
106
|
+
registeredValuesOf,
|
|
107
|
+
flagStartingStyle,
|
|
108
|
+
isLayoutNode,
|
|
109
|
+
madeWith,
|
|
110
|
+
type ElementSpineOptions,
|
|
111
|
+
makeElementSpine,
|
|
112
|
+
makeReuse,
|
|
113
|
+
exitConfigOf,
|
|
114
|
+
exitTargetOf,
|
|
115
|
+
presenceTreeOf,
|
|
116
|
+
presenceRecordOf,
|
|
117
|
+
recordFrameOf,
|
|
118
|
+
registryOf,
|
|
119
|
+
type Resolution,
|
|
120
|
+
resolutionOf,
|
|
121
|
+
restingOf,
|
|
122
|
+
sameResolution,
|
|
123
|
+
serverStartingStyle,
|
|
124
|
+
snapshotOf,
|
|
125
|
+
startLinksOf,
|
|
126
|
+
type Start,
|
|
127
|
+
startOf,
|
|
128
|
+
warnDroppedTransform,
|
|
129
|
+
withOnUpdate,
|
|
130
|
+
releasingAppear,
|
|
131
|
+
appearEntryOf,
|
|
132
|
+
type ServerAppearOf,
|
|
133
|
+
} from "./spine.ts"
|
|
134
|
+
import { type WardicVariantContextValue, useVariantContext, WardicVariantContext } from "./variants.ts"
|
|
135
|
+
import type { WardConfig, WardicTransformShorthands, WardicValues } from "./config.ts"
|
|
136
|
+
import { DragGesture, FocusGesture, HoverGesture, InViewGesture, PanGesture, PressGesture } from "./features/keys.ts"
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Optional user-supplied props passed INTO the {@link Ward} callable to be
|
|
140
|
+
* merged with ward's own ref/style (Option A — ward's animated style wins).
|
|
141
|
+
*/
|
|
142
|
+
export interface WardUserProps {
|
|
143
|
+
/** The user's ref callback — invoked alongside ward's internal ref. */
|
|
144
|
+
readonly ref?: (el: HTMLElement) => void
|
|
145
|
+
/**
|
|
146
|
+
* The user's style — ward's animated keys merge ON TOP. May be a LIVE getter
|
|
147
|
+
* (the `wardic.*` element layer passes one so a reactive `style` prop is
|
|
148
|
+
* tracked, not frozen at setup), hence `| undefined` to allow a getter that
|
|
149
|
+
* yields no style yet. Reactivity flows via the getter, not a `MaybeAccessor`.
|
|
150
|
+
*/
|
|
151
|
+
readonly style?: WardStyle | string | undefined
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A Wardic element's `style`: every CSS property and the transform keys (`x`, `scale`, `rotate`…),
|
|
156
|
+
* each a value, or a live value that moves the element as it changes: a signal, a memo, or
|
|
157
|
+
* `createSpring`'s or `createTransform`'s. While no animation sets a key, the element shows its
|
|
158
|
+
* `style` value. With a transform key set, a `transform` string is dropped, as Motion's is.
|
|
159
|
+
*
|
|
160
|
+
* @example <w.div style={{ x: createSpring(pointerX), opacity: 0.8 }} />
|
|
161
|
+
*/
|
|
162
|
+
// #130, ADR-0043: a key is its Base value's `style` link; while no layer of the Override stack sets
|
|
163
|
+
// it, the element shows it, following a Live value on every change, and a return goes to where it is.
|
|
164
|
+
export type WardStyle = { readonly [K in keyof WardicValues]?: WardicValues[K] | LiveSource<number | string> | undefined }
|
|
165
|
+
|
|
166
|
+
/** The props a ward spreads on its element: `{...card()}`. */
|
|
167
|
+
export interface WardProps {
|
|
168
|
+
/** Puts the ward on the element as it mounts, beside a `ref` of your own given to `card({ ref })`. */
|
|
169
|
+
// Wires the element into the spine on mount, merging the user's ref (mergeRefs).
|
|
170
|
+
readonly ref: (el: HTMLElement) => void
|
|
171
|
+
/** The element's style as Wardic draws it, over a `style` of your own given to `card({ style })`. */
|
|
172
|
+
// The reactive projected Patch merged with the user's style, typed as JSX.CSSProperties so the
|
|
173
|
+
// spread type-checks (the projected keys are CSS properties).
|
|
174
|
+
readonly style: JSX.CSSProperties
|
|
175
|
+
/** `"false"` on an element that drags, so a drag isn't the browser's own drag-and-drop. */
|
|
176
|
+
// Motion's default, ADR-0019 Amendment (Reorder).
|
|
177
|
+
readonly draggable?: "false"
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* A ward, from `createWard` or `w.createWard`: call it for the props to spread on its element,
|
|
182
|
+
* `{...card()}`, or `{...card({ ref, style })}` to keep your own. `card.value(key)` reads what the
|
|
183
|
+
* element shows, and `card.Provider` hands its variants to the components under it.
|
|
184
|
+
*
|
|
185
|
+
* @see https://wardic.dev/reference/solid/elements/ward
|
|
186
|
+
*/
|
|
187
|
+
// With no args it returns the ward's own ref and style; with WardUserProps, the merged spreadable (the
|
|
188
|
+
// user's ref beside the ward's, the user's style under its animated one). `Provider` (ADR-0007)
|
|
189
|
+
// publishes this instance's variant name and transition down the tree.
|
|
190
|
+
export type Ward = ((userProps?: WardUserProps) => WardProps) & {
|
|
191
|
+
/**
|
|
192
|
+
* Hands this element's variants to the components under it: a child with `variants` follows its
|
|
193
|
+
* names and joins its stagger, as if it were rendered inside the element.
|
|
194
|
+
*/
|
|
195
|
+
// ADR-0007 name propagation: inheriting children resolve the name against their own `variants`.
|
|
196
|
+
readonly Provider: Component<{ readonly children?: JSX.Element }>
|
|
197
|
+
/**
|
|
198
|
+
* What the element shows for `key` now, as an accessor: animated, dragged, or set by a live value
|
|
199
|
+
* in its `style`. A transform key reads a number (`x`, not its `transform`). Derive from it as
|
|
200
|
+
* from any live value: `createTransform(card.value("x"), [-150, 0, 150], [0, 1, 0])`.
|
|
201
|
+
*
|
|
202
|
+
* @example const x = card.value("x")
|
|
203
|
+
*/
|
|
204
|
+
// #130, ADR-0043 decision 5. At rest outside the gate: its `initial`, else its `style` value, else a
|
|
205
|
+
// transform key's identity. A value derived from it and given to another key's `style` moves in the
|
|
206
|
+
// same frame. One accessor per key, made where you'd make a signal.
|
|
207
|
+
readonly value: WardValue
|
|
208
|
+
/** `card.value(key)` as an `effect/reactivity` Atom, for Effect code; `undefined` until the element has a value for it. */
|
|
209
|
+
// FlushGate.valueOf: set as each write that changes it lands. Core's LiveValue helpers take it.
|
|
210
|
+
readonly atom: (key: string) => Atom.Atom<unknown>
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** `card.value`'s type: a transform key always has a value; any other key may have none. */
|
|
214
|
+
export interface WardValue {
|
|
215
|
+
<A extends number | string = number>(key: keyof WardicTransformShorthands): Accessor<A>
|
|
216
|
+
<A extends number | string = number>(key: string): Accessor<A | undefined>
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** A `<Reorder>` item's additions when there are none: a plain element's. */
|
|
220
|
+
const NO_INTERNALS: SpineInternals = {}
|
|
221
|
+
|
|
222
|
+
/** What an element's gestures are wanted by: its config, and its section's Features (#511). */
|
|
223
|
+
interface Wanted {
|
|
224
|
+
readonly config: WardConfig
|
|
225
|
+
readonly services: Context.Context<never>
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Whether an element wants each gesture recognizer (#87, #273), its section having the gesture's
|
|
230
|
+
* Feature (#511): shared by every element.
|
|
231
|
+
*/
|
|
232
|
+
const WANTS: Wants<Wanted> = {
|
|
233
|
+
hover: (w) => wantsHover(w.config) && hasService(w.services, HoverGesture),
|
|
234
|
+
press: (w) => wantsPress(w.config) && hasService(w.services, PressGesture),
|
|
235
|
+
inView: (w) => wantsInView(w.config) && hasService(w.services, InViewGesture),
|
|
236
|
+
focus: (w) => wantsFocus(w.config) && hasService(w.services, FocusGesture),
|
|
237
|
+
pan: (w) => wantsPan(w.config) && hasService(w.services, PanGesture),
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** Each gesture a config may want, its Feature's name and key: what development's word on a missing one checks (#511). */
|
|
241
|
+
const GESTURE_FEATURES: ReadonlyArray<readonly [keyof typeof GESTURE_WORDS, (config: WardConfig) => boolean, Context.Key<unknown, unknown>]> = [
|
|
242
|
+
["hover", wantsHover, HoverGesture],
|
|
243
|
+
["press", wantsPress, PressGesture],
|
|
244
|
+
["inView", wantsInView, InViewGesture],
|
|
245
|
+
["focus", wantsFocus, FocusGesture],
|
|
246
|
+
["pan", wantsPan, PanGesture],
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
/** A `ward()` call's user props when it's given none. */
|
|
250
|
+
const NO_USER_PROPS: WardUserProps = {}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* What a `<Reorder>` item adds to the spine (ADR-0020; internal, D9: nothing in
|
|
254
|
+
* {@link WardConfig}):
|
|
255
|
+
*
|
|
256
|
+
* - `dragAxis`: the gesture's axis, read at each drag's start and held until its end
|
|
257
|
+
* (`true` = free); it makes the element draggable without a `drag` config.
|
|
258
|
+
* - `onDragSample`: each drag sample, after its projection write.
|
|
259
|
+
* - `onLayoutHandle`: the projection node's handle, once registered.
|
|
260
|
+
* - `raiseWhileDragged`: raise the node while dragged.
|
|
261
|
+
* - `lifted`: whether a **Keyboard reorder** has the element lifted (ADR-0037): its `whileDrag`
|
|
262
|
+
* applies then too, as for a drag, with nothing else of the drag's (its `x`/`y` stay the spring's).
|
|
263
|
+
* - `baseStyle`: style under the user's, above the drag defaults (the item's
|
|
264
|
+
* `touch-action`), read reactively.
|
|
265
|
+
* - `tag`: the element's tag, set by `wardic.create(tag)`, so an svg-inner element's
|
|
266
|
+
* Starting style renders its attribute keys as attributes (ADR-0021; a `createWard`
|
|
267
|
+
* spread doesn't know its tag and stays all style).
|
|
268
|
+
* - `brings` and `complete` (#511, ADR-0067): the Features the element brings, beside its section's,
|
|
269
|
+
* and whether it's a **Complete element**, which brings every one. None for a **Slim element**.
|
|
270
|
+
*/
|
|
271
|
+
export interface SpineInternals {
|
|
272
|
+
readonly tag?: string | undefined
|
|
273
|
+
/**
|
|
274
|
+
* The element can never want a gesture (#525): its keys are fixed and it was given none of
|
|
275
|
+
* `GESTURE_KEYS`. It starts no computation to watch for one.
|
|
276
|
+
*/
|
|
277
|
+
readonly gestureless?: boolean | undefined
|
|
278
|
+
readonly brings?: ReadonlyArray<Feature> | undefined
|
|
279
|
+
readonly complete?: boolean | undefined
|
|
280
|
+
/**
|
|
281
|
+
* Whether the element's drag defaults go on it at mount too, for a `wardic.create(Component)`
|
|
282
|
+
* wrap: its component may not pass the spread's `style` and `draggable` on (#253).
|
|
283
|
+
*/
|
|
284
|
+
readonly defaultsOnElement?: boolean | undefined
|
|
285
|
+
readonly dragAxis?: (() => boolean | "x" | "y") | undefined
|
|
286
|
+
readonly onDragSample?: ((sample: Drag.Sample) => void) | undefined
|
|
287
|
+
readonly onLayoutHandle?: ((handle: ProjectionSystem.NodeHandle) => void) | undefined
|
|
288
|
+
readonly raiseWhileDragged?: boolean | undefined
|
|
289
|
+
/** A `<Reorder>` item's: its Enter and Space are its **Keyboard reorder**'s (ADR-0037), so its press hears no keys (#427). */
|
|
290
|
+
readonly keysTaken?: boolean | undefined
|
|
291
|
+
readonly lifted?: Accessor<boolean> | undefined
|
|
292
|
+
readonly baseStyle?: (() => JSX.CSSProperties | undefined) | undefined
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface RunSpineOptions {
|
|
296
|
+
/** The provider runtime the spine forks its fibers on. */
|
|
297
|
+
readonly runtime: WardicRuntime
|
|
298
|
+
/** The provider-owned flush gate (ADR-0006). */
|
|
299
|
+
readonly gate: FlushGate.Shape
|
|
300
|
+
/** SSR/hydration-stable gate id for this element's entry. */
|
|
301
|
+
readonly id: string
|
|
302
|
+
/** The element accessor; the spine is gated on it (started once defined). */
|
|
303
|
+
readonly el: Accessor<HTMLElement | undefined>
|
|
304
|
+
/** Reactive config accessor (animate / whileHover / whileTap / transition read reactively). */
|
|
305
|
+
readonly cfg: Accessor<WardConfig>
|
|
306
|
+
/**
|
|
307
|
+
* The variant context this element inherits from (ADR-0007): its nearest ancestor's with
|
|
308
|
+
* variants, for a Variant child (#50, `variant-node.ts`'s `inherited`), else `undefined`.
|
|
309
|
+
* The spine reads `parent.variant()` reactively to resolve an INHERITED variant name against
|
|
310
|
+
* THIS element's own `variants` (when no local `animate`), starts from `parent.initial` when
|
|
311
|
+
* it has no `initial` of its own, and falls back to `parent.transition()` when this config
|
|
312
|
+
* has no local transition.
|
|
313
|
+
*/
|
|
314
|
+
readonly parent: WardicVariantContextValue | undefined
|
|
315
|
+
/**
|
|
316
|
+
* Called for EVERY emitted spine frame with that frame's `done` flag (ADR-0007
|
|
317
|
+
* orchestration): true on the settling frame, false while moving. The owner
|
|
318
|
+
* uses it to drive the `when` settle signals (a child reports to its parent's
|
|
319
|
+
* registry; a parent reports its OWN settle for `beforeChildren`). Optional —
|
|
320
|
+
* a root instance with no orchestration omits it.
|
|
321
|
+
*/
|
|
322
|
+
readonly onFrame?: ((done: boolean) => void) | undefined
|
|
323
|
+
/**
|
|
324
|
+
* Per-Retarget reactive GATE on starting the spring (ADR-0007 `when`): when it
|
|
325
|
+
* returns false the `on(target)` effect skips starting the primitive and
|
|
326
|
+
* re-runs (the previous fiber is already interrupted, freezing the value at the
|
|
327
|
+
* snapshot) once the accessor flips true. Optional — omitted = always start.
|
|
328
|
+
* Read REACTIVELY inside the spine effect so a flip re-triggers the start.
|
|
329
|
+
*/
|
|
330
|
+
readonly canStart?: (() => boolean) | undefined
|
|
331
|
+
/** Its variant node's binding of its gesture states (#291): the names it hands its Variant children follow them. */
|
|
332
|
+
readonly bindGestures?: ((states: Accessor<GestureStates>) => void) | undefined
|
|
333
|
+
/**
|
|
334
|
+
* Reactive extra delay (seconds) folded into the effective transition's
|
|
335
|
+
* `delay` for the inherited-variant Retarget (ADR-0007 per-child stagger).
|
|
336
|
+
* Read at Retarget time. Optional — omitted = no extra delay.
|
|
337
|
+
*/
|
|
338
|
+
readonly extraDelay?: ((name: string | undefined) => number) | undefined
|
|
339
|
+
/** A list's names orchestrated each on their own (#297's PR 2): the variant node's. */
|
|
340
|
+
readonly byName?: NameOrchestration | undefined
|
|
341
|
+
/** A `<Reorder>` item's additions (internal; see {@link SpineInternals}). */
|
|
342
|
+
readonly internal?: SpineInternals | undefined
|
|
343
|
+
/**
|
|
344
|
+
* The surface's live user style, the `style` link of a key's Base value (ADR-0022): a
|
|
345
|
+
* `createWard` spread's (the style last given to `ward(userProps)`, which is the live getter
|
|
346
|
+
* on `wardic.*`), or `wardic.create(Component)`'s. Read untracked, at need: a style change
|
|
347
|
+
* never Retargets on its own. Omitted on the directives, whose base is the element's own
|
|
348
|
+
* value (its inline style included, read once).
|
|
349
|
+
*/
|
|
350
|
+
readonly styleOf?: (() => object | string | undefined) | undefined
|
|
351
|
+
/**
|
|
352
|
+
* The element's routed `style` keys (#130, ADR-0043): its Live values and transform keys, which
|
|
353
|
+
* the spine writes through the gate while nothing else owns them, and which a return follows.
|
|
354
|
+
* Omitted on the directives, which have no `style` prop.
|
|
355
|
+
*/
|
|
356
|
+
readonly live?: LiveStyle | undefined
|
|
357
|
+
/**
|
|
358
|
+
* Builds the {@link FlushSink} for the registered element: the element itself, plus, for a
|
|
359
|
+
* surface whose `style` prop reaches it (`createWard`, `wardic.create(Component)`), the hooks
|
|
360
|
+
* that switch that `style` (ADR-0034). The spine itself never reads the sink's hooks.
|
|
361
|
+
*/
|
|
362
|
+
readonly makeSink: (el: HTMLElement) => FlushGate.Sink
|
|
363
|
+
/**
|
|
364
|
+
* Whether the element hydrates a server render (ADR-0021): its Appear animation, if the server
|
|
365
|
+
* started one, is taken over at mount (#48, ADR-0044 decision 6). Omitted on the directives.
|
|
366
|
+
*/
|
|
367
|
+
readonly hydrating?: boolean | undefined
|
|
368
|
+
/** The element's tag, for its mount animation's spec (SVG's routing): `undefined` when it isn't known. */
|
|
369
|
+
readonly tag?: string | undefined
|
|
370
|
+
/** Its Features (#511), when its surface has read them already; else the spine reads them. */
|
|
371
|
+
readonly features?: FeatureSection | undefined
|
|
372
|
+
/**
|
|
373
|
+
* Whether the element's drag defaults and base style reach it with its props: a `createWard`
|
|
374
|
+
* spread's `style` and attributes. Otherwise the spine sets them on the element at mount (the
|
|
375
|
+
* directives, and a `wardic.create(Component)` wrap, in case its component doesn't pass them
|
|
376
|
+
* on).
|
|
377
|
+
*/
|
|
378
|
+
readonly defaultsInProps?: boolean | undefined
|
|
379
|
+
/**
|
|
380
|
+
* Whether `element` comes after the last element this ward drove left the page (#414): it enters
|
|
381
|
+
* fresh, as a mount does. Omitted where a ward only ever has one element (the directives).
|
|
382
|
+
*/
|
|
383
|
+
readonly entersFresh?: ((element: HTMLElement) => boolean) | undefined
|
|
384
|
+
/** Put the Starting style for `start` back on the element's `style` until its first commit (#414). */
|
|
385
|
+
readonly restartStyle?: ((start: Start) => void) | undefined
|
|
386
|
+
/** Its **Animation controls** (#433), when its `animate` is some: each change is its entry. */
|
|
387
|
+
readonly controls?: Controls | undefined
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/** An element's **Animation controls** on the Solid 1 binding (#433): the controls, and the change in effect, its signal. */
|
|
391
|
+
export interface Controls {
|
|
392
|
+
readonly controls: WardicAnimationControls
|
|
393
|
+
readonly change: Accessor<ControlsChange | undefined>
|
|
394
|
+
readonly set: (change: ControlsChange) => void
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* `given` with its `animate` read once (#433): **Animation controls** make each change they make its
|
|
399
|
+
* entry, the config marked controlled; anything else leaves it as it is. Under a `WardicConfig`, its
|
|
400
|
+
* **Config transition** is its own when it gives none (#434).
|
|
401
|
+
*/
|
|
402
|
+
export const controlledOf = (given: Accessor<WardConfig>): { readonly cfg: Accessor<WardConfig>; readonly controls: Controls | undefined } => {
|
|
403
|
+
const configured = configuredOf(given, useWardicConfig())
|
|
404
|
+
const animate = untrack(configured).animate
|
|
405
|
+
if (Bool.not(isAnimationControls(animate))) return { cfg: configured, controls: undefined }
|
|
406
|
+
const [change, set] = createSignal<ControlsChange | undefined>(undefined)
|
|
407
|
+
return { cfg: () => controlledConfigOf(configured(), change()), controls: { controls: animate as WardicAnimationControls, change, set: (made) => set(() => made) } }
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* `given` with its **Config transition** as its own when it gives none (#434, Motion's
|
|
412
|
+
* `{ ...config, ...props }`), one object per change; `given` itself with no `WardicConfig` above.
|
|
413
|
+
*/
|
|
414
|
+
const configuredOf = (given: Accessor<WardConfig>, config: WardicConfigValue | undefined): Accessor<WardConfig> => {
|
|
415
|
+
if (Predicate.isUndefined(config)) return given
|
|
416
|
+
return createMemo(() => withConfigTransition(given(), config))
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/** No change: an element without Animation controls. */
|
|
420
|
+
const NO_CHANGE: Accessor<ControlsChange | undefined> = constUndefined
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* The fixed motion spine, factored out so both sink shapes share it (ADR-0006):
|
|
424
|
+
*
|
|
425
|
+
* on(el) once-defined -> gate.register(id, makeSink(element)) -> recognizers
|
|
426
|
+
* (hover/press) -> override-stack memo from cfg() -> on(target) Retarget
|
|
427
|
+
* (springValues / animateValues seeded from the Snapshot ref) -> gate.write.
|
|
428
|
+
*
|
|
429
|
+
* The caller supplies `makeSink`: the gate commits the flushed `Patch` onto the element,
|
|
430
|
+
* whichever surface owns it (ADR-0034). `initial` is read EXACTLY ONCE at setup (`untrack`) to seed the
|
|
431
|
+
* spring's `from` Snapshot (ADR-0003); `animate` / `whileHover` / `whileTap` /
|
|
432
|
+
* `transition` / `variants` are read reactively through `cfg()`.
|
|
433
|
+
*
|
|
434
|
+
* Must be called within a Solid owner (it registers `createEffect` / `onCleanup`).
|
|
435
|
+
*/
|
|
436
|
+
/**
|
|
437
|
+
* Whether a ward's element waits off the page for its held child (#277, ADR-0048): its start queued
|
|
438
|
+
* with the presence (`shown`, made only under one), cancelled with the effect's run.
|
|
439
|
+
*/
|
|
440
|
+
const heldBack = (presence: PresenceContextValue | undefined, element: HTMLElement, shown: (() => void) | undefined): boolean => {
|
|
441
|
+
if (Predicate.isUndefined(shown)) return false
|
|
442
|
+
const cancel = presenceHold(presence, element, shown)
|
|
443
|
+
if (Predicate.isUndefined(cancel)) return false
|
|
444
|
+
onCleanup(cancel)
|
|
445
|
+
return true
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/** A layout node on its way as its element mounted (#582): made by `arrive` if `layout` is here now. */
|
|
449
|
+
interface LateLayout {
|
|
450
|
+
handle: ProjectionSystem.NodeHandle | undefined
|
|
451
|
+
readonly arrive: () => void
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/** An element's layout node now: made at its mount, or as `layout` arrived (#582). */
|
|
455
|
+
const layoutNodeOf = (atMount: ProjectionSystem.NodeHandle | undefined, later: LateLayout | undefined): ProjectionSystem.NodeHandle | undefined =>
|
|
456
|
+
UndefinedOr.match(atMount, { onDefined: identity, onUndefined: () => UndefinedOr.match(later, { onDefined: (l) => l.handle, onUndefined: constUndefined }) })
|
|
457
|
+
|
|
458
|
+
export function runSpine(opts: RunSpineOptions): void {
|
|
459
|
+
const { bindGestures, byName, canStart, cfg, controls, defaultsInProps, el, entersFresh, extraDelay, gate, hydrating, id, internal = NO_INTERNALS, live, makeSink, onFrame, parent, restartStyle, runtime, styleOf, tag } = opts
|
|
460
|
+
// Its Features (#511, ADR-0067): its section's, and those it brings.
|
|
461
|
+
const features = UndefinedOr.match(opts.features, { onDefined: identity, onUndefined: () => useElementFeatures(internal.brings, internal.complete === true) })
|
|
462
|
+
// Its section's projection system, the `layout` Feature's (#511): `undefined` without it. Read now,
|
|
463
|
+
// which builds the Features given to its section at once: the first element to ask builds them.
|
|
464
|
+
const layoutProjection = projectionIn(untrack(features.services))
|
|
465
|
+
// The provider's, once any section has built it: what its values register with.
|
|
466
|
+
const builtProjection = useBuiltProjection()
|
|
467
|
+
// Its Animation controls' change (#433), read with the Override stack: none without them.
|
|
468
|
+
const ownChange = UndefinedOr.match(controls, { onUndefined: () => NO_CHANGE, onDefined: (c) => c.change })
|
|
469
|
+
|
|
470
|
+
// The nearest <AnimatePresence>, or undefined at the root (ADR-0007). When
|
|
471
|
+
// present, this spine publishes its live value-map (`snapshot`) + exit target
|
|
472
|
+
// (`exit`) into a presence registration; the PARENT drives the exit on leave
|
|
473
|
+
// (this child is disposed). The child does NOT unregister on its own
|
|
474
|
+
// onCleanup — <AnimatePresence> owns removal after the exit settles.
|
|
475
|
+
const presence = usePresenceContext()
|
|
476
|
+
// The Layout group it's made in (#432): its `layoutId`'s namespace.
|
|
477
|
+
const layoutGroup = useLayoutGroupId()
|
|
478
|
+
|
|
479
|
+
// Whether reduced motion applies (ADR-0029), read at each Retarget.
|
|
480
|
+
const reducedMotion = useWardicReducedMotion()
|
|
481
|
+
// Whether its animations are skipped (#468): its nearest WardicConfig's, read as each starts.
|
|
482
|
+
const skipAnimations = useWardicSkipAnimations()
|
|
483
|
+
// Where its drag's and pan's points are (#443): its nearest WardicConfig's, read as each starts.
|
|
484
|
+
const pagePoint = transformPagePointOf(useWardicConfig())
|
|
485
|
+
const positionalKeys = useWardicPositionalKeys()
|
|
486
|
+
// What a key with no transition of its own runs on (ADR-0051).
|
|
487
|
+
const defaultTransition = useWardicDefaultTransition()
|
|
488
|
+
|
|
489
|
+
// Starting style: resolved purely from the config read EXACTLY ONCE (untrack — no
|
|
490
|
+
// reactive dependency, must not re-seed after mount), with the inherited `initial`
|
|
491
|
+
// name for a Variant child that has none (#50). Seeds the spring `from` Snapshot so
|
|
492
|
+
// frame 1 flows continuously out of it (no snap).
|
|
493
|
+
const start = startOf(untrack(cfg), parent, presenceBlocksInitial(presence), untrack)
|
|
494
|
+
const snapshot = snapshotOf(start)
|
|
495
|
+
const reuse = makeReuse()
|
|
496
|
+
// Where an element starts (#414): the ward's start, or, for one that comes after the last left the
|
|
497
|
+
// page, a fresh one, as a mount after the first render's (no presence holds its `initial` back).
|
|
498
|
+
// Its Snapshot goes back to it, and its Starting style comes back on until its first commit.
|
|
499
|
+
const beginOf = (element: HTMLElement): Start => {
|
|
500
|
+
if (Predicate.isUndefined(entersFresh)) return start
|
|
501
|
+
if (Bool.not(entersFresh(element))) return start
|
|
502
|
+
const fresh = startOf(untrack(cfg), parent, false, untrack)
|
|
503
|
+
snapshot.values = { ...fresh.initialValues }
|
|
504
|
+
snapshot.velocities = {}
|
|
505
|
+
snapshot.drawnAt = {}
|
|
506
|
+
if (Predicate.isNotUndefined(restartStyle)) restartStyle(fresh)
|
|
507
|
+
return fresh
|
|
508
|
+
}
|
|
509
|
+
// The config and the user's style, as the spine reads them: untracked.
|
|
510
|
+
const configNow = (): WardConfig => untrack(cfg)
|
|
511
|
+
const styleNow = UndefinedOr.map(styleOf, (of) => () => untrack(of))
|
|
512
|
+
|
|
513
|
+
// Inside a child `mode="wait"` holds off the page (#277, ADR-0048), everything starts once the child
|
|
514
|
+
// is on it: `shown` ticks then, and the effect below runs again. Only under a presence: with none,
|
|
515
|
+
// nothing is made or called here (a check per element at mount cost the first Retarget ~9% cold).
|
|
516
|
+
let mountedOn: Accessor<HTMLElement | undefined> = el
|
|
517
|
+
let shown: (() => void) | undefined
|
|
518
|
+
if (Predicate.isNotUndefined(presence)) {
|
|
519
|
+
const [ticked, tick] = createSignal<void>(undefined, { equals: false })
|
|
520
|
+
shown = () => tick()
|
|
521
|
+
mountedOn = () => {
|
|
522
|
+
ticked()
|
|
523
|
+
return el()
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// Start everything once the element mounts. createEffect(on(el, ...)) re-runs
|
|
528
|
+
// only when the element identity changes; the spine inner-effect lives under
|
|
529
|
+
// this owner so onCleanup teardown (gate.unregister + fiber interrupts) fires
|
|
530
|
+
// on unmount.
|
|
531
|
+
createEffect(
|
|
532
|
+
on(mountedOn, (element) => {
|
|
533
|
+
if (Predicate.isUndefined(element)) return
|
|
534
|
+
// Held off the page: nothing starts until it's on it.
|
|
535
|
+
if (heldBack(presence, element, shown)) return
|
|
536
|
+
// Its start: the ward's, or a fresh one when it comes after the last element left (#414).
|
|
537
|
+
const begin = beginOf(element)
|
|
538
|
+
|
|
539
|
+
// Register the element with the caller-supplied sink (ADR-0006): each
|
|
540
|
+
// flushed frame's Patch is committed onto it (ADR-0034). An element with `onUpdate` at mount
|
|
541
|
+
// is told each committed frame (#233); any other never joins the gate's tells. While
|
|
542
|
+
// hydrating, its Appear animation is found here, taken over by its first Retarget that
|
|
543
|
+
// starts, and removed in its first commit (#48, ADR-0044 decision 6).
|
|
544
|
+
const handoff = Bool.match(hydrating === true, { onTrue: () => Option.getOrUndefined(handoffOf(element)), onFalse: constUndefined })
|
|
545
|
+
// Its Transform template (#443), drawn with its first write: the one at mount, then each other
|
|
546
|
+
// one its config gives.
|
|
547
|
+
const templateAtMount = untrack(cfg).transformTemplate
|
|
548
|
+
let template = templateAtMount
|
|
549
|
+
const registered = registeredValuesOf(templateAtMount)
|
|
550
|
+
const unregister = gate.register(id, releasingAppear(withOnUpdate(makeSink(element), untrack(cfg).onUpdate, configNow), handoff, element), registered)
|
|
551
|
+
onCleanup(unregister)
|
|
552
|
+
|
|
553
|
+
// A surface whose props don't carry a drag element's defaults (ADR-0019 *Amendment
|
|
554
|
+
// (Reorder)*): set each one the element's inline style doesn't already, and the
|
|
555
|
+
// attribute unless it has one, once at mount.
|
|
556
|
+
if (defaultsInProps !== true) {
|
|
557
|
+
const base = internal.baseStyle
|
|
558
|
+
if (Predicate.isNotUndefined(base)) {
|
|
559
|
+
// The base style goes under the user's: a key the element's own inline style
|
|
560
|
+
// sets at mount is the user's, and is never written.
|
|
561
|
+
const own = new Set<string>(element.style)
|
|
562
|
+
const write = (style: Record<string, unknown> | undefined): void => {
|
|
563
|
+
if (Predicate.isUndefined(style)) return
|
|
564
|
+
Arr.forEach(Rec.keys(style), (key) => {
|
|
565
|
+
if (Bool.not(own.has(key))) element.style.setProperty(key, String(style[key]))
|
|
566
|
+
})
|
|
567
|
+
}
|
|
568
|
+
// Written now, then on each change. Now, not in the effect's first run: that runs
|
|
569
|
+
// just before this element's spine effect, whose first Retarget may read the
|
|
570
|
+
// element's Own values (ADR-0022), so a list of items would alternate a write and a
|
|
571
|
+
// read per item and force a style recalculation each (#47's mount measurement).
|
|
572
|
+
write(untrack(base) as Record<string, unknown> | undefined)
|
|
573
|
+
createEffect(on(base, (style) => write(style as Record<string, unknown> | undefined), { defer: true }))
|
|
574
|
+
}
|
|
575
|
+
UndefinedOr.map(dragDefaultsOf(untrack(cfg), internal), (defaults) => applyDragDefaults(element, defaults))
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// Base values (ADR-0022): a key with no value starts from its `style` value, else its Own
|
|
579
|
+
// value, read from the element once per key, at first need (D3).
|
|
580
|
+
const links = startLinksOf(element, styleNow, live)
|
|
581
|
+
|
|
582
|
+
// --- Presence registration (ADR-0007 exit) -------------------------------
|
|
583
|
+
// Under an <AnimatePresence>, publish a live record so the PARENT can drive
|
|
584
|
+
// this element's exit after Solid disposes its owner. `snapshot.current` is
|
|
585
|
+
// updated to the latest emitted value-map EACH FRAME (so the exit departs
|
|
586
|
+
// continuously from where the element rests); what its exit resolves from (#277: its `exit`,
|
|
587
|
+
// `variants`, `custom` and transition) is kept current while it's alive, and resolved as it
|
|
588
|
+
// leaves. The child does NOT call the disposer on its own
|
|
589
|
+
// onCleanup — <AnimatePresence> removes the registration after the exit settles.
|
|
590
|
+
let presenceRec: PresenceRecord | undefined
|
|
591
|
+
// Where it starts when its child takes over from a leaver (#286): asked before its layout node
|
|
592
|
+
// registers, which moves from the leaver's box, and before its first Retarget.
|
|
593
|
+
let taken: PresenceSeed | undefined
|
|
594
|
+
if (Predicate.isNotUndefined(presence)) {
|
|
595
|
+
const exitConfig = { current: exitConfigOf(untrack(cfg), parent) }
|
|
596
|
+
const rec = presenceRecordOf(element, begin, (custom, inherited) => exitTargetOf(exitConfig.current, custom, snapshot, inherited), links, presenceTreeOf(untrack(cfg)), snapshot, reducedMotion, skipAnimations)
|
|
597
|
+
presenceRec = rec
|
|
598
|
+
presence.register(rec)
|
|
599
|
+
taken = presenceSeedOf(presence, element)
|
|
600
|
+
createEffect(() => {
|
|
601
|
+
exitConfig.current = exitConfigOf(cfg(), parent)
|
|
602
|
+
})
|
|
603
|
+
}
|
|
604
|
+
const recordFrame = recordFrameOf(presenceRec)
|
|
605
|
+
|
|
606
|
+
// Every element's values, by element, for the projection (ADR-0012 *Amendment (#137)*): a twin's
|
|
607
|
+
// flight follows the translate and scale Wardic animates on its ancestors each frame.
|
|
608
|
+
// None while no section has `layout`: there's no flight to follow them (#511).
|
|
609
|
+
UndefinedOr.map(builtProjection(), (projection) => onCleanup(projection.registerValues(element, () => snapshot.values)))
|
|
610
|
+
// Its exit is drawn through its template (#443): it rides in its presence record, whose drawn
|
|
611
|
+
// values the projection reads as it leaves. A later one is written with the values it holds, so
|
|
612
|
+
// the commit that may take its Starting style off holds them.
|
|
613
|
+
// Nothing with none (#460): no follow, and nothing for its cleanup to run.
|
|
614
|
+
if (Predicate.isNotUndefined(templateAtMount)) {
|
|
615
|
+
recordFrame(registered as Values.Values)
|
|
616
|
+
onCleanup(
|
|
617
|
+
followTemplate(templateAtMount, () => cfg().transformTemplate, reactivity.watch, (next) => {
|
|
618
|
+
template = next
|
|
619
|
+
const values = { ...snapshot.values, [DomRenderer.TEMPLATE_KEY]: next }
|
|
620
|
+
gate.write(id, values)
|
|
621
|
+
recordFrame({ [DomRenderer.TEMPLATE_KEY]: next } as unknown as Values.Values)
|
|
622
|
+
}),
|
|
623
|
+
)
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
// --- Layout / shared-element / scroll projection (ADR-0009/0010/0012) ---
|
|
627
|
+
// ONE projection node per element: `layout`, `layoutId`, and/or `layoutScroll`
|
|
628
|
+
// feed the SAME node (no double registration). `layout` is a static enable
|
|
629
|
+
// flag; `layoutId` (static, read once) enrols the node in the engine's
|
|
630
|
+
// lead/follow stack (crossfade) and lets a twin disposed in the same task seed
|
|
631
|
+
// it (a Switch, engine-side — ADR-0010 *Amendment (#13)*); `layoutScroll`
|
|
632
|
+
// (static) marks it a scroll container whose scroll is folded out of its
|
|
633
|
+
// descendants' boxes. All static,
|
|
634
|
+
// read once — the reserved props layoutRoot/layoutAnchor remain typed-but-no-op
|
|
635
|
+
// (P4).
|
|
636
|
+
const c0 = untrack(cfg)
|
|
637
|
+
// layout / layoutId / layoutScroll / layoutRoot each warrant a node; layoutAnchor
|
|
638
|
+
// alone does not (it only tunes a node that already projects), but is forwarded.
|
|
639
|
+
let layoutHandle: ProjectionSystem.NodeHandle | undefined
|
|
640
|
+
// What every release runs on, the layout node's Release offset and the drag track's (ADR-0016, *Amendment (#140)*).
|
|
641
|
+
const dragTransition = dragTransitionOf(c0.dragElastic, c0.dragTransition)
|
|
642
|
+
// Its section's `layout` makes its node (#511): without it, its layout props do nothing, and
|
|
643
|
+
// development says so once, unless `layout` is on its way.
|
|
644
|
+
if (DEV && wantsLayoutNode(c0) && Predicate.isUndefined(layoutProjection) && Bool.not(untrack(features.pending))) {
|
|
645
|
+
useFeatureRegistry().warnOnce("layout", missingMessage("layout", LAYOUT_PROPS, "@wardic/solid"))
|
|
646
|
+
}
|
|
647
|
+
// `layout` on its way (#582): its node is made as it arrives, under this owner, as Motion's is,
|
|
648
|
+
// and measures from then on; nothing before it is replayed. A load that brings none gets
|
|
649
|
+
// development's word then.
|
|
650
|
+
let lateLayout: LateLayout | undefined
|
|
651
|
+
if (wantsLayoutNode(c0)) {
|
|
652
|
+
// What its node is made with, copied into this block: the closures here hold only these, so an
|
|
653
|
+
// element with no layout prop keeps none of them (#551's lesson).
|
|
654
|
+
const ward = {
|
|
655
|
+
id,
|
|
656
|
+
element,
|
|
657
|
+
config: cfg,
|
|
658
|
+
parent,
|
|
659
|
+
snapshot,
|
|
660
|
+
dragTransition,
|
|
661
|
+
raiseWhileDragged: internal.raiseWhileDragged === true,
|
|
662
|
+
layoutGroup,
|
|
663
|
+
reducedMotion,
|
|
664
|
+
skipAnimations,
|
|
665
|
+
heldTransform: heldTransformFor(snapshot, templateAtMount, () => template),
|
|
666
|
+
}
|
|
667
|
+
const onLayoutHandle = internal.onLayoutHandle
|
|
668
|
+
// Its node on `projection`, handed to a `<Reorder>` item's group; `takenNow`, where a child that
|
|
669
|
+
// takes over from a leaver starts, at its mount only (#286).
|
|
670
|
+
const layoutNodeOn = (projection: ProjectionSystem.Shape, takenNow: PresenceSeed | undefined): ProjectionSystem.NodeHandle => {
|
|
671
|
+
const handle = projectionNodeOf(projection, layoutOptionsOf({ ...ward, taken: takenNow }))
|
|
672
|
+
if (Predicate.isNotUndefined(onLayoutHandle)) onLayoutHandle(handle)
|
|
673
|
+
return handle
|
|
674
|
+
}
|
|
675
|
+
if (Predicate.isNotUndefined(layoutProjection)) layoutHandle = layoutNodeOn(layoutProjection, taken)
|
|
676
|
+
if (Predicate.isUndefined(layoutProjection) && untrack(features.pending)) {
|
|
677
|
+
const owner = getOwner()
|
|
678
|
+
const registry = useFeatureRegistry()
|
|
679
|
+
const section = features
|
|
680
|
+
const later: LateLayout = {
|
|
681
|
+
handle: undefined,
|
|
682
|
+
arrive: () => {
|
|
683
|
+
if (Predicate.isNotUndefined(later.handle)) return
|
|
684
|
+
UndefinedOr.match(projectionIn(section.services()), {
|
|
685
|
+
onDefined: (arrived) => {
|
|
686
|
+
later.handle = runWithOwner(owner, () => untrack(() => layoutNodeOn(arrived, undefined)))
|
|
687
|
+
},
|
|
688
|
+
onUndefined: () => {
|
|
689
|
+
if (DEV && Bool.not(section.pending())) registry.warnOnce("layout", missingMessage("layout", LAYOUT_PROPS, "@wardic/solid"))
|
|
690
|
+
},
|
|
691
|
+
})
|
|
692
|
+
},
|
|
693
|
+
}
|
|
694
|
+
lateLayout = later
|
|
695
|
+
createComputed(later.arrive)
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
// The app's gesture callbacks (#273, ADR-0047), each read from the config when it's called: made
|
|
700
|
+
// at the first gesture that needs them, as most elements have none.
|
|
701
|
+
let gestures: GestureCallbacks | undefined
|
|
702
|
+
const gesturesOf = (): GestureCallbacks => {
|
|
703
|
+
if (Predicate.isUndefined(gestures)) gestures = gestureCallbacksOf(runtime, id, () => untrack(cfg))
|
|
704
|
+
return gestures
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// --- Drag track (ADR-0004) ----------------------------------------------
|
|
708
|
+
// When cfg().drag is truthy, run the binding-orchestrated drag track: the
|
|
709
|
+
// pointer DIRECT-SETS x/y (1:1, not sprung) while the spring keeps driving
|
|
710
|
+
// every other key + whileDrag. `dragging` is the ONLY reactive piece (it
|
|
711
|
+
// gates the whileDrag override + the translate-key strip); the drag
|
|
712
|
+
// CONFIG is static — read ONCE here (untrack), since drag config is a
|
|
713
|
+
// document. The track's single fiber is scoped to this owner's onCleanup.
|
|
714
|
+
const dragCfg = dragAxisOf(untrack(cfg), internal)
|
|
715
|
+
const [dragging, setDragging] = createSignal(false)
|
|
716
|
+
// Its hold on `x`/`y`, for the spine's Retargets (#340).
|
|
717
|
+
let dragTrack: DragTrack | undefined
|
|
718
|
+
// Its track's holder while `drag` is on its way (#551): the spine reads the track there, and
|
|
719
|
+
// whether it drives the layout node (#582).
|
|
720
|
+
let late: { track: DragTrack | undefined; projected: boolean } | undefined
|
|
721
|
+
// Its section's `drag` Feature drives it (#511): without it, `drag` does nothing, and development
|
|
722
|
+
// says so once, unless `drag` is on its way.
|
|
723
|
+
const dragGesture = serviceIn(untrack(features.services), DragGesture)
|
|
724
|
+
if (DEV && Predicate.isNotUndefined(dragCfg) && Predicate.isUndefined(dragGesture) && Bool.not(untrack(features.pending))) {
|
|
725
|
+
useFeatureRegistry().warnOnce("drag", missingMessage("drag", GESTURE_WORDS.drag, "@wardic/solid"))
|
|
726
|
+
}
|
|
727
|
+
if (Predicate.isNotUndefined(dragCfg)) {
|
|
728
|
+
// What the track is made with, copied into this block: a closure here holds only these, so an
|
|
729
|
+
// element that never drags keeps none of them (#551).
|
|
730
|
+
const axis = dragCfg
|
|
731
|
+
const transition = dragTransition
|
|
732
|
+
const setDrag = draggingWithWillChange(live, setDragging)
|
|
733
|
+
const nodeAtMount = layoutHandle
|
|
734
|
+
const nodeLater = lateLayout
|
|
735
|
+
// It drives the layout node the element has as it's made, at mount or as `drag` arrives: a
|
|
736
|
+
// node made later leaves it moving `x`/`y` (#582).
|
|
737
|
+
const trackWith = (dragGesture: DragGesture["Service"]): DragTrack => {
|
|
738
|
+
const projection = layoutNodeOf(nodeAtMount, nodeLater)
|
|
739
|
+
const c0d = untrack(cfg)
|
|
740
|
+
// Motion's `dragConstraints` (#273): a box of numbers, or a container measured against the element.
|
|
741
|
+
const constraints = dragGesture.constraintsOf(c0d.dragConstraints, element, () => untrack(cfg).onMeasureDragConstraints, pagePoint)
|
|
742
|
+
const trackConfig: DragTrackConfig = {
|
|
743
|
+
axis,
|
|
744
|
+
constraints: constraints.constraints,
|
|
745
|
+
elastic: c0d.dragElastic,
|
|
746
|
+
momentum: c0d.dragMomentum,
|
|
747
|
+
snapToOrigin: c0d.dragSnapToOrigin,
|
|
748
|
+
propagation: c0d.dragPropagation,
|
|
749
|
+
directionLock: c0d.dragDirectionLock,
|
|
750
|
+
transition,
|
|
751
|
+
listen: c0d.dragListener,
|
|
752
|
+
}
|
|
753
|
+
return runDragTrackWith(dragGesture.drive, {
|
|
754
|
+
runtime,
|
|
755
|
+
gate,
|
|
756
|
+
id,
|
|
757
|
+
element,
|
|
758
|
+
snapshot,
|
|
759
|
+
recordFrame,
|
|
760
|
+
// A drag's start turns its `style`'s will-change value on (#443).
|
|
761
|
+
setDragging: setDrag,
|
|
762
|
+
mapPoint: pagePoint,
|
|
763
|
+
config: trackConfig,
|
|
764
|
+
skipAnimations,
|
|
765
|
+
container: constraints.container,
|
|
766
|
+
controls: c0d.dragControls,
|
|
767
|
+
// ADR-0016: a drag on a LAYOUT node feeds the projection, not its own x/y
|
|
768
|
+
// (drawn on top, #363), so the dragged item follows the pointer and FLIPs to
|
|
769
|
+
// its slot on release. Free drag (no handle) is unchanged.
|
|
770
|
+
...UndefinedOr.match(projection, { onUndefined: () => ({}), onDefined: (node) => ({ projection: node }) }),
|
|
771
|
+
...UndefinedOr.match(internal.dragAxis, { onUndefined: () => ({}), onDefined: (axisAt) => ({ axisAt }) }),
|
|
772
|
+
// Its samples to a `<Reorder>` item's group, and to the app's drag callbacks (#273).
|
|
773
|
+
onSample: UndefinedOr.match(internal.onDragSample, {
|
|
774
|
+
onUndefined: () => gesturesOf().dragged,
|
|
775
|
+
onDefined: (onSample) => {
|
|
776
|
+
const { dragged } = gesturesOf()
|
|
777
|
+
return (sample: Drag.Sample) => {
|
|
778
|
+
onSample(sample)
|
|
779
|
+
dragged(sample)
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
}),
|
|
783
|
+
onReleaseEnd: gesturesOf().released,
|
|
784
|
+
})
|
|
785
|
+
}
|
|
786
|
+
if (Predicate.isNotUndefined(dragGesture)) dragTrack = trackWith(dragGesture)
|
|
787
|
+
// `drag` on its way (#551): the track starts as it arrives, from then on, as a gesture's
|
|
788
|
+
// recognizer does, under this owner; nothing before it is replayed. A load that brings none
|
|
789
|
+
// gets development's word then.
|
|
790
|
+
if (Predicate.isUndefined(dragGesture) && untrack(features.pending)) {
|
|
791
|
+
const held: { track: DragTrack | undefined; projected: boolean } = { track: undefined, projected: false }
|
|
792
|
+
late = held
|
|
793
|
+
const owner = getOwner()
|
|
794
|
+
const registry = useFeatureRegistry()
|
|
795
|
+
const section = features
|
|
796
|
+
createComputed(() => {
|
|
797
|
+
if (Predicate.isNotUndefined(held.track)) return
|
|
798
|
+
UndefinedOr.match(serviceIn(section.services(), DragGesture), {
|
|
799
|
+
onDefined: (arrived) => {
|
|
800
|
+
// A `layout` from the same load makes its node first, so the track drives it (#582).
|
|
801
|
+
if (Predicate.isNotUndefined(nodeLater)) nodeLater.arrive()
|
|
802
|
+
held.projected = Predicate.isNotUndefined(layoutNodeOf(nodeAtMount, nodeLater))
|
|
803
|
+
held.track = runWithOwner(owner, () => untrack(() => trackWith(arrived)))
|
|
804
|
+
},
|
|
805
|
+
onUndefined: () => {
|
|
806
|
+
if (DEV && Bool.not(section.pending())) registry.warnOnce("drag", missingMessage("drag", GESTURE_WORDS.drag, "@wardic/solid"))
|
|
807
|
+
},
|
|
808
|
+
})
|
|
809
|
+
})
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
// Recognizers over the live element, each started the first time its config wants it, as
|
|
814
|
+
// Motion's features are (#87, ADR-0040; #273): `whileHover` or a hover callback, `whileTap` or a
|
|
815
|
+
// tap callback, a pan callback. Each hover and press transition sets its layer; each event is
|
|
816
|
+
// told to the app's callbacks, at the event. Their fibers are scoped to this owner's onCleanup
|
|
817
|
+
// (runScoped). Until started, a layer reads false.
|
|
818
|
+
// Each through its section's Feature (#511), read with the config, so one that arrives lazily
|
|
819
|
+
// starts what the config wants of it from then on.
|
|
820
|
+
const gestureOf = <I, S>(key: Context.Key<I, S>): S => UndefinedOr.getOrThrow(serviceIn(untrack(features.services), key))
|
|
821
|
+
// An element that can never want one watches for none (#525): no computation an element.
|
|
822
|
+
let started: Accessor<Started> = NEVER_STARTED
|
|
823
|
+
if (internal.gestureless !== true) started = createWhenWanted(() => ({ config: cfg(), services: features.services() }), WANTS, {
|
|
824
|
+
hover: () =>
|
|
825
|
+
watchToSignal<boolean>(
|
|
826
|
+
({ on, onDefect }) =>
|
|
827
|
+
gestureOf(HoverGesture).watch(element, {
|
|
828
|
+
on: (transition) => {
|
|
829
|
+
gesturesOf().hovered(transition)
|
|
830
|
+
on(transition.active)
|
|
831
|
+
},
|
|
832
|
+
onDefect,
|
|
833
|
+
}),
|
|
834
|
+
false,
|
|
835
|
+
),
|
|
836
|
+
press: () =>
|
|
837
|
+
watchToSignal<boolean>(
|
|
838
|
+
({ on, onDefect }) =>
|
|
839
|
+
gestureOf(PressGesture).watch(
|
|
840
|
+
element,
|
|
841
|
+
{
|
|
842
|
+
on: (press) => {
|
|
843
|
+
gesturesOf().pressed(press, element)
|
|
844
|
+
on(press.phase === "start")
|
|
845
|
+
},
|
|
846
|
+
onDefect,
|
|
847
|
+
},
|
|
848
|
+
internal.keysTaken === true,
|
|
849
|
+
() => tapPropagates(untrack(cfg).propagate),
|
|
850
|
+
),
|
|
851
|
+
false,
|
|
852
|
+
),
|
|
853
|
+
// In view as its `viewport` says, read when it starts; each transition told to the viewport callbacks.
|
|
854
|
+
inView: () =>
|
|
855
|
+
watchToSignal<boolean>(
|
|
856
|
+
({ on, onDefect }) =>
|
|
857
|
+
gestureOf(InViewGesture).watch(element, inViewOptionsOf(untrack(cfg).viewport), {
|
|
858
|
+
on: (transition) => {
|
|
859
|
+
gesturesOf().viewed(transition)
|
|
860
|
+
on(transition.active)
|
|
861
|
+
},
|
|
862
|
+
onDefect,
|
|
863
|
+
}),
|
|
864
|
+
false,
|
|
865
|
+
),
|
|
866
|
+
// Focused as the browser shows it (`:focus-visible`, Motion's `whileFocus`).
|
|
867
|
+
focus: () => watchToSignal<boolean>((handlers) => gestureOf(FocusGesture).watch(element, { visible: true }, handlers), false),
|
|
868
|
+
pan: () => runWatch(runtime, (onDefect) => gestureOf(PanGesture).watch(element, { on: (sample) => gesturesOf().panned(sample), onDefect }, { mapPoint: pointMapOptionOf(pagePoint) })),
|
|
869
|
+
})
|
|
870
|
+
if (DEV && internal.complete !== true && internal.gestureless !== true) warnMissingGestures(useFeatureRegistry(), features, cfg)
|
|
871
|
+
|
|
872
|
+
// Its gesture states: the started recognizers, one tracked read, then each started one's state.
|
|
873
|
+
// A keyboard lift turns `whileDrag` on, as a drag does (ADR-0037).
|
|
874
|
+
const lifted = internal.lifted
|
|
875
|
+
const active = (): Active => {
|
|
876
|
+
const held = dragging()
|
|
877
|
+
const layers = started()
|
|
878
|
+
return {
|
|
879
|
+
inView: stateOf(layers.inView),
|
|
880
|
+
focused: stateOf(layers.focus),
|
|
881
|
+
hovered: stateOf(layers.hover),
|
|
882
|
+
pressed: stateOf(layers.press),
|
|
883
|
+
dragged: Bool.or(held, Predicate.isNotUndefined(lifted) && lifted()),
|
|
884
|
+
dragging: held,
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
// The Override stack (`resolutionOf`), compared by value, as Solid 2's (#470): a reactive config
|
|
888
|
+
// change, a recognizer's flip or the drag's recomputes it, and only one that resolves a new
|
|
889
|
+
// target drives a Retarget. A `transition`, a callback or an option alone tells nothing, as
|
|
890
|
+
// Motion's doesn't.
|
|
891
|
+
const target = createMemo((): Resolution => resolutionOf(cfg(), parent, begin.initialLink, active(), snapshot, ownChange()), undefined, { equals: sameResolution })
|
|
892
|
+
// A colour only the `colors` Feature reads, on a Slim element without it (#511, decision 7): said
|
|
893
|
+
// once per provider, in development only, and not while a lazy load is on its way.
|
|
894
|
+
if (DEV && internal.complete !== true) warnUnreadColors(useFeatureRegistry(), features, () => target().resolved)
|
|
895
|
+
// Its gesture states, for the names its variant node hands down (#291): read from the gestures
|
|
896
|
+
// themselves, as a gesture whose layer resolves nothing new leaves the target as it was.
|
|
897
|
+
if (Predicate.isNotUndefined(bindGestures)) bindGestures(active)
|
|
898
|
+
|
|
899
|
+
// The spine (`spine.ts`): on each target change, end the running legs and reseed a fresh
|
|
900
|
+
// primitive from the Snapshot (velocity-preserving), into the gate.
|
|
901
|
+
const spineOptions: ElementSpineOptions = {
|
|
902
|
+
runtime,
|
|
903
|
+
gate,
|
|
904
|
+
id,
|
|
905
|
+
element,
|
|
906
|
+
tag,
|
|
907
|
+
config: configNow,
|
|
908
|
+
parent,
|
|
909
|
+
canStart,
|
|
910
|
+
extraDelay,
|
|
911
|
+
byName,
|
|
912
|
+
onFrame,
|
|
913
|
+
reducedMotion,
|
|
914
|
+
skipAnimations,
|
|
915
|
+
positionalKeys,
|
|
916
|
+
defaultTransition,
|
|
917
|
+
start: begin,
|
|
918
|
+
snapshot,
|
|
919
|
+
reuse,
|
|
920
|
+
links,
|
|
921
|
+
styleNow,
|
|
922
|
+
live,
|
|
923
|
+
presence: presenceRec,
|
|
924
|
+
projected: Predicate.isNotUndefined(layoutHandle),
|
|
925
|
+
dragAxis: dragCfg,
|
|
926
|
+
drag: dragTrack,
|
|
927
|
+
handoff,
|
|
928
|
+
// Motion's onAnimationStart / onAnimationComplete (#257).
|
|
929
|
+
animation: animationCallbacks(runtime, id),
|
|
930
|
+
}
|
|
931
|
+
// A track that starts once `drag` arrives (#551) is read at each Retarget from then on: only
|
|
932
|
+
// then is `drag` a getter, so an element that has it at mount, or never wants it, pays nothing.
|
|
933
|
+
if (Predicate.isNotUndefined(late)) {
|
|
934
|
+
const held = late
|
|
935
|
+
Object.defineProperty(spineOptions, "drag", { get: () => held.track })
|
|
936
|
+
// Whether that track drives the layout node (#582): until it starts, whether the element has one.
|
|
937
|
+
const nodeAtMount = layoutHandle
|
|
938
|
+
const nodeLater = lateLayout
|
|
939
|
+
Object.defineProperty(spineOptions, "projected", {
|
|
940
|
+
get: () =>
|
|
941
|
+
UndefinedOr.match(held.track, { onUndefined: () => Predicate.isNotUndefined(layoutNodeOf(nodeAtMount, nodeLater)), onDefined: () => held.projected }),
|
|
942
|
+
})
|
|
943
|
+
}
|
|
944
|
+
const spine = makeElementSpine(spineOptions)
|
|
945
|
+
onCleanup(spine.dispose)
|
|
946
|
+
// Its Imperative animations (#433) go through its spine while it's mounted.
|
|
947
|
+
onCleanup(registerAnimatable(element, spine))
|
|
948
|
+
// Its Animation controls (#433) reach it while it's mounted.
|
|
949
|
+
UndefinedOr.map(controls, (c) => onCleanup(subscribe(c.controls, controlledElement(c.set, { custom: () => untrack(cfg).custom, snapshot }, spine.stop))))
|
|
950
|
+
// A child back under its key starts where its leaver is drawn (#286), before its first Retarget.
|
|
951
|
+
if (Predicate.isNotUndefined(taken)) spine.seed(taken)
|
|
952
|
+
|
|
953
|
+
// The spine effect depends on BOTH `target` and `canStart` (ADR-0007 `when`):
|
|
954
|
+
// Solid's `on` runs its callback under `untrack`, so the gate accessor MUST
|
|
955
|
+
// be an explicit dependency for a gate flip (false -> true) to RE-RUN this
|
|
956
|
+
// effect and release the held Retarget. `target` already depends on cfg() +
|
|
957
|
+
// parent.variant(); adding canStart() releases the gate without restarting on
|
|
958
|
+
// every frame (canStart only changes on settle-signal flips, not per frame).
|
|
959
|
+
createEffect(
|
|
960
|
+
on(
|
|
961
|
+
() => {
|
|
962
|
+
const t = target()
|
|
963
|
+
// Track the gate so its flips re-run this effect (value unused).
|
|
964
|
+
if (Predicate.isNotUndefined(canStart)) canStart()
|
|
965
|
+
return t
|
|
966
|
+
},
|
|
967
|
+
spine.retarget,
|
|
968
|
+
),
|
|
969
|
+
)
|
|
970
|
+
|
|
971
|
+
// Live values in `style` (#130, ADR-0043): followed from the first routed key on.
|
|
972
|
+
spine.follow({ resolved: () => untrack(target).resolved, dragging: () => untrack(dragging) })
|
|
973
|
+
}),
|
|
974
|
+
)
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Says, once per provider and gesture, that the element wants a gesture its section has no Feature for
|
|
979
|
+
* (#511, ADR-0067 decision 7): outside a lazy load. Development only (its caller's `DEV`).
|
|
980
|
+
*/
|
|
981
|
+
const warnMissingGestures = (registry: FeatureRegistry, features: FeatureSection, config: Accessor<WardConfig>): void => {
|
|
982
|
+
createEffect(() => {
|
|
983
|
+
const c = config()
|
|
984
|
+
const services = features.services()
|
|
985
|
+
if (features.pending()) return
|
|
986
|
+
Arr.forEach(GESTURE_FEATURES, ([name, wants, key]) => {
|
|
987
|
+
if (wants(c) && Bool.not(hasService(services, key))) registry.warnOnce(name, missingMessage(name, GESTURE_WORDS[name], "@wardic/solid"))
|
|
988
|
+
})
|
|
989
|
+
})
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Says, once per provider, that a colour of the element's needs the `colors` Feature (#511, ADR-0067
|
|
994
|
+
* decision 7): a value naming a wide-gamut space, while the page reads none, outside a lazy load.
|
|
995
|
+
* Development only (its caller's `DEV`).
|
|
996
|
+
*/
|
|
997
|
+
const warnUnreadColors = (registry: FeatureRegistry, features: FeatureSection, values: Accessor<Values.Values>): void => {
|
|
998
|
+
createEffect(() => {
|
|
999
|
+
const unread = unreadColorIn(values())
|
|
1000
|
+
if (Predicate.isUndefined(unread) || features.pending()) return
|
|
1001
|
+
registry.warnOnce("colors", missingMessage("colors", `The colour \`${unread}\``, "@wardic/solid"))
|
|
1002
|
+
})
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* {@link createWard} with a `<Reorder>` item's additions (internal, ADR-0020; not
|
|
1008
|
+
* exported from the package).
|
|
1009
|
+
*/
|
|
1010
|
+
export function createWardWith(config: WardConfig | Accessor<WardConfig>, internal: SpineInternals = NO_INTERNALS): Ward {
|
|
1011
|
+
const runtime = useWardicRuntime()
|
|
1012
|
+
// Its Features (#511, ADR-0067), a Complete element's every one: what they register, a server
|
|
1013
|
+
// render's elements read too (the `colors` Feature's spaces).
|
|
1014
|
+
const features = useElementFeatures(internal.brings, internal.complete === true)
|
|
1015
|
+
// A server render takes the lean path: the Starting style only, no spine (ADR-0021).
|
|
1016
|
+
if (isServer) return serverWard(config, internal)
|
|
1017
|
+
const gate = useWardicGate()
|
|
1018
|
+
// Owner-scoped, SSR/hydration-stable unique id for this element's gate entry
|
|
1019
|
+
// (Solid's createUniqueId, not a module counter — see ADR note / no global state).
|
|
1020
|
+
const id = createUniqueId()
|
|
1021
|
+
|
|
1022
|
+
// Normalize to an Accessor<WardConfig>. A WardConfig is always an object,
|
|
1023
|
+
// so `typeof config === "function"` is a safe discriminant for the accessor. With Animation
|
|
1024
|
+
// controls for its `animate` (#433), each change they make is its entry.
|
|
1025
|
+
const { cfg, controls } = controlledOf(accessorOf(config))
|
|
1026
|
+
|
|
1027
|
+
// Its place in variant orchestration (ADR-0007, #50): what it hands its children, and,
|
|
1028
|
+
// as a Variant child, the ancestor it inherits from and joins (its stagger slot, its
|
|
1029
|
+
// `when`). Read at hook-call time (component body owner), for this instance's lifetime.
|
|
1030
|
+
const node = createVariantNode(cfg, useVariantContext(), UndefinedOr.map(controls, (c) => c.change))
|
|
1031
|
+
|
|
1032
|
+
// The Renderer's PURE project (ADR-0003: synchronous, no engine), read once by the provider (#618, M1).
|
|
1033
|
+
const { project } = useWardicRenderer()
|
|
1034
|
+
|
|
1035
|
+
// Starting style: resolved purely from the config read EXACTLY ONCE (untrack — no
|
|
1036
|
+
// reactive dependency, must not re-seed after mount), with the inherited `initial`
|
|
1037
|
+
// name for a Variant child that has none (#50). It's the `style` until the first
|
|
1038
|
+
// commit, so pre-mount render carries the initial style (no flash).
|
|
1039
|
+
const initialConfig = untrack(cfg)
|
|
1040
|
+
const presence = usePresenceContext()
|
|
1041
|
+
const initialValues = startingValuesOf(initialConfig, node.inherited, presenceBlocksInitial(presence), untrack)
|
|
1042
|
+
// A layout node's is drawn through its projection at rest, as its first commit draws it (#245).
|
|
1043
|
+
const layoutNode = isLayoutNode(initialConfig)
|
|
1044
|
+
const drawnStart = drawnAtRest(initialValues, layoutNode, initialConfig.transformTemplate)
|
|
1045
|
+
|
|
1046
|
+
// The Starting style: the projected SSR initial, carried by `style` until the gate's
|
|
1047
|
+
// first commit (ADR-0021 decision 6, ADR-0034). An svg-inner tag's attribute keys are
|
|
1048
|
+
// split off and set once as attributes, as the server renders them (ADR-0021); the
|
|
1049
|
+
// gate's commits take over at mount. While hydrating, it's what the server rendered, the
|
|
1050
|
+
// DOM's project (the Hydration hold, ADR-0021 decision 2): the Environment's Renderer
|
|
1051
|
+
// takes over at the first frame, and a different Starting style from it is noted once
|
|
1052
|
+
// (cold path).
|
|
1053
|
+
const projected = project(drawnStart)
|
|
1054
|
+
const hydrating = isHydrating()
|
|
1055
|
+
const startingPatch = Bool.match(hydrating, { onTrue: () => DomRenderer.project(drawnStart), onFalse: () => projected })
|
|
1056
|
+
if (hydrating) flagStartingStyle(runtime, id, startingPatch, projected)
|
|
1057
|
+
const seed = Svg.splitPatchForTag(internal.tag, startingPatch)
|
|
1058
|
+
|
|
1059
|
+
// Its routed `style` keys (#130, ADR-0043): its Live values and transform keys, which the gate
|
|
1060
|
+
// writes from mount, and the Starting style carries until then, under `initial`'s.
|
|
1061
|
+
const live = createLiveStyle({ registry: registryOf(runtime), onDroppedTransform: () => warnDroppedTransform(runtime, id), reactivity })
|
|
1062
|
+
const projectStarting = Bool.match(hydrating, { onTrue: () => DomRenderer.project, onFalse: () => project })
|
|
1063
|
+
const startingWith = (routed: Values.Values): Renderer.Patch =>
|
|
1064
|
+
Svg.splitPatchForTag(internal.tag, projectStarting(drawnAtRest({ ...routed, ...initialValues }, layoutNode, initialConfig.transformTemplate))).style
|
|
1065
|
+
|
|
1066
|
+
// A drag element's defaults (ADR-0019 *Amendment (Reorder)*), under the user's
|
|
1067
|
+
// style: `drag` is static, so they're chosen once.
|
|
1068
|
+
const dragDefaults = dragDefaultsOf(untrack(cfg), internal)
|
|
1069
|
+
const baseStyle = internal.baseStyle
|
|
1070
|
+
|
|
1071
|
+
// The props `ward(userProps)` was last called with: their `style` is this element's style
|
|
1072
|
+
// link (ADR-0022), read untracked at need (the live getter on `wardic.*`), and its
|
|
1073
|
+
// fallback once the gate commits (ADR-0034).
|
|
1074
|
+
let lastUserProps: WardUserProps = NO_USER_PROPS
|
|
1075
|
+
const elementStyle = createElementStyle({
|
|
1076
|
+
userStyle: () => lastUserProps.style,
|
|
1077
|
+
starting: seed.style,
|
|
1078
|
+
startingWith,
|
|
1079
|
+
live,
|
|
1080
|
+
defaults: dragDefaults,
|
|
1081
|
+
base: baseStyle,
|
|
1082
|
+
reactivity,
|
|
1083
|
+
})
|
|
1084
|
+
|
|
1085
|
+
// The element, available only after ref-mount. The spine is gated on it. Under a presence, it's
|
|
1086
|
+
// told as it's made (#286): its `key`, and whether it's a twin. With none, nothing is made here.
|
|
1087
|
+
const [el, setEl] = createSignal<HTMLElement>()
|
|
1088
|
+
// The last element its ref was given, and one given after that one left the page, which enters
|
|
1089
|
+
// fresh (#414). Read as the ref is called, before Solid inserts the element: one replacing the last
|
|
1090
|
+
// in the same update finds it still on the page, and carries on.
|
|
1091
|
+
let refd: HTMLElement | undefined
|
|
1092
|
+
let fresh: HTMLElement | undefined
|
|
1093
|
+
const refElement = (element: HTMLElement): void => {
|
|
1094
|
+
if (Predicate.isNotUndefined(refd) && refd !== element && Bool.not(refd.isConnected)) fresh = element
|
|
1095
|
+
refd = element
|
|
1096
|
+
setEl(element)
|
|
1097
|
+
}
|
|
1098
|
+
const setElement = madeWith(presence, refElement, initialConfig)
|
|
1099
|
+
|
|
1100
|
+
// Run the shared spine: the gate commits each flushed Patch onto this element
|
|
1101
|
+
// (ADR-0006, ADR-0034), and the sink's hooks switch its `style`. Its variant node
|
|
1102
|
+
// wires the orchestration (ADR-0007, #50): the context it inherits names from, its
|
|
1103
|
+
// stagger delay as a Variant child, the `when` gates on its start, and its settle report.
|
|
1104
|
+
runSpine({
|
|
1105
|
+
runtime,
|
|
1106
|
+
gate,
|
|
1107
|
+
id,
|
|
1108
|
+
el,
|
|
1109
|
+
cfg,
|
|
1110
|
+
controls,
|
|
1111
|
+
parent: node.inherited,
|
|
1112
|
+
extraDelay: node.extraDelay,
|
|
1113
|
+
byName: node.names,
|
|
1114
|
+
canStart: node.canStart,
|
|
1115
|
+
bindGestures: node.bindGestures,
|
|
1116
|
+
onFrame: node.onFrame,
|
|
1117
|
+
internal,
|
|
1118
|
+
styleOf: () => lastUserProps.style,
|
|
1119
|
+
live,
|
|
1120
|
+
// The gate commits onto the element (an svg-inner element's attribute keys as
|
|
1121
|
+
// attributes, ADR-0014); the hooks switch the spread's `style` (ADR-0034).
|
|
1122
|
+
makeSink: (element) => ({ target: element, ...elementStyle.hooks }),
|
|
1123
|
+
// The spread's `style` and attributes carry the drag defaults and the base style, unless
|
|
1124
|
+
// they reach a wrapped component, which may not pass them on (#253).
|
|
1125
|
+
defaultsInProps: internal.defaultsOnElement !== true,
|
|
1126
|
+
hydrating,
|
|
1127
|
+
tag: internal.tag,
|
|
1128
|
+
entersFresh: (element) => element === fresh,
|
|
1129
|
+
restartStyle: (start) =>
|
|
1130
|
+
elementStyle.restart(Svg.splitPatchForTag(internal.tag, project(drawnAtRest(start.initialValues, layoutNode, untrack(cfg).transformTemplate))).style),
|
|
1131
|
+
features,
|
|
1132
|
+
})
|
|
1133
|
+
|
|
1134
|
+
// `<ward.Provider>` publishes what this instance hands its children (#50): its own
|
|
1135
|
+
// variant context, its parent's passed through, or none.
|
|
1136
|
+
const Provider: Component<{ readonly children?: JSX.Element }> = (props) => (
|
|
1137
|
+
<WardicVariantContext.Provider value={node.provided}>{props.children}</WardicVariantContext.Provider>
|
|
1138
|
+
)
|
|
1139
|
+
|
|
1140
|
+
// The element's value per key (#130, ADR-0043 decision 5): the gate's output while it holds the
|
|
1141
|
+
// key, else where the key rests, read when the accessor is (the user's style as last given, a
|
|
1142
|
+
// reactive `style` prop tracked).
|
|
1143
|
+
const restingValueOf = (key: string): unknown => restingOf(key, initialValues, lastUserProps.style, (raw) => live.read(raw))
|
|
1144
|
+
// One accessor a key, made on first ask: most elements ask none.
|
|
1145
|
+
let values: Map<string, Accessor<unknown>> | undefined
|
|
1146
|
+
const value = (key: string): Accessor<unknown> => {
|
|
1147
|
+
if (Predicate.isUndefined(values)) values = new Map()
|
|
1148
|
+
const known = values.get(key)
|
|
1149
|
+
if (Predicate.isNotUndefined(known)) return known
|
|
1150
|
+
const shown = fromAtom(gate.valueOf(id, key))
|
|
1151
|
+
const accessor = (): unknown => UndefinedOr.match(shown(), { onUndefined: () => restingValueOf(key), onDefined: identity })
|
|
1152
|
+
values.set(key, accessor)
|
|
1153
|
+
return accessor
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
// The callable + its `.Provider` property (ADR-0007). Object.assign keeps the
|
|
1157
|
+
// callable's merge API (ward() / ward({ ref, style })) intact while attaching
|
|
1158
|
+
// Provider as a property, and the cast aligns it with the `Ward` type.
|
|
1159
|
+
const ward: Ward = Object.assign(
|
|
1160
|
+
(userProps: WardUserProps = NO_USER_PROPS): WardProps => {
|
|
1161
|
+
lastUserProps = userProps
|
|
1162
|
+
return {
|
|
1163
|
+
// Merge the user's ref (if any) with ward's internal element setter so BOTH
|
|
1164
|
+
// are invoked with the live element on mount (Option A).
|
|
1165
|
+
ref: mergeRefs(userProps.ref, setElement),
|
|
1166
|
+
// Getter so spreading {...ward()} stays reactive (Solid tracks the access): the
|
|
1167
|
+
// Starting style over the user's until the first commit, then the user's without the
|
|
1168
|
+
// keys the gate holds (ADR-0034). It never changes per frame.
|
|
1169
|
+
get style() {
|
|
1170
|
+
return elementStyle.style(userProps.style) as JSX.CSSProperties
|
|
1171
|
+
},
|
|
1172
|
+
...seed.attrs,
|
|
1173
|
+
...UndefinedOr.match(dragDefaults, { onUndefined: () => ({}), onDefined: () => Style.DRAG_DEFAULT_ATTRIBUTES }),
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
{ Provider, value: value as WardValue, atom: (key: string) => gate.valueOf(id, key) },
|
|
1177
|
+
)
|
|
1178
|
+
return ward
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/** A server's output Atom: nothing is written there, so it stays `undefined`. */
|
|
1182
|
+
const NO_OUTPUT: Atom.Atom<unknown> = Atom.make<unknown>(undefined)
|
|
1183
|
+
|
|
1184
|
+
/**
|
|
1185
|
+
* {@link createWardWith} during a server render (ADR-0021, decisions 1 and 4): the element's
|
|
1186
|
+
* Starting style and static attributes, computed purely, and nothing else: no runtime, no
|
|
1187
|
+
* spine, no signals. Hydration keys must land where the client's render puts them, so it
|
|
1188
|
+
* makes the client's one `createUniqueId` call in the same place, and its `.Provider`
|
|
1189
|
+
* renders the same component nesting, with a variant context that carries the names and
|
|
1190
|
+
* transitions but no orchestration.
|
|
1191
|
+
*/
|
|
1192
|
+
const serverWard = (config: WardConfig | Accessor<WardConfig>, internal: SpineInternals = NO_INTERNALS): Ward => {
|
|
1193
|
+
// The client's gate id: keeps every later hydration key in step.
|
|
1194
|
+
createUniqueId()
|
|
1195
|
+
// Animation controls (#433) set nothing on a server: no entry yet, and controlled, as on the client.
|
|
1196
|
+
const c = uncontrolledOf(withConfigTransition(accessorOf(config)(), useWardicConfig()))
|
|
1197
|
+
// The same names the client hands down, read once, with orchestration that does nothing
|
|
1198
|
+
// (#50); a Variant child's Starting style starts from its ancestor's `initial` name.
|
|
1199
|
+
const node = serverVariantNode(c, useVariantContext())
|
|
1200
|
+
const layoutNode = isLayoutNode(c)
|
|
1201
|
+
const seed = Style.starting(internal.tag, drawnAtRest(startingValuesOf(c, node.inherited, presenceBlocksInitial(usePresenceContext()), untrack), layoutNode, c.transformTemplate))
|
|
1202
|
+
const dragDefaults = dragDefaultsOf(c, internal)
|
|
1203
|
+
const initialValues = startingValuesOf(c, node.inherited, presenceBlocksInitial(usePresenceContext()), untrack)
|
|
1204
|
+
// Its Appear animation (#48, ADR-0044): its slot in the render's, and the group its Variant
|
|
1205
|
+
// children join when it leads one.
|
|
1206
|
+
const appear = serverAppearOf(c, internal.tag, initialValues, node, startsQuiet(c, node.inherited, presenceBlocksInitial(usePresenceContext()), untrack))
|
|
1207
|
+
const Provider: Component<{ readonly children?: JSX.Element }> = (props) => (
|
|
1208
|
+
<WardicVariantContext.Provider value={appear.provided}>{props.children}</WardicVariantContext.Provider>
|
|
1209
|
+
)
|
|
1210
|
+
const read = (value: unknown): unknown => readServerStyle(value)
|
|
1211
|
+
let lastStyle: WardUserProps["style"]
|
|
1212
|
+
const ward = Object.assign(
|
|
1213
|
+
(userProps: WardUserProps = NO_USER_PROPS): WardProps => {
|
|
1214
|
+
lastStyle = userProps.style
|
|
1215
|
+
// Its routed keys' values join the Starting style, under `initial`'s (#130).
|
|
1216
|
+
const parts = split(userProps.style)
|
|
1217
|
+
// A style with its own `animation` keeps it: the element's Appear animation would take its place.
|
|
1218
|
+
const ownAnimation = setsAnimation(parts.css)
|
|
1219
|
+
if (ownAnimation) appear.veto("its own style sets an animation")
|
|
1220
|
+
return {
|
|
1221
|
+
ref: UndefinedOr.match(userProps.ref, { onUndefined: () => noRef, onDefined: identity }),
|
|
1222
|
+
style: pipe(
|
|
1223
|
+
serverStartingStyle(internal.tag, seed.style, initialValues, parts.routed, layoutNode, untrack, c.transformTemplate),
|
|
1224
|
+
Style.over(parts.css),
|
|
1225
|
+
Style.over(UndefinedOr.match(internal.baseStyle, { onUndefined: constUndefined, onDefined: (base) => base() })),
|
|
1226
|
+
Style.over(dragDefaults),
|
|
1227
|
+
Style.over(Bool.match(ownAnimation, { onTrue: constUndefined, onFalse: () => appear.style })),
|
|
1228
|
+
) as JSX.CSSProperties,
|
|
1229
|
+
...seed.attrs,
|
|
1230
|
+
...UndefinedOr.match(dragDefaults, { onUndefined: () => ({}), onDefined: () => Style.DRAG_DEFAULT_ATTRIBUTES }),
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
Provider,
|
|
1235
|
+
value: ((key: string) => () => restingOf(key, initialValues, lastStyle, read)) as WardValue,
|
|
1236
|
+
atom: (): Atom.Atom<unknown> => NO_OUTPUT,
|
|
1237
|
+
[SERVER_APPEAR]: appear,
|
|
1238
|
+
},
|
|
1239
|
+
)
|
|
1240
|
+
return ward
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* A server element's subtree, rendered inside its Appear entry (#245): a late chunk's root puts the
|
|
1245
|
+
* chunk's `<style>` after itself, server text its client doesn't render (the provider moves it into
|
|
1246
|
+
* the head before the chunk hydrates, `Appear.adoptChunks`). Per element on a server: an element in
|
|
1247
|
+
* the shell, most, renders as it is, with guards and no allocation.
|
|
1248
|
+
*/
|
|
1249
|
+
export const renderServerElement = (appear: ServerAppearOf | undefined, render: () => JSX.Element): JSX.Element => {
|
|
1250
|
+
if (Predicate.isUndefined(appear) || Bool.not(appear.late) || Predicate.isUndefined(appear.state)) return render()
|
|
1251
|
+
const state = appear.state
|
|
1252
|
+
const element = state.within(true, render)
|
|
1253
|
+
if (Bool.not(appear.chunkRoot)) return element
|
|
1254
|
+
return [element, () => ({ t: state.chunk() })] as unknown as JSX.Element
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/** Where a server ward keeps its Appear entry, for the `wardic.<tag>` that renders it (#245). Internal. */
|
|
1258
|
+
const SERVER_APPEAR = Symbol("wardic.serverAppear")
|
|
1259
|
+
|
|
1260
|
+
/** A server ward's Appear entry (#245); `undefined` for a client one. Internal. */
|
|
1261
|
+
export const serverAppearOfWard = (ward: Ward): ServerAppearOf | undefined => (ward as Ward & { readonly [SERVER_APPEAR]?: ServerAppearOf })[SERVER_APPEAR]
|
|
1262
|
+
|
|
1263
|
+
/** {@link appearEntryOf} with this provider's Appear state (#48, ADR-0044) and its nearest `WardicConfig`'s reduced motion (#434). */
|
|
1264
|
+
export const serverAppearOf = (c: WardConfig, tag: string | undefined, initialValues: Values.Values, node: ServerVariantNode, quiet: boolean): ServerAppearOf =>
|
|
1265
|
+
appearEntryOf(useWardicAppear(), c, tag, initialValues, node, quiet, settingOf(useWardicConfig()), useWardicSkipAnimations()())
|
|
1266
|
+
|
|
1267
|
+
/** A style value read on a server: an Atom through a server's own registry, an accessor called (#130). */
|
|
1268
|
+
const readServerStyle = (value: unknown): unknown => readLive(value, serverRegistryOf, untrack)
|
|
1269
|
+
|
|
1270
|
+
/** A server render's `ref`: Solid never calls it there. */
|
|
1271
|
+
const noRef = (): void => {}
|