@wardic/solid 1.0.1 → 1.1.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/README.md +5 -2
- package/dist/browser/animation-controls.js +3 -149
- package/dist/browser/animation-controls.js.map +1 -1
- package/dist/browser/appear.js +3 -743
- package/dist/browser/appear.js.map +1 -1
- package/dist/browser/batch-gestures.js.map +1 -1
- package/dist/browser/batch-reorder-group.js +40 -11
- package/dist/browser/batch-reorder-group.js.map +1 -1
- package/dist/browser/batch-reorder-places.js +517 -50
- package/dist/browser/batch-reorder-places.js.map +1 -1
- package/dist/browser/batch-reorder.js +284 -42
- package/dist/browser/batch-reorder.js.map +1 -1
- package/dist/browser/batch.js +3 -2511
- package/dist/browser/batch.js.map +1 -1
- package/dist/browser/config.js +11 -1
- package/dist/browser/config.js.map +1 -1
- package/dist/browser/create-animate.js +4 -2
- package/dist/browser/create-animate.js.map +1 -1
- package/dist/browser/create-batch.js +2 -2
- package/dist/browser/create-batch.js.map +1 -1
- package/dist/browser/create-ward.js +54 -13
- package/dist/browser/create-ward.js.map +1 -1
- package/dist/browser/create-wardic.js +44 -0
- package/dist/browser/create-wardic.js.map +1 -0
- package/dist/browser/drag-constraints.js +3 -75
- package/dist/browser/drag-constraints.js.map +1 -1
- package/dist/browser/drag-controls.js +3 -50
- package/dist/browser/drag-controls.js.map +1 -1
- package/dist/browser/drag-defaults.js +4 -0
- package/dist/browser/drag-defaults.js.map +1 -0
- package/dist/browser/drag-track.js +3 -826
- package/dist/browser/drag-track.js.map +1 -1
- package/dist/browser/drag-transition.js +3 -55
- package/dist/browser/drag-transition.js.map +1 -1
- package/dist/browser/element-setup.js +4 -0
- package/dist/browser/element-setup.js.map +1 -0
- package/dist/browser/element.js +12 -3
- package/dist/browser/element.js.map +1 -1
- package/dist/browser/feature.js +3 -270
- package/dist/browser/feature.js.map +1 -1
- package/dist/browser/features/all.js +3 -9
- package/dist/browser/features/all.js.map +1 -1
- package/dist/browser/features/colors.js +3 -32
- package/dist/browser/features/colors.js.map +1 -1
- package/dist/browser/features/dom-animation.js +3 -6
- package/dist/browser/features/dom-animation.js.map +1 -1
- package/dist/browser/features/dom-max.js +3 -3
- package/dist/browser/features/dom-max.js.map +1 -1
- package/dist/browser/features/drag.js +3 -27
- package/dist/browser/features/drag.js.map +1 -1
- package/dist/browser/features/focus.js +3 -17
- package/dist/browser/features/focus.js.map +1 -1
- package/dist/browser/features/hover.js +3 -17
- package/dist/browser/features/hover.js.map +1 -1
- package/dist/browser/features/in-view.js +3 -17
- package/dist/browser/features/in-view.js.map +1 -1
- package/dist/browser/features/input.js +3 -26
- package/dist/browser/features/input.js.map +1 -1
- package/dist/browser/features/keys.js +3 -18
- package/dist/browser/features/keys.js.map +1 -1
- package/dist/browser/features/layout.js +3 -32
- package/dist/browser/features/layout.js.map +1 -1
- package/dist/browser/features/pan.js +3 -17
- package/dist/browser/features/pan.js.map +1 -1
- package/dist/browser/features/press.js +3 -11
- package/dist/browser/features/press.js.map +1 -1
- package/dist/browser/features/scroll.js +3 -20
- package/dist/browser/features/scroll.js.map +1 -1
- package/dist/browser/gesture-features.js +3 -28
- package/dist/browser/gesture-features.js.map +1 -1
- package/dist/browser/gesture-info.js +3 -42
- package/dist/browser/gesture-info.js.map +1 -1
- package/dist/browser/imperative.js +3 -708
- package/dist/browser/imperative.js.map +1 -1
- package/dist/browser/index.js +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/instance-features.js +66 -0
- package/dist/browser/instance-features.js.map +1 -0
- package/dist/browser/instant.js +3 -50
- package/dist/browser/instant.js.map +1 -1
- package/dist/browser/layout-group.js +3 -26
- package/dist/browser/layout-group.js.map +1 -1
- package/dist/browser/layout-member.js +3 -373
- package/dist/browser/layout-member.js.map +1 -1
- package/dist/browser/layout-projection.js +8 -1
- package/dist/browser/layout-projection.js.map +1 -1
- package/dist/browser/layout.js +5 -6
- package/dist/browser/layout.js.map +1 -1
- package/dist/browser/lazy-batch-gestures.js.map +1 -1
- package/dist/browser/live-scroll.js +29 -21
- package/dist/browser/live-scroll.js.map +1 -1
- package/dist/browser/live-style.js +3 -313
- package/dist/browser/live-style.js.map +1 -1
- package/dist/browser/live-value.js +11 -2
- package/dist/browser/live-value.js.map +1 -1
- package/dist/browser/member-hold.js +3 -180
- package/dist/browser/member-hold.js.map +1 -1
- package/dist/browser/messages.js +20 -0
- package/dist/browser/messages.js.map +1 -0
- package/dist/browser/owner-scope.js +3 -28
- package/dist/browser/owner-scope.js.map +1 -1
- package/dist/browser/presence-controller.js +3 -1449
- package/dist/browser/presence-controller.js.map +1 -1
- package/dist/browser/presence-record.js +9 -24
- package/dist/browser/presence-record.js.map +1 -1
- package/dist/browser/presence.js.map +1 -1
- package/dist/browser/press.js +3 -23
- package/dist/browser/press.js.map +1 -1
- package/dist/browser/provider.js +65 -11
- package/dist/browser/provider.js.map +1 -1
- package/dist/browser/reactivity.js +0 -7
- package/dist/browser/reactivity.js.map +1 -1
- package/dist/browser/reorder.js.map +1 -1
- package/dist/browser/retarget-legs.js +3 -1021
- package/dist/browser/retarget-legs.js.map +1 -1
- package/dist/browser/runtime.js +62 -21
- package/dist/browser/runtime.js.map +1 -1
- package/dist/browser/scroll-values.js +46 -0
- package/dist/browser/scroll-values.js.map +1 -0
- package/dist/browser/server-interpolators.js +3 -19
- package/dist/browser/server-interpolators.js.map +1 -1
- package/dist/browser/spans-check.js +25 -0
- package/dist/browser/spans-check.js.map +1 -0
- package/dist/browser/spine.js +3 -3043
- package/dist/browser/spine.js.map +1 -1
- package/dist/browser/timelines.js +4 -0
- package/dist/browser/timelines.js.map +1 -0
- package/dist/browser/unstable/v2/batch-reorder-group.js +36 -6
- package/dist/browser/unstable/v2/batch-reorder-group.js.map +1 -1
- package/dist/browser/unstable/v2/create-animate.js +4 -2
- package/dist/browser/unstable/v2/create-animate.js.map +1 -1
- package/dist/browser/unstable/v2/create-batch.js +2 -2
- package/dist/browser/unstable/v2/create-batch.js.map +1 -1
- package/dist/browser/unstable/v2/create-wardic.js +45 -0
- package/dist/browser/unstable/v2/create-wardic.js.map +1 -0
- package/dist/browser/unstable/v2/element.js +12 -2
- package/dist/browser/unstable/v2/element.js.map +1 -1
- package/dist/browser/unstable/v2/index.js +1 -0
- package/dist/browser/unstable/v2/index.js.map +1 -1
- package/dist/browser/unstable/v2/lifecycle.js +2 -0
- package/dist/browser/unstable/v2/lifecycle.js.map +1 -1
- package/dist/browser/unstable/v2/live-scroll.js +22 -13
- package/dist/browser/unstable/v2/live-scroll.js.map +1 -1
- package/dist/browser/unstable/v2/live-value.js +9 -1
- package/dist/browser/unstable/v2/live-value.js.map +1 -1
- package/dist/browser/unstable/v2/presence.js.map +1 -1
- package/dist/browser/unstable/v2/provider.js +68 -13
- package/dist/browser/unstable/v2/provider.js.map +1 -1
- package/dist/browser/unstable/v2/reorder.js.map +1 -1
- package/dist/browser/unstable/v2/w.js +7 -8
- package/dist/browser/unstable/v2/w.js.map +1 -1
- package/dist/browser/unstable/v2/ward.js +45 -12
- package/dist/browser/unstable/v2/ward.js.map +1 -1
- package/dist/browser/unstable/v2/wardic-instance.js +2 -0
- package/dist/browser/unstable/v2/wardic-instance.js.map +1 -0
- package/dist/browser/variant-target.js +3 -228
- package/dist/browser/variant-target.js.map +1 -1
- package/dist/browser/variant-tree.js +3 -393
- package/dist/browser/variant-tree.js.map +1 -1
- package/dist/browser/w.js +8 -9
- package/dist/browser/w.js.map +1 -1
- package/dist/browser/wardic-config-value.js +3 -90
- package/dist/browser/wardic-config-value.js.map +1 -1
- package/dist/browser/wardic-instance.js +2 -0
- package/dist/browser/wardic-instance.js.map +1 -0
- package/dist/server/animation-controls.js +3 -149
- package/dist/server/animation-controls.js.map +1 -1
- package/dist/server/appear.js +3 -743
- package/dist/server/appear.js.map +1 -1
- package/dist/server/batch-gestures.js.map +1 -1
- package/dist/server/batch-reorder-group.js +40 -11
- package/dist/server/batch-reorder-group.js.map +1 -1
- package/dist/server/batch-reorder-places.js +517 -50
- package/dist/server/batch-reorder-places.js.map +1 -1
- package/dist/server/batch-reorder.js +284 -42
- package/dist/server/batch-reorder.js.map +1 -1
- package/dist/server/batch.js +3 -2511
- package/dist/server/batch.js.map +1 -1
- package/dist/server/config.js +11 -1
- package/dist/server/config.js.map +1 -1
- package/dist/server/create-animate.js +4 -2
- package/dist/server/create-animate.js.map +1 -1
- package/dist/server/create-batch.js +2 -2
- package/dist/server/create-batch.js.map +1 -1
- package/dist/server/create-ward.js +54 -13
- package/dist/server/create-ward.js.map +1 -1
- package/dist/server/create-wardic.js +44 -0
- package/dist/server/create-wardic.js.map +1 -0
- package/dist/server/drag-constraints.js +3 -75
- package/dist/server/drag-constraints.js.map +1 -1
- package/dist/server/drag-controls.js +3 -50
- package/dist/server/drag-controls.js.map +1 -1
- package/dist/server/drag-defaults.js +4 -0
- package/dist/server/drag-defaults.js.map +1 -0
- package/dist/server/drag-track.js +3 -826
- package/dist/server/drag-track.js.map +1 -1
- package/dist/server/drag-transition.js +3 -55
- package/dist/server/drag-transition.js.map +1 -1
- package/dist/server/element-setup.js +4 -0
- package/dist/server/element-setup.js.map +1 -0
- package/dist/server/element.js +12 -3
- package/dist/server/element.js.map +1 -1
- package/dist/server/feature.js +3 -270
- package/dist/server/feature.js.map +1 -1
- package/dist/server/features/all.js +3 -9
- package/dist/server/features/all.js.map +1 -1
- package/dist/server/features/colors.js +3 -32
- package/dist/server/features/colors.js.map +1 -1
- package/dist/server/features/dom-animation.js +3 -6
- package/dist/server/features/dom-animation.js.map +1 -1
- package/dist/server/features/dom-max.js +3 -3
- package/dist/server/features/dom-max.js.map +1 -1
- package/dist/server/features/drag.js +3 -27
- package/dist/server/features/drag.js.map +1 -1
- package/dist/server/features/focus.js +3 -17
- package/dist/server/features/focus.js.map +1 -1
- package/dist/server/features/hover.js +3 -17
- package/dist/server/features/hover.js.map +1 -1
- package/dist/server/features/in-view.js +3 -17
- package/dist/server/features/in-view.js.map +1 -1
- package/dist/server/features/input.js +3 -26
- package/dist/server/features/input.js.map +1 -1
- package/dist/server/features/keys.js +3 -18
- package/dist/server/features/keys.js.map +1 -1
- package/dist/server/features/layout.js +3 -32
- package/dist/server/features/layout.js.map +1 -1
- package/dist/server/features/pan.js +3 -17
- package/dist/server/features/pan.js.map +1 -1
- package/dist/server/features/press.js +3 -11
- package/dist/server/features/press.js.map +1 -1
- package/dist/server/features/scroll.js +3 -20
- package/dist/server/features/scroll.js.map +1 -1
- package/dist/server/gesture-features.js +3 -28
- package/dist/server/gesture-features.js.map +1 -1
- package/dist/server/gesture-info.js +3 -42
- package/dist/server/gesture-info.js.map +1 -1
- package/dist/server/imperative.js +3 -708
- package/dist/server/imperative.js.map +1 -1
- package/dist/server/index.js +2 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/instance-features.js +66 -0
- package/dist/server/instance-features.js.map +1 -0
- package/dist/server/instant.js +3 -50
- package/dist/server/instant.js.map +1 -1
- package/dist/server/layout-group.js +3 -26
- package/dist/server/layout-group.js.map +1 -1
- package/dist/server/layout-member.js +3 -373
- package/dist/server/layout-member.js.map +1 -1
- package/dist/server/layout-projection.js +8 -1
- package/dist/server/layout-projection.js.map +1 -1
- package/dist/server/layout.js +5 -6
- package/dist/server/layout.js.map +1 -1
- package/dist/server/lazy-batch-gestures.js.map +1 -1
- package/dist/server/live-scroll.js +29 -21
- package/dist/server/live-scroll.js.map +1 -1
- package/dist/server/live-style.js +3 -313
- package/dist/server/live-style.js.map +1 -1
- package/dist/server/live-value.js +11 -2
- package/dist/server/live-value.js.map +1 -1
- package/dist/server/member-hold.js +3 -180
- package/dist/server/member-hold.js.map +1 -1
- package/dist/server/messages.js +20 -0
- package/dist/server/messages.js.map +1 -0
- package/dist/server/owner-scope.js +3 -28
- package/dist/server/owner-scope.js.map +1 -1
- package/dist/server/presence-controller.js +3 -1449
- package/dist/server/presence-controller.js.map +1 -1
- package/dist/server/presence-record.js +9 -24
- package/dist/server/presence-record.js.map +1 -1
- package/dist/server/presence.js.map +1 -1
- package/dist/server/press.js +3 -23
- package/dist/server/press.js.map +1 -1
- package/dist/server/provider.js +65 -11
- package/dist/server/provider.js.map +1 -1
- package/dist/server/reactivity.js +0 -7
- package/dist/server/reactivity.js.map +1 -1
- package/dist/server/reorder.js.map +1 -1
- package/dist/server/retarget-legs.js +3 -1021
- package/dist/server/retarget-legs.js.map +1 -1
- package/dist/server/runtime.js +62 -21
- package/dist/server/runtime.js.map +1 -1
- package/dist/server/scroll-values.js +46 -0
- package/dist/server/scroll-values.js.map +1 -0
- package/dist/server/server-interpolators.js +3 -19
- package/dist/server/server-interpolators.js.map +1 -1
- package/dist/server/spans-check.js +25 -0
- package/dist/server/spans-check.js.map +1 -0
- package/dist/server/spine.js +3 -3043
- package/dist/server/spine.js.map +1 -1
- package/dist/server/timelines.js +4 -0
- package/dist/server/timelines.js.map +1 -0
- package/dist/server/unstable/v2/batch-reorder-group.js +36 -6
- package/dist/server/unstable/v2/batch-reorder-group.js.map +1 -1
- package/dist/server/unstable/v2/create-animate.js +4 -2
- package/dist/server/unstable/v2/create-animate.js.map +1 -1
- package/dist/server/unstable/v2/create-batch.js +2 -2
- package/dist/server/unstable/v2/create-batch.js.map +1 -1
- package/dist/server/unstable/v2/create-wardic.js +45 -0
- package/dist/server/unstable/v2/create-wardic.js.map +1 -0
- package/dist/server/unstable/v2/element.js +12 -2
- package/dist/server/unstable/v2/element.js.map +1 -1
- package/dist/server/unstable/v2/index.js +1 -0
- package/dist/server/unstable/v2/index.js.map +1 -1
- package/dist/server/unstable/v2/lifecycle.js +2 -0
- package/dist/server/unstable/v2/lifecycle.js.map +1 -1
- package/dist/server/unstable/v2/live-scroll.js +22 -13
- package/dist/server/unstable/v2/live-scroll.js.map +1 -1
- package/dist/server/unstable/v2/live-value.js +9 -1
- package/dist/server/unstable/v2/live-value.js.map +1 -1
- package/dist/server/unstable/v2/presence.js.map +1 -1
- package/dist/server/unstable/v2/provider.js +68 -13
- package/dist/server/unstable/v2/provider.js.map +1 -1
- package/dist/server/unstable/v2/reorder.js.map +1 -1
- package/dist/server/unstable/v2/w.js +7 -8
- package/dist/server/unstable/v2/w.js.map +1 -1
- package/dist/server/unstable/v2/ward.js +45 -12
- package/dist/server/unstable/v2/ward.js.map +1 -1
- package/dist/server/unstable/v2/wardic-instance.js +2 -0
- package/dist/server/unstable/v2/wardic-instance.js.map +1 -0
- package/dist/server/variant-target.js +3 -228
- package/dist/server/variant-target.js.map +1 -1
- package/dist/server/variant-tree.js +3 -393
- package/dist/server/variant-tree.js.map +1 -1
- package/dist/server/w.js +8 -9
- package/dist/server/w.js.map +1 -1
- package/dist/server/wardic-config-value.js +3 -90
- package/dist/server/wardic-config-value.js.map +1 -1
- package/dist/server/wardic-instance.js +2 -0
- package/dist/server/wardic-instance.js.map +1 -0
- package/dist/solid/animation-controls.d.ts +1 -102
- package/dist/solid/animation-controls.d.ts.map +1 -1
- package/dist/solid/animation-controls.js +3 -128
- package/dist/solid/animation-controls.js.map +1 -1
- package/dist/solid/appear.d.ts +1 -218
- package/dist/solid/appear.d.ts.map +1 -1
- package/dist/solid/appear.js +3 -529
- package/dist/solid/appear.js.map +1 -1
- package/dist/solid/batch-gestures.d.ts +2 -2
- package/dist/solid/batch-gestures.d.ts.map +1 -1
- package/dist/solid/batch-gestures.js.map +1 -1
- package/dist/solid/batch-reorder-group.d.ts +17 -15
- package/dist/solid/batch-reorder-group.d.ts.map +1 -1
- package/dist/solid/batch-reorder-group.jsx +37 -7
- package/dist/solid/batch-reorder-group.jsx.map +1 -1
- package/dist/solid/batch-reorder-places.d.ts +184 -23
- package/dist/solid/batch-reorder-places.d.ts.map +1 -1
- package/dist/solid/batch-reorder-places.js +397 -41
- package/dist/solid/batch-reorder-places.js.map +1 -1
- package/dist/solid/batch-reorder.d.ts +30 -1
- package/dist/solid/batch-reorder.d.ts.map +1 -1
- package/dist/solid/batch-reorder.js +298 -37
- package/dist/solid/batch-reorder.js.map +1 -1
- package/dist/solid/batch.d.ts +1 -511
- package/dist/solid/batch.d.ts.map +1 -1
- package/dist/solid/batch.js +3 -2484
- package/dist/solid/batch.js.map +1 -1
- package/dist/solid/config.d.ts +2 -690
- package/dist/solid/config.d.ts.map +1 -1
- package/dist/solid/config.js +11 -1
- package/dist/solid/config.js.map +1 -1
- package/dist/solid/create-animate.d.ts.map +1 -1
- package/dist/solid/create-animate.jsx +3 -1
- package/dist/solid/create-animate.jsx.map +1 -1
- package/dist/solid/create-batch.jsx +2 -2
- package/dist/solid/create-batch.jsx.map +1 -1
- package/dist/solid/create-ward.d.ts +8 -3
- package/dist/solid/create-ward.d.ts.map +1 -1
- package/dist/solid/create-ward.jsx +50 -11
- package/dist/solid/create-ward.jsx.map +1 -1
- package/dist/solid/create-wardic.d.ts +24 -0
- package/dist/solid/create-wardic.d.ts.map +1 -0
- package/dist/solid/create-wardic.jsx +42 -0
- package/dist/solid/create-wardic.jsx.map +1 -0
- package/dist/solid/drag-constraints.d.ts +1 -45
- package/dist/solid/drag-constraints.d.ts.map +1 -1
- package/dist/solid/drag-constraints.js +3 -48
- package/dist/solid/drag-constraints.js.map +1 -1
- package/dist/solid/drag-controls.d.ts +1 -49
- package/dist/solid/drag-controls.d.ts.map +1 -1
- package/dist/solid/drag-controls.js +3 -50
- package/dist/solid/drag-controls.js.map +1 -1
- package/dist/solid/drag-defaults.d.ts +2 -0
- package/dist/solid/drag-defaults.d.ts.map +1 -0
- package/dist/solid/drag-defaults.js +4 -0
- package/dist/solid/drag-defaults.js.map +1 -0
- package/dist/solid/drag-track.d.ts +1 -232
- package/dist/solid/drag-track.d.ts.map +1 -1
- package/dist/solid/drag-track.js +3 -641
- package/dist/solid/drag-track.js.map +1 -1
- package/dist/solid/drag-transition.d.ts +1 -19
- package/dist/solid/drag-transition.d.ts.map +1 -1
- package/dist/solid/drag-transition.js +3 -30
- package/dist/solid/drag-transition.js.map +1 -1
- package/dist/solid/element-setup.d.ts +2 -0
- package/dist/solid/element-setup.d.ts.map +1 -0
- package/dist/solid/element-setup.js +4 -0
- package/dist/solid/element-setup.js.map +1 -0
- package/dist/solid/element.d.ts +27 -8
- package/dist/solid/element.d.ts.map +1 -1
- package/dist/solid/element.jsx +13 -5
- package/dist/solid/element.jsx.map +1 -1
- package/dist/solid/feature.d.ts +1 -118
- package/dist/solid/feature.d.ts.map +1 -1
- package/dist/solid/feature.js +3 -257
- package/dist/solid/feature.js.map +1 -1
- package/dist/solid/features/all.d.ts +1 -9
- package/dist/solid/features/all.d.ts.map +1 -1
- package/dist/solid/features/all.js +3 -9
- package/dist/solid/features/all.js.map +1 -1
- package/dist/solid/features/colors.d.ts +1 -11
- package/dist/solid/features/colors.d.ts.map +1 -1
- package/dist/solid/features/colors.js +3 -33
- package/dist/solid/features/colors.js.map +1 -1
- package/dist/solid/features/dom-animation.d.ts +1 -10
- package/dist/solid/features/dom-animation.d.ts.map +1 -1
- package/dist/solid/features/dom-animation.js +3 -6
- package/dist/solid/features/dom-animation.js.map +1 -1
- package/dist/solid/features/dom-max.d.ts +1 -9
- package/dist/solid/features/dom-max.d.ts.map +1 -1
- package/dist/solid/features/dom-max.js +3 -3
- package/dist/solid/features/dom-max.js.map +1 -1
- package/dist/solid/features/drag.d.ts +1 -4
- package/dist/solid/features/drag.d.ts.map +1 -1
- package/dist/solid/features/drag.js +3 -27
- package/dist/solid/features/drag.js.map +1 -1
- package/dist/solid/features/focus.d.ts +1 -4
- package/dist/solid/features/focus.d.ts.map +1 -1
- package/dist/solid/features/focus.js +3 -15
- package/dist/solid/features/focus.js.map +1 -1
- package/dist/solid/features/hover.d.ts +1 -4
- package/dist/solid/features/hover.d.ts.map +1 -1
- package/dist/solid/features/hover.js +3 -15
- package/dist/solid/features/hover.js.map +1 -1
- package/dist/solid/features/in-view.d.ts +1 -4
- package/dist/solid/features/in-view.d.ts.map +1 -1
- package/dist/solid/features/in-view.js +3 -15
- package/dist/solid/features/in-view.js.map +1 -1
- package/dist/solid/features/input.d.ts +1 -25
- package/dist/solid/features/input.d.ts.map +1 -1
- package/dist/solid/features/input.js +3 -26
- package/dist/solid/features/input.js.map +1 -1
- package/dist/solid/features/keys.d.ts +1 -69
- package/dist/solid/features/keys.d.ts.map +1 -1
- package/dist/solid/features/keys.js +3 -25
- package/dist/solid/features/keys.js.map +1 -1
- package/dist/solid/features/layout.d.ts +1 -31
- package/dist/solid/features/layout.d.ts.map +1 -1
- package/dist/solid/features/layout.js +3 -33
- package/dist/solid/features/layout.js.map +1 -1
- package/dist/solid/features/pan.d.ts +1 -4
- package/dist/solid/features/pan.d.ts.map +1 -1
- package/dist/solid/features/pan.js +3 -15
- package/dist/solid/features/pan.js.map +1 -1
- package/dist/solid/features/press.d.ts +1 -10
- package/dist/solid/features/press.d.ts.map +1 -1
- package/dist/solid/features/press.js +3 -9
- package/dist/solid/features/press.js.map +1 -1
- package/dist/solid/features/scroll.d.ts +1 -15
- package/dist/solid/features/scroll.d.ts.map +1 -1
- package/dist/solid/features/scroll.js +3 -20
- package/dist/solid/features/scroll.js.map +1 -1
- package/dist/solid/gesture-features.d.ts +1 -27
- package/dist/solid/gesture-features.d.ts.map +1 -1
- package/dist/solid/gesture-features.js +3 -28
- package/dist/solid/gesture-features.js.map +1 -1
- package/dist/solid/gesture-info.d.ts +1 -58
- package/dist/solid/gesture-info.d.ts.map +1 -1
- package/dist/solid/gesture-info.js +3 -22
- package/dist/solid/gesture-info.js.map +1 -1
- package/dist/solid/imperative.d.ts +1 -202
- package/dist/solid/imperative.d.ts.map +1 -1
- package/dist/solid/imperative.js +3 -622
- package/dist/solid/imperative.js.map +1 -1
- package/dist/solid/index.d.ts +4 -2
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.jsx +2 -1
- package/dist/solid/index.jsx.map +1 -1
- package/dist/solid/instance-features.d.ts +7 -0
- package/dist/solid/instance-features.d.ts.map +1 -0
- package/dist/solid/instance-features.js +63 -0
- package/dist/solid/instance-features.js.map +1 -0
- package/dist/solid/instant.d.ts +1 -43
- package/dist/solid/instant.d.ts.map +1 -1
- package/dist/solid/instant.js +3 -48
- package/dist/solid/instant.js.map +1 -1
- package/dist/solid/layout-group.d.ts +1 -13
- package/dist/solid/layout-group.d.ts.map +1 -1
- package/dist/solid/layout-group.js +3 -26
- package/dist/solid/layout-group.js.map +1 -1
- package/dist/solid/layout-member.d.ts +1 -126
- package/dist/solid/layout-member.d.ts.map +1 -1
- package/dist/solid/layout-member.js +3 -177
- package/dist/solid/layout-member.js.map +1 -1
- package/dist/solid/layout-projection.d.ts +6 -0
- package/dist/solid/layout-projection.d.ts.map +1 -1
- package/dist/solid/layout-projection.jsx +8 -1
- package/dist/solid/layout-projection.jsx.map +1 -1
- package/dist/solid/layout.d.ts +4 -3
- package/dist/solid/layout.d.ts.map +1 -1
- package/dist/solid/layout.jsx +5 -6
- package/dist/solid/layout.jsx.map +1 -1
- package/dist/solid/lazy-batch-gestures.d.ts +2 -2
- package/dist/solid/lazy-batch-gestures.d.ts.map +1 -1
- package/dist/solid/lazy-batch-gestures.js.map +1 -1
- package/dist/solid/live-scroll.d.ts +4 -0
- package/dist/solid/live-scroll.d.ts.map +1 -1
- package/dist/solid/live-scroll.jsx +29 -19
- package/dist/solid/live-scroll.jsx.map +1 -1
- package/dist/solid/live-style.d.ts +1 -147
- package/dist/solid/live-style.d.ts.map +1 -1
- package/dist/solid/live-style.js +3 -304
- package/dist/solid/live-style.js.map +1 -1
- package/dist/solid/live-value.d.ts +1 -0
- package/dist/solid/live-value.d.ts.map +1 -1
- package/dist/solid/live-value.jsx +12 -3
- package/dist/solid/live-value.jsx.map +1 -1
- package/dist/solid/member-hold.d.ts +1 -46
- package/dist/solid/member-hold.d.ts.map +1 -1
- package/dist/solid/member-hold.js +3 -188
- package/dist/solid/member-hold.js.map +1 -1
- package/dist/solid/messages.d.ts +20 -0
- package/dist/solid/messages.d.ts.map +1 -0
- package/dist/solid/messages.js +22 -0
- package/dist/solid/messages.js.map +1 -0
- package/dist/solid/owner-scope.d.ts +1 -15
- package/dist/solid/owner-scope.d.ts.map +1 -1
- package/dist/solid/owner-scope.js +3 -30
- package/dist/solid/owner-scope.js.map +1 -1
- package/dist/solid/presence-controller.d.ts +1 -121
- package/dist/solid/presence-controller.d.ts.map +1 -1
- package/dist/solid/presence-controller.js +3 -1335
- package/dist/solid/presence-controller.js.map +1 -1
- package/dist/solid/presence-record.d.ts +6 -168
- package/dist/solid/presence-record.d.ts.map +1 -1
- package/dist/solid/presence-record.js +9 -23
- package/dist/solid/presence-record.js.map +1 -1
- package/dist/solid/presence.d.ts +3 -1
- package/dist/solid/presence.d.ts.map +1 -1
- package/dist/solid/presence.jsx.map +1 -1
- package/dist/solid/press.d.ts +1 -23
- package/dist/solid/press.d.ts.map +1 -1
- package/dist/solid/press.js +3 -18
- package/dist/solid/press.js.map +1 -1
- package/dist/solid/provider.d.ts +24 -4
- package/dist/solid/provider.d.ts.map +1 -1
- package/dist/solid/provider.jsx +63 -7
- package/dist/solid/provider.jsx.map +1 -1
- package/dist/solid/reactivity.d.ts +1 -20
- package/dist/solid/reactivity.d.ts.map +1 -1
- package/dist/solid/reactivity.js +0 -7
- package/dist/solid/reactivity.js.map +1 -1
- package/dist/solid/reorder.d.ts +5 -4
- package/dist/solid/reorder.d.ts.map +1 -1
- package/dist/solid/reorder.jsx.map +1 -1
- package/dist/solid/retarget-legs.d.ts +1 -188
- package/dist/solid/retarget-legs.d.ts.map +1 -1
- package/dist/solid/retarget-legs.js +3 -825
- package/dist/solid/retarget-legs.js.map +1 -1
- package/dist/solid/runtime.d.ts +15 -27
- package/dist/solid/runtime.d.ts.map +1 -1
- package/dist/solid/runtime.js +52 -23
- package/dist/solid/runtime.js.map +1 -1
- package/dist/solid/scroll-values.d.ts +30 -0
- package/dist/solid/scroll-values.d.ts.map +1 -0
- package/dist/solid/scroll-values.js +44 -0
- package/dist/solid/scroll-values.js.map +1 -0
- package/dist/solid/server-interpolators.d.ts +1 -12
- package/dist/solid/server-interpolators.d.ts.map +1 -1
- package/dist/solid/server-interpolators.js +3 -19
- package/dist/solid/server-interpolators.js.map +1 -1
- package/dist/solid/spans-check.d.ts +4 -0
- package/dist/solid/spans-check.d.ts.map +1 -0
- package/dist/solid/spans-check.js +23 -0
- package/dist/solid/spans-check.js.map +1 -0
- package/dist/solid/spine.d.ts +1 -612
- package/dist/solid/spine.d.ts.map +1 -1
- package/dist/solid/spine.js +3 -2886
- package/dist/solid/spine.js.map +1 -1
- package/dist/solid/timelines.d.ts +2 -0
- package/dist/solid/timelines.d.ts.map +1 -0
- package/dist/solid/timelines.js +4 -0
- package/dist/solid/timelines.js.map +1 -0
- package/dist/solid/unstable/v2/batch-reorder-group.d.ts +18 -17
- package/dist/solid/unstable/v2/batch-reorder-group.d.ts.map +1 -1
- package/dist/solid/unstable/v2/batch-reorder-group.jsx +32 -5
- package/dist/solid/unstable/v2/batch-reorder-group.jsx.map +1 -1
- package/dist/solid/unstable/v2/create-animate.d.ts.map +1 -1
- package/dist/solid/unstable/v2/create-animate.jsx +3 -1
- package/dist/solid/unstable/v2/create-animate.jsx.map +1 -1
- package/dist/solid/unstable/v2/create-batch.jsx +2 -2
- package/dist/solid/unstable/v2/create-batch.jsx.map +1 -1
- package/dist/solid/unstable/v2/create-wardic.d.ts +25 -0
- package/dist/solid/unstable/v2/create-wardic.d.ts.map +1 -0
- package/dist/solid/unstable/v2/create-wardic.jsx +43 -0
- package/dist/solid/unstable/v2/create-wardic.jsx.map +1 -0
- package/dist/solid/unstable/v2/element.d.ts +53 -18
- package/dist/solid/unstable/v2/element.d.ts.map +1 -1
- package/dist/solid/unstable/v2/element.jsx +13 -4
- package/dist/solid/unstable/v2/element.jsx.map +1 -1
- package/dist/solid/unstable/v2/index.d.ts +3 -1
- package/dist/solid/unstable/v2/index.d.ts.map +1 -1
- package/dist/solid/unstable/v2/index.jsx +1 -0
- package/dist/solid/unstable/v2/index.jsx.map +1 -1
- package/dist/solid/unstable/v2/lifecycle.d.ts +29 -0
- package/dist/solid/unstable/v2/lifecycle.d.ts.map +1 -1
- package/dist/solid/unstable/v2/lifecycle.js +2 -0
- package/dist/solid/unstable/v2/lifecycle.js.map +1 -1
- package/dist/solid/unstable/v2/live-scroll.d.ts +4 -0
- package/dist/solid/unstable/v2/live-scroll.d.ts.map +1 -1
- package/dist/solid/unstable/v2/live-scroll.jsx +22 -11
- package/dist/solid/unstable/v2/live-scroll.jsx.map +1 -1
- package/dist/solid/unstable/v2/live-value.d.ts +1 -0
- package/dist/solid/unstable/v2/live-value.d.ts.map +1 -1
- package/dist/solid/unstable/v2/live-value.jsx +10 -1
- package/dist/solid/unstable/v2/live-value.jsx.map +1 -1
- package/dist/solid/unstable/v2/presence.d.ts +3 -1
- package/dist/solid/unstable/v2/presence.d.ts.map +1 -1
- package/dist/solid/unstable/v2/presence.jsx.map +1 -1
- package/dist/solid/unstable/v2/provider.d.ts +24 -4
- package/dist/solid/unstable/v2/provider.d.ts.map +1 -1
- package/dist/solid/unstable/v2/provider.jsx +66 -10
- package/dist/solid/unstable/v2/provider.jsx.map +1 -1
- package/dist/solid/unstable/v2/reorder.d.ts +4 -3
- package/dist/solid/unstable/v2/reorder.d.ts.map +1 -1
- package/dist/solid/unstable/v2/reorder.jsx.map +1 -1
- package/dist/solid/unstable/v2/w.d.ts +42 -10
- package/dist/solid/unstable/v2/w.d.ts.map +1 -1
- package/dist/solid/unstable/v2/w.jsx +5 -7
- package/dist/solid/unstable/v2/w.jsx.map +1 -1
- package/dist/solid/unstable/v2/ward.d.ts +17 -9
- package/dist/solid/unstable/v2/ward.d.ts.map +1 -1
- package/dist/solid/unstable/v2/ward.jsx +40 -10
- package/dist/solid/unstable/v2/ward.jsx.map +1 -1
- package/dist/solid/unstable/v2/wardic-instance.d.ts +47 -0
- package/dist/solid/unstable/v2/wardic-instance.d.ts.map +1 -0
- package/dist/solid/unstable/v2/wardic-instance.js +2 -0
- package/dist/solid/unstable/v2/wardic-instance.js.map +1 -0
- package/dist/solid/variant-target.d.ts +1 -103
- package/dist/solid/variant-target.d.ts.map +1 -1
- package/dist/solid/variant-target.js +3 -181
- package/dist/solid/variant-target.js.map +1 -1
- package/dist/solid/variant-tree.d.ts +1 -348
- package/dist/solid/variant-tree.d.ts.map +1 -1
- package/dist/solid/variant-tree.js +3 -357
- package/dist/solid/variant-tree.js.map +1 -1
- package/dist/solid/w.d.ts +25 -10
- package/dist/solid/w.d.ts.map +1 -1
- package/dist/solid/w.jsx +8 -7
- package/dist/solid/w.jsx.map +1 -1
- package/dist/solid/ward-keys.d.ts +22 -3
- package/dist/solid/ward-keys.d.ts.map +1 -1
- package/dist/solid/wardic-config-value.d.ts +1 -86
- package/dist/solid/wardic-config-value.d.ts.map +1 -1
- package/dist/solid/wardic-config-value.js +3 -105
- package/dist/solid/wardic-config-value.js.map +1 -1
- package/dist/solid/wardic-instance.d.ts +46 -0
- package/dist/solid/wardic-instance.d.ts.map +1 -0
- package/dist/solid/wardic-instance.js +2 -0
- package/dist/solid/wardic-instance.js.map +1 -0
- package/package.json +4 -4
- package/src/animation-controls.ts +3 -206
- package/src/appear.ts +3 -824
- package/src/batch-gestures.ts +2 -2
- package/src/batch-reorder-group.tsx +47 -21
- package/src/batch-reorder-places.ts +566 -54
- package/src/batch-reorder.ts +333 -40
- package/src/batch.ts +3 -3078
- package/src/config.ts +5 -804
- package/src/create-animate.tsx +3 -1
- package/src/create-batch.tsx +2 -2
- package/src/create-ward.tsx +55 -50
- package/src/create-wardic.tsx +45 -0
- package/src/drag-constraints.ts +3 -103
- package/src/drag-controls.ts +3 -94
- package/src/drag-defaults.ts +3 -0
- package/src/drag-track.ts +3 -955
- package/src/drag-transition.ts +3 -43
- package/src/element-setup.ts +3 -0
- package/src/element.tsx +53 -16
- package/src/feature.ts +3 -359
- package/src/features/all.ts +3 -18
- package/src/features/colors.ts +3 -36
- package/src/features/dom-animation.ts +3 -15
- package/src/features/dom-max.ts +3 -11
- package/src/features/drag.ts +3 -30
- package/src/features/focus.ts +3 -17
- package/src/features/hover.ts +3 -17
- package/src/features/in-view.ts +3 -17
- package/src/features/input.ts +3 -34
- package/src/features/keys.ts +3 -89
- package/src/features/layout.ts +3 -54
- package/src/features/pan.ts +3 -17
- package/src/features/press.ts +3 -17
- package/src/features/scroll.ts +3 -21
- package/src/gesture-features.ts +3 -35
- package/src/gesture-info.ts +3 -81
- package/src/imperative.ts +3 -894
- package/src/index.tsx +6 -1
- package/src/instance-features.ts +88 -0
- package/src/instant.ts +3 -90
- package/src/layout-group.ts +3 -32
- package/src/layout-member.ts +3 -319
- package/src/layout-projection.tsx +10 -1
- package/src/layout.tsx +7 -6
- package/src/lazy-batch-gestures.ts +3 -3
- package/src/live-scroll.tsx +30 -22
- package/src/live-style.ts +3 -450
- package/src/live-value.tsx +12 -2
- package/src/member-hold.ts +3 -222
- package/src/messages.ts +27 -0
- package/src/owner-scope.ts +3 -31
- package/src/presence-controller.ts +3 -1616
- package/src/presence-record.ts +8 -192
- package/src/presence.tsx +3 -1
- package/src/press.ts +3 -40
- package/src/provider.tsx +72 -7
- package/src/reactivity.ts +3 -23
- package/src/reorder.tsx +5 -4
- package/src/retarget-legs.ts +3 -1049
- package/src/runtime.ts +62 -43
- package/src/scroll-values.ts +53 -0
- package/src/server-interpolators.ts +3 -33
- package/src/spans-check.ts +25 -0
- package/src/spine.ts +3 -3508
- package/src/timelines.ts +3 -0
- package/src/unstable/v2/batch-reorder-group.tsx +42 -18
- package/src/unstable/v2/create-animate.tsx +3 -1
- package/src/unstable/v2/create-batch.tsx +2 -2
- package/src/unstable/v2/create-wardic.tsx +46 -0
- package/src/unstable/v2/element.tsx +86 -24
- package/src/unstable/v2/index.tsx +5 -0
- package/src/unstable/v2/lifecycle.ts +35 -0
- package/src/unstable/v2/live-scroll.tsx +22 -11
- package/src/unstable/v2/live-value.tsx +10 -0
- package/src/unstable/v2/presence.tsx +3 -1
- package/src/unstable/v2/provider.tsx +75 -9
- package/src/unstable/v2/reorder.tsx +9 -4
- package/src/unstable/v2/w.tsx +50 -13
- package/src/unstable/v2/ward.tsx +61 -51
- package/src/unstable/v2/wardic-instance.ts +50 -0
- package/src/variant-target.ts +3 -240
- package/src/variant-tree.ts +3 -638
- package/src/w.tsx +34 -16
- package/src/ward-keys.ts +38 -17
- package/src/wardic-config-value.ts +3 -150
- package/src/wardic-instance.ts +49 -0
- package/dist/browser/batch-handoff.js +0 -72
- package/dist/browser/batch-handoff.js.map +0 -1
- package/dist/browser/frame-time.js +0 -40
- package/dist/browser/frame-time.js.map +0 -1
- package/dist/server/batch-handoff.js +0 -72
- package/dist/server/batch-handoff.js.map +0 -1
- package/dist/server/frame-time.js +0 -40
- package/dist/server/frame-time.js.map +0 -1
- package/dist/solid/batch-handoff.d.ts +0 -25
- package/dist/solid/batch-handoff.d.ts.map +0 -1
- package/dist/solid/batch-handoff.js +0 -75
- package/dist/solid/batch-handoff.js.map +0 -1
- package/dist/solid/frame-time.d.ts +0 -21
- package/dist/solid/frame-time.d.ts.map +0 -1
- package/dist/solid/frame-time.js +0 -41
- package/dist/solid/frame-time.js.map +0 -1
- package/src/batch-handoff.ts +0 -87
- package/src/frame-time.ts +0 -45
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* What a `WardicConfig` gives the Wardic elements below it (#434, Motion's `MotionConfig`),
|
|
3
|
-
* Solid-free, on both bindings: its **Config transition**, its reduced motion and whether its
|
|
4
|
-
* animations are skipped (#468).
|
|
5
|
-
*
|
|
6
|
-
* - **The Config transition is an element's own when it gives none,** as Motion's
|
|
7
|
-
* `{ ...config, ...props }`: whatever reads the element's `transition` reads it, a Variant child's in
|
|
8
|
-
* place of its parent's (Q3).
|
|
9
|
-
* - **Its reduced motion** (ADR-0029) is the element's, over the `WardicProvider`'s (Q2), as Motion
|
|
10
|
-
* reads its `MotionConfig`'s per element.
|
|
11
|
-
* - **`skipAnimations`** (#468) makes every animation of the elements below a **Skipped animation**,
|
|
12
|
-
* Motion's `MotionConfig` `skipAnimations`, whatever their reduced motion.
|
|
13
|
-
* - **`isValidProp`** (#443) keeps a tag's props it says aren't valid off its element, Motion's
|
|
14
|
-
* `MotionConfig` `isValidProp`.
|
|
15
|
-
* - **`transformPagePoint`** (#443) maps the points a drag or a pan below it uses, Motion's
|
|
16
|
-
* `MotionConfig` `transformPagePoint`.
|
|
17
|
-
* - **A `WardicConfig` inside another** replaces its transition, or with `inherit: true` lays its own
|
|
18
|
-
* fields over it (Motion's `resolveTransition`); one that gives none passes its parent's on, as one
|
|
19
|
-
* that gives no reduced motion, `skipAnimations`, `isValidProp` or `transformPagePoint` passes its parent's.
|
|
20
|
-
*
|
|
21
|
-
* @module
|
|
22
|
-
*/
|
|
23
|
-
import type * as ReducedMotion from "@wardic/core/ReducedMotion";
|
|
24
|
-
import * as Option from "effect/Option";
|
|
25
|
-
import type { WardicTransformPoint, WardicTransition, WardicVariantTransition } from "./config.ts";
|
|
26
|
-
/** What a `WardicConfig` gives below it (#434): one value per config, read where a binding reads it. */
|
|
27
|
-
export interface WardicConfigValue {
|
|
28
|
-
/** Its **Config transition**: read when an element's transition is, so a change starts nothing by itself. */
|
|
29
|
-
readonly transition: () => WardicTransition | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Its reduced motion (ADR-0029): its own, else an enclosing config's, else `undefined` for the
|
|
32
|
-
* `WardicProvider`'s. Read when each animation starts.
|
|
33
|
-
*/
|
|
34
|
-
readonly reducedMotion: () => ReducedMotion.Config | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Whether its animations are skipped (#468): its own, else an enclosing config's, else `undefined`,
|
|
37
|
-
* as `false`. Read when each animation starts.
|
|
38
|
-
*/
|
|
39
|
-
readonly skipAnimations: () => boolean | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* Which of a tag's own props reach its element (#443, Motion's `MotionConfig` `isValidProp`): its
|
|
42
|
-
* own, else an enclosing config's, else `undefined`, every one. Read as each element is made.
|
|
43
|
-
*/
|
|
44
|
-
readonly isValidProp: () => ((key: string) => boolean) | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* Where a drag's or a pan's points are (#443, Motion's `MotionConfig` `transformPagePoint`): its
|
|
47
|
-
* own, else an enclosing config's, else `undefined`, as they are. Read at each drag or pan start.
|
|
48
|
-
*/
|
|
49
|
-
readonly transformPagePoint: () => WardicTransformPoint | undefined;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* A `WardicConfig`'s transition (#434): its own, laid over its parent's with `inherit: true` (as a
|
|
53
|
-
* variant's own is over the element's), else its parent's when it gives none.
|
|
54
|
-
*/
|
|
55
|
-
export declare const configTransitionOf: (own: WardicVariantTransition | undefined, parent: WardicConfigValue | undefined) => WardicTransition | undefined;
|
|
56
|
-
/** A `WardicConfig`'s reduced motion (#434): its own, else its parent's, else none (the provider's). */
|
|
57
|
-
export declare const configReducedMotionOf: (own: ReducedMotion.Config | undefined, parent: WardicConfigValue | undefined) => ReducedMotion.Config | undefined;
|
|
58
|
-
/** A `WardicConfig`'s `skipAnimations` (#468): its own, else its parent's, else none. */
|
|
59
|
-
export declare const configSkipAnimationsOf: (own: boolean | undefined, parent: WardicConfigValue | undefined) => boolean | undefined;
|
|
60
|
-
/** A `WardicConfig`'s `isValidProp` (#443): its own, else its parent's, else none. */
|
|
61
|
-
export declare const configIsValidPropOf: (own: ((key: string) => boolean) | undefined, parent: WardicConfigValue | undefined) => ((key: string) => boolean) | undefined;
|
|
62
|
-
/** A `WardicConfig`'s `transformPagePoint` (#443): its own, else its parent's, else none. */
|
|
63
|
-
export declare const configTransformPagePointOf: (own: WardicTransformPoint | undefined, parent: WardicConfigValue | undefined) => WardicTransformPoint | undefined;
|
|
64
|
-
/** The nearest config's `transformPagePoint` (#443), read at each drag or pan start: `undefined` for none. */
|
|
65
|
-
export declare const transformPagePointOf: (config: WardicConfigValue | undefined) => (() => WardicTransformPoint | undefined);
|
|
66
|
-
/**
|
|
67
|
-
* A `transformPagePoint` as core's gestures take it (#618, A1): an `Option`, the same `Some` while the
|
|
68
|
-
* mapping is the same, so a gesture's down allocates nothing.
|
|
69
|
-
*/
|
|
70
|
-
export declare const pointMapOptionOf: (read: () => WardicTransformPoint | undefined) => (() => Option.Option<WardicTransformPoint>);
|
|
71
|
-
/** The nearest config's `isValidProp` (#443), as an element is made: `undefined` for none. */
|
|
72
|
-
export declare const isValidPropOf: (config: WardicConfigValue | undefined) => ((key: string) => boolean) | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Whether an element's animations are skipped (#468), read when each starts: its nearest config's
|
|
75
|
-
* `skipAnimations`. With no config above, never, and nothing made.
|
|
76
|
-
*/
|
|
77
|
-
export declare const skipAnimationsOf: (config: WardicConfigValue | undefined) => (() => boolean);
|
|
78
|
-
/** The reduced motion an element's nearest config sets (#434), now: `undefined` for none, the provider's. */
|
|
79
|
-
export declare const settingOf: (config: WardicConfigValue | undefined) => ReducedMotion.Config | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* `c` with its **Config transition** as its own when it gives none (#434, Motion's spread): `c` as it
|
|
82
|
-
* is when it has its own or the config gives none.
|
|
83
|
-
*/
|
|
84
|
-
export declare const withConfigTransition: <C extends {
|
|
85
|
-
readonly transition?: WardicTransition | undefined;
|
|
86
|
-
}>(c: C, config: WardicConfigValue | undefined) => C;
|
|
1
|
+
export * from "@wardic/core/unstable/WardicConfigValue";
|
|
87
2
|
//# sourceMappingURL=wardic-config-value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wardic-config-value.d.ts","sourceRoot":"","sources":["../../src/wardic-config-value.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wardic-config-value.d.ts","sourceRoot":"","sources":["../../src/wardic-config-value.ts"],"names":[],"mappings":"AAEA,cAAc,yCAAyC,CAAA"}
|
|
@@ -1,106 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { transitionOfTarget } from "./variant-target.js";
|
|
5
|
-
/**
|
|
6
|
-
* A `WardicConfig`'s transition (#434): its own, laid over its parent's with `inherit: true` (as a
|
|
7
|
-
* variant's own is over the element's), else its parent's when it gives none.
|
|
8
|
-
*/
|
|
9
|
-
export const configTransitionOf = (own, parent) => transitionOfTarget(own, parentTransitionOf(parent));
|
|
10
|
-
const parentTransitionOf = (parent) => {
|
|
11
|
-
if (Predicate.isUndefined(parent))
|
|
12
|
-
return undefined;
|
|
13
|
-
return parent.transition();
|
|
14
|
-
};
|
|
15
|
-
/** A `WardicConfig`'s reduced motion (#434): its own, else its parent's, else none (the provider's). */
|
|
16
|
-
export const configReducedMotionOf = (own, parent) => {
|
|
17
|
-
if (Predicate.isNotUndefined(own))
|
|
18
|
-
return own;
|
|
19
|
-
if (Predicate.isUndefined(parent))
|
|
20
|
-
return undefined;
|
|
21
|
-
return parent.reducedMotion();
|
|
22
|
-
};
|
|
23
|
-
/** A `WardicConfig`'s `skipAnimations` (#468): its own, else its parent's, else none. */
|
|
24
|
-
export const configSkipAnimationsOf = (own, parent) => {
|
|
25
|
-
if (Predicate.isNotUndefined(own))
|
|
26
|
-
return own;
|
|
27
|
-
if (Predicate.isUndefined(parent))
|
|
28
|
-
return undefined;
|
|
29
|
-
return parent.skipAnimations();
|
|
30
|
-
};
|
|
31
|
-
/** A `WardicConfig`'s `isValidProp` (#443): its own, else its parent's, else none. */
|
|
32
|
-
export const configIsValidPropOf = (own, parent) => {
|
|
33
|
-
if (Predicate.isNotUndefined(own))
|
|
34
|
-
return own;
|
|
35
|
-
if (Predicate.isUndefined(parent))
|
|
36
|
-
return undefined;
|
|
37
|
-
return parent.isValidProp();
|
|
38
|
-
};
|
|
39
|
-
/** A `WardicConfig`'s `transformPagePoint` (#443): its own, else its parent's, else none. */
|
|
40
|
-
export const configTransformPagePointOf = (own, parent) => {
|
|
41
|
-
if (Predicate.isNotUndefined(own))
|
|
42
|
-
return own;
|
|
43
|
-
if (Predicate.isUndefined(parent))
|
|
44
|
-
return undefined;
|
|
45
|
-
return parent.transformPagePoint();
|
|
46
|
-
};
|
|
47
|
-
/** The nearest config's `transformPagePoint` (#443), read at each drag or pan start: `undefined` for none. */
|
|
48
|
-
export const transformPagePointOf = (config) => {
|
|
49
|
-
if (Predicate.isUndefined(config))
|
|
50
|
-
return constUndefined;
|
|
51
|
-
return () => config.transformPagePoint();
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* A `transformPagePoint` as core's gestures take it (#618, A1): an `Option`, the same `Some` while the
|
|
55
|
-
* mapping is the same, so a gesture's down allocates nothing.
|
|
56
|
-
*/
|
|
57
|
-
export const pointMapOptionOf = (read) => {
|
|
58
|
-
let last = Option.none();
|
|
59
|
-
return () => {
|
|
60
|
-
const now = read();
|
|
61
|
-
if (Predicate.isUndefined(now))
|
|
62
|
-
return Option.none();
|
|
63
|
-
if (Option.isSome(last)) {
|
|
64
|
-
if (last.value === now)
|
|
65
|
-
return last;
|
|
66
|
-
}
|
|
67
|
-
last = Option.some(now);
|
|
68
|
-
return last;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
/** The nearest config's `isValidProp` (#443), as an element is made: `undefined` for none. */
|
|
72
|
-
export const isValidPropOf = (config) => {
|
|
73
|
-
if (Predicate.isUndefined(config))
|
|
74
|
-
return undefined;
|
|
75
|
-
return config.isValidProp();
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Whether an element's animations are skipped (#468), read when each starts: its nearest config's
|
|
79
|
-
* `skipAnimations`. With no config above, never, and nothing made.
|
|
80
|
-
*/
|
|
81
|
-
export const skipAnimationsOf = (config) => {
|
|
82
|
-
if (Predicate.isUndefined(config))
|
|
83
|
-
return constFalse;
|
|
84
|
-
return () => config.skipAnimations() === true;
|
|
85
|
-
};
|
|
86
|
-
/** The reduced motion an element's nearest config sets (#434), now: `undefined` for none, the provider's. */
|
|
87
|
-
export const settingOf = (config) => {
|
|
88
|
-
if (Predicate.isUndefined(config))
|
|
89
|
-
return undefined;
|
|
90
|
-
return config.reducedMotion();
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* `c` with its **Config transition** as its own when it gives none (#434, Motion's spread): `c` as it
|
|
94
|
-
* is when it has its own or the config gives none.
|
|
95
|
-
*/
|
|
96
|
-
export const withConfigTransition = (c, config) => {
|
|
97
|
-
if (Predicate.isNotUndefined(c.transition))
|
|
98
|
-
return c;
|
|
99
|
-
if (Predicate.isUndefined(config))
|
|
100
|
-
return c;
|
|
101
|
-
const transition = config.transition();
|
|
102
|
-
if (Predicate.isUndefined(transition))
|
|
103
|
-
return c;
|
|
104
|
-
return { ...c, transition };
|
|
105
|
-
};
|
|
1
|
+
// #672: @wardic/core/unstable/WardicConfigValue since the lift; solid's modules import it through here until each
|
|
2
|
+
// has moved.
|
|
3
|
+
export * from "@wardic/core/unstable/WardicConfigValue";
|
|
106
4
|
//# sourceMappingURL=wardic-config-value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wardic-config-value.js","sourceRoot":"","sources":["../../src/wardic-config-value.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wardic-config-value.js","sourceRoot":"","sources":["../../src/wardic-config-value.ts"],"names":[],"mappings":"AAAA,kHAAkH;AAClH,aAAa;AACb,cAAc,yCAAyC,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A **Wardic instance**'s types (#516, ADR-0067 *Amendment (#516)*): what `createWardic(features)`
|
|
3
|
+
* returns, its `w` typed to those Features' props alone.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import type { WardConfig, WardFeatureConfigs } from "./config.ts";
|
|
8
|
+
import type { OwnPropsFor } from "./element.tsx";
|
|
9
|
+
import type { LayoutHooksFor, NamesEvery, PropFeatureNames } from "./feature.ts";
|
|
10
|
+
import type { createInstantLayoutTransition, createResetProjection, useAnimateLayout } from "./provider.tsx";
|
|
11
|
+
import type { W } from "./w.tsx";
|
|
12
|
+
/**
|
|
13
|
+
* What `createWardic(features)` returns for Features `F`: a `w` whose elements bring them wherever they
|
|
14
|
+
* render, and take their props alone. A prop of a Feature `F` lacks is typed `NeedsFeature<"name">`, so
|
|
15
|
+
* giving it is a type error that names the Feature. With `layout`, given at once or loaded, it has the
|
|
16
|
+
* layout hooks too. Its `w.li` below takes `layout` and `whileHover`; `<w.li drag />` would be an error
|
|
17
|
+
* naming `drag`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* export const { w } = createWardic([domAnimation, layout])
|
|
21
|
+
*
|
|
22
|
+
* <w.li layout whileHover={{ scale: 1.05 }} />
|
|
23
|
+
* @see https://wardic.dev/reference/solid/elements/wardic-instance
|
|
24
|
+
*/
|
|
25
|
+
export type WardicInstance<F> = {
|
|
26
|
+
readonly w: W<F>;
|
|
27
|
+
} & LayoutHooksFor<PropFeatureNames<F>, LayoutHooks>;
|
|
28
|
+
/** The layout hooks a Wardic instance with `layout` has, typed as the binding's own. */
|
|
29
|
+
interface LayoutHooks {
|
|
30
|
+
readonly useAnimateLayout: typeof useAnimateLayout;
|
|
31
|
+
readonly createInstantLayoutTransition: typeof createInstantLayoutTransition;
|
|
32
|
+
readonly createResetProjection: typeof createResetProjection;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The motion props of a Wardic instance with Features `F`: the base props and its Features', for a
|
|
36
|
+
* component that hands them on, to the instance's elements or to any with more Features. Another
|
|
37
|
+
* Feature's prop isn't one of them, so giving it is a type error, though not one that names the
|
|
38
|
+
* Feature. With every Feature, it's `WardConfig`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* const Card = (props: WardConfigOf<typeof domAnimation> & { title: string }) => <w.article {...props}>{props.title}</w.article>
|
|
42
|
+
* @see https://wardic.dev/reference/solid/elements/wardic-instance
|
|
43
|
+
*/
|
|
44
|
+
export type WardConfigOf<F> = NamesEvery<WardFeatureConfigs, PropFeatureNames<F>> extends true ? WardConfig : OwnPropsFor<PropFeatureNames<F>>;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=wardic-instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wardic-instance.d.ts","sourceRoot":"","sources":["../../src/wardic-instance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,KAAK,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAC5G,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,SAAS,CAAA;AAEhC;;;;;;;;;;;;GAYG;AAGH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAA;AAEvG,wFAAwF;AACxF,UAAU,WAAW;IACnB,QAAQ,CAAC,gBAAgB,EAAE,OAAO,gBAAgB,CAAA;IAClD,QAAQ,CAAC,6BAA6B,EAAE,OAAO,6BAA6B,CAAA;IAC5E,QAAQ,CAAC,qBAAqB,EAAE,OAAO,qBAAqB,CAAA;CAC7D;AAED;;;;;;;;;GASG;AAGH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,UAAU,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,UAAU,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wardic-instance.js","sourceRoot":"","sources":["../../src/wardic-instance.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wardic/solid",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Motion for React's API on Solid 1 and Solid 2: Wardic's elements, gestures, layout and presence animations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animation",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@solid-primitives/refs": "^1.1.3",
|
|
71
|
-
"@wardic/core": "1.
|
|
72
|
-
"@wardic/dom": "1.
|
|
71
|
+
"@wardic/core": "1.1.1",
|
|
72
|
+
"@wardic/dom": "1.1.1",
|
|
73
73
|
"csstype": "^3.1.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@solidjs/router-2": "npm:@solidjs/router@2.0.0-next.44",
|
|
92
92
|
"@solidjs/web": "2.0.0-rc.21",
|
|
93
93
|
"@types/babel__core": "^7.20.5",
|
|
94
|
-
"@wardic/test": "1.
|
|
94
|
+
"@wardic/test": "1.1.1",
|
|
95
95
|
"babel-preset-solid": "1.9.12",
|
|
96
96
|
"effect": "4.1.4",
|
|
97
97
|
"solid-js": "^1.9.18",
|
|
@@ -1,206 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* elements, which follow its calls.
|
|
5
|
-
*
|
|
6
|
-
* - **`start(definition, transitionOverride)`** sets each element's `animate` entry (a **Controls
|
|
7
|
-
* change**), so it Retargets, staggers its Variant children and lands as a change of the prop would.
|
|
8
|
-
* It resolves once each element and the Variant children it hands its names to have landed.
|
|
9
|
-
* - The override is the transition of that change: it beats the definition's own on the element and
|
|
10
|
-
* on each Variant child, and it is their orchestration (stagger, `when`), as Motion's
|
|
11
|
-
* `transitionOverride` is.
|
|
12
|
-
* - Their next Retarget, a gesture's, runs on their own transitions again.
|
|
13
|
-
* - **`set(definition)`** is an **Instant change**: the elements and their Variant children
|
|
14
|
-
* snap there, as Motion's `setValues` sets them.
|
|
15
|
-
* - **`stop()`** ends each element's running legs where they are.
|
|
16
|
-
*
|
|
17
|
-
* A function definition is called once per element, with its `custom`, values and velocities, as
|
|
18
|
-
* Motion's `controls.start((i) => …)`. An element hears the controls from its mount to its unmount.
|
|
19
|
-
*
|
|
20
|
-
* @module
|
|
21
|
-
*/
|
|
22
|
-
import * as Arr from "effect/Array"
|
|
23
|
-
import * as Bool from "effect/Boolean"
|
|
24
|
-
import * as Predicate from "effect/Predicate"
|
|
25
|
-
import * as UndefinedOr from "effect/UndefinedOr"
|
|
26
|
-
import type { WardConfig, WardicTransition, WardicVariant, WardicVariantLabels, WardicVariantResolver } from "./config.ts"
|
|
27
|
-
import type { Snapshot } from "./spine.ts"
|
|
28
|
-
|
|
29
|
-
/** What controls start or set an element to: a target, a variant name or a list of them, or a function of each element's `custom`. Motion's `AnimationDefinition`. */
|
|
30
|
-
export type WardicControlsDefinition = WardicVariant | WardicVariantLabels | WardicVariantResolver
|
|
31
|
-
|
|
32
|
-
/** The mark that tells controls from a target. */
|
|
33
|
-
const CONTROLS: unique symbol = Symbol("wardic.animationControls")
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* `createAnimationControls()`'s controls: give them as `animate={controls}`, and every element given
|
|
37
|
-
* them follows `start`, `set` and `stop`. Motion's `LegacyAnimationControls`.
|
|
38
|
-
*/
|
|
39
|
-
// #433.
|
|
40
|
-
export interface WardicAnimationControls {
|
|
41
|
-
readonly [CONTROLS]: true
|
|
42
|
-
/**
|
|
43
|
-
* Animates every element given these controls to `definition`, as a change of its `animate` would,
|
|
44
|
-
* its variant children following. `transitionOverride`, when given, is the transition of this change,
|
|
45
|
-
* over the definition's own, and its stagger. Resolves once each element and its children have landed.
|
|
46
|
-
*/
|
|
47
|
-
readonly start: (definition: WardicControlsDefinition, transitionOverride?: WardicTransition) => Promise<void>
|
|
48
|
-
/** Sets every element given these controls, and its variant children, at `definition` at once. */
|
|
49
|
-
readonly set: (definition: WardicControlsDefinition) => void
|
|
50
|
-
/** Ends every element's running animation where it is. */
|
|
51
|
-
readonly stop: () => void
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* A **Controls change** (#433): what one `start` or `set` set one element's `animate` entry to, the
|
|
56
|
-
* transition it runs on, and the landings it waits for. The element and each Variant child it reaches
|
|
57
|
-
* join it at the Retarget it makes them run, and leave at that one's landing (or the next's).
|
|
58
|
-
*/
|
|
59
|
-
export interface ControlsChange {
|
|
60
|
-
/** Its place among every change: a trigger key part, so a change is a trigger even to the same name. */
|
|
61
|
-
readonly serial: number
|
|
62
|
-
/** The element's `animate` entry: a target or a name, a resolver already called. */
|
|
63
|
-
readonly definition: WardicVariant | WardicVariantLabels
|
|
64
|
-
/** The transition of the change (start's override, set's instant one), or none: the element's own. */
|
|
65
|
-
readonly override: WardicTransition | undefined
|
|
66
|
-
/** Elements in it that haven't landed. */
|
|
67
|
-
pending: number
|
|
68
|
-
/** Whether every element it reaches has had its chance to join: its binding's flush has run. */
|
|
69
|
-
armed: boolean
|
|
70
|
-
/** Told once it has landed. */
|
|
71
|
-
readonly landed: () => void
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/** What a controlled element does at a change, as its binding wires it: its entry set, and the change's landing promised. */
|
|
75
|
-
export interface Controlled {
|
|
76
|
-
readonly change: (definition: WardicControlsDefinition, override: WardicTransition | undefined) => Promise<void>
|
|
77
|
-
readonly stop: () => void
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** The elements each controls reach, by the controls. */
|
|
81
|
-
// Module state (#460, Q7): each controls object's subscribers, held weakly by it.
|
|
82
|
-
const subscribers = new WeakMap<WardicAnimationControls, Set<Controlled>>()
|
|
83
|
-
|
|
84
|
-
/** `set`'s transition (#433, Motion's `setValues`): none to speak of, and no orchestration. */
|
|
85
|
-
export const INSTANT: WardicTransition = { type: "tween", duration: 0 }
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Makes animation controls, which animate elements from code by their variants or targets: give them
|
|
89
|
-
* to each element as `animate={controls}`, on a `w.*` element, in a ward's config or on a
|
|
90
|
-
* `Reorder.Item`, then `start`, `set` or `stop` them. Needs no owner. Motion's `useAnimationControls`.
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* const controls = createAnimationControls()
|
|
94
|
-
* <w.ul initial="hidden" animate={controls} variants={list}>…</w.ul>
|
|
95
|
-
* await controls.start("visible")
|
|
96
|
-
* @see https://wardic.dev/reference/solid/animation/create-animation-controls
|
|
97
|
-
*/
|
|
98
|
-
// #433's PR 3: each `start` or `set` is a Controls change of each element's `animate` entry.
|
|
99
|
-
export const createAnimationControls = (): WardicAnimationControls => {
|
|
100
|
-
const reached = new Set<Controlled>()
|
|
101
|
-
const controls: WardicAnimationControls = {
|
|
102
|
-
[CONTROLS]: true,
|
|
103
|
-
start: (definition, transitionOverride) =>
|
|
104
|
-
Promise.all(Arr.map(Arr.fromIterable(reached), (element) => element.change(definition, transitionOverride))).then(() => undefined),
|
|
105
|
-
set: (definition) =>
|
|
106
|
-
reached.forEach((element) => {
|
|
107
|
-
void element.change(definition, INSTANT)
|
|
108
|
-
}),
|
|
109
|
-
stop: () => reached.forEach((element) => element.stop()),
|
|
110
|
-
}
|
|
111
|
-
subscribers.set(controls, reached)
|
|
112
|
-
return controls
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/** Whether `u` is **Animation controls** (Motion's `isAnimationControls`). */
|
|
116
|
-
export const isAnimationControls = (u: unknown): u is WardicAnimationControls => Predicate.hasProperty(u, CONTROLS)
|
|
117
|
-
|
|
118
|
-
/** Reach `element` from `controls`, until the returned function: its mount to its unmount. */
|
|
119
|
-
export const subscribe = (controls: WardicAnimationControls, element: Controlled): (() => void) => {
|
|
120
|
-
const reached = subscribers.get(controls)
|
|
121
|
-
if (Predicate.isUndefined(reached)) return () => undefined
|
|
122
|
-
reached.add(element)
|
|
123
|
-
return () => {
|
|
124
|
-
reached.delete(element)
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/** The changes made, counted. */
|
|
129
|
-
// Module state (#460, Q7): an id counter, only compared for order and identity.
|
|
130
|
-
let serials = 0
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* A change of one element (#433): its entry, `definition` called with the element's `custom`, values
|
|
134
|
-
* and velocities when it's a resolver (once, as Motion's), on `override`; and its landing, promised. It
|
|
135
|
-
* lands once every element it reaches has joined, at the end of the binding's flush (`armed`), and
|
|
136
|
-
* left. One that reaches no element lands then.
|
|
137
|
-
*/
|
|
138
|
-
export const changeOf = (
|
|
139
|
-
definition: WardicControlsDefinition,
|
|
140
|
-
override: WardicTransition | undefined,
|
|
141
|
-
custom: unknown,
|
|
142
|
-
values: Readonly<Record<string, number | string>>,
|
|
143
|
-
velocities: Readonly<Record<string, number>>,
|
|
144
|
-
): { readonly change: ControlsChange; readonly landing: Promise<void> } => {
|
|
145
|
-
let resolve!: () => void
|
|
146
|
-
const landing = new Promise<void>((done) => {
|
|
147
|
-
resolve = done
|
|
148
|
-
})
|
|
149
|
-
const entry = Bool.match(Predicate.isFunction(definition), {
|
|
150
|
-
onTrue: () => (definition as WardicVariantResolver)(custom, { ...values }, { ...velocities }),
|
|
151
|
-
onFalse: () => definition as WardicVariant | WardicVariantLabels,
|
|
152
|
-
})
|
|
153
|
-
const change: ControlsChange = { serial: ++serials, definition: entry, override, pending: 0, armed: false, landed: resolve }
|
|
154
|
-
return { change, landing }
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/** An element joins `change`: it runs a Retarget for it. */
|
|
158
|
-
export const join = (change: ControlsChange): void => {
|
|
159
|
-
change.pending++
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/** An element in `change` landed, or left it (a later change, its unmount): it lands once none is left and it's armed. */
|
|
163
|
-
export const leave = (change: ControlsChange): void => {
|
|
164
|
-
change.pending--
|
|
165
|
-
if (change.armed && change.pending <= 0) change.landed()
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/** `change` armed, its binding's flush having run: it lands now if no element joined, or all have left. */
|
|
169
|
-
export const arm = (change: ControlsChange): void => {
|
|
170
|
-
change.armed = true
|
|
171
|
-
if (change.pending <= 0) change.landed()
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* An element's config with **Animation controls** for its `animate` (#433), as everything but its
|
|
176
|
-
* controls reads it: `change`'s entry (none before the first), and marked controlled, so it names its
|
|
177
|
-
* own variants whatever the entry is (Motion's `isControllingVariants`).
|
|
178
|
-
*/
|
|
179
|
-
export const controlledConfigOf = <C extends Pick<WardConfig, "animate">>(config: C, change: ControlsChange | undefined): C =>
|
|
180
|
-
({ ...config, animate: UndefinedOr.map(change, (c) => c.definition), controlled: true }) as C
|
|
181
|
-
|
|
182
|
-
/** A config as a server reads it (#433): one given **Animation controls** has no entry yet, and is controlled. */
|
|
183
|
-
export const uncontrolledOf = <C extends Pick<WardConfig, "animate">>(config: C): C =>
|
|
184
|
-
Bool.match(isAnimationControls(config.animate), { onTrue: () => controlledConfigOf(config, undefined), onFalse: () => config })
|
|
185
|
-
|
|
186
|
-
/** What a controlled element reads at a change: its `custom`, and its values and velocities now (its Snapshot). */
|
|
187
|
-
export interface ControlledState {
|
|
188
|
-
readonly custom: () => unknown
|
|
189
|
-
/** Its Snapshot: its values, and its velocities now (#663), a spring leg's being on its Frame. */
|
|
190
|
-
readonly snapshot: Snapshot
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* A mounted element as its controls reach it (#433): a change sets its entry through `setChange`, its
|
|
195
|
-
* binding's signal, and arms once the binding's flush has run (a microtask after, Solid 2's included),
|
|
196
|
-
* every element it reaches joined by then; `stop` ends its legs.
|
|
197
|
-
*/
|
|
198
|
-
export const controlledElement = (setChange: (change: ControlsChange) => void, state: ControlledState, stop: () => void): Controlled => ({
|
|
199
|
-
change: (definition, override) => {
|
|
200
|
-
const made = changeOf(definition, override, state.custom(), state.snapshot.values, state.snapshot.velocitiesNow(state.snapshot))
|
|
201
|
-
setChange(made.change)
|
|
202
|
-
queueMicrotask(() => arm(made.change))
|
|
203
|
-
return made.landing
|
|
204
|
-
},
|
|
205
|
-
stop,
|
|
206
|
-
})
|
|
1
|
+
// #672: @wardic/core/unstable/AnimationControls since the lift; solid's modules import it through here until
|
|
2
|
+
// each has moved.
|
|
3
|
+
export * from "@wardic/core/unstable/AnimationControls"
|