@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/config.ts
CHANGED
|
@@ -431,13 +431,8 @@ export type WardicLayoutBox = Box.Box
|
|
|
431
431
|
*/
|
|
432
432
|
export type WardicTransformTemplate = DomRenderer.TransformTemplate
|
|
433
433
|
|
|
434
|
-
/**
|
|
435
|
-
|
|
436
|
-
* when, how, and what it tells you. Motion's props, by Motion's names.
|
|
437
|
-
*
|
|
438
|
-
* @see https://wardic.dev/reference/solid/elements/props
|
|
439
|
-
*/
|
|
440
|
-
export interface WardConfig {
|
|
434
|
+
/** The motion props every element takes, whatever its Features: {@link WardConfig}'s base group (#516). */
|
|
435
|
+
export interface WardBaseConfig {
|
|
441
436
|
/**
|
|
442
437
|
* Where the element starts: values, a `variants` name, or `false` to start at `animate`, so nothing
|
|
443
438
|
* animates as it mounts. On a server-rendered page, the element arrives in the HTML at `initial`.
|
|
@@ -490,6 +485,70 @@ export interface WardConfig {
|
|
|
490
485
|
// #50. By default a Variant child (variants, no initial/animate name of its own) joins its nearest
|
|
491
486
|
// ancestor with variants (CONTEXT.md).
|
|
492
487
|
readonly inherit?: boolean
|
|
488
|
+
/**
|
|
489
|
+
* How the element moves to a target: a spring (`stiffness`, `damping`, `mass`, or `duration` and
|
|
490
|
+
* `bounce`), a tween (`duration`, `ease`), keyframes' `times`, or `inertia`, with `delay`, `repeat`
|
|
491
|
+
* and, for variants, `staggerChildren` and `when`. A value's own (`opacity: {…}`) or `layout`'s apply
|
|
492
|
+
* to it alone. Without one, each value gets Motion's default.
|
|
493
|
+
*
|
|
494
|
+
* @example <w.div transition={{ type: "spring", stiffness: 300, damping: 20 }} />
|
|
495
|
+
* @see https://wardic.dev/guides/transitions
|
|
496
|
+
*/
|
|
497
|
+
// Per-value entries: ADR-0049. Default transitions: ADR-0051.
|
|
498
|
+
readonly transition?: WardicTransition
|
|
499
|
+
/**
|
|
500
|
+
* Where the element animates as it leaves an `<AnimatePresence>`: values or a `variants` name. The
|
|
501
|
+
* element stays on the page until it has played.
|
|
502
|
+
*
|
|
503
|
+
* @example <w.div exit={{ opacity: 0, scale: 0.9 }} />
|
|
504
|
+
*/
|
|
505
|
+
// ADR-0007: the child doesn't drive it (it's disposed); its spine publishes the exit into the
|
|
506
|
+
// presence registration, and the presence runs it on the retained node. A dynamic variant resolves
|
|
507
|
+
// as it leaves (#277); its own transition, else the element's.
|
|
508
|
+
readonly exit?: WardicVariant | WardicVariantLabels
|
|
509
|
+
/**
|
|
510
|
+
* Called when an animation of the element starts, with what it animates to: the variant name, or
|
|
511
|
+
* the values. Not for a layout animation, which has its own. Solid 1's.
|
|
512
|
+
*/
|
|
513
|
+
// #257: at each Retarget that starts one (animate, its variant, a gesture layer turning on or off).
|
|
514
|
+
// Not for a same-target change, a drag's momentum or return. Read at that Retarget.
|
|
515
|
+
readonly onAnimationStart?: (definition: WardicAnimationDefinition) => void
|
|
516
|
+
/**
|
|
517
|
+
* Called when that animation lands, with the same definition, once every value it moves has
|
|
518
|
+
* settled. Not for one interrupted by a new target. Solid 1; on Solid 2, the element's ward gives
|
|
519
|
+
* `next("settled")`.
|
|
520
|
+
*/
|
|
521
|
+
// #257. Read at the Retarget that started it.
|
|
522
|
+
readonly onAnimationComplete?: (definition: WardicAnimationDefinition) => void
|
|
523
|
+
/**
|
|
524
|
+
* Called once a frame in which the element's values changed, with every value it holds (`x` as a
|
|
525
|
+
* number). The object is reused: read it during the call, or copy it. For one value, `ward.read(key)`
|
|
526
|
+
* on Solid 2, or `ward.value(key)` on Solid 1, costs less.
|
|
527
|
+
*/
|
|
528
|
+
// #233. After that frame's commits, before it's drawn. Whether it reports is read once at mount; the
|
|
529
|
+
// function at each call. A signal it sets paints in the next frame.
|
|
530
|
+
readonly onUpdate?: (latest: Readonly<Record<string, number | string>>) => void
|
|
531
|
+
/**
|
|
532
|
+
* Builds the element's whole `transform` from its values and the one Wardic would draw, wherever
|
|
533
|
+
* it's drawn: at rest, animating, on the server and during a layout animation.
|
|
534
|
+
*
|
|
535
|
+
* @example <w.div transformTemplate={(_, generated) => `translate(-50%, -50%) ${generated}`} />
|
|
536
|
+
*/
|
|
537
|
+
// #443, a Transform template. See WardicTransformTemplate for what it's handed. Whether it has one is
|
|
538
|
+
// read at mount; the function each frame.
|
|
539
|
+
readonly transformTemplate?: WardicTransformTemplate
|
|
540
|
+
/**
|
|
541
|
+
* `false`: on a server-rendered page, this element's entrance waits for the JavaScript instead of
|
|
542
|
+
* playing from the first paint. The provider's `appear` sets it for every element.
|
|
543
|
+
*
|
|
544
|
+
* @see https://wardic.dev/guides/server-rendering
|
|
545
|
+
*/
|
|
546
|
+
// #48, ADR-0044. Read on the server, once.
|
|
547
|
+
readonly appear?: boolean
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/** The motion props the `hover` Feature reads: {@link WardConfig}'s `hover` group (#516). */
|
|
551
|
+
export interface WardHoverConfig {
|
|
493
552
|
/**
|
|
494
553
|
* Where the element animates while the pointer is over it, and back when it leaves: values or a
|
|
495
554
|
* `variants` name, which children with `variants` follow too. Needs the `hover` Feature.
|
|
@@ -499,6 +558,18 @@ export interface WardConfig {
|
|
|
499
558
|
// Priority: under whileTap and whileDrag, over whileFocus and whileInView. Names reach Variant
|
|
500
559
|
// children (#291).
|
|
501
560
|
readonly whileHover?: WardicVariant | WardicVariantLabels
|
|
561
|
+
// Motion's gesture callbacks (#273, ADR-0047): `(event, info)`, the DOM's PointerEvent first, called
|
|
562
|
+
// at the event, `info.point` in the viewport (not Motion's page). A hover's or a tap's starts its
|
|
563
|
+
// recognizer, as a while* does, set at mount or later. Solid 1's: Solid 2 hears the same through
|
|
564
|
+
// next(name). One that throws is reported, and the gesture goes on.
|
|
565
|
+
/** Called when the pointer comes over the element (a touch never hovers). Solid 1; Solid 2's ward gives `"hoverStart"`. */
|
|
566
|
+
readonly onHoverStart?: (event: PointerEvent, info: WardicPointInfo) => void
|
|
567
|
+
/** Called when the pointer leaves the element. Solid 1; Solid 2's ward gives `"hoverEnd"`. */
|
|
568
|
+
readonly onHoverEnd?: (event: PointerEvent, info: WardicPointInfo) => void
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/** The motion props the `press` Feature reads: {@link WardConfig}'s `press` group (#516). */
|
|
572
|
+
export interface WardPressConfig {
|
|
502
573
|
/**
|
|
503
574
|
* Where the element animates while it's pressed, by a pointer or by Enter or Space while it has
|
|
504
575
|
* focus. Needs the `press` Feature.
|
|
@@ -515,19 +586,40 @@ export interface WardConfig {
|
|
|
515
586
|
// element with a press claims; drags hold their own Drag claim.
|
|
516
587
|
readonly propagate?: WardicPropagate
|
|
517
588
|
/**
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
* @example <w.div whileInView={{ opacity: 1 }} viewport={{ once: true }} />
|
|
589
|
+
* Called when a press begins on the element: a pointer going down, or Enter or Space while it has
|
|
590
|
+
* focus (`info.input` says which). Solid 1; Solid 2's ward gives `"pressStart"`.
|
|
522
591
|
*/
|
|
523
|
-
//
|
|
524
|
-
readonly
|
|
592
|
+
// Keyboard presses: #427.
|
|
593
|
+
readonly onTapStart?: (event: WardicPressEvent, info: WardicPressInfo) => void
|
|
594
|
+
/** Called when that press ends on the element: a release on it, or its key coming up. Solid 1; Solid 2's ward gives `"tap"`. */
|
|
595
|
+
readonly onTap?: (event: WardicPressEvent, info: WardicPressInfo) => void
|
|
596
|
+
/**
|
|
597
|
+
* Called when that press ends anywhere else, or is cancelled. A press a drag took over is neither a
|
|
598
|
+
* tap nor a cancel. Solid 1; Solid 2's ward gives `"tapCancel"`.
|
|
599
|
+
*/
|
|
600
|
+
readonly onTapCancel?: (event: WardicPressEvent, info: WardicPressInfo) => void
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/** The motion props the `focus` Feature reads: {@link WardConfig}'s `focus` group (#516). */
|
|
604
|
+
export interface WardFocusConfig {
|
|
525
605
|
/**
|
|
526
606
|
* Where the element animates while it has the keyboard's focus (as `:focus-visible` shows it, not
|
|
527
607
|
* a click's). Needs the `focus` Feature.
|
|
528
608
|
*/
|
|
529
609
|
// #273. Under the pointer gestures, over whileInView.
|
|
530
610
|
readonly whileFocus?: WardicVariant | WardicVariantLabels
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/** The motion props the `inView` Feature reads: {@link WardConfig}'s `inView` group (#516). */
|
|
614
|
+
export interface WardInViewConfig {
|
|
615
|
+
/**
|
|
616
|
+
* Where the element animates while it's in view, as `viewport` defines it. Needs the `inView`
|
|
617
|
+
* Feature.
|
|
618
|
+
*
|
|
619
|
+
* @example <w.div whileInView={{ opacity: 1 }} viewport={{ once: true }} />
|
|
620
|
+
*/
|
|
621
|
+
// #273, ADR-0047. Under whileFocus and the pointer gestures.
|
|
622
|
+
readonly whileInView?: WardicVariant | WardicVariantLabels
|
|
531
623
|
/**
|
|
532
624
|
* What "in view" means for `whileInView` and the viewport callbacks: `root`, a scrolling container
|
|
533
625
|
* (the window if none); `margin`, grown around it, as CSS `rootMargin`; `amount` of the element that
|
|
@@ -535,6 +627,33 @@ export interface WardConfig {
|
|
|
535
627
|
*/
|
|
536
628
|
// #273. Read when the recognizer starts.
|
|
537
629
|
readonly viewport?: WardicViewport
|
|
630
|
+
/** Called when the element comes into view, as `viewport` defines it, with the browser's `IntersectionObserverEntry`. Solid 1; Solid 2's ward gives `"viewportEnter"`. */
|
|
631
|
+
readonly onViewportEnter?: (entry: IntersectionObserverEntry) => void
|
|
632
|
+
/** Called when the element leaves the view. With `viewport.once`, never after the first entry. Solid 1; Solid 2's ward gives `"viewportLeave"`. */
|
|
633
|
+
readonly onViewportLeave?: (entry: IntersectionObserverEntry) => void
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/** The motion props the `pan` Feature reads: {@link WardConfig}'s `pan` group (#516). */
|
|
637
|
+
export interface WardPanConfig {
|
|
638
|
+
/**
|
|
639
|
+
* Called when a pointer goes down on the element, ready to pan. A pan moves nothing itself: read
|
|
640
|
+
* its offset and velocity in `onPan`. On a touch screen, give the element a `touch-action`, such as
|
|
641
|
+
* `pan-y` for a sideways pan, or the page's scroll takes the gesture. Solid 1; Solid 2's ward gives
|
|
642
|
+
* `"panSessionStart"`.
|
|
643
|
+
*/
|
|
644
|
+
// Once started, a pan counts as a drag for the element's press and hover: a press it took over is
|
|
645
|
+
// neither a tap nor a cancel (ADR-0047).
|
|
646
|
+
readonly onPanSessionStart?: (event: PointerEvent, info: WardicPointInfo) => void
|
|
647
|
+
/** Called when a pan starts, past its threshold. Solid 1; Solid 2's ward gives `"panStart"`. */
|
|
648
|
+
readonly onPanStart?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
649
|
+
/** Called as the pan moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"pan"`. */
|
|
650
|
+
readonly onPan?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
651
|
+
/** Called when a pan that started ends, or is cancelled. Solid 1; Solid 2's ward gives `"panEnd"`. */
|
|
652
|
+
readonly onPanEnd?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/** The motion props the `drag` Feature reads: {@link WardConfig}'s `drag` group (#516). */
|
|
656
|
+
export interface WardDragConfig {
|
|
538
657
|
/**
|
|
539
658
|
* Makes the element draggable: `true` on both axes, `"x"` or `"y"` on one. On release it carries on
|
|
540
659
|
* at the speed it was let go, a Fling, and slows to a stop. Needs the `drag` Feature.
|
|
@@ -615,27 +734,20 @@ export interface WardConfig {
|
|
|
615
734
|
*/
|
|
616
735
|
// #431. Read once at mount.
|
|
617
736
|
readonly dragListener?: boolean
|
|
618
|
-
/**
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
*
|
|
633
|
-
* @example <w.div exit={{ opacity: 0, scale: 0.9 }} />
|
|
634
|
-
*/
|
|
635
|
-
// ADR-0007: the child doesn't drive it (it's disposed); its spine publishes the exit into the
|
|
636
|
-
// presence registration, and the presence runs it on the retained node. A dynamic variant resolves
|
|
637
|
-
// as it leaves (#277); its own transition, else the element's.
|
|
638
|
-
readonly exit?: WardicVariant | WardicVariantLabels
|
|
737
|
+
/** Called when a drag of the element starts. Solid 1; Solid 2's ward gives `"dragStart"`. */
|
|
738
|
+
readonly onDragStart?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
739
|
+
/** Called as the drag moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"drag"`. */
|
|
740
|
+
readonly onDrag?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
741
|
+
/** Called when the drag is let go. Solid 1; Solid 2's ward gives `"dragEnd"`. */
|
|
742
|
+
readonly onDragEnd?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
743
|
+
/** Called when the element comes to rest after it's let go. Not when a new grab stops it. Solid 1; Solid 2's ward gives `"dragTransitionEnd"`. */
|
|
744
|
+
readonly onDragTransitionEnd?: () => void
|
|
745
|
+
/** With `dragDirectionLock`: called with the axis a drag locked to, before `onDragStart`. Solid 1; Solid 2's ward gives `"directionLock"`. */
|
|
746
|
+
readonly onDirectionLock?: (axis: "x" | "y") => void
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/** The motion props the `layout` Feature reads: {@link WardConfig}'s `layout` group (#516). */
|
|
750
|
+
export interface WardLayoutConfig {
|
|
639
751
|
/**
|
|
640
752
|
* Animates the element's layout: when its size or place on the page changes, by its own layout or
|
|
641
753
|
* its siblings', it moves there smoothly instead of jumping. `"position"` or `"size"` animates only
|
|
@@ -695,70 +807,6 @@ export interface WardConfig {
|
|
|
695
807
|
*/
|
|
696
808
|
// #442, ADR-0010. Read as each handover begins; only the twin that becomes the Lead reads it.
|
|
697
809
|
readonly layoutCrossfade?: boolean
|
|
698
|
-
/**
|
|
699
|
-
* Called when an animation of the element starts, with what it animates to: the variant name, or
|
|
700
|
-
* the values. Not for a layout animation, which has its own. Solid 1's.
|
|
701
|
-
*/
|
|
702
|
-
// #257: at each Retarget that starts one (animate, its variant, a gesture layer turning on or off).
|
|
703
|
-
// Not for a same-target change, a drag's momentum or return. Read at that Retarget.
|
|
704
|
-
readonly onAnimationStart?: (definition: WardicAnimationDefinition) => void
|
|
705
|
-
/**
|
|
706
|
-
* Called when that animation lands, with the same definition, once every value it moves has
|
|
707
|
-
* settled. Not for one interrupted by a new target. Solid 1; on Solid 2, the element's ward gives
|
|
708
|
-
* `next("settled")`.
|
|
709
|
-
*/
|
|
710
|
-
// #257. Read at the Retarget that started it.
|
|
711
|
-
readonly onAnimationComplete?: (definition: WardicAnimationDefinition) => void
|
|
712
|
-
// Motion's gesture callbacks (#273, ADR-0047): `(event, info)`, the DOM's PointerEvent first, called
|
|
713
|
-
// at the event, `info.point` in the viewport (not Motion's page). A hover's or a tap's starts its
|
|
714
|
-
// recognizer, as a while* does, set at mount or later. Solid 1's: Solid 2 hears the same through
|
|
715
|
-
// next(name). One that throws is reported, and the gesture goes on.
|
|
716
|
-
/** Called when the pointer comes over the element (a touch never hovers). Solid 1; Solid 2's ward gives `"hoverStart"`. */
|
|
717
|
-
readonly onHoverStart?: (event: PointerEvent, info: WardicPointInfo) => void
|
|
718
|
-
/** Called when the pointer leaves the element. Solid 1; Solid 2's ward gives `"hoverEnd"`. */
|
|
719
|
-
readonly onHoverEnd?: (event: PointerEvent, info: WardicPointInfo) => void
|
|
720
|
-
/**
|
|
721
|
-
* Called when a press begins on the element: a pointer going down, or Enter or Space while it has
|
|
722
|
-
* focus (`info.input` says which). Solid 1; Solid 2's ward gives `"pressStart"`.
|
|
723
|
-
*/
|
|
724
|
-
// Keyboard presses: #427.
|
|
725
|
-
readonly onTapStart?: (event: WardicPressEvent, info: WardicPressInfo) => void
|
|
726
|
-
/** Called when that press ends on the element: a release on it, or its key coming up. Solid 1; Solid 2's ward gives `"tap"`. */
|
|
727
|
-
readonly onTap?: (event: WardicPressEvent, info: WardicPressInfo) => void
|
|
728
|
-
/**
|
|
729
|
-
* Called when that press ends anywhere else, or is cancelled. A press a drag took over is neither a
|
|
730
|
-
* tap nor a cancel. Solid 1; Solid 2's ward gives `"tapCancel"`.
|
|
731
|
-
*/
|
|
732
|
-
readonly onTapCancel?: (event: WardicPressEvent, info: WardicPressInfo) => void
|
|
733
|
-
/** Called when a drag of the element starts. Solid 1; Solid 2's ward gives `"dragStart"`. */
|
|
734
|
-
readonly onDragStart?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
735
|
-
/** Called as the drag moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"drag"`. */
|
|
736
|
-
readonly onDrag?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
737
|
-
/** Called when the drag is let go. Solid 1; Solid 2's ward gives `"dragEnd"`. */
|
|
738
|
-
readonly onDragEnd?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
739
|
-
/** Called when the element comes to rest after it's let go. Not when a new grab stops it. Solid 1; Solid 2's ward gives `"dragTransitionEnd"`. */
|
|
740
|
-
readonly onDragTransitionEnd?: () => void
|
|
741
|
-
/** With `dragDirectionLock`: called with the axis a drag locked to, before `onDragStart`. Solid 1; Solid 2's ward gives `"directionLock"`. */
|
|
742
|
-
readonly onDirectionLock?: (axis: "x" | "y") => void
|
|
743
|
-
/** Called when the element comes into view, as `viewport` defines it, with the browser's `IntersectionObserverEntry`. Solid 1; Solid 2's ward gives `"viewportEnter"`. */
|
|
744
|
-
readonly onViewportEnter?: (entry: IntersectionObserverEntry) => void
|
|
745
|
-
/** Called when the element leaves the view. With `viewport.once`, never after the first entry. Solid 1; Solid 2's ward gives `"viewportLeave"`. */
|
|
746
|
-
readonly onViewportLeave?: (entry: IntersectionObserverEntry) => void
|
|
747
|
-
/**
|
|
748
|
-
* Called when a pointer goes down on the element, ready to pan. A pan moves nothing itself: read
|
|
749
|
-
* its offset and velocity in `onPan`. On a touch screen, give the element a `touch-action`, such as
|
|
750
|
-
* `pan-y` for a sideways pan, or the page's scroll takes the gesture. Solid 1; Solid 2's ward gives
|
|
751
|
-
* `"panSessionStart"`.
|
|
752
|
-
*/
|
|
753
|
-
// Once started, a pan counts as a drag for the element's press and hover: a press it took over is
|
|
754
|
-
// neither a tap nor a cancel (ADR-0047).
|
|
755
|
-
readonly onPanSessionStart?: (event: PointerEvent, info: WardicPointInfo) => void
|
|
756
|
-
/** Called when a pan starts, past its threshold. Solid 1; Solid 2's ward gives `"panStart"`. */
|
|
757
|
-
readonly onPanStart?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
758
|
-
/** Called as the pan moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"pan"`. */
|
|
759
|
-
readonly onPan?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
760
|
-
/** Called when a pan that started ends, or is cancelled. Solid 1; Solid 2's ward gives `"panEnd"`. */
|
|
761
|
-
readonly onPanEnd?: (event: PointerEvent, info: WardicDragInfo) => void
|
|
762
810
|
/**
|
|
763
811
|
* Called when a layout animation of the element starts moving. Not when there's nothing to move.
|
|
764
812
|
* Solid 1; Solid 2's ward gives `"layoutStart"`.
|
|
@@ -773,23 +821,6 @@ export interface WardConfig {
|
|
|
773
821
|
*/
|
|
774
822
|
// #191, ADR-0039.
|
|
775
823
|
readonly onLayoutAnimationComplete?: () => void
|
|
776
|
-
/**
|
|
777
|
-
* Called once a frame in which the element's values changed, with every value it holds (`x` as a
|
|
778
|
-
* number). The object is reused: read it during the call, or copy it. For one value, `ward.read(key)`
|
|
779
|
-
* on Solid 2, or `ward.value(key)` on Solid 1, costs less.
|
|
780
|
-
*/
|
|
781
|
-
// #233. After that frame's commits, before it's drawn. Whether it reports is read once at mount; the
|
|
782
|
-
// function at each call. A signal it sets paints in the next frame.
|
|
783
|
-
readonly onUpdate?: (latest: Readonly<Record<string, number | string>>) => void
|
|
784
|
-
/**
|
|
785
|
-
* Builds the element's whole `transform` from its values and the one Wardic would draw, wherever
|
|
786
|
-
* it's drawn: at rest, animating, on the server and during a layout animation.
|
|
787
|
-
*
|
|
788
|
-
* @example <w.div transformTemplate={(_, generated) => `translate(-50%, -50%) ${generated}`} />
|
|
789
|
-
*/
|
|
790
|
-
// #443, a Transform template. See WardicTransformTemplate for what it's handed. Whether it has one is
|
|
791
|
-
// read at mount; the function each frame.
|
|
792
|
-
readonly transformTemplate?: WardicTransformTemplate
|
|
793
824
|
/** Called as each layout measure of this layout element begins, before it's measured. */
|
|
794
825
|
// #443. Resize-blocked and instant measures included. A throw is reported, and the measure goes on.
|
|
795
826
|
readonly onBeforeLayoutMeasure?: () => void
|
|
@@ -799,12 +830,35 @@ export interface WardConfig {
|
|
|
799
830
|
*/
|
|
800
831
|
// #443: after the read, before any animation starts. A throw is reported.
|
|
801
832
|
readonly onLayoutMeasure?: (box: WardicLayoutBox, prev: WardicLayoutBox | undefined) => void
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* The motion props a Wardic element takes, and the config a ward is made with: what it animates,
|
|
837
|
+
* when, how, and what it tells you. Motion's props, by Motion's names.
|
|
838
|
+
*
|
|
839
|
+
* @see https://wardic.dev/reference/solid/elements/props
|
|
840
|
+
*/
|
|
841
|
+
export interface WardConfig
|
|
842
|
+
extends WardBaseConfig,
|
|
843
|
+
WardHoverConfig,
|
|
844
|
+
WardPressConfig,
|
|
845
|
+
WardFocusConfig,
|
|
846
|
+
WardInViewConfig,
|
|
847
|
+
WardPanConfig,
|
|
848
|
+
WardDragConfig,
|
|
849
|
+
WardLayoutConfig {}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Each Feature's motion props, by its name (#516, ADR-0067 *Amendment (#516)*): what a **Wardic
|
|
853
|
+
* instance**'s elements take for the Features it has, beside {@link WardBaseConfig}. `colors` and
|
|
854
|
+
* `scroll` add none. Solid 1's; Solid 2's are these without Solid 1's callbacks.
|
|
855
|
+
*/
|
|
856
|
+
export interface WardFeatureConfigs {
|
|
857
|
+
readonly hover: WardHoverConfig
|
|
858
|
+
readonly press: WardPressConfig
|
|
859
|
+
readonly focus: WardFocusConfig
|
|
860
|
+
readonly inView: WardInViewConfig
|
|
861
|
+
readonly pan: WardPanConfig
|
|
862
|
+
readonly drag: WardDragConfig
|
|
863
|
+
readonly layout: WardLayoutConfig
|
|
810
864
|
}
|
package/src/create-ward.tsx
CHANGED
|
@@ -72,7 +72,6 @@ import { createVariantNode } from "./variant-node.ts"
|
|
|
72
72
|
import { type GestureStates, type NameOrchestration, type ServerVariantNode, serverVariantNode, startingValuesOf, startsQuiet } from "./variant-tree.ts"
|
|
73
73
|
import { registerAnimatable } from "./imperative.ts"
|
|
74
74
|
import { projectionNodeOf, useLayoutGroupId } from "./layout.tsx"
|
|
75
|
-
import { layoutOptionsOf, wantsLayoutNode } from "./layout-member.ts"
|
|
76
75
|
|
|
77
76
|
|
|
78
77
|
|
|
@@ -85,11 +84,11 @@ import { type PresenceSeed, presenceSeedOf } from "./presence-record.ts"
|
|
|
85
84
|
import type { PresenceRecord } from "./presence-record.ts"
|
|
86
85
|
import { createWhenWanted, NEVER_STARTED, type Started, stateOf, type Wants } from "./sensors.tsx"
|
|
87
86
|
import { type GestureCallbacks, gestureCallbacksOf, inViewOptionsOf, wantsFocus, wantsHover, wantsInView, wantsPan, wantsPress } from "./gesture-callbacks.ts"
|
|
88
|
-
import { type Feature, type FeatureRegistry, type FeatureSection, LAYOUT_PROPS, missingMessage, unreadColorIn } from "./feature.ts"
|
|
87
|
+
import { type Feature, type FeatureRegistry, type FeatureSection, type InstanceFeatures, LAYOUT_PROPS, missingMessage, unreadColorIn, wantsLayoutNode } from "./feature.ts"
|
|
89
88
|
import { runWatch, useBuiltProjection, useElementFeatures, useFeatureRegistry, useWardicAppear, useWardicDefaultTransition, useWardicGate, useWardicPositionalKeys, useWardicReducedMotion, useWardicRenderer, useWardicRuntime, useWardicSkipAnimations } from "./provider.tsx"
|
|
90
89
|
import { useWardicConfig } from "./wardic-config.tsx"
|
|
91
90
|
import { transformPagePointOf } from "./wardic-config-value.ts"
|
|
92
|
-
import { projectionIn, type WardicRuntime } from "./runtime.ts"
|
|
91
|
+
import { projectionIn, projectionNodesIn, type WardicRuntime } from "./runtime.ts"
|
|
93
92
|
import { isHydrating, isServer } from "./server.ts"
|
|
94
93
|
import { reactivity } from "./solid-reactivity.ts"
|
|
95
94
|
import {
|
|
@@ -123,6 +122,8 @@ import {
|
|
|
123
122
|
sameResolution,
|
|
124
123
|
serverStartingStyle,
|
|
125
124
|
snapshotOf,
|
|
125
|
+
SPINE_DIAGNOSTICS,
|
|
126
|
+
type SpineDiagnostics,
|
|
126
127
|
startLinksOf,
|
|
127
128
|
type Start,
|
|
128
129
|
startOf,
|
|
@@ -278,6 +279,8 @@ export interface SpineInternals {
|
|
|
278
279
|
readonly gestureless?: boolean | undefined
|
|
279
280
|
readonly brings?: ReadonlyArray<Feature> | undefined
|
|
280
281
|
readonly complete?: boolean | undefined
|
|
282
|
+
/** A Wardic instance's Features (#516): its element brings them, given at once or loaded, beside its section's. */
|
|
283
|
+
readonly instance?: InstanceFeatures | undefined
|
|
281
284
|
/**
|
|
282
285
|
* Whether the element's drag defaults go on it at mount too, for a `wardic.create(Component)`
|
|
283
286
|
* wrap: its component may not pass the spread's `style` and `draggable` on (#253).
|
|
@@ -459,10 +462,12 @@ const layoutNodeOf = (atMount: ProjectionSystem.NodeHandle | undefined, later: L
|
|
|
459
462
|
export function runSpine(opts: RunSpineOptions): void {
|
|
460
463
|
const { bindGestures, byName, canStart, cfg, controls, defaultsInProps, el, entersFresh, extraDelay, gate, hydrating, id, internal = NO_INTERNALS, live, makeSink, onFrame, parent, restartStyle, runtime, styleOf, tag } = opts
|
|
461
464
|
// Its Features (#511, ADR-0067): its section's, and those it brings.
|
|
462
|
-
const features = UndefinedOr.match(opts.features, { onDefined: identity, onUndefined: () => useElementFeatures(internal
|
|
465
|
+
const features = UndefinedOr.match(opts.features, { onDefined: identity, onUndefined: () => useElementFeatures(internal) })
|
|
463
466
|
// Its section's projection system, the `layout` Feature's (#511): `undefined` without it. Read now,
|
|
464
467
|
// which builds the Features given to its section at once: the first element to ask builds them.
|
|
465
468
|
const layoutProjection = projectionIn(untrack(features.services))
|
|
469
|
+
// Every Feature its provider has built: where its spine finds its Timeline values (#240).
|
|
470
|
+
const builtFeatures = useFeatureRegistry().built
|
|
466
471
|
// The provider's, once any section has built it: what its values register with.
|
|
467
472
|
const builtProjection = useBuiltProjection()
|
|
468
473
|
// Its Animation controls' change (#433), read with the Override stack: none without them.
|
|
@@ -667,9 +672,11 @@ export function runSpine(opts: RunSpineOptions): void {
|
|
|
667
672
|
}
|
|
668
673
|
const onLayoutHandle = internal.onLayoutHandle
|
|
669
674
|
// Its node on `projection`, handed to a `<Reorder>` item's group; `takenNow`, where a child that
|
|
670
|
-
// takes over from a leaver starts, at its mount only (#286).
|
|
675
|
+
// takes over from a leaver starts, at its mount only (#286). Made by the `layout` Feature's code
|
|
676
|
+
// (#746), read from its section's Features, which have `layout` once they have `projection`.
|
|
671
677
|
const layoutNodeOn = (projection: ProjectionSystem.Shape, takenNow: PresenceSeed | undefined): ProjectionSystem.NodeHandle => {
|
|
672
|
-
const
|
|
678
|
+
const nodes = projectionNodesIn(untrack(features.services))
|
|
679
|
+
const handle = projectionNodeOf(projection, nodes, nodes.optionsOf({ ...ward, taken: takenNow }))
|
|
673
680
|
if (Predicate.isNotUndefined(onLayoutHandle)) onLayoutHandle(handle)
|
|
674
681
|
return handle
|
|
675
682
|
}
|
|
@@ -923,6 +930,7 @@ export function runSpine(opts: RunSpineOptions): void {
|
|
|
923
930
|
links,
|
|
924
931
|
styleNow,
|
|
925
932
|
live,
|
|
933
|
+
builtFeatures,
|
|
926
934
|
presence: presenceRec,
|
|
927
935
|
projected: Predicate.isNotUndefined(layoutHandle),
|
|
928
936
|
dragAxis: dragCfg,
|
|
@@ -930,6 +938,7 @@ export function runSpine(opts: RunSpineOptions): void {
|
|
|
930
938
|
handoff,
|
|
931
939
|
// Motion's onAnimationStart / onAnimationComplete (#257).
|
|
932
940
|
animation: animationCallbacks(runtime, id),
|
|
941
|
+
diagnostics: devSpineDiagnostics(),
|
|
933
942
|
}
|
|
934
943
|
// A track that starts once `drag` arrives (#551) is read at each Retarget from then on: only
|
|
935
944
|
// then is `drag` a getter, so an element that has it at mount, or never wants it, pays nothing.
|
|
@@ -977,6 +986,21 @@ export function runSpine(opts: RunSpineOptions): void {
|
|
|
977
986
|
)
|
|
978
987
|
}
|
|
979
988
|
|
|
989
|
+
/**
|
|
990
|
+
* Development's diagnostics for the spine (#746, ADR-0067 *Amendment (#746)*, decision 6): given under
|
|
991
|
+
* Solid's `DEV` alone, so a production build ships none of their code.
|
|
992
|
+
*/
|
|
993
|
+
const devSpineDiagnostics = (): SpineDiagnostics | undefined => {
|
|
994
|
+
if (DEV) return SPINE_DIAGNOSTICS
|
|
995
|
+
return undefined
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/** In development alone (#746), what warns once that a `transform` string gave way to `style`'s transform keys. */
|
|
999
|
+
const droppedTransformWarning = (runtime: WardicRuntime, id: string): (() => void) | undefined => {
|
|
1000
|
+
if (DEV) return () => warnDroppedTransform(runtime, id)
|
|
1001
|
+
return undefined
|
|
1002
|
+
}
|
|
1003
|
+
|
|
980
1004
|
/**
|
|
981
1005
|
* Says, once per provider and gesture, that the element wants a gesture its section has no Feature for
|
|
982
1006
|
* (#511, ADR-0067 decision 7): outside a lazy load. Development only (its caller's `DEV`).
|
|
@@ -1014,7 +1038,7 @@ export function createWardWith(config: WardConfig | Accessor<WardConfig>, intern
|
|
|
1014
1038
|
const runtime = useWardicRuntime()
|
|
1015
1039
|
// Its Features (#511, ADR-0067), a Complete element's every one: what they register, a server
|
|
1016
1040
|
// render's elements read too (the `colors` Feature's spaces).
|
|
1017
|
-
const features = useElementFeatures(internal
|
|
1041
|
+
const features = useElementFeatures(internal)
|
|
1018
1042
|
// A server render takes the lean path: the Starting style only, no spine (ADR-0021).
|
|
1019
1043
|
if (isServer) return serverWard(config, internal)
|
|
1020
1044
|
const gate = useWardicGate()
|
|
@@ -1061,7 +1085,7 @@ export function createWardWith(config: WardConfig | Accessor<WardConfig>, intern
|
|
|
1061
1085
|
|
|
1062
1086
|
// Its routed `style` keys (#130, ADR-0043): its Live values and transform keys, which the gate
|
|
1063
1087
|
// writes from mount, and the Starting style carries until then, under `initial`'s.
|
|
1064
|
-
const live = createLiveStyle({ registry: registryOf(runtime), onDroppedTransform: (
|
|
1088
|
+
const live = createLiveStyle({ registry: registryOf(runtime), onDroppedTransform: droppedTransformWarning(runtime, id), reactivity })
|
|
1065
1089
|
const projectStarting = Bool.match(hydrating, { onTrue: () => DomRenderer.project, onFalse: () => project })
|
|
1066
1090
|
const startingWith = (routed: Values.Values): Renderer.Patch =>
|
|
1067
1091
|
Svg.splitPatchForTag(internal.tag, projectStarting(drawnAtRest({ ...routed, ...initialValues }, layoutNode, initialConfig.transformTemplate))).style
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `createWardic(features)` (#516, ADR-0067 *Amendment (#516)*): a **Wardic instance**, a `w` whose
|
|
3
|
+
* elements bring `features` wherever they render, typed to their props alone, and the layout hooks.
|
|
4
|
+
* In a module of its own that names no Feature: an app's instance module ships the Features it gives.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import { type InstanceFeaturesProp } from "./feature.ts"
|
|
9
|
+
import { instanceFeaturesOf } from "./instance-features.ts"
|
|
10
|
+
import { createInstantLayoutTransition, createResetProjection, useAnimateLayout, useInstanceBrought } from "./provider.tsx"
|
|
11
|
+
import { wOf } from "./w.tsx"
|
|
12
|
+
import type { WardicInstance } from "./wardic-instance.ts"
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Makes a Wardic instance: a `w` whose elements bring `features` wherever they render and take their
|
|
16
|
+
* props alone, so a prop of a Feature the list lacks is a type error that names it. Give each Feature
|
|
17
|
+
* at once, or a load (`() => import(…)`), which starts the first time one of its elements or wards is
|
|
18
|
+
* made, or a hook is called, on the client. With `layout`, it returns the layout hooks too, which bring
|
|
19
|
+
* it. Call it once, in a module of its own. Motion has no counterpart; its nearest is `m` under
|
|
20
|
+
* `LazyMotion`, whose Features its types don't follow.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // src/lib/wardic.ts
|
|
24
|
+
* export const { w } = createWardic([domAnimation, layout])
|
|
25
|
+
* @see https://wardic.dev/reference/solid/elements/wardic-instance
|
|
26
|
+
*/
|
|
27
|
+
// #516: decisions 1 (beside the sections), 2 (its elements bring their Features), 4 (every form), 5 (the
|
|
28
|
+
// layout hooks), 7 (loads), 8 (`strict` allows them).
|
|
29
|
+
export function createWardic<const F extends InstanceFeaturesProp>(features: F): WardicInstance<F> {
|
|
30
|
+
const instance = instanceFeaturesOf(features)
|
|
31
|
+
/** `hook`, its instance's Features brought first. */
|
|
32
|
+
const bringing =
|
|
33
|
+
<A,>(hook: () => A) =>
|
|
34
|
+
(): A => {
|
|
35
|
+
useInstanceBrought(instance)
|
|
36
|
+
return hook()
|
|
37
|
+
}
|
|
38
|
+
// The layout hooks are there at runtime whatever its Features: its type shows them only with `layout`.
|
|
39
|
+
return {
|
|
40
|
+
w: wOf({ instance }),
|
|
41
|
+
useAnimateLayout: bringing(useAnimateLayout),
|
|
42
|
+
createInstantLayoutTransition: bringing(createInstantLayoutTransition),
|
|
43
|
+
createResetProjection: bringing(createResetProjection),
|
|
44
|
+
} as unknown as WardicInstance<F>
|
|
45
|
+
}
|