@wardic/solid 2.2.0 → 3.0.0-next.1
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 +39 -18
- package/dist/browser/animation-frame.js +1 -1
- package/dist/browser/animation-frame.js.map +1 -1
- package/dist/browser/config-view.js +35 -6
- package/dist/browser/config-view.js.map +1 -1
- package/dist/browser/create-batch.js +1 -1
- package/dist/browser/diagnostic-codes.js +216 -0
- package/dist/browser/diagnostic-codes.js.map +1 -0
- package/dist/browser/diagnostics.js +79 -0
- package/dist/browser/diagnostics.js.map +1 -0
- package/dist/browser/element-style.js +61 -7
- package/dist/browser/element-style.js.map +1 -1
- package/dist/browser/element.js +24 -6
- 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/frame-effect.js +1 -1
- package/dist/browser/frame-effect.js.map +1 -1
- package/dist/browser/gesture-callbacks.js +1 -1
- package/dist/browser/gesture-callbacks.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 +633 -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 +88 -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 +269 -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 +800 -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 +2212 -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 +563 -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 +124 -90
- 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 +51 -278
- package/dist/browser/reorder.js.map +1 -1
- package/dist/browser/runtime.js +26 -15
- package/dist/browser/runtime.js.map +1 -1
- package/dist/browser/spans-check.js +8 -3
- package/dist/browser/spans-check.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 +594 -61
- 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/animation-frame.js +1 -1
- package/dist/server/animation-frame.js.map +1 -1
- package/dist/server/config-view.js +35 -6
- package/dist/server/config-view.js.map +1 -1
- package/dist/server/create-batch.js +1 -1
- package/dist/server/diagnostic-codes.js +216 -0
- package/dist/server/diagnostic-codes.js.map +1 -0
- package/dist/server/diagnostics.js +79 -0
- package/dist/server/diagnostics.js.map +1 -0
- package/dist/server/element-style.js +61 -7
- package/dist/server/element-style.js.map +1 -1
- package/dist/server/element.js +24 -6
- 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/frame-effect.js +1 -1
- package/dist/server/frame-effect.js.map +1 -1
- package/dist/server/gesture-callbacks.js +1 -1
- package/dist/server/gesture-callbacks.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 +633 -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 +87 -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 +309 -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 +800 -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 +2212 -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 +563 -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 +125 -100
- 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 +51 -348
- package/dist/server/reorder.js.map +1 -1
- package/dist/server/runtime.js +26 -15
- package/dist/server/runtime.js.map +1 -1
- package/dist/server/spans-check.js +8 -3
- package/dist/server/spans-check.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 +594 -61
- 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/animation-frame.js +1 -1
- package/dist/solid/animation-frame.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 +31 -7
- package/dist/solid/config-view.js.map +1 -1
- package/dist/solid/create-batch.jsx +1 -1
- package/dist/solid/diagnostic-codes.d.ts +10 -0
- package/dist/solid/diagnostic-codes.d.ts.map +1 -0
- package/dist/solid/diagnostic-codes.js +246 -0
- package/dist/solid/diagnostic-codes.js.map +1 -0
- package/dist/solid/diagnostics.d.ts +33 -0
- package/dist/solid/diagnostics.d.ts.map +1 -0
- package/dist/solid/diagnostics.js +76 -0
- package/dist/solid/diagnostics.js.map +1 -0
- 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 +27 -8
- 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/frame-effect.jsx +1 -1
- package/dist/solid/frame-effect.jsx.map +1 -1
- package/dist/solid/gesture-callbacks.js +1 -1
- package/dist/solid/gesture-callbacks.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 +586 -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 +63 -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 +274 -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 +817 -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 +2258 -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 +523 -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 +126 -82
- 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 +45 -206
- package/dist/solid/reorder.jsx.map +1 -1
- package/dist/solid/runtime.d.ts +20 -7
- package/dist/solid/runtime.d.ts.map +1 -1
- package/dist/solid/runtime.js +25 -14
- package/dist/solid/runtime.js.map +1 -1
- package/dist/solid/spans-check.d.ts +5 -1
- package/dist/solid/spans-check.d.ts.map +1 -1
- package/dist/solid/spans-check.js +8 -3
- package/dist/solid/spans-check.js.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 +564 -60
- 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 +29 -7
- package/skills/wardic-diagnostics/SKILL.md +472 -0
- package/skills/wardic-migrate/SKILL.md +204 -0
- package/skills/wardic-solid/SKILL.md +60 -0
- package/skills/wardic-solid/events.md +70 -0
- package/skills/wardic-solid/from-motion.md +59 -0
- package/skills/wardic-solid/lists-and-presence.md +110 -0
- package/skills/wardic-solid/reorder-and-grips.md +88 -0
- package/skills/wardic-solid/runes.md +151 -0
- package/skills/wardic-solid/scopes-and-settings.md +75 -0
- package/src/animation-frame.ts +1 -1
- package/src/batch-reorder-group.tsx +1 -1
- package/src/batch-reorder.ts +1 -1
- package/src/config-view.ts +35 -7
- package/src/create-batch.tsx +1 -1
- package/src/diagnostic-codes.ts +254 -0
- package/src/diagnostics.ts +88 -0
- package/src/element-style.ts +77 -9
- package/src/element.tsx +36 -12
- package/src/feature-section.ts +5 -15
- package/src/frame-effect.tsx +1 -1
- package/src/gesture-callbacks.ts +1 -1
- 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 +741 -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 +156 -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 +323 -0
- package/src/hooks/reorder.ts +205 -0
- package/src/hooks/rune.ts +1756 -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 +2587 -0
- package/src/hooks/wardic-provider.tsx +51 -0
- package/src/hooks/wardic-scope.tsx +112 -0
- package/src/hooks/wards.ts +681 -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 +136 -88
- package/src/reorder-components.tsx +61 -0
- package/src/reorder.tsx +89 -307
- package/src/runtime.ts +43 -13
- package/src/spans-check.ts +12 -3
- 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 +694 -60
- 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/runtime.ts
CHANGED
|
@@ -12,6 +12,7 @@ import * as Probe from "@wardic/core/Probe"
|
|
|
12
12
|
import * as ReducedMotion from "@wardic/core/ReducedMotion"
|
|
13
13
|
import * as RefreshFrameSource from "@wardic/core/RefreshFrameSource"
|
|
14
14
|
import * as Renderer from "@wardic/core/Renderer"
|
|
15
|
+
import * as Diagnostic from "@wardic/core/unstable/Diagnostic"
|
|
15
16
|
import * as MeasuredPairs from "@wardic/core/unstable/MeasuredPairs"
|
|
16
17
|
import * as OwnValues from "@wardic/core/unstable/OwnValues"
|
|
17
18
|
import * as VariableValues from "@wardic/core/unstable/VariableValues"
|
|
@@ -53,16 +54,28 @@ import type * as ElementSetup from "@wardic/dom/unstable/ElementSetup"
|
|
|
53
54
|
// #672: core's `unstable/WardicServices` defines it; this alias keeps its reader docs here.
|
|
54
55
|
export type WardicEnv = CoreWardicServices.WardicEnv
|
|
55
56
|
|
|
57
|
+
/**
|
|
58
|
+
* How a binding makes the error a misuse throws, by its code and message (solid-next). By default core's
|
|
59
|
+
* coded line alone ({@link asLine}): Solid 1's binding shares this module and has no Solid 2 channel. Solid 2's
|
|
60
|
+
* gives its `misuse`, which puts the error on Solid's channel with its owner path and footer (the skill
|
|
61
|
+
* grill's Q17).
|
|
62
|
+
*/
|
|
63
|
+
export type Misuse = (code: Diagnostic.Code, message: string) => Error
|
|
64
|
+
|
|
65
|
+
/** A misuse's error as core's coded line alone, `[CODE] message`: Solid 1's. */
|
|
66
|
+
const asLine: Misuse = (code, message) => new Error(Diagnostic.line(code, message))
|
|
67
|
+
|
|
56
68
|
/**
|
|
57
69
|
* `env`, built at once, on the runtime's memo map and Scope as it would be unwrapped. A provider
|
|
58
70
|
* runs its services from a render, so a Layer that waits as it builds, such as `DevTools.layer()`
|
|
59
|
-
* waiting for its connection, fails the build with `waiting
|
|
71
|
+
* waiting for its connection, fails the build with `waiting`, made an error by `fail`; any other
|
|
72
|
+
* failure is its own.
|
|
60
73
|
*/
|
|
61
|
-
const builtAtOnce = (env: WardicEnv, waiting: string): WardicEnv =>
|
|
74
|
+
const builtAtOnce = (env: WardicEnv, waiting: string, fail: Misuse = asLine): WardicEnv =>
|
|
62
75
|
Layer.fromBuild((memoMap, scope) => {
|
|
63
76
|
const exit = Effect.runSyncExit(Layer.buildWithMemoMap(env, memoMap, scope))
|
|
64
77
|
return Bool.match(Option.exists(Result.getSuccess(Exit.findDefect(exit)), Cause.isAsyncFiberError), {
|
|
65
|
-
onTrue: () => Effect.die(
|
|
78
|
+
onTrue: () => Effect.die(fail("WARDIC_ENV_ASYNC", waiting)),
|
|
66
79
|
onFalse: () => exit,
|
|
67
80
|
})
|
|
68
81
|
})
|
|
@@ -194,6 +207,7 @@ export const clientContext = (
|
|
|
194
207
|
reducedMotion: () => ReducedMotion.Config | undefined,
|
|
195
208
|
reducedMotionSetting: () => ReducedMotion.Config | undefined,
|
|
196
209
|
scaleCorrectors?: ProjectionSystem.Options["scaleCorrectors"],
|
|
210
|
+
fail: Misuse = asLine,
|
|
197
211
|
): WardicContextValue => {
|
|
198
212
|
let built: Built | undefined
|
|
199
213
|
const build = (): Built => {
|
|
@@ -229,7 +243,7 @@ export const clientContext = (
|
|
|
229
243
|
// layout animation starts, and the app's scale correctors.
|
|
230
244
|
const projectionOptions: ProjectionSystem.Options = { reducedMotion: () => build().reducedMotion(), scaleCorrectors }
|
|
231
245
|
const runtime: ProviderRuntime = ManagedRuntime.make(
|
|
232
|
-
Layer.merge(FlushGate.layer({ batch }), Layer.succeed(Feature.ProjectionOptions)(projectionOptions)).pipe(Layer.provideMerge(builtAtOnce(env, waiting))),
|
|
246
|
+
Layer.merge(FlushGate.layer({ batch }), Layer.succeed(Feature.ProjectionOptions)(projectionOptions)).pipe(Layer.provideMerge(builtAtOnce(env, waiting, fail))),
|
|
233
247
|
)
|
|
234
248
|
const features = Feature.clientRegistry(runtime, () => disposeReported(runtime))
|
|
235
249
|
// Its Instant changes (#443), timed by its Environment's Refresh frames, found at the first.
|
|
@@ -300,8 +314,14 @@ const settingOf = (setting: ReducedMotion.Config | undefined, provider: () => Re
|
|
|
300
314
|
* working), an inert gate, no projection system, reduced motion never applying, and the render's
|
|
301
315
|
* Appear animations when it has them.
|
|
302
316
|
*/
|
|
303
|
-
export const serverContext = (
|
|
304
|
-
|
|
317
|
+
export const serverContext = (
|
|
318
|
+
env: WardicEnv,
|
|
319
|
+
waiting: string,
|
|
320
|
+
appear: AppearAnimations.ServerAppear | undefined,
|
|
321
|
+
reducedMotion: () => ReducedMotion.Config | undefined,
|
|
322
|
+
fail: Misuse = asLine,
|
|
323
|
+
): WardicContextValue => {
|
|
324
|
+
const runtime = ManagedRuntime.make(builtAtOnce(env, waiting, fail))
|
|
305
325
|
return {
|
|
306
326
|
runtime,
|
|
307
327
|
// A server render's elements take the lean path and never read it: read at each use if one does.
|
|
@@ -376,9 +396,17 @@ export const prepareIdle = (value: WardicContextValue, section: Feature.FeatureS
|
|
|
376
396
|
}
|
|
377
397
|
}
|
|
378
398
|
|
|
379
|
-
/**
|
|
380
|
-
|
|
381
|
-
|
|
399
|
+
/** How the error outside a provider ends, by default: Solid 1's fix, a provider above. */
|
|
400
|
+
const PROVIDER_FIX = ": render the component that calls it inside one, `<WardicProvider env={DomLive}>`."
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Reads `pick` off a provider's context value, or throws `name`'s clear error outside one, ending on
|
|
404
|
+
* `ending`: coded (solid-next), by core's line, as Solid 1's binding shares this module and has no
|
|
405
|
+
* Solid 2 channel. Solid 2's gives an ending of its own: the page its hooks set up, in development, and
|
|
406
|
+
* none in a production build (`"."`).
|
|
407
|
+
*/
|
|
408
|
+
export const fromContext = <A>(value: WardicContextValue | undefined, name: string, pick: (value: WardicContextValue) => A, ending: string = PROVIDER_FIX, fail: Misuse = asLine): A => {
|
|
409
|
+
if (Predicate.isUndefined(value)) throw fail("WARDIC_NO_PROVIDER", `${name} must be used within a <WardicProvider>${ending}`)
|
|
382
410
|
return pick(value)
|
|
383
411
|
}
|
|
384
412
|
|
|
@@ -404,22 +432,24 @@ const runOnly: AnimateLayout = (fn, options = NO_OPTIONS) => {
|
|
|
404
432
|
* just run until a section builds `layout`, as with no layout element there's nothing to animate, and
|
|
405
433
|
* during a server render.
|
|
406
434
|
*/
|
|
407
|
-
export const animateLayoutOf = (value: WardicContextValue | undefined): AnimateLayout =>
|
|
435
|
+
export const animateLayoutOf = (value: WardicContextValue | undefined, ending?: string, fail?: Misuse): AnimateLayout =>
|
|
408
436
|
fromContext(
|
|
409
437
|
value,
|
|
410
438
|
"useAnimateLayout",
|
|
411
439
|
(v): AnimateLayout =>
|
|
412
440
|
(fn, options) =>
|
|
413
441
|
UndefinedOr.match(v.projection, { onUndefined: () => runOnly(fn, options), onDefined: (projection) => projection.animateLayout(fn, options) }),
|
|
442
|
+
ending,
|
|
443
|
+
fail,
|
|
414
444
|
)
|
|
415
445
|
|
|
416
446
|
/**
|
|
417
|
-
* A fiber's effect as `runScoped` runs it: a failure logged at Error, `
|
|
418
|
-
* failed
|
|
447
|
+
* A fiber's effect as `runScoped` runs it: a failure logged at Error, `[WARDIC_CALLBACK_THREW]
|
|
448
|
+
* wardic.runScoped: a fiber failed` (the app's effect), with its cause, and reported to the Environment's `ErrorReporter`s (ADR-0030, decision
|
|
419
449
|
* 4); an interruption is neither. The fiber still fails with it.
|
|
420
450
|
*/
|
|
421
451
|
export const reported = <A, E>(effect: Effect.Effect<A, E, WardicServices>): Effect.Effect<A, E, WardicServices> =>
|
|
422
|
-
effect.pipe(Effect.tapCause((cause) => Report.
|
|
452
|
+
effect.pipe(Effect.tapCause((cause) => Report.callbackFailed("wardic.runScoped: a fiber failed", cause)))
|
|
423
453
|
|
|
424
454
|
/** A fiber that has already ended by interruption, on no Wardic runtime (1.1 µs): what a server render starts. */
|
|
425
455
|
export const interrupted = <A, E>(): Fiber.Fiber<A, E> => Effect.runFork(Effect.interrupt) as unknown as Fiber.Fiber<A, E>
|
package/src/spans-check.ts
CHANGED
|
@@ -7,18 +7,27 @@
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
import * as Spans from "@wardic/core/Spans"
|
|
10
|
+
import * as Diagnostic from "@wardic/core/unstable/Diagnostic"
|
|
10
11
|
import * as Bool from "effect/Boolean"
|
|
11
12
|
import * as Effect from "effect/Effect"
|
|
12
13
|
import type { WardicRuntime } from "./runtime.ts"
|
|
13
14
|
|
|
14
15
|
/** What development says. */
|
|
15
16
|
const MESSAGE =
|
|
16
|
-
"
|
|
17
|
+
"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
|
|
|
18
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Says, on `runtime`, that its tracer reads no Wardic span: run once a provider, at its idle build (#535).
|
|
21
|
+
* A coded diagnostic (solid-next), through the runtime's reporter: Solid's channel on Solid 2's, the
|
|
22
|
+
* app's logger on Solid 1's, which shares this module.
|
|
23
|
+
*/
|
|
19
24
|
export const warnWithoutSpans = (runtime: WardicRuntime): void => {
|
|
20
25
|
try {
|
|
21
|
-
runtime.runSync(
|
|
26
|
+
runtime.runSync(
|
|
27
|
+
Effect.flatMap(Spans.missing, (missing) =>
|
|
28
|
+
Bool.match(missing, { onTrue: () => Diagnostic.report("WARDIC_TRACER_WITHOUT_SPANS", MESSAGE), onFalse: () => Effect.void }),
|
|
29
|
+
),
|
|
30
|
+
)
|
|
22
31
|
} catch {
|
|
23
32
|
// An env that fails to build is the first element's to report.
|
|
24
33
|
}
|
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
|
|
@@ -26,8 +26,6 @@ export {
|
|
|
26
26
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
27
27
|
WardicProvider,
|
|
28
28
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
29
|
-
LazyWardic,
|
|
30
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
31
29
|
type Feature,
|
|
32
30
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
33
31
|
type FeatureLoad,
|
|
@@ -160,6 +158,8 @@ export {
|
|
|
160
158
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
161
159
|
type StageSubjects,
|
|
162
160
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
161
|
+
type StageTargetValues,
|
|
162
|
+
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
163
163
|
type StageValueKey,
|
|
164
164
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
165
165
|
type StageValueOf,
|
|
@@ -294,8 +294,6 @@ export {
|
|
|
294
294
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
295
295
|
type WardicInstance,
|
|
296
296
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
297
|
-
createWardic,
|
|
298
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
299
297
|
type WardicMotionProps,
|
|
300
298
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
301
299
|
isWardicComponent,
|
|
@@ -306,26 +304,6 @@ export {
|
|
|
306
304
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
307
305
|
isValidWardicProp,
|
|
308
306
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
309
|
-
AnimatePresence,
|
|
310
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
311
|
-
type AnimatePresenceProps,
|
|
312
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
313
|
-
PresenceContext,
|
|
314
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
315
|
-
usePresenceContext,
|
|
316
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
317
|
-
type IsPresent,
|
|
318
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
319
|
-
type PresenceExit,
|
|
320
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
321
|
-
type PresenceLeaveEvents,
|
|
322
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
323
|
-
useIsPresent,
|
|
324
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
325
|
-
usePresence,
|
|
326
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
327
|
-
usePresenceData,
|
|
328
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
329
307
|
createPresence,
|
|
330
308
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
331
309
|
type Presence,
|
|
@@ -334,8 +312,6 @@ export {
|
|
|
334
312
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
335
313
|
type PresenceEvents,
|
|
336
314
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
337
|
-
type PresenceContextValue,
|
|
338
|
-
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
339
315
|
type PresenceMode,
|
|
340
316
|
/** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
|
|
341
317
|
type PresenceRecord,
|
package/src/v1/index.tsx
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @deprecated Solid 1's binding, deprecated and frozen: it goes at Wardic's next major. Solid 2's is `@wardic/solid` (#566).
|
|
19
19
|
*/
|
|
20
|
-
export const VERSION = "
|
|
20
|
+
export const VERSION = "3.0.0-next.1"
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* `WardicProvider` (one Effect runtime + `AtomRegistry` per ADR-0006), the
|
package/src/variant-node.ts
CHANGED
|
@@ -77,6 +77,12 @@ export interface VariantNode {
|
|
|
77
77
|
* settles. Only an element that joins a provider or provides has one.
|
|
78
78
|
*/
|
|
79
79
|
readonly names: VariantTree.NameOrchestration | undefined
|
|
80
|
+
/**
|
|
81
|
+
* The names it hands its Variant children, worked out from its config's `animate`: its own, none
|
|
82
|
+
* for an element that provides nothing. Read again when more of that config is fixed after the
|
|
83
|
+
* ward is made (probe: hooks-first; `targetAgain`, `ward.tsx`).
|
|
84
|
+
*/
|
|
85
|
+
readonly handsDown: VariantTree.WardicVariantContextValue["variant"] | undefined
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
/** The orchestration an element with variants of its own runs for its Variant children. */
|
|
@@ -369,6 +375,7 @@ export const createVariantNode = (
|
|
|
369
375
|
},
|
|
370
376
|
bindGestures: bindOf(own),
|
|
371
377
|
names: namesOf(joined, own),
|
|
378
|
+
handsDown: UndefinedOr.map(own, (o) => o.context.variant),
|
|
372
379
|
}
|
|
373
380
|
}
|
|
374
381
|
|
|
@@ -389,6 +396,7 @@ const PLAIN_NODE: VariantNode = Object.freeze({
|
|
|
389
396
|
onFrame: constVoid,
|
|
390
397
|
bindGestures: undefined,
|
|
391
398
|
names: undefined,
|
|
399
|
+
handsDown: undefined,
|
|
392
400
|
})
|
|
393
401
|
|
|
394
402
|
/**
|
package/src/w.tsx
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* `w` on Solid 2 — the **Slim element**'s forms (#511, ADR-0067 decision 6; Motion's `m`): `w.<tag>`,
|
|
3
3
|
* `w.create(tag | Component)` and `w.ward(config)`, each as its Complete form (`wardic.<tag>`,
|
|
4
4
|
* `wardic.create`, `ward()`) is. A Slim element animates values (`initial`, `animate`, `exit`,
|
|
5
|
-
* variants, transitions, Keyframes), with the **Features** chosen above it: its `WardicProvider`'s
|
|
6
|
-
*
|
|
5
|
+
* variants, transitions, Keyframes), with the **Features** chosen above it: its `WardicProvider`'s, or
|
|
6
|
+
* its page's. This module names no Feature, so an app of Slim elements ships
|
|
7
7
|
* only those it chooses.
|
|
8
8
|
*
|
|
9
9
|
* ```tsx
|
|
@@ -20,10 +20,13 @@ import type * as All from "@wardic/dom/unstable/features/All"
|
|
|
20
20
|
import type { WardCheckedConfig } from "./ward-keys.ts"
|
|
21
21
|
import type { PerKeyApart } from "./config-view.ts"
|
|
22
22
|
import { createOf, type CreateFor, type FeatureProps, formOf, type OwnPropsFor, type WardicComponentFor } from "./element.tsx"
|
|
23
|
+
import * as Predicate from "effect/Predicate"
|
|
23
24
|
import type { Accessor } from "solid-js"
|
|
24
25
|
import type { StageSubject, StageSubjectOf, StageWard, StageWardChecked, StageWardConfig } from "./stage.ts"
|
|
25
26
|
import { SLIM, type Ward, type WardCallbackKey, type WardChecked, type WardConfig, type WardFor, type WardInternals, type WardOptions, type WardStyle } from "./ward.tsx"
|
|
26
27
|
import { type HeldWard, wardFrom } from "./ward-first.ts"
|
|
28
|
+
import { type ElementsOf, elementsOf } from "./hooks/elements.tsx"
|
|
29
|
+
import { fixed, type HookWardOf, hookWardOf } from "./hooks/ward.ts"
|
|
27
30
|
|
|
28
31
|
/** `w.ward(config, options)`: `ward()`'s ward, on a Slim element. */
|
|
29
32
|
interface SlimWard {
|
|
@@ -92,12 +95,42 @@ type InstanceValues<FN extends string> = OwnPropsFor<FN> & Feature.AbsentGroupsO
|
|
|
92
95
|
|
|
93
96
|
/**
|
|
94
97
|
* The Slim element: `w.div`, `w.button` and every other tag, each taking the element's own props and
|
|
95
|
-
* Wardic's motion props. It has the Features its `WardicProvider`
|
|
98
|
+
* Wardic's motion props. It has the Features its `WardicProvider` gives, at once or by a loader.
|
|
96
99
|
* `w.create(Component)` makes your own component one, and `w.ward(config)` a ward for an element of
|
|
97
100
|
* your own. Motion's `m.div`.
|
|
98
101
|
*
|
|
99
102
|
* @example <w.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} />
|
|
100
103
|
* @see https://wardic.dev/reference/solid/elements/w
|
|
101
104
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
/**
|
|
106
|
+
* `base`'s `create` and `ward`, and `tags`' elements as `w.<tag>` (probe: hooks-first, the gap grill's
|
|
107
|
+
* Q27): today's `w.create` and `w.ward` beside the hooks' utility elements, until each has its own.
|
|
108
|
+
*/
|
|
109
|
+
export const withTags = (base: W, tags: ElementsOf): W =>
|
|
110
|
+
new Proxy({} as W, {
|
|
111
|
+
get(_, prop) {
|
|
112
|
+
if (prop === "create") return base.create
|
|
113
|
+
if (prop === "ward") return base.ward
|
|
114
|
+
return (tags as Readonly<Record<string | symbol, unknown>>)[prop]
|
|
115
|
+
},
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The hooks' `createWard`, made as theirs is, at its first call, its Features the provider's (`fixed(SLIM)`)
|
|
120
|
+
* as today's Slim element's are (the size grill's Q13): none loaded at first use, which the hooks' with
|
|
121
|
+
* nothing set up do, and whose loader every `w.<tag>` app shipped. Not imported from `hooks/make-ward.ts`,
|
|
122
|
+
* whose module sets up a page as it loads (the hooks' nothing to set up): this entry's elements and hooks
|
|
123
|
+
* throw outside a provider, and an app importing it alone keeps that.
|
|
124
|
+
*/
|
|
125
|
+
// Module state (#460, Q7): one `createWard` for every `w.<tag>`, made once.
|
|
126
|
+
let pagelessWard: HookWardOf | undefined
|
|
127
|
+
const createWardHere = ((...runes: ReadonlyArray<never>) => {
|
|
128
|
+
if (Predicate.isUndefined(pagelessWard)) pagelessWard = hookWardOf(fixed(SLIM))
|
|
129
|
+
return pagelessWard(...runes)
|
|
130
|
+
}) as unknown as HookWardOf
|
|
131
|
+
|
|
132
|
+
// Every form of the Slim element, as `wardic`'s and `ward()` are of the Complete one (ADR-0067); its
|
|
133
|
+
// `w.<tag>` the hooks' utility (Q27), each element's ward made as the hooks' `createWard` makes one. Each
|
|
134
|
+
// call marked pure (the size grill's Q10): unmarked, a bundler kept them in an app that imports this
|
|
135
|
+
// module for `wOf` alone (an instance's, `makeWard`'s) and never uses `w`, and with them every hook.
|
|
136
|
+
export const w: W = /*#__PURE__*/ withTags(/*#__PURE__*/ wOf(SLIM), /*#__PURE__*/ elementsOf(createWardHere))
|