@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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wardic/solid",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.0-next.1",
|
|
4
|
+
"description": "Wardic's hooks for Solid 2, and Solid 1's binding at @wardic/solid/v1: elements, gestures, layout and presence animations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animation",
|
|
7
7
|
"motion",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"solidjs",
|
|
10
10
|
"framer-motion",
|
|
11
11
|
"layout-animation",
|
|
12
|
-
"gestures"
|
|
12
|
+
"gestures",
|
|
13
|
+
"tanstack-intent"
|
|
13
14
|
],
|
|
14
15
|
"homepage": "https://wardic.dev",
|
|
15
16
|
"bugs": "https://github.com/wardiclabs/wardic/issues",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"dist/browser",
|
|
30
31
|
"dist/server",
|
|
31
32
|
"src",
|
|
33
|
+
"skills",
|
|
32
34
|
"README.md",
|
|
33
35
|
"LICENSE",
|
|
34
36
|
"THIRD_PARTY_NOTICES.md"
|
|
@@ -38,6 +40,16 @@
|
|
|
38
40
|
"publishConfig": {
|
|
39
41
|
"access": "public"
|
|
40
42
|
},
|
|
43
|
+
"imports": {
|
|
44
|
+
"#server-features": {
|
|
45
|
+
"@wardic/source": {
|
|
46
|
+
"browser": "./src/hooks/server-features.client.ts",
|
|
47
|
+
"default": "./src/hooks/server-features.ts"
|
|
48
|
+
},
|
|
49
|
+
"browser": "./dist/solid/hooks/server-features.client.js",
|
|
50
|
+
"default": "./dist/solid/hooks/server-features.js"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
41
53
|
"exports": {
|
|
42
54
|
"./package.json": "./package.json",
|
|
43
55
|
".": {
|
|
@@ -50,6 +62,16 @@
|
|
|
50
62
|
"node": "./dist/server/index.js",
|
|
51
63
|
"default": "./dist/browser/index.js"
|
|
52
64
|
},
|
|
65
|
+
"./hooks": {
|
|
66
|
+
"@wardic/source": "./src/hooks/index.ts",
|
|
67
|
+
"types": "./dist/solid/hooks/index.d.ts",
|
|
68
|
+
"solid": "./dist/solid/hooks/index.js",
|
|
69
|
+
"browser": "./dist/browser/hooks/index.js",
|
|
70
|
+
"worker": "./dist/server/hooks/index.js",
|
|
71
|
+
"deno": "./dist/server/hooks/index.js",
|
|
72
|
+
"node": "./dist/server/hooks/index.js",
|
|
73
|
+
"default": "./dist/browser/hooks/index.js"
|
|
74
|
+
},
|
|
53
75
|
"./v1": {
|
|
54
76
|
"@wardic/source": "./src/v1/index.tsx",
|
|
55
77
|
"types": "./dist/solid/v1/index.d.ts",
|
|
@@ -78,8 +100,8 @@
|
|
|
78
100
|
},
|
|
79
101
|
"dependencies": {
|
|
80
102
|
"@solid-primitives/refs": "^1.1.3",
|
|
81
|
-
"@wardic/core": "1.
|
|
82
|
-
"@wardic/dom": "1.
|
|
103
|
+
"@wardic/core": "1.5.0-next.1",
|
|
104
|
+
"@wardic/dom": "1.5.0-next.1",
|
|
83
105
|
"csstype": "^3.1.0"
|
|
84
106
|
},
|
|
85
107
|
"peerDependencies": {
|
|
@@ -101,8 +123,8 @@
|
|
|
101
123
|
"@solidjs/router-1": "npm:@solidjs/router@1.0.1",
|
|
102
124
|
"@solidjs/web": "2.0.1",
|
|
103
125
|
"@types/babel__core": "^7.20.5",
|
|
104
|
-
"@wardic/object": "1.
|
|
105
|
-
"@wardic/test": "1.
|
|
126
|
+
"@wardic/object": "1.5.0-next.1",
|
|
127
|
+
"@wardic/test": "1.5.0-next.1",
|
|
106
128
|
"babel-preset-solid": "1.9.12",
|
|
107
129
|
"effect": "4.1.4",
|
|
108
130
|
"solid-js": "2.0.1",
|
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wardic-diagnostics
|
|
3
|
+
description: Map a Wardic diagnostic code to its repair. Use when a console warning, a thrown error, a test failure or a captured Solid artifact names a `[WARDIC_…]` code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated from the packages' registries by scripts/diagnostics.ts (`bun run diagnostics`): edit the registry, not this file. -->
|
|
7
|
+
|
|
8
|
+
# Repairing Wardic code from its diagnostic codes
|
|
9
|
+
|
|
10
|
+
In development, Wardic reports a broken rule as Solid reports its own: a code, `[WARDIC_…]`, then what happened and how to fix it. Each section below is one code: what it means, why it matters, and the repair. Fix the cause. A code a test makes on purpose is named to its test's gate, never hidden.
|
|
11
|
+
|
|
12
|
+
## Reading a report
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
[WARDIC_GRIP_ROW_DOESNT_DRAG] createGrip(row): row doesn't drag; give it `drag`, or a behaviour that does.
|
|
16
|
+
in <App> › <Wishlist> › <Row>
|
|
17
|
+
at src/Row.tsx:18:3
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- **The first line:** the code, then what happened and the fix.
|
|
21
|
+
- **`in`:** the components it happened under, root first. A finding from Wardic's frame loop has none.
|
|
22
|
+
- **`at`:** where, when the build wrote source locations.
|
|
23
|
+
- **A misuse that throws** has the same lines as its error's message.
|
|
24
|
+
- **On Solid's diagnostics channel** it's an event with the code, at `warn`, so `@solidjs/diagnostics`' `captureArtifact` records it and a test's `expectDiagnostic` can name it.
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
### WARDIC_COMPLETE_UNDER_STRICT
|
|
29
|
+
|
|
30
|
+
A Complete element (`wardic.*`, `wardic.create`, `ward()`) was rendered where `strict` is on.
|
|
31
|
+
|
|
32
|
+
**Why:** A Complete element brings every Feature's code with it, whatever it uses. `strict` says the page ships only the Features its elements ask for, so a Complete element under it would undo that.
|
|
33
|
+
|
|
34
|
+
**Fix:** Use the hooks (`createWard`), which bring only the Features a ward's config uses, or a Slim element (`w.*`, `w.create`, `w.ward()`). Or leave `strict` off.
|
|
35
|
+
|
|
36
|
+
### WARDIC_FEATURE_MISSING
|
|
37
|
+
|
|
38
|
+
An element uses something that needs a Feature its provider wasn't given: a layout prop, a gesture, or a wide-gamut colour.
|
|
39
|
+
|
|
40
|
+
**Why:** A Slim element (`w.*`, `w.create`) or a `makeWard` instance brings only the Features it's given, so the page ships only their code. A key that needs one it wasn't given does nothing: the layout doesn't animate, the gesture isn't heard, the colour isn't read as one.
|
|
41
|
+
|
|
42
|
+
**Fix:** Import the Feature the message names and give it to the provider (`<WardicProvider features={[layout]}>`) or to `makeWard({ features })`.
|
|
43
|
+
|
|
44
|
+
## Presence
|
|
45
|
+
|
|
46
|
+
### WARDIC_PRESENCE_SCOPE_REUSED
|
|
47
|
+
|
|
48
|
+
A presence scope's `within` was used round a second boundary while the first is still on the page.
|
|
49
|
+
|
|
50
|
+
**Why:** A presence scope is one boundary: its `exiting()`, `next` and `when` tell of what leaves inside it. Used round two at once, it tells of both as one, so a wait on one ends when the other's exit does.
|
|
51
|
+
|
|
52
|
+
**Fix:** Make a scope for each boundary, with `createPresenceScope` where each is drawn.
|
|
53
|
+
|
|
54
|
+
### WARDIC_PRESENCE_WARD_HAS_SHOW
|
|
55
|
+
|
|
56
|
+
`createPresence(ward, value)` was given a ward that has a `show` of its own, or is a list's row.
|
|
57
|
+
|
|
58
|
+
**Why:** A presence decides when its ward is on the page and when it leaves. A ward with its own `show`, or a row that its list shows, already has something deciding that, and the two would fight.
|
|
59
|
+
|
|
60
|
+
**Fix:** Make a ward for the presence alone, with no `show`, and let the presence show it. A list's rows leave by their list: use `createWards` for a list.
|
|
61
|
+
|
|
62
|
+
### WARDIC_PRESENCE_WARD_TAKEN
|
|
63
|
+
|
|
64
|
+
A ward given to `createPresence` already has a presence.
|
|
65
|
+
|
|
66
|
+
**Why:** A presence drives its ward's coming and going. Two presences on one ward would each try to show and remove it.
|
|
67
|
+
|
|
68
|
+
**Fix:** Make a ward for each presence.
|
|
69
|
+
|
|
70
|
+
**Before:**
|
|
71
|
+
|
|
72
|
+
```tsx before
|
|
73
|
+
import { createPresence, createWard } from "@wardic/solid/hooks"
|
|
74
|
+
|
|
75
|
+
const panel = createWard(fadesIn)
|
|
76
|
+
const a = createPresence(panel, open)
|
|
77
|
+
const b = createPresence(panel, other)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**After:**
|
|
81
|
+
|
|
82
|
+
```tsx solid2
|
|
83
|
+
import { createPresence, createWard } from "@wardic/solid/hooks"
|
|
84
|
+
|
|
85
|
+
const a = createPresence(createWard(fadesIn), open)
|
|
86
|
+
const b = createPresence(createWard(fadesIn), other)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Refs and spread
|
|
90
|
+
|
|
91
|
+
### WARDIC_HOOK_WARD_IN_WARDREF
|
|
92
|
+
|
|
93
|
+
A ward `createWard` made was given to a component's `wardRef`.
|
|
94
|
+
|
|
95
|
+
**Why:** `wardRef` drives a ward made with `ward(config)`, or calls a function with the component's own ward. A hooks ward finds its Subject by its spread, so given to `wardRef` it never would, and nothing it says would move.
|
|
96
|
+
|
|
97
|
+
**Fix:** Spread the ward on the element (`{...ward}`), or on a component that forwards its `ref`.
|
|
98
|
+
|
|
99
|
+
### WARDIC_REF_NOT_CALLED
|
|
100
|
+
|
|
101
|
+
A ward was spread on a component that never called its `ref`, so no element is its Subject.
|
|
102
|
+
|
|
103
|
+
**Why:** A ward finds its Subject through the `ref` in its spread. A component that takes the spread but doesn't pass `ref` on to the element it renders leaves the ward with nothing to move: nothing it says moves anything.
|
|
104
|
+
|
|
105
|
+
**Fix:** In the component, pass `props.ref` to the element it renders (`<div ref={props.ref}>`), or spread its props on that element whole. Or spread the ward on an element of your own.
|
|
106
|
+
|
|
107
|
+
**Before:**
|
|
108
|
+
|
|
109
|
+
```tsx before
|
|
110
|
+
function Card(props) {
|
|
111
|
+
return <div class="card">{props.children}</div>
|
|
112
|
+
}
|
|
113
|
+
<Card {...card} />
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**After:**
|
|
117
|
+
|
|
118
|
+
```tsx solid2
|
|
119
|
+
function Card(props: { ref?: (el: HTMLElement) => void; children?: unknown }) {
|
|
120
|
+
return <div class="card" ref={props.ref}>{props.children as never}</div>
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### WARDIC_REF_NOT_FORWARDED
|
|
125
|
+
|
|
126
|
+
A component wrapped by `w.create` or `wardic.create` didn't forward its `ref`.
|
|
127
|
+
|
|
128
|
+
**Why:** The wrapper reaches the element it animates through the component's `ref`. A component that doesn't pass `ref` on to the element it renders gives it nothing to animate.
|
|
129
|
+
|
|
130
|
+
**Fix:** Pass `props.ref` to the element the component renders, or spread its props on that element whole.
|
|
131
|
+
|
|
132
|
+
### WARDIC_RUNE_READ_TOO_EARLY
|
|
133
|
+
|
|
134
|
+
A function rune used a member of its ward in the rune's body, before the ward was made.
|
|
135
|
+
|
|
136
|
+
**Why:** A ward is made from all its runes, so it doesn't exist while one of them is still running. A member of it read there has nothing to read yet.
|
|
137
|
+
|
|
138
|
+
**Fix:** Use the member where the ward is rendered, or in an effect or a callback the rune sets up, which run once the ward is made.
|
|
139
|
+
|
|
140
|
+
### WARDIC_STYLE_BESIDE_SPREAD
|
|
141
|
+
|
|
142
|
+
A ward's `style` was replaced: by a `style` beside its spread, or by a component that doesn't pass `props.style` on.
|
|
143
|
+
|
|
144
|
+
**Why:** A ward's spread gives its Subject a `style` too: its initial values, and the styles it keeps. A `style` written after the spread replaces it, as any later prop does, so those never reach the Subject.
|
|
145
|
+
|
|
146
|
+
**Fix:** Give the style through the ward, `{...ward.with({ style })}`, or as its own `style`. A component the ward is spread on passes `props.style` to the element it renders with `props.ref`.
|
|
147
|
+
|
|
148
|
+
**Before:**
|
|
149
|
+
|
|
150
|
+
```tsx before
|
|
151
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
152
|
+
|
|
153
|
+
export const Card = () => {
|
|
154
|
+
const card = createWard({ initial: { opacity: 0 }, animate: { opacity: 1 } })
|
|
155
|
+
return <div {...card} style={{ width: "40px" }} />
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**After:**
|
|
160
|
+
|
|
161
|
+
```tsx solid2
|
|
162
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
163
|
+
|
|
164
|
+
export const Card = () => {
|
|
165
|
+
const card = createWard({ initial: { opacity: 0 }, animate: { opacity: 1 } })
|
|
166
|
+
return <div {...card.with({ style: { width: "40px" } })} />
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### WARDIC_SUBJECT_NOT_ONE_ELEMENT
|
|
171
|
+
|
|
172
|
+
A rune's `subject` didn't resolve to one element.
|
|
173
|
+
|
|
174
|
+
**Why:** A ward moves one Subject. A `subject` that resolves to nothing, to text, or to several elements leaves it nothing it can drive.
|
|
175
|
+
|
|
176
|
+
**Fix:** Give `subject` the one element the ward should move, or an accessor of it, or leave `subject` out and spread the ward on that element.
|
|
177
|
+
|
|
178
|
+
### WARDIC_WARD_MADE_IN_SPREAD
|
|
179
|
+
|
|
180
|
+
`ward(config)` was called inside a spread, so a new ward was made each time the element's props ran.
|
|
181
|
+
|
|
182
|
+
**Why:** Solid 2 runs a spread's expression again on every run of the element's props. A ward made there is a new ward each time, and the one before it is lost mid-animation.
|
|
183
|
+
|
|
184
|
+
**Fix:** Make the ward once, in the component's body, and spread that: `const card = ward(config)`, then `<div {...card} />`.
|
|
185
|
+
|
|
186
|
+
### WARDIC_WARD_ON_TWO_SUBJECTS
|
|
187
|
+
|
|
188
|
+
One ward was spread on, or given to, a second element while the first is still on the page.
|
|
189
|
+
|
|
190
|
+
**Why:** A ward drives one Subject at a time: its values, its gestures and its exits are that Subject's. Two elements on one ward would fight over them, so Wardic refuses the second.
|
|
191
|
+
|
|
192
|
+
**Fix:** Make one ward for each element, where each is drawn: in the `<For>` callback, or in a component of its own. A ward that moves from one element to the next, the first gone before the second arrives, is fine.
|
|
193
|
+
|
|
194
|
+
**Before:**
|
|
195
|
+
|
|
196
|
+
```tsx before
|
|
197
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
198
|
+
|
|
199
|
+
const card = createWard(fadesIn)
|
|
200
|
+
<div {...card} />
|
|
201
|
+
<div {...card} />
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**After:**
|
|
205
|
+
|
|
206
|
+
```tsx solid2
|
|
207
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
208
|
+
|
|
209
|
+
function Card() {
|
|
210
|
+
const card = createWard(fadesIn)
|
|
211
|
+
return <div {...card} />
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### WARDIC_WARD_WITHOUT_OWNER
|
|
216
|
+
|
|
217
|
+
`createWard` was called with no owner: outside a component or a root, at a module's top or in an event handler.
|
|
218
|
+
|
|
219
|
+
**Why:** A ward lives as long as the component it's made in, and ends with it. Made with no owner, nothing would end it, and it couldn't find the provider or the page around it.
|
|
220
|
+
|
|
221
|
+
**Fix:** Make the ward in the component that draws its Subject, and spread it there. A hook that holds state gives runes, which the component makes its ward of.
|
|
222
|
+
|
|
223
|
+
**Before:**
|
|
224
|
+
|
|
225
|
+
```tsx before
|
|
226
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
227
|
+
|
|
228
|
+
const card = createWard({ animate: { opacity: 1 } })
|
|
229
|
+
|
|
230
|
+
export const Card = () => <div {...card} />
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**After:**
|
|
234
|
+
|
|
235
|
+
```tsx solid2
|
|
236
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
237
|
+
|
|
238
|
+
export const Card = () => {
|
|
239
|
+
const card = createWard({ animate: { opacity: 1 } })
|
|
240
|
+
return <div {...card} />
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### WARDIC_WARDREF_CONFLICT
|
|
245
|
+
|
|
246
|
+
A ward given to `wardRef` and its element disagree: a key set on both, variants on the ward with its keys on the element, or the ward made outside the element's variant parent.
|
|
247
|
+
|
|
248
|
+
**Why:** A ward given to `wardRef` and the element it's on make one config. A key set in both places, or a ward's variants split from the keys that read them, leaves it unclear which wins.
|
|
249
|
+
|
|
250
|
+
**Fix:** Set each key in one place: in `ward({ … })`, or on the element. A ward with variants takes its variant keys too. A ward made outside its element's variant parent names it with `ward(config, { parent })`, or stands alone with `inherit: false`.
|
|
251
|
+
|
|
252
|
+
## Follow, variants and config
|
|
253
|
+
|
|
254
|
+
### WARDIC_ACCESSOR_RETURNED_PROMISE
|
|
255
|
+
|
|
256
|
+
A key's accessor returned a promise.
|
|
257
|
+
|
|
258
|
+
**Why:** An accessor is called at every read of its key, so one that fetches would fetch at each read. A ward can't animate to a promise either.
|
|
259
|
+
|
|
260
|
+
**Fix:** Give the key an async memo, `key: createMemo(() => …)`, which fetches once and holds the value it resolves to.
|
|
261
|
+
|
|
262
|
+
### WARDIC_CONFIG_AS_ACCESSOR
|
|
263
|
+
|
|
264
|
+
A whole config was given as one accessor (`ward(() => ({ … }))`).
|
|
265
|
+
|
|
266
|
+
**Why:** A config is read key by key, so each key follows its own source. One accessor for all of it would make every key rerun whenever any of them changed.
|
|
267
|
+
|
|
268
|
+
**Fix:** Give the config as an object and make the keys that change reactive one at a time: `ward({ animate: () => ({ x: x() }) })`, a getter, a store or a component's props.
|
|
269
|
+
|
|
270
|
+
### WARDIC_FOLLOW_LEADER_UNNAMED
|
|
271
|
+
|
|
272
|
+
A ward follows a leader that names no states.
|
|
273
|
+
|
|
274
|
+
**Why:** A follower takes its leader's variant names for the values it doesn't set. A leader whose `animate` and `initial` are values, not names, has no names to give, so the follower's own `variants` never play.
|
|
275
|
+
|
|
276
|
+
**Fix:** Give the leader `variants` and name its states in `animate` (`animate: "open"`), or give the follower values of its own instead of following.
|
|
277
|
+
|
|
278
|
+
**Before:**
|
|
279
|
+
|
|
280
|
+
```tsx before
|
|
281
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
282
|
+
|
|
283
|
+
const panel = createWard({ animate: { opacity: 1 } })
|
|
284
|
+
const chevron = createWard({ follow: panel, variants: { open: { rotate: 180 } } })
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**After:**
|
|
288
|
+
|
|
289
|
+
```tsx solid2
|
|
290
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
291
|
+
|
|
292
|
+
const panel = createWard({ variants: { open: { opacity: 1 } }, animate: "open" })
|
|
293
|
+
const chevron = createWard({ follow: panel, variants: { open: { rotate: 180 } } })
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### WARDIC_KEY_LOADING_AT_SETUP
|
|
297
|
+
|
|
298
|
+
A key was still loading when its ward was made.
|
|
299
|
+
|
|
300
|
+
**Why:** A ward reads some keys once, as it's made: where it starts, and what it's set up with. A key whose async source hasn't resolved has nothing to read then.
|
|
301
|
+
|
|
302
|
+
**Fix:** Give the key a value to start from, such as an `initial`, or make the ward once its data is in, inside the `<Loading>` that waits for it.
|
|
303
|
+
|
|
304
|
+
### WARDIC_PARENT_WITHOUT_VARIANTS
|
|
305
|
+
|
|
306
|
+
`ward(config, { parent })` named a parent that carries no variants.
|
|
307
|
+
|
|
308
|
+
**Why:** A child joins its parent's variants through the parent's variant node. A parent with no `variants` or `inherit` in its config only listens: its element's props hold its variants, so there's nothing for the child to join by `{ parent }`.
|
|
309
|
+
|
|
310
|
+
**Fix:** Render the child inside that ward's element, where it joins through the tree, or put the variants in the parent's `ward({ … })`.
|
|
311
|
+
|
|
312
|
+
### WARDIC_RUNE_WITH_INVALID
|
|
313
|
+
|
|
314
|
+
`createRuneWith(rune, api)` was given something it can't carry: a rune that already carries an API, a bare function, or an API member named like one of the rune's keys.
|
|
315
|
+
|
|
316
|
+
**Why:** `createRuneWith` joins one rune and one API into a value that's both. A second API would hide the first, a bare function isn't a rune a ward can read, and an API member named like a rune key would hide that key from the ward.
|
|
317
|
+
|
|
318
|
+
**Fix:** Give it the rune as written, with one API that has every member. Write a behaviour as `createRune((ward) => …)`. Give an API member that clashes another name.
|
|
319
|
+
|
|
320
|
+
## Grips and reorder
|
|
321
|
+
|
|
322
|
+
### WARDIC_DRAG_CONTAINER_MISSING
|
|
323
|
+
|
|
324
|
+
`dragConstraints` names a container that isn't on the page when a drag starts.
|
|
325
|
+
|
|
326
|
+
**Why:** A drag is held inside its container's box, measured as the drag starts. With no container there's no box, so that drag runs unconstrained. It's said once for the element; each drag measures again.
|
|
327
|
+
|
|
328
|
+
**Fix:** Render the container before the element can be dragged, and keep it on the page while it can be. Or give `dragConstraints` a box of numbers, `{ top, left, right, bottom }`.
|
|
329
|
+
|
|
330
|
+
### WARDIC_DRAG_NOT_GIVEN
|
|
331
|
+
|
|
332
|
+
A rune listens to `ward.drag`, but nothing gives the ward a `drag`.
|
|
333
|
+
|
|
334
|
+
**Why:** `ward.drag`'s samples, keys and measured box are a dragging ward's. With no `drag` key, the ward never drags, so the behaviour listening to it never hears a sample.
|
|
335
|
+
|
|
336
|
+
**Fix:** Give the ward `drag` (`createRune({ drag: "x" })`), or have the behaviour return `drag` in the rune it makes.
|
|
337
|
+
|
|
338
|
+
### WARDIC_GRIP_OUTSIDE_ROW
|
|
339
|
+
|
|
340
|
+
A grip was rendered outside its row's Subject.
|
|
341
|
+
|
|
342
|
+
**Why:** A press on a grip reaches its row's drag through the row's Subject. A grip outside it can't start the drag, and while it's on the page the row drags from its grips alone, so the row can't be dragged at all.
|
|
343
|
+
|
|
344
|
+
**Fix:** Render the grip inside its row's Subject, as one of its children.
|
|
345
|
+
|
|
346
|
+
### WARDIC_GRIP_ROW_DOESNT_DRAG
|
|
347
|
+
|
|
348
|
+
A grip was made for a ward that doesn't drag.
|
|
349
|
+
|
|
350
|
+
**Why:** A grip starts its row's drag: a press on it is one the row's drag hears. A row with no `drag` has no drag to start, so the grip does nothing, and the row can't be moved by it.
|
|
351
|
+
|
|
352
|
+
**Fix:** Give the row `drag` (`createRune({ drag: "y" })`), or a behaviour rune whose ward drags, such as a `createReorder` list's `list.item(value)`. If the row isn't meant to move, give it no grip.
|
|
353
|
+
|
|
354
|
+
**Before:**
|
|
355
|
+
|
|
356
|
+
```tsx before
|
|
357
|
+
import { createGrip, createWard } from "@wardic/solid/hooks"
|
|
358
|
+
|
|
359
|
+
const row = createWard(fadesIn)
|
|
360
|
+
const grip = createWard(createGrip(row as never))
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
**After:**
|
|
364
|
+
|
|
365
|
+
```tsx solid2
|
|
366
|
+
import { createGrip, createWard } from "@wardic/solid/hooks"
|
|
367
|
+
|
|
368
|
+
const row = createWard(fadesIn, list.item(value))
|
|
369
|
+
const grip = createWard(createGrip(row))
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### WARDIC_REORDER_ITEM_OUTSIDE_GROUP
|
|
373
|
+
|
|
374
|
+
A `<Reorder.Item>` was rendered outside a `<Reorder.Group>`, or a `<Reorder.Grip>` outside a `<Reorder.Item>`.
|
|
375
|
+
|
|
376
|
+
**Why:** An item finds its list through its group, and a grip its row through its item. Outside them there's no list to reorder in, or no row to drag.
|
|
377
|
+
|
|
378
|
+
**Fix:** Render each item among its group's children, and each grip among its item's.
|
|
379
|
+
|
|
380
|
+
### WARDIC_REORDER_ITEM_REMOUNTED
|
|
381
|
+
|
|
382
|
+
A Reorder item was unmounted and mounted again with the same value in one task.
|
|
383
|
+
|
|
384
|
+
**Why:** That's what a list keyed by index does when its order changes: each row's element is made again for whichever value lands on it. An element made again starts over, so the item's move doesn't animate from where it was, and a drag on it ends.
|
|
385
|
+
|
|
386
|
+
**Fix:** Key the items by their value, as the message says: in Solid, a keyed `<For each={items}>`, not `<For keyed={false}>` or `.map`.
|
|
387
|
+
|
|
388
|
+
### WARDIC_REORDER_REF_NOT_FUNCTION
|
|
389
|
+
|
|
390
|
+
`<Reorder.Group>`'s `groupRef` or `<Reorder.Item>`'s `wardRef` was given a group or ward made beforehand.
|
|
391
|
+
|
|
392
|
+
**Why:** These take a function the component calls with the group or ward it makes. A group or ward made beforehand isn't one the component can drive.
|
|
393
|
+
|
|
394
|
+
**Fix:** Give the config as the component's props, and a function to `groupRef` or `wardRef` to be handed what it makes: `wardRef={(row) => …}`.
|
|
395
|
+
|
|
396
|
+
## Style
|
|
397
|
+
|
|
398
|
+
### WARDIC_CANT_BLEND
|
|
399
|
+
|
|
400
|
+
Two values an animation moves between can't be blended, so the value switches to the target at the first frame instead of moving.
|
|
401
|
+
|
|
402
|
+
**Why:** An animation moves through the values between its two ends. `10px` and `2em`, or two lists of different lengths, are read by the same interpolator but have no values between them, so Wardic switches at the first frame, as Motion does for values too different to mix.
|
|
403
|
+
|
|
404
|
+
**Fix:** Give both ends the same unit (`10px` to `20px`) and the same shape: as many numbers, in the same order.
|
|
405
|
+
|
|
406
|
+
### WARDIC_TRANSFORM_STRING_DROPPED
|
|
407
|
+
|
|
408
|
+
A `transform` string in `style` was dropped, because the same `style` sets a transform key.
|
|
409
|
+
|
|
410
|
+
**Why:** Wardic draws `x`, `scale`, `rotate` and the other transform keys as one `transform`, as Motion does. A `transform` string beside them can't join it, so the keys win and the string is ignored, which can move or turn the element in a way its author didn't write.
|
|
411
|
+
|
|
412
|
+
**Fix:** Give the whole transform as keys (`{ x: 10, scale: 2 }`), or keep the string and leave the keys out of that `style`.
|
|
413
|
+
|
|
414
|
+
**Before:**
|
|
415
|
+
|
|
416
|
+
```tsx before
|
|
417
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
418
|
+
|
|
419
|
+
const box = createWard({ style: { transform: "scale(2)", x: 10 } })
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
**After:**
|
|
423
|
+
|
|
424
|
+
```tsx solid2
|
|
425
|
+
import { createWard } from "@wardic/solid/hooks"
|
|
426
|
+
|
|
427
|
+
const box = createWard({ style: { scale: 2, x: 10 } })
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
## Runtime and page
|
|
431
|
+
|
|
432
|
+
### WARDIC_ENV_ASYNC
|
|
433
|
+
|
|
434
|
+
The `env` given to a `<WardicProvider>` waits as it builds.
|
|
435
|
+
|
|
436
|
+
**Why:** A provider builds its `env` at once, as its first element renders. A Layer that waits as it builds, such as `DevTools.layer()` waiting for its connection, can't be built there.
|
|
437
|
+
|
|
438
|
+
**Fix:** Build the Layer that waits before the app renders, and give its services in the `env`: `Layer.succeedContext(await Effect.runPromise(Layer.buildWithScope(layer, scope)))`.
|
|
439
|
+
|
|
440
|
+
### WARDIC_NO_PROVIDER
|
|
441
|
+
|
|
442
|
+
Something that reads Wardic's runtime (`useWardicRuntime`, `useAnimateLayout`, …) was called with no `<WardicProvider>` above it and no page set up.
|
|
443
|
+
|
|
444
|
+
**Why:** It reads what a provider makes, or the page the hooks set up: its Effect runtime, its Features, its layout system. The hooks set the page up as they're imported, so an app that never imports them, on the 2.x components alone, has neither until it renders a provider.
|
|
445
|
+
|
|
446
|
+
**Fix:** Set the page up with no provider: importing `@wardic/solid/hooks` does, with `DomLive`, and `setupWard({ env })` from it gives it your own. Or render the component inside a `<WardicProvider env={DomLive}>`; `createWardicScope({ env }).within(…)` gives part of the page its own.
|
|
447
|
+
|
|
448
|
+
### WARDIC_TRACER_WITHOUT_SPANS
|
|
449
|
+
|
|
450
|
+
The `env` installs a tracer, but gives no `WardicSpans`, so Wardic opens no spans.
|
|
451
|
+
|
|
452
|
+
**Why:** Wardic's spans are the app's to give: `WardicSpans` opens them under the tracer installed. Without it, the tracer sees none of Wardic's animations.
|
|
453
|
+
|
|
454
|
+
**Fix:** Merge `WardicSpans` beside the Environment, `Layer.mergeAll(DomLive, WardicSpans, …)`, or leave the tracer out if Wardic's spans aren't wanted.
|
|
455
|
+
|
|
456
|
+
## App callbacks
|
|
457
|
+
|
|
458
|
+
### WARDIC_CALLBACK_THREW
|
|
459
|
+
|
|
460
|
+
A function the app gave Wardic threw: a callback (`onComplete`, `onExitComplete`, a gesture's), a function variant or delay, a Live value's mixer or dependent, an easing, or an effect run for the app.
|
|
461
|
+
|
|
462
|
+
**Why:** Wardic catches it so the animation, and everything else, goes on. It logs it at Error with its cause and hands the cause to the app's `ErrorReporter`s. The label after the code names the function that threw; the cause under it is the app's own error. A function that throws on each call is reported once for the run of throws, and again after a call that returns.
|
|
463
|
+
|
|
464
|
+
**Fix:** Fix the function the label names: the cause's stack points into the app's code.
|
|
465
|
+
|
|
466
|
+
### WARDIC_LAYOUT_CALLBACK_PROMISE
|
|
467
|
+
|
|
468
|
+
The function given to `animateLayout` returned a promise.
|
|
469
|
+
|
|
470
|
+
**Why:** `animateLayout(fn)` measures the layout before `fn` runs and again at the end of that task, and animates the difference. An async `fn` stops at its first `await`, so a change it makes after that lands in a later task, unmeasured, and jumps.
|
|
471
|
+
|
|
472
|
+
**Fix:** Await what you need before calling `animateLayout`, and give it a function that makes the layout change at once.
|