@wardic/solid 1.0.1 → 1.1.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/README.md +5 -2
- package/dist/browser/appear.js +42 -3
- package/dist/browser/appear.js.map +1 -1
- package/dist/browser/batch-handoff.js +2 -17
- package/dist/browser/batch-handoff.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 +4 -4
- package/dist/browser/batch.js.map +1 -1
- package/dist/browser/create-ward.js +28 -10
- 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/element.js +12 -3
- package/dist/browser/element.js.map +1 -1
- package/dist/browser/feature.js +57 -22
- package/dist/browser/feature.js.map +1 -1
- package/dist/browser/features/all.js +8 -0
- package/dist/browser/features/all.js.map +1 -1
- package/dist/browser/features/colors.js.map +1 -1
- package/dist/browser/features/dom-animation.js +8 -0
- package/dist/browser/features/dom-animation.js.map +1 -1
- package/dist/browser/features/dom-max.js +6 -0
- package/dist/browser/features/dom-max.js.map +1 -1
- package/dist/browser/features/drag.js.map +1 -1
- package/dist/browser/features/focus.js.map +1 -1
- package/dist/browser/features/hover.js.map +1 -1
- package/dist/browser/features/in-view.js.map +1 -1
- package/dist/browser/features/keys.js +6 -0
- package/dist/browser/features/keys.js.map +1 -1
- package/dist/browser/features/layout.js +14 -3
- package/dist/browser/features/layout.js.map +1 -1
- package/dist/browser/features/pan.js.map +1 -1
- package/dist/browser/features/press.js.map +1 -1
- package/dist/browser/features/scroll.js +10 -3
- package/dist/browser/features/scroll.js.map +1 -1
- package/dist/browser/features/timeline-keys.js +100 -0
- package/dist/browser/features/timeline-keys.js.map +1 -0
- package/dist/browser/imperative.js +182 -4
- 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/layout-member.js +0 -2
- 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/live-scroll.js +29 -21
- package/dist/browser/live-scroll.js.map +1 -1
- package/dist/browser/live-style.js +10 -0
- 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 +37 -7
- 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/presence-controller.js +136 -44
- package/dist/browser/presence-controller.js.map +1 -1
- package/dist/browser/presence-record.js.map +1 -1
- package/dist/browser/presence.js.map +1 -1
- package/dist/browser/provider.js +57 -11
- package/dist/browser/provider.js.map +1 -1
- package/dist/browser/reorder.js.map +1 -1
- package/dist/browser/runtime.js +15 -9
- 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/spans-check.js +25 -0
- package/dist/browser/spans-check.js.map +1 -0
- package/dist/browser/spine.js +149 -207
- package/dist/browser/spine.js.map +1 -1
- package/dist/browser/timelines.js +9 -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-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 +60 -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 +27 -9
- 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/w.js +8 -9
- package/dist/browser/w.js.map +1 -1
- package/dist/browser/wardic-instance.js +2 -0
- package/dist/browser/wardic-instance.js.map +1 -0
- package/dist/server/appear.js +42 -3
- package/dist/server/appear.js.map +1 -1
- package/dist/server/batch-handoff.js +2 -17
- package/dist/server/batch-handoff.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 +4 -4
- package/dist/server/batch.js.map +1 -1
- package/dist/server/create-ward.js +28 -10
- 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/element.js +12 -3
- package/dist/server/element.js.map +1 -1
- package/dist/server/feature.js +57 -22
- package/dist/server/feature.js.map +1 -1
- package/dist/server/features/all.js +8 -0
- package/dist/server/features/all.js.map +1 -1
- package/dist/server/features/colors.js.map +1 -1
- package/dist/server/features/dom-animation.js +8 -0
- package/dist/server/features/dom-animation.js.map +1 -1
- package/dist/server/features/dom-max.js +6 -0
- package/dist/server/features/dom-max.js.map +1 -1
- package/dist/server/features/drag.js.map +1 -1
- package/dist/server/features/focus.js.map +1 -1
- package/dist/server/features/hover.js.map +1 -1
- package/dist/server/features/in-view.js.map +1 -1
- package/dist/server/features/keys.js +6 -0
- package/dist/server/features/keys.js.map +1 -1
- package/dist/server/features/layout.js +14 -3
- package/dist/server/features/layout.js.map +1 -1
- package/dist/server/features/pan.js.map +1 -1
- package/dist/server/features/press.js.map +1 -1
- package/dist/server/features/scroll.js +10 -3
- package/dist/server/features/scroll.js.map +1 -1
- package/dist/server/features/timeline-keys.js +100 -0
- package/dist/server/features/timeline-keys.js.map +1 -0
- package/dist/server/imperative.js +182 -4
- 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/layout-member.js +0 -2
- 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/live-scroll.js +29 -21
- package/dist/server/live-scroll.js.map +1 -1
- package/dist/server/live-style.js +10 -0
- 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 +37 -7
- 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/presence-controller.js +136 -44
- package/dist/server/presence-controller.js.map +1 -1
- package/dist/server/presence-record.js.map +1 -1
- package/dist/server/presence.js.map +1 -1
- package/dist/server/provider.js +57 -11
- package/dist/server/provider.js.map +1 -1
- package/dist/server/reorder.js.map +1 -1
- package/dist/server/runtime.js +15 -9
- 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/spans-check.js +25 -0
- package/dist/server/spans-check.js.map +1 -0
- package/dist/server/spine.js +149 -207
- package/dist/server/spine.js.map +1 -1
- package/dist/server/timelines.js +9 -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-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 +60 -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 +27 -9
- 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/w.js +8 -9
- package/dist/server/w.js.map +1 -1
- package/dist/server/wardic-instance.js +2 -0
- package/dist/server/wardic-instance.js.map +1 -0
- package/dist/solid/appear.d.ts +15 -2
- package/dist/solid/appear.d.ts.map +1 -1
- package/dist/solid/appear.js +43 -2
- package/dist/solid/appear.js.map +1 -1
- package/dist/solid/batch-handoff.d.ts.map +1 -1
- package/dist/solid/batch-handoff.js +2 -15
- package/dist/solid/batch-handoff.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.map +1 -1
- package/dist/solid/batch.js +4 -4
- package/dist/solid/batch.js.map +1 -1
- package/dist/solid/config.d.ts +141 -103
- package/dist/solid/config.d.ts.map +1 -1
- package/dist/solid/create-ward.d.ts +3 -1
- package/dist/solid/create-ward.d.ts.map +1 -1
- package/dist/solid/create-ward.jsx +29 -9
- 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/element.d.ts +26 -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 +91 -3
- package/dist/solid/feature.d.ts.map +1 -1
- package/dist/solid/feature.js +48 -19
- package/dist/solid/feature.js.map +1 -1
- package/dist/solid/features/all.d.ts +9 -2
- package/dist/solid/features/all.d.ts.map +1 -1
- package/dist/solid/features/all.js +18 -1
- package/dist/solid/features/all.js.map +1 -1
- package/dist/solid/features/colors.d.ts +1 -1
- package/dist/solid/features/colors.d.ts.map +1 -1
- package/dist/solid/features/colors.js.map +1 -1
- package/dist/solid/features/dom-animation.d.ts +5 -2
- package/dist/solid/features/dom-animation.d.ts.map +1 -1
- package/dist/solid/features/dom-animation.js +8 -0
- package/dist/solid/features/dom-animation.js.map +1 -1
- package/dist/solid/features/dom-max.d.ts +2 -2
- package/dist/solid/features/dom-max.d.ts.map +1 -1
- package/dist/solid/features/dom-max.js +6 -0
- package/dist/solid/features/dom-max.js.map +1 -1
- package/dist/solid/features/drag.d.ts +1 -1
- package/dist/solid/features/drag.d.ts.map +1 -1
- package/dist/solid/features/drag.js.map +1 -1
- package/dist/solid/features/focus.d.ts +1 -1
- package/dist/solid/features/focus.d.ts.map +1 -1
- package/dist/solid/features/focus.js.map +1 -1
- package/dist/solid/features/hover.d.ts +1 -1
- package/dist/solid/features/hover.d.ts.map +1 -1
- package/dist/solid/features/hover.js.map +1 -1
- package/dist/solid/features/in-view.d.ts +1 -1
- package/dist/solid/features/in-view.d.ts.map +1 -1
- package/dist/solid/features/in-view.js.map +1 -1
- package/dist/solid/features/keys.d.ts +16 -1
- package/dist/solid/features/keys.d.ts.map +1 -1
- package/dist/solid/features/keys.js +7 -0
- package/dist/solid/features/keys.js.map +1 -1
- package/dist/solid/features/layout.d.ts +7 -1
- package/dist/solid/features/layout.d.ts.map +1 -1
- package/dist/solid/features/layout.js +14 -4
- package/dist/solid/features/layout.js.map +1 -1
- package/dist/solid/features/pan.d.ts +1 -1
- package/dist/solid/features/pan.d.ts.map +1 -1
- package/dist/solid/features/pan.js.map +1 -1
- package/dist/solid/features/press.d.ts +1 -1
- package/dist/solid/features/press.d.ts.map +1 -1
- package/dist/solid/features/press.js.map +1 -1
- package/dist/solid/features/scroll.d.ts +5 -3
- package/dist/solid/features/scroll.d.ts.map +1 -1
- package/dist/solid/features/scroll.js +12 -3
- package/dist/solid/features/scroll.js.map +1 -1
- package/dist/solid/features/timeline-keys.d.ts +7 -0
- package/dist/solid/features/timeline-keys.d.ts.map +1 -0
- package/dist/solid/features/timeline-keys.js +97 -0
- package/dist/solid/features/timeline-keys.js.map +1 -0
- package/dist/solid/imperative.d.ts +3 -3
- package/dist/solid/imperative.d.ts.map +1 -1
- package/dist/solid/imperative.js +146 -4
- 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/layout-member.d.ts +0 -2
- package/dist/solid/layout-member.d.ts.map +1 -1
- package/dist/solid/layout-member.js +0 -2
- 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/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 +11 -0
- package/dist/solid/live-style.d.ts.map +1 -1
- package/dist/solid/live-style.js +10 -0
- 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 +5 -19
- package/dist/solid/member-hold.d.ts.map +1 -1
- package/dist/solid/member-hold.js +42 -7
- 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/presence-controller.d.ts +1 -1
- package/dist/solid/presence-controller.d.ts.map +1 -1
- package/dist/solid/presence-controller.js +125 -34
- package/dist/solid/presence-controller.js.map +1 -1
- package/dist/solid/presence-record.d.ts +3 -3
- package/dist/solid/presence-record.d.ts.map +1 -1
- 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/provider.d.ts +17 -3
- package/dist/solid/provider.d.ts.map +1 -1
- package/dist/solid/provider.jsx +55 -7
- package/dist/solid/provider.jsx.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/runtime.d.ts +10 -2
- package/dist/solid/runtime.d.ts.map +1 -1
- package/dist/solid/runtime.js +15 -9
- 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/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 +144 -13
- package/dist/solid/spine.d.ts.map +1 -1
- package/dist/solid/spine.js +131 -183
- package/dist/solid/spine.js.map +1 -1
- package/dist/solid/timelines.d.ts +44 -0
- package/dist/solid/timelines.d.ts.map +1 -0
- package/dist/solid/timelines.js +10 -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-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 +52 -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 +17 -3
- package/dist/solid/unstable/v2/provider.d.ts.map +1 -1
- package/dist/solid/unstable/v2/provider.jsx +58 -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 +41 -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 +15 -8
- package/dist/solid/unstable/v2/ward.d.ts.map +1 -1
- package/dist/solid/unstable/v2/ward.jsx +28 -8
- 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/w.d.ts +24 -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-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/appear.ts +56 -2
- package/src/batch-handoff.ts +2 -16
- 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 +4 -4
- package/src/config.ts +177 -123
- package/src/create-ward.tsx +32 -8
- package/src/create-wardic.tsx +45 -0
- package/src/element.tsx +52 -16
- package/src/feature.ts +157 -25
- package/src/features/all.ts +11 -2
- package/src/features/colors.ts +1 -1
- package/src/features/dom-animation.ts +2 -2
- package/src/features/dom-max.ts +1 -2
- package/src/features/drag.ts +1 -1
- package/src/features/focus.ts +1 -1
- package/src/features/hover.ts +1 -1
- package/src/features/in-view.ts +1 -1
- package/src/features/keys.ts +18 -1
- package/src/features/layout.ts +17 -5
- package/src/features/pan.ts +1 -1
- package/src/features/press.ts +1 -1
- package/src/features/scroll.ts +14 -4
- package/src/features/timeline-keys.ts +109 -0
- package/src/imperative.ts +168 -10
- package/src/index.tsx +6 -1
- package/src/instance-features.ts +88 -0
- package/src/layout-member.ts +0 -4
- package/src/layout-projection.tsx +10 -1
- package/src/layout.tsx +7 -6
- package/src/live-scroll.tsx +30 -22
- package/src/live-style.ts +21 -0
- package/src/live-value.tsx +12 -2
- package/src/member-hold.ts +45 -26
- package/src/messages.ts +27 -0
- package/src/presence-controller.ts +222 -106
- package/src/presence-record.ts +3 -3
- package/src/presence.tsx +3 -1
- package/src/provider.tsx +62 -7
- package/src/reorder.tsx +5 -4
- package/src/runtime.ts +17 -10
- package/src/scroll-values.ts +53 -0
- package/src/spans-check.ts +25 -0
- package/src/spine.ts +219 -187
- package/src/timelines.ts +46 -0
- package/src/unstable/v2/batch-reorder-group.tsx +42 -18
- package/src/unstable/v2/create-wardic.tsx +46 -0
- package/src/unstable/v2/element.tsx +85 -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 +65 -9
- package/src/unstable/v2/reorder.tsx +9 -4
- package/src/unstable/v2/w.tsx +49 -13
- package/src/unstable/v2/ward.tsx +48 -13
- package/src/unstable/v2/wardic-instance.ts +50 -0
- package/src/w.tsx +33 -16
- package/src/ward-keys.ts +38 -17
- package/src/wardic-instance.ts +49 -0
package/src/features/scroll.ts
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The **`scroll` Feature** (#518, ADR-0067 *Amendment (#518)*, decision 5), in a module of its own: a
|
|
3
3
|
* container's scroll, which `createScroll` brings, so an app that reads no scroll ships none of the
|
|
4
|
-
* Environment's scroll code.
|
|
4
|
+
* Environment's scroll code. With it, the Timeline values (#240): a value derived from the scroll by
|
|
5
|
+
* ranges alone, drawn by the browser with the scroll. Its top-level calls are marked pure, as every
|
|
6
|
+
* Feature module's are.
|
|
5
7
|
*
|
|
6
8
|
* @module
|
|
7
9
|
*/
|
|
8
10
|
import * as ScrollSource from "@wardic/core/ScrollSource"
|
|
9
11
|
import * as DomScrollSource from "@wardic/dom/DomScrollSource"
|
|
12
|
+
import * as Layer from "effect/Layer"
|
|
10
13
|
import { type Feature, fromEnvironmentOr } from "../feature.ts"
|
|
14
|
+
import { Timelines } from "../timelines.ts"
|
|
15
|
+
import { makeTimelines } from "./timeline-keys.ts"
|
|
11
16
|
|
|
12
17
|
/**
|
|
13
18
|
* A container's scroll, live, for the scroll-linked values. `createScroll` brings it, so an app doesn't
|
|
14
19
|
* give it. The Environment's `ScrollSource` when it gives one (`@wardic/test`'s `TestLive`), else the
|
|
15
|
-
* DOM's, built once per provider.
|
|
20
|
+
* DOM's, built once per provider. Its Timeline values run where the browser has native scroll timelines.
|
|
16
21
|
*/
|
|
17
|
-
|
|
22
|
+
// #240 (ADR-0043 *Amendment (#240)*, decision 4): the `Timelines` service, which an element's spine finds
|
|
23
|
+
// among the provider's built Features.
|
|
24
|
+
export const scroll: Feature<ScrollSource.ScrollSource, ScrollSource.ScrollSource["Service"], "scroll"> = {
|
|
18
25
|
name: "scroll",
|
|
19
26
|
key: ScrollSource.ScrollSource,
|
|
20
|
-
layer: /*#__PURE__*/
|
|
27
|
+
layer: /*#__PURE__*/ Layer.merge(
|
|
28
|
+
/*#__PURE__*/ fromEnvironmentOr(ScrollSource.ScrollSource, DomScrollSource.layer),
|
|
29
|
+
/*#__PURE__*/ Layer.sync(Timelines)(makeTimelines),
|
|
30
|
+
),
|
|
21
31
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An element's **Timeline values** (#240, ADR-0043 *Amendment (#240)*), the `scroll` Feature's: a routed
|
|
3
|
+
* `style` key whose Live value core describes as derived from a container's scroll
|
|
4
|
+
* (`LiveValue.scrollDerivationOf`) gets the DOM's `TimelineValue`, handed to the gate while the key shows
|
|
5
|
+
* its Live value and taken back from it while anything else draws the key. Made again when what the key
|
|
6
|
+
* derives from changes: a new source in its `style`, or a `createScroll`'s new container.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import * as LiveValue from "@wardic/core/LiveValue"
|
|
11
|
+
import * as TimelineValue from "@wardic/dom/TimelineValue"
|
|
12
|
+
import * as Bool from "effect/Boolean"
|
|
13
|
+
import * as Option from "effect/Option"
|
|
14
|
+
import * as Predicate from "effect/Predicate"
|
|
15
|
+
import type * as Atom from "effect/reactivity/Atom"
|
|
16
|
+
import type { TimelineKeys, TimelineKeysOptions, Timelines } from "../timelines.ts"
|
|
17
|
+
|
|
18
|
+
/** A key's Timeline value as last made: the derivation it was made from, and the value, `undefined` where the gate draws the key. */
|
|
19
|
+
interface Made {
|
|
20
|
+
readonly derivation: LiveValue.ScrollDerivation
|
|
21
|
+
readonly timeline: TimelineValue.TimelineValue | undefined
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** An element's {@link TimelineKeys}, and what its provider's `described` tells it. */
|
|
25
|
+
interface ElementKeys extends TimelineKeys {
|
|
26
|
+
/** Find each key it shows its Timeline value again: what it derives from may have been described since. */
|
|
27
|
+
readonly recheck: () => void
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A provider's {@link Timelines}: each mounted element's keys, told again when a `createScroll`
|
|
32
|
+
* describes its values.
|
|
33
|
+
*/
|
|
34
|
+
export const makeTimelines = (): Timelines["Service"] => {
|
|
35
|
+
const mounted = new Set<ElementKeys>()
|
|
36
|
+
return {
|
|
37
|
+
keysOf: (options) => {
|
|
38
|
+
const keys = elementKeysOf(options, () => mounted.delete(keys))
|
|
39
|
+
mounted.add(keys)
|
|
40
|
+
return keys
|
|
41
|
+
},
|
|
42
|
+
described: () => {
|
|
43
|
+
mounted.forEach((keys) => keys.recheck())
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An element's keys. `shown` runs at each write of a key's Live value, so per frame while it moves: a key
|
|
50
|
+
* shown already from the same source is left as it is, with nothing read but its source, statements and
|
|
51
|
+
* nothing made. What it derives from changes only where it's described anew, which `recheck` hears.
|
|
52
|
+
*/
|
|
53
|
+
const elementKeysOf = (options: TimelineKeysOptions, unmounted: () => void): ElementKeys => {
|
|
54
|
+
const { runtime, gate, id, element, live } = options
|
|
55
|
+
const made = new Map<string, Made>()
|
|
56
|
+
// The keys that show their Live value, whatever runs them, each with the Atom it was shown from (none
|
|
57
|
+
// for a plain accessor's): the ones `recheck` looks at again.
|
|
58
|
+
const showing = new Map<string, Atom.Atom<unknown> | undefined>()
|
|
59
|
+
// The keys whose Timeline value the gate has, each with it.
|
|
60
|
+
const running = new Map<string, TimelineValue.TimelineValue>()
|
|
61
|
+
|
|
62
|
+
/** `key`'s Timeline value now, made again when its derivation changed; `undefined` for none. */
|
|
63
|
+
const timelineOf = (key: string): TimelineValue.TimelineValue | undefined => {
|
|
64
|
+
const atom = live.atomOf(key)
|
|
65
|
+
if (Predicate.isUndefined(atom)) return undefined
|
|
66
|
+
const derivation = Option.getOrUndefined(LiveValue.scrollDerivationOf(atom))
|
|
67
|
+
if (Predicate.isUndefined(derivation)) return undefined
|
|
68
|
+
const last = made.get(key)
|
|
69
|
+
if (Predicate.isNotUndefined(last)) {
|
|
70
|
+
if (last.derivation === derivation) return last.timeline
|
|
71
|
+
}
|
|
72
|
+
const timeline = Option.getOrUndefined(runtime.runSync(TimelineValue.make(derivation, element, key)))
|
|
73
|
+
made.set(key, { derivation, timeline })
|
|
74
|
+
return timeline
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** The gate runs `key`'s Timeline value now, or none. */
|
|
78
|
+
const run = (key: string): void => {
|
|
79
|
+
const timeline = timelineOf(key)
|
|
80
|
+
if (running.get(key) === timeline) return
|
|
81
|
+
gate.timeline(id, key, timeline)
|
|
82
|
+
if (Predicate.isUndefined(timeline)) {
|
|
83
|
+
running.delete(key)
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
running.set(key, timeline)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
shown: (key) => {
|
|
91
|
+
const atom = live.atomOf(key)
|
|
92
|
+
if (showing.has(key)) {
|
|
93
|
+
if (showing.get(key) === atom) return
|
|
94
|
+
}
|
|
95
|
+
showing.set(key, atom)
|
|
96
|
+
run(key)
|
|
97
|
+
},
|
|
98
|
+
taken: (key) => {
|
|
99
|
+
showing.delete(key)
|
|
100
|
+
if (Bool.not(running.has(key))) return
|
|
101
|
+
running.delete(key)
|
|
102
|
+
gate.timeline(id, key, undefined)
|
|
103
|
+
},
|
|
104
|
+
recheck: () => {
|
|
105
|
+
showing.forEach((_, key) => run(key))
|
|
106
|
+
},
|
|
107
|
+
dispose: unmounted,
|
|
108
|
+
}
|
|
109
|
+
}
|
package/src/imperative.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* - **A Wardic element** animates through its own spine, registered here while it's mounted: the
|
|
7
7
|
* call takes the keys it animates, which stay where it leaves them until the element's own target
|
|
8
|
-
* for them changes (
|
|
8
|
+
* for them changes (Motion's latest-wins).
|
|
9
9
|
* - **A plain element** animates through a spine of its own (#433's Q4), with no config, presence or
|
|
10
10
|
* layout node: it starts from the element's Own value (ADR-0022) and keeps its values for the next
|
|
11
11
|
* call, velocity included. It's in the gate only while it animates, so the gate keeps nothing of an
|
|
@@ -21,12 +21,15 @@
|
|
|
21
21
|
* @module
|
|
22
22
|
*/
|
|
23
23
|
import type * as DefaultTransition from "@wardic/core/DefaultTransition"
|
|
24
|
+
import type * as Frame from "@wardic/core/Frame"
|
|
25
|
+
import * as InterpolatorRegistry from "@wardic/core/InterpolatorRegistry"
|
|
24
26
|
import * as Machine from "@wardic/core/Machine"
|
|
25
27
|
import * as Playback from "@wardic/core/Playback"
|
|
26
28
|
import * as ReducedMotion from "@wardic/core/ReducedMotion"
|
|
27
29
|
import type * as Values from "@wardic/core/Values"
|
|
28
30
|
import * as Sequence from "@wardic/core/Sequence"
|
|
29
31
|
import type * as FlushGate from "@wardic/dom/FlushGate"
|
|
32
|
+
import * as MeasuredPair from "@wardic/dom/MeasuredPair"
|
|
30
33
|
import * as Report from "@wardic/dom/Report"
|
|
31
34
|
import {
|
|
32
35
|
type BatchBinding,
|
|
@@ -53,13 +56,34 @@ import * as Predicate from "effect/Predicate"
|
|
|
53
56
|
import * as Rec from "effect/Record"
|
|
54
57
|
import * as UndefinedOr from "effect/UndefinedOr"
|
|
55
58
|
import type { WardicKeyframes, WardicTargetValues, WardicTransition, WardicVariant } from "./config.ts"
|
|
56
|
-
import { filledStops, runOf } from "./retarget-legs.ts"
|
|
57
|
-
import type { WardicRuntime } from "./runtime.ts"
|
|
58
|
-
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
type
|
|
59
|
+
import { filledStops, keyframesFrom, type Leg, legsOf, mapMachine, type MeasuredPairs, runOf, type StopsByKey } from "./retarget-legs.ts"
|
|
60
|
+
import type { WardicRuntime, WardicServices } from "./runtime.ts"
|
|
61
|
+
import {
|
|
62
|
+
type ElementSpine,
|
|
63
|
+
emptySnapshotOf,
|
|
64
|
+
holdsVariable,
|
|
65
|
+
type ImperativeHooks,
|
|
66
|
+
type ImperativeTrack,
|
|
67
|
+
type Landing,
|
|
68
|
+
makeElementSpine,
|
|
69
|
+
makeReuse,
|
|
70
|
+
measuredOf,
|
|
71
|
+
NO_RUNNING,
|
|
72
|
+
NO_VALUES,
|
|
73
|
+
restsOf,
|
|
74
|
+
type Resolution,
|
|
75
|
+
type Running,
|
|
76
|
+
runningOf,
|
|
77
|
+
type Snapshot,
|
|
78
|
+
type SpineHost,
|
|
79
|
+
startLinksOf,
|
|
80
|
+
turnWillChangeOn,
|
|
81
|
+
} from "./spine.ts"
|
|
82
|
+
import { NO_VARIANT_STATE, resolveTarget, type Target } from "./variant-target.ts"
|
|
83
|
+
import { NO_GESTURE_NAMES, NO_GESTURE_STATES } from "./variant-tree.ts"
|
|
84
|
+
|
|
85
|
+
/** What an Imperative animation animates an element through: what its spine hands over (`host`). */
|
|
86
|
+
type Animatable = Pick<ElementSpine, "host">
|
|
63
87
|
|
|
64
88
|
/** Each mounted Wardic element's spine (Motion's `visualElementStore`). */
|
|
65
89
|
// Module state (#460, Q7): each Wardic element's animatable, held weakly by the element.
|
|
@@ -162,6 +186,140 @@ const skippedIn = (env: AnimateEnv, transition: WardicTransition | undefined): W
|
|
|
162
186
|
return { ...transition, skipAnimations: true } as WardicTransition
|
|
163
187
|
}
|
|
164
188
|
|
|
189
|
+
/**
|
|
190
|
+
* The resolution an **Imperative animation**'s legs run under (#433): none of the Override stack's,
|
|
191
|
+
* so a Retarget that takes a key back never carries one as its own Keyframes or names.
|
|
192
|
+
*/
|
|
193
|
+
const IMPERATIVE: Resolution = {
|
|
194
|
+
resolved: {},
|
|
195
|
+
base: {},
|
|
196
|
+
dragging: false,
|
|
197
|
+
variant: undefined,
|
|
198
|
+
active: { inView: false, focused: false, hovered: false, pressed: false, dragged: false, dragging: false },
|
|
199
|
+
transition: undefined,
|
|
200
|
+
layers: [],
|
|
201
|
+
names: NO_GESTURE_NAMES,
|
|
202
|
+
layersOn: NO_GESTURE_STATES,
|
|
203
|
+
ends: undefined,
|
|
204
|
+
keyframes: undefined,
|
|
205
|
+
change: undefined,
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* An **Imperative animation** of an element (#433), through its spine's `host`: it takes `target`'s
|
|
210
|
+
* keys from whatever runs them, each noted with the target the Override stack has for it now, so a
|
|
211
|
+
* Retarget leaves it where the animation leaves it until that target changes (Motion's latest-wins).
|
|
212
|
+
* Its legs start where the keys are drawn, with their velocity, on `given` (a key with none of its own
|
|
213
|
+
* on its Default transition), reduced motion as the provider says, and run through `head` once
|
|
214
|
+
* {@link ImperativeTrack.run} is called.
|
|
215
|
+
*/
|
|
216
|
+
// #746 (ADR-0067, *Amendment (#746)*, decision 10): here, not in the spine, so an app that never animates
|
|
217
|
+
// imperatively ships none of it; the spine hands over what it takes (`SpineHost`).
|
|
218
|
+
const imperativeTrackOf = (host: SpineHost, target: Target, given: WardicTransition | undefined, head: Playback.Playhead, hooks: ImperativeHooks): ImperativeTrack => {
|
|
219
|
+
const { snapshot, owners, giveUp, initialValues, ownValue, startKey, keepTheRest, element, positionalKeys, defaultTransition, readVelocity, gate, forget, endLeg, live, own, legProgram, legEnded, turnBack, id, recordFrame, runtime, elementRules } = host
|
|
220
|
+
/** A leg of an Imperative animation, forked as a Retarget's are; it lands on its track. */
|
|
221
|
+
// Data-first: a pipe's curried forms are two closures more for every leg (#618, H1).
|
|
222
|
+
const runImperative = (running: Running, program: Effect.Effect<unknown, never, WardicServices>): void => {
|
|
223
|
+
running.fiber = runtime.runFork(Effect.asVoid(Effect.onExit(program, legEnded(running))))
|
|
224
|
+
}
|
|
225
|
+
const to = target.values
|
|
226
|
+
const before = UndefinedOr.match(host.lastResolution(), { onUndefined: () => NO_VALUES, onDefined: (last) => last.resolved })
|
|
227
|
+
const started: Record<string, string> = {}
|
|
228
|
+
let measuring: Array<string> | undefined
|
|
229
|
+
// Each key taken from whatever runs it, noted with its target now, and started where it's drawn.
|
|
230
|
+
// Its velocity read now (#464), as its legs are built.
|
|
231
|
+
const takenNow = host.taking()
|
|
232
|
+
// Where a Path's axis this target leaves out rests (#574), before its keys are taken below.
|
|
233
|
+
const rests = restsOf(owners, to)
|
|
234
|
+
Arr.forEach(Rec.keys(to), (key) => {
|
|
235
|
+
takenNow.set(key, before[key])
|
|
236
|
+
host.returning().delete(key)
|
|
237
|
+
// Its Timeline value stops while the animation draws the key (#240).
|
|
238
|
+
const timelineKeys = host.timelineKeys()
|
|
239
|
+
if (Predicate.isNotUndefined(timelineKeys)) timelineKeys.taken(key)
|
|
240
|
+
const owner = owners.get(key)
|
|
241
|
+
if (Predicate.isNotUndefined(owner)) giveUp(key, owner)
|
|
242
|
+
if (!Object.hasOwn(initialValues, key)) ownValue(key)
|
|
243
|
+
const like = UndefinedOr.getOrThrow(to[key])
|
|
244
|
+
startKey(key, like, started)
|
|
245
|
+
if (MeasuredPair.needs(key, UndefinedOr.getOrThrow(snapshot.values[key]), like)) {
|
|
246
|
+
if (Predicate.isUndefined(measuring)) measuring = []
|
|
247
|
+
measuring.push(key)
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
keepTheRest()
|
|
251
|
+
let from: Values.Values = Rec.map(to, (_, key) => UndefinedOr.getOrThrow(snapshot.values[key]))
|
|
252
|
+
let stops: StopsByKey | undefined
|
|
253
|
+
if (Predicate.isNotUndefined(target.keyframes)) {
|
|
254
|
+
const begun = keyframesFrom(from, to, target.keyframes)
|
|
255
|
+
from = begun.from
|
|
256
|
+
stops = begun.stops
|
|
257
|
+
}
|
|
258
|
+
const reduce = host.reducedMotion()
|
|
259
|
+
const skipped = host.skipAnimations()
|
|
260
|
+
let measured: MeasuredPairs | undefined
|
|
261
|
+
if (Bool.and(Bool.not(Bool.or(reduce, skipped)), Predicate.isNotUndefined(measuring))) measured = measuredOf(element, UndefinedOr.getOrThrow(measuring), from, to, snapshot.values, stops)
|
|
262
|
+
// Built once: a seek or a replay runs the same legs, from the same start, with the same velocities.
|
|
263
|
+
const built = legsOf(from, to, given, reduce, skipped, positionalKeys, defaultTransition, readVelocity, undefined, stops, measured, snapshot.values, rests)
|
|
264
|
+
const variables = holdsVariable(from, to, stops)
|
|
265
|
+
const legs = Arr.map(built, (leg) => mapMachine(leg, Playback.drive(head)))
|
|
266
|
+
let runnings: ReadonlyArray<Running> = NO_RUNNING
|
|
267
|
+
let left = 0
|
|
268
|
+
const landing: Landing = {
|
|
269
|
+
report: constVoid,
|
|
270
|
+
settled: () => {
|
|
271
|
+
left--
|
|
272
|
+
if (left === 0) gate.afterFlush(hooks.settled)
|
|
273
|
+
},
|
|
274
|
+
failed: hooks.failed,
|
|
275
|
+
}
|
|
276
|
+
// Its legs ended where they are: the keys they draw are drawn by none.
|
|
277
|
+
const end = (): void =>
|
|
278
|
+
Arr.forEach(runnings, (running) => {
|
|
279
|
+
forget(running)
|
|
280
|
+
if (Bool.not(running.done)) endLeg(running)
|
|
281
|
+
})
|
|
282
|
+
const run = (): void => {
|
|
283
|
+
end()
|
|
284
|
+
left = legs.length
|
|
285
|
+
turnWillChangeOn(live, legs)
|
|
286
|
+
runnings = Arr.map(legs, (leg) => {
|
|
287
|
+
const running = runningOf(leg.to, IMPERATIVE, landing, leg._tag)
|
|
288
|
+
own(running)
|
|
289
|
+
runImperative(running, legProgram(leg, running, variables))
|
|
290
|
+
return running
|
|
291
|
+
})
|
|
292
|
+
// A target with no key lands at once.
|
|
293
|
+
if (left === 0) gate.afterFlush(hooks.settled)
|
|
294
|
+
}
|
|
295
|
+
const cancel = (): void => {
|
|
296
|
+
end()
|
|
297
|
+
turnBack()
|
|
298
|
+
snapshot.values = { ...snapshot.values, ...from }
|
|
299
|
+
snapshot.velocities = { ...snapshot.velocities, ...Rec.map(from, () => 0) }
|
|
300
|
+
// Put back at once: at rest, newer than the legs that let them go (#464).
|
|
301
|
+
const now = snapshot.now()
|
|
302
|
+
Arr.forEach(Rec.keys(from), (key) => {
|
|
303
|
+
snapshot.drawnAt[key] = now
|
|
304
|
+
})
|
|
305
|
+
gate.write(id, from)
|
|
306
|
+
recordFrame(from)
|
|
307
|
+
}
|
|
308
|
+
// Each leg's machine, run from its start to rest, apart from the Playhead, which it would move: a
|
|
309
|
+
// blend's built with the element's Key rules.
|
|
310
|
+
const duration = (): number =>
|
|
311
|
+
Arr.reduce(built, 0, (longest, leg) => Math.max(longest, Machine.durationOf(machineOf(leg))))
|
|
312
|
+
const machineOf = (leg: Leg): Machine.Machine<Frame.Frame<unknown>> => {
|
|
313
|
+
if (leg._tag === "Blend") return runtime.runSync(Effect.suspend(leg.machine).pipe(InterpolatorRegistry.withKeyRules(elementRules)))
|
|
314
|
+
return leg.machine() as Machine.Machine<Frame.Frame<unknown>>
|
|
315
|
+
}
|
|
316
|
+
const stop = (): void => {
|
|
317
|
+
end()
|
|
318
|
+
turnBack()
|
|
319
|
+
}
|
|
320
|
+
return { run, stop, cancel, duration }
|
|
321
|
+
}
|
|
322
|
+
|
|
165
323
|
/**
|
|
166
324
|
* An element's animation of `target`: through its spine when it's a Wardic element's, else through its
|
|
167
325
|
* plain spine, in the gate while any of its animations runs.
|
|
@@ -171,7 +329,7 @@ const trackOf = (env: AnimateEnv, element: Element, target: WardicVariant, given
|
|
|
171
329
|
const own = wardicElements.get(element)
|
|
172
330
|
const hooks = { settled, failed: constVoid }
|
|
173
331
|
const transition = skippedIn(env, given)
|
|
174
|
-
if (Predicate.isNotUndefined(own)) return own.
|
|
332
|
+
if (Predicate.isNotUndefined(own)) return imperativeTrackOf(own.host(), resolved, transition, head, hooks)
|
|
175
333
|
const plain = plainOf(env, element)
|
|
176
334
|
// In the gate while it runs; out once its last animation is done, after the flush of its last frame.
|
|
177
335
|
let live = false
|
|
@@ -193,7 +351,7 @@ const trackOf = (env: AnimateEnv, element: Element, target: WardicVariant, given
|
|
|
193
351
|
if (plain.running === 0) plain.unregister()
|
|
194
352
|
})
|
|
195
353
|
}
|
|
196
|
-
const track = plain.spine.
|
|
354
|
+
const track = imperativeTrackOf(plain.spine.host(), resolved, transition, head, {
|
|
197
355
|
settled: () => {
|
|
198
356
|
leave()
|
|
199
357
|
settled()
|
package/src/index.tsx
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://wardic.dev/reference/solid/utilities/version
|
|
13
13
|
*/
|
|
14
|
-
export const VERSION = "1.0
|
|
14
|
+
export const VERSION = "1.1.0"
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* `WardicProvider` (one Effect runtime + `AtomRegistry` per ADR-0006), the
|
|
@@ -243,8 +243,10 @@ export {
|
|
|
243
243
|
type ReorderItemDirectiveValue,
|
|
244
244
|
type ReorderBatchGroupProps,
|
|
245
245
|
type ReorderBatchItemProps,
|
|
246
|
+
type ReorderBatchColumnSize,
|
|
246
247
|
type ReorderBatchGap,
|
|
247
248
|
type ReorderBatchItemSize,
|
|
249
|
+
type ReorderBatchSizing,
|
|
248
250
|
reorderItem,
|
|
249
251
|
} from "./reorder.tsx"
|
|
250
252
|
|
|
@@ -295,6 +297,9 @@ export {
|
|
|
295
297
|
* `w.createWard` and `use:w`, each as its `wardic` form but with only the Features chosen above it.
|
|
296
298
|
*/
|
|
297
299
|
export { type W, w } from "./w.tsx"
|
|
300
|
+
// #516: what `createWardic(features)` returns, its `w` typed to its Features.
|
|
301
|
+
export type { WardConfigOf, WardicInstance } from "./wardic-instance.ts"
|
|
302
|
+
export { createWardic } from "./create-wardic.tsx"
|
|
298
303
|
// #443 (Motion's): `wardic.create`'s options; whether a component is a Wardic element's and what it
|
|
299
304
|
// wraps; whether a prop is a motion prop.
|
|
300
305
|
export { isWardicComponent, unwrapWardicComponent, type WardicCreateOptions } from "./wardic-component.ts"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A **Wardic instance**'s Features (#516, ADR-0067 *Amendment (#516)*), for both bindings: what
|
|
3
|
+
* `createWardic` splits its list into, and what its elements and hooks take in each provider. In a module
|
|
4
|
+
* that only `createWardic` imports, apart from the spine every page shares, so an app with no Wardic
|
|
5
|
+
* instance ships none of it (ADR-0067, *Amendment (#548)*).
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import * as Arr from "effect/Array"
|
|
10
|
+
import * as Bool from "effect/Boolean"
|
|
11
|
+
import type * as Cause from "effect/Cause"
|
|
12
|
+
import { constVoid, identity } from "effect/Function"
|
|
13
|
+
import * as Predicate from "effect/Predicate"
|
|
14
|
+
import * as UndefinedOr from "effect/UndefinedOr"
|
|
15
|
+
import {
|
|
16
|
+
type Build,
|
|
17
|
+
type Feature,
|
|
18
|
+
type FeatureLoad,
|
|
19
|
+
type FeatureRegistry,
|
|
20
|
+
type Features,
|
|
21
|
+
type InstanceFeatures,
|
|
22
|
+
type InstanceFeaturesProp,
|
|
23
|
+
joinOwns,
|
|
24
|
+
type Own,
|
|
25
|
+
ownOf,
|
|
26
|
+
type SectionHost,
|
|
27
|
+
} from "./feature.ts"
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* `prop`'s Features (#516): those given at once, flattened, each once, and its loads, each started once,
|
|
31
|
+
* the first time any provider asks, so one module's Wardic instance loads each once.
|
|
32
|
+
*/
|
|
33
|
+
export const instanceFeaturesOf = (prop: InstanceFeaturesProp): InstanceFeatures => {
|
|
34
|
+
const leaves = leavesOf(prop)
|
|
35
|
+
const given = Arr.dedupeWith(Arr.filter(leaves, isFeature), (a, b) => a === b)
|
|
36
|
+
const loads = Arr.map(Arr.filter(leaves, isLoad), once)
|
|
37
|
+
const owns = new WeakMap<FeatureRegistry, Own>()
|
|
38
|
+
return {
|
|
39
|
+
own: (registry, host) =>
|
|
40
|
+
UndefinedOr.match(owns.get(registry), {
|
|
41
|
+
onDefined: identity,
|
|
42
|
+
onUndefined: () => {
|
|
43
|
+
const own = ownIn(registry.build, given, loads, host.report, { reactivity: host.reactivity, server: host.server, onCleanup: registry.onEnd })
|
|
44
|
+
owns.set(registry, own)
|
|
45
|
+
return own
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** `prop`'s Features and loads, every list flattened. */
|
|
52
|
+
const leavesOf = (prop: InstanceFeaturesProp): ReadonlyArray<Feature | FeatureLoad> =>
|
|
53
|
+
Bool.match(Array.isArray(prop), {
|
|
54
|
+
onTrue: () => Arr.flatMap(prop as ReadonlyArray<InstanceFeaturesProp>, leavesOf),
|
|
55
|
+
onFalse: () => [prop as Feature | FeatureLoad],
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
const isFeature = (leaf: Feature | FeatureLoad): leaf is Feature => Predicate.hasProperty(leaf, "layer")
|
|
59
|
+
|
|
60
|
+
const isLoad = (leaf: Feature | FeatureLoad): leaf is FeatureLoad => Predicate.isFunction(leaf)
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* `load`, started at its first call, its promise kept for every call after. A failed load is forgotten,
|
|
64
|
+
* so the next provider to ask loads again, as a new `LazyWardic` does.
|
|
65
|
+
*/
|
|
66
|
+
const once = (load: FeatureLoad): FeatureLoad => {
|
|
67
|
+
let started: Promise<Features> | undefined
|
|
68
|
+
return () =>
|
|
69
|
+
UndefinedOr.match(started, {
|
|
70
|
+
onDefined: identity,
|
|
71
|
+
onUndefined: () => {
|
|
72
|
+
const loading = load()
|
|
73
|
+
started = loading
|
|
74
|
+
loading.then(constVoid, () => {
|
|
75
|
+
if (started === loading) started = undefined
|
|
76
|
+
})
|
|
77
|
+
return loading
|
|
78
|
+
},
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** A Wardic instance's Features in one provider: those given at once, and each load's, joined. */
|
|
83
|
+
const ownIn = (build: Build, given: ReadonlyArray<Feature>, loads: ReadonlyArray<FeatureLoad>, report: (cause: Cause.Cause<unknown>) => void, host: SectionHost): Own =>
|
|
84
|
+
Arr.reduce(
|
|
85
|
+
Arr.map(loads, (load) => ownOf(build, load, report, host)),
|
|
86
|
+
ownOf(build, given, report, host),
|
|
87
|
+
joinOwns,
|
|
88
|
+
)
|
package/src/layout-member.ts
CHANGED
|
@@ -227,10 +227,6 @@ export const layoutModeOf = (layout: WardConfig["layout"], layoutId: string | un
|
|
|
227
227
|
/** Whether a `layout` prop names a Layout mode (a string), not `true` / `false`. */
|
|
228
228
|
const isModeName = (layout: WardConfig["layout"]): layout is Exclude<WardConfig["layout"], boolean | undefined> => Predicate.isString(layout)
|
|
229
229
|
|
|
230
|
-
/** Whether a config makes its element a projection node: `layout` (or a mode), a `layoutId`, `layoutScroll` or `layoutRoot`. */
|
|
231
|
-
export const wantsLayoutNode = (c: WardConfig): boolean =>
|
|
232
|
-
c.layout === true || Predicate.isString(c.layout) || Predicate.isNotUndefined(c.layoutId) || c.layoutScroll === true || c.layoutRoot === true
|
|
233
|
-
|
|
234
230
|
/** What {@link layoutOptionsOf} reads of a ward. */
|
|
235
231
|
export interface WardLayout {
|
|
236
232
|
readonly id: string
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type * as ProjectionSystem from "@wardic/dom/ProjectionSystem"
|
|
8
8
|
import type * as Context from "effect/Context"
|
|
9
|
-
import
|
|
9
|
+
import type { ProjectionNodes } from "./features/keys.ts"
|
|
10
|
+
import { layoutBrought, type LayoutServices, projectionBrought, projectionNodesBrought } from "./features/layout.ts"
|
|
10
11
|
import { fromWardicContext } from "./provider.tsx"
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -19,6 +20,14 @@ export function useWardicProjection(): ProjectionSystem.Shape {
|
|
|
19
20
|
return fromWardicContext("useWardicProjection", projectionBrought)
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The `layout` Feature's element code beside {@link useWardicProjection}'s system (#746): what
|
|
25
|
+
* `createProjectionNode` registers its node through, after `useWardicProjection`. Internal.
|
|
26
|
+
*/
|
|
27
|
+
export function useProjectionNodes(): ProjectionNodes["Service"] {
|
|
28
|
+
return fromWardicContext("useWardicProjection", projectionNodesBrought)
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
/**
|
|
23
32
|
* {@link useWardicProjection}'s services, all of them, for a Reorder controller: the projection system
|
|
24
33
|
* and what it hears each Measure pass by (#618). Internal.
|
package/src/layout.tsx
CHANGED
|
@@ -21,8 +21,9 @@ import type * as ProjectionSystem from "@wardic/dom/ProjectionSystem"
|
|
|
21
21
|
import * as Bool from "effect/Boolean"
|
|
22
22
|
import { createContext, createEffect, createMemo, type JSX, on, onCleanup, untrack, useContext } from "solid-js"
|
|
23
23
|
import { layoutGroupIdOf, type LayoutGroupInherit } from "./layout-group.ts"
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
24
|
+
import type { ProjectionNodes } from "./features/keys.ts"
|
|
25
|
+
import type { CreateProjectionNodeOptions } from "./layout-member.ts"
|
|
26
|
+
import { useProjectionNodes, useWardicProjection } from "./layout-projection.tsx"
|
|
26
27
|
import { isServer } from "./server.ts"
|
|
27
28
|
|
|
28
29
|
export type { CreateProjectionNodeOptions } from "./layout-member.ts"
|
|
@@ -44,14 +45,14 @@ export type { CreateProjectionNodeOptions } from "./layout-member.ts"
|
|
|
44
45
|
// lead/follow stack, and seeds its first measure from a twin disposed in the same task (a Switch), in
|
|
45
46
|
// either swap order (ADR-0010 *Amendment (#13)*), so there's no registry here. It brings `layout`
|
|
46
47
|
// (#511), whatever its section has: a Slim element's own layout node is its section's.
|
|
47
|
-
export const createProjectionNode = (opts: CreateProjectionNodeOptions): ProjectionSystem.NodeHandle => projectionNodeOf(useWardicProjection(), opts)
|
|
48
|
+
export const createProjectionNode = (opts: CreateProjectionNodeOptions): ProjectionSystem.NodeHandle => projectionNodeOf(useWardicProjection(), useProjectionNodes(), opts)
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* {@link createProjectionNode} on `projection`: an element's, its section's `layout` Feature's (#511), where
|
|
51
|
-
* `createProjectionNode` brings it. Internal.
|
|
52
|
+
* `createProjectionNode` brings it, registered through the Feature's `nodes` (#746). Internal.
|
|
52
53
|
*/
|
|
53
|
-
export const projectionNodeOf = (projection: ProjectionSystem.Shape, opts: CreateProjectionNodeOptions): ProjectionSystem.NodeHandle => {
|
|
54
|
-
const handle = projection.register(registrationOf(opts))
|
|
54
|
+
export const projectionNodeOf = (projection: ProjectionSystem.Shape, nodes: ProjectionNodes["Service"], opts: CreateProjectionNodeOptions): ProjectionSystem.NodeHandle => {
|
|
55
|
+
const handle = projection.register(nodes.registrationOf(opts))
|
|
55
56
|
onCleanup(handle.dispose)
|
|
56
57
|
// Compared before it measures, as Motion's `prevProps.layoutDependency !== layoutDependency`: an
|
|
57
58
|
// effect re-runs at any change of what it read, and the config is read again at any prop's (#618).
|
package/src/live-scroll.tsx
CHANGED
|
@@ -7,22 +7,26 @@
|
|
|
7
7
|
import * as LiveValue from "@wardic/core/LiveValue"
|
|
8
8
|
import * as ScrollSource from "@wardic/core/ScrollSource"
|
|
9
9
|
import type * as ScrollOffset from "@wardic/dom/ScrollOffset"
|
|
10
|
-
import * as Arr from "effect/Array"
|
|
11
10
|
import * as Bool from "effect/Boolean"
|
|
12
11
|
import * as Effect from "effect/Effect"
|
|
13
12
|
import * as Option from "effect/Option"
|
|
14
13
|
import * as Predicate from "effect/Predicate"
|
|
15
14
|
import * as AtomRegistry from "effect/reactivity/AtomRegistry"
|
|
15
|
+
import * as Rec from "effect/Record"
|
|
16
16
|
import * as Scope from "effect/Scope"
|
|
17
17
|
import * as UndefinedOr from "effect/UndefinedOr"
|
|
18
|
-
import { type Accessor, createEffect,
|
|
18
|
+
import { type Accessor, createEffect, onCleanup } from "solid-js"
|
|
19
|
+
import { fromAtom } from "./bridge.tsx"
|
|
19
20
|
import type { Feature } from "./feature.ts"
|
|
20
21
|
import { scroll } from "./features/scroll.ts"
|
|
21
22
|
import { serviceOf } from "./gesture-features.ts"
|
|
23
|
+
import { carry } from "./live-style.ts"
|
|
22
24
|
import { CLOSE_FAILED, SERVER_ZERO } from "./live-value.tsx"
|
|
23
25
|
import * as OwnerScope from "./owner-scope.ts"
|
|
24
26
|
import { useBrought, useWardicRuntime } from "./provider.tsx"
|
|
27
|
+
import { followScroll, letGoScroll, scrollAtomsOf } from "./scroll-values.ts"
|
|
25
28
|
import { isServer } from "./server.ts"
|
|
29
|
+
import { Timelines } from "./timelines.ts"
|
|
26
30
|
|
|
27
31
|
/** What it brings (ADR-0067 decision 12): the `scroll` Feature, whatever its section has (#518). */
|
|
28
32
|
const SCROLL: ReadonlyArray<Feature> = [scroll]
|
|
@@ -61,6 +65,7 @@ export interface ScrollValues {
|
|
|
61
65
|
|
|
62
66
|
const SERVER_SCROLL: ScrollValues = { scrollX: SERVER_ZERO, scrollY: SERVER_ZERO, scrollXProgress: SERVER_ZERO, scrollYProgress: SERVER_ZERO }
|
|
63
67
|
|
|
68
|
+
|
|
64
69
|
/** An element source read now: `None` for an accessor whose ref hasn't arrived. */
|
|
65
70
|
const elementOf = (source: ElementSource): Option.Option<Element> =>
|
|
66
71
|
Bool.match(Predicate.isFunction(source), {
|
|
@@ -76,6 +81,10 @@ const elementOf = (source: ElementSource): Option.Option<Element> =>
|
|
|
76
81
|
* `container` or `target` given as an accessor of a ref reads 0s until the ref is there. 0s on a
|
|
77
82
|
* server. Motion's `useScroll`.
|
|
78
83
|
*
|
|
84
|
+
* Where the browser has native scroll timelines, an element's `opacity`, `filter`, `clipPath` or
|
|
85
|
+
* transform key given one of these, or a `createTransform` of one through ranges, is drawn by the
|
|
86
|
+
* browser with the scroll itself, so it doesn't trail a fast scroll.
|
|
87
|
+
*
|
|
79
88
|
* @example
|
|
80
89
|
* let box!: HTMLDivElement
|
|
81
90
|
* const { scrollYProgress } = createScroll({ container: () => box })
|
|
@@ -84,21 +93,29 @@ const elementOf = (source: ElementSource): Option.Option<Element> =>
|
|
|
84
93
|
* @see https://wardic.dev/reference/solid/live-values/create-scroll
|
|
85
94
|
*/
|
|
86
95
|
// #234. An accessor `container` or `target` is read in an effect, and a change of either follows the
|
|
87
|
-
// new one.
|
|
96
|
+
// new one. Each value carries one Atom for its life (#240), described as deriving as the scroll's value
|
|
97
|
+
// it's set from (`LiveValue.derivesAs`), so a Timeline value finds it: an element's `style` follows the
|
|
98
|
+
// Atom.
|
|
88
99
|
export const createScroll = (options: ScrollOptions = {}): ScrollValues => {
|
|
89
100
|
const runtime = useWardicRuntime()
|
|
90
101
|
if (isServer) return SERVER_SCROLL
|
|
91
102
|
const services = useBrought(SCROLL)
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
|
|
103
|
+
// Built now, before a `style` follows its values, so the element finds its Timeline values (#240).
|
|
104
|
+
const timelines = serviceOf(services(), Timelines)
|
|
105
|
+
const registry = runtime.runSync(AtomRegistry.AtomRegistry)
|
|
106
|
+
// Its own four Atoms, set from the scroll of the elements there now.
|
|
107
|
+
const outs = scrollAtomsOf(registry, onCleanup)
|
|
108
|
+
// Whether they follow a scroll now: a ref gone lets it go.
|
|
109
|
+
let following = false
|
|
96
110
|
createEffect(() => {
|
|
97
111
|
const container = UndefinedOr.match(options.container, { onUndefined: () => Option.some(undefined), onDefined: elementOf })
|
|
98
112
|
const target = UndefinedOr.match(options.target, { onUndefined: () => Option.some(undefined), onDefined: elementOf })
|
|
99
|
-
// A ref not there yet: the values hold until it is.
|
|
100
|
-
if (Bool.or(Option.isNone(container), Option.isNone(target)))
|
|
101
|
-
|
|
113
|
+
// A ref not there yet, or gone: the values hold until it is.
|
|
114
|
+
if (Bool.or(Option.isNone(container), Option.isNone(target))) {
|
|
115
|
+
if (following) letGoScroll(outs, timelines)
|
|
116
|
+
following = false
|
|
117
|
+
return
|
|
118
|
+
}
|
|
102
119
|
const scope = OwnerScope.open(runtime)
|
|
103
120
|
onCleanup(() => OwnerScope.close(runtime, scope, CLOSE_FAILED))
|
|
104
121
|
const values = runtime.runSync(
|
|
@@ -109,17 +126,8 @@ export const createScroll = (options: ScrollOptions = {}): ScrollValues => {
|
|
|
109
126
|
...UndefinedOr.match(options.axis, { onUndefined: () => ({}), onDefined: (axis) => ({ axis }) }),
|
|
110
127
|
}).pipe(Effect.provideService(ScrollSource.ScrollSource, serviceOf(services(), ScrollSource.ScrollSource)), Scope.provide(scope)),
|
|
111
128
|
)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
[
|
|
115
|
-
[values.scrollX, setScrollX],
|
|
116
|
-
[values.scrollY, setScrollY],
|
|
117
|
-
[values.scrollXProgress, setScrollXProgress],
|
|
118
|
-
[values.scrollYProgress, setScrollYProgress],
|
|
119
|
-
] as const,
|
|
120
|
-
([atom, set]) => registry.subscribe(atom, (v) => void set(v), { immediate: true }),
|
|
121
|
-
)
|
|
122
|
-
onCleanup(() => Arr.forEach(stops, (stop) => stop()))
|
|
129
|
+
following = true
|
|
130
|
+
onCleanup(followScroll(registry, outs, values, timelines))
|
|
123
131
|
})
|
|
124
|
-
return
|
|
132
|
+
return Rec.map(outs, (atom) => carry(fromAtom(atom), atom)) as unknown as ScrollValues
|
|
125
133
|
}
|