@wardic/solid 0.0.0-stage → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +26 -2
- package/THIRD_PARTY_NOTICES.md +145 -0
- package/dist/browser/animation-controls.js +150 -0
- package/dist/browser/animation-controls.js.map +1 -0
- package/dist/browser/animation-frame.js +29 -0
- package/dist/browser/animation-frame.js.map +1 -0
- package/dist/browser/appear.js +727 -0
- package/dist/browser/appear.js.map +1 -0
- package/dist/browser/arc.js +21 -0
- package/dist/browser/arc.js.map +1 -0
- package/dist/browser/bridge.js +69 -0
- package/dist/browser/bridge.js.map +1 -0
- package/dist/browser/complete.js +30 -0
- package/dist/browser/complete.js.map +1 -0
- package/dist/browser/config.js +2 -0
- package/dist/browser/config.js.map +1 -0
- package/dist/browser/create-animate.js +41 -0
- package/dist/browser/create-animate.js.map +1 -0
- package/dist/browser/create-ward.js +1001 -0
- package/dist/browser/create-ward.js.map +1 -0
- package/dist/browser/cycle-index.js +17 -0
- package/dist/browser/cycle-index.js.map +1 -0
- package/dist/browser/cycle.js +31 -0
- package/dist/browser/cycle.js.map +1 -0
- package/dist/browser/directive.js +80 -0
- package/dist/browser/directive.js.map +1 -0
- package/dist/browser/drag-constraints.js +76 -0
- package/dist/browser/drag-constraints.js.map +1 -0
- package/dist/browser/drag-controls.js +51 -0
- package/dist/browser/drag-controls.js.map +1 -0
- package/dist/browser/drag-samples.js +40 -0
- package/dist/browser/drag-samples.js.map +1 -0
- package/dist/browser/drag-sensor.js +35 -0
- package/dist/browser/drag-sensor.js.map +1 -0
- package/dist/browser/drag-track.js +817 -0
- package/dist/browser/drag-track.js.map +1 -0
- package/dist/browser/drag-transition.js +56 -0
- package/dist/browser/drag-transition.js.map +1 -0
- package/dist/browser/drag.js +44 -0
- package/dist/browser/drag.js.map +1 -0
- package/dist/browser/element-style.js +67 -0
- package/dist/browser/element-style.js.map +1 -0
- package/dist/browser/element.js +353 -0
- package/dist/browser/element.js.map +1 -0
- package/dist/browser/feature-section.js +17 -0
- package/dist/browser/feature-section.js.map +1 -0
- package/dist/browser/feature.js +261 -0
- package/dist/browser/feature.js.map +1 -0
- package/dist/browser/features/all.js +10 -0
- package/dist/browser/features/all.js.map +1 -0
- package/dist/browser/features/colors.js +33 -0
- package/dist/browser/features/colors.js.map +1 -0
- package/dist/browser/features/dom-animation.js +7 -0
- package/dist/browser/features/dom-animation.js.map +1 -0
- package/dist/browser/features/dom-max.js +4 -0
- package/dist/browser/features/dom-max.js.map +1 -0
- package/dist/browser/features/drag.js +28 -0
- package/dist/browser/features/drag.js.map +1 -0
- package/dist/browser/features/focus.js +18 -0
- package/dist/browser/features/focus.js.map +1 -0
- package/dist/browser/features/hover.js +18 -0
- package/dist/browser/features/hover.js.map +1 -0
- package/dist/browser/features/in-view.js +18 -0
- package/dist/browser/features/in-view.js.map +1 -0
- package/dist/browser/features/input.js +30 -0
- package/dist/browser/features/input.js.map +1 -0
- package/dist/browser/features/keys.js +19 -0
- package/dist/browser/features/keys.js.map +1 -0
- package/dist/browser/features/layout.js +33 -0
- package/dist/browser/features/layout.js.map +1 -0
- package/dist/browser/features/pan.js +18 -0
- package/dist/browser/features/pan.js.map +1 -0
- package/dist/browser/features/press.js +12 -0
- package/dist/browser/features/press.js.map +1 -0
- package/dist/browser/focus-sensor.js +23 -0
- package/dist/browser/focus-sensor.js.map +1 -0
- package/dist/browser/frame-time.js +40 -0
- package/dist/browser/frame-time.js.map +1 -0
- package/dist/browser/gesture-callbacks.js +172 -0
- package/dist/browser/gesture-callbacks.js.map +1 -0
- package/dist/browser/gesture-features.js +29 -0
- package/dist/browser/gesture-features.js.map +1 -0
- package/dist/browser/gesture-info.js +43 -0
- package/dist/browser/gesture-info.js.map +1 -0
- package/dist/browser/hover-sensor.js +29 -0
- package/dist/browser/hover-sensor.js.map +1 -0
- package/dist/browser/imperative.js +614 -0
- package/dist/browser/imperative.js.map +1 -0
- package/dist/browser/index.js +165 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/instant.js +51 -0
- package/dist/browser/instant.js.map +1 -0
- package/dist/browser/layout-group.js +27 -0
- package/dist/browser/layout-group.js.map +1 -0
- package/dist/browser/layout-member.js +362 -0
- package/dist/browser/layout-member.js.map +1 -0
- package/dist/browser/layout-projection.js +19 -0
- package/dist/browser/layout-projection.js.map +1 -0
- package/dist/browser/layout.js +91 -0
- package/dist/browser/layout.js.map +1 -0
- package/dist/browser/live-style.js +313 -0
- package/dist/browser/live-style.js.map +1 -0
- package/dist/browser/live-value.js +252 -0
- package/dist/browser/live-value.js.map +1 -0
- package/dist/browser/motion-props.js +172 -0
- package/dist/browser/motion-props.js.map +1 -0
- package/dist/browser/owner-scope.js +29 -0
- package/dist/browser/owner-scope.js.map +1 -0
- package/dist/browser/page-point.js +92 -0
- package/dist/browser/page-point.js.map +1 -0
- package/dist/browser/presence-controller.js +1324 -0
- package/dist/browser/presence-controller.js.map +1 -0
- package/dist/browser/presence-record.js +27 -0
- package/dist/browser/presence-record.js.map +1 -0
- package/dist/browser/presence.js +207 -0
- package/dist/browser/presence.js.map +1 -0
- package/dist/browser/press-sensor.js +30 -0
- package/dist/browser/press-sensor.js.map +1 -0
- package/dist/browser/press.js +24 -0
- package/dist/browser/press.js.map +1 -0
- package/dist/browser/provider.js +445 -0
- package/dist/browser/provider.js.map +1 -0
- package/dist/browser/reactivity.js +9 -0
- package/dist/browser/reactivity.js.map +1 -0
- package/dist/browser/reorder-input.js +46 -0
- package/dist/browser/reorder-input.js.map +1 -0
- package/dist/browser/reorder.js +543 -0
- package/dist/browser/reorder.js.map +1 -0
- package/dist/browser/retarget-legs.js +1019 -0
- package/dist/browser/retarget-legs.js.map +1 -0
- package/dist/browser/runtime.js +249 -0
- package/dist/browser/runtime.js.map +1 -0
- package/dist/browser/sensors.js +172 -0
- package/dist/browser/sensors.js.map +1 -0
- package/dist/browser/server-interpolators.js +20 -0
- package/dist/browser/server-interpolators.js.map +1 -0
- package/dist/browser/server.js +20 -0
- package/dist/browser/server.js.map +1 -0
- package/dist/browser/solid-reactivity.js +26 -0
- package/dist/browser/solid-reactivity.js.map +1 -0
- package/dist/browser/spine.js +2939 -0
- package/dist/browser/spine.js.map +1 -0
- package/dist/browser/stagger.js +13 -0
- package/dist/browser/stagger.js.map +1 -0
- package/dist/browser/unstable/v2/bridge.js +76 -0
- package/dist/browser/unstable/v2/bridge.js.map +1 -0
- package/dist/browser/unstable/v2/complete.js +29 -0
- package/dist/browser/unstable/v2/complete.js.map +1 -0
- package/dist/browser/unstable/v2/config-view.js +111 -0
- package/dist/browser/unstable/v2/config-view.js.map +1 -0
- package/dist/browser/unstable/v2/create-animate.js +102 -0
- package/dist/browser/unstable/v2/create-animate.js.map +1 -0
- package/dist/browser/unstable/v2/cycle.js +30 -0
- package/dist/browser/unstable/v2/cycle.js.map +1 -0
- package/dist/browser/unstable/v2/drag-sensor.js +34 -0
- package/dist/browser/unstable/v2/drag-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/element.js +393 -0
- package/dist/browser/unstable/v2/element.js.map +1 -0
- package/dist/browser/unstable/v2/feature-section.js +27 -0
- package/dist/browser/unstable/v2/feature-section.js.map +1 -0
- package/dist/browser/unstable/v2/focus-sensor.js +23 -0
- package/dist/browser/unstable/v2/focus-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/hover-sensor.js +28 -0
- package/dist/browser/unstable/v2/hover-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/index.js +114 -0
- package/dist/browser/unstable/v2/index.js.map +1 -0
- package/dist/browser/unstable/v2/layout-projection.js +18 -0
- package/dist/browser/unstable/v2/layout-projection.js.map +1 -0
- package/dist/browser/unstable/v2/layout.js +71 -0
- package/dist/browser/unstable/v2/layout.js.map +1 -0
- package/dist/browser/unstable/v2/lifecycle.js +455 -0
- package/dist/browser/unstable/v2/lifecycle.js.map +1 -0
- package/dist/browser/unstable/v2/live-value.js +264 -0
- package/dist/browser/unstable/v2/live-value.js.map +1 -0
- package/dist/browser/unstable/v2/presence-handle.js +146 -0
- package/dist/browser/unstable/v2/presence-handle.js.map +1 -0
- package/dist/browser/unstable/v2/presence-hooks.js +142 -0
- package/dist/browser/unstable/v2/presence-hooks.js.map +1 -0
- package/dist/browser/unstable/v2/presence.js +124 -0
- package/dist/browser/unstable/v2/presence.js.map +1 -0
- package/dist/browser/unstable/v2/press-sensor.js +29 -0
- package/dist/browser/unstable/v2/press-sensor.js.map +1 -0
- package/dist/browser/unstable/v2/provider.js +457 -0
- package/dist/browser/unstable/v2/provider.js.map +1 -0
- package/dist/browser/unstable/v2/reorder.js +663 -0
- package/dist/browser/unstable/v2/reorder.js.map +1 -0
- package/dist/browser/unstable/v2/sensors.js +138 -0
- package/dist/browser/unstable/v2/sensors.js.map +1 -0
- package/dist/browser/unstable/v2/solid-reactivity.js +82 -0
- package/dist/browser/unstable/v2/solid-reactivity.js.map +1 -0
- package/dist/browser/unstable/v2/variant-node.js +395 -0
- package/dist/browser/unstable/v2/variant-node.js.map +1 -0
- package/dist/browser/unstable/v2/w.js +23 -0
- package/dist/browser/unstable/v2/w.js.map +1 -0
- package/dist/browser/unstable/v2/waiters.js +185 -0
- package/dist/browser/unstable/v2/waiters.js.map +1 -0
- package/dist/browser/unstable/v2/ward.js +1620 -0
- package/dist/browser/unstable/v2/ward.js.map +1 -0
- package/dist/browser/unstable/v2/wardic-config.js +40 -0
- package/dist/browser/unstable/v2/wardic-config.js.map +1 -0
- package/dist/browser/unstable/v2/wardic.js +16 -0
- package/dist/browser/unstable/v2/wardic.js.map +1 -0
- package/dist/browser/variant-node.js +308 -0
- package/dist/browser/variant-node.js.map +1 -0
- package/dist/browser/variant-target.js +224 -0
- package/dist/browser/variant-target.js.map +1 -0
- package/dist/browser/variant-tree.js +394 -0
- package/dist/browser/variant-tree.js.map +1 -0
- package/dist/browser/variants.js +43 -0
- package/dist/browser/variants.js.map +1 -0
- package/dist/browser/w.js +25 -0
- package/dist/browser/w.js.map +1 -0
- package/dist/browser/ward-keys.js +2 -0
- package/dist/browser/ward-keys.js.map +1 -0
- package/dist/browser/wardic-component.js +74 -0
- package/dist/browser/wardic-component.js.map +1 -0
- package/dist/browser/wardic-config-value.js +91 -0
- package/dist/browser/wardic-config-value.js.map +1 -0
- package/dist/browser/wardic-config.js +42 -0
- package/dist/browser/wardic-config.js.map +1 -0
- package/dist/browser/wardic.js +31 -0
- package/dist/browser/wardic.js.map +1 -0
- package/dist/server/animation-controls.js +150 -0
- package/dist/server/animation-controls.js.map +1 -0
- package/dist/server/animation-frame.js +29 -0
- package/dist/server/animation-frame.js.map +1 -0
- package/dist/server/appear.js +727 -0
- package/dist/server/appear.js.map +1 -0
- package/dist/server/arc.js +21 -0
- package/dist/server/arc.js.map +1 -0
- package/dist/server/bridge.js +69 -0
- package/dist/server/bridge.js.map +1 -0
- package/dist/server/complete.js +30 -0
- package/dist/server/complete.js.map +1 -0
- package/dist/server/config.js +2 -0
- package/dist/server/config.js.map +1 -0
- package/dist/server/create-animate.js +41 -0
- package/dist/server/create-animate.js.map +1 -0
- package/dist/server/create-ward.js +1001 -0
- package/dist/server/create-ward.js.map +1 -0
- package/dist/server/cycle-index.js +17 -0
- package/dist/server/cycle-index.js.map +1 -0
- package/dist/server/cycle.js +31 -0
- package/dist/server/cycle.js.map +1 -0
- package/dist/server/directive.js +80 -0
- package/dist/server/directive.js.map +1 -0
- package/dist/server/drag-constraints.js +76 -0
- package/dist/server/drag-constraints.js.map +1 -0
- package/dist/server/drag-controls.js +51 -0
- package/dist/server/drag-controls.js.map +1 -0
- package/dist/server/drag-samples.js +40 -0
- package/dist/server/drag-samples.js.map +1 -0
- package/dist/server/drag-sensor.js +35 -0
- package/dist/server/drag-sensor.js.map +1 -0
- package/dist/server/drag-track.js +817 -0
- package/dist/server/drag-track.js.map +1 -0
- package/dist/server/drag-transition.js +56 -0
- package/dist/server/drag-transition.js.map +1 -0
- package/dist/server/drag.js +44 -0
- package/dist/server/drag.js.map +1 -0
- package/dist/server/element-style.js +67 -0
- package/dist/server/element-style.js.map +1 -0
- package/dist/server/element.js +353 -0
- package/dist/server/element.js.map +1 -0
- package/dist/server/feature-section.js +17 -0
- package/dist/server/feature-section.js.map +1 -0
- package/dist/server/feature.js +261 -0
- package/dist/server/feature.js.map +1 -0
- package/dist/server/features/all.js +10 -0
- package/dist/server/features/all.js.map +1 -0
- package/dist/server/features/colors.js +33 -0
- package/dist/server/features/colors.js.map +1 -0
- package/dist/server/features/dom-animation.js +7 -0
- package/dist/server/features/dom-animation.js.map +1 -0
- package/dist/server/features/dom-max.js +4 -0
- package/dist/server/features/dom-max.js.map +1 -0
- package/dist/server/features/drag.js +28 -0
- package/dist/server/features/drag.js.map +1 -0
- package/dist/server/features/focus.js +18 -0
- package/dist/server/features/focus.js.map +1 -0
- package/dist/server/features/hover.js +18 -0
- package/dist/server/features/hover.js.map +1 -0
- package/dist/server/features/in-view.js +18 -0
- package/dist/server/features/in-view.js.map +1 -0
- package/dist/server/features/input.js +30 -0
- package/dist/server/features/input.js.map +1 -0
- package/dist/server/features/keys.js +19 -0
- package/dist/server/features/keys.js.map +1 -0
- package/dist/server/features/layout.js +33 -0
- package/dist/server/features/layout.js.map +1 -0
- package/dist/server/features/pan.js +18 -0
- package/dist/server/features/pan.js.map +1 -0
- package/dist/server/features/press.js +12 -0
- package/dist/server/features/press.js.map +1 -0
- package/dist/server/focus-sensor.js +23 -0
- package/dist/server/focus-sensor.js.map +1 -0
- package/dist/server/frame-time.js +40 -0
- package/dist/server/frame-time.js.map +1 -0
- package/dist/server/gesture-callbacks.js +172 -0
- package/dist/server/gesture-callbacks.js.map +1 -0
- package/dist/server/gesture-features.js +29 -0
- package/dist/server/gesture-features.js.map +1 -0
- package/dist/server/gesture-info.js +43 -0
- package/dist/server/gesture-info.js.map +1 -0
- package/dist/server/hover-sensor.js +29 -0
- package/dist/server/hover-sensor.js.map +1 -0
- package/dist/server/imperative.js +614 -0
- package/dist/server/imperative.js.map +1 -0
- package/dist/server/index.js +165 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/instant.js +51 -0
- package/dist/server/instant.js.map +1 -0
- package/dist/server/layout-group.js +27 -0
- package/dist/server/layout-group.js.map +1 -0
- package/dist/server/layout-member.js +362 -0
- package/dist/server/layout-member.js.map +1 -0
- package/dist/server/layout-projection.js +19 -0
- package/dist/server/layout-projection.js.map +1 -0
- package/dist/server/layout.js +90 -0
- package/dist/server/layout.js.map +1 -0
- package/dist/server/live-style.js +313 -0
- package/dist/server/live-style.js.map +1 -0
- package/dist/server/live-value.js +252 -0
- package/dist/server/live-value.js.map +1 -0
- package/dist/server/motion-props.js +172 -0
- package/dist/server/motion-props.js.map +1 -0
- package/dist/server/owner-scope.js +29 -0
- package/dist/server/owner-scope.js.map +1 -0
- package/dist/server/page-point.js +92 -0
- package/dist/server/page-point.js.map +1 -0
- package/dist/server/presence-controller.js +1324 -0
- package/dist/server/presence-controller.js.map +1 -0
- package/dist/server/presence-record.js +27 -0
- package/dist/server/presence-record.js.map +1 -0
- package/dist/server/presence.js +207 -0
- package/dist/server/presence.js.map +1 -0
- package/dist/server/press-sensor.js +30 -0
- package/dist/server/press-sensor.js.map +1 -0
- package/dist/server/press.js +24 -0
- package/dist/server/press.js.map +1 -0
- package/dist/server/provider.js +439 -0
- package/dist/server/provider.js.map +1 -0
- package/dist/server/reactivity.js +9 -0
- package/dist/server/reactivity.js.map +1 -0
- package/dist/server/reorder-input.js +46 -0
- package/dist/server/reorder-input.js.map +1 -0
- package/dist/server/reorder.js +543 -0
- package/dist/server/reorder.js.map +1 -0
- package/dist/server/retarget-legs.js +1019 -0
- package/dist/server/retarget-legs.js.map +1 -0
- package/dist/server/runtime.js +249 -0
- package/dist/server/runtime.js.map +1 -0
- package/dist/server/sensors.js +172 -0
- package/dist/server/sensors.js.map +1 -0
- package/dist/server/server-interpolators.js +20 -0
- package/dist/server/server-interpolators.js.map +1 -0
- package/dist/server/server.js +20 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/solid-reactivity.js +26 -0
- package/dist/server/solid-reactivity.js.map +1 -0
- package/dist/server/spine.js +2939 -0
- package/dist/server/spine.js.map +1 -0
- package/dist/server/stagger.js +13 -0
- package/dist/server/stagger.js.map +1 -0
- package/dist/server/unstable/v2/bridge.js +76 -0
- package/dist/server/unstable/v2/bridge.js.map +1 -0
- package/dist/server/unstable/v2/complete.js +29 -0
- package/dist/server/unstable/v2/complete.js.map +1 -0
- package/dist/server/unstable/v2/config-view.js +111 -0
- package/dist/server/unstable/v2/config-view.js.map +1 -0
- package/dist/server/unstable/v2/create-animate.js +102 -0
- package/dist/server/unstable/v2/create-animate.js.map +1 -0
- package/dist/server/unstable/v2/cycle.js +30 -0
- package/dist/server/unstable/v2/cycle.js.map +1 -0
- package/dist/server/unstable/v2/drag-sensor.js +34 -0
- package/dist/server/unstable/v2/drag-sensor.js.map +1 -0
- package/dist/server/unstable/v2/element.js +402 -0
- package/dist/server/unstable/v2/element.js.map +1 -0
- package/dist/server/unstable/v2/feature-section.js +27 -0
- package/dist/server/unstable/v2/feature-section.js.map +1 -0
- package/dist/server/unstable/v2/focus-sensor.js +23 -0
- package/dist/server/unstable/v2/focus-sensor.js.map +1 -0
- package/dist/server/unstable/v2/hover-sensor.js +28 -0
- package/dist/server/unstable/v2/hover-sensor.js.map +1 -0
- package/dist/server/unstable/v2/index.js +114 -0
- package/dist/server/unstable/v2/index.js.map +1 -0
- package/dist/server/unstable/v2/layout-projection.js +18 -0
- package/dist/server/unstable/v2/layout-projection.js.map +1 -0
- package/dist/server/unstable/v2/layout.js +88 -0
- package/dist/server/unstable/v2/layout.js.map +1 -0
- package/dist/server/unstable/v2/lifecycle.js +455 -0
- package/dist/server/unstable/v2/lifecycle.js.map +1 -0
- package/dist/server/unstable/v2/live-value.js +264 -0
- package/dist/server/unstable/v2/live-value.js.map +1 -0
- package/dist/server/unstable/v2/presence-handle.js +146 -0
- package/dist/server/unstable/v2/presence-handle.js.map +1 -0
- package/dist/server/unstable/v2/presence-hooks.js +142 -0
- package/dist/server/unstable/v2/presence-hooks.js.map +1 -0
- package/dist/server/unstable/v2/presence.js +142 -0
- package/dist/server/unstable/v2/presence.js.map +1 -0
- package/dist/server/unstable/v2/press-sensor.js +29 -0
- package/dist/server/unstable/v2/press-sensor.js.map +1 -0
- package/dist/server/unstable/v2/provider.js +475 -0
- package/dist/server/unstable/v2/provider.js.map +1 -0
- package/dist/server/unstable/v2/reorder.js +733 -0
- package/dist/server/unstable/v2/reorder.js.map +1 -0
- package/dist/server/unstable/v2/sensors.js +138 -0
- package/dist/server/unstable/v2/sensors.js.map +1 -0
- package/dist/server/unstable/v2/solid-reactivity.js +82 -0
- package/dist/server/unstable/v2/solid-reactivity.js.map +1 -0
- package/dist/server/unstable/v2/variant-node.js +395 -0
- package/dist/server/unstable/v2/variant-node.js.map +1 -0
- package/dist/server/unstable/v2/w.js +23 -0
- package/dist/server/unstable/v2/w.js.map +1 -0
- package/dist/server/unstable/v2/waiters.js +185 -0
- package/dist/server/unstable/v2/waiters.js.map +1 -0
- package/dist/server/unstable/v2/ward.js +1653 -0
- package/dist/server/unstable/v2/ward.js.map +1 -0
- package/dist/server/unstable/v2/wardic-config.js +49 -0
- package/dist/server/unstable/v2/wardic-config.js.map +1 -0
- package/dist/server/unstable/v2/wardic.js +16 -0
- package/dist/server/unstable/v2/wardic.js.map +1 -0
- package/dist/server/variant-node.js +308 -0
- package/dist/server/variant-node.js.map +1 -0
- package/dist/server/variant-target.js +224 -0
- package/dist/server/variant-target.js.map +1 -0
- package/dist/server/variant-tree.js +394 -0
- package/dist/server/variant-tree.js.map +1 -0
- package/dist/server/variants.js +43 -0
- package/dist/server/variants.js.map +1 -0
- package/dist/server/w.js +25 -0
- package/dist/server/w.js.map +1 -0
- package/dist/server/ward-keys.js +2 -0
- package/dist/server/ward-keys.js.map +1 -0
- package/dist/server/wardic-component.js +74 -0
- package/dist/server/wardic-component.js.map +1 -0
- package/dist/server/wardic-config-value.js +91 -0
- package/dist/server/wardic-config-value.js.map +1 -0
- package/dist/server/wardic-config.js +42 -0
- package/dist/server/wardic-config.js.map +1 -0
- package/dist/server/wardic.js +31 -0
- package/dist/server/wardic.js.map +1 -0
- package/dist/solid/animation-controls.d.ts +104 -0
- package/dist/solid/animation-controls.d.ts.map +1 -0
- package/dist/solid/animation-controls.js +129 -0
- package/dist/solid/animation-controls.js.map +1 -0
- package/dist/solid/animation-frame.d.ts +11 -0
- package/dist/solid/animation-frame.d.ts.map +1 -0
- package/dist/solid/animation-frame.js +31 -0
- package/dist/solid/animation-frame.js.map +1 -0
- package/dist/solid/appear.d.ts +205 -0
- package/dist/solid/appear.d.ts.map +1 -0
- package/dist/solid/appear.js +519 -0
- package/dist/solid/appear.js.map +1 -0
- package/dist/solid/arc.d.ts +25 -0
- package/dist/solid/arc.d.ts.map +1 -0
- package/dist/solid/arc.js +21 -0
- package/dist/solid/arc.js.map +1 -0
- package/dist/solid/bridge.d.ts +53 -0
- package/dist/solid/bridge.d.ts.map +1 -0
- package/dist/solid/bridge.js +66 -0
- package/dist/solid/bridge.js.map +1 -0
- package/dist/solid/complete.d.ts +31 -0
- package/dist/solid/complete.d.ts.map +1 -0
- package/dist/solid/complete.js +27 -0
- package/dist/solid/complete.js.map +1 -0
- package/dist/solid/config.d.ts +693 -0
- package/dist/solid/config.d.ts.map +1 -0
- package/dist/solid/config.js +2 -0
- package/dist/solid/config.js.map +1 -0
- package/dist/solid/create-animate.d.ts +17 -0
- package/dist/solid/create-animate.d.ts.map +1 -0
- package/dist/solid/create-animate.js +42 -0
- package/dist/solid/create-animate.js.map +1 -0
- package/dist/solid/create-ward.d.ts +278 -0
- package/dist/solid/create-ward.d.ts.map +1 -0
- package/dist/solid/create-ward.jsx +874 -0
- package/dist/solid/create-ward.jsx.map +1 -0
- package/dist/solid/cycle-index.d.ts +7 -0
- package/dist/solid/cycle-index.d.ts.map +1 -0
- package/dist/solid/cycle-index.js +17 -0
- package/dist/solid/cycle-index.js.map +1 -0
- package/dist/solid/cycle.d.ts +21 -0
- package/dist/solid/cycle.d.ts.map +1 -0
- package/dist/solid/cycle.js +31 -0
- package/dist/solid/cycle.js.map +1 -0
- package/dist/solid/directive.d.ts +21 -0
- package/dist/solid/directive.d.ts.map +1 -0
- package/dist/solid/directive.js +76 -0
- package/dist/solid/directive.js.map +1 -0
- package/dist/solid/drag-constraints.d.ts +46 -0
- package/dist/solid/drag-constraints.d.ts.map +1 -0
- package/dist/solid/drag-constraints.js +49 -0
- package/dist/solid/drag-constraints.js.map +1 -0
- package/dist/solid/drag-controls.d.ts +50 -0
- package/dist/solid/drag-controls.d.ts.map +1 -0
- package/dist/solid/drag-controls.js +51 -0
- package/dist/solid/drag-controls.js.map +1 -0
- package/dist/solid/drag-samples.d.ts +34 -0
- package/dist/solid/drag-samples.d.ts.map +1 -0
- package/dist/solid/drag-samples.js +28 -0
- package/dist/solid/drag-samples.js.map +1 -0
- package/dist/solid/drag-sensor.d.ts +23 -0
- package/dist/solid/drag-sensor.d.ts.map +1 -0
- package/dist/solid/drag-sensor.js +33 -0
- package/dist/solid/drag-sensor.js.map +1 -0
- package/dist/solid/drag-track.d.ts +227 -0
- package/dist/solid/drag-track.d.ts.map +1 -0
- package/dist/solid/drag-track.js +631 -0
- package/dist/solid/drag-track.js.map +1 -0
- package/dist/solid/drag-transition.d.ts +20 -0
- package/dist/solid/drag-transition.d.ts.map +1 -0
- package/dist/solid/drag-transition.js +31 -0
- package/dist/solid/drag-transition.js.map +1 -0
- package/dist/solid/drag.d.ts +23 -0
- package/dist/solid/drag.d.ts.map +1 -0
- package/dist/solid/drag.js +44 -0
- package/dist/solid/drag.js.map +1 -0
- package/dist/solid/element-style.d.ts +60 -0
- package/dist/solid/element-style.d.ts.map +1 -0
- package/dist/solid/element-style.js +50 -0
- package/dist/solid/element-style.js.map +1 -0
- package/dist/solid/element.d.ts +73 -0
- package/dist/solid/element.d.ts.map +1 -0
- package/dist/solid/element.jsx +326 -0
- package/dist/solid/element.jsx.map +1 -0
- package/dist/solid/feature-section.d.ts +18 -0
- package/dist/solid/feature-section.d.ts.map +1 -0
- package/dist/solid/feature-section.js +13 -0
- package/dist/solid/feature-section.js.map +1 -0
- package/dist/solid/feature.d.ts +114 -0
- package/dist/solid/feature.d.ts.map +1 -0
- package/dist/solid/feature.js +248 -0
- package/dist/solid/feature.js.map +1 -0
- package/dist/solid/features/all.d.ts +10 -0
- package/dist/solid/features/all.d.ts.map +1 -0
- package/dist/solid/features/all.js +10 -0
- package/dist/solid/features/all.js.map +1 -0
- package/dist/solid/features/colors.d.ts +12 -0
- package/dist/solid/features/colors.d.ts.map +1 -0
- package/dist/solid/features/colors.js +34 -0
- package/dist/solid/features/colors.js.map +1 -0
- package/dist/solid/features/dom-animation.d.ts +11 -0
- package/dist/solid/features/dom-animation.d.ts.map +1 -0
- package/dist/solid/features/dom-animation.js +7 -0
- package/dist/solid/features/dom-animation.js.map +1 -0
- package/dist/solid/features/dom-max.d.ts +10 -0
- package/dist/solid/features/dom-max.d.ts.map +1 -0
- package/dist/solid/features/dom-max.js +4 -0
- package/dist/solid/features/dom-max.js.map +1 -0
- package/dist/solid/features/drag.d.ts +5 -0
- package/dist/solid/features/drag.d.ts.map +1 -0
- package/dist/solid/features/drag.js +28 -0
- package/dist/solid/features/drag.js.map +1 -0
- package/dist/solid/features/focus.d.ts +5 -0
- package/dist/solid/features/focus.d.ts.map +1 -0
- package/dist/solid/features/focus.js +16 -0
- package/dist/solid/features/focus.js.map +1 -0
- package/dist/solid/features/hover.d.ts +5 -0
- package/dist/solid/features/hover.d.ts.map +1 -0
- package/dist/solid/features/hover.js +16 -0
- package/dist/solid/features/hover.js.map +1 -0
- package/dist/solid/features/in-view.d.ts +5 -0
- package/dist/solid/features/in-view.d.ts.map +1 -0
- package/dist/solid/features/in-view.js +16 -0
- package/dist/solid/features/in-view.js.map +1 -0
- package/dist/solid/features/input.d.ts +26 -0
- package/dist/solid/features/input.d.ts.map +1 -0
- package/dist/solid/features/input.js +31 -0
- package/dist/solid/features/input.js.map +1 -0
- package/dist/solid/features/keys.d.ts +70 -0
- package/dist/solid/features/keys.d.ts.map +1 -0
- package/dist/solid/features/keys.js +26 -0
- package/dist/solid/features/keys.js.map +1 -0
- package/dist/solid/features/layout.d.ts +32 -0
- package/dist/solid/features/layout.d.ts.map +1 -0
- package/dist/solid/features/layout.js +34 -0
- package/dist/solid/features/layout.js.map +1 -0
- package/dist/solid/features/pan.d.ts +5 -0
- package/dist/solid/features/pan.d.ts.map +1 -0
- package/dist/solid/features/pan.js +16 -0
- package/dist/solid/features/pan.js.map +1 -0
- package/dist/solid/features/press.d.ts +11 -0
- package/dist/solid/features/press.d.ts.map +1 -0
- package/dist/solid/features/press.js +10 -0
- package/dist/solid/features/press.js.map +1 -0
- package/dist/solid/focus-sensor.d.ts +19 -0
- package/dist/solid/focus-sensor.d.ts.map +1 -0
- package/dist/solid/focus-sensor.js +23 -0
- package/dist/solid/focus-sensor.js.map +1 -0
- package/dist/solid/frame-time.d.ts +21 -0
- package/dist/solid/frame-time.d.ts.map +1 -0
- package/dist/solid/frame-time.js +41 -0
- package/dist/solid/frame-time.js.map +1 -0
- package/dist/solid/gesture-callbacks.d.ts +53 -0
- package/dist/solid/gesture-callbacks.d.ts.map +1 -0
- package/dist/solid/gesture-callbacks.js +184 -0
- package/dist/solid/gesture-callbacks.js.map +1 -0
- package/dist/solid/gesture-features.d.ts +28 -0
- package/dist/solid/gesture-features.d.ts.map +1 -0
- package/dist/solid/gesture-features.js +29 -0
- package/dist/solid/gesture-features.js.map +1 -0
- package/dist/solid/gesture-info.d.ts +59 -0
- package/dist/solid/gesture-info.d.ts.map +1 -0
- package/dist/solid/gesture-info.js +23 -0
- package/dist/solid/gesture-info.js.map +1 -0
- package/dist/solid/hover-sensor.d.ts +19 -0
- package/dist/solid/hover-sensor.d.ts.map +1 -0
- package/dist/solid/hover-sensor.js +23 -0
- package/dist/solid/hover-sensor.js.map +1 -0
- package/dist/solid/imperative.d.ts +195 -0
- package/dist/solid/imperative.d.ts.map +1 -0
- package/dist/solid/imperative.js +536 -0
- package/dist/solid/imperative.js.map +1 -0
- package/dist/solid/index.d.ts +180 -0
- package/dist/solid/index.d.ts.map +1 -0
- package/dist/solid/index.js +165 -0
- package/dist/solid/index.js.map +1 -0
- package/dist/solid/instant.d.ts +44 -0
- package/dist/solid/instant.d.ts.map +1 -0
- package/dist/solid/instant.js +49 -0
- package/dist/solid/instant.js.map +1 -0
- package/dist/solid/layout-group.d.ts +14 -0
- package/dist/solid/layout-group.d.ts.map +1 -0
- package/dist/solid/layout-group.js +27 -0
- package/dist/solid/layout-group.js.map +1 -0
- package/dist/solid/layout-member.d.ts +117 -0
- package/dist/solid/layout-member.d.ts.map +1 -0
- package/dist/solid/layout-member.js +164 -0
- package/dist/solid/layout-member.js.map +1 -0
- package/dist/solid/layout-projection.d.ts +22 -0
- package/dist/solid/layout-projection.d.ts.map +1 -0
- package/dist/solid/layout-projection.js +19 -0
- package/dist/solid/layout-projection.js.map +1 -0
- package/dist/solid/layout.d.ts +76 -0
- package/dist/solid/layout.d.ts.map +1 -0
- package/dist/solid/layout.jsx +80 -0
- package/dist/solid/layout.jsx.map +1 -0
- package/dist/solid/live-style.d.ts +147 -0
- package/dist/solid/live-style.d.ts.map +1 -0
- package/dist/solid/live-style.js +304 -0
- package/dist/solid/live-style.js.map +1 -0
- package/dist/solid/live-value.d.ts +144 -0
- package/dist/solid/live-value.d.ts.map +1 -0
- package/dist/solid/live-value.js +223 -0
- package/dist/solid/live-value.js.map +1 -0
- package/dist/solid/motion-props.d.ts +75 -0
- package/dist/solid/motion-props.d.ts.map +1 -0
- package/dist/solid/motion-props.js +314 -0
- package/dist/solid/motion-props.js.map +1 -0
- package/dist/solid/owner-scope.d.ts +16 -0
- package/dist/solid/owner-scope.d.ts.map +1 -0
- package/dist/solid/owner-scope.js +31 -0
- package/dist/solid/owner-scope.js.map +1 -0
- package/dist/solid/page-point.d.ts +35 -0
- package/dist/solid/page-point.d.ts.map +1 -0
- package/dist/solid/page-point.js +87 -0
- package/dist/solid/page-point.js.map +1 -0
- package/dist/solid/presence-controller.d.ts +122 -0
- package/dist/solid/presence-controller.d.ts.map +1 -0
- package/dist/solid/presence-controller.js +1207 -0
- package/dist/solid/presence-controller.js.map +1 -0
- package/dist/solid/presence-record.d.ts +167 -0
- package/dist/solid/presence-record.d.ts.map +1 -0
- package/dist/solid/presence-record.js +26 -0
- package/dist/solid/presence-record.js.map +1 -0
- package/dist/solid/presence.d.ts +95 -0
- package/dist/solid/presence.d.ts.map +1 -0
- package/dist/solid/presence.jsx +195 -0
- package/dist/solid/presence.jsx.map +1 -0
- package/dist/solid/press-sensor.d.ts +20 -0
- package/dist/solid/press-sensor.d.ts.map +1 -0
- package/dist/solid/press-sensor.js +24 -0
- package/dist/solid/press-sensor.js.map +1 -0
- package/dist/solid/press.d.ts +24 -0
- package/dist/solid/press.d.ts.map +1 -0
- package/dist/solid/press.js +19 -0
- package/dist/solid/press.js.map +1 -0
- package/dist/solid/provider.d.ts +263 -0
- package/dist/solid/provider.d.ts.map +1 -0
- package/dist/solid/provider.jsx +411 -0
- package/dist/solid/provider.jsx.map +1 -0
- package/dist/solid/reactivity.d.ts +27 -0
- package/dist/solid/reactivity.d.ts.map +1 -0
- package/dist/solid/reactivity.js +9 -0
- package/dist/solid/reactivity.js.map +1 -0
- package/dist/solid/reorder-input.d.ts +22 -0
- package/dist/solid/reorder-input.d.ts.map +1 -0
- package/dist/solid/reorder-input.js +45 -0
- package/dist/solid/reorder-input.js.map +1 -0
- package/dist/solid/reorder.d.ts +241 -0
- package/dist/solid/reorder.d.ts.map +1 -0
- package/dist/solid/reorder.jsx +427 -0
- package/dist/solid/reorder.jsx.map +1 -0
- package/dist/solid/retarget-legs.d.ts +189 -0
- package/dist/solid/retarget-legs.d.ts.map +1 -0
- package/dist/solid/retarget-legs.js +825 -0
- package/dist/solid/retarget-legs.js.map +1 -0
- package/dist/solid/runtime.d.ts +179 -0
- package/dist/solid/runtime.d.ts.map +1 -0
- package/dist/solid/runtime.js +237 -0
- package/dist/solid/runtime.js.map +1 -0
- package/dist/solid/sensors.d.ts +95 -0
- package/dist/solid/sensors.d.ts.map +1 -0
- package/dist/solid/sensors.js +154 -0
- package/dist/solid/sensors.js.map +1 -0
- package/dist/solid/server-interpolators.d.ts +13 -0
- package/dist/solid/server-interpolators.d.ts.map +1 -0
- package/dist/solid/server-interpolators.js +20 -0
- package/dist/solid/server-interpolators.js.map +1 -0
- package/dist/solid/server.d.ts +9 -0
- package/dist/solid/server.d.ts.map +1 -0
- package/dist/solid/server.js +20 -0
- package/dist/solid/server.js.map +1 -0
- package/dist/solid/solid-reactivity.d.ts +3 -0
- package/dist/solid/solid-reactivity.d.ts.map +1 -0
- package/dist/solid/solid-reactivity.js +19 -0
- package/dist/solid/solid-reactivity.js.map +1 -0
- package/dist/solid/spine.d.ts +597 -0
- package/dist/solid/spine.d.ts.map +1 -0
- package/dist/solid/spine.js +2761 -0
- package/dist/solid/spine.js.map +1 -0
- package/dist/solid/stagger.d.ts +29 -0
- package/dist/solid/stagger.d.ts.map +1 -0
- package/dist/solid/stagger.js +13 -0
- package/dist/solid/stagger.js.map +1 -0
- package/dist/solid/unstable/v2/bridge.d.ts +33 -0
- package/dist/solid/unstable/v2/bridge.d.ts.map +1 -0
- package/dist/solid/unstable/v2/bridge.js +76 -0
- package/dist/solid/unstable/v2/bridge.js.map +1 -0
- package/dist/solid/unstable/v2/complete.d.ts +21 -0
- package/dist/solid/unstable/v2/complete.d.ts.map +1 -0
- package/dist/solid/unstable/v2/complete.js +27 -0
- package/dist/solid/unstable/v2/complete.js.map +1 -0
- package/dist/solid/unstable/v2/config-view.d.ts +49 -0
- package/dist/solid/unstable/v2/config-view.d.ts.map +1 -0
- package/dist/solid/unstable/v2/config-view.js +114 -0
- package/dist/solid/unstable/v2/config-view.js.map +1 -0
- package/dist/solid/unstable/v2/create-animate.d.ts +31 -0
- package/dist/solid/unstable/v2/create-animate.d.ts.map +1 -0
- package/dist/solid/unstable/v2/create-animate.js +102 -0
- package/dist/solid/unstable/v2/create-animate.js.map +1 -0
- package/dist/solid/unstable/v2/cycle.d.ts +20 -0
- package/dist/solid/unstable/v2/cycle.d.ts.map +1 -0
- package/dist/solid/unstable/v2/cycle.js +30 -0
- package/dist/solid/unstable/v2/cycle.js.map +1 -0
- package/dist/solid/unstable/v2/drag-sensor.d.ts +23 -0
- package/dist/solid/unstable/v2/drag-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/drag-sensor.js +32 -0
- package/dist/solid/unstable/v2/drag-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/element.d.ts +178 -0
- package/dist/solid/unstable/v2/element.d.ts.map +1 -0
- package/dist/solid/unstable/v2/element.jsx +325 -0
- package/dist/solid/unstable/v2/element.jsx.map +1 -0
- package/dist/solid/unstable/v2/feature-section.d.ts +12 -0
- package/dist/solid/unstable/v2/feature-section.d.ts.map +1 -0
- package/dist/solid/unstable/v2/feature-section.js +23 -0
- package/dist/solid/unstable/v2/feature-section.js.map +1 -0
- package/dist/solid/unstable/v2/focus-sensor.d.ts +13 -0
- package/dist/solid/unstable/v2/focus-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/focus-sensor.js +23 -0
- package/dist/solid/unstable/v2/focus-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/hover-sensor.d.ts +12 -0
- package/dist/solid/unstable/v2/hover-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/hover-sensor.js +22 -0
- package/dist/solid/unstable/v2/hover-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/index.d.ts +131 -0
- package/dist/solid/unstable/v2/index.d.ts.map +1 -0
- package/dist/solid/unstable/v2/index.js +114 -0
- package/dist/solid/unstable/v2/index.js.map +1 -0
- package/dist/solid/unstable/v2/layout-projection.d.ts +21 -0
- package/dist/solid/unstable/v2/layout-projection.d.ts.map +1 -0
- package/dist/solid/unstable/v2/layout-projection.js +18 -0
- package/dist/solid/unstable/v2/layout-projection.js.map +1 -0
- package/dist/solid/unstable/v2/layout.d.ts +47 -0
- package/dist/solid/unstable/v2/layout.d.ts.map +1 -0
- package/dist/solid/unstable/v2/layout.jsx +62 -0
- package/dist/solid/unstable/v2/layout.jsx.map +1 -0
- package/dist/solid/unstable/v2/lifecycle.d.ts +267 -0
- package/dist/solid/unstable/v2/lifecycle.d.ts.map +1 -0
- package/dist/solid/unstable/v2/lifecycle.js +457 -0
- package/dist/solid/unstable/v2/lifecycle.js.map +1 -0
- package/dist/solid/unstable/v2/live-value.d.ts +146 -0
- package/dist/solid/unstable/v2/live-value.d.ts.map +1 -0
- package/dist/solid/unstable/v2/live-value.js +235 -0
- package/dist/solid/unstable/v2/live-value.js.map +1 -0
- package/dist/solid/unstable/v2/presence-handle.d.ts +55 -0
- package/dist/solid/unstable/v2/presence-handle.d.ts.map +1 -0
- package/dist/solid/unstable/v2/presence-handle.js +119 -0
- package/dist/solid/unstable/v2/presence-handle.js.map +1 -0
- package/dist/solid/unstable/v2/presence-hooks.d.ts +51 -0
- package/dist/solid/unstable/v2/presence-hooks.d.ts.map +1 -0
- package/dist/solid/unstable/v2/presence-hooks.js +115 -0
- package/dist/solid/unstable/v2/presence-hooks.js.map +1 -0
- package/dist/solid/unstable/v2/presence.d.ts +89 -0
- package/dist/solid/unstable/v2/presence.d.ts.map +1 -0
- package/dist/solid/unstable/v2/presence.jsx +107 -0
- package/dist/solid/unstable/v2/presence.jsx.map +1 -0
- package/dist/solid/unstable/v2/press-sensor.d.ts +13 -0
- package/dist/solid/unstable/v2/press-sensor.d.ts.map +1 -0
- package/dist/solid/unstable/v2/press-sensor.js +23 -0
- package/dist/solid/unstable/v2/press-sensor.js.map +1 -0
- package/dist/solid/unstable/v2/provider.d.ts +239 -0
- package/dist/solid/unstable/v2/provider.d.ts.map +1 -0
- package/dist/solid/unstable/v2/provider.jsx +423 -0
- package/dist/solid/unstable/v2/provider.jsx.map +1 -0
- package/dist/solid/unstable/v2/reorder.d.ts +292 -0
- package/dist/solid/unstable/v2/reorder.d.ts.map +1 -0
- package/dist/solid/unstable/v2/reorder.jsx +525 -0
- package/dist/solid/unstable/v2/reorder.jsx.map +1 -0
- package/dist/solid/unstable/v2/sensors.d.ts +91 -0
- package/dist/solid/unstable/v2/sensors.d.ts.map +1 -0
- package/dist/solid/unstable/v2/sensors.js +124 -0
- package/dist/solid/unstable/v2/sensors.js.map +1 -0
- package/dist/solid/unstable/v2/solid-reactivity.d.ts +61 -0
- package/dist/solid/unstable/v2/solid-reactivity.d.ts.map +1 -0
- package/dist/solid/unstable/v2/solid-reactivity.js +62 -0
- package/dist/solid/unstable/v2/solid-reactivity.js.map +1 -0
- package/dist/solid/unstable/v2/variant-node.d.ts +51 -0
- package/dist/solid/unstable/v2/variant-node.d.ts.map +1 -0
- package/dist/solid/unstable/v2/variant-node.js +336 -0
- package/dist/solid/unstable/v2/variant-node.js.map +1 -0
- package/dist/solid/unstable/v2/w.d.ts +42 -0
- package/dist/solid/unstable/v2/w.d.ts.map +1 -0
- package/dist/solid/unstable/v2/w.jsx +22 -0
- package/dist/solid/unstable/v2/w.jsx.map +1 -0
- package/dist/solid/unstable/v2/waiters.d.ts +72 -0
- package/dist/solid/unstable/v2/waiters.d.ts.map +1 -0
- package/dist/solid/unstable/v2/waiters.js +175 -0
- package/dist/solid/unstable/v2/waiters.js.map +1 -0
- package/dist/solid/unstable/v2/ward.d.ts +393 -0
- package/dist/solid/unstable/v2/ward.d.ts.map +1 -0
- package/dist/solid/unstable/v2/ward.jsx +1475 -0
- package/dist/solid/unstable/v2/ward.jsx.map +1 -0
- package/dist/solid/unstable/v2/wardic-config.d.ts +68 -0
- package/dist/solid/unstable/v2/wardic-config.d.ts.map +1 -0
- package/dist/solid/unstable/v2/wardic-config.jsx +28 -0
- package/dist/solid/unstable/v2/wardic-config.jsx.map +1 -0
- package/dist/solid/unstable/v2/wardic.d.ts +28 -0
- package/dist/solid/unstable/v2/wardic.d.ts.map +1 -0
- package/dist/solid/unstable/v2/wardic.jsx +16 -0
- package/dist/solid/unstable/v2/wardic.jsx.map +1 -0
- package/dist/solid/variant-node.d.ts +32 -0
- package/dist/solid/variant-node.d.ts.map +1 -0
- package/dist/solid/variant-node.js +257 -0
- package/dist/solid/variant-node.js.map +1 -0
- package/dist/solid/variant-target.d.ts +102 -0
- package/dist/solid/variant-target.d.ts.map +1 -0
- package/dist/solid/variant-target.js +180 -0
- package/dist/solid/variant-target.js.map +1 -0
- package/dist/solid/variant-tree.d.ts +349 -0
- package/dist/solid/variant-tree.d.ts.map +1 -0
- package/dist/solid/variant-tree.js +358 -0
- package/dist/solid/variant-tree.js.map +1 -0
- package/dist/solid/variants.d.ts +21 -0
- package/dist/solid/variants.d.ts.map +1 -0
- package/dist/solid/variants.js +43 -0
- package/dist/solid/variants.js.map +1 -0
- package/dist/solid/w.d.ts +42 -0
- package/dist/solid/w.d.ts.map +1 -0
- package/dist/solid/w.jsx +23 -0
- package/dist/solid/w.jsx.map +1 -0
- package/dist/solid/ward-keys.d.ts +236 -0
- package/dist/solid/ward-keys.d.ts.map +1 -0
- package/dist/solid/ward-keys.js +2 -0
- package/dist/solid/ward-keys.js.map +1 -0
- package/dist/solid/wardic-component.d.ts +50 -0
- package/dist/solid/wardic-component.d.ts.map +1 -0
- package/dist/solid/wardic-component.js +74 -0
- package/dist/solid/wardic-component.js.map +1 -0
- package/dist/solid/wardic-config-value.d.ts +87 -0
- package/dist/solid/wardic-config-value.d.ts.map +1 -0
- package/dist/solid/wardic-config-value.js +106 -0
- package/dist/solid/wardic-config-value.js.map +1 -0
- package/dist/solid/wardic-config.d.ts +69 -0
- package/dist/solid/wardic-config.d.ts.map +1 -0
- package/dist/solid/wardic-config.jsx +30 -0
- package/dist/solid/wardic-config.jsx.map +1 -0
- package/dist/solid/wardic.d.ts +45 -0
- package/dist/solid/wardic.d.ts.map +1 -0
- package/dist/solid/wardic.jsx +31 -0
- package/dist/solid/wardic.jsx.map +1 -0
- package/package.json +98 -4
- package/src/animation-controls.ts +204 -0
- package/src/animation-frame.ts +32 -0
- package/src/appear.ts +804 -0
- package/src/arc.ts +34 -0
- package/src/bridge.ts +98 -0
- package/src/complete.ts +45 -0
- package/src/config.ts +805 -0
- package/src/create-animate.ts +41 -0
- package/src/create-ward.tsx +1271 -0
- package/src/cycle-index.ts +18 -0
- package/src/cycle.ts +34 -0
- package/src/directive.ts +87 -0
- package/src/drag-constraints.ts +103 -0
- package/src/drag-controls.ts +94 -0
- package/src/drag-samples.ts +54 -0
- package/src/drag-sensor.ts +46 -0
- package/src/drag-track.ts +937 -0
- package/src/drag-transition.ts +43 -0
- package/src/drag.ts +58 -0
- package/src/element-style.ts +112 -0
- package/src/element.tsx +400 -0
- package/src/feature-section.ts +33 -0
- package/src/feature.ts +342 -0
- package/src/features/all.ts +18 -0
- package/src/features/colors.ts +36 -0
- package/src/features/dom-animation.ts +15 -0
- package/src/features/dom-max.ts +11 -0
- package/src/features/drag.ts +30 -0
- package/src/features/focus.ts +17 -0
- package/src/features/hover.ts +17 -0
- package/src/features/in-view.ts +17 -0
- package/src/features/input.ts +42 -0
- package/src/features/keys.ts +89 -0
- package/src/features/layout.ts +54 -0
- package/src/features/pan.ts +17 -0
- package/src/features/press.ts +17 -0
- package/src/focus-sensor.ts +32 -0
- package/src/frame-time.ts +45 -0
- package/src/gesture-callbacks.ts +212 -0
- package/src/gesture-features.ts +35 -0
- package/src/gesture-info.ts +81 -0
- package/src/hover-sensor.ts +32 -0
- package/src/imperative.ts +782 -0
- package/src/index.ts +334 -0
- package/src/instant.ts +90 -0
- package/src/layout-group.ts +32 -0
- package/src/layout-member.ts +300 -0
- package/src/layout-projection.ts +28 -0
- package/src/layout.tsx +127 -0
- package/src/live-style.ts +449 -0
- package/src/live-value.ts +378 -0
- package/src/motion-props.ts +325 -0
- package/src/owner-scope.ts +31 -0
- package/src/page-point.ts +98 -0
- package/src/presence-controller.ts +1483 -0
- package/src/presence-record.ts +189 -0
- package/src/presence.tsx +269 -0
- package/src/press-sensor.ts +33 -0
- package/src/press.ts +40 -0
- package/src/provider.tsx +526 -0
- package/src/reactivity.ts +29 -0
- package/src/reorder-input.ts +53 -0
- package/src/reorder.tsx +703 -0
- package/src/retarget-legs.ts +1048 -0
- package/src/runtime.ts +388 -0
- package/src/sensors.ts +189 -0
- package/src/server-interpolators.ts +33 -0
- package/src/server.ts +21 -0
- package/src/solid-reactivity.ts +21 -0
- package/src/spine.ts +3385 -0
- package/src/stagger.ts +31 -0
- package/src/unstable/v2/bridge.ts +79 -0
- package/src/unstable/v2/complete.ts +47 -0
- package/src/unstable/v2/config-view.ts +156 -0
- package/src/unstable/v2/create-animate.ts +123 -0
- package/src/unstable/v2/cycle.ts +33 -0
- package/src/unstable/v2/drag-sensor.ts +44 -0
- package/src/unstable/v2/element.tsx +478 -0
- package/src/unstable/v2/feature-section.ts +32 -0
- package/src/unstable/v2/focus-sensor.ts +31 -0
- package/src/unstable/v2/hover-sensor.ts +30 -0
- package/src/unstable/v2/index.ts +270 -0
- package/src/unstable/v2/layout-projection.ts +27 -0
- package/src/unstable/v2/layout.tsx +89 -0
- package/src/unstable/v2/lifecycle.ts +612 -0
- package/src/unstable/v2/live-value.ts +414 -0
- package/src/unstable/v2/presence-handle.ts +159 -0
- package/src/unstable/v2/presence-hooks.ts +157 -0
- package/src/unstable/v2/presence.tsx +174 -0
- package/src/unstable/v2/press-sensor.ts +31 -0
- package/src/unstable/v2/provider.tsx +524 -0
- package/src/unstable/v2/reorder.tsx +880 -0
- package/src/unstable/v2/sensors.ts +169 -0
- package/src/unstable/v2/solid-reactivity.ts +69 -0
- package/src/unstable/v2/variant-node.ts +446 -0
- package/src/unstable/v2/w.tsx +49 -0
- package/src/unstable/v2/waiters.ts +212 -0
- package/src/unstable/v2/ward.tsx +2068 -0
- package/src/unstable/v2/wardic-config.tsx +84 -0
- package/src/unstable/v2/wardic.tsx +41 -0
- package/src/variant-node.ts +368 -0
- package/src/variant-target.ts +234 -0
- package/src/variant-tree.ts +638 -0
- package/src/variants.ts +47 -0
- package/src/w.tsx +59 -0
- package/src/ward-keys.ts +343 -0
- package/src/wardic-component.ts +96 -0
- package/src/wardic-config-value.ts +150 -0
- package/src/wardic-config.tsx +78 -0
- package/src/wardic.tsx +59 -0
package/src/appear.ts
ADDED
|
@@ -0,0 +1,804 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appear animations in the Solid binding (#48, ADR-0044): a server-rendered mount animation played
|
|
3
|
+
* in CSS from first paint, and taken over at mount (the **Handoff**).
|
|
4
|
+
*
|
|
5
|
+
* - **Both sides** describe an element's mount animation the same way ({@link MountAnimation}): its
|
|
6
|
+
* starting values, its targets, its own transition and whether motion is reduced. The rule's name
|
|
7
|
+
* is the hash of that description ({@link keyOf}), so the client tells a Handoff it can continue
|
|
8
|
+
* from one it can't.
|
|
9
|
+
* - **On a server** the provider holds one render's {@link ServerAppear}. Each element that
|
|
10
|
+
* qualifies takes a slot (its inline `animation: var(--wardic-aN)`); a Variant child joins its
|
|
11
|
+
* parent's group, in render order. Once the render is done, `css()` works out each one's timing
|
|
12
|
+
* (its stagger, its `when`) and writes the head's `<style>`.
|
|
13
|
+
* - **At mount** the spine finds the element's animation ({@link handoffOf}), starts its first legs
|
|
14
|
+
* that far in, and removes it in its first commit.
|
|
15
|
+
*/
|
|
16
|
+
import type * as DefaultTransition from "@wardic/core/DefaultTransition"
|
|
17
|
+
import * as Easing from "@wardic/core/Easing"
|
|
18
|
+
import type * as Frame from "@wardic/core/Frame"
|
|
19
|
+
import * as Machine from "@wardic/core/Machine"
|
|
20
|
+
import type * as InterpolatorRegistry from "@wardic/core/InterpolatorRegistry"
|
|
21
|
+
import type * as ReducedMotion from "@wardic/core/ReducedMotion"
|
|
22
|
+
import type * as Values from "@wardic/core/Values"
|
|
23
|
+
import * as Appear from "@wardic/dom/Appear"
|
|
24
|
+
import type * as DomRenderer from "@wardic/dom/DomRenderer"
|
|
25
|
+
import * as DomDefaultTransition from "@wardic/dom/DomDefaultTransition"
|
|
26
|
+
import * as DomPositionalKeys from "@wardic/dom/DomPositionalKeys"
|
|
27
|
+
import * as OwnValues from "@wardic/dom/OwnValues"
|
|
28
|
+
import * as Arr from "effect/Array"
|
|
29
|
+
import * as Bool from "effect/Boolean"
|
|
30
|
+
import * as Effect from "effect/Effect"
|
|
31
|
+
import { identity } from "effect/Function"
|
|
32
|
+
import * as Match from "effect/Match"
|
|
33
|
+
import * as Option from "effect/Option"
|
|
34
|
+
import * as Order from "effect/Order"
|
|
35
|
+
import * as Predicate from "effect/Predicate"
|
|
36
|
+
import * as Rec from "effect/Record"
|
|
37
|
+
import * as Result from "effect/Result"
|
|
38
|
+
import * as UndefinedOr from "effect/UndefinedOr"
|
|
39
|
+
import type { WardicTransition } from "./config.ts"
|
|
40
|
+
import { entriesOf, type KeyframesStart, keyframesFrom, type Leg, legsOf, NO_VELOCITY, runOf, type StopsByKey, transitionForKey } from "./retarget-legs.ts"
|
|
41
|
+
import { withServerInterpolators } from "./server-interpolators.ts"
|
|
42
|
+
import type { Keyframes } from "./variant-target.ts"
|
|
43
|
+
import { childDelayOf, type WardicStaggerConfig } from "./variant-tree.ts"
|
|
44
|
+
|
|
45
|
+
// --- The mount animation, on both sides -------------------------------------------------------
|
|
46
|
+
|
|
47
|
+
/** An element's mount animation, described the same on the server and the client. */
|
|
48
|
+
export interface MountAnimation {
|
|
49
|
+
/** The element's tag, for SVG's routing; `undefined` for an element whose tag isn't known. */
|
|
50
|
+
readonly tag: string | undefined
|
|
51
|
+
/** Each animated key's start. */
|
|
52
|
+
readonly from: Values.Values
|
|
53
|
+
/** Each animated key's target. */
|
|
54
|
+
readonly to: Values.Values
|
|
55
|
+
/** The element's own transition: its stagger isn't in it (ADR-0007). */
|
|
56
|
+
readonly transition: WardicTransition | undefined
|
|
57
|
+
/** Whether reduced motion is on for it (ADR-0029). */
|
|
58
|
+
readonly reduced: boolean
|
|
59
|
+
/**
|
|
60
|
+
* Whether it's a layout node (#245): drawn through its projection at rest, as the client draws
|
|
61
|
+
* it, its own translate on top (#363). Part of its rule's name (`Appear.Spec.projected`).
|
|
62
|
+
*/
|
|
63
|
+
readonly layout: boolean
|
|
64
|
+
/** Each key's Keyframes of more than two stops (#429), `from` at their first: part of its key. Left out with none. */
|
|
65
|
+
readonly stops?: StopsByKey | undefined
|
|
66
|
+
/**
|
|
67
|
+
* Whether it's a **Skipped animation** (#468): every key lands on its first frame, so its rule is
|
|
68
|
+
* 0 s, holding its end from first paint. Part of its key; left out when it isn't.
|
|
69
|
+
*/
|
|
70
|
+
readonly skipped?: boolean | undefined
|
|
71
|
+
/** Its **Transform template** (#443): its stops drawn through it, as the client draws them. Left out with none. */
|
|
72
|
+
readonly template?: DomRenderer.TransformTemplate | undefined
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** What stands in for a function with no easing name: canonical text holding it is no key. */
|
|
76
|
+
const UNNAMED = "\u0000unnamed"
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A value as canonical text: JSON with each object's keys in order, `undefined`s left out, and a
|
|
80
|
+
* function by its easing name (`Easing.nameOf`), else {@link UNNAMED}. Written directly, its cases
|
|
81
|
+
* built once at module load: it runs per element (#69's PR 2).
|
|
82
|
+
*/
|
|
83
|
+
const textOf: (value: unknown) => string = /*#__PURE__*/ Match.type<unknown>().pipe(
|
|
84
|
+
Match.when(Predicate.isFunction, (fn) => Option.match(Easing.nameOf(fn as Easing.Easing), { onNone: () => UNNAMED, onSome: (easing) => `{"easing":${JSON.stringify(easing)}}` })),
|
|
85
|
+
Match.when(Arr.isArray, (items) => `[${Arr.map(items as ReadonlyArray<unknown>, (item) => textOf(item)).join(",")}]`),
|
|
86
|
+
Match.when(Predicate.isObject, (record) => {
|
|
87
|
+
const keys = Arr.sort(Arr.filter(Object.keys(record), (key) => Predicate.isNotUndefined((record as Record<string, unknown>)[key])), Order.String)
|
|
88
|
+
return `{${Arr.map(keys, (key) => `${JSON.stringify(key)}:${textOf((record as Record<string, unknown>)[key])}`).join(",")}}`
|
|
89
|
+
}),
|
|
90
|
+
Match.orElse((v) => String(JSON.stringify(v))),
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
/** Where a Path's key samples it (#438): nine points, its ends among them. */
|
|
94
|
+
const PATH_SAMPLES = [0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1] as const
|
|
95
|
+
|
|
96
|
+
/** An axis's number in `values`, its identity 0 when it has none (#438), as the leg reads it on a server. */
|
|
97
|
+
const axisIn = (values: Values.Values, key: "x" | "y"): number => UndefinedOr.match(values[key], { onUndefined: () => 0, onDefined: (v) => Number(v) })
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* A mount animation's transition as its key holds it: a Path (#438), a function, as its samples
|
|
101
|
+
* between the mount's ends, so two paths key apart and one path keys the same each time. Sampling it
|
|
102
|
+
* again is safe: an arc's memory of its side changes only with the way it travels.
|
|
103
|
+
*/
|
|
104
|
+
const keyedTransitionOf = (m: MountAnimation): unknown =>
|
|
105
|
+
UndefinedOr.match(m.transition, {
|
|
106
|
+
onUndefined: () => null,
|
|
107
|
+
onDefined: (t: WardicTransition) =>
|
|
108
|
+
UndefinedOr.match(t.path, {
|
|
109
|
+
onUndefined: () => t,
|
|
110
|
+
onDefined: (path) => {
|
|
111
|
+
const from = { x: axisIn(m.from, "x"), y: axisIn(m.from, "y") }
|
|
112
|
+
const at = path(from, { x: UndefinedOr.match(m.to.x, { onUndefined: () => from.x, onDefined: Number }), y: UndefinedOr.match(m.to.y, { onUndefined: () => from.y, onDefined: Number }) })
|
|
113
|
+
return { ...t, path: Arr.map(PATH_SAMPLES, (p) => at(p)) }
|
|
114
|
+
},
|
|
115
|
+
}),
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
/** A value as canonical text; `None` when a function in it has no easing name. */
|
|
119
|
+
const canonical = (value: unknown): Option.Option<string> => Option.filter(Option.some(textOf(value)), (text) => Bool.not(text.includes(UNNAMED)))
|
|
120
|
+
|
|
121
|
+
/** Each mount animation's canonical starts, targets and transition, by its `from`: both its plays share one. */
|
|
122
|
+
// Module state (#460, Q7): a cache held weakly by the object it's for, so it goes with it.
|
|
123
|
+
const baseKeys = /*#__PURE__*/ new WeakMap<Values.Values, Option.Option<string>>()
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The mount animation's key: its starts, targets and transition as one canonical text, and whether
|
|
127
|
+
* motion is reduced. `None` when the transition holds a function with no easing name
|
|
128
|
+
* (`Easing.nameOf`): the server can't tell it from another, so the element keeps its Starting style.
|
|
129
|
+
*/
|
|
130
|
+
export const keyOf = (m: MountAnimation): Option.Option<string> => {
|
|
131
|
+
const base = Option.getOrElse(Option.fromUndefinedOr(baseKeys.get(m.from)), () => {
|
|
132
|
+
const computed = canonical({ from: m.from, to: m.to, transition: keyedTransitionOf(m), stops: m.stops })
|
|
133
|
+
baseKeys.set(m.from, computed)
|
|
134
|
+
return computed
|
|
135
|
+
})
|
|
136
|
+
// A skipped one's (#468) named apart: an unskipped one's name is as it was.
|
|
137
|
+
return Option.map(base, (text) => Bool.match(m.skipped === true, { onTrue: () => `${text}|skipped`, onFalse: () => `${text}|reduced:${m.reduced}` }))
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Whether a mount animation plays for ever: its transition repeats for ever, and it isn't skipped (#468), which lands it. */
|
|
141
|
+
const playsForever = (m: MountAnimation): boolean => Bool.and(m.skipped !== true, repeatsForever(m.transition))
|
|
142
|
+
|
|
143
|
+
/** Whether a transition repeats for ever: a tween's `repeat: Infinity`, a tween as it runs (ADR-0051). */
|
|
144
|
+
export const repeatsForever = (transition: WardicTransition | undefined): boolean =>
|
|
145
|
+
UndefinedOr.match(runOf(transition), { onUndefined: () => false, onDefined: (run) => Bool.and(run.type === "tween", (run as Machine.AnimateOptions).repeat === Number.POSITIVE_INFINITY) })
|
|
146
|
+
|
|
147
|
+
/** A transition's own delay, 0 without one. */
|
|
148
|
+
const ownDelayOf = (transition: WardicTransition | undefined): number =>
|
|
149
|
+
UndefinedOr.match(transition, { onUndefined: () => 0, onDefined: ({ delay = 0 }) => delay })
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The seconds a rule holds before it moves, of the delay the client counts: a transition's own
|
|
153
|
+
* delay is in its rule, except a forever-repeating one's, whose rule is a cycle and whose own delay
|
|
154
|
+
* goes in `animation-delay` with the stagger.
|
|
155
|
+
*/
|
|
156
|
+
const heldInRule = (transition: WardicTransition | undefined): number =>
|
|
157
|
+
Bool.match(repeatsForever(transition), { onTrue: () => 0, onFalse: () => ownDelayOf(transition) })
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The transition a server samples: as given, but for one that repeats for ever, two runs and the
|
|
161
|
+
* delay that follows them, with no delay before (one cycle of the CSS, played `infinite`). Two
|
|
162
|
+
* runs, so a cycle is exact for every `repeatType`, `reverse` and `mirror` included.
|
|
163
|
+
*/
|
|
164
|
+
const sampledTransition = (transition: WardicTransition | undefined): WardicTransition | undefined =>
|
|
165
|
+
Bool.match(repeatsForever(transition), {
|
|
166
|
+
onTrue: () => ({ ...transition, delay: 0, repeat: 1 }) as WardicTransition,
|
|
167
|
+
onFalse: () => transition,
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* One machine of a Retarget's legs, run together: each step steps every leg not yet settled, and
|
|
172
|
+
* merges their values; it settles with the last. What a server samples. Built with the DOM's
|
|
173
|
+
* Interpolators (a server projects with the DOM's `project`, ADR-0021 decision 2).
|
|
174
|
+
*/
|
|
175
|
+
const together = (legs: ReadonlyArray<Leg>): Machine.Machine<Frame.Frame<Values.Values>> => {
|
|
176
|
+
const machines = Effect.runSync(
|
|
177
|
+
withServerInterpolators(Effect.all(Arr.map(legs, (leg): Effect.Effect<Machine.Machine<Frame.Frame<unknown>>, never, InterpolatorRegistry.InterpolatorRegistry> => machineOfLeg(leg)))),
|
|
178
|
+
)
|
|
179
|
+
return Machine.make({
|
|
180
|
+
settles: true,
|
|
181
|
+
span: { name: "wardic.appear", attributes: { legs: legs.length } },
|
|
182
|
+
start: () => {
|
|
183
|
+
const runs = Arr.map(machines, (machine, i) => ({ step: machine.start(), key: keyOfLeg(legs[i] as Leg), last: Option.none<Frame.Frame<unknown>>() }))
|
|
184
|
+
return (dt) => {
|
|
185
|
+
const value: Record<string, number | string> = {}
|
|
186
|
+
const done = Arr.reduce(runs, true, (all, run) => {
|
|
187
|
+
const frame = Option.getOrElse(Option.filter(run.last, (last) => last.done), () => run.step(dt))
|
|
188
|
+
run.last = Option.some(frame)
|
|
189
|
+
Option.match(run.key, {
|
|
190
|
+
onNone: () => Object.assign(value, frame.value as Values.Values),
|
|
191
|
+
onSome: (key) => Object.assign(value, { [key]: frame.value as number }),
|
|
192
|
+
})
|
|
193
|
+
return Bool.and(all, frame.done)
|
|
194
|
+
})
|
|
195
|
+
return { value, done }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
})
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** A leg's machine, built: a Blend's through the Interpolators `together` provides. */
|
|
202
|
+
const machineOfLeg = (leg: Leg): Effect.Effect<Machine.Machine<Frame.Frame<unknown>>, never, InterpolatorRegistry.InterpolatorRegistry> =>
|
|
203
|
+
Bool.match(leg._tag === "Blend", {
|
|
204
|
+
onTrue: () => (leg as Extract<Leg, { _tag: "Blend" }>).machine(),
|
|
205
|
+
onFalse: () => Effect.sync(() => (leg as Exclude<Leg, { _tag: "Blend" }>).machine() as Machine.Machine<Frame.Frame<unknown>>),
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
/** The key a Follow leg's single value is: its own. */
|
|
209
|
+
const keyOfLeg = (leg: Leg): Option.Option<string> =>
|
|
210
|
+
Bool.match(leg._tag === "Follow", { onTrue: () => Option.some((leg as Extract<Leg, { _tag: "Follow" }>).key), onFalse: () => Option.none() })
|
|
211
|
+
|
|
212
|
+
/** The DOM's Positional keys, which a server's reduced rule snaps (ADR-0029, ADR-0036). */
|
|
213
|
+
const DOM_POSITIONAL: ReducedMotion.PositionalKeys["Service"] = { isPositional: DomPositionalKeys.isPositional }
|
|
214
|
+
|
|
215
|
+
/** The DOM's Default transition, which a key with no transition defined samples as the client runs it (ADR-0051). */
|
|
216
|
+
const DOM_DEFAULTS: DefaultTransition.DefaultTransition["Service"] = { transitionFor: DomDefaultTransition.transitionFor, keyframes: DomDefaultTransition.keyframes }
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Whether a value's own transition drives one of its keys while anything repeats for ever (#301): one
|
|
220
|
+
* CSS cycle can't hold a key that stops beside one that repeats, nor two cycles' lengths. With every
|
|
221
|
+
* key on the transition's own fields (a `layout` entry alone), it plays as before.
|
|
222
|
+
*/
|
|
223
|
+
const foreverByValue = (m: MountAnimation): boolean => {
|
|
224
|
+
const entries = entriesOf(m.transition)
|
|
225
|
+
if (Predicate.isUndefined(entries)) return false
|
|
226
|
+
const runsOn = Arr.map(Rec.keys(m.to), (key) => transitionForKey(m.transition, key))
|
|
227
|
+
if (Arr.every(runsOn, (transition) => transition === entries.own)) return false
|
|
228
|
+
return Bool.or(repeatsForever(m.transition), Arr.some(runsOn, repeatsForever))
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** A mount animation's spec for the DOM's sampler, or why it has none. */
|
|
232
|
+
export const specOf = (m: MountAnimation): Result.Result<Appear.Spec, string> =>
|
|
233
|
+
Option.match(keyOf(m), {
|
|
234
|
+
onNone: () => Result.fail("its transition holds a function with no easing name"),
|
|
235
|
+
onSome: (key) => {
|
|
236
|
+
const skipped = m.skipped === true
|
|
237
|
+
if (Bool.and(Bool.not(skipped), foreverByValue(m))) return Result.fail("a value's own transition repeats for ever beside another")
|
|
238
|
+
const forever = playsForever(m)
|
|
239
|
+
const transition = Bool.match(skipped, { onTrue: () => m.transition, onFalse: () => sampledTransition(m.transition) })
|
|
240
|
+
const repeatDelay = UndefinedOr.match(m.transition, { onUndefined: () => 0, onDefined: (t) => Option.getOrElse(Option.fromUndefinedOr((t as Machine.AnimateOptions).repeatDelay), () => 0) })
|
|
241
|
+
return Result.succeed({
|
|
242
|
+
key,
|
|
243
|
+
tag: m.tag,
|
|
244
|
+
infinite: forever,
|
|
245
|
+
projected: m.layout,
|
|
246
|
+
template: m.template,
|
|
247
|
+
// Skipped (#468): every key's snap, landing on its first frame, a rule of 0 s.
|
|
248
|
+
machine: () =>
|
|
249
|
+
Bool.match(forever, {
|
|
250
|
+
onTrue: () => Machine.holdAfter(together(legsOf(m.from, m.to, transition, m.reduced, skipped, DOM_POSITIONAL, DOM_DEFAULTS, NO_VELOCITY, undefined, m.stops)), repeatDelay),
|
|
251
|
+
onFalse: () => together(legsOf(m.from, m.to, transition, m.reduced, skipped, DOM_POSITIONAL, DOM_DEFAULTS, NO_VELOCITY, undefined, m.stops)),
|
|
252
|
+
}),
|
|
253
|
+
})
|
|
254
|
+
},
|
|
255
|
+
})
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Why a mount animation can't play before hydration, or `None` when it can (decision 4): a key
|
|
259
|
+
* starting from anything but `initial`, a value the DOM reads from the element (`auto`, `var()`),
|
|
260
|
+
* or a start that can't take its target's shape (a length pair in two units).
|
|
261
|
+
*/
|
|
262
|
+
export const unplayable = (initial: Values.Values, to: Values.Values): Option.Option<string> =>
|
|
263
|
+
Arr.findFirst(Rec.toEntries(to), ([key, target]) =>
|
|
264
|
+
Option.match(Option.fromUndefinedOr(initial[key]), {
|
|
265
|
+
onNone: () => Option.some(`${key} starts from the element's own value (no initial)`),
|
|
266
|
+
onSome: (start) =>
|
|
267
|
+
Bool.match(Bool.or(readsElement(start), readsElement(target)), {
|
|
268
|
+
onTrue: () => Option.some(`${key} is a value the DOM reads from the element`),
|
|
269
|
+
onFalse: () =>
|
|
270
|
+
// A start that can't take its target's shape, a length in another unit among them (ADR-0024).
|
|
271
|
+
Bool.match(Option.isNone(OwnValues.valueLike(start, target)), {
|
|
272
|
+
onTrue: () => Option.some(`${key}'s start and target don't take one shape`),
|
|
273
|
+
onFalse: () => Option.none(),
|
|
274
|
+
}),
|
|
275
|
+
}),
|
|
276
|
+
}))
|
|
277
|
+
|
|
278
|
+
/** Whether a value is one the DOM reads from the element: `auto`, or a custom property. */
|
|
279
|
+
const readsElement = (value: number | string): boolean => Predicate.isString(value) && /\bauto\b|var\(/.test(value)
|
|
280
|
+
|
|
281
|
+
/** Whether an `initial` value, coerced to its target's shape, is that target: its key starts no leg (#448). */
|
|
282
|
+
const atTarget = (start: number | string | undefined, target: number | string): boolean =>
|
|
283
|
+
Option.exists(OwnValues.valueLike(start, target), (like) => like === target)
|
|
284
|
+
|
|
285
|
+
// --- The server --------------------------------------------------------------------------------
|
|
286
|
+
|
|
287
|
+
/** A variant parent's orchestration, on a server: its children in render order, its stagger and `when`. */
|
|
288
|
+
export interface AppearGroup {
|
|
289
|
+
readonly leader: Entry
|
|
290
|
+
readonly stagger: WardicStaggerConfig
|
|
291
|
+
readonly when: "beforeChildren" | "afterChildren" | undefined
|
|
292
|
+
readonly children: Array<Entry>
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** One element's place in a server render's Appear animations. */
|
|
296
|
+
export interface Entry {
|
|
297
|
+
/** Its mount animation per motion setting, or why it has none; `None` when nothing animates. */
|
|
298
|
+
readonly plays: { readonly normal: Option.Option<Result.Result<MountAnimation, string>>; readonly reduced: Option.Option<Result.Result<MountAnimation, string>> }
|
|
299
|
+
readonly slot: Option.Option<Appear.Slot>
|
|
300
|
+
/** The group it staggers in, as a Variant child. */
|
|
301
|
+
readonly group: Option.Option<AppearGroup>
|
|
302
|
+
/** Why it was ruled out after it rendered: its user style, read when `ward()` is called (ADR-0044, decision 4). */
|
|
303
|
+
readonly vetoes: Array<string>
|
|
304
|
+
/**
|
|
305
|
+
* Whether it follows the user's preference (`"user"`, #434): its reduced play goes under the head's
|
|
306
|
+
* media query. With `"always"` or `"never"` its plays are already that setting's.
|
|
307
|
+
*/
|
|
308
|
+
readonly user: boolean
|
|
309
|
+
/** Whether it's skipped (#468): its rule lands on first paint, and its own stagger holds it back no more than its client does. */
|
|
310
|
+
readonly skipped: boolean
|
|
311
|
+
/** Its tag, and the keys its mount animates: what names it when the provider explains (#585). */
|
|
312
|
+
readonly tag: string | undefined
|
|
313
|
+
readonly to: Option.Option<Values.Values>
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/** One server render's Appear animations: the provider's (ADR-0044, decisions 3 and 5). */
|
|
317
|
+
export interface ServerAppear {
|
|
318
|
+
/** The provider's reduced motion: an element's, unless its nearest `WardicConfig` sets its own (#434). */
|
|
319
|
+
readonly reducedMotion: ReducedMotion.Config
|
|
320
|
+
/**
|
|
321
|
+
* An element's entry, and its inline `animation` when it plays: its plays as its reduced motion has
|
|
322
|
+
* them, `setting` (its nearest `WardicConfig`'s, #434) else the provider's. A skipped one's (#468)
|
|
323
|
+
* are one play in both slots, whatever its reduced motion.
|
|
324
|
+
*/
|
|
325
|
+
readonly enter: (
|
|
326
|
+
animation: { readonly normal: Option.Option<Result.Result<MountAnimation, string>>; readonly reduced: Option.Option<Result.Result<MountAnimation, string>> },
|
|
327
|
+
group: Option.Option<AppearGroup>,
|
|
328
|
+
setting: ReducedMotion.Config | undefined,
|
|
329
|
+
skipped: boolean,
|
|
330
|
+
/** Its tag and its targets at mount, which name it when the provider explains (#585). */
|
|
331
|
+
tag: string | undefined,
|
|
332
|
+
to: Option.Option<Values.Values>,
|
|
333
|
+
) => {
|
|
334
|
+
readonly entry: Entry
|
|
335
|
+
readonly animation: Option.Option<string>
|
|
336
|
+
/**
|
|
337
|
+
* Entered after the shell was flushed, so in a chunk a stream sends later (#245), and no late
|
|
338
|
+
* element around it: the chunk's root, which puts the chunk's `<style>` after itself.
|
|
339
|
+
*/
|
|
340
|
+
readonly chunkRoot: boolean
|
|
341
|
+
readonly late: boolean
|
|
342
|
+
}
|
|
343
|
+
/** A variant parent's group, its children to come. */
|
|
344
|
+
readonly group: (leader: Entry, transition: WardicTransition | undefined) => AppearGroup
|
|
345
|
+
/**
|
|
346
|
+
* The head's CSS, once the shell is done: every element entered so far, its timing worked out,
|
|
347
|
+
* and the rules. Called once, by the provider's `useAssets`: what enters after is late (#245).
|
|
348
|
+
*/
|
|
349
|
+
readonly css: () => string
|
|
350
|
+
/** Render a late element's subtree: an element inside it isn't a chunk's root (#245). */
|
|
351
|
+
readonly within: <A>(late: boolean, render: () => A) => A
|
|
352
|
+
/**
|
|
353
|
+
* A late chunk's CSS (#245): the rules and timings of every element entered since the last
|
|
354
|
+
* write, those the head sent left out; "" for none. The Solid 2 binding hands it to `useHead`,
|
|
355
|
+
* which streams it with the chunk as a head patch (#209 PR 4a).
|
|
356
|
+
*/
|
|
357
|
+
readonly chunkCss: () => string
|
|
358
|
+
/**
|
|
359
|
+
* A late chunk's `<style>` (#245), as server text: {@link chunkCss} in a `<style>`. The Solid 1
|
|
360
|
+
* binding's chunk root's thunk asks for it once the chunk has rendered.
|
|
361
|
+
*/
|
|
362
|
+
readonly chunk: () => string
|
|
363
|
+
/** The nonce the page's Content Security Policy gives inline styles, which each `<style>` carries (#618, P1). */
|
|
364
|
+
readonly nonce: string | undefined
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/** No transition: no orchestration. */
|
|
368
|
+
const NO_TRANSITION: WardicTransition = {}
|
|
369
|
+
|
|
370
|
+
/** An element's reduced motion (#434): its nearest config's, else the provider's. */
|
|
371
|
+
const settingOr = (setting: ReducedMotion.Config | undefined, provider: ReducedMotion.Config): ReducedMotion.Config => {
|
|
372
|
+
if (Predicate.isNotUndefined(setting)) return setting
|
|
373
|
+
return provider
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* An element's plays under its reduced motion (#434): `"always"` plays its reduced one in both
|
|
378
|
+
* settings, `"never"` its normal one, and `"user"` each in its own, the reduced under the media query.
|
|
379
|
+
*/
|
|
380
|
+
const playsUnder = (plays: Entry["plays"], setting: ReducedMotion.Config): Entry["plays"] => {
|
|
381
|
+
if (setting === "always") return { normal: plays.reduced, reduced: plays.reduced }
|
|
382
|
+
if (setting === "never") return { normal: plays.normal, reduced: plays.normal }
|
|
383
|
+
return plays
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/** Whether an entry follows the user's preference (#434). */
|
|
387
|
+
const isUser = (entry: Entry): boolean => entry.user
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* What a provider's `appear` explains with (#585): with `"explain"`, a Warning for each element that
|
|
391
|
+
* waits for the JavaScript, logged as the render finds it with Effect's own logger, since a server
|
|
392
|
+
* builds no runtime from the app's `env`; nothing otherwise.
|
|
393
|
+
*/
|
|
394
|
+
export const explainerOf = (appear: boolean | "explain" | undefined): ((message: string) => void) | undefined => {
|
|
395
|
+
if (appear !== "explain") return undefined
|
|
396
|
+
return (message) => Effect.runSync(Effect.logWarning(message))
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/** An element as the provider's explanation names it (#585): its tag and the keys its mount animates. */
|
|
400
|
+
const nameOf = (entry: Entry): string => {
|
|
401
|
+
const element = UndefinedOr.match(entry.tag, { onUndefined: () => "an element", onDefined: (tag) => `<${tag}>` })
|
|
402
|
+
return Option.match(entry.to, { onNone: () => element, onSome: (to) => `${element} (${Rec.keys(to).join(", ")})` })
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* A server render's Appear animations, for a provider whose reduced motion is `reducedMotion`. With
|
|
407
|
+
* `explain` (the provider's `appear="explain"`, #585), it says why each element that doesn't play
|
|
408
|
+
* waits for the JavaScript, as it finds out; without it, nothing is kept or said.
|
|
409
|
+
*/
|
|
410
|
+
export const serverAppear = (reducedMotion: ReducedMotion.Config, explain?: (message: string) => void, nonce?: string): ServerAppear => {
|
|
411
|
+
const sheet = Appear.sheet()
|
|
412
|
+
const entries: Array<Entry> = []
|
|
413
|
+
/** Says why `entry` waits for the JavaScript, when the provider explains. */
|
|
414
|
+
const waits = (entry: Entry, reason: string): void => {
|
|
415
|
+
if (Predicate.isNotUndefined(explain)) explain(`wardic.appear: ${nameOf(entry)} waits for the JavaScript: ${reason}`)
|
|
416
|
+
}
|
|
417
|
+
// The shell is flushed once the head's CSS is asked for: what enters after is late (#245).
|
|
418
|
+
let flushed = false
|
|
419
|
+
// The entries written so far, and how deep the render is in late elements.
|
|
420
|
+
let written = 0
|
|
421
|
+
let lateDepth = 0
|
|
422
|
+
/** The entries since the last write, now written. */
|
|
423
|
+
const nextBatch = (): ReadonlyArray<Entry> => {
|
|
424
|
+
const batch = entries.slice(written)
|
|
425
|
+
written = entries.length
|
|
426
|
+
return batch
|
|
427
|
+
}
|
|
428
|
+
/** A batch's timing, each slot defined, and the sheet's CSS for them (decision 5). */
|
|
429
|
+
const write = (batch: ReadonlyArray<Entry>): string => {
|
|
430
|
+
// Each entry's plays are its own setting's (#434): the normal ones always, the reduced ones under
|
|
431
|
+
// the media query when an entry follows the user.
|
|
432
|
+
const resolve = (pick: "normal" | "reduced") => timings(batch, pick)
|
|
433
|
+
const normal = resolve("normal")
|
|
434
|
+
const reduced = Bool.match(Arr.some(batch, isUser), { onTrue: () => Option.some(resolve("reduced")), onFalse: () => Option.none<Timings>() })
|
|
435
|
+
const settings = Arr.prepend(Option.toArray(reduced), normal)
|
|
436
|
+
// Most renders write no SVG geometry: no group pass.
|
|
437
|
+
const supports = Bool.match(Arr.some(settings, (byEntry) => byEntry.geometry), {
|
|
438
|
+
onTrue: () => groupSupports(batch, settings),
|
|
439
|
+
onFalse: () => () => NO_SUPPORTS,
|
|
440
|
+
})
|
|
441
|
+
Arr.forEach(batch, (entry) =>
|
|
442
|
+
Option.map(entry.slot, (slot) => {
|
|
443
|
+
const play = UndefinedOr.getOrThrow(normal.get(entry))
|
|
444
|
+
const reducedPlay = Option.map(Option.filter(reduced, () => entry.user), (byEntry) => UndefinedOr.getOrThrow(byEntry.get(entry)))
|
|
445
|
+
const defined = Result.flatMap(play, (p) =>
|
|
446
|
+
Option.match(reducedPlay, {
|
|
447
|
+
onNone: () => slot.define(p, undefined, supports(entry)),
|
|
448
|
+
onSome: (r) => Result.flatMap(r, (rp) => slot.define(p, rp, supports(entry))),
|
|
449
|
+
}))
|
|
450
|
+
Result.match(defined, { onFailure: (reason) => waits(entry, reason), onSuccess: () => undefined })
|
|
451
|
+
}))
|
|
452
|
+
return sheet.css()
|
|
453
|
+
}
|
|
454
|
+
const plays = (animation: Entry["plays"]): boolean =>
|
|
455
|
+
Bool.or(Option.exists(animation.normal, Result.isSuccess), Option.exists(animation.reduced, Result.isSuccess))
|
|
456
|
+
const chunkCss = (): string => write(nextBatch())
|
|
457
|
+
return {
|
|
458
|
+
reducedMotion,
|
|
459
|
+
enter: (given, group, setting, skipped, tag, to) => {
|
|
460
|
+
// Skipped (#468): its one play in both slots, under no media query.
|
|
461
|
+
const own = Bool.match(skipped, { onTrue: (): ReducedMotion.Config => "never", onFalse: () => settingOr(setting, reducedMotion) })
|
|
462
|
+
const animation = playsUnder(given, own)
|
|
463
|
+
const slot = Option.liftPredicate(animation, plays).pipe(Option.map(() => sheet.slot()))
|
|
464
|
+
const entry: Entry = { plays: animation, slot, group, vetoes: [], user: own === "user", skipped, tag, to }
|
|
465
|
+
// Why it plays neither: its normal play's reason, its reduced one's when that differs (#585).
|
|
466
|
+
if (Predicate.isNotUndefined(explain)) {
|
|
467
|
+
const reasons = Arr.dedupe(Arr.flatMap([animation.normal, animation.reduced], (play) => Option.toArray(Option.flatMap(play, (p) => Result.getFailure(p)))))
|
|
468
|
+
Arr.forEach(reasons, (reason) => waits(entry, reason))
|
|
469
|
+
}
|
|
470
|
+
entries.push(entry)
|
|
471
|
+
Option.map(group, (g) => g.children.push(entry))
|
|
472
|
+
return { entry, animation: Option.map(slot, (s) => s.animation), late: flushed, chunkRoot: Bool.and(flushed, lateDepth === 0) }
|
|
473
|
+
},
|
|
474
|
+
within: (late, render) => {
|
|
475
|
+
// Per element on a server: a guard, no allocation.
|
|
476
|
+
if (Bool.not(late)) return render()
|
|
477
|
+
lateDepth++
|
|
478
|
+
try {
|
|
479
|
+
return render()
|
|
480
|
+
} finally {
|
|
481
|
+
lateDepth--
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
chunkCss,
|
|
485
|
+
chunk: () => Appear.chunkStyle(chunkCss(), nonce),
|
|
486
|
+
nonce,
|
|
487
|
+
group: (leader, transition) => {
|
|
488
|
+
const { staggerChildren = 0, delayChildren = 0, from = "first", staggerDirection = 1, when } = UndefinedOr.match(transition, {
|
|
489
|
+
onUndefined: () => NO_TRANSITION,
|
|
490
|
+
onDefined: (t: WardicTransition) => t,
|
|
491
|
+
})
|
|
492
|
+
return { leader, stagger: { amount: staggerChildren, delayChildren, from, direction: staggerDirection }, when, children: [] }
|
|
493
|
+
},
|
|
494
|
+
css: () => {
|
|
495
|
+
flushed = true
|
|
496
|
+
return write(nextBatch())
|
|
497
|
+
},
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Each entry's play for one motion setting: its spec and its delay, or why it has none. A Variant
|
|
503
|
+
* child starts after its stagger (`delayChildren` plus its place, ADR-0007), and after its parent
|
|
504
|
+
* settles under `when: "beforeChildren"`; a parent under `"afterChildren"` starts once its last
|
|
505
|
+
* child settles. A start that depends on an element with no rule has none.
|
|
506
|
+
*
|
|
507
|
+
* Timed a batch at a time (#245): the shell's, then each late chunk's, whose CSS starts when the
|
|
508
|
+
* chunk lands. A late Variant child of a group led earlier is a fresh mount from then: its stagger
|
|
509
|
+
* is among that group's children in its batch, and it doesn't wait on the leader (decision 5 of
|
|
510
|
+
* *Amendment (#245)*). The shell's batch is every entry, so nothing changes for it.
|
|
511
|
+
*/
|
|
512
|
+
const timings = (entries: ReadonlyArray<Entry>, pick: "normal" | "reduced"): Timings => {
|
|
513
|
+
const memo = new Map<Entry, Result.Result<{ readonly play: TimedPlay; readonly settled: number }, string>>()
|
|
514
|
+
let geometry = false
|
|
515
|
+
const inBatch = new Set(entries)
|
|
516
|
+
// Each group's children in this batch, once a group.
|
|
517
|
+
const batchChildren = new Map<AppearGroup, ReadonlyArray<Entry>>()
|
|
518
|
+
const childrenOf = (g: AppearGroup): ReadonlyArray<Entry> =>
|
|
519
|
+
Option.getOrElse(Option.fromUndefinedOr(batchChildren.get(g)), () => {
|
|
520
|
+
const children = Arr.filter(g.children, (child) => inBatch.has(child))
|
|
521
|
+
batchChildren.set(g, children)
|
|
522
|
+
return children
|
|
523
|
+
})
|
|
524
|
+
/** An entry's spec and rule, or why it has none; a missing play (nothing animates) is a rule of 0 s. */
|
|
525
|
+
const ruleOf = (entry: Entry): Result.Result<Option.Option<{ readonly spec: Appear.Spec; readonly rule: Appear.Keyframes }>, string> =>
|
|
526
|
+
Arr.match(entry.vetoes, {
|
|
527
|
+
onNonEmpty: (vetoes) => Result.fail(vetoes.join("; ")),
|
|
528
|
+
onEmpty: () => playOf(entry),
|
|
529
|
+
})
|
|
530
|
+
const playOf = (entry: Entry): Result.Result<Option.Option<{ readonly spec: Appear.Spec; readonly rule: Appear.Keyframes }>, string> =>
|
|
531
|
+
Option.match(entry.plays[pick], {
|
|
532
|
+
onNone: () => Result.succeed(Option.none()),
|
|
533
|
+
onSome: (animation) =>
|
|
534
|
+
Result.flatMap(Result.flatMap(animation, specOf), (spec) => Result.map(Appear.keyframes(spec), (rule) => Option.some({ spec, rule }))),
|
|
535
|
+
})
|
|
536
|
+
/** The seconds from first paint to when `entry` starts, and its play. */
|
|
537
|
+
const timingOf = (entry: Entry): Result.Result<{ readonly play: TimedPlay; readonly settled: number }, string> =>
|
|
538
|
+
Option.getOrElse(Option.fromUndefinedOr(memo.get(entry)), () => {
|
|
539
|
+
const computed = Result.flatMap(ruleOf(entry), (rule) =>
|
|
540
|
+
Result.map(startOf(entry), (start) => {
|
|
541
|
+
const spec = Option.match(rule, { onNone: () => undefined, onSome: (r) => r.spec })
|
|
542
|
+
// A forever-repeating rule is a cycle: its own delay plays before it, and it never settles.
|
|
543
|
+
const mount = Option.match(entry.plays[pick], { onNone: () => undefined, onSome: (p) => Result.match(p, { onFailure: () => undefined, onSuccess: identity }) })
|
|
544
|
+
const transition = UndefinedOr.map(mount, (m) => m.transition)
|
|
545
|
+
const forever = UndefinedOr.match(mount, { onUndefined: () => false, onDefined: playsForever })
|
|
546
|
+
const before = Bool.match(forever, { onTrue: () => ownDelayOf(transition), onFalse: () => 0 })
|
|
547
|
+
const settled = Option.match(rule, { onNone: () => 0, onSome: (r) => Bool.match(forever, { onTrue: () => Number.POSITIVE_INFINITY, onFalse: () => r.rule.settled }) })
|
|
548
|
+
const supports = Option.match(rule, { onNone: () => NO_SUPPORTS, onSome: (r) => r.rule.supports })
|
|
549
|
+
geometry = Bool.or(geometry, Arr.isReadonlyArrayNonEmpty(supports))
|
|
550
|
+
return { play: { spec: spec as Appear.Spec, delay: start + before, supports }, settled: start + before + settled }
|
|
551
|
+
}))
|
|
552
|
+
memo.set(entry, computed)
|
|
553
|
+
return computed
|
|
554
|
+
})
|
|
555
|
+
/** When `entry` starts: its stagger, after its parent under `beforeChildren`, after its children under `afterChildren`. */
|
|
556
|
+
const startOf = (entry: Entry): Result.Result<number, string> =>
|
|
557
|
+
Result.flatMap(afterParent(entry), (afterLeader) => Result.map(afterChildren(entry), (afterKids) => Math.max(afterLeader, afterKids) + ownStaggerOf(entry, childrenOf)))
|
|
558
|
+
// A leader written earlier started at first paint: a late child doesn't wait on it.
|
|
559
|
+
const afterParent = (entry: Entry): Result.Result<number, string> =>
|
|
560
|
+
Option.match(Option.filter(entry.group, (g) => Bool.and(g.when === "beforeChildren", inBatch.has(g.leader))), {
|
|
561
|
+
onNone: () => Result.succeed(0),
|
|
562
|
+
onSome: (g) =>
|
|
563
|
+
Result.flatMap(
|
|
564
|
+
Result.mapError(Result.map(timingOf(g.leader), (t) => t.settled), (reason) => `its parent has no rule (${reason})`),
|
|
565
|
+
(settled) => Bool.match(Number.isFinite(settled), { onTrue: () => Result.succeed(settled), onFalse: () => Result.fail("its parent never settles") }),
|
|
566
|
+
),
|
|
567
|
+
})
|
|
568
|
+
const afterChildren = (entry: Entry): Result.Result<number, string> =>
|
|
569
|
+
Option.match(Option.fromUndefinedOr(groupsLed.get(entry)), {
|
|
570
|
+
onNone: () => Result.succeed(0),
|
|
571
|
+
onSome: (g) =>
|
|
572
|
+
Bool.match(g.when === "afterChildren", {
|
|
573
|
+
onFalse: () => Result.succeed(0),
|
|
574
|
+
onTrue: () =>
|
|
575
|
+
Result.mapError(
|
|
576
|
+
Result.map(Result.all(Arr.map(childrenOf(g), timingOf)), (kids) => Arr.reduce(kids, 0, (latest, t) => Math.max(latest, t.settled))),
|
|
577
|
+
(reason) => `a child has no rule (${reason})`,
|
|
578
|
+
),
|
|
579
|
+
}),
|
|
580
|
+
})
|
|
581
|
+
const groupsLed = new Map<Entry, AppearGroup>()
|
|
582
|
+
Arr.forEach(entries, (entry) => Option.map(entry.group, (g) => groupsLed.set(g.leader, g)))
|
|
583
|
+
const plays = new Map(Arr.map(entries, (entry) => [entry, Result.flatMap(timingOf(entry), (t) => Bool.match(Predicate.isUndefined(t.play.spec), {
|
|
584
|
+
onTrue: () => Result.fail("nothing animates"),
|
|
585
|
+
onFalse: () => Result.succeed(t.play),
|
|
586
|
+
}))] as const))
|
|
587
|
+
return Object.assign(plays, { geometry })
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** Each entry's play for one motion setting, and whether any of their rules writes SVG geometry. */
|
|
591
|
+
type Timings = Map<Entry, Result.Result<TimedPlay, string>> & { readonly geometry: boolean }
|
|
592
|
+
|
|
593
|
+
/** An element's play, with the SVG geometry properties its rule writes (#245, `Appear.Keyframes.supports`). */
|
|
594
|
+
interface TimedPlay extends Appear.Play {
|
|
595
|
+
readonly supports: ReadonlyArray<string>
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
const NO_SUPPORTS: ReadonlyArray<string> = []
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* The SVG geometry properties each entry's orchestrated group writes, over every play (#245,
|
|
602
|
+
* `Appear.Keyframes.supports`): the whole tree a top leader orchestrates is defined under one
|
|
603
|
+
* `@supports`, so a browser without them keeps all of it at its Starting style, not part of it
|
|
604
|
+
* (decision 4: an element qualifies whole, and so does what it orchestrates). Per element on a
|
|
605
|
+
* server: a render whose rules write none (most) pays a look at each play.
|
|
606
|
+
*/
|
|
607
|
+
const groupSupports = (
|
|
608
|
+
entries: ReadonlyArray<Entry>,
|
|
609
|
+
settings: ReadonlyArray<Map<Entry, Result.Result<TimedPlay, string>>>,
|
|
610
|
+
): ((entry: Entry) => ReadonlyArray<string>) => {
|
|
611
|
+
/** The leader at the top of an entry's orchestration: itself, outside any group. */
|
|
612
|
+
const topOf = (entry: Entry): Entry => Option.match(entry.group, { onNone: () => entry, onSome: (g) => topOf(g.leader) })
|
|
613
|
+
/** What an entry's own rules write, over every play. */
|
|
614
|
+
const own = (entry: Entry): ReadonlyArray<string> =>
|
|
615
|
+
Arr.flatMap(settings, (byEntry) =>
|
|
616
|
+
Option.match(Option.fromUndefinedOr(byEntry.get(entry)), {
|
|
617
|
+
onNone: () => NO_SUPPORTS,
|
|
618
|
+
onSome: (play) => Result.match(play, { onFailure: () => NO_SUPPORTS, onSuccess: (p) => p.supports }),
|
|
619
|
+
}))
|
|
620
|
+
const byTop = new Map<Entry, ReadonlyArray<string>>()
|
|
621
|
+
Arr.forEach(entries, (entry) =>
|
|
622
|
+
Arr.match(own(entry), {
|
|
623
|
+
onEmpty: () => undefined,
|
|
624
|
+
onNonEmpty: (mine) => {
|
|
625
|
+
const top = topOf(entry)
|
|
626
|
+
byTop.set(top, Arr.appendAll(Option.getOrElse(Option.fromUndefinedOr(byTop.get(top)), () => NO_SUPPORTS), mine))
|
|
627
|
+
},
|
|
628
|
+
}))
|
|
629
|
+
return (entry) =>
|
|
630
|
+
Bool.match(byTop.size === 0, {
|
|
631
|
+
onTrue: () => NO_SUPPORTS,
|
|
632
|
+
onFalse: () => Option.getOrElse(Option.fromUndefinedOr(byTop.get(topOf(entry))), () => NO_SUPPORTS),
|
|
633
|
+
})
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/** An entry's own stagger: none when it's skipped (#468), as its client's snap has no delay; its `when` waits still hold. */
|
|
637
|
+
const ownStaggerOf = (entry: Entry, childrenOf: (g: AppearGroup) => ReadonlyArray<Entry>): number => {
|
|
638
|
+
if (entry.skipped) return 0
|
|
639
|
+
return staggerOf(entry, childrenOf)
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* A Variant child's stagger: its parent's `delayChildren` plus its place (ADR-0007), as the client
|
|
644
|
+
* works it out, among the group's children in its batch (`childrenOf`, #245).
|
|
645
|
+
*/
|
|
646
|
+
const staggerOf = (entry: Entry, childrenOf: (g: AppearGroup) => ReadonlyArray<Entry>): number =>
|
|
647
|
+
Option.match(entry.group, {
|
|
648
|
+
onNone: () => 0,
|
|
649
|
+
onSome: (g) => {
|
|
650
|
+
const children = childrenOf(g)
|
|
651
|
+
const n = children.length
|
|
652
|
+
const i = children.indexOf(entry)
|
|
653
|
+
return childDelayOf(g.stagger, i, n)
|
|
654
|
+
},
|
|
655
|
+
})
|
|
656
|
+
|
|
657
|
+
/** What the server knows of an element when it renders it. */
|
|
658
|
+
export interface ServerElement {
|
|
659
|
+
/** The element's own `appear` (the provider's is the render's {@link ServerAppear}). */
|
|
660
|
+
readonly appear: boolean | undefined
|
|
661
|
+
readonly tag: string | undefined
|
|
662
|
+
/** Its starting values: `initial`, an inherited `initial` name, or `animate` under `initial={false}`. */
|
|
663
|
+
readonly initial: Values.Values
|
|
664
|
+
/** Its targets at mount: `animate`, or an inherited variant name resolved against its `variants`; `None` with neither. */
|
|
665
|
+
readonly to: Option.Option<Values.Values>
|
|
666
|
+
/** Its targets' Keyframes (#429), each such key's value in `to` their last stop; `undefined` with none. */
|
|
667
|
+
readonly keyframes: Keyframes | undefined
|
|
668
|
+
/** Whether its mount starts at its `animate` (#448, `startsQuiet`): nothing plays, its Keyframes included (#429). */
|
|
669
|
+
readonly quiet: boolean
|
|
670
|
+
/** Its own transition, else the one it inherits (ADR-0007). */
|
|
671
|
+
readonly transition: WardicTransition | undefined
|
|
672
|
+
/** Whether it's a layout node (`layout` or `layoutId`): drawn through its projection at rest (#245). */
|
|
673
|
+
readonly layout: boolean
|
|
674
|
+
/** Its **Transform template** (#443), when it has one. */
|
|
675
|
+
readonly template?: DomRenderer.TransformTemplate | undefined
|
|
676
|
+
/** The group it staggers in, as a Variant child: its parent's (`node.inherited`). */
|
|
677
|
+
readonly group: Option.Option<AppearGroup>
|
|
678
|
+
/** Whether it orchestrates its Variant children: it has variants of its own (ADR-0007). */
|
|
679
|
+
readonly leads: boolean
|
|
680
|
+
/** Its own transition, whose stagger and `when` its Variant children follow. */
|
|
681
|
+
readonly ownTransition: WardicTransition | undefined
|
|
682
|
+
/** Its nearest `WardicConfig`'s reduced motion (#434), over the provider's: `undefined` for none. */
|
|
683
|
+
readonly reducedMotion?: ReducedMotion.Config | undefined
|
|
684
|
+
/** Whether its nearest `WardicConfig` skips its animations (#468). Its transition's own `skipAnimations` counts too. */
|
|
685
|
+
readonly skipAnimations?: boolean | undefined
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* An element's entry in a server render's Appear animations: its inline `animation` when it plays
|
|
690
|
+
* one, and the group its Variant children join when it leads one.
|
|
691
|
+
*/
|
|
692
|
+
export const enterServer = (
|
|
693
|
+
appear: ServerAppear,
|
|
694
|
+
el: ServerElement,
|
|
695
|
+
): {
|
|
696
|
+
readonly animation: Option.Option<string>
|
|
697
|
+
readonly group: Option.Option<AppearGroup>
|
|
698
|
+
readonly veto: (reason: string) => void
|
|
699
|
+
/** Rendered after the shell (#245): in a late chunk, and that chunk's root when no late element is around it. */
|
|
700
|
+
readonly late: boolean
|
|
701
|
+
readonly chunkRoot: boolean
|
|
702
|
+
} => {
|
|
703
|
+
// Its starts and targets once, both plays sharing them (and so their key's text, `keyOf`). A key
|
|
704
|
+
// already at its target, coerced to its shape, is left out, as the client's first Retarget starts
|
|
705
|
+
// it no leg (#448); a Keyframes key never is, and starts at its first stop, unless the mount starts
|
|
706
|
+
// at its `animate`, when nothing plays (#429, Motion's).
|
|
707
|
+
const mount = Option.flatMap(el.to, (to) => {
|
|
708
|
+
const moving = Rec.filter(to, (target, key) =>
|
|
709
|
+
Bool.match(hasStops(el.keyframes, key), { onTrue: () => Bool.not(el.quiet), onFalse: () => Bool.not(atTarget(el.initial[key], target)) }))
|
|
710
|
+
return Bool.match(Rec.isEmptyRecord(moving), {
|
|
711
|
+
onTrue: () => Option.none(),
|
|
712
|
+
onFalse: () => Option.some(Result.map(playable(el, moving), (prepared): KeyframesStart & { readonly to: Values.Values } => startedOf(prepared, el.keyframes))),
|
|
713
|
+
})
|
|
714
|
+
})
|
|
715
|
+
// Skipped (#468): its config's, or its whole transition's own, as the client's legs read them.
|
|
716
|
+
const skipped = Bool.or(el.skipAnimations === true, UndefinedOr.match(el.transition, { onUndefined: () => false, onDefined: (t) => t.skipAnimations === true }))
|
|
717
|
+
const play = (reduced: boolean): Option.Option<Result.Result<MountAnimation, string>> =>
|
|
718
|
+
Option.map(mount, (prepared) =>
|
|
719
|
+
Result.map(prepared, ({ from, to, stops }): MountAnimation => ({
|
|
720
|
+
tag: el.tag,
|
|
721
|
+
from,
|
|
722
|
+
to,
|
|
723
|
+
transition: el.transition,
|
|
724
|
+
reduced,
|
|
725
|
+
layout: el.layout,
|
|
726
|
+
stops,
|
|
727
|
+
...skippedField(skipped),
|
|
728
|
+
...UndefinedOr.match(el.template, { onUndefined: () => ({}), onDefined: (template) => ({ template }) }),
|
|
729
|
+
})))
|
|
730
|
+
const plays = Bool.match(skipped, {
|
|
731
|
+
onTrue: () => {
|
|
732
|
+
const one = play(false)
|
|
733
|
+
return { normal: one, reduced: one }
|
|
734
|
+
},
|
|
735
|
+
onFalse: () => ({ normal: play(false), reduced: play(true) }),
|
|
736
|
+
})
|
|
737
|
+
const { entry, animation: inline, late, chunkRoot } = appear.enter(plays, el.group, el.reducedMotion, skipped, el.tag, el.to)
|
|
738
|
+
return {
|
|
739
|
+
late,
|
|
740
|
+
chunkRoot,
|
|
741
|
+
animation: inline,
|
|
742
|
+
group: Option.liftPredicate(entry, () => el.leads).pipe(Option.map((leader) => appear.group(leader, el.ownTransition))),
|
|
743
|
+
veto: (reason) => {
|
|
744
|
+
entry.vetoes.push(reason)
|
|
745
|
+
},
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/** A mount animation's `skipped` (#468): left out when it isn't, so its key is as before. */
|
|
750
|
+
export const skippedField = (skipped: boolean): { readonly skipped?: true } => Bool.match(skipped, { onTrue: () => ({ skipped: true }) as const, onFalse: () => ({}) })
|
|
751
|
+
|
|
752
|
+
/** Whether `key` has Keyframes in `keyframes` (#429). */
|
|
753
|
+
const hasStops = (keyframes: Keyframes | undefined, key: string): boolean => {
|
|
754
|
+
if (Predicate.isUndefined(keyframes)) return false
|
|
755
|
+
return Object.hasOwn(keyframes, key)
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/** A mount's starts with its Keyframes resolved (#429, `keyframesFrom`), as the client's first Retarget resolves them. */
|
|
759
|
+
const startedOf = (prepared: { readonly from: Values.Values; readonly to: Values.Values }, keyframes: Keyframes | undefined): KeyframesStart & { readonly to: Values.Values } =>
|
|
760
|
+
UndefinedOr.match(keyframes, {
|
|
761
|
+
onUndefined: () => ({ from: prepared.from, to: prepared.to, stops: undefined }),
|
|
762
|
+
onDefined: (byKey) => ({ ...keyframesFrom(prepared.from, prepared.to, byKey), to: prepared.to }),
|
|
763
|
+
})
|
|
764
|
+
|
|
765
|
+
/** An element's starts and targets, or why its mount animation can't play before hydration (decision 4). */
|
|
766
|
+
const playable = (el: ServerElement, to: Values.Values): Result.Result<{ readonly from: Values.Values; readonly to: Values.Values }, string> => playableMatch({ el, to })
|
|
767
|
+
|
|
768
|
+
/** {@link playable}'s cases, built once at module load: it runs per element (#69's PR 2). */
|
|
769
|
+
const playableMatch: (input: { readonly el: ServerElement; readonly to: Values.Values }) => Result.Result<{ readonly from: Values.Values; readonly to: Values.Values }, string> =
|
|
770
|
+
/*#__PURE__*/ Match.type<{ readonly el: ServerElement; readonly to: Values.Values }>().pipe(
|
|
771
|
+
Match.when({ el: { appear: false } }, () => Result.fail("appear={false}")),
|
|
772
|
+
Match.orElse(({ el, to }) =>
|
|
773
|
+
Option.match(unplayable(el.initial, to), {
|
|
774
|
+
onSome: (reason): Result.Result<{ readonly from: Values.Values; readonly to: Values.Values }, string> => Result.fail(reason),
|
|
775
|
+
onNone: () => Result.succeed({ from: Rec.map(to, (target, key) => Option.getOrThrow(OwnValues.valueLike(el.initial[key] as number | string, target))), to }),
|
|
776
|
+
})),
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
/** Whether a user style sets an `animation` of its own: the element's one CSS animation would be taken. */
|
|
780
|
+
export const setsAnimation: (css: object | string | undefined) => boolean = /*#__PURE__*/ Match.type<object | string | undefined>().pipe(
|
|
781
|
+
Match.when(Predicate.isString, (text) => /(^|;)\s*animation(-name)?\s*:/i.test(text)),
|
|
782
|
+
Match.when(Predicate.isObject, (record) => Bool.or(Object.hasOwn(record, "animation"), Object.hasOwn(record, "animationName"))),
|
|
783
|
+
Match.orElse(() => false),
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
// --- The Handoff -------------------------------------------------------------------------------
|
|
787
|
+
|
|
788
|
+
/** An element's Appear animation, found at mount: the spine starts its first legs as far in as it has got. */
|
|
789
|
+
export interface Handoff {
|
|
790
|
+
readonly animation: Animation
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/** The element's Appear animation, if a server started one (decision 6). */
|
|
794
|
+
export const handoffOf = (element: Element): Option.Option<Handoff> => Option.map(Appear.find(element), (animation) => ({ animation }))
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* How far into its own run the client's first legs start, in seconds, read at their first tick:
|
|
798
|
+
* where the CSS has got, less what the CSS waited that the client waits for itself. The CSS waited
|
|
799
|
+
* its `animation-delay` and its rule's hold; the client's legs hold their transition's delay
|
|
800
|
+
* (`clientDelay`, the stagger in it). The difference is a `when` wait, which the client has already
|
|
801
|
+
* waited.
|
|
802
|
+
*/
|
|
803
|
+
export const startAtOf = (handoff: Handoff, ownTransition: WardicTransition | undefined, clientDelay: number) => (): number =>
|
|
804
|
+
Appear.elapsedOf(handoff.animation) - Appear.delayOf(handoff.animation) - heldInRule(ownTransition) + clientDelay
|