@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
|
@@ -0,0 +1,817 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The binding-orchestrated drag track (ADR-0004 response half), Solid-free (#209): each binding
|
|
3
|
+
* runs it through `driveDragTrack`, handing it a `watch` for its element's watch Scope, a `fork` for
|
|
4
|
+
* its responses and a `setDragging` for its `dragging` signal. The Solid 1 binding's `runDragTrack`
|
|
5
|
+
* (`drag.ts`) wraps it.
|
|
6
|
+
*
|
|
7
|
+
* DESIGN (locked via grilling, subtask 22c): on a drag-enabled element `x`/`y`
|
|
8
|
+
* are DIRECT-SET by the pointer (1:1, NOT sprung) while the spring spine keeps
|
|
9
|
+
* driving every OTHER key + `whileDrag`. Ownership of `x`/`y` is DYNAMIC: the
|
|
10
|
+
* drag owns them while held AND during the release tail; once the release
|
|
11
|
+
* settles, ownership returns to the spring (so a later `animate.x`/`y` or a
|
|
12
|
+
* layout/Reorder FLIP can take over from the rested position). A Retarget that
|
|
13
|
+
* changes `x` or `y` during the release takes them over sooner (#340, ADR-0016
|
|
14
|
+
* *Amendment (#340)*), as a newer animation of Motion's value does: the release
|
|
15
|
+
* stops where it is, tells no end, and the spring goes on from there, at the
|
|
16
|
+
* release's velocity ({@link DragTrack.takeRelease}).
|
|
17
|
+
*
|
|
18
|
+
* This module is the RESPONSE half (binding orchestration). Core ships the
|
|
19
|
+
* RECOGNITION (`drag()`, kept to its axis and holding its **Drag claim**), the
|
|
20
|
+
* constraint (`Drag.constrain`) and the inertia PRIMITIVE (`inertia`, `inertiaVec`); the
|
|
21
|
+
* constraints on the element's x/y, the release driver, the gate writes, and the
|
|
22
|
+
* snapshot sync are response concerns and live here (ADR-0004, ADR-0016 *Amendment (#140)*).
|
|
23
|
+
*
|
|
24
|
+
* STRUCTURE (ADR-0032, ADR-0055 *Amendment (#379)*): input is handled inside its event, by two
|
|
25
|
+
* watches in the element's watch Scope, with no fiber of the track's own at rest:
|
|
26
|
+
* - the drag's samples (`DragRecognizer.watchDrag`): a gesture's bookkeeping, then the direct-set,
|
|
27
|
+
* or at the "end" the release;
|
|
28
|
+
* - bare pointer-downs from the Primary pointer ("grabs", `InputFeed.watch`), which stop a
|
|
29
|
+
* running release, so a re-grab mid-release stops the tail where it is, and the ends of its
|
|
30
|
+
* presses, which let a projection node's release go on after a press that didn't drag.
|
|
31
|
+
* Each response is an Effect, run by `fork` on the provider runtime: its fiber starts at once and
|
|
32
|
+
* runs to its end inside the event (stopping a release interrupts a parked fiber in the caller's
|
|
33
|
+
* stack), and a release it starts, in a `FiberHandle`, is forked from it, keeping the runtime's
|
|
34
|
+
* scheduler, so it is on the Frame loop before its task ends. The next sample or grab interrupts it,
|
|
35
|
+
* which removes it from the loop at once. A response that fails is reported, and the next event's
|
|
36
|
+
* runs (ADR-0055 *Amendment (#379)*, Q4).
|
|
37
|
+
*
|
|
38
|
+
* **Drag controls** (#431, Motion's `useDragControls`) given to the element start its drag from a
|
|
39
|
+
* pointer pressed elsewhere: the track hands it to the element's pointer feed
|
|
40
|
+
* (`InputSource.adoptPointer`), whose adopted down the recognizer starts from as from a press on the
|
|
41
|
+
* element, and its grab stops a running release. `snapToCursor` moves the element's centre under the
|
|
42
|
+
* pointer there and then; `distanceThreshold` is that gesture's threshold. Their `stop` ends the drag
|
|
43
|
+
* as a release would; `cancel` ends it where it is, with no release and no `onDragEnd`. With
|
|
44
|
+
* `listen: false` (Motion's `dragListener={false}`) the element's own presses neither drag it nor stop
|
|
45
|
+
* its release. The track subscribes to the controls while its watch Scope is open, so an element an
|
|
46
|
+
* `<AnimatePresence>` is taking out (disposed) starts none, as Motion's doesn't.
|
|
47
|
+
*
|
|
48
|
+
* The samples subscribe before the grabs, so one event's samples reach the track
|
|
49
|
+
* before its grab: a Stale gesture's "end" (ADR-0019, rule B) starts its release and
|
|
50
|
+
* the grab of the same down stops it before its first frame, on every Environment.
|
|
51
|
+
* The track's state is a plain `MutableRef`: each response runs to completion, and a
|
|
52
|
+
* release is stopped before the next response changes the state.
|
|
53
|
+
*/
|
|
54
|
+
import * as Drag from "@wardic/core/Drag";
|
|
55
|
+
import * as Inertia from "@wardic/core/Inertia";
|
|
56
|
+
import * as InputFeed from "@wardic/core/InputFeed";
|
|
57
|
+
import * as InputSource from "@wardic/core/InputSource";
|
|
58
|
+
import * as DragRecognizer from "@wardic/core/DragRecognizer";
|
|
59
|
+
import * as Machine from "@wardic/core/Machine";
|
|
60
|
+
import * as Microtask from "@wardic/core/Microtask";
|
|
61
|
+
import * as Probe from "@wardic/core/Probe";
|
|
62
|
+
import * as Report from "@wardic/dom/Report";
|
|
63
|
+
import * as Bool from "effect/Boolean";
|
|
64
|
+
import * as Cause from "effect/Cause";
|
|
65
|
+
import * as Deferred from "effect/Deferred";
|
|
66
|
+
import * as Effect from "effect/Effect";
|
|
67
|
+
import * as Exit from "effect/Exit";
|
|
68
|
+
import * as FiberHandle from "effect/FiberHandle";
|
|
69
|
+
import { constFalse, constUndefined, constVoid, identity } from "effect/Function";
|
|
70
|
+
import * as Match from "effect/Match";
|
|
71
|
+
import * as MutableRef from "effect/MutableRef";
|
|
72
|
+
import * as Option from "effect/Option";
|
|
73
|
+
import * as Predicate from "effect/Predicate";
|
|
74
|
+
import * as Stream from "effect/Stream";
|
|
75
|
+
import * as UndefinedOr from "effect/UndefinedOr";
|
|
76
|
+
import { subscribeDragControls } from "./drag-controls.js";
|
|
77
|
+
import { DEFAULT_DRAG_ELASTIC, dragTransitionOf, elasticOf } from "./drag-transition.js";
|
|
78
|
+
import { pointMapOptionOf } from "./wardic-config-value.js";
|
|
79
|
+
/** A point mapping now (#443): the config's, else the point as it is. */
|
|
80
|
+
const mapPointOf = mapPoint => UndefinedOr.match(UndefinedOr.match(mapPoint, {
|
|
81
|
+
onUndefined: constUndefined,
|
|
82
|
+
onDefined: read => read()
|
|
83
|
+
}), {
|
|
84
|
+
onUndefined: () => identity,
|
|
85
|
+
onDefined: identity
|
|
86
|
+
});
|
|
87
|
+
/** A drag config's axis as core's: `true` (free) is `"xy"`. */
|
|
88
|
+
const toDragAxis = axis => Match.value(axis).pipe(Match.when("x", () => "x"), Match.when("y", () => "y"), Match.orElse(() => "xy"));
|
|
89
|
+
const ORIGIN = {
|
|
90
|
+
x: 0,
|
|
91
|
+
y: 0
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* A projection node's release velocity (ADR-0016, *Amendment (velocity family)*, decision 2):
|
|
95
|
+
* the "end" sample's, the pointer's over its last 100 ms (ADR-0004, *Amendment (#139)*); at
|
|
96
|
+
* rest with `dragMomentum={false}`.
|
|
97
|
+
*/
|
|
98
|
+
const releaseVelocity = (config, velocity) => Bool.match(config.momentum === false, {
|
|
99
|
+
onTrue: () => ORIGIN,
|
|
100
|
+
onFalse: () => velocity
|
|
101
|
+
});
|
|
102
|
+
/**
|
|
103
|
+
* Where the drag puts the element: `p`, kept within the constraints on each axis the gesture moves,
|
|
104
|
+
* pulled back past an edge by `dragElastic` (Motion's `applyConstraints`). They bound the element's
|
|
105
|
+
* x/y, whichever gesture moved it there (ADR-0016, *Amendment (#140)*); an axis it doesn't move stays
|
|
106
|
+
* where it is. Per pointer event: statement `if`s.
|
|
107
|
+
*/
|
|
108
|
+
const constrainedTo = (p, axis, bounds, config) => {
|
|
109
|
+
if (Predicate.isUndefined(bounds)) return p;
|
|
110
|
+
const elastic = elasticOf(config.elastic);
|
|
111
|
+
let x = p.x;
|
|
112
|
+
let y = p.y;
|
|
113
|
+
if (axis !== "y") x = Drag.constrain(p.x, bounds.x, elastic);
|
|
114
|
+
if (axis !== "x") y = Drag.constrain(p.y, bounds.y, elastic);
|
|
115
|
+
return {
|
|
116
|
+
x,
|
|
117
|
+
y
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/** Both edges at the origin: what `dragSnapToOrigin` releases toward (Motion's `{ min: 0, max: 0 }`). */
|
|
121
|
+
const AT_ORIGIN = {
|
|
122
|
+
x: {
|
|
123
|
+
min: 0,
|
|
124
|
+
max: 0
|
|
125
|
+
},
|
|
126
|
+
y: {
|
|
127
|
+
min: 0,
|
|
128
|
+
max: 0
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const NO_EDGES = {};
|
|
132
|
+
/** The edges a release springs back to: both at the origin with `snapToOrigin`, else the constraints. */
|
|
133
|
+
const edgesOf = (config, bounds) => Bool.match(config.snapToOrigin === true, {
|
|
134
|
+
onTrue: () => AT_ORIGIN,
|
|
135
|
+
onFalse: () => UndefinedOr.match(bounds, {
|
|
136
|
+
onUndefined: () => NO_EDGES,
|
|
137
|
+
onDefined: identity
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
/** Whether `v` sits within `range`, or there's none: a hard clamp leaves it where it is. */
|
|
141
|
+
const within = (v, range) => Drag.constrain(v, range, 0) === v;
|
|
142
|
+
/**
|
|
143
|
+
* Whether a release with `velocity` from `position` rests where it was dropped: no speed, no
|
|
144
|
+
* `modifyTarget` to move it, and within its edges on each axis it moves. Motion's inertia is done on
|
|
145
|
+
* its first frame then; Wardic commits it at once.
|
|
146
|
+
*/
|
|
147
|
+
const restsWhereDropped = (position, velocity, axis, edges, transition) => Bool.every([velocity.x === 0, velocity.y === 0, Predicate.isUndefined(transition.modifyTarget), Bool.or(axis === "y", within(position.x, edges.x)), Bool.or(axis === "x", within(position.y, edges.y))]);
|
|
148
|
+
/**
|
|
149
|
+
* Read the current rested `x`/`y` off the snapshot (defaulting to 0, as for a string
|
|
150
|
+
* translate the drag can't continue from). Captured at a drag's "start" so a drag (or a
|
|
151
|
+
* re-grab mid-release) continues from where the element currently sits instead of
|
|
152
|
+
* snapping to origin.
|
|
153
|
+
*/
|
|
154
|
+
const snapshotPos = snapshot => {
|
|
155
|
+
const {
|
|
156
|
+
x,
|
|
157
|
+
y
|
|
158
|
+
} = snapshot.values;
|
|
159
|
+
return {
|
|
160
|
+
x: numberOrZero(x),
|
|
161
|
+
y: numberOrZero(y)
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
/** A value that's a number, else 0. Built once, at module load. */
|
|
165
|
+
const numberOrZero = Match.type().pipe(Match.when(Match.number, n => n), Match.orElse(() => 0));
|
|
166
|
+
/**
|
|
167
|
+
* Direct-set `x`/`y` onto the element + the shared snapshot for one drag frame.
|
|
168
|
+
* The drag is the SOLE owner of `x`/`y` while dragging, so it sets them on the
|
|
169
|
+
* snapshot with zeroed velocities (the spring never fights them — the spine
|
|
170
|
+
* strips the translate keys from its target while `dragging()` is true).
|
|
171
|
+
*/
|
|
172
|
+
const directSet = (opts, p) => {
|
|
173
|
+
// Projection node (ADR-0016): feed the live pointer offset to the projection, whose
|
|
174
|
+
// target moves the node; its own x/y are its animations', drawn on top (#363), so
|
|
175
|
+
// the drag leaves them be. `base` stays 0 and `position` is the pure pointer offset,
|
|
176
|
+
// which IS the dragDelta.
|
|
177
|
+
if (Predicate.isNotUndefined(opts.projection)) {
|
|
178
|
+
opts.projection.dragMove({
|
|
179
|
+
x: p.x,
|
|
180
|
+
y: p.y
|
|
181
|
+
});
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
opts.gate.write(opts.id, {
|
|
185
|
+
x: p.x,
|
|
186
|
+
y: p.y
|
|
187
|
+
});
|
|
188
|
+
opts.snapshot.values.x = p.x;
|
|
189
|
+
opts.snapshot.values.y = p.y;
|
|
190
|
+
opts.snapshot.velocities.x = 0;
|
|
191
|
+
opts.snapshot.velocities.y = 0;
|
|
192
|
+
// Moved now (#464): its release's velocity holds from here.
|
|
193
|
+
const now = opts.snapshot.now();
|
|
194
|
+
opts.snapshot.drawnAt.x = now;
|
|
195
|
+
opts.snapshot.drawnAt.y = now;
|
|
196
|
+
opts.recordFrame({
|
|
197
|
+
x: p.x,
|
|
198
|
+
y: p.y
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* A gesture's bookkeeping, run as each sample arrives, before its response: "start"
|
|
203
|
+
* marks the gesture held; "end" clears it and, for a projection node (ADR-0016), starts its
|
|
204
|
+
* Release offset at the sample's velocity (`dragEnd`) and hands back `dragging`. The "end" is
|
|
205
|
+
* reported after its response, once the release runs, as Motion's `onDragEnd` comes after its
|
|
206
|
+
* release starts: a target for `x`/`y` the app sets there takes it over (#340).
|
|
207
|
+
*/
|
|
208
|
+
const settleGesture = (sample, state, opts) => Match.value(sample.phase).pipe(Match.when("start", () => {
|
|
209
|
+
MutableRef.update(state, st => ({
|
|
210
|
+
...st,
|
|
211
|
+
held: true
|
|
212
|
+
}));
|
|
213
|
+
}), Match.when("move", constVoid), Match.when("end", () => {
|
|
214
|
+
MutableRef.update(state, st => ({
|
|
215
|
+
...st,
|
|
216
|
+
held: false
|
|
217
|
+
}));
|
|
218
|
+
UndefinedOr.match(opts.projection, {
|
|
219
|
+
onUndefined: constVoid,
|
|
220
|
+
onDefined: projection => {
|
|
221
|
+
projection.dragEnd(releaseVelocity(opts.config, sample.velocity));
|
|
222
|
+
opts.setDragging(false);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}), Match.exhaustive);
|
|
226
|
+
/** A down from the Primary pointer: a grab, which stops a running release where it is. */
|
|
227
|
+
const isGrab = Predicate.and(e => e.type === "down", InputSource.isPrimaryPointer);
|
|
228
|
+
/** A down the element adopted from its **Drag controls** (#431). */
|
|
229
|
+
const isAdopted = e => e.adopted === true;
|
|
230
|
+
/**
|
|
231
|
+
* A layout node's snap to the cursor ended with no drag (#431): its drag ended at rest, back to its
|
|
232
|
+
* slot. Whether there was one. A module's, not a track's (#507): a track given no Drag controls never
|
|
233
|
+
* snaps, and makes nothing for it.
|
|
234
|
+
*/
|
|
235
|
+
const unsnap = (state, projection) => {
|
|
236
|
+
if (Predicate.isUndefined(MutableRef.get(state).snapped)) return false;
|
|
237
|
+
MutableRef.update(state, s => ({
|
|
238
|
+
...s,
|
|
239
|
+
snapped: undefined
|
|
240
|
+
}));
|
|
241
|
+
projection.dragEnd(ORIGIN);
|
|
242
|
+
return true;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Snap the element's centre under `down`'s point (#431, Motion's `snapToCursor`), on the axes it drags,
|
|
246
|
+
* measured from its box now: a plain element's x/y moved by the difference, a layout node's projection
|
|
247
|
+
* drag begun at it. A module's (#507), as {@link unsnap} is.
|
|
248
|
+
*/
|
|
249
|
+
const snapTo = (opts, state, down) => {
|
|
250
|
+
const box = opts.element.getBoundingClientRect();
|
|
251
|
+
const axis = UndefinedOr.match(opts.axisAt, {
|
|
252
|
+
onUndefined: () => toDragAxis(opts.config.axis),
|
|
253
|
+
onDefined: at => toDragAxis(at())
|
|
254
|
+
});
|
|
255
|
+
// The pointer and the box's centre, each mapped as the drag's points are (#443, Motion's).
|
|
256
|
+
const map = mapPointOf(opts.mapPoint);
|
|
257
|
+
const cursor = map({
|
|
258
|
+
x: down.x,
|
|
259
|
+
y: down.y
|
|
260
|
+
});
|
|
261
|
+
const centre = map({
|
|
262
|
+
x: box.left + box.width / 2,
|
|
263
|
+
y: box.top + box.height / 2
|
|
264
|
+
});
|
|
265
|
+
const by = onAxes({
|
|
266
|
+
x: cursor.x - centre.x,
|
|
267
|
+
y: cursor.y - centre.y
|
|
268
|
+
}, axis);
|
|
269
|
+
UndefinedOr.match(opts.projection, {
|
|
270
|
+
onUndefined: () => {
|
|
271
|
+
const from = snapshotPos(opts.snapshot);
|
|
272
|
+
const to = {
|
|
273
|
+
x: from.x + by.x,
|
|
274
|
+
y: from.y + by.y
|
|
275
|
+
};
|
|
276
|
+
MutableRef.update(state, s => ({
|
|
277
|
+
...s,
|
|
278
|
+
position: to
|
|
279
|
+
}));
|
|
280
|
+
directSet(opts, to);
|
|
281
|
+
},
|
|
282
|
+
onDefined: projection => {
|
|
283
|
+
const was = MutableRef.get(state).snapped;
|
|
284
|
+
const at = UndefinedOr.match(was, {
|
|
285
|
+
onUndefined: () => by,
|
|
286
|
+
onDefined: prev => ({
|
|
287
|
+
x: prev.x + by.x,
|
|
288
|
+
y: prev.y + by.y
|
|
289
|
+
})
|
|
290
|
+
});
|
|
291
|
+
if (Predicate.isUndefined(was)) projection.dragStart();
|
|
292
|
+
projection.dragMove(at);
|
|
293
|
+
MutableRef.update(state, s => ({
|
|
294
|
+
...s,
|
|
295
|
+
snapped: at
|
|
296
|
+
}));
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* The end of a Primary pointer's press: its up, its cancel, or a move with no button pressed
|
|
302
|
+
* (its release was lost, ADR-0019). A press with no drag lets a projection node's stopped
|
|
303
|
+
* release go on; any other unpressed move (a hover) finds none stopped.
|
|
304
|
+
*/
|
|
305
|
+
const isPressEnd = Predicate.and(e => Bool.some([e.type === "up", e.type === "cancel", Bool.and(e.type === "move", Bool.not(e.pressed))]), InputSource.isPrimaryPointer);
|
|
306
|
+
/** Hand `sample` to `onSample`, when there is one (a `<Reorder>` item's group). */
|
|
307
|
+
const reportSample = (opts, sample) => UndefinedOr.match(opts.onSample, {
|
|
308
|
+
onUndefined: constVoid,
|
|
309
|
+
onDefined: onSample => onSample(sample)
|
|
310
|
+
});
|
|
311
|
+
/**
|
|
312
|
+
* Where a drag starts from (ADR-0004, ADR-0016): wherever a plain element rests (the snapshot's
|
|
313
|
+
* x/y); a projection node's slot, the origin, since its drag offset moves its projection target
|
|
314
|
+
* from its slot, and its own x/y are drawn on top of that (#363), or where a snap to the cursor put
|
|
315
|
+
* it (#431).
|
|
316
|
+
*/
|
|
317
|
+
const startOf = (opts, st) => UndefinedOr.match(opts.projection, {
|
|
318
|
+
onUndefined: () => snapshotPos(opts.snapshot),
|
|
319
|
+
onDefined: () => UndefinedOr.match(st.snapped, {
|
|
320
|
+
onUndefined: () => ORIGIN,
|
|
321
|
+
onDefined: identity
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
/**
|
|
325
|
+
* Follow the pointer for a "start" or "move" sample: absolute position = base + drag
|
|
326
|
+
* offset, kept within the constraints. A "start" rebases to where the drag starts from
|
|
327
|
+
* ({@link startOf}); for a projection node, the origin, and the "start" begins the
|
|
328
|
+
* projection's drag first, so `dragStart` runs before the first `dragMove`, unless a snap to the
|
|
329
|
+
* cursor began it (#431).
|
|
330
|
+
*/
|
|
331
|
+
const follow = (sample, state, opts) => {
|
|
332
|
+
const st = MutableRef.get(state);
|
|
333
|
+
const starts = sample.phase === "start";
|
|
334
|
+
const base = Bool.match(starts, {
|
|
335
|
+
onTrue: () => startOf(opts, st),
|
|
336
|
+
onFalse: () => st.base
|
|
337
|
+
});
|
|
338
|
+
// The axes the gesture moves on, as the recognizer read them at its start: a `<Reorder>` item's
|
|
339
|
+
// group decides them per gesture (D5), a direction lock at its lock (#273).
|
|
340
|
+
const axis = Bool.match(starts, {
|
|
341
|
+
onTrue: () => sample.axis,
|
|
342
|
+
onFalse: () => st.axis
|
|
343
|
+
});
|
|
344
|
+
const p = constrainedTo({
|
|
345
|
+
x: base.x + sample.offset.x,
|
|
346
|
+
y: base.y + sample.offset.y
|
|
347
|
+
}, axis, st.bounds, opts.config);
|
|
348
|
+
MutableRef.set(state, {
|
|
349
|
+
...st,
|
|
350
|
+
base,
|
|
351
|
+
position: p,
|
|
352
|
+
axis,
|
|
353
|
+
snapped: undefined
|
|
354
|
+
});
|
|
355
|
+
opts.setDragging(true);
|
|
356
|
+
if (Bool.and(starts, Predicate.isUndefined(st.snapped))) UndefinedOr.match(opts.projection, {
|
|
357
|
+
onUndefined: constVoid,
|
|
358
|
+
onDefined: projection => projection.dragStart()
|
|
359
|
+
});
|
|
360
|
+
directSet(opts, p);
|
|
361
|
+
reportSample(opts, sample);
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* The release driver (ADR-0004 binding orchestration; ADR-0016, *Amendment (#140)*), Motion's: an
|
|
365
|
+
* inertia on the drag transition on each axis the gesture moved, from the release position and
|
|
366
|
+
* velocity (none with `momentum: false`), toward its edges: both at the origin with `snapToOrigin`,
|
|
367
|
+
* else the constraints. A Fling glides on and springs back to an edge it would cross, or starts past.
|
|
368
|
+
* One that rests where it was dropped (no velocity, within its edges) commits the exact release
|
|
369
|
+
* position once (so the element rests at the pointer-up point, not the last move), and hands `x`/`y`
|
|
370
|
+
* back at the end of the release's task.
|
|
371
|
+
*
|
|
372
|
+
* Each release frame taps `gate.write` + snapshot sync + recordFrame, and the track's
|
|
373
|
+
* state, so a re-grab mid-tail rebases from where the tail reached. On completion
|
|
374
|
+
* `setDragging(false)` hands ownership of `x`/`y` back to the spring. The inertia runs on the
|
|
375
|
+
* Frame loop (ADR-0027); interrupting the release removes its run from the loop at once,
|
|
376
|
+
* before the next handler touches the state.
|
|
377
|
+
*
|
|
378
|
+
* A release that dies, on a drag transition core rejects (#66, ADR-0025 *Amendment (#66)*) or a
|
|
379
|
+
* throw in its frames, fails alone: reported, the element rests where it was dropped, and the track
|
|
380
|
+
* goes on to the next drag.
|
|
381
|
+
*
|
|
382
|
+
* Its velocity stays on the Snapshot, each frame's, from the release's own at its start; and once
|
|
383
|
+
* `taken` is done (#340, {@link DragTrack.takeRelease}), it stops where it is and tells no end: a
|
|
384
|
+
* Retarget has `x`/`y`, from that position and velocity.
|
|
385
|
+
*/
|
|
386
|
+
const release = (opts, state, position, velocity, taken) => {
|
|
387
|
+
const cfg = opts.config;
|
|
388
|
+
// A run's sink on the Frame loop is a plain call (ADR-0027, decision 8). One a takeover beat to
|
|
389
|
+
// the loop writes nothing: the fiber's interruption comes through the scheduler (#340).
|
|
390
|
+
const tapFrame = (p, v) => {
|
|
391
|
+
if (Bool.not(MutableRef.get(state).releasing)) return undefined;
|
|
392
|
+
MutableRef.update(state, s => ({
|
|
393
|
+
...s,
|
|
394
|
+
position: p
|
|
395
|
+
}));
|
|
396
|
+
directSet(opts, p);
|
|
397
|
+
keepVelocity(opts, v);
|
|
398
|
+
return undefined;
|
|
399
|
+
};
|
|
400
|
+
// At rest, the drag hands back, then its release's end is told (#273) after the gate's next flush,
|
|
401
|
+
// with the rest value on the element, as Motion's comes with it set: only here, so a release a
|
|
402
|
+
// grab interrupted tells nothing.
|
|
403
|
+
const done = Effect.sync(() => {
|
|
404
|
+
MutableRef.update(state, s => ({
|
|
405
|
+
...s,
|
|
406
|
+
releasing: false
|
|
407
|
+
}));
|
|
408
|
+
opts.setDragging(false);
|
|
409
|
+
UndefinedOr.map(opts.onReleaseEnd, ended => opts.gate.afterFlush(ended));
|
|
410
|
+
});
|
|
411
|
+
const {
|
|
412
|
+
axis,
|
|
413
|
+
bounds
|
|
414
|
+
} = MutableRef.get(state);
|
|
415
|
+
const edges = edgesOf(cfg, bounds);
|
|
416
|
+
const v = releaseVelocity(cfg, velocity);
|
|
417
|
+
const transition = cfg.transition;
|
|
418
|
+
// Before its first frame, a takeover starts from the release's velocity, on the axes it runs on.
|
|
419
|
+
keepVelocity(opts, onAxes(v, axis));
|
|
420
|
+
// The position now; the hand-back at the end of the release's task, once every other
|
|
421
|
+
// consumer of the same event has handled it: a press that ends with the drag (`whileTap`)
|
|
422
|
+
// then finds `x`/`y` still the drag's, so a key the drag moved stays where it was dropped.
|
|
423
|
+
// A takeover ends the release at once, its end untold (#340).
|
|
424
|
+
const untilTaken = run => Effect.raceFirst(run, Deferred.await(taken));
|
|
425
|
+
if (restsWhereDropped(position, v, axis, edges, transition)) {
|
|
426
|
+
return untilTaken(Effect.sync(() => {
|
|
427
|
+
if (MutableRef.get(state).releasing) directSet(opts, position);
|
|
428
|
+
}).pipe(Effect.andThen(Microtask.next), Effect.andThen(done)));
|
|
429
|
+
}
|
|
430
|
+
// Skipped (#468): it lands at once where its inertia would come to rest, on each axis it runs on,
|
|
431
|
+
// with no velocity. Motion's skipped release goes to its keyframes' last, the drag's origin; Wardic's
|
|
432
|
+
// lands where the release would. Its end is told as a release's at rest.
|
|
433
|
+
if (UndefinedOr.match(opts.skipAnimations, {
|
|
434
|
+
onUndefined: constFalse,
|
|
435
|
+
onDefined: skips => skips()
|
|
436
|
+
})) {
|
|
437
|
+
return untilTaken(Effect.sync(() => {
|
|
438
|
+
keepVelocity(opts, ORIGIN);
|
|
439
|
+
if (MutableRef.get(state).releasing) directSet(opts, restOfRelease(position, v, axis, edges, transition));
|
|
440
|
+
}).pipe(Effect.catchDefect(defect => Report.failure("wardic.drag: a release failed", Cause.die(defect)).pipe(Effect.andThen(Effect.sync(() => tapFrame(position, ORIGIN))))), Effect.andThen(Microtask.next), Effect.andThen(done)));
|
|
441
|
+
}
|
|
442
|
+
// Only the axes the gesture moved run (Motion's `shouldDrag`): the other stays where it is.
|
|
443
|
+
return untilTaken(Match.value(axis).pipe(Match.when("x", () => Machine.inertia(position.x, v.x, {
|
|
444
|
+
...transition,
|
|
445
|
+
...edges.x
|
|
446
|
+
}).pipe(Machine.run(frame => tapFrame({
|
|
447
|
+
x: frame.value,
|
|
448
|
+
y: position.y
|
|
449
|
+
}, {
|
|
450
|
+
x: frame.velocity,
|
|
451
|
+
y: 0
|
|
452
|
+
})))), Match.when("y", () => Machine.inertia(position.y, v.y, {
|
|
453
|
+
...transition,
|
|
454
|
+
...edges.y
|
|
455
|
+
}).pipe(Machine.run(frame => tapFrame({
|
|
456
|
+
x: position.x,
|
|
457
|
+
y: frame.value
|
|
458
|
+
}, {
|
|
459
|
+
x: 0,
|
|
460
|
+
y: frame.velocity
|
|
461
|
+
})))), Match.orElse(() => Machine.inertiaVec(position, v, {
|
|
462
|
+
...transition,
|
|
463
|
+
...edges
|
|
464
|
+
}).pipe(Machine.run(frame => tapFrame(frame.value, frame.velocity)))), Effect.catchDefect(defect => Report.failure("wardic.drag: a release failed", Cause.die(defect)).pipe(Effect.andThen(Effect.sync(() => tapFrame(position, ORIGIN))))), Effect.andThen(done)));
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* Where a release from `position` at `v` comes to rest (#468): each axis it runs on where its inertia
|
|
468
|
+
* would ({@link Inertia.restOf}), the other where it is.
|
|
469
|
+
*/
|
|
470
|
+
const restOfRelease = (position, v, axis, edges, transition) => Match.value(axis).pipe(Match.when("x", () => ({
|
|
471
|
+
x: Inertia.restOf(position.x, v.x, {
|
|
472
|
+
...transition,
|
|
473
|
+
...edges.x
|
|
474
|
+
}),
|
|
475
|
+
y: position.y
|
|
476
|
+
})), Match.when("y", () => ({
|
|
477
|
+
x: position.x,
|
|
478
|
+
y: Inertia.restOf(position.y, v.y, {
|
|
479
|
+
...transition,
|
|
480
|
+
...edges.y
|
|
481
|
+
})
|
|
482
|
+
})), Match.orElse(() => ({
|
|
483
|
+
x: Inertia.restOf(position.x, v.x, {
|
|
484
|
+
...transition,
|
|
485
|
+
...edges.x
|
|
486
|
+
}),
|
|
487
|
+
y: Inertia.restOf(position.y, v.y, {
|
|
488
|
+
...transition,
|
|
489
|
+
...edges.y
|
|
490
|
+
})
|
|
491
|
+
})));
|
|
492
|
+
/** `v` on the axes a release runs on, 0 on the other. */
|
|
493
|
+
const onAxes = (v, axis) => Match.value(axis).pipe(Match.when("x", () => ({
|
|
494
|
+
x: v.x,
|
|
495
|
+
y: 0
|
|
496
|
+
})), Match.when("y", () => ({
|
|
497
|
+
x: 0,
|
|
498
|
+
y: v.y
|
|
499
|
+
})), Match.orElse(() => v));
|
|
500
|
+
/** Whether `retargeted` names an axis a release on `axis` runs on (#340). */
|
|
501
|
+
const onReleaseAxis = (axis, retargeted) => Match.value(axis).pipe(Match.when("x", () => retargeted.x), Match.when("y", () => retargeted.y), Match.orElse(() => Bool.or(retargeted.x, retargeted.y)));
|
|
502
|
+
/** A release's velocity on the Snapshot, after its direct-set zeroed it (#340). */
|
|
503
|
+
const keepVelocity = (opts, v) => {
|
|
504
|
+
opts.snapshot.velocities.x = v.x;
|
|
505
|
+
opts.snapshot.velocities.y = v.y;
|
|
506
|
+
const now = opts.snapshot.now();
|
|
507
|
+
opts.snapshot.drawnAt.x = now;
|
|
508
|
+
opts.snapshot.drawnAt.y = now;
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* Run the drag track for one element. Recognize `drag(element)` on its axis (read at
|
|
512
|
+
* each gesture's start for a `<Reorder>` item) with its **Drag claim** (none with
|
|
513
|
+
* `propagation`), then consume it, kept within its constraints, and the element's bare
|
|
514
|
+
* pointer-down grabs, each in place as it arrives (ADR-0032; the module doc). A drag
|
|
515
|
+
* refused its claim emits nothing, so a draggable ancestor of the element that claimed
|
|
516
|
+
* neither follows the pointer nor turns `whileDrag` on; its grab still stops its running
|
|
517
|
+
* release (ADR-0019, *Amendment (#29)*). The track runs in the element's watch Scope
|
|
518
|
+
* (`opts.watch`, #379), with no fiber at rest: closing it stops the watches (dropping the
|
|
519
|
+
* shared feed's count) and any in-flight release. A response that fails, or a release, is
|
|
520
|
+
* reported, and the track goes on.
|
|
521
|
+
*
|
|
522
|
+
* The drag config is read ONCE at setup (the caller passes a static
|
|
523
|
+
* {@link DragTrackConfig} — drag config is a document, not reactive); only the
|
|
524
|
+
* `dragging` signal the spine reads is reactive.
|
|
525
|
+
*/
|
|
526
|
+
export const driveDragTrack = opts => {
|
|
527
|
+
const {
|
|
528
|
+
config,
|
|
529
|
+
element
|
|
530
|
+
} = opts;
|
|
531
|
+
const state = MutableRef.make({
|
|
532
|
+
base: ORIGIN,
|
|
533
|
+
position: ORIGIN,
|
|
534
|
+
held: false,
|
|
535
|
+
axis: "xy",
|
|
536
|
+
bounds: config.constraints,
|
|
537
|
+
releasing: false,
|
|
538
|
+
stopped: false,
|
|
539
|
+
snapped: undefined
|
|
540
|
+
});
|
|
541
|
+
// The running release's takeover (#340): done by `takeRelease`, from outside the track's responses.
|
|
542
|
+
let taken = Deferred.makeUnsafe();
|
|
543
|
+
opts.watch(onDefect => Effect.gen(function* () {
|
|
544
|
+
// The running release, if any: the next sample or grab interrupts it.
|
|
545
|
+
const releasing = yield* FiberHandle.make();
|
|
546
|
+
const probe = yield* Probe.Probe;
|
|
547
|
+
// --- An element constraint (#273, ADR-0047) ------------------------------------------------
|
|
548
|
+
// Measured at each drag's start, and when the element or its container resizes: the observers'
|
|
549
|
+
// fiber, one container at a time, from the first time the container is there.
|
|
550
|
+
const watching = yield* FiberHandle.make();
|
|
551
|
+
let watched = undefined;
|
|
552
|
+
let warned = false;
|
|
553
|
+
const setBounds = bounds => {
|
|
554
|
+
MutableRef.update(state, st => ({
|
|
555
|
+
...st,
|
|
556
|
+
bounds
|
|
557
|
+
}));
|
|
558
|
+
};
|
|
559
|
+
/** The bounds measured against `container`'s `box`; none, reported, if measuring throws (an app's `onMeasureDragConstraints`). */
|
|
560
|
+
const measured = (container, box) => Effect.sync(() => container.bounds(box)).pipe(Effect.catchDefect(defect => Report.failure("wardic.drag: measuring dragConstraints failed", Cause.die(defect)).pipe(Effect.as(undefined))));
|
|
561
|
+
/**
|
|
562
|
+
* A resize of the element or its container: the bounds measured again. The first measure only
|
|
563
|
+
* records them; a later one that changed them moves an element at rest, or releasing (stopped),
|
|
564
|
+
* to keep its place within them (Motion's `scalePositionWithinConstraints`). A held drag, or a
|
|
565
|
+
* layout node (back on its slot at rest), only takes the new bounds.
|
|
566
|
+
*/
|
|
567
|
+
const resized = (container, box) => measured(container, box).pipe(Effect.flatMap(next => {
|
|
568
|
+
const st = MutableRef.get(state);
|
|
569
|
+
if (Bool.or(Predicate.isUndefined(next), Predicate.isUndefined(st.bounds))) return Effect.sync(() => setBounds(next));
|
|
570
|
+
const from = st.bounds;
|
|
571
|
+
const to = next;
|
|
572
|
+
if (Drag.sameBounds(from, to)) return Effect.void;
|
|
573
|
+
if (Bool.or(st.held, Predicate.isNotUndefined(opts.projection))) return Effect.sync(() => setBounds(to));
|
|
574
|
+
return FiberHandle.clear(releasing).pipe(Effect.andThen(Effect.sync(() => {
|
|
575
|
+
const kept = Drag.keepPlace(snapshotPos(opts.snapshot), toDragAxis(config.axis), from, to);
|
|
576
|
+
MutableRef.update(state, s => ({
|
|
577
|
+
...s,
|
|
578
|
+
bounds: to,
|
|
579
|
+
position: kept
|
|
580
|
+
}));
|
|
581
|
+
directSet(opts, kept);
|
|
582
|
+
opts.setDragging(false);
|
|
583
|
+
})));
|
|
584
|
+
}));
|
|
585
|
+
/** Watch the element and `box` for resizes, from now on: once per container. */
|
|
586
|
+
const watchResizes = (container, box) => Effect.suspend(() => {
|
|
587
|
+
if (watched === box) return Effect.void;
|
|
588
|
+
watched = box;
|
|
589
|
+
return FiberHandle.run(watching, Stream.runForEach(Stream.merge(probe.observeResize(element), probe.observeResize(box)), () => resized(container, box))).pipe(Effect.asVoid);
|
|
590
|
+
});
|
|
591
|
+
/** At a drag's start: the bounds measured against the container, which is watched from then on; none if it isn't there. */
|
|
592
|
+
const measureAtStart = UndefinedOr.match(opts.container, {
|
|
593
|
+
onUndefined: () => Effect.void,
|
|
594
|
+
onDefined: container => Effect.suspend(() => UndefinedOr.match(container.element(), {
|
|
595
|
+
onUndefined: () => Effect.sync(() => setBounds(undefined)).pipe(Effect.andThen(Bool.match(warned, {
|
|
596
|
+
onTrue: () => Effect.void,
|
|
597
|
+
onFalse: () => {
|
|
598
|
+
warned = true;
|
|
599
|
+
return Effect.logWarning("wardic.drag: dragConstraints' container isn't there at a drag's start, so it drags unconstrained");
|
|
600
|
+
}
|
|
601
|
+
}))),
|
|
602
|
+
onDefined: box => measured(container, box).pipe(Effect.tap(bounds => Effect.sync(() => setBounds(bounds))), Effect.andThen(watchResizes(container, box)))
|
|
603
|
+
}))
|
|
604
|
+
});
|
|
605
|
+
// A container already there is watched from the start: its first delivery records the bounds.
|
|
606
|
+
// Forked, so its fiber runs on the runtime's scheduler, not this setup's `runSync`'s.
|
|
607
|
+
UndefinedOr.match(opts.container, {
|
|
608
|
+
onUndefined: constVoid,
|
|
609
|
+
onDefined: container => UndefinedOr.match(container.element(), {
|
|
610
|
+
onUndefined: constVoid,
|
|
611
|
+
onDefined: box => opts.fork(watchResizes(container, box))
|
|
612
|
+
})
|
|
613
|
+
});
|
|
614
|
+
const input = yield* InputSource.InputSource;
|
|
615
|
+
// The gesture's axis, read by the recognizer at each start: a `<Reorder>` item's group
|
|
616
|
+
// decides it per gesture (D5). Then the numeric shaping (Probe-free, ADR-0004).
|
|
617
|
+
const axisAt = opts.axisAt;
|
|
618
|
+
const axis = UndefinedOr.match(axisAt, {
|
|
619
|
+
onUndefined: () => toDragAxis(config.axis),
|
|
620
|
+
onDefined: at => () => toDragAxis(at())
|
|
621
|
+
});
|
|
622
|
+
const {
|
|
623
|
+
propagation = false
|
|
624
|
+
} = config;
|
|
625
|
+
const listens = config.listen !== false;
|
|
626
|
+
// --- Drag controls (#431), only for an element given them (#507) ----------------------------
|
|
627
|
+
const controlled = Predicate.isNotUndefined(opts.controls);
|
|
628
|
+
// The threshold of the gesture an adopted down claims: its controls' `distanceThreshold`, set for
|
|
629
|
+
// the length of the start that adopts it. Any other down's is the recognizer's own, and a track
|
|
630
|
+
// with no controls has none to set.
|
|
631
|
+
let adoptedThreshold = undefined;
|
|
632
|
+
let threshold;
|
|
633
|
+
if (controlled) {
|
|
634
|
+
threshold = down => {
|
|
635
|
+
if (down.adopted === true) return Option.fromUndefinedOr(adoptedThreshold);
|
|
636
|
+
return Option.none();
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
/** A free drag's release from `position` with `velocity`, run in `releasing` (#279: recorded as running). */
|
|
640
|
+
const startRelease = (position, velocity) => Effect.sync(() => {
|
|
641
|
+
MutableRef.update(state, s => ({
|
|
642
|
+
...s,
|
|
643
|
+
releasing: true,
|
|
644
|
+
stopped: false
|
|
645
|
+
}));
|
|
646
|
+
taken = Deferred.makeUnsafe();
|
|
647
|
+
return taken;
|
|
648
|
+
}).pipe(Effect.flatMap(ended => FiberHandle.run(releasing, release(opts, state, position, velocity, ended))), Effect.asVoid);
|
|
649
|
+
// A free drag's "end" starts its release; a projection node's Release offset already
|
|
650
|
+
// began in `settleGesture`, so its drag track skips the tail (ADR-0016, Q3c).
|
|
651
|
+
const releaseFrom = sample => UndefinedOr.match(opts.projection, {
|
|
652
|
+
onDefined: () => Effect.void,
|
|
653
|
+
onUndefined: () => {
|
|
654
|
+
const {
|
|
655
|
+
axis,
|
|
656
|
+
base,
|
|
657
|
+
bounds
|
|
658
|
+
} = MutableRef.get(state);
|
|
659
|
+
const position = constrainedTo({
|
|
660
|
+
x: base.x + sample.offset.x,
|
|
661
|
+
y: base.y + sample.offset.y
|
|
662
|
+
}, axis, bounds, config);
|
|
663
|
+
return startRelease(position, sample.velocity);
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
// Each sample: its bookkeeping, then its response. A "start" or "move" stops a running
|
|
667
|
+
// release first, as each new event did under `switchMap`.
|
|
668
|
+
const onSample = sample => Effect.suspend(() => {
|
|
669
|
+
settleGesture(sample, state, opts);
|
|
670
|
+
return Match.value(sample.phase).pipe(
|
|
671
|
+
// A start measures an element constraint first (#273), so it follows within this drag's bounds.
|
|
672
|
+
Match.when("start", () => FiberHandle.clear(releasing).pipe(Effect.andThen(measureAtStart), Effect.andThen(Effect.sync(() => follow(sample, state, opts))))), Match.when("move", () => FiberHandle.clear(releasing).pipe(Effect.andThen(Effect.sync(() => follow(sample, state, opts))))),
|
|
673
|
+
// A cancelled end (#431) stays where it is: no release, `x`/`y` handed back.
|
|
674
|
+
Match.when("end", () => Bool.match(sample.cancelled === true, {
|
|
675
|
+
onTrue: () => Effect.sync(() => UndefinedOr.match(opts.projection, {
|
|
676
|
+
onUndefined: () => opts.setDragging(false),
|
|
677
|
+
onDefined: constVoid
|
|
678
|
+
})),
|
|
679
|
+
onFalse: () => releaseFrom(sample)
|
|
680
|
+
}).pipe(Effect.andThen(Effect.sync(() => reportSample(opts, sample))))), Match.exhaustive);
|
|
681
|
+
});
|
|
682
|
+
// A grab stops a running release where it is. With no gesture held, the stopped
|
|
683
|
+
// release (or the one a same-down "end" just started) hands `x`/`y` back to the
|
|
684
|
+
// spring; a drag that follows takes them again at its "start", where it rebases (a
|
|
685
|
+
// new down from a pointer whose release was lost also ends the old gesture, a Stale
|
|
686
|
+
// gesture, ADR-0019). A projection node's Release offset stops where it is too, and a
|
|
687
|
+
// drag that follows starts from there; a press that ends with no drag lets it go on,
|
|
688
|
+
// from rest (Motion's `stopAnimation` at the press and `resumeAnimation`, ADR-0016,
|
|
689
|
+
// *Amendment (velocity family)*). The InputSource is a Shared source, so this shares
|
|
690
|
+
// the recognizer's single listener-set (CONTEXT.md Shared source contract).
|
|
691
|
+
const onGrab = FiberHandle.clear(releasing).pipe(Effect.andThen(Effect.sync(() => {
|
|
692
|
+
// A free drag's release this grab stopped, to start again if the press ends with no drag (#279).
|
|
693
|
+
MutableRef.update(state, s => ({
|
|
694
|
+
...s,
|
|
695
|
+
stopped: s.releasing,
|
|
696
|
+
releasing: false
|
|
697
|
+
}));
|
|
698
|
+
UndefinedOr.match(opts.projection, {
|
|
699
|
+
onUndefined: constVoid,
|
|
700
|
+
onDefined: projection => projection.stopRelease()
|
|
701
|
+
});
|
|
702
|
+
if (!MutableRef.get(state).held) opts.setDragging(false);
|
|
703
|
+
})));
|
|
704
|
+
/**
|
|
705
|
+
* A free drag's release a grab stopped, started again from rest where it stopped, toward its edges
|
|
706
|
+
* (#279, Motion's `resumeAnimation`): only with `snapToOrigin` or constraints, which give it
|
|
707
|
+
* somewhere to go. Motion's starts one at any press that ends with no drag, so a click at rest on
|
|
708
|
+
* a constrained element tells `onDragTransitionEnd`; this only starts the one the grab stopped, as
|
|
709
|
+
* a layout node's `resumeRelease` does.
|
|
710
|
+
*/
|
|
711
|
+
const resumeFree = Effect.suspend(() => {
|
|
712
|
+
const st = MutableRef.get(state);
|
|
713
|
+
if (Bool.not(st.stopped)) return Effect.void;
|
|
714
|
+
MutableRef.update(state, s => ({
|
|
715
|
+
...s,
|
|
716
|
+
stopped: false
|
|
717
|
+
}));
|
|
718
|
+
if (Bool.and(config.snapToOrigin !== true, Predicate.isUndefined(st.bounds))) return Effect.void;
|
|
719
|
+
return startRelease(st.position, ORIGIN);
|
|
720
|
+
});
|
|
721
|
+
// The samples subscribe first, so a drag's own up has ended its gesture by now: only a
|
|
722
|
+
// press that never dragged finds no gesture held.
|
|
723
|
+
// A layout node a snap to the cursor moved (#431) goes back to its slot instead.
|
|
724
|
+
const onPressEnd = Effect.suspend(() => {
|
|
725
|
+
if (MutableRef.get(state).held) return Effect.void;
|
|
726
|
+
return UndefinedOr.match(opts.projection, {
|
|
727
|
+
onUndefined: () => resumeFree,
|
|
728
|
+
onDefined: projection => Effect.sync(() => {
|
|
729
|
+
if (unsnap(state, projection)) return;
|
|
730
|
+
projection.resumeRelease();
|
|
731
|
+
})
|
|
732
|
+
});
|
|
733
|
+
});
|
|
734
|
+
/**
|
|
735
|
+
* A response, run inside its event (`opts.fork`): one that fails is reported, and the next
|
|
736
|
+
* event's runs (ADR-0055 *Amendment (#379)*, Q4). A release reports its own (#66).
|
|
737
|
+
*/
|
|
738
|
+
const respond = response => opts.fork(response.pipe(Effect.catchCause(cause => Report.failure("wardic.drag: a response failed", cause))));
|
|
739
|
+
// Subscribed in this order, so the samples hear an event before the grabs. The constraints
|
|
740
|
+
// bound the element's x/y, so they're applied where the gesture's offset meets its base, in
|
|
741
|
+
// `follow` and at the release (ADR-0016, *Amendment (#140)*).
|
|
742
|
+
const drag = yield* DragRecognizer.watchDrag(element, {
|
|
743
|
+
axis,
|
|
744
|
+
claim: Bool.not(propagation),
|
|
745
|
+
lock: config.directionLock === true,
|
|
746
|
+
listen: listens,
|
|
747
|
+
adoptable: controlled,
|
|
748
|
+
threshold,
|
|
749
|
+
mapPoint: UndefinedOr.map(opts.mapPoint, pointMapOptionOf)
|
|
750
|
+
}, {
|
|
751
|
+
on: sample => respond(onSample(sample)),
|
|
752
|
+
onDefect
|
|
753
|
+
});
|
|
754
|
+
// A down grabs when the drag listens to it (#431): with `listen: false`, only an adopted one.
|
|
755
|
+
const grabs = Bool.match(listens, {
|
|
756
|
+
onTrue: () => isGrab,
|
|
757
|
+
onFalse: () => Predicate.and(isGrab, isAdopted)
|
|
758
|
+
});
|
|
759
|
+
// The adoptable feed with controls (#507), so a grab hears an adopted down; the plain one without.
|
|
760
|
+
const pointerFeed = Bool.match(controlled, {
|
|
761
|
+
onTrue: () => InputSource.adoptablePointerOf(input, element),
|
|
762
|
+
onFalse: () => input.pointer(element)
|
|
763
|
+
});
|
|
764
|
+
yield* InputFeed.watch(pointerFeed, {
|
|
765
|
+
on: event => {
|
|
766
|
+
if (grabs(event)) return respond(onGrab);
|
|
767
|
+
if (isPressEnd(event)) respond(onPressEnd);
|
|
768
|
+
},
|
|
769
|
+
onDefect
|
|
770
|
+
});
|
|
771
|
+
// Its controls, subscribed until the Scope closes (#431). A start adopts the pointer, whose down
|
|
772
|
+
// the recognizer claims and the grabs stop a release at, inside the call; then the snap.
|
|
773
|
+
if (Predicate.isNotUndefined(opts.controls)) {
|
|
774
|
+
/** A layout node's snap that no gesture took, ended once its controls end the drag. */
|
|
775
|
+
const unsnapped = () => UndefinedOr.match(opts.projection, {
|
|
776
|
+
onUndefined: constVoid,
|
|
777
|
+
onDefined: projection => void unsnap(state, projection)
|
|
778
|
+
});
|
|
779
|
+
const unsubscribe = subscribeDragControls(opts.controls, {
|
|
780
|
+
start: (event, options) => {
|
|
781
|
+
adoptedThreshold = options.distanceThreshold;
|
|
782
|
+
const down = input.adoptPointer(element, event);
|
|
783
|
+
adoptedThreshold = undefined;
|
|
784
|
+
if (Option.isNone(down)) return;
|
|
785
|
+
if (options.snapToCursor === true) snapTo(opts, state, down.value);
|
|
786
|
+
},
|
|
787
|
+
stop: () => {
|
|
788
|
+
drag.stop();
|
|
789
|
+
unsnapped();
|
|
790
|
+
},
|
|
791
|
+
cancel: () => {
|
|
792
|
+
drag.cancel();
|
|
793
|
+
unsnapped();
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
yield* Effect.addFinalizer(() => Effect.sync(unsubscribe));
|
|
797
|
+
}
|
|
798
|
+
}));
|
|
799
|
+
return {
|
|
800
|
+
takeRelease: retargeted => {
|
|
801
|
+
const st = MutableRef.get(state);
|
|
802
|
+
if (Bool.or(st.held, Bool.not(st.releasing))) return false;
|
|
803
|
+
if (Bool.not(onReleaseAxis(st.axis, retargeted))) return false;
|
|
804
|
+
MutableRef.update(state, s => ({
|
|
805
|
+
...s,
|
|
806
|
+
releasing: false
|
|
807
|
+
}));
|
|
808
|
+
Deferred.doneUnsafe(taken, Exit.void);
|
|
809
|
+
// A gesture begun since, in this task, keeps `dragging`.
|
|
810
|
+
queueMicrotask(() => {
|
|
811
|
+
if (Bool.not(MutableRef.get(state).held)) opts.setDragging(false);
|
|
812
|
+
});
|
|
813
|
+
return true;
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
//# sourceMappingURL=drag-track.js.map
|