@wardic/solid 2.2.0 → 3.0.0-next.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 +22 -18
- package/dist/browser/config-view.js +33 -5
- package/dist/browser/config-view.js.map +1 -1
- package/dist/browser/create-batch.js +1 -1
- package/dist/browser/element-style.js +61 -7
- package/dist/browser/element-style.js.map +1 -1
- package/dist/browser/element.js +19 -2
- package/dist/browser/element.js.map +1 -1
- package/dist/browser/feature-section.js +5 -13
- package/dist/browser/feature-section.js.map +1 -1
- package/dist/browser/hooks/auto.js +270 -0
- package/dist/browser/hooks/auto.js.map +1 -0
- package/dist/browser/hooks/config-scope.js +120 -0
- package/dist/browser/hooks/config-scope.js.map +1 -0
- package/dist/browser/hooks/config.js +37 -0
- package/dist/browser/hooks/config.js.map +1 -0
- package/dist/browser/hooks/drag.js +632 -0
- package/dist/browser/hooks/drag.js.map +1 -0
- package/dist/browser/hooks/elements.js +183 -0
- package/dist/browser/hooks/elements.js.map +1 -0
- package/dist/browser/hooks/group.js +28 -0
- package/dist/browser/hooks/group.js.map +1 -0
- package/dist/browser/hooks/index.js +10 -0
- package/dist/browser/hooks/index.js.map +1 -0
- package/dist/browser/hooks/kept.js +32 -0
- package/dist/browser/hooks/kept.js.map +1 -0
- package/dist/browser/hooks/layout-group-of.js +39 -0
- package/dist/browser/hooks/layout-group-of.js.map +1 -0
- package/dist/browser/hooks/layout-group.js +92 -0
- package/dist/browser/hooks/layout-group.js.map +1 -0
- package/dist/browser/hooks/make-ward.js +157 -0
- package/dist/browser/hooks/make-ward.js.map +1 -0
- package/dist/browser/hooks/presence-scope.js +87 -0
- package/dist/browser/hooks/presence-scope.js.map +1 -0
- package/dist/browser/hooks/presence.js +24 -0
- package/dist/browser/hooks/presence.js.map +1 -0
- package/dist/browser/hooks/props.js +148 -0
- package/dist/browser/hooks/props.js.map +1 -0
- package/dist/browser/hooks/reads.js +241 -0
- package/dist/browser/hooks/reads.js.map +1 -0
- package/dist/browser/hooks/refs.js +87 -0
- package/dist/browser/hooks/refs.js.map +1 -0
- package/dist/browser/hooks/reorder-elements.js +268 -0
- package/dist/browser/hooks/reorder-elements.js.map +1 -0
- package/dist/browser/hooks/reorder.js +176 -0
- package/dist/browser/hooks/reorder.js.map +1 -0
- package/dist/browser/hooks/rune.js +799 -0
- package/dist/browser/hooks/rune.js.map +1 -0
- package/dist/browser/hooks/server-features.client.js +2 -0
- package/dist/browser/hooks/server-features.client.js.map +1 -0
- package/dist/browser/hooks/server-features.js +13 -0
- package/dist/browser/hooks/server-features.js.map +1 -0
- package/dist/browser/hooks/settings.js +29 -0
- package/dist/browser/hooks/settings.js.map +1 -0
- package/dist/browser/hooks/setup.js +154 -0
- package/dist/browser/hooks/setup.js.map +1 -0
- package/dist/browser/hooks/stage.js +117 -0
- package/dist/browser/hooks/stage.js.map +1 -0
- package/dist/browser/hooks/ward.js +2193 -0
- package/dist/browser/hooks/ward.js.map +1 -0
- package/dist/browser/hooks/wardic-provider.js +29 -0
- package/dist/browser/hooks/wardic-provider.js.map +1 -0
- package/dist/browser/hooks/wardic-scope.js +68 -0
- package/dist/browser/hooks/wardic-scope.js.map +1 -0
- package/dist/browser/hooks/wards.js +562 -0
- package/dist/browser/hooks/wards.js.map +1 -0
- package/dist/browser/index.js +23 -11
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/layout.js +7 -58
- package/dist/browser/layout.js.map +1 -1
- package/dist/browser/lazy-batch-gestures.js +1 -1
- package/dist/browser/lifecycle.js +37 -0
- package/dist/browser/lifecycle.js.map +1 -1
- package/dist/browser/presence-handle.js +28 -12
- package/dist/browser/presence-handle.js.map +1 -1
- package/dist/browser/presence.js +3 -1
- package/dist/browser/presence.js.map +1 -1
- package/dist/browser/provider.js +85 -70
- package/dist/browser/provider.js.map +1 -1
- package/dist/browser/reorder-components.js +50 -0
- package/dist/browser/reorder-components.js.map +1 -0
- package/dist/browser/reorder.js +46 -274
- package/dist/browser/reorder.js.map +1 -1
- package/dist/browser/stage.js.map +1 -1
- package/dist/browser/unstable/v2/index.js +0 -8
- package/dist/browser/unstable/v2/index.js.map +1 -1
- package/dist/browser/v1/index.js +1 -1
- package/dist/browser/v1/index.js.map +1 -1
- package/dist/browser/variant-node.js +4 -2
- package/dist/browser/variant-node.js.map +1 -1
- package/dist/browser/w.js +33 -3
- package/dist/browser/w.js.map +1 -1
- package/dist/browser/ward.js +576 -49
- package/dist/browser/ward.js.map +1 -1
- package/dist/browser/wardic-config.js +62 -29
- package/dist/browser/wardic-config.js.map +1 -1
- package/dist/browser/wardic-context.js +23 -0
- package/dist/browser/wardic-context.js.map +1 -0
- package/dist/browser/wardic.js +3 -0
- package/dist/browser/wardic.js.map +1 -1
- package/dist/server/config-view.js +33 -5
- package/dist/server/config-view.js.map +1 -1
- package/dist/server/create-batch.js +1 -1
- package/dist/server/element-style.js +61 -7
- package/dist/server/element-style.js.map +1 -1
- package/dist/server/element.js +19 -2
- package/dist/server/element.js.map +1 -1
- package/dist/server/feature-section.js +5 -13
- package/dist/server/feature-section.js.map +1 -1
- package/dist/server/hooks/auto.js +270 -0
- package/dist/server/hooks/auto.js.map +1 -0
- package/dist/server/hooks/config-scope.js +120 -0
- package/dist/server/hooks/config-scope.js.map +1 -0
- package/dist/server/hooks/config.js +37 -0
- package/dist/server/hooks/config.js.map +1 -0
- package/dist/server/hooks/drag.js +632 -0
- package/dist/server/hooks/drag.js.map +1 -0
- package/dist/server/hooks/elements.js +192 -0
- package/dist/server/hooks/elements.js.map +1 -0
- package/dist/server/hooks/group.js +28 -0
- package/dist/server/hooks/group.js.map +1 -0
- package/dist/server/hooks/index.js +10 -0
- package/dist/server/hooks/index.js.map +1 -0
- package/dist/server/hooks/kept.js +32 -0
- package/dist/server/hooks/kept.js.map +1 -0
- package/dist/server/hooks/layout-group-of.js +39 -0
- package/dist/server/hooks/layout-group-of.js.map +1 -0
- package/dist/server/hooks/layout-group.js +109 -0
- package/dist/server/hooks/layout-group.js.map +1 -0
- package/dist/server/hooks/make-ward.js +157 -0
- package/dist/server/hooks/make-ward.js.map +1 -0
- package/dist/server/hooks/presence-scope.js +86 -0
- package/dist/server/hooks/presence-scope.js.map +1 -0
- package/dist/server/hooks/presence.js +24 -0
- package/dist/server/hooks/presence.js.map +1 -0
- package/dist/server/hooks/props.js +148 -0
- package/dist/server/hooks/props.js.map +1 -0
- package/dist/server/hooks/reads.js +241 -0
- package/dist/server/hooks/reads.js.map +1 -0
- package/dist/server/hooks/refs.js +87 -0
- package/dist/server/hooks/refs.js.map +1 -0
- package/dist/server/hooks/reorder-elements.js +308 -0
- package/dist/server/hooks/reorder-elements.js.map +1 -0
- package/dist/server/hooks/reorder.js +176 -0
- package/dist/server/hooks/reorder.js.map +1 -0
- package/dist/server/hooks/rune.js +799 -0
- package/dist/server/hooks/rune.js.map +1 -0
- package/dist/server/hooks/server-features.client.js +2 -0
- package/dist/server/hooks/server-features.client.js.map +1 -0
- package/dist/server/hooks/server-features.js +13 -0
- package/dist/server/hooks/server-features.js.map +1 -0
- package/dist/server/hooks/settings.js +29 -0
- package/dist/server/hooks/settings.js.map +1 -0
- package/dist/server/hooks/setup.js +154 -0
- package/dist/server/hooks/setup.js.map +1 -0
- package/dist/server/hooks/stage.js +117 -0
- package/dist/server/hooks/stage.js.map +1 -0
- package/dist/server/hooks/ward.js +2193 -0
- package/dist/server/hooks/ward.js.map +1 -0
- package/dist/server/hooks/wardic-provider.js +29 -0
- package/dist/server/hooks/wardic-provider.js.map +1 -0
- package/dist/server/hooks/wardic-scope.js +68 -0
- package/dist/server/hooks/wardic-scope.js.map +1 -0
- package/dist/server/hooks/wards.js +562 -0
- package/dist/server/hooks/wards.js.map +1 -0
- package/dist/server/index.js +23 -11
- package/dist/server/index.js.map +1 -1
- package/dist/server/layout.js +7 -75
- package/dist/server/layout.js.map +1 -1
- package/dist/server/lazy-batch-gestures.js +1 -1
- package/dist/server/lifecycle.js +37 -0
- package/dist/server/lifecycle.js.map +1 -1
- package/dist/server/presence-handle.js +28 -12
- package/dist/server/presence-handle.js.map +1 -1
- package/dist/server/presence.js +3 -1
- package/dist/server/presence.js.map +1 -1
- package/dist/server/provider.js +86 -80
- package/dist/server/provider.js.map +1 -1
- package/dist/server/reorder-components.js +50 -0
- package/dist/server/reorder-components.js.map +1 -0
- package/dist/server/reorder.js +46 -344
- package/dist/server/reorder.js.map +1 -1
- package/dist/server/stage.js.map +1 -1
- package/dist/server/unstable/v2/index.js +0 -8
- package/dist/server/unstable/v2/index.js.map +1 -1
- package/dist/server/v1/index.js +1 -1
- package/dist/server/v1/index.js.map +1 -1
- package/dist/server/variant-node.js +4 -2
- package/dist/server/variant-node.js.map +1 -1
- package/dist/server/w.js +33 -3
- package/dist/server/w.js.map +1 -1
- package/dist/server/ward.js +576 -49
- package/dist/server/ward.js.map +1 -1
- package/dist/server/wardic-config.js +63 -30
- package/dist/server/wardic-config.js.map +1 -1
- package/dist/server/wardic-context.js +23 -0
- package/dist/server/wardic-context.js.map +1 -0
- package/dist/server/wardic.js +3 -0
- package/dist/server/wardic.js.map +1 -1
- package/dist/solid/batch-reorder-group.d.ts +1 -1
- package/dist/solid/batch-reorder.d.ts +1 -1
- package/dist/solid/batch-reorder.d.ts.map +1 -1
- package/dist/solid/config-view.d.ts +11 -0
- package/dist/solid/config-view.d.ts.map +1 -1
- package/dist/solid/config-view.js +29 -6
- package/dist/solid/config-view.js.map +1 -1
- package/dist/solid/create-batch.jsx +1 -1
- package/dist/solid/element-style.d.ts +16 -2
- package/dist/solid/element-style.d.ts.map +1 -1
- package/dist/solid/element-style.js +61 -7
- package/dist/solid/element-style.js.map +1 -1
- package/dist/solid/element.d.ts +3 -1
- package/dist/solid/element.d.ts.map +1 -1
- package/dist/solid/element.jsx +21 -2
- package/dist/solid/element.jsx.map +1 -1
- package/dist/solid/feature-section.d.ts +0 -7
- package/dist/solid/feature-section.d.ts.map +1 -1
- package/dist/solid/feature-section.js +5 -13
- package/dist/solid/feature-section.js.map +1 -1
- package/dist/solid/hooks/auto.d.ts +44 -0
- package/dist/solid/hooks/auto.d.ts.map +1 -0
- package/dist/solid/hooks/auto.js +269 -0
- package/dist/solid/hooks/auto.js.map +1 -0
- package/dist/solid/hooks/config-scope.d.ts +84 -0
- package/dist/solid/hooks/config-scope.d.ts.map +1 -0
- package/dist/solid/hooks/config-scope.jsx +128 -0
- package/dist/solid/hooks/config-scope.jsx.map +1 -0
- package/dist/solid/hooks/config.d.ts +28 -0
- package/dist/solid/hooks/config.d.ts.map +1 -0
- package/dist/solid/hooks/config.jsx +37 -0
- package/dist/solid/hooks/config.jsx.map +1 -0
- package/dist/solid/hooks/drag.d.ts +220 -0
- package/dist/solid/hooks/drag.d.ts.map +1 -0
- package/dist/solid/hooks/drag.js +585 -0
- package/dist/solid/hooks/drag.js.map +1 -0
- package/dist/solid/hooks/elements.d.ts +11 -0
- package/dist/solid/hooks/elements.d.ts.map +1 -0
- package/dist/solid/hooks/elements.jsx +218 -0
- package/dist/solid/hooks/elements.jsx.map +1 -0
- package/dist/solid/hooks/group.d.ts +46 -0
- package/dist/solid/hooks/group.d.ts.map +1 -0
- package/dist/solid/hooks/group.jsx +25 -0
- package/dist/solid/hooks/group.jsx.map +1 -0
- package/dist/solid/hooks/index.d.ts +28 -0
- package/dist/solid/hooks/index.d.ts.map +1 -0
- package/dist/solid/hooks/index.js +10 -0
- package/dist/solid/hooks/index.js.map +1 -0
- package/dist/solid/hooks/kept.d.ts +60 -0
- package/dist/solid/hooks/kept.d.ts.map +1 -0
- package/dist/solid/hooks/kept.js +33 -0
- package/dist/solid/hooks/kept.js.map +1 -0
- package/dist/solid/hooks/layout-group-of.d.ts +27 -0
- package/dist/solid/hooks/layout-group-of.d.ts.map +1 -0
- package/dist/solid/hooks/layout-group-of.js +39 -0
- package/dist/solid/hooks/layout-group-of.js.map +1 -0
- package/dist/solid/hooks/layout-group.d.ts +60 -0
- package/dist/solid/hooks/layout-group.d.ts.map +1 -0
- package/dist/solid/hooks/layout-group.jsx +80 -0
- package/dist/solid/hooks/layout-group.jsx.map +1 -0
- package/dist/solid/hooks/make-ward.d.ts +123 -0
- package/dist/solid/hooks/make-ward.d.ts.map +1 -0
- package/dist/solid/hooks/make-ward.js +147 -0
- package/dist/solid/hooks/make-ward.js.map +1 -0
- package/dist/solid/hooks/presence-scope.d.ts +84 -0
- package/dist/solid/hooks/presence-scope.d.ts.map +1 -0
- package/dist/solid/hooks/presence-scope.jsx +62 -0
- package/dist/solid/hooks/presence-scope.jsx.map +1 -0
- package/dist/solid/hooks/presence.d.ts +51 -0
- package/dist/solid/hooks/presence.d.ts.map +1 -0
- package/dist/solid/hooks/presence.jsx +26 -0
- package/dist/solid/hooks/presence.jsx.map +1 -0
- package/dist/solid/hooks/props.d.ts +52 -0
- package/dist/solid/hooks/props.d.ts.map +1 -0
- package/dist/solid/hooks/props.js +140 -0
- package/dist/solid/hooks/props.js.map +1 -0
- package/dist/solid/hooks/reads.d.ts +38 -0
- package/dist/solid/hooks/reads.d.ts.map +1 -0
- package/dist/solid/hooks/reads.js +218 -0
- package/dist/solid/hooks/reads.js.map +1 -0
- package/dist/solid/hooks/refs.d.ts +25 -0
- package/dist/solid/hooks/refs.d.ts.map +1 -0
- package/dist/solid/hooks/refs.js +89 -0
- package/dist/solid/hooks/refs.js.map +1 -0
- package/dist/solid/hooks/reorder-elements.d.ts +23 -0
- package/dist/solid/hooks/reorder-elements.d.ts.map +1 -0
- package/dist/solid/hooks/reorder-elements.jsx +273 -0
- package/dist/solid/hooks/reorder-elements.jsx.map +1 -0
- package/dist/solid/hooks/reorder.d.ts +55 -0
- package/dist/solid/hooks/reorder.d.ts.map +1 -0
- package/dist/solid/hooks/reorder.js +152 -0
- package/dist/solid/hooks/reorder.js.map +1 -0
- package/dist/solid/hooks/rune.d.ts +885 -0
- package/dist/solid/hooks/rune.d.ts.map +1 -0
- package/dist/solid/hooks/rune.js +816 -0
- package/dist/solid/hooks/rune.js.map +1 -0
- package/dist/solid/hooks/server-features.client.d.ts +10 -0
- package/dist/solid/hooks/server-features.client.d.ts.map +1 -0
- package/dist/solid/hooks/server-features.client.js +2 -0
- package/dist/solid/hooks/server-features.client.js.map +1 -0
- package/dist/solid/hooks/server-features.d.ts +10 -0
- package/dist/solid/hooks/server-features.d.ts.map +1 -0
- package/dist/solid/hooks/server-features.js +13 -0
- package/dist/solid/hooks/server-features.js.map +1 -0
- package/dist/solid/hooks/settings.d.ts +11 -0
- package/dist/solid/hooks/settings.d.ts.map +1 -0
- package/dist/solid/hooks/settings.js +31 -0
- package/dist/solid/hooks/settings.js.map +1 -0
- package/dist/solid/hooks/setup.d.ts +31 -0
- package/dist/solid/hooks/setup.d.ts.map +1 -0
- package/dist/solid/hooks/setup.js +155 -0
- package/dist/solid/hooks/setup.js.map +1 -0
- package/dist/solid/hooks/stage.d.ts +187 -0
- package/dist/solid/hooks/stage.d.ts.map +1 -0
- package/dist/solid/hooks/stage.js +117 -0
- package/dist/solid/hooks/stage.js.map +1 -0
- package/dist/solid/hooks/ward.d.ts +394 -0
- package/dist/solid/hooks/ward.d.ts.map +1 -0
- package/dist/solid/hooks/ward.js +2237 -0
- package/dist/solid/hooks/ward.js.map +1 -0
- package/dist/solid/hooks/wardic-provider.d.ts +32 -0
- package/dist/solid/hooks/wardic-provider.d.ts.map +1 -0
- package/dist/solid/hooks/wardic-provider.jsx +29 -0
- package/dist/solid/hooks/wardic-provider.jsx.map +1 -0
- package/dist/solid/hooks/wardic-scope.d.ts +49 -0
- package/dist/solid/hooks/wardic-scope.d.ts.map +1 -0
- package/dist/solid/hooks/wardic-scope.jsx +63 -0
- package/dist/solid/hooks/wardic-scope.jsx.map +1 -0
- package/dist/solid/hooks/wards.d.ts +157 -0
- package/dist/solid/hooks/wards.d.ts.map +1 -0
- package/dist/solid/hooks/wards.js +522 -0
- package/dist/solid/hooks/wards.js.map +1 -0
- package/dist/solid/index.d.ts +21 -14
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.jsx +23 -11
- package/dist/solid/index.jsx.map +1 -1
- package/dist/solid/layout.d.ts +2 -44
- package/dist/solid/layout.d.ts.map +1 -1
- package/dist/solid/layout.jsx +7 -49
- package/dist/solid/layout.jsx.map +1 -1
- package/dist/solid/lazy-batch-gestures.js +1 -1
- package/dist/solid/lazy-batch-gestures.js.map +1 -1
- package/dist/solid/lifecycle.d.ts +19 -0
- package/dist/solid/lifecycle.d.ts.map +1 -1
- package/dist/solid/lifecycle.js +40 -0
- package/dist/solid/lifecycle.js.map +1 -1
- package/dist/solid/presence-handle.d.ts +13 -6
- package/dist/solid/presence-handle.d.ts.map +1 -1
- package/dist/solid/presence-handle.js +30 -12
- package/dist/solid/presence-handle.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 +3 -1
- package/dist/solid/presence.jsx.map +1 -1
- package/dist/solid/provider.d.ts +25 -32
- package/dist/solid/provider.d.ts.map +1 -1
- package/dist/solid/provider.jsx +86 -62
- package/dist/solid/provider.jsx.map +1 -1
- package/dist/solid/reorder-components.d.ts +32 -0
- package/dist/solid/reorder-components.d.ts.map +1 -0
- package/dist/solid/reorder-components.jsx +49 -0
- package/dist/solid/reorder-components.jsx.map +1 -0
- package/dist/solid/reorder.d.ts +50 -76
- package/dist/solid/reorder.d.ts.map +1 -1
- package/dist/solid/reorder.jsx +40 -202
- package/dist/solid/reorder.jsx.map +1 -1
- package/dist/solid/stage.d.ts +14 -0
- package/dist/solid/stage.d.ts.map +1 -1
- package/dist/solid/stage.js.map +1 -1
- package/dist/solid/unstable/v2/index.d.ts +2 -26
- package/dist/solid/unstable/v2/index.d.ts.map +1 -1
- package/dist/solid/unstable/v2/index.jsx +0 -16
- package/dist/solid/unstable/v2/index.jsx.map +1 -1
- package/dist/solid/v1/index.d.ts +1 -1
- package/dist/solid/v1/index.d.ts.map +1 -1
- package/dist/solid/v1/index.jsx +1 -1
- package/dist/solid/v1/index.jsx.map +1 -1
- package/dist/solid/variant-node.d.ts +6 -0
- package/dist/solid/variant-node.d.ts.map +1 -1
- package/dist/solid/variant-node.js +2 -0
- package/dist/solid/variant-node.js.map +1 -1
- package/dist/solid/w.d.ts +9 -3
- package/dist/solid/w.d.ts.map +1 -1
- package/dist/solid/w.jsx +36 -3
- package/dist/solid/w.jsx.map +1 -1
- package/dist/solid/ward.d.ts +134 -7
- package/dist/solid/ward.d.ts.map +1 -1
- package/dist/solid/ward.jsx +546 -48
- package/dist/solid/ward.jsx.map +1 -1
- package/dist/solid/wardic-config.d.ts +17 -12
- package/dist/solid/wardic-config.d.ts.map +1 -1
- package/dist/solid/wardic-config.jsx +68 -22
- package/dist/solid/wardic-config.jsx.map +1 -1
- package/dist/solid/wardic-context.d.ts +15 -0
- package/dist/solid/wardic-context.d.ts.map +1 -0
- package/dist/solid/wardic-context.js +23 -0
- package/dist/solid/wardic-context.js.map +1 -0
- package/dist/solid/wardic-instance.d.ts +6 -4
- package/dist/solid/wardic-instance.d.ts.map +1 -1
- package/dist/solid/wardic.d.ts +3 -0
- package/dist/solid/wardic.d.ts.map +1 -1
- package/dist/solid/wardic.jsx +3 -0
- package/dist/solid/wardic.jsx.map +1 -1
- package/package.json +26 -6
- package/src/batch-reorder-group.tsx +1 -1
- package/src/batch-reorder.ts +1 -1
- package/src/config-view.ts +30 -6
- package/src/create-batch.tsx +1 -1
- package/src/element-style.ts +77 -9
- package/src/element.tsx +25 -4
- package/src/feature-section.ts +5 -15
- package/src/hooks/auto.ts +303 -0
- package/src/hooks/config-scope.tsx +215 -0
- package/src/hooks/config.tsx +54 -0
- package/src/hooks/drag.ts +740 -0
- package/src/hooks/elements.tsx +234 -0
- package/src/hooks/group.tsx +55 -0
- package/src/hooks/index.ts +41 -0
- package/src/hooks/kept.ts +89 -0
- package/src/hooks/layout-group-of.ts +46 -0
- package/src/hooks/layout-group.tsx +111 -0
- package/src/hooks/make-ward.ts +218 -0
- package/src/hooks/presence-scope.tsx +155 -0
- package/src/hooks/presence.tsx +67 -0
- package/src/hooks/props.ts +190 -0
- package/src/hooks/reads.ts +258 -0
- package/src/hooks/refs.ts +114 -0
- package/src/hooks/reorder-elements.tsx +321 -0
- package/src/hooks/reorder.ts +205 -0
- package/src/hooks/rune.ts +1755 -0
- package/src/hooks/server-features.client.ts +10 -0
- package/src/hooks/server-features.ts +12 -0
- package/src/hooks/settings.ts +44 -0
- package/src/hooks/setup.ts +184 -0
- package/src/hooks/stage.ts +359 -0
- package/src/hooks/ward.ts +2563 -0
- package/src/hooks/wardic-provider.tsx +51 -0
- package/src/hooks/wardic-scope.tsx +112 -0
- package/src/hooks/wards.ts +679 -0
- package/src/index.tsx +27 -15
- package/src/layout.tsx +7 -74
- package/src/lazy-batch-gestures.ts +1 -1
- package/src/lifecycle.ts +40 -0
- package/src/presence-handle.ts +39 -20
- package/src/presence.tsx +3 -1
- package/src/provider.tsx +96 -71
- package/src/reorder-components.tsx +61 -0
- package/src/reorder.tsx +84 -303
- package/src/stage.ts +15 -0
- package/src/unstable/v2/index.tsx +2 -26
- package/src/v1/index.tsx +1 -1
- package/src/variant-node.ts +8 -0
- package/src/w.tsx +38 -5
- package/src/ward.tsx +674 -48
- package/src/wardic-config.tsx +68 -21
- package/src/wardic-context.ts +26 -0
- package/src/wardic-instance.ts +6 -4
- package/src/wardic.tsx +3 -0
- package/dist/browser/create-wardic.js +0 -36
- package/dist/browser/create-wardic.js.map +0 -1
- package/dist/browser/presence-hooks.js +0 -144
- package/dist/browser/presence-hooks.js.map +0 -1
- package/dist/server/create-wardic.js +0 -36
- package/dist/server/create-wardic.js.map +0 -1
- package/dist/server/presence-hooks.js +0 -144
- package/dist/server/presence-hooks.js.map +0 -1
- package/dist/solid/create-wardic.d.ts +0 -25
- package/dist/solid/create-wardic.d.ts.map +0 -1
- package/dist/solid/create-wardic.jsx +0 -34
- package/dist/solid/create-wardic.jsx.map +0 -1
- package/dist/solid/presence-hooks.d.ts +0 -53
- package/dist/solid/presence-hooks.d.ts.map +0 -1
- package/dist/solid/presence-hooks.jsx +0 -117
- package/dist/solid/presence-hooks.jsx.map +0 -1
- package/src/create-wardic.tsx +0 -46
- package/src/presence-hooks.tsx +0 -159
package/src/reorder.tsx
CHANGED
|
@@ -49,11 +49,12 @@ import { constUndefined, identity, pipe } from "effect/Function"
|
|
|
49
49
|
import * as Match from "effect/Match"
|
|
50
50
|
import * as Option from "effect/Option"
|
|
51
51
|
import * as Predicate from "effect/Predicate"
|
|
52
|
+
import * as Rec from "effect/Record"
|
|
52
53
|
import * as Scope from "effect/Scope"
|
|
53
54
|
import * as UndefinedOr from "effect/UndefinedOr"
|
|
54
55
|
import { isServer, type JSX } from "@solidjs/web"
|
|
55
|
-
import { $PROXY, type Accessor,
|
|
56
|
-
import {
|
|
56
|
+
import { $PROXY, type Accessor, createEffect, createMemo, createSignal, flush, onCleanup, untrack } from "solid-js"
|
|
57
|
+
import type { WardicMotionPropsV2 as WardicMotionProps } from "./motion-props.ts"
|
|
57
58
|
import type * as Feature from "@wardic/dom/unstable/Feature"
|
|
58
59
|
import * as Drag from "@wardic/dom/unstable/features/Drag"
|
|
59
60
|
import * as Focus from "@wardic/dom/unstable/features/Focus"
|
|
@@ -66,16 +67,13 @@ import * as GestureFeatures from "@wardic/dom/unstable/GestureFeatures"
|
|
|
66
67
|
import * as OwnerScope from "@wardic/dom/unstable/OwnerScope"
|
|
67
68
|
import { watchItemInput } from "@wardic/dom/unstable/ReorderInput"
|
|
68
69
|
import { plainOrder } from "./reorder-values.ts"
|
|
69
|
-
import * as VariantTree from "@wardic/core/unstable/VariantTree"
|
|
70
70
|
import { configView, type PerKey } from "./config-view.ts"
|
|
71
71
|
import { useBrought, useWardicRuntime } from "./provider.tsx"
|
|
72
72
|
import { useLayoutServices } from "./layout-projection.tsx"
|
|
73
|
-
import { type AnyWard, spreadPropsOf, type Ward, withSpreadProps, type WardConfig, type
|
|
74
|
-
import
|
|
75
|
-
import { w } from "./w.tsx"
|
|
73
|
+
import { type AnyWard, spreadPropsOf, type Ward, withSpreadProps, type WardConfig, type WardInternals, type WardOptions, type WardStyle, wardWith } from "./ward.tsx"
|
|
74
|
+
import type { WardicMotion, WardRefCallback } from "./element.tsx"
|
|
76
75
|
import { CLIENT_ONLY, CLIENT_ONLY_DEFERRED } from "./solid-reactivity.ts"
|
|
77
76
|
import { eachOf, neverLands, NO_EVENTS, serverWhen, Waiters, whenOf } from "./waiters.ts"
|
|
78
|
-
import { BatchGroup, BatchItem } from "./batch-reorder-group.tsx"
|
|
79
77
|
|
|
80
78
|
export type { ReorderBatchColumnSize, ReorderBatchGap, ReorderBatchGroup, ReorderBatchGroupProps, ReorderBatchItemProps, ReorderBatchItemSize, ReorderBatchSizing } from "./batch-reorder-group.tsx"
|
|
81
79
|
|
|
@@ -85,6 +83,13 @@ export interface ReorderGroupConfigValues<V> {
|
|
|
85
83
|
readonly values: ReadonlyArray<V>
|
|
86
84
|
/** Given each new order, as an item crosses another: set `values` from it. */
|
|
87
85
|
readonly onReorder: (values: Array<V>) => void
|
|
86
|
+
/**
|
|
87
|
+
* What makes two of `values` one item, where your app makes them again (a refetch, a store's copy):
|
|
88
|
+
* matched by it, an item made again keeps its place, its drag and its keyboard lift, and the group's
|
|
89
|
+
* events hand the item as `values` holds it now. Left out, values match by identity. Read once.
|
|
90
|
+
*/
|
|
91
|
+
// Probe: hooks-first, the Reorder round.
|
|
92
|
+
readonly key?: ((value: V) => unknown) | undefined
|
|
88
93
|
/** The list's direction: `"y"`, a column, `"x"`, a row, or `"xy"`, a grid that wraps. Left out, it's found from the items' boxes. */
|
|
89
94
|
readonly axis?: CoreReorder.Axis | undefined
|
|
90
95
|
/** The keyboard reorder: on unless `false`. Off, the items have no keys, no tab stop and no instructions. */
|
|
@@ -105,26 +110,19 @@ export interface ReorderGroupConfigValues<V> {
|
|
|
105
110
|
/**
|
|
106
111
|
* A Reorder group's config: its `values` in order, `onReorder`, given each new order to set them from,
|
|
107
112
|
* and its options. Each key is a value or an accessor of it, such as a signal, a getter, a store's
|
|
108
|
-
* property or a component's prop; `onReorder`
|
|
113
|
+
* property or a component's prop; `onReorder` and `key` are functions.
|
|
109
114
|
*/
|
|
110
115
|
// Read per key (#259).
|
|
111
|
-
export type ReorderGroupConfig<V> = PerKey<ReorderGroupConfigValues<V>, "onReorder">
|
|
116
|
+
export type ReorderGroupConfig<V> = PerKey<ReorderGroupConfigValues<V>, "onReorder" | "key">
|
|
112
117
|
|
|
113
118
|
/** A group's config read per key (#259). */
|
|
114
|
-
const GROUP_VIEW = configView<ReorderGroupConfigValues<unknown>>(["values", "onReorder", "axis", "keyboard", "announcements", "instructions", "style"], ["onReorder"])
|
|
115
|
-
/** A group's config as a view of `config`. */
|
|
116
|
-
const groupViewOf = <V,>(config: ReorderGroupConfig<V>, beside: object): ReorderGroupConfigValues<V> => GROUP_VIEW.of(config, beside) as ReorderGroupConfigValues<V>
|
|
117
|
-
|
|
119
|
+
const GROUP_VIEW = configView<ReorderGroupConfigValues<unknown>>(["values", "onReorder", "key", "axis", "keyboard", "announcements", "instructions", "style"], ["onReorder", "key"])
|
|
118
120
|
/**
|
|
119
|
-
* A group's config as
|
|
120
|
-
* (#398)
|
|
121
|
+
* A group's config as a view of `config`, nothing beside it: a `Reorder.Group` given a group laid its
|
|
122
|
+
* element's props there (#398), a form gone with today's components (probe: hooks-first, the Reorder
|
|
123
|
+
* round's Q6).
|
|
121
124
|
*/
|
|
122
|
-
|
|
123
|
-
readonly config: object
|
|
124
|
-
readonly beside: object
|
|
125
|
-
}
|
|
126
|
-
// Module state (#460, Q7): a cache held weakly by the object it's for, so it goes with it.
|
|
127
|
-
const GROUP_LAYERS = new WeakMap<object, GroupLayer>()
|
|
125
|
+
const groupViewOf = <V,>(config: ReorderGroupConfig<V>): ReorderGroupConfigValues<V> => GROUP_VIEW.of(config, {}) as ReorderGroupConfigValues<V>
|
|
128
126
|
|
|
129
127
|
/** A Reorder group's events, as a ward's: `list.next(name)`, `list.each(name)` and `list.when(name)`. */
|
|
130
128
|
// #257 item 3, ADR-0046.
|
|
@@ -161,12 +159,12 @@ export interface ReorderGroupProps {
|
|
|
161
159
|
}
|
|
162
160
|
|
|
163
161
|
/**
|
|
164
|
-
* A **Reorder group**'s mark (#349): what tells a group
|
|
165
|
-
*
|
|
162
|
+
* A **Reorder group**'s mark (#349): what tells a group from a function, so `Reorder.Group`'s `groupRef`
|
|
163
|
+
* refuses one in its type ({@link GroupRefCallback}). Internal.
|
|
166
164
|
*/
|
|
167
165
|
export const REORDER_GROUP: unique symbol = Symbol("wardic.reorderGroup")
|
|
168
166
|
|
|
169
|
-
/** A Reorder group of `V`, whatever its config
|
|
167
|
+
/** A Reorder group of `V`, whatever its config. */
|
|
170
168
|
// #349.
|
|
171
169
|
export interface AnyReorderGroup<V> {
|
|
172
170
|
readonly [REORDER_GROUP]: V
|
|
@@ -260,7 +258,7 @@ interface ReorderItemOwn<V> {
|
|
|
260
258
|
* drag, and every other gesture, so `whileHover` or `whileTap` on an item works as on Motion's, for
|
|
261
259
|
* about 0.5 KB gzipped beside the drag's.
|
|
262
260
|
*/
|
|
263
|
-
const ITEM_BRINGS: ReadonlyArray<Feature.Feature> = [Layout.layout, Drag.drag, Hover.hover, Press.press, Focus.focus, InView.inView, Pan.pan]
|
|
261
|
+
export const ITEM_BRINGS: ReadonlyArray<Feature.Feature> = [Layout.layout, Drag.drag, Hover.hover, Press.press, Focus.focus, InView.inView, Pan.pan]
|
|
264
262
|
|
|
265
263
|
const ITEM_VIEW = configView<ReorderItemOwn<unknown>>(["value", "layout", "tabindex", "aria-describedby"], [])
|
|
266
264
|
|
|
@@ -305,14 +303,18 @@ const refCarrying = <G,>(attach: (element: HTMLElement) => void, props: Property
|
|
|
305
303
|
const spreadProps: PropertyDescriptorMap = { ref: { value: self, enumerable: true }, ...props }
|
|
306
304
|
const spread = spreadPropsOf<object>(spreadProps)
|
|
307
305
|
Object.defineProperties(self, { [REORDER_GROUP]: { value: true }, ...spreadProps })
|
|
308
|
-
|
|
306
|
+
// Its reads aren't enumerable. Solid calls a spread's function source for its props, `{...list}`; a
|
|
307
|
+
// group that's a member of another object, `{...made.list}`, it reads as an object, key by key, and
|
|
308
|
+
// each read was written to the element as an attribute: `group`, `axis`, `move`, `controller`.
|
|
309
|
+
const hidden = Rec.map(Object.getOwnPropertyDescriptors(reads) as Record<string, PropertyDescriptor>, (descriptor) => ({ ...descriptor, enumerable: false }))
|
|
310
|
+
return Object.defineProperties(self as object, hidden) as G
|
|
309
311
|
}
|
|
310
312
|
|
|
311
313
|
/**
|
|
312
314
|
* Makes a list of your own elements reorderable, by dragging or from the keyboard: spread the group on
|
|
313
315
|
* the list's element, and make each item with `reorderItem`, keyed with `<For>`. Your app owns
|
|
314
316
|
* `values`, and sets them from `onReorder`; a reorder it makes itself animates too. Call it where you'd
|
|
315
|
-
* make a signal, under a `WardicProvider`. `Reorder.Group`
|
|
317
|
+
* make a signal, under a `WardicProvider`. `createReorder`, and `Reorder.Group` over it, are built on it.
|
|
316
318
|
*
|
|
317
319
|
* @example
|
|
318
320
|
* const list = reorderGroup({ values: items, onReorder: setItems })
|
|
@@ -332,11 +334,10 @@ const refCarrying = <G,>(attach: (element: HTMLElement) => void, props: Property
|
|
|
332
334
|
// controller, no runtime; its `group`, `move` and `controller` do nothing (ADR-0021).
|
|
333
335
|
export function reorderGroup<V>(config: ReorderGroupConfig<V>): ReorderGroup<V> {
|
|
334
336
|
if (Predicate.isFunction(config)) throw new Error(WHOLE_GROUP_ACCESSOR)
|
|
335
|
-
const
|
|
336
|
-
const view = groupViewOf(config, beside)
|
|
337
|
+
const view = groupViewOf(config)
|
|
337
338
|
const cfg = (): ReorderGroupConfigValues<V> => view
|
|
338
339
|
const runtime = useWardicRuntime()
|
|
339
|
-
if (isServer) return
|
|
340
|
+
if (isServer) return serverReorderGroup(cfg)
|
|
340
341
|
const [detected, setDetected] = createSignal<CoreReorder.Axis>("y")
|
|
341
342
|
// The order as a plain array (#721): a store's copied, so a store changed in place is a new order, read
|
|
342
343
|
// untracked by the controller and tracked by the effect below.
|
|
@@ -367,6 +368,7 @@ export function reorderGroup<V>(config: ReorderGroupConfig<V>): ReorderGroup<V>
|
|
|
367
368
|
onReorderEnd: (end) => events.tell("reorderEnd", () => end),
|
|
368
369
|
onHoldStart: (start) => events.tell("holdStart", () => start),
|
|
369
370
|
onHoldEnd: (end) => events.tell("holdEnd", () => end),
|
|
371
|
+
key: untrack(() => cfg().key),
|
|
370
372
|
axis: () => Option.fromUndefinedOr(untrack(() => cfg().axis)),
|
|
371
373
|
onAxis: setDetected,
|
|
372
374
|
keyedWith: "<For>",
|
|
@@ -377,8 +379,8 @@ export function reorderGroup<V>(config: ReorderGroupConfig<V>): ReorderGroup<V>
|
|
|
377
379
|
// The app's axis, else the detected one. When the app's is cleared, detected here, from the boxes the
|
|
378
380
|
// engine holds, so the items' touch-action follows in the same flush (#257's audit: an effect that
|
|
379
381
|
// detected it wrote a signal the items read a flush late, EFFECT_RELAY_TEAR). A Measure pass's change
|
|
380
|
-
// comes through `onAxis`. Lazy: read first by an item, so
|
|
381
|
-
//
|
|
382
|
+
// comes through `onAxis`. Lazy: read first by an item, so the `axis` it tracks is the config's as the
|
|
383
|
+
// items read it (#398).
|
|
382
384
|
const axis: Accessor<CoreReorder.Axis> = createMemo(
|
|
383
385
|
() =>
|
|
384
386
|
UndefinedOr.match(cfg().axis, {
|
|
@@ -405,7 +407,7 @@ export function reorderGroup<V>(config: ReorderGroupConfig<V>): ReorderGroup<V>
|
|
|
405
407
|
if (element.style.getPropertyValue("overflow-anchor") === "") element.style.setProperty("overflow-anchor", "none")
|
|
406
408
|
controller.attach(element)
|
|
407
409
|
}
|
|
408
|
-
return
|
|
410
|
+
return refCarrying<ReorderGroup<V>>(
|
|
409
411
|
attach,
|
|
410
412
|
{ style: { get: () => groupStyleOf(cfg().style), enumerable: true } },
|
|
411
413
|
{
|
|
@@ -425,36 +427,12 @@ export function reorderGroup<V>(config: ReorderGroupConfig<V>): ReorderGroup<V>
|
|
|
425
427
|
controller,
|
|
426
428
|
...keyboardOf(cfg),
|
|
427
429
|
},
|
|
428
|
-
)
|
|
430
|
+
)
|
|
429
431
|
}
|
|
430
432
|
|
|
431
433
|
/** The group's axis memo's options: client-only, and lazy (#398). */
|
|
432
434
|
const AXIS_MEMO = { ...CLIENT_ONLY, lazy: true } as const
|
|
433
435
|
|
|
434
|
-
/** `group`, its config and its layer kept for a `Reorder.Group` it's given to (#398). */
|
|
435
|
-
const layered = <G extends object,>(group: G, config: object, beside: object): G => {
|
|
436
|
-
GROUP_LAYERS.set(group, { config, beside })
|
|
437
|
-
return group
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* A given group's element props (#398): each config key its `Reorder.Group` sets, laid over the
|
|
442
|
-
* group's config, read through the element's prop. A key the group's config sets too is an error.
|
|
443
|
-
*/
|
|
444
|
-
const besideGroup = (local: object, group: object): void => {
|
|
445
|
-
const layer = UndefinedOr.getOrThrow(GROUP_LAYERS.get(group))
|
|
446
|
-
const given = setKeysOf(local, GROUP_CONFIG)
|
|
447
|
-
const twice = setKeysOf(layer.config, given)
|
|
448
|
-
if (twice.length > 0) {
|
|
449
|
-
throw new Error(
|
|
450
|
-
`Reorder.Group: ${listOf(twice)} set both in the group given to groupRef and on the element (#398). ` +
|
|
451
|
-
"Set each key in one place: in reorderGroup({ … }), or on the element.",
|
|
452
|
-
)
|
|
453
|
-
}
|
|
454
|
-
Arr.forEach(given, (key) =>
|
|
455
|
-
Object.defineProperty(layer.beside, key, { enumerable: true, configurable: true, get: () => (local as Readonly<Record<string, unknown>>)[key] }))
|
|
456
|
-
}
|
|
457
|
-
|
|
458
436
|
/** What a group's Scope reports when one of its finalizers fails as its owner goes. */
|
|
459
437
|
const CLOSE_FAILED = "wardic.reorder: a finalizer failed"
|
|
460
438
|
|
|
@@ -507,7 +485,7 @@ const keyboardAttributes = <V,>(
|
|
|
507
485
|
|
|
508
486
|
/**
|
|
509
487
|
* Makes an element an item of a Reorder group: a ward, spread on the element, `<li {...row}>`, or given
|
|
510
|
-
* to
|
|
488
|
+
* to its `ref`. `value` is its value in the group's `values`, read once; the rest is a
|
|
511
489
|
* ward's config, but `layout` (`true` or `"position"`), `layoutId` and `drag`, which the group sets. It's
|
|
512
490
|
* a tab stop for the keyboard reorder: your own `tabindex` and `aria-describedby` go in its config.
|
|
513
491
|
* Call it where you'd make a signal: in a `<For>` callback.
|
|
@@ -520,33 +498,39 @@ const keyboardAttributes = <V,>(
|
|
|
520
498
|
// ADR-0020. Given to `ref` alone, it's client-only. The element takes the drag defaults, with the
|
|
521
499
|
// group's axis's touch-action, which its `style` can override.
|
|
522
500
|
export function reorderItem<V, const C extends ReorderItemConfig<V>>(list: ReorderGroup<V>, config: C, options?: WardOptions): ReorderItem<V, C> {
|
|
523
|
-
return reorderItemWith(list, config as ReorderItemConfig<V>, UndefinedOr.map(options, (o) => o.parent)
|
|
501
|
+
return reorderItemWith(list, config as ReorderItemConfig<V>, { parent: UndefinedOr.map(options, (o) => o.parent) }) as unknown as ReorderItem<V, C>
|
|
524
502
|
}
|
|
525
503
|
|
|
526
504
|
/** A `<Reorder>` item's mark (#349): the group it's in. Internal. */
|
|
527
505
|
export const REORDER_ITEM: unique symbol = Symbol("wardic.reorderItem")
|
|
528
506
|
|
|
529
|
-
/** A `<Reorder>` item of `V`, whatever its config
|
|
507
|
+
/** A `<Reorder>` item of `V`, whatever its config. */
|
|
530
508
|
// #349.
|
|
531
509
|
export interface AnyReorderItem<V> extends AnyWard {
|
|
532
510
|
readonly [REORDER_ITEM]: V
|
|
533
511
|
}
|
|
534
512
|
|
|
535
513
|
/**
|
|
536
|
-
* `reorderItem()`'s item: a ward in its group. Spread it on the item's element, or give it to
|
|
537
|
-
* `Reorder.Item`'s `wardRef`.
|
|
514
|
+
* `reorderItem()`'s item: a ward in its group. Spread it on the item's element, or give it to its `ref`.
|
|
538
515
|
*/
|
|
539
516
|
export type ReorderItem<V, C extends ReorderItemConfig<V> = ReorderItemConfig<V>> = Ward<C> & AnyReorderItem<V>
|
|
540
517
|
|
|
541
|
-
/**
|
|
542
|
-
|
|
518
|
+
/**
|
|
519
|
+
* {@link reorderItem} over `internal`, the internals its ward was given: its parent and its tag
|
|
520
|
+
* (`Reorder.Item`'s `as`, a hook row's `tag`), and a hook row's own besides (what the hooks are told of a
|
|
521
|
+
* ward they made, a function rune's shared lifecycle, a Variant child by its own word, a ward that names
|
|
522
|
+
* no gesture, the keys the hooks fix over its config), each kept under what an item sets itself. Internal.
|
|
523
|
+
*/
|
|
524
|
+
// The Reorder round's RF1: an item took its parent and its tag alone, so a hook row's function rune
|
|
525
|
+
// never heard its row, its lifecycle unshared.
|
|
526
|
+
export const reorderItemWith = <V,>(list: ReorderGroup<V>, config: ReorderItemConfig<V>, internal: WardInternals): Ward => {
|
|
543
527
|
if (Predicate.isFunction(config)) throw new Error(WHOLE_ITEM_ACCESSOR)
|
|
544
528
|
// Its own keys read per key (#259); the rest are its ward's config, read by the ward. Its `layout`
|
|
545
529
|
// is its Layout mode, `true` or `"position"` whatever the config gives, read at each layout
|
|
546
530
|
// animation's start as any ward's is (ADR-0009, *Amendment (#42)*).
|
|
547
531
|
const own = ITEM_VIEW.of(config) as ReorderItemOwn<V>
|
|
548
532
|
const cfg = (): ReorderItemOwn<V> => own
|
|
549
|
-
const fixed = { layout: (): ReorderItemLayout => itemLayoutOf(own.layout) }
|
|
533
|
+
const fixed = { ...internal.fixed, layout: (): ReorderItemLayout => itemLayoutOf(own.layout) }
|
|
550
534
|
const wardConfig = config as unknown as WardConfig
|
|
551
535
|
// Its group's axis's `touch-action`, under its style: none when its own presses don't drag it
|
|
552
536
|
// (`dragListener={false}`, #431), as with its other drag defaults, so a list dragged by handles scrolls by touch.
|
|
@@ -557,7 +541,7 @@ const reorderItemWith = <V,>(list: ReorderGroup<V>, config: ReorderItemConfig<V>
|
|
|
557
541
|
// On a server the item renders the drag defaults with its group's touch-action, and joins no
|
|
558
542
|
// controller (ADR-0021); the instructions element exists on the client only.
|
|
559
543
|
if (isServer) {
|
|
560
|
-
const row = wardWith(wardConfig, {
|
|
544
|
+
const row = wardWith(wardConfig, { ...internal, brings: ITEM_BRINGS, dragAxis: () => true, baseStyle: touchAction, fixed, group: list })
|
|
561
545
|
return withSpreadProps(Object.defineProperties(row, { [REORDER_ITEM]: { value: list } }), keyboardAttributes(list, cfg, constUndefined))
|
|
562
546
|
}
|
|
563
547
|
const runtime = useWardicRuntime()
|
|
@@ -582,11 +566,10 @@ const reorderItemWith = <V,>(list: ReorderGroup<V>, config: ReorderItemConfig<V>
|
|
|
582
566
|
CLIENT_ONLY,
|
|
583
567
|
)
|
|
584
568
|
const row = wardWith(wardConfig, {
|
|
585
|
-
|
|
569
|
+
...internal,
|
|
586
570
|
brings: ITEM_BRINGS,
|
|
587
571
|
fixed,
|
|
588
572
|
group: list,
|
|
589
|
-
parent,
|
|
590
573
|
dragAxis: () => dragAxisFor(driver.dragAxis()),
|
|
591
574
|
onDragSample: driver.onSample,
|
|
592
575
|
onLayoutHandle: driver.register,
|
|
@@ -608,25 +591,21 @@ const reorderItemWith = <V,>(list: ReorderGroup<V>, config: ReorderItemConfig<V>
|
|
|
608
591
|
return withSpreadProps(Object.defineProperties(row, { [REORDER_ITEM]: { value: list } }), keyboardAttributes(list, cfg, describedBy))
|
|
609
592
|
}
|
|
610
593
|
|
|
611
|
-
// ---
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
const GroupContext = createContext<ReorderGroup<unknown> | null>(null)
|
|
594
|
+
// --- The components' props (ADR-0020). The components are the hooks' utilities over `createReorder`
|
|
595
|
+
// (`reorder-components.tsx`, probe: hooks-first, the Reorder round), and today's built on the factories
|
|
596
|
+
// here went with the swap. ---------------------------------------------------------------------------
|
|
615
597
|
|
|
616
598
|
/** An element tag a `<Reorder>` group or item can render. */
|
|
617
599
|
export type ReorderElementTag = keyof JSX.IntrinsicElements
|
|
618
600
|
|
|
619
|
-
/**
|
|
620
|
-
|
|
621
|
-
* `reorderGroup` given to `groupRef`, with the options its config doesn't set beside it. A key given
|
|
622
|
-
* both ways is an error.
|
|
623
|
-
*/
|
|
624
|
-
// #349, #398. A key set twice is caught at setup; in the types only for `values` and `onReorder`, which
|
|
625
|
-
// every group sets: a group's type doesn't carry its config.
|
|
601
|
+
/** `Reorder.Group`'s group: its config as props, `groupRef` handing the group out. */
|
|
602
|
+
// #349, #398.
|
|
626
603
|
export type ReorderGroupOf<V> =
|
|
627
|
-
|
|
604
|
+
{
|
|
628
605
|
readonly values: ReadonlyArray<V>
|
|
629
606
|
readonly onReorder: (values: Array<V>) => void
|
|
607
|
+
/** What makes two of `values` one item, where your app makes them again: see the group config's `key`. Read once. */
|
|
608
|
+
readonly key?: ((value: V) => unknown) | undefined
|
|
630
609
|
readonly axis?: CoreReorder.Axis | undefined
|
|
631
610
|
readonly keyboard?: boolean | undefined
|
|
632
611
|
readonly announcements?: Partial<CoreReorder.Announcements<V>> | undefined
|
|
@@ -637,19 +616,9 @@ export type ReorderGroupOf<V> =
|
|
|
637
616
|
*/
|
|
638
617
|
readonly groupRef?: GroupRefCallback<V> | undefined
|
|
639
618
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
* doesn't set beside it: never `values` or `onReorder`, which a group is made with.
|
|
644
|
-
*/
|
|
645
|
-
readonly groupRef: AnyReorderGroup<V>
|
|
646
|
-
readonly values?: never
|
|
647
|
-
readonly onReorder?: never
|
|
648
|
-
readonly axis?: CoreReorder.Axis | undefined
|
|
649
|
-
readonly keyboard?: boolean | undefined
|
|
650
|
-
readonly announcements?: Partial<CoreReorder.Announcements<V>> | undefined
|
|
651
|
-
readonly instructions?: string | undefined
|
|
652
|
-
}
|
|
619
|
+
// A group made with `reorderGroup` given to `groupRef` to drive was a form of the component's too: no
|
|
620
|
+
// more since `Reorder.Group` is the hooks' utility over `createReorder` (probe: hooks-first, the Reorder
|
|
621
|
+
// round's Q6), which makes its own.
|
|
653
622
|
|
|
654
623
|
/** A function `groupRef` gives the component's group: never a group, which it would take instead. */
|
|
655
624
|
export type GroupRefCallback<V> = ((list: ReorderGroup<V>) => void) & { readonly [REORDER_GROUP]?: never }
|
|
@@ -663,231 +632,43 @@ export type ReorderGroupComponentProps<V, Tag extends ReorderElementTag = "ul">
|
|
|
663
632
|
& { readonly as?: Tag }
|
|
664
633
|
& Omit<JSX.IntrinsicElements[Tag], "style" | "onReorder">
|
|
665
634
|
& { readonly style?: WardStyle | string | undefined }
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
/** A `<Reorder>` item's motion props: any but `layoutId` and `drag`, its `layout` a Layout mode. */
|
|
669
|
-
type ItemMotionProps = Omit<WardicMotionProps, "layout" | "layoutId" | "drag">
|
|
635
|
+
// Not a ward's presence `key`: the group's, a function of a value (probe: hooks-first, the Reorder round).
|
|
636
|
+
& Omit<WardicMotion, "key">
|
|
670
637
|
|
|
671
638
|
/**
|
|
672
|
-
*
|
|
673
|
-
* or
|
|
674
|
-
* beside it, as beside a ward: never `value`, which an item is made with.
|
|
639
|
+
* A `<Reorder>` item's motion props: any but `layoutId` and `drag`, its `layout` a Layout mode. Not
|
|
640
|
+
* `dragControls` or `dragListener`: a `<Reorder.Grip>` inside it is their way (probe: behaviour-runes, Q29).
|
|
675
641
|
*/
|
|
642
|
+
type ItemMotionProps = Omit<WardicMotionProps, "layout" | "layoutId" | "drag" | "dragControls" | "dragListener">
|
|
643
|
+
|
|
644
|
+
/** `Reorder.Item`'s item: its `value`, its `layout` and its motion props, `wardRef` handing its ward out. */
|
|
676
645
|
// #349, #398.
|
|
677
|
-
export type ReorderItemOf<V
|
|
678
|
-
|
|
646
|
+
export type ReorderItemOf<V> =
|
|
647
|
+
ItemMotionProps & {
|
|
679
648
|
/** Its value in the group's `values`, of any type, not its element's `value` attribute. Read once. */
|
|
680
649
|
readonly value: V
|
|
681
650
|
readonly layout?: ReorderItemLayout
|
|
682
651
|
readonly wardRef?: WardRefCallback | undefined
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
readonly value?: never
|
|
687
|
-
readonly layout?: "layout" extends WardSetKey<C> ? never : ReorderItemLayout
|
|
688
|
-
readonly tabindex?: "tabindex" extends WardSetKey<C> ? never : number
|
|
689
|
-
readonly "aria-describedby"?: "aria-describedby" extends WardSetKey<C> ? never : string
|
|
690
|
-
})
|
|
652
|
+
}
|
|
653
|
+
// An item made with `reorderItem` given to `wardRef` to drive was a form of the component's too, of its
|
|
654
|
+
// config's type: no more since `Reorder.Item` is the hooks' utility (probe: hooks-first, the Reorder round's Q6).
|
|
691
655
|
|
|
692
656
|
/**
|
|
693
657
|
* `Reorder.Item`'s props: its item ({@link ReorderItemOf}), `as`, the element it renders (`"li"` by
|
|
694
658
|
* default, read once), and that element's own props, but its `value` attribute: `value` is the item's (#748).
|
|
695
659
|
*/
|
|
696
|
-
export type ReorderItemComponentProps<V, Tag extends ReorderElementTag = "li"
|
|
697
|
-
& ReorderItemOf<V
|
|
660
|
+
export type ReorderItemComponentProps<V, Tag extends ReorderElementTag = "li"> =
|
|
661
|
+
& ReorderItemOf<V>
|
|
698
662
|
& { readonly as?: Tag }
|
|
699
663
|
& Omit<JSX.IntrinsicElements[Tag], "style" | "value">
|
|
700
664
|
& { readonly style?: WardStyle | string | undefined }
|
|
701
665
|
|
|
702
666
|
/**
|
|
703
|
-
*
|
|
704
|
-
*
|
|
667
|
+
* `Reorder.Grip`'s props (probe: behaviour-runes, Q29, Q33): `as`, the element it renders (a
|
|
668
|
+
* `<button type="button">` by default, read once), that element's own props, and its motion props.
|
|
705
669
|
*/
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
readonly
|
|
711
|
-
readonly keyboard?: boolean | undefined
|
|
712
|
-
readonly announcements?: Partial<CoreReorder.Announcements<V>> | undefined
|
|
713
|
-
readonly instructions?: string | undefined
|
|
714
|
-
readonly as?: string | undefined
|
|
715
|
-
readonly ref?: unknown
|
|
716
|
-
readonly style?: WardStyle | string | undefined
|
|
717
|
-
readonly children?: JSX.Element
|
|
718
|
-
}
|
|
719
|
-
interface ItemLocal<V> {
|
|
720
|
-
readonly value: V
|
|
721
|
-
readonly as?: string | undefined
|
|
722
|
-
readonly ref?: unknown
|
|
723
|
-
readonly style?: WardStyle | string | undefined
|
|
724
|
-
readonly children?: JSX.Element
|
|
725
|
-
readonly tabindex?: number | undefined
|
|
726
|
-
readonly "aria-describedby"?: string | undefined
|
|
727
|
-
readonly wardRef?: unknown
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
const GROUP_OWN = ["values", "onReorder", "axis", "keyboard", "announcements", "instructions", "as", "ref", "style", "children", "groupRef"] as const
|
|
731
|
-
const ITEM_OWN = [...MOTION_PROPS, "value", "as", "ref", "style", "children", "tabindex", "aria-describedby", "wardRef"] as const
|
|
732
|
-
/** A group's config keys: beside a given group, each it doesn't set (#398). */
|
|
733
|
-
const GROUP_CONFIG = ["values", "onReorder", "axis", "keyboard", "announcements", "instructions"] as const
|
|
734
|
-
/** An item's config keys, its motion props and its own: beside a given item, each it doesn't set (#398). */
|
|
735
|
-
const ITEM_CONFIG = [...MOTION_PROPS, "value", "tabindex", "aria-describedby"] as const
|
|
736
|
-
/** A `<Reorder>` item's keyboard reorder attributes (ADR-0037), which a given item's element carries (#349). */
|
|
737
|
-
const KEYBOARD_ATTRIBUTES = ["tabindex", "aria-describedby"] as const
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* The Wardic element for `tag`, as a plain component: a Slim element's (`w[tag]`, #511), so a Reorder
|
|
741
|
-
* brings no Feature but its own (ADR-0067 decision 12) and renders under a `strict` section.
|
|
742
|
-
*/
|
|
743
|
-
const wardicTag = (tag: string): Component<Record<string, unknown>> =>
|
|
744
|
-
UndefinedOr.getOrThrow((w as unknown as Record<string, Component<Record<string, unknown>> | undefined>)[tag])
|
|
745
|
-
|
|
746
|
-
/** The group given to `groupRef` (#349), or `undefined` for a function or none: read once, untracked, as `ref` is. */
|
|
747
|
-
const givenGroupOf = <V,>(local: GroupLocal<V>): ReorderGroup<V> | undefined => {
|
|
748
|
-
const ref = untrack(() => local.groupRef)
|
|
749
|
-
return Bool.match(Predicate.hasProperty(ref, REORDER_GROUP), { onTrue: () => ref as ReorderGroup<V>, onFalse: constUndefined })
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
/**
|
|
753
|
-
* A list put in order by dragging its items, or from the keyboard, rendered as `as`, `"ul"` by
|
|
754
|
-
* default. Your app owns `values`, and sets them from `onReorder`; or give it a group made with
|
|
755
|
-
* `reorderGroup` as `groupRef`. Key its `Reorder.Item`s with `<For>`.
|
|
756
|
-
*
|
|
757
|
-
* @see https://wardic.dev/reference/solid/reorder/reorder
|
|
758
|
-
*/
|
|
759
|
-
// ADR-0020, #349: a `reorderGroup` on `w[as]`, the group in context for its items.
|
|
760
|
-
function Group<V, Tag extends ReorderElementTag = "ul">(props: ReorderGroupComponentProps<V, Tag>): JSX.Element {
|
|
761
|
-
const local = props as unknown as GroupLocal<V>
|
|
762
|
-
const given = givenGroupOf(local)
|
|
763
|
-
const list = UndefinedOr.match(given, {
|
|
764
|
-
onUndefined: () => {
|
|
765
|
-
// Its props are its config, read per key (#259).
|
|
766
|
-
const made = reorderGroup<V>(local as unknown as ReorderGroupConfig<V>)
|
|
767
|
-
// The group, to its `groupRef` (#257 item 3), read once, untracked, as `ref` is.
|
|
768
|
-
const give = untrack(() => local.groupRef)
|
|
769
|
-
if (Predicate.isFunction(give)) give(made)
|
|
770
|
-
return made
|
|
771
|
-
},
|
|
772
|
-
onDefined: (group) => {
|
|
773
|
-
besideGroup(local, group)
|
|
774
|
-
return group
|
|
775
|
-
},
|
|
776
|
-
})
|
|
777
|
-
const Tag = wardicTag(UndefinedOr.match(untrack(() => local.as), { onUndefined: () => "ul", onDefined: identity }))
|
|
778
|
-
const rest = omit(props as unknown as Record<string, unknown>, ...GROUP_OWN)
|
|
779
|
-
// Its element's style over the group's: `overflow-anchor: none`, under a given group's config (#349).
|
|
780
|
-
const styleOf: () => JSX.CSSProperties = UndefinedOr.match(given, {
|
|
781
|
-
onUndefined: () => () => pipe(local.style, Style.over(ReorderController.GROUP_STYLE)) as JSX.CSSProperties,
|
|
782
|
-
onDefined: (group) => () => pipe(local.style, Style.over(group.style)) as JSX.CSSProperties,
|
|
783
|
-
})
|
|
784
|
-
return (
|
|
785
|
-
<GroupContext value={list as ReorderGroup<unknown>}>
|
|
786
|
-
<Tag {...rest} style={styleOf()} ref={refsOf(local, [list])}>
|
|
787
|
-
{local.children}
|
|
788
|
-
</Tag>
|
|
789
|
-
</GroupContext>
|
|
790
|
-
)
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
/**
|
|
794
|
-
* A `<Reorder>` item given to `Reorder.Item`'s `wardRef` (#349): one of `list`'s, made with
|
|
795
|
-
* {@link reorderItem}. Its element is driven by a ward of the component's, and carries the item's
|
|
796
|
-
* keyboard reorder attributes.
|
|
797
|
-
*/
|
|
798
|
-
const givenItem = <V,>(list: ReorderGroup<V>, local: ItemLocal<V>, share: WardShare, tag: string): { readonly row: Ward; readonly keys: object; readonly setup: WardConfigValues } => {
|
|
799
|
-
if (Predicate.isUndefined(share.internal.group)) {
|
|
800
|
-
throw new Error("Reorder.Item: the ward in wardRef isn't a Reorder item (#349). Make it with reorderItem(list, { value }), list the group it's in.")
|
|
801
|
-
}
|
|
802
|
-
if (share.internal.group !== list) {
|
|
803
|
-
throw new Error("Reorder.Item: the item in wardRef is another group's (#349). Make it with reorderItem(list, …), list the Reorder.Group it renders in.")
|
|
804
|
-
}
|
|
805
|
-
const item = untrack(() => local.wardRef) as object
|
|
806
|
-
const { ward: row, setup } = drivenWard("Reorder.Item", local, share, { tag }, ITEM_CONFIG)
|
|
807
|
-
// Its keyboard attributes: the item's, or the element's where it sets one the item doesn't (#398).
|
|
808
|
-
const keys = Object.defineProperties(
|
|
809
|
-
{},
|
|
810
|
-
Object.fromEntries(
|
|
811
|
-
Arr.map(KEYBOARD_ATTRIBUTES, (key) => [
|
|
812
|
-
key,
|
|
813
|
-
Bool.match(sets(local, key), {
|
|
814
|
-
onTrue: (): PropertyDescriptor => ({ enumerable: true, get: () => (local as unknown as Readonly<Record<string, unknown>>)[key] }),
|
|
815
|
-
onFalse: () => UndefinedOr.getOrThrow(Object.getOwnPropertyDescriptor(item, key)),
|
|
816
|
-
}),
|
|
817
|
-
]),
|
|
818
|
-
),
|
|
819
|
-
)
|
|
820
|
-
return { row, keys, setup }
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
/**
|
|
824
|
-
* An item of the `Reorder.Group` around it, rendered as `as`, `"li"` by default: made from its props,
|
|
825
|
-
* or an item made with `reorderItem` given as `wardRef`. Outside a group it throws, as Motion's does.
|
|
826
|
-
*
|
|
827
|
-
* @see https://wardic.dev/reference/solid/reorder/reorder
|
|
828
|
-
*/
|
|
829
|
-
// ADR-0020, #349: a `reorderItem` on the nearest group.
|
|
830
|
-
function Item<V, Tag extends ReorderElementTag = "li", C = {}>(props: ReorderItemComponentProps<V, Tag, C>): JSX.Element {
|
|
831
|
-
const list = useContext(GroupContext) as ReorderGroup<V> | null
|
|
832
|
-
if (Predicate.isNull(list)) throw new Error("Reorder.Item must be a child of Reorder.Group")
|
|
833
|
-
const local = props as unknown as ItemLocal<V> & WardicMotionProps
|
|
834
|
-
const tag = UndefinedOr.match(untrack(() => local.as), { onUndefined: () => "li", onDefined: identity })
|
|
835
|
-
const given = givenOf(local)
|
|
836
|
-
// One plain element a tag, as every Wardic element's (#618, M3).
|
|
837
|
-
const Element = staticElementOf(tag)
|
|
838
|
-
const rest = omit(props as unknown as Record<string, unknown>, ...ITEM_OWN)
|
|
839
|
-
const element = UndefinedOr.match(given, {
|
|
840
|
-
onUndefined: () => {
|
|
841
|
-
// Its props are its config, read per key (#259); its `layout` is read as a Layout mode.
|
|
842
|
-
const row = reorderItemWith<V>(list, local as unknown as ReorderItemConfig<V>, undefined, tag)
|
|
843
|
-
// Its ward, to the item's `wardRef` (#257).
|
|
844
|
-
handOver(local, row)
|
|
845
|
-
// The ward's spread props, as an object: spread as the function it is, it's a source `merge`
|
|
846
|
-
// calls in a computation, whose keys `spread` can't know, so it inserts children too (#525, #618 M3).
|
|
847
|
-
const rowProps = row()
|
|
848
|
-
return {
|
|
849
|
-
row,
|
|
850
|
-
setup: undefined,
|
|
851
|
-
render: (): JSX.Element => (
|
|
852
|
-
<Element {...rest} {...rowProps} ref={refsOf(local, [row])}>
|
|
853
|
-
{local.children}
|
|
854
|
-
</Element>
|
|
855
|
-
),
|
|
856
|
-
}
|
|
857
|
-
},
|
|
858
|
-
onDefined: (share) => {
|
|
859
|
-
const { row, keys, setup } = givenItem(list, local, share, tag)
|
|
860
|
-
return {
|
|
861
|
-
row,
|
|
862
|
-
setup,
|
|
863
|
-
render: (): JSX.Element => (
|
|
864
|
-
<Element {...rest} {...row.with({ style: local.style })} {...keys} ref={refsOf(local, [row])}>
|
|
865
|
-
{local.children}
|
|
866
|
-
</Element>
|
|
867
|
-
),
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
})
|
|
871
|
-
// An item that changes what its children read renders its variant context's Provider around them
|
|
872
|
-
// (#50), as every Wardic element does; any other renders none.
|
|
873
|
-
const config = UndefinedOr.match(element.setup, { onUndefined: () => wardConfigView(local as unknown as WardConfig), onDefined: identity })
|
|
874
|
-
return Bool.match(untrack(() => VariantTree.changesContext(config)), {
|
|
875
|
-
onFalse: element.render,
|
|
876
|
-
onTrue: () => <element.row.Provider>{element.render()}</element.row.Provider>,
|
|
877
|
-
})
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* A list put in order by dragging its items, or from the keyboard: `Reorder.Group` and `Reorder.Item`.
|
|
882
|
-
* Your app owns the order: the group takes it as `values`, and `onReorder` hands each new one back.
|
|
883
|
-
* Motion's `Reorder`. A long list of items of one size reorders as one Batch: `Reorder.BatchGroup` and
|
|
884
|
-
* `Reorder.BatchItem`.
|
|
885
|
-
*
|
|
886
|
-
* @example
|
|
887
|
-
* <Reorder.Group values={items()} onReorder={setItems}>
|
|
888
|
-
* <For each={items()}>{(item) => <Reorder.Item value={item}>{item}</Reorder.Item>}</For>
|
|
889
|
-
* </Reorder.Group>
|
|
890
|
-
* @see https://wardic.dev/reference/solid/reorder/reorder
|
|
891
|
-
*/
|
|
892
|
-
// ADR-0020; the Batch pair, ADR-0072 (#712).
|
|
893
|
-
export const Reorder = { Group, Item, BatchGroup, BatchItem } as const
|
|
670
|
+
export type ReorderGripComponentProps<Tag extends ReorderElementTag = "button"> =
|
|
671
|
+
& ItemMotionProps
|
|
672
|
+
& { readonly as?: Tag }
|
|
673
|
+
& Omit<JSX.IntrinsicElements[Tag], "style">
|
|
674
|
+
& { readonly style?: WardStyle | string | undefined }
|
package/src/stage.ts
CHANGED
|
@@ -88,6 +88,9 @@ export type StageWardChecked<C> = WardCheckedConfig<C, PerKeyApart<StageWardConf
|
|
|
88
88
|
* Environment adds its own by declaration merging, as it adds its Subjects to {@link StageSubjects}.
|
|
89
89
|
* `@wardic/three/solid` adds three.js's: a material's `roughness` and `emissive`, a light's
|
|
90
90
|
* `intensity`, a camera's `fov`. A name in neither an element's values nor these is an error naming it.
|
|
91
|
+
* Each entry's type is what its value takes in a target (a number, a colour): `ward(subject, config)`
|
|
92
|
+
* reads the names alone, and the hooks read the types too, for a rune written with no Subject
|
|
93
|
+
* ({@link StageTargetValues} holds them by Subject).
|
|
91
94
|
*/
|
|
92
95
|
// #934: the scene lab's keys were all an element's too (`opacity`, `color`); a material's own weren't.
|
|
93
96
|
export interface StageValues {}
|
|
@@ -95,6 +98,18 @@ export interface StageValues {}
|
|
|
95
98
|
/** The names of {@link StageValues}. */
|
|
96
99
|
export type StageValueKey = keyof StageValues & string
|
|
97
100
|
|
|
101
|
+
/**
|
|
102
|
+
* What each of a Stage's Subject `S`'s values takes in a target, by name (probe: hooks-first): what
|
|
103
|
+
* the hooks check a rune's targets on `S` by. An Environment adds its own by declaration merging, a
|
|
104
|
+
* generic interface of the Subject as {@link StageReads} is: `declare module "@wardic/solid" {
|
|
105
|
+
* interface StageTargetValues<S> { three: SceneTargetValues<S> } }`. Each Environment's entry for a
|
|
106
|
+
* Subject it doesn't take is `{}`, and a Subject no Environment gives a name isn't checked.
|
|
107
|
+
* {@link StageValues} holds every Subject's names at once, each with what it takes, for a rune
|
|
108
|
+
* written with no Subject.
|
|
109
|
+
*/
|
|
110
|
+
// By declaration merging, as `StageReads` is and for its reason: `@wardic/solid` names no Environment's type.
|
|
111
|
+
export interface StageTargetValues<S> extends Record<never, S> {}
|
|
112
|
+
|
|
98
113
|
/**
|
|
99
114
|
* What each key of a Stage's Subject `S` reads as, by the Environment that fills one: a ward's `read` takes
|
|
100
115
|
* its Subject's keys at these types. `@wardic/three/solid` adds three.js's, as `declare module
|