@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/presence-record.ts
CHANGED
|
@@ -19,7 +19,7 @@ import * as UndefinedOr from "effect/UndefinedOr"
|
|
|
19
19
|
*/
|
|
20
20
|
export interface PresenceRecord {
|
|
21
21
|
/** The child's root DOM element (the same `el` the spine wires). */
|
|
22
|
-
readonly element:
|
|
22
|
+
readonly element: Element
|
|
23
23
|
/** The latest emitted value-map, updated by the spine each frame. */
|
|
24
24
|
readonly snapshot: { current: Values.Values }
|
|
25
25
|
/**
|
|
@@ -121,7 +121,7 @@ export interface PresenceContextValue {
|
|
|
121
121
|
* when it isn't, and it starts now. Else `start` is called once the child is on the page, and the
|
|
122
122
|
* call returned cancels that (the element gone first). Optional: left out, never.
|
|
123
123
|
*/
|
|
124
|
-
readonly hold?: (el:
|
|
124
|
+
readonly hold?: (el: Element, start: () => void) => (() => void) | undefined
|
|
125
125
|
/**
|
|
126
126
|
* A presence hook's registration: `usePresence`'s and `useIsPresent`'s.
|
|
127
127
|
* Optional: left out, nothing is watched.
|
|
@@ -192,5 +192,5 @@ export const presenceBlocksInitial = (presence: PresenceContextValue | undefined
|
|
|
192
192
|
* Whether `el` waits for its child to go on the page ({@link PresenceContextValue.hold}): the call
|
|
193
193
|
* that cancels `start`, or `undefined` when it starts now.
|
|
194
194
|
*/
|
|
195
|
-
export const presenceHold = (presence: PresenceContextValue | undefined, el:
|
|
195
|
+
export const presenceHold = (presence: PresenceContextValue | undefined, el: Element, start: () => void): (() => void) | undefined =>
|
|
196
196
|
UndefinedOr.map(presence, (p) => UndefinedOr.map(p.hold, (hold) => hold(el, start)))
|
package/src/presence.tsx
CHANGED
|
@@ -81,7 +81,9 @@ export interface AnimatePresenceProps {
|
|
|
81
81
|
* (`position: absolute`, its size kept), so the children after it take their places, a `layout`
|
|
82
82
|
* one animating there; `"wait"`, once every leaver has animated out and been removed. A
|
|
83
83
|
* waiting child is built at once, as Solid builds it, so its own code (`onMount` included) runs
|
|
84
|
-
* then, off the page; its Wardic elements start once it's on the page.
|
|
84
|
+
* then, off the page; its Wardic elements start once it's on the page. An `<svg>` root is popped too
|
|
85
|
+
* (#744), beyond Motion's, though a rotated or skewed ancestor puts it off its place; the SVG
|
|
86
|
+
* elements inside an `<svg>` exit where they are (#702).
|
|
85
87
|
*/
|
|
86
88
|
readonly mode?: PresenceMode | undefined
|
|
87
89
|
/**
|
package/src/provider.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import * as Effect from "effect/Effect"
|
|
|
20
20
|
import * as Fiber from "effect/Fiber"
|
|
21
21
|
import * as Scope from "effect/Scope"
|
|
22
22
|
import * as Bool from "effect/Boolean"
|
|
23
|
-
import { constUndefined, identity } from "effect/Function"
|
|
23
|
+
import { constFalse, constUndefined, identity } from "effect/Function"
|
|
24
24
|
import * as Latch from "effect/Latch"
|
|
25
25
|
import * as Option from "effect/Option"
|
|
26
26
|
import * as Predicate from "effect/Predicate"
|
|
@@ -34,7 +34,7 @@ import type * as FlushGate from "@wardic/dom/FlushGate"
|
|
|
34
34
|
import type * as ProjectionSystem from "@wardic/dom/ProjectionSystem"
|
|
35
35
|
import { explainerOf, type ServerAppear, serverAppear } from "./appear.ts"
|
|
36
36
|
import * as Context from "effect/Context"
|
|
37
|
-
import { type Feature, type FeatureRegistry, type FeatureSection, type FeaturesProp, ROOT, strictMessage } from "./feature.ts"
|
|
37
|
+
import { type Feature, type FeatureRegistry, type FeatureSection, type FeaturesProp, type ElementFeatures, type InstanceFeatures, joinSections, type Own, ROOT, strictMessage } from "./feature.ts"
|
|
38
38
|
import { FeatureSectionProvider, sectionUnder, useLazySection } from "./feature-section.ts"
|
|
39
39
|
import * as OwnerScope from "./owner-scope.ts"
|
|
40
40
|
import {
|
|
@@ -54,7 +54,10 @@ import {
|
|
|
54
54
|
type WardicServices,
|
|
55
55
|
whenIdle,
|
|
56
56
|
} from "./runtime.ts"
|
|
57
|
+
import { WAITING_ENV_FIX, WAITING_ENV_LINE } from "./messages.ts"
|
|
58
|
+
import { warnWithoutSpans } from "./spans-check.ts"
|
|
57
59
|
import { isHydrating, isServer } from "./server.ts"
|
|
60
|
+
import { reactivity } from "./solid-reactivity.ts"
|
|
58
61
|
import { useWardicConfig } from "./wardic-config.tsx"
|
|
59
62
|
import { skipAnimationsOf } from "./wardic-config-value.ts"
|
|
60
63
|
import { instantLayoutOf, type InstantTransition, instantTransitionOf, resetOf } from "./instant.ts"
|
|
@@ -67,6 +70,17 @@ import type { WardicScaleCorrector } from "./config.ts"
|
|
|
67
70
|
*/
|
|
68
71
|
const WardicContext = createContext<WardicContextValue | undefined>(undefined)
|
|
69
72
|
|
|
73
|
+
/**
|
|
74
|
+
* What a client provider fails with when its `env` waits as it builds (#746, ADR-0067 *Amendment
|
|
75
|
+
* (#746)*, decision 7): the fix in development, under Solid's `DEV`, and one line in a production
|
|
76
|
+
* build. A server render always gives the fix: Solid 1's server build has no `DEV`, and a client build
|
|
77
|
+
* drops the server's branch.
|
|
78
|
+
*/
|
|
79
|
+
const waitingEnvMessage = (): string => {
|
|
80
|
+
if (DEV) return WAITING_ENV_FIX
|
|
81
|
+
return WAITING_ENV_LINE
|
|
82
|
+
}
|
|
83
|
+
|
|
70
84
|
/**
|
|
71
85
|
* Puts Wardic in your app: every Wardic element sits under one. Give it the Environment, `DomLive` in
|
|
72
86
|
* a browser, and the Features your elements use.
|
|
@@ -88,7 +102,10 @@ const WardicContext = createContext<WardicContextValue | undefined>(undefined)
|
|
|
88
102
|
// this provider's alone, one keyed borderRadius/boxShadow replacing the built-in; ignored on a server.
|
|
89
103
|
// features/strict: #511, ADR-0067, read once.
|
|
90
104
|
export function WardicProvider(props: {
|
|
91
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* The Environment Wardic runs in: `DomLive` in a browser, from `@wardic/dom`, with Effect's own Layers merged beside it, and
|
|
107
|
+
* `WardicSpans` for Wardic's spans. Read once, and built at once: a Layer that waits as it builds fails it.
|
|
108
|
+
*/
|
|
92
109
|
readonly env: WardicEnv
|
|
93
110
|
/**
|
|
94
111
|
* How animations honour the visitor's reduced-motion setting: `"user"` follows it (the default),
|
|
@@ -134,7 +151,7 @@ export function WardicProvider(props: {
|
|
|
134
151
|
onFalse: () => serverAppear(Option.getOrElse(Option.fromUndefinedOr(props.reducedMotion), () => "user" as const), explainerOf(props.appear), props.nonce),
|
|
135
152
|
})
|
|
136
153
|
if (Predicate.isNotUndefined(appear)) useAssets(() => appearStyle(appear))
|
|
137
|
-
const value = serverContext(props.env, appear, () => untrack(() => props.reducedMotion))
|
|
154
|
+
const value = serverContext(props.env, WAITING_ENV_FIX, appear, () => untrack(() => props.reducedMotion))
|
|
138
155
|
onCleanup(() => void value.features.dispose())
|
|
139
156
|
sections.set(value, sectionOf(value, ROOT, props))
|
|
140
157
|
return <WardicContext.Provider value={value}>{props.children}</WardicContext.Provider>
|
|
@@ -151,6 +168,7 @@ export function WardicProvider(props: {
|
|
|
151
168
|
// then the gate (#132); dispose() returns a Promise, fire-and-forget on unmount.
|
|
152
169
|
const value = clientContext(
|
|
153
170
|
props.env,
|
|
171
|
+
waitingEnvMessage(),
|
|
154
172
|
batch,
|
|
155
173
|
() => untrack(() => props.reducedMotion),
|
|
156
174
|
// Tracked, for `createReducedMotionConfig` (#584).
|
|
@@ -164,7 +182,13 @@ export function WardicProvider(props: {
|
|
|
164
182
|
// Built at the browser's idle time, after this render (#535): what a first element would build, so an
|
|
165
183
|
// element mounted after pays none of it. One mounted before then builds it itself, as before. Asked
|
|
166
184
|
// for here, with no computation of the provider's own, so a hydration's owners are the server's.
|
|
167
|
-
onCleanup(
|
|
185
|
+
onCleanup(
|
|
186
|
+
whenIdle(() => {
|
|
187
|
+
prepareIdle(value, section)
|
|
188
|
+
// A tracer that reads no Wardic span, development's word (#746).
|
|
189
|
+
if (DEV) warnWithoutSpans(value.runtime)
|
|
190
|
+
}),
|
|
191
|
+
)
|
|
168
192
|
return <WardicContext.Provider value={value}>{props.children}</WardicContext.Provider>
|
|
169
193
|
}
|
|
170
194
|
|
|
@@ -231,15 +255,46 @@ export function LazyWardic(props: {
|
|
|
231
255
|
* one (`brings`), built at once. A Complete element under a `strict` section is an error in
|
|
232
256
|
* development. Internal.
|
|
233
257
|
*/
|
|
234
|
-
export function useElementFeatures(
|
|
258
|
+
export function useElementFeatures(internal: ElementFeatures): FeatureSection {
|
|
259
|
+
const { brings, instance } = internal
|
|
260
|
+
const complete = internal.complete === true
|
|
235
261
|
const section = useFeatureSection()
|
|
236
262
|
if (DEV && complete && section.strict) throw new Error(strictMessage("wardic.*, wardic.create, createWard, use:wardic", "w.*, w.create, w.createWard, use:w"))
|
|
263
|
+
// A Wardic instance's element (#516): its instance's Features, given at once or loaded, beside its section's.
|
|
264
|
+
if (Predicate.isNotUndefined(instance)) return joinSections(section, useInstanceFeatures(instance))
|
|
237
265
|
if (Predicate.isUndefined(brings)) return section
|
|
238
266
|
const registry = useFeatureRegistry()
|
|
239
267
|
// A Complete element has every Feature, whatever its section has: one section per provider.
|
|
240
268
|
if (complete) return registry.section(brings)
|
|
241
269
|
const own = registry.build(brings)
|
|
242
|
-
return { services: () =>
|
|
270
|
+
return joinSections(section, { services: () => own, pending: constFalse })
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* A Wardic instance's Features in this provider (#516), one per instance (`InstanceFeatures.own`): what's
|
|
275
|
+
* given built on first need, each load started the first time it's asked for, on the client. Internal.
|
|
276
|
+
*/
|
|
277
|
+
export function useInstanceFeatures(instance: InstanceFeatures): Own {
|
|
278
|
+
return fromContext(useContext(WardicContext), "createWardic", (value) =>
|
|
279
|
+
instance.own(value.features, {
|
|
280
|
+
reactivity: reactivity,
|
|
281
|
+
server: isServer,
|
|
282
|
+
report: (cause) => {
|
|
283
|
+
value.runtime.runFork(Report.failure("wardic.createWardic: a lazy load of Features failed", cause))
|
|
284
|
+
},
|
|
285
|
+
}),
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* A Wardic instance's Features brought by one of its hooks (#516, Q13): in a provider, what's given is
|
|
291
|
+
* built and its loads start, as at its first element's mount, so its layout hooks bring `layout`.
|
|
292
|
+
* Outside one, nothing. Internal.
|
|
293
|
+
*/
|
|
294
|
+
export function useInstanceBrought(instance: InstanceFeatures): void {
|
|
295
|
+
if (Predicate.isUndefined(useContext(WardicContext))) return
|
|
296
|
+
const own = useInstanceFeatures(instance)
|
|
297
|
+
untrack(() => own.services())
|
|
243
298
|
}
|
|
244
299
|
|
|
245
300
|
/** The provider's Features (#511). Internal. */
|
package/src/reorder.tsx
CHANGED
|
@@ -85,7 +85,7 @@ import { MOTION_PROPS, type WardicMotionProps } from "./motion-props.ts"
|
|
|
85
85
|
import { w } from "./w.tsx"
|
|
86
86
|
import { BatchGroup, BatchItem } from "./batch-reorder-group.tsx"
|
|
87
87
|
|
|
88
|
-
export type { ReorderBatchGap, ReorderBatchGroupProps, ReorderBatchItemProps, ReorderBatchItemSize } from "./batch-reorder-group.tsx"
|
|
88
|
+
export type { ReorderBatchColumnSize, ReorderBatchGap, ReorderBatchGroupProps, ReorderBatchItemProps, ReorderBatchItemSize, ReorderBatchSizing } from "./batch-reorder-group.tsx"
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* A Reorder group's config: its `values` in order, and `onReorder`, given each new order to set them
|
|
@@ -554,16 +554,17 @@ export type ReorderGroupProps<V, Tag extends ReorderElementTag = "ul"> = {
|
|
|
554
554
|
|
|
555
555
|
/**
|
|
556
556
|
* `Reorder.Item`'s props: its `value`, `as`, its `layout`, and the props of the element it renders,
|
|
557
|
-
* motion props included, but `layoutId` and `drag`, which the group sets
|
|
557
|
+
* motion props included, but `layoutId` and `drag`, which the group sets, and its `value` attribute:
|
|
558
|
+
* `value` is the item's (#748).
|
|
558
559
|
*/
|
|
559
560
|
export type ReorderItemProps<V, Tag extends ReorderElementTag = "li"> = {
|
|
560
|
-
/** Its value in the group's `values
|
|
561
|
+
/** Its value in the group's `values`, of any type, not its element's `value` attribute. Read once. */
|
|
561
562
|
readonly value: V
|
|
562
563
|
/** The element it renders: `"li"` by default. Read once. */
|
|
563
564
|
readonly as?: Tag
|
|
564
565
|
/** `true`, its place and size animating (the default), or `"position"`, its place alone. */
|
|
565
566
|
readonly layout?: ReorderItemLayout
|
|
566
|
-
} & Omit<WardicProps<Tag>, "layout" | "layoutId" | "drag">
|
|
567
|
+
} & Omit<WardicProps<Tag>, "layout" | "layoutId" | "drag" | "value">
|
|
567
568
|
|
|
568
569
|
/**
|
|
569
570
|
* The props a component body reads, as plain records: instantiating the public prop
|
package/src/runtime.ts
CHANGED
|
@@ -35,6 +35,7 @@ import * as Result from "effect/Result"
|
|
|
35
35
|
import * as UndefinedOr from "effect/UndefinedOr"
|
|
36
36
|
import type { ServerAppear } from "./appear.ts"
|
|
37
37
|
import { clientRegistry, type FeatureRegistry, type FeatureSection, serverRegistry } from "./feature.ts"
|
|
38
|
+
import { ProjectionNodes } from "./features/keys.ts"
|
|
38
39
|
import { type InstantAnimations, makeInstantAnimations, NO_INSTANT } from "./instant.ts"
|
|
39
40
|
import { settingOf as configSettingOf, type WardicConfigValue } from "./wardic-config-value.ts"
|
|
40
41
|
|
|
@@ -50,20 +51,16 @@ import { settingOf as configSettingOf, type WardicConfigValue } from "./wardic-c
|
|
|
50
51
|
*/
|
|
51
52
|
export type WardicEnv = Layer.Layer<WardicServices, never, never>
|
|
52
53
|
|
|
53
|
-
/** What a provider fails with when its `env` waits as it builds: the fix, where Effect's own `AsyncFiberError` names neither. */
|
|
54
|
-
const WAITING_ENV =
|
|
55
|
-
"The WardicProvider's env waits as it builds, and a provider builds it at once, as its first element renders. Build the Layer that waits, such as DevTools.layer(), before the app renders, and give its services in the env: Layer.succeedContext(await Effect.runPromise(Layer.buildWithScope(layer, scope))). See https://wardic.dev/guides/observability."
|
|
56
|
-
|
|
57
54
|
/**
|
|
58
55
|
* `env`, built at once, on the runtime's memo map and Scope as it would be unwrapped. A provider
|
|
59
56
|
* runs its services from a render, so a Layer that waits as it builds, such as `DevTools.layer()`
|
|
60
|
-
* waiting for its connection, fails the build with
|
|
57
|
+
* waiting for its connection, fails the build with `waiting`; any other failure is its own.
|
|
61
58
|
*/
|
|
62
|
-
const builtAtOnce = (env: WardicEnv): WardicEnv =>
|
|
59
|
+
const builtAtOnce = (env: WardicEnv, waiting: string): WardicEnv =>
|
|
63
60
|
Layer.fromBuild((memoMap, scope) => {
|
|
64
61
|
const exit = Effect.runSyncExit(Layer.buildWithMemoMap(env, memoMap, scope))
|
|
65
62
|
return Bool.match(Option.exists(Result.getSuccess(Exit.findDefect(exit)), Cause.isAsyncFiberError), {
|
|
66
|
-
onTrue: () => Effect.die(new Error(
|
|
63
|
+
onTrue: () => Effect.die(new Error(waiting)),
|
|
67
64
|
onFalse: () => exit,
|
|
68
65
|
})
|
|
69
66
|
})
|
|
@@ -178,9 +175,11 @@ interface Built {
|
|
|
178
175
|
* Wardic element or hook reads any of it from the context value, which is during the first
|
|
179
176
|
* element's render. A provider with no Wardic element under it builds nothing. Reading the runtime
|
|
180
177
|
* alone builds none of it. `reducedMotion` is the provider's setting, read untracked by the caller.
|
|
178
|
+
* `waiting` is what it fails with when `env` waits as it builds: `messages.ts`'s fix in development (#746).
|
|
181
179
|
*/
|
|
182
180
|
export const clientContext = (
|
|
183
181
|
env: WardicEnv,
|
|
182
|
+
waiting: string,
|
|
184
183
|
batch: (apply: () => void) => void,
|
|
185
184
|
reducedMotion: () => ReducedMotion.Config | undefined,
|
|
186
185
|
reducedMotionSetting: () => ReducedMotion.Config | undefined,
|
|
@@ -215,7 +214,7 @@ export const clientContext = (
|
|
|
215
214
|
// layout animation starts, and the app's scale correctors.
|
|
216
215
|
const projectionOptions: ProjectionSystem.Options = { reducedMotion: () => build().reducedMotion(), scaleCorrectors }
|
|
217
216
|
const runtime: ProviderRuntime = ManagedRuntime.make(
|
|
218
|
-
Layer.merge(FlushGate.layer({ batch }), Layer.succeed(ProjectionOptions)(projectionOptions)).pipe(Layer.provideMerge(builtAtOnce(env))),
|
|
217
|
+
Layer.merge(FlushGate.layer({ batch }), Layer.succeed(ProjectionOptions)(projectionOptions)).pipe(Layer.provideMerge(builtAtOnce(env, waiting))),
|
|
219
218
|
)
|
|
220
219
|
const features = clientRegistry(runtime)
|
|
221
220
|
// Its Instant changes (#443), timed by its Environment's Refresh frames, found at the first.
|
|
@@ -283,8 +282,8 @@ const settingOf = (setting: ReducedMotion.Config | undefined, provider: () => Re
|
|
|
283
282
|
* working), an inert gate, no projection system, reduced motion never applying, and the render's
|
|
284
283
|
* Appear animations when it has them.
|
|
285
284
|
*/
|
|
286
|
-
export const serverContext = (env: WardicEnv, appear: ServerAppear | undefined, reducedMotion: () => ReducedMotion.Config | undefined): WardicContextValue => {
|
|
287
|
-
const runtime = ManagedRuntime.make(builtAtOnce(env))
|
|
285
|
+
export const serverContext = (env: WardicEnv, waiting: string, appear: ServerAppear | undefined, reducedMotion: () => ReducedMotion.Config | undefined): WardicContextValue => {
|
|
286
|
+
const runtime = ManagedRuntime.make(builtAtOnce(env, waiting))
|
|
288
287
|
return {
|
|
289
288
|
runtime,
|
|
290
289
|
// A server render's elements take the lean path and never read it: read at each use if one does.
|
|
@@ -367,6 +366,14 @@ export const fromContext = <A>(value: WardicContextValue | undefined, name: stri
|
|
|
367
366
|
export const projectionIn = (services: Context.Context<never>): ProjectionSystem.Shape | undefined =>
|
|
368
367
|
Option.getOrUndefined(Context.getOption(services as Context.Context<ProjectionSystem.ProjectionSystem>, ProjectionSystem.ProjectionSystem))
|
|
369
368
|
|
|
369
|
+
/**
|
|
370
|
+
* The `layout` Feature's element code in `services` (#746): what makes a Wardic element's node on its
|
|
371
|
+
* projection system. Read where an element makes its node, from Features {@link projectionIn} found
|
|
372
|
+
* `layout` in, which give both.
|
|
373
|
+
*/
|
|
374
|
+
export const projectionNodesIn = (services: Context.Context<never>): ProjectionNodes["Service"] =>
|
|
375
|
+
Context.get(services as Context.Context<ProjectionNodes>, ProjectionNodes)
|
|
376
|
+
|
|
370
377
|
/**
|
|
371
378
|
* `useAnimateLayout()`'s function: `animateLayout(fn, options?)` runs `fn` at once, animates the
|
|
372
379
|
* layout change it makes, and returns what `fn` returns. `options.onSettled` is called once every
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `createScroll`'s values (#234, #240), for both bindings: four Atoms, one a value, each for the value's
|
|
3
|
+
* life, set from the scroll of the elements there now and described as deriving as it does
|
|
4
|
+
* (`LiveValue.derivesAs`), so an element's `style` follows them where they're set and runs them as
|
|
5
|
+
* Timeline values. Solid-free: each binding reads its elements in its own effect.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import * as LiveValue from "@wardic/core/LiveValue"
|
|
10
|
+
import * as Arr from "effect/Array"
|
|
11
|
+
import * as Atom from "effect/reactivity/Atom"
|
|
12
|
+
import type * as AtomRegistry from "effect/reactivity/AtomRegistry"
|
|
13
|
+
import * as Rec from "effect/Record"
|
|
14
|
+
import type { Timelines } from "./timelines.ts"
|
|
15
|
+
|
|
16
|
+
/** `createScroll`'s four values, by name. */
|
|
17
|
+
export const SCROLL_KEYS = ["scrollX", "scrollY", "scrollXProgress", "scrollYProgress"] as const
|
|
18
|
+
|
|
19
|
+
/** A `createScroll`'s four Atoms, by name. */
|
|
20
|
+
export type ScrollAtoms = Readonly<Record<(typeof SCROLL_KEYS)[number], Atom.Writable<number>>>
|
|
21
|
+
|
|
22
|
+
/** The four Atoms, each 0 until a scroll sets it, held in `registry` until `onCleanup` runs. */
|
|
23
|
+
export const scrollAtomsOf = (registry: AtomRegistry.AtomRegistry, onCleanup: (fn: () => void) => void): ScrollAtoms => {
|
|
24
|
+
const outs = Rec.fromIterableWith(SCROLL_KEYS, (key) => [key, Atom.make(0)] as const) as ScrollAtoms
|
|
25
|
+
Arr.forEach(SCROLL_KEYS, (key) => onCleanup(registry.mount(outs[key])))
|
|
26
|
+
return outs
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Module state (#460, Q7): an Atom no scroll describes, for values whose elements have gone. Never set.
|
|
30
|
+
const NO_SCROLL: Atom.Atom<number> = Atom.make(0)
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* `outs` set from `values`, the scroll of the elements there now: each described as deriving as its value
|
|
34
|
+
* does and read at once (a derived Atom tracks the scroll only once it's read). `timelines` is told, as
|
|
35
|
+
* the elements following them may have shown them before they were described. Gives the stop.
|
|
36
|
+
*/
|
|
37
|
+
export const followScroll = (registry: AtomRegistry.AtomRegistry, outs: ScrollAtoms, values: LiveValue.ScrollValues, timelines: Timelines["Service"]): (() => void) => {
|
|
38
|
+
const stops = Arr.map(SCROLL_KEYS, (key) => {
|
|
39
|
+
LiveValue.derivesAs(outs[key], values[key])
|
|
40
|
+
return registry.subscribe(values[key], (v) => registry.set(outs[key], v), { immediate: true })
|
|
41
|
+
})
|
|
42
|
+
timelines.described()
|
|
43
|
+
return () => Arr.forEach(stops, (stop) => stop())
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* `outs`, their elements gone (an accessor's ref back to `undefined`), described as no scroll's: they hold
|
|
48
|
+
* their values, which the gate draws, and `timelines` is told, so no Timeline value draws the old scroll.
|
|
49
|
+
*/
|
|
50
|
+
export const letGoScroll = (outs: ScrollAtoms, timelines: Timelines["Service"]): void => {
|
|
51
|
+
Arr.forEach(SCROLL_KEYS, (key) => LiveValue.derivesAs(outs[key], NO_SCROLL))
|
|
52
|
+
timelines.described()
|
|
53
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Development's word on a tracer that reads no Wardic span (#746, ADR-0067 *Amendment (#746)*, decision
|
|
3
|
+
* 8): a provider whose `env` installs a tracer, tracing on, but gives no `WardicSpans` says so once, as
|
|
4
|
+
* it builds. Each binding's provider calls it under its Solid's `DEV`, so a production build ships none
|
|
5
|
+
* of it, and none of Effect's `Tracer`.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import * as Spans from "@wardic/core/Spans"
|
|
10
|
+
import * as Bool from "effect/Boolean"
|
|
11
|
+
import * as Effect from "effect/Effect"
|
|
12
|
+
import type { WardicRuntime } from "./runtime.ts"
|
|
13
|
+
|
|
14
|
+
/** What development says. */
|
|
15
|
+
const MESSAGE =
|
|
16
|
+
"wardic.spans: a tracer is installed, but Wardic opens no spans without WardicSpans. Merge it beside DomLive: Layer.mergeAll(DomLive, WardicSpans, …). See https://wardic.dev/guides/observability."
|
|
17
|
+
|
|
18
|
+
/** Says, on `runtime`, that its tracer reads no Wardic span: run once a provider, at its idle build (#535). */
|
|
19
|
+
export const warnWithoutSpans = (runtime: WardicRuntime): void => {
|
|
20
|
+
try {
|
|
21
|
+
runtime.runSync(Effect.flatMap(Spans.missing, (missing) => Bool.match(missing, { onTrue: () => Effect.logWarning(MESSAGE), onFalse: () => Effect.void })))
|
|
22
|
+
} catch {
|
|
23
|
+
// An env that fails to build is the first element's to report.
|
|
24
|
+
}
|
|
25
|
+
}
|