@wardic/solid 1.0.0-rc.9 → 1.0.0
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/dist/browser/appear.js +20 -3
- package/dist/browser/appear.js.map +1 -1
- package/dist/browser/batch-appear-here.js +29 -0
- package/dist/browser/batch-appear-here.js.map +1 -0
- package/dist/browser/batch-gestures.js +174 -0
- package/dist/browser/batch-gestures.js.map +1 -0
- package/dist/browser/batch-handoff.js +72 -0
- package/dist/browser/batch-handoff.js.map +1 -0
- package/dist/browser/batch-reorder-group.js +345 -0
- package/dist/browser/batch-reorder-group.js.map +1 -0
- package/dist/browser/batch-reorder-places.js +207 -0
- package/dist/browser/batch-reorder-places.js.map +1 -0
- package/dist/browser/batch-reorder.js +641 -0
- package/dist/browser/batch-reorder.js.map +1 -0
- package/dist/browser/batch.js +2512 -0
- package/dist/browser/batch.js.map +1 -0
- package/dist/browser/bridge.js.map +1 -1
- package/dist/browser/complete.js.map +1 -1
- package/dist/browser/create-animate.js.map +1 -1
- package/dist/browser/create-batch.js +120 -0
- package/dist/browser/create-batch.js.map +1 -0
- package/dist/browser/create-ward.js +4 -2
- package/dist/browser/create-ward.js.map +1 -1
- package/dist/browser/directive.js.map +1 -1
- package/dist/browser/drag-sensor.js.map +1 -1
- package/dist/browser/drag-track.js +13 -3
- package/dist/browser/drag-track.js.map +1 -1
- package/dist/browser/drag.js.map +1 -1
- package/dist/browser/focus-sensor.js.map +1 -1
- package/dist/browser/hover-sensor.js.map +1 -1
- package/dist/browser/imperative.js +89 -5
- 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/layout-member.js +4 -0
- package/dist/browser/layout-member.js.map +1 -1
- package/dist/browser/layout-projection.js.map +1 -1
- package/dist/browser/layout.js.map +1 -1
- package/dist/browser/lazy-batch-gestures.js +64 -0
- package/dist/browser/lazy-batch-gestures.js.map +1 -0
- package/dist/browser/live-scroll.js.map +1 -1
- package/dist/browser/live-value.js.map +1 -1
- package/dist/browser/member-hold.js +181 -0
- package/dist/browser/member-hold.js.map +1 -0
- package/dist/browser/presence-controller.js +53 -7
- package/dist/browser/presence-controller.js.map +1 -1
- package/dist/browser/presence-record.js.map +1 -1
- package/dist/browser/press-sensor.js.map +1 -1
- package/dist/browser/press.js +2 -2
- package/dist/browser/press.js.map +1 -1
- package/dist/browser/reorder-input.js +73 -2
- package/dist/browser/reorder-input.js.map +1 -1
- package/dist/browser/reorder-values.js +20 -0
- package/dist/browser/reorder-values.js.map +1 -0
- package/dist/browser/reorder.js +13 -6
- package/dist/browser/reorder.js.map +1 -1
- package/dist/browser/sensors.js.map +1 -1
- package/dist/browser/spine.js +89 -8
- package/dist/browser/spine.js.map +1 -1
- package/dist/browser/unstable/v2/batch-appear-here.js +28 -0
- package/dist/browser/unstable/v2/batch-appear-here.js.map +1 -0
- package/dist/browser/unstable/v2/batch-reorder-group.js +267 -0
- package/dist/browser/unstable/v2/batch-reorder-group.js.map +1 -0
- package/dist/browser/unstable/v2/bridge.js.map +1 -1
- package/dist/browser/unstable/v2/complete.js.map +1 -1
- package/dist/browser/unstable/v2/create-animate.js +11 -46
- package/dist/browser/unstable/v2/create-animate.js.map +1 -1
- package/dist/browser/unstable/v2/create-batch.js +144 -0
- package/dist/browser/unstable/v2/create-batch.js.map +1 -0
- package/dist/browser/unstable/v2/drag-sensor.js.map +1 -1
- package/dist/browser/unstable/v2/element.js +4 -2
- package/dist/browser/unstable/v2/element.js.map +1 -1
- package/dist/browser/unstable/v2/flights.js +57 -0
- package/dist/browser/unstable/v2/flights.js.map +1 -0
- package/dist/browser/unstable/v2/focus-sensor.js.map +1 -1
- package/dist/browser/unstable/v2/hover-sensor.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/layout-projection.js.map +1 -1
- package/dist/browser/unstable/v2/layout.js.map +1 -1
- package/dist/browser/unstable/v2/live-scroll.js.map +1 -1
- package/dist/browser/unstable/v2/live-value.js.map +1 -1
- package/dist/browser/unstable/v2/presence-hooks.js.map +1 -1
- package/dist/browser/unstable/v2/press-sensor.js.map +1 -1
- package/dist/browser/unstable/v2/reorder.js +14 -6
- package/dist/browser/unstable/v2/reorder.js.map +1 -1
- package/dist/browser/unstable/v2/sensors.js.map +1 -1
- package/dist/browser/unstable/v2/ward.js +4 -2
- package/dist/browser/unstable/v2/ward.js.map +1 -1
- package/dist/browser/unstable/v2/wardic.js.map +1 -1
- package/dist/browser/w.js.map +1 -1
- package/dist/browser/wardic.js.map +1 -1
- package/dist/server/appear.js +20 -3
- package/dist/server/appear.js.map +1 -1
- package/dist/server/batch-appear-here.js +29 -0
- package/dist/server/batch-appear-here.js.map +1 -0
- package/dist/server/batch-gestures.js +174 -0
- package/dist/server/batch-gestures.js.map +1 -0
- package/dist/server/batch-handoff.js +72 -0
- package/dist/server/batch-handoff.js.map +1 -0
- package/dist/server/batch-reorder-group.js +341 -0
- package/dist/server/batch-reorder-group.js.map +1 -0
- package/dist/server/batch-reorder-places.js +207 -0
- package/dist/server/batch-reorder-places.js.map +1 -0
- package/dist/server/batch-reorder.js +641 -0
- package/dist/server/batch-reorder.js.map +1 -0
- package/dist/server/batch.js +2512 -0
- package/dist/server/batch.js.map +1 -0
- package/dist/server/bridge.js.map +1 -1
- package/dist/server/complete.js.map +1 -1
- package/dist/server/create-animate.js.map +1 -1
- package/dist/server/create-batch.js +120 -0
- package/dist/server/create-batch.js.map +1 -0
- package/dist/server/create-ward.js +4 -2
- package/dist/server/create-ward.js.map +1 -1
- package/dist/server/directive.js.map +1 -1
- package/dist/server/drag-sensor.js.map +1 -1
- package/dist/server/drag-track.js +13 -3
- package/dist/server/drag-track.js.map +1 -1
- package/dist/server/drag.js.map +1 -1
- package/dist/server/focus-sensor.js.map +1 -1
- package/dist/server/hover-sensor.js.map +1 -1
- package/dist/server/imperative.js +89 -5
- 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/layout-member.js +4 -0
- package/dist/server/layout-member.js.map +1 -1
- package/dist/server/layout-projection.js.map +1 -1
- package/dist/server/layout.js.map +1 -1
- package/dist/server/lazy-batch-gestures.js +64 -0
- package/dist/server/lazy-batch-gestures.js.map +1 -0
- package/dist/server/live-scroll.js.map +1 -1
- package/dist/server/live-value.js.map +1 -1
- package/dist/server/member-hold.js +181 -0
- package/dist/server/member-hold.js.map +1 -0
- package/dist/server/presence-controller.js +53 -7
- package/dist/server/presence-controller.js.map +1 -1
- package/dist/server/presence-record.js.map +1 -1
- package/dist/server/press-sensor.js.map +1 -1
- package/dist/server/press.js +2 -2
- package/dist/server/press.js.map +1 -1
- package/dist/server/reorder-input.js +73 -2
- package/dist/server/reorder-input.js.map +1 -1
- package/dist/server/reorder-values.js +20 -0
- package/dist/server/reorder-values.js.map +1 -0
- package/dist/server/reorder.js +13 -6
- package/dist/server/reorder.js.map +1 -1
- package/dist/server/sensors.js.map +1 -1
- package/dist/server/spine.js +89 -8
- package/dist/server/spine.js.map +1 -1
- package/dist/server/unstable/v2/batch-appear-here.js +28 -0
- package/dist/server/unstable/v2/batch-appear-here.js.map +1 -0
- package/dist/server/unstable/v2/batch-reorder-group.js +378 -0
- package/dist/server/unstable/v2/batch-reorder-group.js.map +1 -0
- package/dist/server/unstable/v2/bridge.js.map +1 -1
- package/dist/server/unstable/v2/complete.js.map +1 -1
- package/dist/server/unstable/v2/create-animate.js +11 -46
- package/dist/server/unstable/v2/create-animate.js.map +1 -1
- package/dist/server/unstable/v2/create-batch.js +144 -0
- package/dist/server/unstable/v2/create-batch.js.map +1 -0
- package/dist/server/unstable/v2/drag-sensor.js.map +1 -1
- package/dist/server/unstable/v2/element.js +4 -2
- package/dist/server/unstable/v2/element.js.map +1 -1
- package/dist/server/unstable/v2/flights.js +57 -0
- package/dist/server/unstable/v2/flights.js.map +1 -0
- package/dist/server/unstable/v2/focus-sensor.js.map +1 -1
- package/dist/server/unstable/v2/hover-sensor.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/layout-projection.js.map +1 -1
- package/dist/server/unstable/v2/layout.js.map +1 -1
- package/dist/server/unstable/v2/live-scroll.js.map +1 -1
- package/dist/server/unstable/v2/live-value.js.map +1 -1
- package/dist/server/unstable/v2/presence-hooks.js.map +1 -1
- package/dist/server/unstable/v2/press-sensor.js.map +1 -1
- package/dist/server/unstable/v2/reorder.js +14 -6
- package/dist/server/unstable/v2/reorder.js.map +1 -1
- package/dist/server/unstable/v2/sensors.js.map +1 -1
- package/dist/server/unstable/v2/ward.js +4 -2
- package/dist/server/unstable/v2/ward.js.map +1 -1
- package/dist/server/unstable/v2/wardic.js.map +1 -1
- package/dist/server/w.js.map +1 -1
- package/dist/server/wardic.js.map +1 -1
- package/dist/solid/appear.d.ts +14 -0
- package/dist/solid/appear.d.ts.map +1 -1
- package/dist/solid/appear.js +14 -3
- package/dist/solid/appear.js.map +1 -1
- package/dist/solid/batch-appear-here.d.ts +9 -0
- package/dist/solid/batch-appear-here.d.ts.map +1 -0
- package/dist/solid/batch-appear-here.jsx +25 -0
- package/dist/solid/batch-appear-here.jsx.map +1 -0
- package/dist/solid/batch-gestures.d.ts +22 -0
- package/dist/solid/batch-gestures.d.ts.map +1 -0
- package/dist/solid/batch-gestures.js +138 -0
- package/dist/solid/batch-gestures.js.map +1 -0
- package/dist/solid/batch-handoff.d.ts +25 -0
- package/dist/solid/batch-handoff.d.ts.map +1 -0
- package/dist/solid/batch-handoff.js +75 -0
- package/dist/solid/batch-handoff.js.map +1 -0
- package/dist/solid/batch-reorder-group.d.ts +118 -0
- package/dist/solid/batch-reorder-group.d.ts.map +1 -0
- package/dist/solid/batch-reorder-group.jsx +271 -0
- package/dist/solid/batch-reorder-group.jsx.map +1 -0
- package/dist/solid/batch-reorder-places.d.ts +115 -0
- package/dist/solid/batch-reorder-places.d.ts.map +1 -0
- package/dist/solid/batch-reorder-places.js +139 -0
- package/dist/solid/batch-reorder-places.js.map +1 -0
- package/dist/solid/batch-reorder.d.ts +115 -0
- package/dist/solid/batch-reorder.d.ts.map +1 -0
- package/dist/solid/batch-reorder.js +579 -0
- package/dist/solid/batch-reorder.js.map +1 -0
- package/dist/solid/batch.d.ts +512 -0
- package/dist/solid/batch.d.ts.map +1 -0
- package/dist/solid/batch.js +2485 -0
- package/dist/solid/batch.js.map +1 -0
- package/dist/solid/bridge.d.ts.map +1 -1
- package/dist/solid/{bridge.js → bridge.jsx} +1 -1
- package/dist/solid/bridge.jsx.map +1 -0
- package/dist/solid/complete.d.ts.map +1 -1
- package/dist/solid/{complete.js → complete.jsx} +1 -1
- package/dist/solid/complete.jsx.map +1 -0
- package/dist/solid/create-animate.d.ts.map +1 -1
- package/dist/solid/{create-animate.js → create-animate.jsx} +1 -1
- package/dist/solid/create-animate.jsx.map +1 -0
- package/dist/solid/create-batch.d.ts +94 -0
- package/dist/solid/create-batch.d.ts.map +1 -0
- package/dist/solid/create-batch.jsx +109 -0
- package/dist/solid/create-batch.jsx.map +1 -0
- package/dist/solid/create-ward.d.ts.map +1 -1
- package/dist/solid/create-ward.jsx +7 -5
- package/dist/solid/create-ward.jsx.map +1 -1
- package/dist/solid/directive.d.ts.map +1 -1
- package/dist/solid/{directive.js → directive.jsx} +1 -1
- package/dist/solid/directive.jsx.map +1 -0
- package/dist/solid/drag-sensor.d.ts.map +1 -1
- package/dist/solid/{drag-sensor.js → drag-sensor.jsx} +2 -2
- package/dist/solid/drag-sensor.jsx.map +1 -0
- package/dist/solid/drag-track.d.ts +6 -0
- package/dist/solid/drag-track.d.ts.map +1 -1
- package/dist/solid/drag-track.js +14 -3
- package/dist/solid/drag-track.js.map +1 -1
- package/dist/solid/drag.d.ts.map +1 -1
- package/dist/solid/{drag.js → drag.jsx} +1 -1
- package/dist/solid/drag.jsx.map +1 -0
- package/dist/solid/focus-sensor.d.ts.map +1 -1
- package/dist/solid/{focus-sensor.js → focus-sensor.jsx} +2 -2
- package/dist/solid/focus-sensor.jsx.map +1 -0
- package/dist/solid/hover-sensor.d.ts.map +1 -1
- package/dist/solid/{hover-sensor.js → hover-sensor.jsx} +2 -2
- package/dist/solid/hover-sensor.jsx.map +1 -0
- package/dist/solid/imperative.d.ts +10 -2
- package/dist/solid/imperative.d.ts.map +1 -1
- package/dist/solid/imperative.js +79 -4
- package/dist/solid/imperative.js.map +1 -1
- package/dist/solid/index.d.ts +15 -14
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/{index.js → index.jsx} +14 -13
- package/dist/solid/index.jsx.map +1 -0
- package/dist/solid/layout-member.d.ts.map +1 -1
- package/dist/solid/layout-member.js +4 -0
- package/dist/solid/layout-member.js.map +1 -1
- package/dist/solid/layout-projection.d.ts.map +1 -1
- package/dist/solid/{layout-projection.js → layout-projection.jsx} +1 -1
- package/dist/solid/layout-projection.jsx.map +1 -0
- package/dist/solid/layout.jsx +1 -1
- package/dist/solid/layout.jsx.map +1 -1
- package/dist/solid/lazy-batch-gestures.d.ts +13 -0
- package/dist/solid/lazy-batch-gestures.d.ts.map +1 -0
- package/dist/solid/lazy-batch-gestures.js +70 -0
- package/dist/solid/lazy-batch-gestures.js.map +1 -0
- package/dist/solid/live-scroll.d.ts.map +1 -1
- package/dist/solid/{live-scroll.js → live-scroll.jsx} +2 -2
- package/dist/solid/live-scroll.jsx.map +1 -0
- package/dist/solid/live-value.d.ts.map +1 -1
- package/dist/solid/{live-value.js → live-value.jsx} +2 -2
- package/dist/solid/live-value.jsx.map +1 -0
- package/dist/solid/member-hold.d.ts +47 -0
- package/dist/solid/member-hold.d.ts.map +1 -0
- package/dist/solid/member-hold.js +189 -0
- package/dist/solid/member-hold.js.map +1 -0
- package/dist/solid/presence-controller.d.ts.map +1 -1
- package/dist/solid/presence-controller.js +56 -5
- package/dist/solid/presence-controller.js.map +1 -1
- package/dist/solid/presence-record.d.ts +8 -2
- package/dist/solid/presence-record.d.ts.map +1 -1
- package/dist/solid/presence-record.js.map +1 -1
- package/dist/solid/press-sensor.d.ts.map +1 -1
- package/dist/solid/{press-sensor.js → press-sensor.jsx} +2 -2
- package/dist/solid/press-sensor.jsx.map +1 -0
- package/dist/solid/press.js +2 -2
- package/dist/solid/press.js.map +1 -1
- package/dist/solid/reorder-input.d.ts +22 -1
- package/dist/solid/reorder-input.d.ts.map +1 -1
- package/dist/solid/reorder-input.js +70 -2
- package/dist/solid/reorder-input.js.map +1 -1
- package/dist/solid/reorder-values.d.ts +6 -0
- package/dist/solid/reorder-values.d.ts.map +1 -0
- package/dist/solid/reorder-values.js +21 -0
- package/dist/solid/reorder-values.js.map +1 -0
- package/dist/solid/reorder.d.ts +8 -4
- package/dist/solid/reorder.d.ts.map +1 -1
- package/dist/solid/reorder.jsx +12 -7
- package/dist/solid/reorder.jsx.map +1 -1
- package/dist/solid/sensors.d.ts.map +1 -1
- package/dist/solid/{sensors.js → sensors.jsx} +2 -2
- package/dist/solid/sensors.jsx.map +1 -0
- package/dist/solid/spine.d.ts +8 -2
- package/dist/solid/spine.d.ts.map +1 -1
- package/dist/solid/spine.js +104 -10
- package/dist/solid/spine.js.map +1 -1
- package/dist/solid/unstable/v2/batch-appear-here.d.ts +9 -0
- package/dist/solid/unstable/v2/batch-appear-here.d.ts.map +1 -0
- package/dist/solid/unstable/v2/batch-appear-here.jsx +24 -0
- package/dist/solid/unstable/v2/batch-appear-here.jsx.map +1 -0
- package/dist/solid/unstable/v2/batch-reorder-group.d.ts +119 -0
- package/dist/solid/unstable/v2/batch-reorder-group.d.ts.map +1 -0
- package/dist/solid/unstable/v2/batch-reorder-group.jsx +211 -0
- package/dist/solid/unstable/v2/batch-reorder-group.jsx.map +1 -0
- package/dist/solid/unstable/v2/bridge.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{bridge.js → bridge.jsx} +1 -1
- package/dist/solid/unstable/v2/bridge.jsx.map +1 -0
- package/dist/solid/unstable/v2/complete.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{complete.js → complete.jsx} +1 -1
- package/dist/solid/unstable/v2/complete.jsx.map +1 -0
- package/dist/solid/unstable/v2/create-animate.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{create-animate.js → create-animate.jsx} +8 -52
- package/dist/solid/unstable/v2/create-animate.jsx.map +1 -0
- package/dist/solid/unstable/v2/create-batch.d.ts +106 -0
- package/dist/solid/unstable/v2/create-batch.d.ts.map +1 -0
- package/dist/solid/unstable/v2/create-batch.jsx +135 -0
- package/dist/solid/unstable/v2/create-batch.jsx.map +1 -0
- package/dist/solid/unstable/v2/drag-sensor.d.ts +1 -1
- package/dist/solid/unstable/v2/drag-sensor.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{drag-sensor.js → drag-sensor.jsx} +2 -2
- package/dist/solid/unstable/v2/drag-sensor.jsx.map +1 -0
- package/dist/solid/unstable/v2/element.d.ts.map +1 -1
- package/dist/solid/unstable/v2/element.jsx +4 -2
- package/dist/solid/unstable/v2/element.jsx.map +1 -1
- package/dist/solid/unstable/v2/flights.d.ts +10 -0
- package/dist/solid/unstable/v2/flights.d.ts.map +1 -0
- package/dist/solid/unstable/v2/flights.js +63 -0
- package/dist/solid/unstable/v2/flights.js.map +1 -0
- package/dist/solid/unstable/v2/focus-sensor.d.ts +1 -1
- package/dist/solid/unstable/v2/focus-sensor.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{focus-sensor.js → focus-sensor.jsx} +2 -2
- package/dist/solid/unstable/v2/focus-sensor.jsx.map +1 -0
- package/dist/solid/unstable/v2/hover-sensor.d.ts +1 -1
- package/dist/solid/unstable/v2/hover-sensor.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{hover-sensor.js → hover-sensor.jsx} +2 -2
- package/dist/solid/unstable/v2/hover-sensor.jsx.map +1 -0
- package/dist/solid/unstable/v2/index.d.ts +14 -13
- package/dist/solid/unstable/v2/index.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{index.js → index.jsx} +13 -12
- package/dist/solid/unstable/v2/index.jsx.map +1 -0
- package/dist/solid/unstable/v2/layout-projection.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{layout-projection.js → layout-projection.jsx} +1 -1
- package/dist/solid/unstable/v2/layout-projection.jsx.map +1 -0
- package/dist/solid/unstable/v2/layout.jsx +1 -1
- package/dist/solid/unstable/v2/layout.jsx.map +1 -1
- package/dist/solid/unstable/v2/live-scroll.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{live-scroll.js → live-scroll.jsx} +3 -3
- package/dist/solid/unstable/v2/live-scroll.jsx.map +1 -0
- package/dist/solid/unstable/v2/live-value.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{live-value.js → live-value.jsx} +2 -2
- package/dist/solid/unstable/v2/live-value.jsx.map +1 -0
- package/dist/solid/unstable/v2/presence-hooks.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{presence-hooks.js → presence-hooks.jsx} +1 -1
- package/dist/solid/unstable/v2/presence-hooks.jsx.map +1 -0
- package/dist/solid/unstable/v2/press-sensor.d.ts +1 -1
- package/dist/solid/unstable/v2/press-sensor.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{press-sensor.js → press-sensor.jsx} +2 -2
- package/dist/solid/unstable/v2/press-sensor.jsx.map +1 -0
- package/dist/solid/unstable/v2/reorder.d.ts +7 -3
- package/dist/solid/unstable/v2/reorder.d.ts.map +1 -1
- package/dist/solid/unstable/v2/reorder.jsx +13 -7
- package/dist/solid/unstable/v2/reorder.jsx.map +1 -1
- package/dist/solid/unstable/v2/sensors.d.ts.map +1 -1
- package/dist/solid/unstable/v2/{sensors.js → sensors.jsx} +2 -2
- package/dist/solid/unstable/v2/sensors.jsx.map +1 -0
- package/dist/solid/unstable/v2/ward.d.ts.map +1 -1
- package/dist/solid/unstable/v2/ward.jsx +5 -3
- package/dist/solid/unstable/v2/ward.jsx.map +1 -1
- package/dist/solid/unstable/v2/wardic.jsx +1 -1
- package/dist/solid/unstable/v2/wardic.jsx.map +1 -1
- package/dist/solid/w.jsx +1 -1
- package/dist/solid/w.jsx.map +1 -1
- package/dist/solid/wardic.jsx +2 -2
- package/dist/solid/wardic.jsx.map +1 -1
- package/package.json +17 -17
- package/src/appear.ts +23 -3
- package/src/batch-appear-here.tsx +25 -0
- package/src/batch-gestures.ts +159 -0
- package/src/batch-handoff.ts +87 -0
- package/src/batch-reorder-group.tsx +497 -0
- package/src/batch-reorder-places.ts +257 -0
- package/src/batch-reorder.ts +764 -0
- package/src/batch.ts +3078 -0
- package/src/{bridge.ts → bridge.tsx} +3 -3
- package/src/create-batch.tsx +219 -0
- package/src/create-ward.tsx +7 -4
- package/src/{drag-sensor.ts → drag-sensor.tsx} +1 -1
- package/src/drag-track.ts +21 -3
- package/src/{focus-sensor.ts → focus-sensor.tsx} +1 -1
- package/src/{hover-sensor.ts → hover-sensor.tsx} +1 -1
- package/src/imperative.ts +112 -11
- package/src/{index.ts → index.tsx} +37 -12
- package/src/layout-member.ts +4 -0
- package/src/layout.tsx +1 -1
- package/src/lazy-batch-gestures.ts +78 -0
- package/src/{live-scroll.ts → live-scroll.tsx} +1 -1
- package/src/{live-value.ts → live-value.tsx} +5 -5
- package/src/member-hold.ts +222 -0
- package/src/presence-controller.ts +52 -5
- package/src/presence-record.ts +9 -2
- package/src/{press-sensor.ts → press-sensor.tsx} +1 -1
- package/src/press.ts +2 -2
- package/src/reorder-input.ts +91 -4
- package/src/reorder-values.ts +20 -0
- package/src/reorder.tsx +16 -8
- package/src/{sensors.ts → sensors.tsx} +1 -1
- package/src/spine.ts +88 -3
- package/src/unstable/v2/batch-appear-here.tsx +24 -0
- package/src/unstable/v2/batch-reorder-group.tsx +385 -0
- package/src/unstable/v2/{bridge.ts → bridge.tsx} +3 -3
- package/src/unstable/v2/{create-animate.ts → create-animate.tsx} +7 -45
- package/src/unstable/v2/create-batch.tsx +265 -0
- package/src/unstable/v2/{drag-sensor.ts → drag-sensor.tsx} +1 -1
- package/src/unstable/v2/element.tsx +4 -2
- package/src/unstable/v2/flights.ts +65 -0
- package/src/unstable/v2/{focus-sensor.ts → focus-sensor.tsx} +1 -1
- package/src/unstable/v2/{hover-sensor.ts → hover-sensor.tsx} +1 -1
- package/src/unstable/v2/{index.ts → index.tsx} +40 -11
- package/src/unstable/v2/layout.tsx +1 -1
- package/src/unstable/v2/{live-scroll.ts → live-scroll.tsx} +2 -2
- package/src/unstable/v2/{live-value.ts → live-value.tsx} +5 -5
- package/src/unstable/v2/{press-sensor.ts → press-sensor.tsx} +1 -1
- package/src/unstable/v2/reorder.tsx +16 -8
- package/src/unstable/v2/{sensors.ts → sensors.tsx} +2 -2
- package/src/unstable/v2/ward.tsx +5 -2
- package/src/unstable/v2/wardic.tsx +1 -1
- package/src/w.tsx +1 -1
- package/src/wardic.tsx +2 -2
- package/dist/solid/bridge.js.map +0 -1
- package/dist/solid/complete.js.map +0 -1
- package/dist/solid/create-animate.js.map +0 -1
- package/dist/solid/directive.js.map +0 -1
- package/dist/solid/drag-sensor.js.map +0 -1
- package/dist/solid/drag.js.map +0 -1
- package/dist/solid/focus-sensor.js.map +0 -1
- package/dist/solid/hover-sensor.js.map +0 -1
- package/dist/solid/index.js.map +0 -1
- package/dist/solid/layout-projection.js.map +0 -1
- package/dist/solid/live-scroll.js.map +0 -1
- package/dist/solid/live-value.js.map +0 -1
- package/dist/solid/press-sensor.js.map +0 -1
- package/dist/solid/sensors.js.map +0 -1
- package/dist/solid/unstable/v2/bridge.js.map +0 -1
- package/dist/solid/unstable/v2/complete.js.map +0 -1
- package/dist/solid/unstable/v2/create-animate.js.map +0 -1
- package/dist/solid/unstable/v2/drag-sensor.js.map +0 -1
- package/dist/solid/unstable/v2/focus-sensor.js.map +0 -1
- package/dist/solid/unstable/v2/hover-sensor.js.map +0 -1
- package/dist/solid/unstable/v2/index.js.map +0 -1
- package/dist/solid/unstable/v2/layout-projection.js.map +0 -1
- package/dist/solid/unstable/v2/live-scroll.js.map +0 -1
- package/dist/solid/unstable/v2/live-value.js.map +0 -1
- package/dist/solid/unstable/v2/presence-hooks.js.map +0 -1
- package/dist/solid/unstable/v2/press-sensor.js.map +0 -1
- package/dist/solid/unstable/v2/sensors.js.map +0 -1
- /package/src/{complete.ts → complete.tsx} +0 -0
- /package/src/{create-animate.ts → create-animate.tsx} +0 -0
- /package/src/{directive.ts → directive.tsx} +0 -0
- /package/src/{drag.ts → drag.tsx} +0 -0
- /package/src/{layout-projection.ts → layout-projection.tsx} +0 -0
- /package/src/unstable/v2/{complete.ts → complete.tsx} +0 -0
- /package/src/unstable/v2/{layout-projection.ts → layout-projection.tsx} +0 -0
- /package/src/unstable/v2/{presence-hooks.ts → presence-hooks.tsx} +0 -0
|
@@ -38,7 +38,7 @@ import { isHydrating, isServer } from "./server.ts"
|
|
|
38
38
|
*/
|
|
39
39
|
// `Stream.runForEach` through `runScoped`; `set(() => v)`, so an object or function value is stored as
|
|
40
40
|
// it is. The stream's `R` is the provider runtime's services.
|
|
41
|
-
export const streamToSignal = <A
|
|
41
|
+
export const streamToSignal = <A,>(
|
|
42
42
|
stream: Stream.Stream<A, never, WardicServices>,
|
|
43
43
|
initial: A,
|
|
44
44
|
): Accessor<A> => {
|
|
@@ -56,7 +56,7 @@ export const streamToSignal = <A>(
|
|
|
56
56
|
* watch run with {@link runWatch} (a Scope of its own, closed with the owner; a handler's throw
|
|
57
57
|
* reported). Must be called within a Solid owner under a `WardicProvider`.
|
|
58
58
|
*/
|
|
59
|
-
export const watchToSignal = <A
|
|
59
|
+
export const watchToSignal = <A,>(
|
|
60
60
|
watchOf: (handlers: InputFeed.Handlers<A>) => Effect.Effect<void, never, Scope.Scope | WardicServices>,
|
|
61
61
|
initial: A,
|
|
62
62
|
): Accessor<A> => {
|
|
@@ -76,7 +76,7 @@ export const watchToSignal = <A>(
|
|
|
76
76
|
*/
|
|
77
77
|
// Solid's `from`, seeded with the atom's value; `set(() => v)`, so an object or function value is stored
|
|
78
78
|
// as it is. A server builds no registry (ADR-0021); the Hydration hold is decision 8.
|
|
79
|
-
export const fromAtom = <A
|
|
79
|
+
export const fromAtom = <A,>(atom: Atom.Atom<A>, options?: { readonly serverValue?: A }): Accessor<A> => {
|
|
80
80
|
const runtime = useWardicRuntime()
|
|
81
81
|
const held = Predicate.isNotUndefined(options) && "serverValue" in options
|
|
82
82
|
if (held && isServer) {
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `createBatch()` on Solid 1 (#665): many elements on the same keys, animated as one Batch, for a
|
|
3
|
+
* list, a grid or a chart's points that move together.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import * as Bool from "effect/Boolean"
|
|
8
|
+
import * as Predicate from "effect/Predicate"
|
|
9
|
+
import * as UndefinedOr from "effect/UndefinedOr"
|
|
10
|
+
import { createRenderEffect, type JSX, on, onCleanup, untrack } from "solid-js"
|
|
11
|
+
import {
|
|
12
|
+
type BatchConfig,
|
|
13
|
+
type BatchGestureTold,
|
|
14
|
+
type BatchGestureWatches,
|
|
15
|
+
bindBatch,
|
|
16
|
+
configTransitionOf,
|
|
17
|
+
handlesOf,
|
|
18
|
+
isKeyed,
|
|
19
|
+
keyedHandlesOf,
|
|
20
|
+
type KeyedBatchConfig,
|
|
21
|
+
type Member,
|
|
22
|
+
type MemberProps,
|
|
23
|
+
registerBatch,
|
|
24
|
+
serverHandlesOf,
|
|
25
|
+
serverKeyedHandlesOf,
|
|
26
|
+
type WardicBatchLanding,
|
|
27
|
+
} from "./batch.ts"
|
|
28
|
+
import { batchHandoffHere, batchServerAppearHere } from "./batch-appear-here.tsx"
|
|
29
|
+
import type { WardicPointInfo, WardicPressEvent, WardicPressInfo } from "./gesture-info.ts"
|
|
30
|
+
import { lazyBatchGestures } from "./lazy-batch-gestures.ts"
|
|
31
|
+
import { useFeatureRegistry, useWardicDefaultTransition, useWardicPositionalKeys, useWardicReducedMotion, useWardicRuntime, useWardicSkipAnimations } from "./provider.tsx"
|
|
32
|
+
import type { WardicRuntime } from "./runtime.ts"
|
|
33
|
+
import { isServer } from "./server.ts"
|
|
34
|
+
import { provideMemberHolds } from "./member-hold.ts"
|
|
35
|
+
import { usePresenceContext } from "./presence.tsx"
|
|
36
|
+
import { useWardicConfig } from "./wardic-config.tsx"
|
|
37
|
+
|
|
38
|
+
export type { WardicBatchKey, WardicBatchExit, WardicBatchGesture, WardicBatchLanding, WardicBatchSegmentTarget, WardicBatchSegmentValue, WardicBatchStop, WardicBatchSubject, WardicBatchTarget, WardicBatchTransition, WardicBatchValues } from "./batch.ts"
|
|
39
|
+
|
|
40
|
+
/** A Batch's callbacks on Solid 1: a flight's start and its landing. */
|
|
41
|
+
interface BatchCallbacks {
|
|
42
|
+
/** Called as its members set off from rest, every one at rest before. */
|
|
43
|
+
readonly onAnimationStart?: () => void
|
|
44
|
+
/** Called once every member is at rest again, with how many set off. */
|
|
45
|
+
readonly onAnimationComplete?: (landing: WardicBatchLanding) => void
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A Batch's gesture callbacks on Solid 1 (#665's PR 5, Q60), as a Wardic element's (#273): the platform's
|
|
50
|
+
* event, then its info, its point and the member, `{ i }` by index, `{ i, item }` keyed.
|
|
51
|
+
*/
|
|
52
|
+
interface BatchGestureCallbacks<M> {
|
|
53
|
+
/** Called as the pointer comes over a member (touch never hovers). */
|
|
54
|
+
readonly onHoverStart?: (event: PointerEvent, info: WardicPointInfo & M) => void
|
|
55
|
+
/** Called as it leaves, or a press held on it as it left is let go. */
|
|
56
|
+
readonly onHoverEnd?: (event: PointerEvent, info: WardicPointInfo & M) => void
|
|
57
|
+
/** Called as a press begins on a member: a pointer's down, or Enter or Space while it has focus. */
|
|
58
|
+
readonly onTapStart?: (event: WardicPressEvent, info: WardicPressInfo & M) => void
|
|
59
|
+
/** Called as that press ends on the member, or its key comes up. */
|
|
60
|
+
readonly onTap?: (event: WardicPressEvent, info: WardicPressInfo & M) => void
|
|
61
|
+
/** Called as it ends elsewhere, or is cancelled. A press a drag took over is neither. */
|
|
62
|
+
readonly onTapCancel?: (event: WardicPressEvent, info: WardicPressInfo & M) => void
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** `createBatch`'s config on Solid 1 by index: `count` members, their targets and transition, and its callbacks. */
|
|
66
|
+
export interface WardicBatchConfig extends BatchConfig, BatchCallbacks, BatchGestureCallbacks<{ readonly i: number }> {}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* `createBatch`'s keyed config on Solid 1 (#665): a list's items, each a member by its key, their
|
|
70
|
+
* targets by item and index, its transition and callbacks.
|
|
71
|
+
*/
|
|
72
|
+
export interface WardicKeyedBatchConfig<T> extends KeyedBatchConfig<T>, BatchCallbacks, BatchGestureCallbacks<{ readonly i: number; readonly item: T }> {}
|
|
73
|
+
|
|
74
|
+
/** Whether a Batch's config watches its members' hover: `whileHover`, or a hover callback (Q60). */
|
|
75
|
+
const wantsHover = (config: WardicBatchConfig | WardicKeyedBatchConfig<unknown>): boolean => {
|
|
76
|
+
if (Predicate.isNotUndefined(config.whileHover)) return true
|
|
77
|
+
if (Predicate.isNotUndefined(config.onHoverStart)) return true
|
|
78
|
+
return Predicate.isNotUndefined(config.onHoverEnd)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Whether a Batch's config watches its members' presses: `whileTap`, or a press callback (Q60). */
|
|
82
|
+
const wantsPress = (config: WardicBatchConfig | WardicKeyedBatchConfig<unknown>): boolean => {
|
|
83
|
+
if (Predicate.isNotUndefined(config.whileTap)) return true
|
|
84
|
+
if (Predicate.isNotUndefined(config.onTapStart)) return true
|
|
85
|
+
if (Predicate.isNotUndefined(config.onTap)) return true
|
|
86
|
+
return Predicate.isNotUndefined(config.onTapCancel)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Each gesture event's callback. */
|
|
90
|
+
const CALLBACK = { hoverStart: "onHoverStart", hoverEnd: "onHoverEnd", pressStart: "onTapStart", tap: "onTap", tapCancel: "onTapCancel" } as const
|
|
91
|
+
|
|
92
|
+
/** A member's gesture event told the config's callback (Q60): the platform's event, then its point, a press's input, and the member. */
|
|
93
|
+
const callGesture = (config: WardicBatchConfig | WardicKeyedBatchConfig<unknown>, keyed: boolean, told: BatchGestureTold): void => {
|
|
94
|
+
const callback = config[CALLBACK[told.name]] as ((event: unknown, info: unknown) => void) | undefined
|
|
95
|
+
if (Predicate.isUndefined(callback)) return
|
|
96
|
+
const info: Record<string, unknown> = { point: told.point, i: told.i }
|
|
97
|
+
if (Predicate.isNotUndefined(told.input)) info.input = told.input
|
|
98
|
+
if (keyed) info.item = told.item
|
|
99
|
+
callback(told.raw, info)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** A Batch's gesture watches, ended with its owner, over the input it brings: their code loaded at the first (Q62). */
|
|
103
|
+
const gestureWatchesOf = (runtime: WardicRuntime): BatchGestureWatches => {
|
|
104
|
+
const gestures = lazyBatchGestures(runtime, useFeatureRegistry())
|
|
105
|
+
onCleanup(gestures.close)
|
|
106
|
+
return gestures
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** What a member's element takes beside its handle: its own `ref`, and its own `style`, as an object. */
|
|
110
|
+
export type WardicBatchMemberProps<E extends Element = HTMLElement> = MemberProps<E, JSX.CSSProperties>
|
|
111
|
+
|
|
112
|
+
/** A member's handle: spread it onto the member's element. */
|
|
113
|
+
export type WardicBatchMember<E extends Element = HTMLElement> = Member<E, JSX.CSSProperties>
|
|
114
|
+
|
|
115
|
+
/** A Batch on Solid 1: its members' handles. */
|
|
116
|
+
export interface WardicBatch {
|
|
117
|
+
/**
|
|
118
|
+
* Member `i`'s handle, to spread onto its element: the element's own `ref` and `style` given beside
|
|
119
|
+
* it, its `style` without the properties the Batch draws.
|
|
120
|
+
*/
|
|
121
|
+
readonly at: <E extends Element = HTMLElement>(i: number, props?: WardicBatchMemberProps<E>) => WardicBatchMember<E>
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** A keyed Batch on Solid 1: each item's member's handle, by its key. */
|
|
125
|
+
export interface WardicKeyedBatch<K> {
|
|
126
|
+
/**
|
|
127
|
+
* The handle of the member keyed `key`, to spread onto its item's element: the element's own `ref` and
|
|
128
|
+
* `style` given beside it, its `style` without the properties the Batch draws.
|
|
129
|
+
*/
|
|
130
|
+
readonly member: <E extends Element = HTMLElement>(key: K, props?: WardicBatchMemberProps<E>) => WardicBatchMember<E>
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** The provider's Appear animations and the nearest `WardicConfig`'s settings, as a server's Batch reads them here (#706). */
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* A server render's Batch (#665's PR 6, ADR-0070 decision 14): its handles draw each spread member's
|
|
137
|
+
* start, over the element's own props, and its entrance as an Appear animation (#706); nothing animates.
|
|
138
|
+
*/
|
|
139
|
+
const serverBatchOf = (config: WardicBatchConfig | WardicKeyedBatchConfig<unknown>, keyed: boolean): WardicBatch | WardicKeyedBatch<unknown> =>
|
|
140
|
+
Bool.match(keyed, {
|
|
141
|
+
onTrue: (): WardicKeyedBatch<unknown> => ({ member: serverKeyedHandlesOf<JSX.CSSProperties>(config as WardicKeyedBatchConfig<unknown>, usePresenceContext, batchServerAppearHere()) }),
|
|
142
|
+
onFalse: (): WardicBatch => ({ at: serverHandlesOf<JSX.CSSProperties>(config as WardicBatchConfig, batchServerAppearHere()) }),
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Animates many elements on the same keys as one Batch: `count` members, each given to `at(i)`'s
|
|
147
|
+
* handle, turned toward `animate(i)` whenever what it reads changes, all in one run. For a list, a grid
|
|
148
|
+
* or a chart's points: a change of a thousand members costs about what a change of one element does.
|
|
149
|
+
* Its keys are the transforms and `opacity`; a member hovers and presses (`whileHover`, `whileTap`), but
|
|
150
|
+
* has no variants, drag or layout of its own.
|
|
151
|
+
* Call it in a component under a `WardicProvider`.
|
|
152
|
+
*
|
|
153
|
+
* Keyed, it takes a list, `each`, and each item's `key`: an item's member enters as its element
|
|
154
|
+
* arrives, from `initial`, and leaves as the item leaves the list. A change of the list, or of its
|
|
155
|
+
* order, turns every member once, each toward `animate(item, i)` at its index now.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* const list = createBatch({ each: () => todos(), key: "id", initial: { opacity: 0 }, animate: (_, i) => ({ y: i * 48, opacity: 1 }) })
|
|
159
|
+
* <For each={todos()}>{(todo) => <li {...list.member(todo.id)}>{todo.title}</li>}</For>
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* const grid = createBatch({
|
|
163
|
+
* count: 100,
|
|
164
|
+
* animate: (i) => ({ x: (i % 10) * 48, y: Math.floor(i / 10) * 48 }),
|
|
165
|
+
* transition: { type: "spring", visualDuration: 0.4, bounce: 0.2, delay: stagger(0.005) },
|
|
166
|
+
* })
|
|
167
|
+
* <For each={cells}>{(i) => <div class="cell" {...grid.at(i)} />}</For>
|
|
168
|
+
* @see https://wardic.dev/reference/solid/animation/create-batch
|
|
169
|
+
*/
|
|
170
|
+
// #665, ADR-0070 decisions 10–15 and *Amendment (#665)*. Solid 1 has no async values, so a flight's start
|
|
171
|
+
// and its landing are callbacks, as a Wardic element's `onAnimationStart` and `onAnimationComplete` are.
|
|
172
|
+
export function createBatch<T, P extends keyof T>(config: WardicKeyedBatchConfig<T> & { readonly key: P }): WardicKeyedBatch<T[P]>
|
|
173
|
+
export function createBatch<T, K>(config: WardicKeyedBatchConfig<T> & { readonly key: (item: T) => K }): WardicKeyedBatch<K>
|
|
174
|
+
export function createBatch(config: WardicBatchConfig): WardicBatch
|
|
175
|
+
export function createBatch(config: WardicBatchConfig | WardicKeyedBatchConfig<unknown>): WardicBatch | WardicKeyedBatch<unknown> {
|
|
176
|
+
const keyed = isKeyed(config)
|
|
177
|
+
if (isServer) return serverBatchOf(config, keyed)
|
|
178
|
+
// Its members' elements can be Wardic elements, which hand keys back and forth with it (#665's PR 4).
|
|
179
|
+
provideMemberHolds()
|
|
180
|
+
const configTransition = configTransitionOf(useWardicConfig())
|
|
181
|
+
const runtime = useWardicRuntime()
|
|
182
|
+
// Its members' gestures (#665's PR 5, Q60): watched only when its config asks for them.
|
|
183
|
+
const hovers = wantsHover(config)
|
|
184
|
+
const presses = wantsPress(config)
|
|
185
|
+
const gestures = Bool.match(Bool.or(hovers, presses), { onTrue: () => gestureWatchesOf(runtime), onFalse: () => undefined })
|
|
186
|
+
// Its first targets and starts read untracked, wherever it's called: what tracks them is its own effect.
|
|
187
|
+
const binding = untrack(() =>
|
|
188
|
+
bindBatch(
|
|
189
|
+
{
|
|
190
|
+
runtime,
|
|
191
|
+
reducedMotion: useWardicReducedMotion(),
|
|
192
|
+
skipAnimations: useWardicSkipAnimations(),
|
|
193
|
+
positionalKeys: useWardicPositionalKeys(),
|
|
194
|
+
defaultTransition: useWardicDefaultTransition(),
|
|
195
|
+
configTransition,
|
|
196
|
+
untrack,
|
|
197
|
+
...batchHandoffHere(),
|
|
198
|
+
gestures,
|
|
199
|
+
},
|
|
200
|
+
config,
|
|
201
|
+
{
|
|
202
|
+
started: () => UndefinedOr.map(config.onAnimationStart, (call) => call()),
|
|
203
|
+
landed: (landing) => UndefinedOr.map(config.onAnimationComplete, (call) => call(landing)),
|
|
204
|
+
gesture: (told) => callGesture(config, keyed, told),
|
|
205
|
+
},
|
|
206
|
+
))
|
|
207
|
+
if (hovers) binding.listen("hover")
|
|
208
|
+
if (presses) binding.listen("press")
|
|
209
|
+
// Its first targets were read as it was made: a change from then on is a Retarget of every member.
|
|
210
|
+
createRenderEffect(on(binding.targetsOf, binding.apply, { defer: true }))
|
|
211
|
+
onCleanup(binding.dispose)
|
|
212
|
+
const grid: WardicBatch | WardicKeyedBatch<unknown> = Bool.match(keyed, {
|
|
213
|
+
onTrue: (): WardicKeyedBatch<unknown> => ({ member: keyedHandlesOf<JSX.CSSProperties>(binding, usePresenceContext) }),
|
|
214
|
+
onFalse: (): WardicBatch => ({ at: handlesOf<JSX.CSSProperties>(binding) }),
|
|
215
|
+
})
|
|
216
|
+
// Known to `createAnimate`'s `animate` (#665).
|
|
217
|
+
registerBatch(grid, binding)
|
|
218
|
+
return grid
|
|
219
|
+
}
|
package/src/create-ward.tsx
CHANGED
|
@@ -63,9 +63,9 @@ import {
|
|
|
63
63
|
untrack,
|
|
64
64
|
} from "solid-js"
|
|
65
65
|
import { type ControlsChange, controlledConfigOf, controlledElement, isAnimationControls, subscribe, uncontrolledOf, type WardicAnimationControls } from "./animation-controls.ts"
|
|
66
|
-
import { fromAtom, watchToSignal } from "./bridge.
|
|
66
|
+
import { fromAtom, watchToSignal } from "./bridge.tsx"
|
|
67
67
|
import { pointMapOptionOf, settingOf, type WardicConfigValue, withConfigTransition } from "./wardic-config-value.ts"
|
|
68
|
-
import { dragTransitionOf, type DragTrack, type DragTrackConfig, runDragTrackWith } from "./drag.
|
|
68
|
+
import { dragTransitionOf, type DragTrack, type DragTrackConfig, runDragTrackWith } from "./drag.tsx"
|
|
69
69
|
import { createElementStyle } from "./element-style.ts"
|
|
70
70
|
import { createLiveStyle, type LiveSource, type LiveStyle, readLive, serverRegistryOf, split } from "./live-style.ts"
|
|
71
71
|
import { createVariantNode } from "./variant-node.ts"
|
|
@@ -83,7 +83,7 @@ import { handoffOf, setsAnimation } from "./appear.ts"
|
|
|
83
83
|
import { type PresenceContextValue, presenceBlocksInitial, presenceHold, usePresenceContext } from "./presence.tsx"
|
|
84
84
|
import { type PresenceSeed, presenceSeedOf } from "./presence-record.ts"
|
|
85
85
|
import type { PresenceRecord } from "./presence-record.ts"
|
|
86
|
-
import { createWhenWanted, NEVER_STARTED, type Started, stateOf, type Wants } from "./sensors.
|
|
86
|
+
import { createWhenWanted, NEVER_STARTED, type Started, stateOf, type Wants } from "./sensors.tsx"
|
|
87
87
|
import { type GestureCallbacks, gestureCallbacksOf, inViewOptionsOf, wantsFocus, wantsHover, wantsInView, wantsPan, wantsPress } from "./gesture-callbacks.ts"
|
|
88
88
|
import { type Feature, type FeatureRegistry, type FeatureSection, LAYOUT_PROPS, missingMessage, unreadColorIn } from "./feature.ts"
|
|
89
89
|
import { runWatch, useBuiltProjection, useElementFeatures, useFeatureRegistry, useWardicAppear, useWardicDefaultTransition, useWardicGate, useWardicPositionalKeys, useWardicReducedMotion, useWardicRenderer, useWardicRuntime, useWardicSkipAnimations } from "./provider.tsx"
|
|
@@ -99,6 +99,7 @@ import {
|
|
|
99
99
|
applyDragDefaults,
|
|
100
100
|
dragAxisOf,
|
|
101
101
|
dragDefaultsOf,
|
|
102
|
+
claimForDrag,
|
|
102
103
|
draggingWithWillChange,
|
|
103
104
|
drawnAtRest,
|
|
104
105
|
followTemplate,
|
|
@@ -729,7 +730,7 @@ export function runSpine(opts: RunSpineOptions): void {
|
|
|
729
730
|
// element that never drags keeps none of them (#551).
|
|
730
731
|
const axis = dragCfg
|
|
731
732
|
const transition = dragTransition
|
|
732
|
-
const setDrag = draggingWithWillChange(live, setDragging)
|
|
733
|
+
const setDrag = draggingWithWillChange(live, setDragging, element)
|
|
733
734
|
const nodeAtMount = layoutHandle
|
|
734
735
|
const nodeLater = lateLayout
|
|
735
736
|
// It drives the layout node the element has as it's made, at mount or as `drag` arrives: a
|
|
@@ -759,6 +760,8 @@ export function runSpine(opts: RunSpineOptions): void {
|
|
|
759
760
|
recordFrame,
|
|
760
761
|
// A drag's start turns its `style`'s will-change value on (#443).
|
|
761
762
|
setDragging: setDrag,
|
|
763
|
+
// A Batch member's element takes its transform from its Batch as its drag reads or writes it (#665).
|
|
764
|
+
claim: claimForDrag(element),
|
|
762
765
|
mapPoint: pagePoint,
|
|
763
766
|
config: trackConfig,
|
|
764
767
|
skipAnimations,
|
|
@@ -8,7 +8,7 @@ import type * as Drag from "@wardic/core/Drag"
|
|
|
8
8
|
import * as InputSource from "@wardic/core/InputSource"
|
|
9
9
|
import * as Effect from "effect/Effect"
|
|
10
10
|
import type { Accessor } from "solid-js"
|
|
11
|
-
import { watchToSignal } from "./bridge.
|
|
11
|
+
import { watchToSignal } from "./bridge.tsx"
|
|
12
12
|
import { type CreateDragOptions, watchDragSamples } from "./drag-samples.ts"
|
|
13
13
|
import type { Feature } from "./feature.ts"
|
|
14
14
|
import { drag } from "./features/drag.ts"
|
package/src/drag-track.ts
CHANGED
|
@@ -168,6 +168,12 @@ export interface DragTrackOptions {
|
|
|
168
168
|
readonly recordFrame: (value: Values.Values) => void
|
|
169
169
|
/** Flip the reactive `dragging` signal the spine reads for `whileDrag` + key stripping. */
|
|
170
170
|
readonly setDragging: (dragging: boolean) => void
|
|
171
|
+
/**
|
|
172
|
+
* Told before the drag reads where the element rests, or writes `x`/`y`: a Batch member's element
|
|
173
|
+
* takes its transform from its Batch then (#665's PR 4), so the drag starts where the Batch drew it,
|
|
174
|
+
* and is the only one drawing it. Omitted, nothing is told.
|
|
175
|
+
*/
|
|
176
|
+
readonly claim?: (() => void) | undefined
|
|
171
177
|
/** The static drag config (read once at setup). */
|
|
172
178
|
readonly config: DragTrackConfig
|
|
173
179
|
/**
|
|
@@ -328,6 +334,17 @@ const snapshotPos = (snapshot: DragSnapshot): Point.Point => {
|
|
|
328
334
|
return { x: numberOrZero(x), y: numberOrZero(y) }
|
|
329
335
|
}
|
|
330
336
|
|
|
337
|
+
/** Its `claim` told, when it has one (#665's PR 4): before each read of where it rests and each write. */
|
|
338
|
+
const claimed = (opts: DragTrackOptions): void => {
|
|
339
|
+
if (Predicate.isNotUndefined(opts.claim)) opts.claim()
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/** Where the element rests now, read off the snapshot once its `claim` is told: a Batch member's where its Batch drew it. */
|
|
343
|
+
const restingAt = (opts: DragTrackOptions): Point.Point => {
|
|
344
|
+
claimed(opts)
|
|
345
|
+
return snapshotPos(opts.snapshot)
|
|
346
|
+
}
|
|
347
|
+
|
|
331
348
|
/** A value that's a number, else 0. Built once, at module load. */
|
|
332
349
|
const numberOrZero: (value: unknown) => number = Match.type<unknown>().pipe(
|
|
333
350
|
Match.when(Match.number, (n) => n),
|
|
@@ -349,6 +366,7 @@ const directSet = (opts: DragTrackOptions, p: Point.Point): void => {
|
|
|
349
366
|
opts.projection.dragMove({ x: p.x, y: p.y })
|
|
350
367
|
return
|
|
351
368
|
}
|
|
369
|
+
claimed(opts)
|
|
352
370
|
opts.gate.write(opts.id, { x: p.x, y: p.y })
|
|
353
371
|
opts.snapshot.values.x = p.x
|
|
354
372
|
opts.snapshot.values.y = p.y
|
|
@@ -423,7 +441,7 @@ const snapTo = (opts: DragTrackOptions, state: TrackState, down: InputSource.Poi
|
|
|
423
441
|
const by = onAxes({ x: cursor.x - centre.x, y: cursor.y - centre.y }, axis)
|
|
424
442
|
UndefinedOr.match(opts.projection, {
|
|
425
443
|
onUndefined: () => {
|
|
426
|
-
const from =
|
|
444
|
+
const from = restingAt(opts)
|
|
427
445
|
const to = { x: from.x + by.x, y: from.y + by.y }
|
|
428
446
|
MutableRef.update(state, (s) => ({ ...s, position: to }))
|
|
429
447
|
directSet(opts, to)
|
|
@@ -461,7 +479,7 @@ const reportSample = (opts: DragTrackOptions, sample: Drag.Sample): void =>
|
|
|
461
479
|
*/
|
|
462
480
|
const startOf = (opts: DragTrackOptions, st: DragTrackState): Point.Point =>
|
|
463
481
|
UndefinedOr.match(opts.projection, {
|
|
464
|
-
onUndefined: () =>
|
|
482
|
+
onUndefined: () => restingAt(opts),
|
|
465
483
|
onDefined: () => UndefinedOr.match(st.snapped, { onUndefined: () => ORIGIN, onDefined: identity }),
|
|
466
484
|
})
|
|
467
485
|
|
|
@@ -706,7 +724,7 @@ export const driveDragTrack = (opts: DragTrackOptions): DragTrack => {
|
|
|
706
724
|
if (Bool.or(st.held, Predicate.isNotUndefined(opts.projection))) return Effect.sync(() => setBounds(to))
|
|
707
725
|
return FiberHandle.clear(releasing).pipe(
|
|
708
726
|
Effect.andThen(Effect.sync(() => {
|
|
709
|
-
const kept = Drag.keepPlace(
|
|
727
|
+
const kept = Drag.keepPlace(restingAt(opts), toDragAxis(config.axis), from, to)
|
|
710
728
|
MutableRef.update(state, (s) => ({ ...s, bounds: to, position: kept }))
|
|
711
729
|
directSet(opts, kept)
|
|
712
730
|
opts.setDragging(false)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import type { Accessor } from "solid-js"
|
|
8
|
-
import { watchToSignal } from "./bridge.
|
|
8
|
+
import { watchToSignal } from "./bridge.tsx"
|
|
9
9
|
import type { Feature } from "./feature.ts"
|
|
10
10
|
import { focus } from "./features/focus.ts"
|
|
11
11
|
import { FocusGesture } from "./features/keys.ts"
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import type { Accessor } from "solid-js"
|
|
8
|
-
import { watchToSignal } from "./bridge.
|
|
8
|
+
import { watchToSignal } from "./bridge.tsx"
|
|
9
9
|
import type { Feature } from "./feature.ts"
|
|
10
10
|
import { hover } from "./features/hover.ts"
|
|
11
11
|
import { HoverGesture } from "./features/keys.ts"
|
package/src/imperative.ts
CHANGED
|
@@ -28,6 +28,18 @@ import type * as Values from "@wardic/core/Values"
|
|
|
28
28
|
import * as Sequence from "@wardic/core/Sequence"
|
|
29
29
|
import type * as FlushGate from "@wardic/dom/FlushGate"
|
|
30
30
|
import * as Report from "@wardic/dom/Report"
|
|
31
|
+
import {
|
|
32
|
+
type BatchBinding,
|
|
33
|
+
type BatchMemberEntry,
|
|
34
|
+
batchSubjectOf,
|
|
35
|
+
callPartsOf,
|
|
36
|
+
isMemberElement,
|
|
37
|
+
memberEntryOf,
|
|
38
|
+
sequencePartsOf,
|
|
39
|
+
type WardicBatchSegmentTarget,
|
|
40
|
+
type WardicBatchSubject,
|
|
41
|
+
type WardicBatchTarget,
|
|
42
|
+
} from "./batch.ts"
|
|
31
43
|
import * as Arr from "effect/Array"
|
|
32
44
|
import * as Bool from "effect/Boolean"
|
|
33
45
|
import * as Cause from "effect/Cause"
|
|
@@ -236,15 +248,43 @@ const subjectsOf = (subject: WardicAnimationSubject, scope: Element | undefined)
|
|
|
236
248
|
return Arr.filter(Arr.makeBy(list.length, (i) => list[i] as Element), Predicate.isNotNullish)
|
|
237
249
|
}
|
|
238
250
|
|
|
251
|
+
/** A call's options without its `onComplete`: its transition. */
|
|
252
|
+
const withoutComplete = (given: WardicAnimateOptions): Readonly<Record<string, unknown>> => {
|
|
253
|
+
const { onComplete: _onComplete, ...rest } = given as Readonly<Record<string, unknown>>
|
|
254
|
+
return rest
|
|
255
|
+
}
|
|
256
|
+
|
|
239
257
|
/** Each element's transition: its `delay` worked out for it (Motion's `delay(i, n)`). */
|
|
240
258
|
const transitionFor = (options: WardicAnimateOptions | undefined, index: number, count: number): WardicTransition | undefined =>
|
|
241
259
|
UndefinedOr.map(options, (given) => {
|
|
242
|
-
const { delay,
|
|
260
|
+
const { delay, ...rest } = withoutComplete(given)
|
|
243
261
|
if (Predicate.isFunction(delay)) return { ...rest, delay: (delay as (index: number, count: number) => number)(index, count) } as WardicTransition
|
|
244
262
|
if (Predicate.isUndefined(delay)) return rest as WardicTransition
|
|
245
263
|
return { ...rest, delay } as WardicTransition
|
|
246
264
|
})
|
|
247
265
|
|
|
266
|
+
/** A Batch call's transition (#665): the options without `onComplete`, a `stagger()` delay kept for the Batch to count its movers. */
|
|
267
|
+
const batchTransitionOf = (options: WardicAnimateOptions | undefined): WardicTransition | undefined =>
|
|
268
|
+
UndefinedOr.map(options, (given) => withoutComplete(given) as WardicTransition)
|
|
269
|
+
|
|
270
|
+
/** A Batch call's track over `members` (every member when left out), driven by `head`: the call's options its transition. */
|
|
271
|
+
const batchTrackOf = (env: AnimateEnv, binding: BatchBinding, target: WardicBatchTarget, members: ReadonlyArray<number> | undefined, options: WardicAnimateOptions | undefined, head: Playback.Playhead, settled: () => void): ImperativeTrack =>
|
|
272
|
+
binding.track({
|
|
273
|
+
target,
|
|
274
|
+
transition: batchTransitionOf(options),
|
|
275
|
+
reducedMotion: env.reducedMotion(),
|
|
276
|
+
skipAnimations: skipsBatchCall(env, options),
|
|
277
|
+
head,
|
|
278
|
+
settled,
|
|
279
|
+
members,
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
/** Whether a Batch call lands at once: its scope's animations are skipped, or its own `skipAnimations` (#468). */
|
|
283
|
+
const skipsBatchCall = (env: AnimateEnv, options: WardicAnimateOptions | undefined): boolean => {
|
|
284
|
+
if (env.skipAnimations()) return true
|
|
285
|
+
return UndefinedOr.match(options, { onUndefined: () => false, onDefined: (given) => given.skipAnimations === true })
|
|
286
|
+
}
|
|
287
|
+
|
|
248
288
|
/** Where an animation is: `"idle"`, `"running"`, `"paused"` or `"finished"`. Motion's `AnimationPlayState`. */
|
|
249
289
|
export type WardicPlayState = "idle" | "running" | "paused" | "finished"
|
|
250
290
|
|
|
@@ -465,8 +505,18 @@ export type WardicFunctionSegment =
|
|
|
465
505
|
| readonly [callback: (value: number) => void, value: number | WardicKeyframes<number>, options: WardicSegmentOptions]
|
|
466
506
|
| readonly [callback: (value: string) => void, value: string | WardicKeyframes<string>, options: WardicSegmentOptions]
|
|
467
507
|
|
|
468
|
-
/**
|
|
469
|
-
|
|
508
|
+
/**
|
|
509
|
+
* A Segment of a Batch, `[batch, target, options?]`: a Batch, every member whose element has arrived, in
|
|
510
|
+
* member order, or a member's handle, `grid.at(i)`. Each of its keys a number, `null`, stops, or a
|
|
511
|
+
* function of a member's index and the Batch's count; a `stagger()` counts the Segment's members.
|
|
512
|
+
*/
|
|
513
|
+
// #665, Q36–Q39: each member through its own stops, in the Batch.
|
|
514
|
+
export type WardicBatchSegment =
|
|
515
|
+
| readonly [batch: WardicBatchSubject, target: WardicBatchSegmentTarget]
|
|
516
|
+
| readonly [batch: WardicBatchSubject, target: WardicBatchSegmentTarget, options: WardicSegmentOptions]
|
|
517
|
+
|
|
518
|
+
/** One step of a sequence: a label, a Segment of elements, a function Segment, or a Segment of a Batch. */
|
|
519
|
+
export type WardicSegment = WardicSequenceLabel | WardicElementSegment | WardicFunctionSegment | WardicBatchSegment
|
|
470
520
|
|
|
471
521
|
/**
|
|
472
522
|
* A sequence: Segments played one after another, unless an `at` says where one starts, and labels to
|
|
@@ -505,6 +555,7 @@ export interface WardicSequenceOptions {
|
|
|
505
555
|
// #433: through one Playhead.
|
|
506
556
|
export interface WardicAnimate {
|
|
507
557
|
(subject: WardicAnimationSubject, target: WardicVariant, options?: WardicAnimateOptions): WardicPlaybackControls
|
|
558
|
+
(batch: WardicBatchSubject, target: WardicBatchTarget, options?: WardicAnimateOptions): WardicPlaybackControls
|
|
508
559
|
(sequence: WardicAnimationSequence, options?: WardicSequenceOptions): WardicPlaybackControls
|
|
509
560
|
}
|
|
510
561
|
|
|
@@ -516,10 +567,29 @@ export interface WardicAnimate {
|
|
|
516
567
|
export const scopedAnimate = (env: AnimateEnv, scope: () => Element | undefined, watch: AnimationWatch): WardicAnimate =>
|
|
517
568
|
((first: WardicAnimationSubject | WardicAnimationSequence, second?: WardicVariant | WardicSequenceOptions, third?: WardicAnimateOptions): WardicPlaybackControls => {
|
|
518
569
|
if (isSequence(first)) return sequenceOf(env, scope(), watch, first, second as WardicSequenceOptions | undefined)
|
|
570
|
+
// A Batch, or a member's handle (#665): one track over its members, on the Batch's own run.
|
|
571
|
+
const batch = batchSubjectOf(first)
|
|
572
|
+
if (Predicate.isNotUndefined(batch)) {
|
|
573
|
+
const members = batch.binding.namedOf(batch)
|
|
574
|
+
return started(watch, 1, UndefinedOr.map(third, (given) => given.onComplete), (head, settled) => [
|
|
575
|
+
batchTrackOf(env, batch.binding, second as WardicBatchTarget, members, third, head, settled),
|
|
576
|
+
])
|
|
577
|
+
}
|
|
519
578
|
const elements = subjectsOf(first as WardicAnimationSubject, scope())
|
|
520
579
|
const target = second as WardicVariant
|
|
521
|
-
|
|
522
|
-
|
|
580
|
+
const onComplete = UndefinedOr.map(third, (given) => given.onComplete)
|
|
581
|
+
// No member's element among them: each element's track, building no parts (bench:solid --batch's
|
|
582
|
+
// per-element page, a call per element: 8.2 -> 8.5 ms at 1,000 with the parts built for every call; #665).
|
|
583
|
+
if (!Arr.some(elements, isMemberElement)) {
|
|
584
|
+
return started(watch, elements.length, onComplete, (head, settled) =>
|
|
585
|
+
Arr.map(elements, (element, index) => trackOf(env, element, target, transitionFor(third, index, elements.length), head, settled)))
|
|
586
|
+
}
|
|
587
|
+
// A Batch's members' elements as one call over them, with its keys; the rest of each element's on its own (#665, Q14, Q35).
|
|
588
|
+
const parts = callPartsOf(elements, target)
|
|
589
|
+
return started(watch, parts.members.length + parts.elements.length, onComplete, (head, settled) => [
|
|
590
|
+
...Arr.map(parts.members, (part) => batchTrackOf(env, part.binding, part.target, part.members, third, head, settled)),
|
|
591
|
+
...Arr.map(parts.elements, (part) => trackOf(env, part.element, part.target, transitionFor(third, part.index, elements.length), head, settled)),
|
|
592
|
+
])
|
|
523
593
|
}) as WardicAnimate
|
|
524
594
|
|
|
525
595
|
/**
|
|
@@ -557,8 +627,8 @@ interface Callback {
|
|
|
557
627
|
readonly call: (value: number | string) => void
|
|
558
628
|
}
|
|
559
629
|
|
|
560
|
-
/** What a sequence animates: elements,
|
|
561
|
-
type Subject = Element | Callback
|
|
630
|
+
/** What a sequence animates: elements, function Segments' values, and Batches' members (#665). */
|
|
631
|
+
type Subject = Element | Callback | BatchMemberEntry
|
|
562
632
|
|
|
563
633
|
/** Whether a subject is a function Segment's value. */
|
|
564
634
|
const isCallback = (subject: Subject): subject is Callback => Predicate.hasProperty(subject, "call")
|
|
@@ -632,6 +702,25 @@ const segmentTransitionsOf = (values: Readonly<Record<string, unknown>>, options
|
|
|
632
702
|
/** A Segment's `at`, when it gives one. */
|
|
633
703
|
const atOf = (options: WardicSegmentOptions | undefined): Sequence.Time | undefined => UndefinedOr.map(options, (given) => given.at)
|
|
634
704
|
|
|
705
|
+
/**
|
|
706
|
+
* An element Segment's subjects (#665, Q40): each element, a member's as its member's entry, so its Batch
|
|
707
|
+
* keys run in its Batch, as one subject with the member a Segment of the Batch names. Each Batch checks
|
|
708
|
+
* the Segment's values once.
|
|
709
|
+
*/
|
|
710
|
+
const subjectsIn = (elements: ReadonlyArray<Element>, target: Readonly<Record<string, unknown>>): ReadonlyArray<Subject> => {
|
|
711
|
+
if (!Arr.some(elements, isMemberElement)) return elements
|
|
712
|
+
const checked = new Set<BatchBinding>()
|
|
713
|
+
return Arr.map(elements, (element): Subject => {
|
|
714
|
+
const entry = memberEntryOf(element)
|
|
715
|
+
if (Predicate.isUndefined(entry)) return element
|
|
716
|
+
if (Bool.not(checked.has(entry.binding))) {
|
|
717
|
+
checked.add(entry.binding)
|
|
718
|
+
entry.binding.checkElementSegment(target)
|
|
719
|
+
}
|
|
720
|
+
return entry
|
|
721
|
+
})
|
|
722
|
+
}
|
|
723
|
+
|
|
635
724
|
/**
|
|
636
725
|
* A sequence's steps for core (#433): labels as they are; an element Segment's elements (a selector
|
|
637
726
|
* looked up once a sequence, inside `scope`), values and each value's transition; a function
|
|
@@ -652,6 +741,13 @@ const stepsOf = (sequence: WardicAnimationSequence, scope: Element | undefined,
|
|
|
652
741
|
if (Predicate.isString(segment)) return segment
|
|
653
742
|
if (Bool.not(Arr.isArray(segment))) return segment as { readonly name: string; readonly at: Sequence.Time }
|
|
654
743
|
const parts = segment as ReadonlyArray<unknown>
|
|
744
|
+
// A Batch, or a member's handle (#665, Q38, Q39): its members, each through its own stops in the Batch.
|
|
745
|
+
const batch = batchSubjectOf(parts[0])
|
|
746
|
+
if (Predicate.isNotUndefined(batch)) {
|
|
747
|
+
const options = parts[2] as WardicSegmentOptions | undefined
|
|
748
|
+
const { subjects, values } = batch.binding.segmentOf(batch.binding.namedOf(batch), parts[1] as Readonly<Record<string, unknown>>)
|
|
749
|
+
return { subjects, target: values, transitions: segmentTransitionsOf(values, options, defaults), at: atOf(options) }
|
|
750
|
+
}
|
|
655
751
|
if (Predicate.isFunction(parts[0])) {
|
|
656
752
|
const call = parts[0] as (value: number | string) => void
|
|
657
753
|
const three = parts.length === 3
|
|
@@ -662,7 +758,7 @@ const stepsOf = (sequence: WardicAnimationSequence, scope: Element | undefined,
|
|
|
662
758
|
}
|
|
663
759
|
const [subject, values, options] = segment as WardicElementSegment
|
|
664
760
|
const target = segmentValuesOf(values)
|
|
665
|
-
return { subjects: elementsOf(subject), target, transitions: segmentTransitionsOf(target, options, defaults), at: atOf(options) }
|
|
761
|
+
return { subjects: subjectsIn(elementsOf(subject), target), target, transitions: segmentTransitionsOf(target, options, defaults), at: atOf(options) }
|
|
666
762
|
})
|
|
667
763
|
}
|
|
668
764
|
|
|
@@ -729,12 +825,17 @@ const sequenceOf = (env: AnimateEnv, scope: Element | undefined, watch: Animatio
|
|
|
729
825
|
...picked(UndefinedOr.match(options as Readonly<Record<string, unknown>> | undefined, { onUndefined: () => NO_FIELDS, onDefined: identity }), WHOLE),
|
|
730
826
|
} as Sequence.Options
|
|
731
827
|
const compiled = Arr.fromIterable(Sequence.compile(stepsOf(sequence, scope, defaults), whole))
|
|
732
|
-
|
|
733
|
-
|
|
828
|
+
// Each Batch's members as one track, their other keys their elements' (#665, Q40).
|
|
829
|
+
const parts = sequencePartsOf<Element | Callback>(compiled)
|
|
830
|
+
return started(watch, compiled.length, UndefinedOr.map(options, (given) => given.onComplete), (head, settled) => [
|
|
831
|
+
...Arr.map(parts.others, ([subject, animation]) =>
|
|
734
832
|
Match.value(subject).pipe(
|
|
735
833
|
Match.when(isCallback, (callback) => callbackTrackOf(env, callback, animation, head, settled)),
|
|
736
834
|
Match.orElse((element) => trackOf(env, element as Element, animation.keyframes as WardicVariant, animation.transition as WardicTransition, head, settled)),
|
|
737
|
-
))
|
|
835
|
+
)),
|
|
836
|
+
...Arr.map(parts.batches, (part) =>
|
|
837
|
+
part.binding.sequenceTrack({ members: part.members, animations: part.animations, reducedMotion: env.reducedMotion(), skipAnimations: env.skipAnimations(), head, settled })),
|
|
838
|
+
])
|
|
738
839
|
}
|
|
739
840
|
|
|
740
841
|
/**
|