vigla 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler/analysis/asynchronous.d.ts +18 -0
- package/dist/compiler/analysis/asynchronous.d.ts.map +1 -0
- package/dist/compiler/analysis/asynchronous.js +195 -0
- package/dist/compiler/analysis/asynchronous.js.map +1 -0
- package/dist/compiler/analysis/classes.d.ts +13 -0
- package/dist/compiler/analysis/classes.d.ts.map +1 -0
- package/dist/compiler/analysis/classes.js +96 -0
- package/dist/compiler/analysis/classes.js.map +1 -0
- package/dist/compiler/analysis/ignoring.d.ts +5 -0
- package/dist/compiler/analysis/ignoring.d.ts.map +1 -0
- package/dist/compiler/analysis/ignoring.js +23 -0
- package/dist/compiler/analysis/ignoring.js.map +1 -0
- package/dist/compiler/analysis/index.d.ts +53 -0
- package/dist/compiler/analysis/index.d.ts.map +1 -0
- package/dist/compiler/analysis/index.js +334 -0
- package/dist/compiler/analysis/index.js.map +1 -0
- package/dist/compiler/analysis/scope.d.ts +59 -0
- package/dist/compiler/analysis/scope.d.ts.map +1 -0
- package/dist/compiler/analysis/scope.js +360 -0
- package/dist/compiler/analysis/scope.js.map +1 -0
- package/dist/compiler/analysis/template.d.ts +40 -0
- package/dist/compiler/analysis/template.d.ts.map +1 -0
- package/dist/compiler/analysis/template.js +504 -0
- package/dist/compiler/analysis/template.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/attributes.d.ts +12 -0
- package/dist/compiler/analysis/validate/a11y/attributes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/attributes.js +197 -0
- package/dist/compiler/analysis/validate/a11y/attributes.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/axobject-query.d.ts +20 -0
- package/dist/compiler/analysis/validate/a11y/elements.d.ts +3 -0
- package/dist/compiler/analysis/validate/a11y/elements.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/elements.js +220 -0
- package/dist/compiler/analysis/validate/a11y/elements.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/facts.d.ts +23 -0
- package/dist/compiler/analysis/validate/a11y/facts.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/facts.js +91 -0
- package/dist/compiler/analysis/validate/a11y/facts.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.d.ts +2 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.js +112 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/index.d.ts +8 -0
- package/dist/compiler/analysis/validate/a11y/index.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/index.js +13 -0
- package/dist/compiler/analysis/validate/a11y/index.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/interactions.d.ts +3 -0
- package/dist/compiler/analysis/validate/a11y/interactions.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/interactions.js +99 -0
- package/dist/compiler/analysis/validate/a11y/interactions.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/roles.d.ts +16 -0
- package/dist/compiler/analysis/validate/a11y/roles.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/roles.js +135 -0
- package/dist/compiler/analysis/validate/a11y/roles.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/tables.d.ts +22 -0
- package/dist/compiler/analysis/validate/a11y/tables.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/tables.js +227 -0
- package/dist/compiler/analysis/validate/a11y/tables.js.map +1 -0
- package/dist/compiler/analysis/validate/assignment.d.ts +5 -0
- package/dist/compiler/analysis/validate/assignment.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/assignment.js +64 -0
- package/dist/compiler/analysis/validate/assignment.js.map +1 -0
- package/dist/compiler/analysis/validate/bindings.d.ts +6 -0
- package/dist/compiler/analysis/validate/bindings.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/bindings.js +196 -0
- package/dist/compiler/analysis/validate/bindings.js.map +1 -0
- package/dist/compiler/analysis/validate/classes.d.ts +6 -0
- package/dist/compiler/analysis/validate/classes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/classes.js +100 -0
- package/dist/compiler/analysis/validate/classes.js.map +1 -0
- package/dist/compiler/analysis/validate/context.d.ts +47 -0
- package/dist/compiler/analysis/validate/context.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/context.js +84 -0
- package/dist/compiler/analysis/validate/context.js.map +1 -0
- package/dist/compiler/analysis/validate/element.d.ts +10 -0
- package/dist/compiler/analysis/validate/element.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/element.js +147 -0
- package/dist/compiler/analysis/validate/element.js.map +1 -0
- package/dist/compiler/analysis/validate/front.d.ts +18 -0
- package/dist/compiler/analysis/validate/front.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/front.js +65 -0
- package/dist/compiler/analysis/validate/front.js.map +1 -0
- package/dist/compiler/analysis/validate/index.d.ts +19 -0
- package/dist/compiler/analysis/validate/index.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/index.js +237 -0
- package/dist/compiler/analysis/validate/index.js.map +1 -0
- package/dist/compiler/analysis/validate/messages.d.ts +3 -0
- package/dist/compiler/analysis/validate/messages.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/messages.js +451 -0
- package/dist/compiler/analysis/validate/messages.js.map +1 -0
- package/dist/compiler/analysis/validate/report.d.ts +29 -0
- package/dist/compiler/analysis/validate/report.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/report.js +79 -0
- package/dist/compiler/analysis/validate/report.js.map +1 -0
- package/dist/compiler/analysis/validate/scope.d.ts +46 -0
- package/dist/compiler/analysis/validate/scope.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/scope.js +187 -0
- package/dist/compiler/analysis/validate/scope.js.map +1 -0
- package/dist/compiler/analysis/validate/scopes.d.ts +23 -0
- package/dist/compiler/analysis/validate/scopes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/scopes.js +436 -0
- package/dist/compiler/analysis/validate/scopes.js.map +1 -0
- package/dist/compiler/analysis/validate/script.d.ts +5 -0
- package/dist/compiler/analysis/validate/script.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/script.js +502 -0
- package/dist/compiler/analysis/validate/script.js.map +1 -0
- package/dist/compiler/analysis/validate/template.d.ts +13 -0
- package/dist/compiler/analysis/validate/template.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/template.js +316 -0
- package/dist/compiler/analysis/validate/template.js.map +1 -0
- package/dist/compiler/analysis/whitespace.d.ts +8 -0
- package/dist/compiler/analysis/whitespace.d.ts.map +1 -0
- package/dist/compiler/analysis/whitespace.js +71 -0
- package/dist/compiler/analysis/whitespace.js.map +1 -0
- package/dist/compiler/client/asynchronous.d.ts +9 -0
- package/dist/compiler/client/asynchronous.d.ts.map +1 -0
- package/dist/compiler/client/asynchronous.js +38 -0
- package/dist/compiler/client/asynchronous.js.map +1 -0
- package/dist/compiler/client/bindings.d.ts +16 -0
- package/dist/compiler/client/bindings.d.ts.map +1 -0
- package/dist/compiler/client/bindings.js +200 -0
- package/dist/compiler/client/bindings.js.map +1 -0
- package/dist/compiler/client/blocks.d.ts +9 -0
- package/dist/compiler/client/blocks.d.ts.map +1 -0
- package/dist/compiler/client/blocks.js +147 -0
- package/dist/compiler/client/blocks.js.map +1 -0
- package/dist/compiler/client/classes.d.ts +9 -0
- package/dist/compiler/client/classes.d.ts.map +1 -0
- package/dist/compiler/client/classes.js +104 -0
- package/dist/compiler/client/classes.js.map +1 -0
- package/dist/compiler/client/component.d.ts +12 -0
- package/dist/compiler/client/component.d.ts.map +1 -0
- package/dist/compiler/client/component.js +412 -0
- package/dist/compiler/client/component.js.map +1 -0
- package/dist/compiler/client/constants.d.ts +5 -0
- package/dist/compiler/client/constants.d.ts.map +1 -0
- package/dist/compiler/client/constants.js +103 -0
- package/dist/compiler/client/constants.js.map +1 -0
- package/dist/compiler/client/custom-element.d.ts +7 -0
- package/dist/compiler/client/custom-element.d.ts.map +1 -0
- package/dist/compiler/client/custom-element.js +124 -0
- package/dist/compiler/client/custom-element.js.map +1 -0
- package/dist/compiler/client/directives.d.ts +6 -0
- package/dist/compiler/client/directives.d.ts.map +1 -0
- package/dist/compiler/client/directives.js +22 -0
- package/dist/compiler/client/directives.js.map +1 -0
- package/dist/compiler/client/dynamic.d.ts +5 -0
- package/dist/compiler/client/dynamic.d.ts.map +1 -0
- package/dist/compiler/client/dynamic.js +79 -0
- package/dist/compiler/client/dynamic.js.map +1 -0
- package/dist/compiler/client/element.d.ts +6 -0
- package/dist/compiler/client/element.d.ts.map +1 -0
- package/dist/compiler/client/element.js +492 -0
- package/dist/compiler/client/element.js.map +1 -0
- package/dist/compiler/client/events.d.ts +8 -0
- package/dist/compiler/client/events.d.ts.map +1 -0
- package/dist/compiler/client/events.js +116 -0
- package/dist/compiler/client/events.js.map +1 -0
- package/dist/compiler/client/exports.d.ts +9 -0
- package/dist/compiler/client/exports.d.ts.map +1 -0
- package/dist/compiler/client/exports.js +22 -0
- package/dist/compiler/client/exports.js.map +1 -0
- package/dist/compiler/client/external.d.ts +6 -0
- package/dist/compiler/client/external.d.ts.map +1 -0
- package/dist/compiler/client/external.js +133 -0
- package/dist/compiler/client/external.js.map +1 -0
- package/dist/compiler/client/hot.d.ts +3 -0
- package/dist/compiler/client/hot.d.ts.map +1 -0
- package/dist/compiler/client/hot.js +54 -0
- package/dist/compiler/client/hot.js.map +1 -0
- package/dist/compiler/client/index.d.ts +26 -0
- package/dist/compiler/client/index.d.ts.map +1 -0
- package/dist/compiler/client/index.js +241 -0
- package/dist/compiler/client/index.js.map +1 -0
- package/dist/compiler/client/inspect.d.ts +11 -0
- package/dist/compiler/client/inspect.d.ts.map +1 -0
- package/dist/compiler/client/inspect.js +127 -0
- package/dist/compiler/client/inspect.js.map +1 -0
- package/dist/compiler/client/loss.d.ts +14 -0
- package/dist/compiler/client/loss.d.ts.map +1 -0
- package/dist/compiler/client/loss.js +39 -0
- package/dist/compiler/client/loss.js.map +1 -0
- package/dist/compiler/client/markup.d.ts +24 -0
- package/dist/compiler/client/markup.d.ts.map +1 -0
- package/dist/compiler/client/markup.js +82 -0
- package/dist/compiler/client/markup.js.map +1 -0
- package/dist/compiler/client/meta.d.ts +11 -0
- package/dist/compiler/client/meta.d.ts.map +1 -0
- package/dist/compiler/client/meta.js +43 -0
- package/dist/compiler/client/meta.js.map +1 -0
- package/dist/compiler/client/ownership.d.ts +12 -0
- package/dist/compiler/client/ownership.d.ts.map +1 -0
- package/dist/compiler/client/ownership.js +39 -0
- package/dist/compiler/client/ownership.js.map +1 -0
- package/dist/compiler/client/parameters.d.ts +7 -0
- package/dist/compiler/client/parameters.d.ts.map +1 -0
- package/dist/compiler/client/parameters.js +31 -0
- package/dist/compiler/client/parameters.js.map +1 -0
- package/dist/compiler/client/patterns.d.ts +17 -0
- package/dist/compiler/client/patterns.d.ts.map +1 -0
- package/dist/compiler/client/patterns.js +118 -0
- package/dist/compiler/client/patterns.js.map +1 -0
- package/dist/compiler/client/script.d.ts +42 -0
- package/dist/compiler/client/script.d.ts.map +1 -0
- package/dist/compiler/client/script.js +476 -0
- package/dist/compiler/client/script.js.map +1 -0
- package/dist/compiler/client/special.d.ts +7 -0
- package/dist/compiler/client/special.d.ts.map +1 -0
- package/dist/compiler/client/special.js +148 -0
- package/dist/compiler/client/special.js.map +1 -0
- package/dist/compiler/client/template.d.ts +59 -0
- package/dist/compiler/client/template.d.ts.map +1 -0
- package/dist/compiler/client/template.js +380 -0
- package/dist/compiler/client/template.js.map +1 -0
- package/dist/compiler/client/transitions.d.ts +6 -0
- package/dist/compiler/client/transitions.d.ts.map +1 -0
- package/dist/compiler/client/transitions.js +25 -0
- package/dist/compiler/client/transitions.js.map +1 -0
- package/dist/compiler/client/values.d.ts +8 -0
- package/dist/compiler/client/values.d.ts.map +1 -0
- package/dist/compiler/client/values.js +46 -0
- package/dist/compiler/client/values.js.map +1 -0
- package/dist/compiler/css/analyze.d.ts +12 -0
- package/dist/compiler/css/analyze.d.ts.map +1 -0
- package/dist/compiler/css/analyze.js +252 -0
- package/dist/compiler/css/analyze.js.map +1 -0
- package/dist/compiler/css/attributes.d.ts +3 -0
- package/dist/compiler/css/attributes.d.ts.map +1 -0
- package/dist/compiler/css/attributes.js +207 -0
- package/dist/compiler/css/attributes.js.map +1 -0
- package/dist/compiler/css/hash.d.ts +2 -0
- package/dist/compiler/css/hash.d.ts.map +1 -0
- package/dist/compiler/css/hash.js +2 -0
- package/dist/compiler/css/hash.js.map +1 -0
- package/dist/compiler/css/index.d.ts +42 -0
- package/dist/compiler/css/index.d.ts.map +1 -0
- package/dist/compiler/css/index.js +109 -0
- package/dist/compiler/css/index.js.map +1 -0
- package/dist/compiler/css/marks.d.ts +39 -0
- package/dist/compiler/css/marks.d.ts.map +1 -0
- package/dist/compiler/css/marks.js +90 -0
- package/dist/compiler/css/marks.js.map +1 -0
- package/dist/compiler/css/prune.d.ts +10 -0
- package/dist/compiler/css/prune.d.ts.map +1 -0
- package/dist/compiler/css/prune.js +418 -0
- package/dist/compiler/css/prune.js.map +1 -0
- package/dist/compiler/css/relations.d.ts +25 -0
- package/dist/compiler/css/relations.d.ts.map +1 -0
- package/dist/compiler/css/relations.js +262 -0
- package/dist/compiler/css/relations.js.map +1 -0
- package/dist/compiler/css/render.d.ts +22 -0
- package/dist/compiler/css/render.d.ts.map +1 -0
- package/dist/compiler/css/render.js +389 -0
- package/dist/compiler/css/render.js.map +1 -0
- package/dist/compiler/css/template.d.ts +26 -0
- package/dist/compiler/css/template.d.ts.map +1 -0
- package/dist/compiler/css/template.js +271 -0
- package/dist/compiler/css/template.js.map +1 -0
- package/dist/compiler/ir/estree.d.ts +29 -0
- package/dist/compiler/ir/estree.d.ts.map +1 -0
- package/dist/compiler/ir/estree.js +205 -0
- package/dist/compiler/ir/estree.js.map +1 -0
- package/dist/compiler/ir/maps.d.ts +11 -0
- package/dist/compiler/ir/maps.d.ts.map +1 -0
- package/dist/compiler/ir/maps.js +45 -0
- package/dist/compiler/ir/maps.js.map +1 -0
- package/dist/compiler/ir/nodes.d.ts +197 -0
- package/dist/compiler/ir/nodes.d.ts.map +1 -0
- package/dist/compiler/ir/nodes.js +1 -0
- package/dist/compiler/ir/nodes.js.map +1 -0
- package/dist/compiler/ir/port.d.ts +55 -0
- package/dist/compiler/ir/port.d.ts.map +1 -0
- package/dist/compiler/ir/port.js +9 -0
- package/dist/compiler/ir/port.js.map +1 -0
- package/dist/compiler/ir/runtime.d.ts +16 -0
- package/dist/compiler/ir/runtime.d.ts.map +1 -0
- package/dist/compiler/ir/runtime.js +1 -0
- package/dist/compiler/ir/runtime.js.map +1 -0
- package/dist/compiler/ir/script.d.ts +6 -0
- package/dist/compiler/ir/script.d.ts.map +1 -0
- package/dist/compiler/ir/script.js +33 -0
- package/dist/compiler/ir/script.js.map +1 -0
- package/dist/compiler/ir/style.d.ts +92 -0
- package/dist/compiler/ir/style.d.ts.map +1 -0
- package/dist/compiler/ir/style.js +1 -0
- package/dist/compiler/ir/style.js.map +1 -0
- package/dist/compiler/server/asynchronous.d.ts +8 -0
- package/dist/compiler/server/asynchronous.d.ts.map +1 -0
- package/dist/compiler/server/asynchronous.js +44 -0
- package/dist/compiler/server/asynchronous.js.map +1 -0
- package/dist/compiler/server/bindings.d.ts +15 -0
- package/dist/compiler/server/bindings.d.ts.map +1 -0
- package/dist/compiler/server/bindings.js +80 -0
- package/dist/compiler/server/bindings.js.map +1 -0
- package/dist/compiler/server/blocks.d.ts +7 -0
- package/dist/compiler/server/blocks.d.ts.map +1 -0
- package/dist/compiler/server/blocks.js +136 -0
- package/dist/compiler/server/blocks.js.map +1 -0
- package/dist/compiler/server/classes.d.ts +11 -0
- package/dist/compiler/server/classes.d.ts.map +1 -0
- package/dist/compiler/server/classes.js +100 -0
- package/dist/compiler/server/classes.js.map +1 -0
- package/dist/compiler/server/component.d.ts +11 -0
- package/dist/compiler/server/component.d.ts.map +1 -0
- package/dist/compiler/server/component.js +321 -0
- package/dist/compiler/server/component.js.map +1 -0
- package/dist/compiler/server/external.d.ts +6 -0
- package/dist/compiler/server/external.d.ts.map +1 -0
- package/dist/compiler/server/external.js +130 -0
- package/dist/compiler/server/external.js.map +1 -0
- package/dist/compiler/server/index.d.ts +20 -0
- package/dist/compiler/server/index.d.ts.map +1 -0
- package/dist/compiler/server/index.js +161 -0
- package/dist/compiler/server/index.js.map +1 -0
- package/dist/compiler/server/placement.d.ts +5 -0
- package/dist/compiler/server/placement.d.ts.map +1 -0
- package/dist/compiler/server/placement.js +37 -0
- package/dist/compiler/server/placement.js.map +1 -0
- package/dist/compiler/server/script.d.ts +29 -0
- package/dist/compiler/server/script.d.ts.map +1 -0
- package/dist/compiler/server/script.js +404 -0
- package/dist/compiler/server/script.js.map +1 -0
- package/dist/compiler/server/slot.d.ts +5 -0
- package/dist/compiler/server/slot.d.ts.map +1 -0
- package/dist/compiler/server/slot.js +38 -0
- package/dist/compiler/server/slot.js.map +1 -0
- package/dist/compiler/server/special.d.ts +5 -0
- package/dist/compiler/server/special.d.ts.map +1 -0
- package/dist/compiler/server/special.js +60 -0
- package/dist/compiler/server/special.js.map +1 -0
- package/dist/compiler/server/template.d.ts +28 -0
- package/dist/compiler/server/template.d.ts.map +1 -0
- package/dist/compiler/server/template.js +475 -0
- package/dist/compiler/server/template.js.map +1 -0
- package/dist/entries/action.d.ts +9 -0
- package/dist/entries/action.d.ts.map +1 -0
- package/dist/entries/action.js +1 -0
- package/dist/entries/action.js.map +1 -0
- package/dist/entries/animate.d.ts +4 -0
- package/dist/entries/animate.d.ts.map +1 -0
- package/dist/entries/animate.js +2 -0
- package/dist/entries/animate.js.map +1 -0
- package/dist/entries/attachments.d.ts +6 -0
- package/dist/entries/attachments.d.ts.map +1 -0
- package/dist/entries/attachments.js +23 -0
- package/dist/entries/attachments.js.map +1 -0
- package/dist/entries/compiler.d.ts +61 -0
- package/dist/entries/compiler.d.ts.map +1 -0
- package/dist/entries/compiler.js +97 -0
- package/dist/entries/compiler.js.map +1 -0
- package/dist/entries/easing.d.ts +2 -0
- package/dist/entries/easing.d.ts.map +1 -0
- package/dist/entries/easing.js +2 -0
- package/dist/entries/easing.js.map +1 -0
- package/dist/entries/events.d.ts +2 -0
- package/dist/entries/events.d.ts.map +1 -0
- package/dist/entries/events.js +5 -0
- package/dist/entries/events.js.map +1 -0
- package/dist/entries/index-server.d.ts +37 -0
- package/dist/entries/index-server.d.ts.map +1 -0
- package/dist/entries/index-server.js +62 -0
- package/dist/entries/index-server.js.map +1 -0
- package/dist/entries/index.d.ts +29 -0
- package/dist/entries/index.d.ts.map +1 -0
- package/dist/entries/index.js +19 -0
- package/dist/entries/index.js.map +1 -0
- package/dist/entries/internal/client.d.ts +54 -0
- package/dist/entries/internal/client.d.ts.map +1 -0
- package/dist/entries/internal/client.js +50 -0
- package/dist/entries/internal/client.js.map +1 -0
- package/dist/entries/internal/server.d.ts +18 -0
- package/dist/entries/internal/server.d.ts.map +1 -0
- package/dist/entries/internal/server.js +16 -0
- package/dist/entries/internal/server.js.map +1 -0
- package/dist/entries/motion-server.d.ts +6 -0
- package/dist/entries/motion-server.d.ts.map +1 -0
- package/dist/entries/motion-server.js +4 -0
- package/dist/entries/motion-server.js.map +1 -0
- package/dist/entries/motion.d.ts +6 -0
- package/dist/entries/motion.d.ts.map +1 -0
- package/dist/entries/motion.js +4 -0
- package/dist/entries/motion.js.map +1 -0
- package/dist/entries/reactivity-server.d.ts +17 -0
- package/dist/entries/reactivity-server.d.ts.map +1 -0
- package/dist/entries/reactivity-server.js +7 -0
- package/dist/entries/reactivity-server.js.map +1 -0
- package/dist/entries/reactivity.d.ts +8 -0
- package/dist/entries/reactivity.d.ts.map +1 -0
- package/dist/entries/reactivity.js +8 -0
- package/dist/entries/reactivity.js.map +1 -0
- package/dist/entries/server.d.ts +5 -0
- package/dist/entries/server.d.ts.map +1 -0
- package/dist/entries/server.js +2 -0
- package/dist/entries/server.js.map +1 -0
- package/dist/entries/transition.d.ts +5 -0
- package/dist/entries/transition.d.ts.map +1 -0
- package/dist/entries/transition.js +2 -0
- package/dist/entries/transition.js.map +1 -0
- package/dist/entries/window-server.d.ts +2 -0
- package/dist/entries/window-server.d.ts.map +1 -0
- package/dist/entries/window-server.js +2 -0
- package/dist/entries/window-server.js.map +1 -0
- package/dist/entries/window.d.ts +2 -0
- package/dist/entries/window.d.ts.map +1 -0
- package/dist/entries/window.js +2 -0
- package/dist/entries/window.js.map +1 -0
- package/dist/runtime/classes/date.d.ts +5 -0
- package/dist/runtime/classes/date.d.ts.map +1 -0
- package/dist/runtime/classes/date.js +58 -0
- package/dist/runtime/classes/date.js.map +1 -0
- package/dist/runtime/classes/frames.d.ts +6 -0
- package/dist/runtime/classes/frames.d.ts.map +1 -0
- package/dist/runtime/classes/frames.js +28 -0
- package/dist/runtime/classes/frames.js.map +1 -0
- package/dist/runtime/classes/local.d.ts +3 -0
- package/dist/runtime/classes/local.d.ts.map +1 -0
- package/dist/runtime/classes/local.js +6 -0
- package/dist/runtime/classes/local.js.map +1 -0
- package/dist/runtime/classes/map.d.ts +18 -0
- package/dist/runtime/classes/map.d.ts.map +1 -0
- package/dist/runtime/classes/map.js +126 -0
- package/dist/runtime/classes/map.js.map +1 -0
- package/dist/runtime/classes/media.d.ts +6 -0
- package/dist/runtime/classes/media.d.ts.map +1 -0
- package/dist/runtime/classes/media.js +22 -0
- package/dist/runtime/classes/media.js.map +1 -0
- package/dist/runtime/classes/motion.d.ts +3 -0
- package/dist/runtime/classes/motion.d.ts.map +1 -0
- package/dist/runtime/classes/motion.js +3 -0
- package/dist/runtime/classes/motion.js.map +1 -0
- package/dist/runtime/classes/search.d.ts +23 -0
- package/dist/runtime/classes/search.d.ts.map +1 -0
- package/dist/runtime/classes/search.js +115 -0
- package/dist/runtime/classes/search.js.map +1 -0
- package/dist/runtime/classes/server.d.ts +8 -0
- package/dist/runtime/classes/server.d.ts.map +1 -0
- package/dist/runtime/classes/server.js +13 -0
- package/dist/runtime/classes/server.js.map +1 -0
- package/dist/runtime/classes/set.d.ts +28 -0
- package/dist/runtime/classes/set.d.ts.map +1 -0
- package/dist/runtime/classes/set.js +113 -0
- package/dist/runtime/classes/set.js.map +1 -0
- package/dist/runtime/classes/spring.d.ts +25 -0
- package/dist/runtime/classes/spring.d.ts.map +1 -0
- package/dist/runtime/classes/spring.js +154 -0
- package/dist/runtime/classes/spring.js.map +1 -0
- package/dist/runtime/classes/subscriber.d.ts +10 -0
- package/dist/runtime/classes/subscriber.d.ts.map +1 -0
- package/dist/runtime/classes/subscriber.js +46 -0
- package/dist/runtime/classes/subscriber.js.map +1 -0
- package/dist/runtime/classes/tween.d.ts +17 -0
- package/dist/runtime/classes/tween.d.ts.map +1 -0
- package/dist/runtime/classes/tween.js +112 -0
- package/dist/runtime/classes/tween.js.map +1 -0
- package/dist/runtime/classes/url.d.ts +30 -0
- package/dist/runtime/classes/url.d.ts.map +1 -0
- package/dist/runtime/classes/url.js +127 -0
- package/dist/runtime/classes/url.js.map +1 -0
- package/dist/runtime/classes/window-server.d.ts +14 -0
- package/dist/runtime/classes/window-server.d.ts.map +1 -0
- package/dist/runtime/classes/window-server.js +14 -0
- package/dist/runtime/classes/window-server.js.map +1 -0
- package/dist/runtime/classes/window.d.ts +18 -0
- package/dist/runtime/classes/window.d.ts.map +1 -0
- package/dist/runtime/classes/window.js +54 -0
- package/dist/runtime/classes/window.js.map +1 -0
- package/dist/runtime/dom/async.d.ts +21 -0
- package/dist/runtime/dom/async.d.ts.map +1 -0
- package/dist/runtime/dom/async.js +179 -0
- package/dist/runtime/dom/async.js.map +1 -0
- package/dist/runtime/dom/attachments.d.ts +18 -0
- package/dist/runtime/dom/attachments.d.ts.map +1 -0
- package/dist/runtime/dom/attachments.js +134 -0
- package/dist/runtime/dom/attachments.js.map +1 -0
- package/dist/runtime/dom/attributes.d.ts +21 -0
- package/dist/runtime/dom/attributes.d.ts.map +1 -0
- package/dist/runtime/dom/attributes.js +450 -0
- package/dist/runtime/dom/attributes.js.map +1 -0
- package/dist/runtime/dom/await.d.ts +5 -0
- package/dist/runtime/dom/await.d.ts.map +1 -0
- package/dist/runtime/dom/await.js +95 -0
- package/dist/runtime/dom/await.js.map +1 -0
- package/dist/runtime/dom/bindings.d.ts +21 -0
- package/dist/runtime/dom/bindings.d.ts.map +1 -0
- package/dist/runtime/dom/bindings.js +299 -0
- package/dist/runtime/dom/bindings.js.map +1 -0
- package/dist/runtime/dom/blocks.d.ts +4 -0
- package/dist/runtime/dom/blocks.d.ts.map +1 -0
- package/dist/runtime/dom/blocks.js +32 -0
- package/dist/runtime/dom/blocks.js.map +1 -0
- package/dist/runtime/dom/boundary.d.ts +14 -0
- package/dist/runtime/dom/boundary.d.ts.map +1 -0
- package/dist/runtime/dom/boundary.js +313 -0
- package/dist/runtime/dom/boundary.js.map +1 -0
- package/dist/runtime/dom/branches.d.ts +14 -0
- package/dist/runtime/dom/branches.d.ts.map +1 -0
- package/dist/runtime/dom/branches.js +210 -0
- package/dist/runtime/dom/branches.js.map +1 -0
- package/dist/runtime/dom/context.d.ts +9 -0
- package/dist/runtime/dom/context.d.ts.map +1 -0
- package/dist/runtime/dom/context.js +78 -0
- package/dist/runtime/dom/context.js.map +1 -0
- package/dist/runtime/dom/custom-element.d.ts +16 -0
- package/dist/runtime/dom/custom-element.d.ts.map +1 -0
- package/dist/runtime/dom/custom-element.js +198 -0
- package/dist/runtime/dom/custom-element.js.map +1 -0
- package/dist/runtime/dom/data.d.ts +11 -0
- package/dist/runtime/dom/data.d.ts.map +1 -0
- package/dist/runtime/dom/data.js +114 -0
- package/dist/runtime/dom/data.js.map +1 -0
- package/dist/runtime/dom/element.d.ts +3 -0
- package/dist/runtime/dom/element.d.ts.map +1 -0
- package/dist/runtime/dom/element.js +81 -0
- package/dist/runtime/dom/element.js.map +1 -0
- package/dist/runtime/dom/events.d.ts +9 -0
- package/dist/runtime/dom/events.d.ts.map +1 -0
- package/dist/runtime/dom/events.js +211 -0
- package/dist/runtime/dom/events.js.map +1 -0
- package/dist/runtime/dom/head.d.ts +4 -0
- package/dist/runtime/dom/head.d.ts.map +1 -0
- package/dist/runtime/dom/head.js +54 -0
- package/dist/runtime/dom/head.js.map +1 -0
- package/dist/runtime/dom/hot.d.ts +15 -0
- package/dist/runtime/dom/hot.d.ts.map +1 -0
- package/dist/runtime/dom/hot.js +38 -0
- package/dist/runtime/dom/hot.js.map +1 -0
- package/dist/runtime/dom/html.d.ts +7 -0
- package/dist/runtime/dom/html.d.ts.map +1 -0
- package/dist/runtime/dom/html.js +91 -0
- package/dist/runtime/dom/html.js.map +1 -0
- package/dist/runtime/dom/hydration.d.ts +16 -0
- package/dist/runtime/dom/hydration.d.ts.map +1 -0
- package/dist/runtime/dom/hydration.js +92 -0
- package/dist/runtime/dom/hydration.js.map +1 -0
- package/dist/runtime/dom/inspect.d.ts +2 -0
- package/dist/runtime/dom/inspect.d.ts.map +1 -0
- package/dist/runtime/dom/inspect.js +71 -0
- package/dist/runtime/dom/inspect.js.map +1 -0
- package/dist/runtime/dom/list.d.ts +7 -0
- package/dist/runtime/dom/list.d.ts.map +1 -0
- package/dist/runtime/dom/list.js +388 -0
- package/dist/runtime/dom/list.js.map +1 -0
- package/dist/runtime/dom/media.d.ts +26 -0
- package/dist/runtime/dom/media.d.ts.map +1 -0
- package/dist/runtime/dom/media.js +126 -0
- package/dist/runtime/dom/media.js.map +1 -0
- package/dist/runtime/dom/meta.d.ts +16 -0
- package/dist/runtime/dom/meta.d.ts.map +1 -0
- package/dist/runtime/dom/meta.js +48 -0
- package/dist/runtime/dom/meta.js.map +1 -0
- package/dist/runtime/dom/mount.d.ts +23 -0
- package/dist/runtime/dom/mount.d.ts.map +1 -0
- package/dist/runtime/dom/mount.js +134 -0
- package/dist/runtime/dom/mount.js.map +1 -0
- package/dist/runtime/dom/ownership.d.ts +6 -0
- package/dist/runtime/dom/ownership.d.ts.map +1 -0
- package/dist/runtime/dom/ownership.js +32 -0
- package/dist/runtime/dom/ownership.js.map +1 -0
- package/dist/runtime/dom/props.d.ts +20 -0
- package/dist/runtime/dom/props.d.ts.map +1 -0
- package/dist/runtime/dom/props.js +193 -0
- package/dist/runtime/dom/props.js.map +1 -0
- package/dist/runtime/dom/range.d.ts +16 -0
- package/dist/runtime/dom/range.d.ts.map +1 -0
- package/dist/runtime/dom/range.js +120 -0
- package/dist/runtime/dom/range.js.map +1 -0
- package/dist/runtime/dom/reset.d.ts +4 -0
- package/dist/runtime/dom/reset.d.ts.map +1 -0
- package/dist/runtime/dom/reset.js +39 -0
- package/dist/runtime/dom/reset.js.map +1 -0
- package/dist/runtime/dom/select.d.ts +8 -0
- package/dist/runtime/dom/select.d.ts.map +1 -0
- package/dist/runtime/dom/select.js +175 -0
- package/dist/runtime/dom/select.js.map +1 -0
- package/dist/runtime/dom/snippet.d.ts +7 -0
- package/dist/runtime/dom/snippet.d.ts.map +1 -0
- package/dist/runtime/dom/snippet.js +49 -0
- package/dist/runtime/dom/snippet.js.map +1 -0
- package/dist/runtime/dom/styles.d.ts +6 -0
- package/dist/runtime/dom/styles.d.ts.map +1 -0
- package/dist/runtime/dom/styles.js +22 -0
- package/dist/runtime/dom/styles.js.map +1 -0
- package/dist/runtime/dom/swap.d.ts +10 -0
- package/dist/runtime/dom/swap.d.ts.map +1 -0
- package/dist/runtime/dom/swap.js +84 -0
- package/dist/runtime/dom/swap.js.map +1 -0
- package/dist/runtime/dom/targets.d.ts +9 -0
- package/dist/runtime/dom/targets.d.ts.map +1 -0
- package/dist/runtime/dom/targets.js +84 -0
- package/dist/runtime/dom/targets.js.map +1 -0
- package/dist/runtime/dom/template.d.ts +19 -0
- package/dist/runtime/dom/template.d.ts.map +1 -0
- package/dist/runtime/dom/template.js +269 -0
- package/dist/runtime/dom/template.js.map +1 -0
- package/dist/runtime/dom/trusted.d.ts +4 -0
- package/dist/runtime/dom/trusted.d.ts.map +1 -0
- package/dist/runtime/dom/trusted.js +47 -0
- package/dist/runtime/dom/trusted.js.map +1 -0
- package/dist/runtime/dom/values.d.ts +4 -0
- package/dist/runtime/dom/values.d.ts.map +1 -0
- package/dist/runtime/dom/values.js +31 -0
- package/dist/runtime/dom/values.js.map +1 -0
- package/dist/runtime/reactivity/abort.d.ts +8 -0
- package/dist/runtime/reactivity/abort.d.ts.map +1 -0
- package/dist/runtime/reactivity/abort.js +50 -0
- package/dist/runtime/reactivity/abort.js.map +1 -0
- package/dist/runtime/reactivity/async.d.ts +13 -0
- package/dist/runtime/reactivity/async.d.ts.map +1 -0
- package/dist/runtime/reactivity/async.js +285 -0
- package/dist/runtime/reactivity/async.js.map +1 -0
- package/dist/runtime/reactivity/batch.d.ts +84 -0
- package/dist/runtime/reactivity/batch.d.ts.map +1 -0
- package/dist/runtime/reactivity/batch.js +359 -0
- package/dist/runtime/reactivity/batch.js.map +1 -0
- package/dist/runtime/reactivity/carried.d.ts +15 -0
- package/dist/runtime/reactivity/carried.d.ts.map +1 -0
- package/dist/runtime/reactivity/carried.js +49 -0
- package/dist/runtime/reactivity/carried.js.map +1 -0
- package/dist/runtime/reactivity/collector.d.ts +4 -0
- package/dist/runtime/reactivity/collector.d.ts.map +1 -0
- package/dist/runtime/reactivity/collector.js +19 -0
- package/dist/runtime/reactivity/collector.js.map +1 -0
- package/dist/runtime/reactivity/drafts.d.ts +25 -0
- package/dist/runtime/reactivity/drafts.d.ts.map +1 -0
- package/dist/runtime/reactivity/drafts.js +125 -0
- package/dist/runtime/reactivity/drafts.js.map +1 -0
- package/dist/runtime/reactivity/eager.d.ts +5 -0
- package/dist/runtime/reactivity/eager.d.ts.map +1 -0
- package/dist/runtime/reactivity/eager.js +45 -0
- package/dist/runtime/reactivity/eager.js.map +1 -0
- package/dist/runtime/reactivity/edges.d.ts +14 -0
- package/dist/runtime/reactivity/edges.d.ts.map +1 -0
- package/dist/runtime/reactivity/edges.js +207 -0
- package/dist/runtime/reactivity/edges.js.map +1 -0
- package/dist/runtime/reactivity/effects.d.ts +41 -0
- package/dist/runtime/reactivity/effects.d.ts.map +1 -0
- package/dist/runtime/reactivity/effects.js +618 -0
- package/dist/runtime/reactivity/effects.js.map +1 -0
- package/dist/runtime/reactivity/errors.d.ts +12 -0
- package/dist/runtime/reactivity/errors.d.ts.map +1 -0
- package/dist/runtime/reactivity/errors.js +38 -0
- package/dist/runtime/reactivity/errors.js.map +1 -0
- package/dist/runtime/reactivity/external.d.ts +3 -0
- package/dist/runtime/reactivity/external.d.ts.map +1 -0
- package/dist/runtime/reactivity/external.js +48 -0
- package/dist/runtime/reactivity/external.js.map +1 -0
- package/dist/runtime/reactivity/fork.d.ts +6 -0
- package/dist/runtime/reactivity/fork.d.ts.map +1 -0
- package/dist/runtime/reactivity/fork.js +64 -0
- package/dist/runtime/reactivity/fork.js.map +1 -0
- package/dist/runtime/reactivity/front.d.ts +5 -0
- package/dist/runtime/reactivity/front.d.ts.map +1 -0
- package/dist/runtime/reactivity/front.js +16 -0
- package/dist/runtime/reactivity/front.js.map +1 -0
- package/dist/runtime/reactivity/graph.d.ts +86 -0
- package/dist/runtime/reactivity/graph.d.ts.map +1 -0
- package/dist/runtime/reactivity/graph.js +38 -0
- package/dist/runtime/reactivity/graph.js.map +1 -0
- package/dist/runtime/reactivity/handlers.d.ts +6 -0
- package/dist/runtime/reactivity/handlers.d.ts.map +1 -0
- package/dist/runtime/reactivity/handlers.js +48 -0
- package/dist/runtime/reactivity/handlers.js.map +1 -0
- package/dist/runtime/reactivity/held.d.ts +12 -0
- package/dist/runtime/reactivity/held.d.ts.map +1 -0
- package/dist/runtime/reactivity/held.js +343 -0
- package/dist/runtime/reactivity/held.js.map +1 -0
- package/dist/runtime/reactivity/history.d.ts +25 -0
- package/dist/runtime/reactivity/history.d.ts.map +1 -0
- package/dist/runtime/reactivity/history.js +88 -0
- package/dist/runtime/reactivity/history.js.map +1 -0
- package/dist/runtime/reactivity/latest.d.ts +2 -0
- package/dist/runtime/reactivity/latest.d.ts.map +1 -0
- package/dist/runtime/reactivity/latest.js +42 -0
- package/dist/runtime/reactivity/latest.js.map +1 -0
- package/dist/runtime/reactivity/leaving.d.ts +30 -0
- package/dist/runtime/reactivity/leaving.d.ts.map +1 -0
- package/dist/runtime/reactivity/leaving.js +278 -0
- package/dist/runtime/reactivity/leaving.js.map +1 -0
- package/dist/runtime/reactivity/loss.d.ts +5 -0
- package/dist/runtime/reactivity/loss.d.ts.map +1 -0
- package/dist/runtime/reactivity/loss.js +70 -0
- package/dist/runtime/reactivity/loss.js.map +1 -0
- package/dist/runtime/reactivity/outgoing.d.ts +11 -0
- package/dist/runtime/reactivity/outgoing.d.ts.map +1 -0
- package/dist/runtime/reactivity/outgoing.js +37 -0
- package/dist/runtime/reactivity/outgoing.js.map +1 -0
- package/dist/runtime/reactivity/owners.d.ts +33 -0
- package/dist/runtime/reactivity/owners.d.ts.map +1 -0
- package/dist/runtime/reactivity/owners.js +215 -0
- package/dist/runtime/reactivity/owners.js.map +1 -0
- package/dist/runtime/reactivity/past.d.ts +9 -0
- package/dist/runtime/reactivity/past.d.ts.map +1 -0
- package/dist/runtime/reactivity/past.js +57 -0
- package/dist/runtime/reactivity/past.js.map +1 -0
- package/dist/runtime/reactivity/provenance.d.ts +34 -0
- package/dist/runtime/reactivity/provenance.d.ts.map +1 -0
- package/dist/runtime/reactivity/provenance.js +163 -0
- package/dist/runtime/reactivity/provenance.js.map +1 -0
- package/dist/runtime/reactivity/proxy.d.ts +6 -0
- package/dist/runtime/reactivity/proxy.d.ts.map +1 -0
- package/dist/runtime/reactivity/proxy.js +219 -0
- package/dist/runtime/reactivity/proxy.js.map +1 -0
- package/dist/runtime/reactivity/public.d.ts +16 -0
- package/dist/runtime/reactivity/public.d.ts.map +1 -0
- package/dist/runtime/reactivity/public.js +28 -0
- package/dist/runtime/reactivity/public.js.map +1 -0
- package/dist/runtime/reactivity/reads.d.ts +7 -0
- package/dist/runtime/reactivity/reads.d.ts.map +1 -0
- package/dist/runtime/reactivity/reads.js +383 -0
- package/dist/runtime/reactivity/reads.js.map +1 -0
- package/dist/runtime/reactivity/scheduler.d.ts +8 -0
- package/dist/runtime/reactivity/scheduler.d.ts.map +1 -0
- package/dist/runtime/reactivity/scheduler.js +406 -0
- package/dist/runtime/reactivity/scheduler.js.map +1 -0
- package/dist/runtime/reactivity/settle.d.ts +6 -0
- package/dist/runtime/reactivity/settle.d.ts.map +1 -0
- package/dist/runtime/reactivity/settle.js +76 -0
- package/dist/runtime/reactivity/settle.js.map +1 -0
- package/dist/runtime/reactivity/sources.d.ts +17 -0
- package/dist/runtime/reactivity/sources.d.ts.map +1 -0
- package/dist/runtime/reactivity/sources.js +124 -0
- package/dist/runtime/reactivity/sources.js.map +1 -0
- package/dist/runtime/reactivity/tallies.d.ts +12 -0
- package/dist/runtime/reactivity/tallies.d.ts.map +1 -0
- package/dist/runtime/reactivity/tallies.js +25 -0
- package/dist/runtime/reactivity/tallies.js.map +1 -0
- package/dist/runtime/reactivity/tasks.d.ts +3 -0
- package/dist/runtime/reactivity/tasks.d.ts.map +1 -0
- package/dist/runtime/reactivity/tasks.js +35 -0
- package/dist/runtime/reactivity/tasks.js.map +1 -0
- package/dist/runtime/reactivity/trace.d.ts +5 -0
- package/dist/runtime/reactivity/trace.d.ts.map +1 -0
- package/dist/runtime/reactivity/trace.js +109 -0
- package/dist/runtime/reactivity/trace.js.map +1 -0
- package/dist/runtime/reactivity/tracking.d.ts +62 -0
- package/dist/runtime/reactivity/tracking.d.ts.map +1 -0
- package/dist/runtime/reactivity/tracking.js +520 -0
- package/dist/runtime/reactivity/tracking.js.map +1 -0
- package/dist/runtime/reactivity/units.d.ts +12 -0
- package/dist/runtime/reactivity/units.d.ts.map +1 -0
- package/dist/runtime/reactivity/units.js +112 -0
- package/dist/runtime/reactivity/units.js.map +1 -0
- package/dist/runtime/reactivity/views.d.ts +12 -0
- package/dist/runtime/reactivity/views.d.ts.map +1 -0
- package/dist/runtime/reactivity/views.js +105 -0
- package/dist/runtime/reactivity/views.js.map +1 -0
- package/dist/runtime/server/attributes.d.ts +9 -0
- package/dist/runtime/server/attributes.d.ts.map +1 -0
- package/dist/runtime/server/attributes.js +73 -0
- package/dist/runtime/server/attributes.js.map +1 -0
- package/dist/runtime/server/cells.d.ts +9 -0
- package/dist/runtime/server/cells.d.ts.map +1 -0
- package/dist/runtime/server/cells.js +120 -0
- package/dist/runtime/server/cells.js.map +1 -0
- package/dist/runtime/server/context.d.ts +51 -0
- package/dist/runtime/server/context.d.ts.map +1 -0
- package/dist/runtime/server/context.js +260 -0
- package/dist/runtime/server/context.js.map +1 -0
- package/dist/runtime/server/derived.d.ts +5 -0
- package/dist/runtime/server/derived.d.ts.map +1 -0
- package/dist/runtime/server/derived.js +30 -0
- package/dist/runtime/server/derived.js.map +1 -0
- package/dist/runtime/server/external.d.ts +3 -0
- package/dist/runtime/server/external.d.ts.map +1 -0
- package/dist/runtime/server/external.js +53 -0
- package/dist/runtime/server/external.js.map +1 -0
- package/dist/runtime/server/hydration.d.ts +26 -0
- package/dist/runtime/server/hydration.d.ts.map +1 -0
- package/dist/runtime/server/hydration.js +187 -0
- package/dist/runtime/server/hydration.js.map +1 -0
- package/dist/runtime/server/placement.d.ts +9 -0
- package/dist/runtime/server/placement.d.ts.map +1 -0
- package/dist/runtime/server/placement.js +35 -0
- package/dist/runtime/server/placement.js.map +1 -0
- package/dist/runtime/server/render.d.ts +89 -0
- package/dist/runtime/server/render.d.ts.map +1 -0
- package/dist/runtime/server/render.js +470 -0
- package/dist/runtime/server/render.js.map +1 -0
- package/dist/runtime/server/snippet.d.ts +7 -0
- package/dist/runtime/server/snippet.d.ts.map +1 -0
- package/dist/runtime/server/snippet.js +15 -0
- package/dist/runtime/server/snippet.js.map +1 -0
- package/dist/runtime/transitions/animate.d.ts +22 -0
- package/dist/runtime/transitions/animate.d.ts.map +1 -0
- package/dist/runtime/transitions/animate.js +140 -0
- package/dist/runtime/transitions/animate.js.map +1 -0
- package/dist/runtime/transitions/easing.d.ts +33 -0
- package/dist/runtime/transitions/easing.d.ts.map +1 -0
- package/dist/runtime/transitions/easing.js +128 -0
- package/dist/runtime/transitions/easing.js.map +1 -0
- package/dist/runtime/transitions/flip.d.ts +12 -0
- package/dist/runtime/transitions/flip.d.ts.map +1 -0
- package/dist/runtime/transitions/flip.js +51 -0
- package/dist/runtime/transitions/flip.js.map +1 -0
- package/dist/runtime/transitions/frame.d.ts +37 -0
- package/dist/runtime/transitions/frame.d.ts.map +1 -0
- package/dist/runtime/transitions/frame.js +219 -0
- package/dist/runtime/transitions/frame.js.map +1 -0
- package/dist/runtime/transitions/layout.d.ts +37 -0
- package/dist/runtime/transitions/layout.d.ts.map +1 -0
- package/dist/runtime/transitions/layout.js +150 -0
- package/dist/runtime/transitions/layout.js.map +1 -0
- package/dist/runtime/transitions/manager.d.ts +30 -0
- package/dist/runtime/transitions/manager.d.ts.map +1 -0
- package/dist/runtime/transitions/manager.js +278 -0
- package/dist/runtime/transitions/manager.js.map +1 -0
- package/dist/runtime/transitions/placement.d.ts +25 -0
- package/dist/runtime/transitions/placement.d.ts.map +1 -0
- package/dist/runtime/transitions/placement.js +135 -0
- package/dist/runtime/transitions/placement.js.map +1 -0
- package/dist/runtime/transitions/presets.d.ts +53 -0
- package/dist/runtime/transitions/presets.d.ts.map +1 -0
- package/dist/runtime/transitions/presets.js +266 -0
- package/dist/runtime/transitions/presets.js.map +1 -0
- package/dist/shared/abort.d.ts +6 -0
- package/dist/shared/abort.d.ts.map +1 -0
- package/dist/shared/abort.js +8 -0
- package/dist/shared/abort.js.map +1 -0
- package/dist/shared/assignment.d.ts +6 -0
- package/dist/shared/assignment.d.ts.map +1 -0
- package/dist/shared/assignment.js +19 -0
- package/dist/shared/assignment.js.map +1 -0
- package/dist/shared/attributes.d.ts +8 -0
- package/dist/shared/attributes.d.ts.map +1 -0
- package/dist/shared/attributes.js +120 -0
- package/dist/shared/attributes.js.map +1 -0
- package/dist/shared/clone.d.ts +2 -0
- package/dist/shared/clone.d.ts.map +1 -0
- package/dist/shared/clone.js +76 -0
- package/dist/shared/clone.js.map +1 -0
- package/dist/shared/context.d.ts +15 -0
- package/dist/shared/context.d.ts.map +1 -0
- package/dist/shared/context.js +16 -0
- package/dist/shared/context.js.map +1 -0
- package/dist/shared/diagnostics.d.ts +22 -0
- package/dist/shared/diagnostics.d.ts.map +1 -0
- package/dist/shared/diagnostics.js +58 -0
- package/dist/shared/diagnostics.js.map +1 -0
- package/dist/shared/escape.d.ts +3 -0
- package/dist/shared/escape.d.ts.map +1 -0
- package/dist/shared/escape.js +17 -0
- package/dist/shared/escape.js.map +1 -0
- package/dist/shared/external.d.ts +37 -0
- package/dist/shared/external.d.ts.map +1 -0
- package/dist/shared/external.js +76 -0
- package/dist/shared/external.js.map +1 -0
- package/dist/shared/format.d.ts +9 -0
- package/dist/shared/format.d.ts.map +1 -0
- package/dist/shared/format.js +10 -0
- package/dist/shared/format.js.map +1 -0
- package/dist/shared/hash.d.ts +2 -0
- package/dist/shared/hash.d.ts.map +1 -0
- package/dist/shared/hash.js +9 -0
- package/dist/shared/hash.js.map +1 -0
- package/dist/shared/html.d.ts +18 -0
- package/dist/shared/html.d.ts.map +1 -0
- package/dist/shared/html.js +277 -0
- package/dist/shared/html.js.map +1 -0
- package/dist/shared/markers.d.ts +12 -0
- package/dist/shared/markers.d.ts.map +1 -0
- package/dist/shared/markers.js +16 -0
- package/dist/shared/markers.js.map +1 -0
- package/dist/shared/nesting.d.ts +3 -0
- package/dist/shared/nesting.d.ts.map +1 -0
- package/dist/shared/nesting.js +143 -0
- package/dist/shared/nesting.js.map +1 -0
- package/dist/shared/slots.d.ts +8 -0
- package/dist/shared/slots.d.ts.map +1 -0
- package/dist/shared/slots.js +9 -0
- package/dist/shared/slots.js.map +1 -0
- package/dist/shared/snippet.d.ts +11 -0
- package/dist/shared/snippet.d.ts.map +1 -0
- package/dist/shared/snippet.js +11 -0
- package/dist/shared/snippet.js.map +1 -0
- package/package.json +54 -3
- package/src/compiler/analysis/asynchronous.ts +206 -0
- package/src/compiler/analysis/classes.ts +110 -0
- package/src/compiler/analysis/ignoring.ts +25 -0
- package/src/compiler/analysis/index.ts +433 -0
- package/src/compiler/analysis/scope.ts +410 -0
- package/src/compiler/analysis/template.ts +525 -0
- package/src/compiler/analysis/validate/a11y/attributes.ts +252 -0
- package/src/compiler/analysis/validate/a11y/axobject-query.d.ts +20 -0
- package/src/compiler/analysis/validate/a11y/elements.ts +241 -0
- package/src/compiler/analysis/validate/a11y/facts.ts +102 -0
- package/src/compiler/analysis/validate/a11y/fuzzy.ts +123 -0
- package/src/compiler/analysis/validate/a11y/index.ts +24 -0
- package/src/compiler/analysis/validate/a11y/interactions.ts +125 -0
- package/src/compiler/analysis/validate/a11y/roles.ts +182 -0
- package/src/compiler/analysis/validate/a11y/tables.ts +250 -0
- package/src/compiler/analysis/validate/assignment.ts +74 -0
- package/src/compiler/analysis/validate/bindings.ts +210 -0
- package/src/compiler/analysis/validate/classes.ts +102 -0
- package/src/compiler/analysis/validate/context.ts +119 -0
- package/src/compiler/analysis/validate/element.ts +148 -0
- package/src/compiler/analysis/validate/front.ts +75 -0
- package/src/compiler/analysis/validate/index.ts +268 -0
- package/src/compiler/analysis/validate/messages.ts +451 -0
- package/src/compiler/analysis/validate/report.ts +100 -0
- package/src/compiler/analysis/validate/scope.ts +241 -0
- package/src/compiler/analysis/validate/scopes.ts +460 -0
- package/src/compiler/analysis/validate/script.ts +528 -0
- package/src/compiler/analysis/validate/template.ts +326 -0
- package/src/compiler/analysis/whitespace.ts +87 -0
- package/src/compiler/client/asynchronous.ts +68 -0
- package/src/compiler/client/bindings.ts +246 -0
- package/src/compiler/client/blocks.ts +239 -0
- package/src/compiler/client/classes.ts +154 -0
- package/src/compiler/client/component.ts +549 -0
- package/src/compiler/client/constants.ts +107 -0
- package/src/compiler/client/custom-element.ts +173 -0
- package/src/compiler/client/directives.ts +35 -0
- package/src/compiler/client/dynamic.ts +85 -0
- package/src/compiler/client/element.ts +631 -0
- package/src/compiler/client/events.ts +147 -0
- package/src/compiler/client/exports.ts +39 -0
- package/src/compiler/client/external.ts +190 -0
- package/src/compiler/client/hot.ts +62 -0
- package/src/compiler/client/index.ts +307 -0
- package/src/compiler/client/inspect.ts +153 -0
- package/src/compiler/client/loss.ts +53 -0
- package/src/compiler/client/markup.ts +126 -0
- package/src/compiler/client/meta.ts +64 -0
- package/src/compiler/client/ownership.ts +54 -0
- package/src/compiler/client/parameters.ts +38 -0
- package/src/compiler/client/patterns.ts +154 -0
- package/src/compiler/client/script.ts +587 -0
- package/src/compiler/client/special.ts +177 -0
- package/src/compiler/client/template.ts +533 -0
- package/src/compiler/client/transitions.ts +38 -0
- package/src/compiler/client/values.ts +52 -0
- package/src/compiler/css/analyze.ts +281 -0
- package/src/compiler/css/attributes.ts +195 -0
- package/src/compiler/css/hash.ts +1 -0
- package/src/compiler/css/index.ts +152 -0
- package/src/compiler/css/marks.ts +142 -0
- package/src/compiler/css/prune.ts +466 -0
- package/src/compiler/css/relations.ts +264 -0
- package/src/compiler/css/render.ts +422 -0
- package/src/compiler/css/template.ts +297 -0
- package/src/compiler/ir/estree.ts +256 -0
- package/src/compiler/ir/maps.ts +64 -0
- package/src/compiler/ir/nodes.ts +263 -0
- package/src/compiler/ir/port.ts +88 -0
- package/src/compiler/ir/runtime.ts +19 -0
- package/src/compiler/ir/script.ts +34 -0
- package/src/compiler/ir/style.ts +120 -0
- package/src/compiler/server/asynchronous.ts +71 -0
- package/src/compiler/server/bindings.ts +101 -0
- package/src/compiler/server/blocks.ts +165 -0
- package/src/compiler/server/classes.ts +139 -0
- package/src/compiler/server/component.ts +400 -0
- package/src/compiler/server/external.ts +176 -0
- package/src/compiler/server/index.ts +205 -0
- package/src/compiler/server/placement.ts +58 -0
- package/src/compiler/server/script.ts +492 -0
- package/src/compiler/server/slot.ts +51 -0
- package/src/compiler/server/special.ts +60 -0
- package/src/compiler/server/template.ts +620 -0
- package/src/entries/action.ts +20 -0
- package/src/entries/animate.ts +3 -0
- package/src/entries/attachments.ts +30 -0
- package/src/entries/compiler.ts +206 -0
- package/src/entries/easing.ts +1 -0
- package/src/entries/events.ts +10 -0
- package/src/entries/index-server.ts +118 -0
- package/src/entries/index.ts +50 -0
- package/src/entries/internal/client.ts +135 -0
- package/src/entries/internal/server.ts +46 -0
- package/src/entries/motion-server.ts +5 -0
- package/src/entries/motion.ts +5 -0
- package/src/entries/reactivity-server.ts +7 -0
- package/src/entries/reactivity.ts +7 -0
- package/src/entries/server.ts +11 -0
- package/src/entries/transition.ts +12 -0
- package/src/entries/window-server.ts +12 -0
- package/src/entries/window.ts +12 -0
- package/src/runtime/classes/date.ts +65 -0
- package/src/runtime/classes/frames.ts +27 -0
- package/src/runtime/classes/local.ts +7 -0
- package/src/runtime/classes/map.ts +135 -0
- package/src/runtime/classes/media.ts +25 -0
- package/src/runtime/classes/motion.ts +3 -0
- package/src/runtime/classes/search.ts +136 -0
- package/src/runtime/classes/server.ts +17 -0
- package/src/runtime/classes/set.ts +146 -0
- package/src/runtime/classes/spring.ts +199 -0
- package/src/runtime/classes/subscriber.ts +50 -0
- package/src/runtime/classes/tween.ts +128 -0
- package/src/runtime/classes/url.ts +152 -0
- package/src/runtime/classes/window-server.ts +27 -0
- package/src/runtime/classes/window.ts +72 -0
- package/src/runtime/dom/async.ts +208 -0
- package/src/runtime/dom/attachments.ts +139 -0
- package/src/runtime/dom/attributes.ts +526 -0
- package/src/runtime/dom/await.ts +108 -0
- package/src/runtime/dom/bindings.ts +369 -0
- package/src/runtime/dom/blocks.ts +39 -0
- package/src/runtime/dom/boundary.ts +349 -0
- package/src/runtime/dom/branches.ts +219 -0
- package/src/runtime/dom/context.ts +90 -0
- package/src/runtime/dom/custom-element.ts +214 -0
- package/src/runtime/dom/data.ts +131 -0
- package/src/runtime/dom/element.ts +89 -0
- package/src/runtime/dom/events.ts +254 -0
- package/src/runtime/dom/head.ts +56 -0
- package/src/runtime/dom/hot.ts +45 -0
- package/src/runtime/dom/html.ts +92 -0
- package/src/runtime/dom/hydration.ts +108 -0
- package/src/runtime/dom/inspect.ts +70 -0
- package/src/runtime/dom/list.ts +432 -0
- package/src/runtime/dom/media.ts +164 -0
- package/src/runtime/dom/meta.ts +67 -0
- package/src/runtime/dom/mount.ts +190 -0
- package/src/runtime/dom/ownership.ts +45 -0
- package/src/runtime/dom/props.ts +212 -0
- package/src/runtime/dom/range.ts +132 -0
- package/src/runtime/dom/reset.ts +39 -0
- package/src/runtime/dom/select.ts +184 -0
- package/src/runtime/dom/snippet.ts +54 -0
- package/src/runtime/dom/styles.ts +26 -0
- package/src/runtime/dom/swap.ts +117 -0
- package/src/runtime/dom/targets.ts +96 -0
- package/src/runtime/dom/template.ts +319 -0
- package/src/runtime/dom/trusted.ts +81 -0
- package/src/runtime/dom/values.ts +33 -0
- package/src/runtime/reactivity/abort.ts +56 -0
- package/src/runtime/reactivity/async.ts +272 -0
- package/src/runtime/reactivity/batch.ts +382 -0
- package/src/runtime/reactivity/carried.ts +64 -0
- package/src/runtime/reactivity/collector.ts +20 -0
- package/src/runtime/reactivity/drafts.ts +126 -0
- package/src/runtime/reactivity/eager.ts +45 -0
- package/src/runtime/reactivity/edges.ts +210 -0
- package/src/runtime/reactivity/effects.ts +669 -0
- package/src/runtime/reactivity/errors.ts +73 -0
- package/src/runtime/reactivity/external.ts +56 -0
- package/src/runtime/reactivity/fork.ts +60 -0
- package/src/runtime/reactivity/front.ts +20 -0
- package/src/runtime/reactivity/graph.ts +129 -0
- package/src/runtime/reactivity/handlers.ts +55 -0
- package/src/runtime/reactivity/held.ts +337 -0
- package/src/runtime/reactivity/history.ts +108 -0
- package/src/runtime/reactivity/latest.ts +41 -0
- package/src/runtime/reactivity/leaving.ts +303 -0
- package/src/runtime/reactivity/loss.ts +71 -0
- package/src/runtime/reactivity/outgoing.ts +41 -0
- package/src/runtime/reactivity/owners.ts +234 -0
- package/src/runtime/reactivity/past.ts +57 -0
- package/src/runtime/reactivity/provenance.ts +189 -0
- package/src/runtime/reactivity/proxy.ts +212 -0
- package/src/runtime/reactivity/public.ts +51 -0
- package/src/runtime/reactivity/reads.ts +376 -0
- package/src/runtime/reactivity/scheduler.ts +400 -0
- package/src/runtime/reactivity/settle.ts +73 -0
- package/src/runtime/reactivity/sources.ts +150 -0
- package/src/runtime/reactivity/tallies.ts +34 -0
- package/src/runtime/reactivity/tasks.ts +33 -0
- package/src/runtime/reactivity/trace.ts +113 -0
- package/src/runtime/reactivity/tracking.ts +569 -0
- package/src/runtime/reactivity/units.ts +103 -0
- package/src/runtime/reactivity/views.ts +114 -0
- package/src/runtime/server/attributes.ts +80 -0
- package/src/runtime/server/cells.ts +135 -0
- package/src/runtime/server/context.ts +319 -0
- package/src/runtime/server/derived.ts +37 -0
- package/src/runtime/server/external.ts +59 -0
- package/src/runtime/server/hydration.ts +238 -0
- package/src/runtime/server/placement.ts +47 -0
- package/src/runtime/server/render.ts +612 -0
- package/src/runtime/server/snippet.ts +21 -0
- package/src/runtime/transitions/animate.ts +161 -0
- package/src/runtime/transitions/easing.ts +153 -0
- package/src/runtime/transitions/flip.ts +66 -0
- package/src/runtime/transitions/frame.ts +273 -0
- package/src/runtime/transitions/layout.ts +176 -0
- package/src/runtime/transitions/manager.ts +343 -0
- package/src/runtime/transitions/placement.ts +161 -0
- package/src/runtime/transitions/presets.ts +369 -0
- package/src/shared/abort.ts +8 -0
- package/src/shared/assignment.ts +27 -0
- package/src/shared/attributes.ts +123 -0
- package/src/shared/clone.ts +82 -0
- package/src/shared/context.ts +35 -0
- package/src/shared/diagnostics.ts +83 -0
- package/src/shared/escape.ts +20 -0
- package/src/shared/external.ts +113 -0
- package/src/shared/format.ts +17 -0
- package/src/shared/hash.ts +8 -0
- package/src/shared/html.ts +298 -0
- package/src/shared/markers.ts +25 -0
- package/src/shared/nesting.ts +156 -0
- package/src/shared/slots.ts +16 -0
- package/src/shared/snippet.ts +29 -0
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { DEV } from 'esm-env';
|
|
2
|
+
import { warn } from '../../shared/diagnostics.ts';
|
|
3
|
+
import type { AnimationConfig } from './animate.ts';
|
|
4
|
+
import { cubicInOut, cubicOut, linear, type Easing } from './easing.ts';
|
|
5
|
+
import { layout, type LayoutContext, type LayoutPass, type LayoutPlan } from './layout.ts';
|
|
6
|
+
import { project } from './frame.ts';
|
|
7
|
+
import { capture, type Capture } from './placement.ts';
|
|
8
|
+
|
|
9
|
+
export interface Timing {
|
|
10
|
+
delay?: number;
|
|
11
|
+
duration?: number;
|
|
12
|
+
easing?: Easing;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface BlurParams extends Timing {
|
|
16
|
+
amount?: number | string;
|
|
17
|
+
opacity?: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface FlyParams extends Timing {
|
|
21
|
+
x?: number | string;
|
|
22
|
+
y?: number | string;
|
|
23
|
+
opacity?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface SlideParams extends Timing {
|
|
27
|
+
axis?: 'x' | 'y';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ScaleParams extends Timing {
|
|
31
|
+
start?: number;
|
|
32
|
+
opacity?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DrawParams {
|
|
36
|
+
delay?: number;
|
|
37
|
+
speed?: number;
|
|
38
|
+
duration?: number | ((length: number) => number);
|
|
39
|
+
easing?: Easing;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface CrossfadeParams {
|
|
43
|
+
delay?: number;
|
|
44
|
+
duration?: number | ((distance: number) => number);
|
|
45
|
+
easing?: Easing;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type Measure = [value: number, unit: string];
|
|
49
|
+
|
|
50
|
+
function measure(value: number | string): Measure {
|
|
51
|
+
const found = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
|
|
52
|
+
return found ? [parseFloat(found[1] as string), found[2] || 'px'] : [value as number, 'px'];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function transformOf(style: CSSStyleDeclaration): string {
|
|
56
|
+
return style.transform === 'none' ? '' : style.transform;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function blur(
|
|
60
|
+
node: Element,
|
|
61
|
+
{ delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 }: BlurParams = {}
|
|
62
|
+
): AnimationConfig {
|
|
63
|
+
const style = getComputedStyle(node);
|
|
64
|
+
const target = +style.opacity;
|
|
65
|
+
const filter = style.filter === 'none' ? '' : style.filter;
|
|
66
|
+
const drop = target * (1 - opacity);
|
|
67
|
+
const [value, unit] = measure(amount);
|
|
68
|
+
return {
|
|
69
|
+
delay,
|
|
70
|
+
duration,
|
|
71
|
+
easing,
|
|
72
|
+
css: (_t, u) => `opacity: ${target - drop * u}; filter: ${filter} blur(${u * value}${unit});`
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function fade(
|
|
77
|
+
node: Element,
|
|
78
|
+
{ delay = 0, duration = 400, easing = linear }: Timing = {}
|
|
79
|
+
): AnimationConfig {
|
|
80
|
+
const opacity = +getComputedStyle(node).opacity;
|
|
81
|
+
return { delay, duration, easing, css: (t) => `opacity: ${t * opacity}` };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function fly(
|
|
85
|
+
node: Element,
|
|
86
|
+
{ delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 }: FlyParams = {}
|
|
87
|
+
): AnimationConfig {
|
|
88
|
+
const style = getComputedStyle(node);
|
|
89
|
+
const target = +style.opacity;
|
|
90
|
+
const transform = transformOf(style);
|
|
91
|
+
const drop = target * (1 - opacity);
|
|
92
|
+
const [xValue, xUnit] = measure(x);
|
|
93
|
+
const [yValue, yUnit] = measure(y);
|
|
94
|
+
return {
|
|
95
|
+
delay,
|
|
96
|
+
duration,
|
|
97
|
+
easing,
|
|
98
|
+
css: (t, u) => `
|
|
99
|
+
transform: ${transform} translate(${(1 - t) * xValue}${xUnit}, ${(1 - t) * yValue}${yUnit});
|
|
100
|
+
opacity: ${target - drop * u}`
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let warned = false;
|
|
105
|
+
|
|
106
|
+
function dimension(property: string, value: number, t: number): string {
|
|
107
|
+
return Number.isNaN(value) ? '' : `${property}: ${t * value}px;`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function slide(
|
|
111
|
+
node: Element,
|
|
112
|
+
{ delay = 0, duration = 400, easing = cubicOut, axis = 'y' }: SlideParams = {}
|
|
113
|
+
): AnimationConfig {
|
|
114
|
+
const style = getComputedStyle(node);
|
|
115
|
+
if (DEV && !warned && /(contents|inline|table)/.test(style.display)) {
|
|
116
|
+
warned = true;
|
|
117
|
+
void Promise.resolve().then(() => (warned = false));
|
|
118
|
+
warn(
|
|
119
|
+
'transition_slide_display',
|
|
120
|
+
`The \`slide\` transition does not work correctly for elements with \`display: ${style.display}\``
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
const opacity = +style.opacity;
|
|
124
|
+
const primary = axis === 'y' ? 'height' : 'width';
|
|
125
|
+
const size = parseFloat(style[primary]);
|
|
126
|
+
const [start, end] = axis === 'y' ? (['top', 'bottom'] as const) : (['left', 'right'] as const);
|
|
127
|
+
const read = (property: string): number => parseFloat(style.getPropertyValue(property));
|
|
128
|
+
const padding = [read(`padding-${start}`), read(`padding-${end}`)];
|
|
129
|
+
const margin = [read(`margin-${start}`), read(`margin-${end}`)];
|
|
130
|
+
const border = [read(`border-${start}-width`), read(`border-${end}-width`)];
|
|
131
|
+
return {
|
|
132
|
+
delay,
|
|
133
|
+
duration,
|
|
134
|
+
easing,
|
|
135
|
+
css: (t) =>
|
|
136
|
+
'overflow: hidden;' +
|
|
137
|
+
`opacity: ${Math.min(t * 20, 1) * opacity};` +
|
|
138
|
+
dimension(primary, size, t) +
|
|
139
|
+
dimension(`padding-${start}`, padding[0] as number, t) +
|
|
140
|
+
dimension(`padding-${end}`, padding[1] as number, t) +
|
|
141
|
+
dimension(`margin-${start}`, margin[0] as number, t) +
|
|
142
|
+
dimension(`margin-${end}`, margin[1] as number, t) +
|
|
143
|
+
dimension(`border-${start}-width`, border[0] as number, t) +
|
|
144
|
+
dimension(`border-${end}-width`, border[1] as number, t) +
|
|
145
|
+
`min-${primary}: 0`
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function scale(
|
|
150
|
+
node: Element,
|
|
151
|
+
{ delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 }: ScaleParams = {}
|
|
152
|
+
): AnimationConfig {
|
|
153
|
+
const style = getComputedStyle(node);
|
|
154
|
+
const target = +style.opacity;
|
|
155
|
+
const transform = transformOf(style);
|
|
156
|
+
const shrink = 1 - start;
|
|
157
|
+
const drop = target * (1 - opacity);
|
|
158
|
+
return {
|
|
159
|
+
delay,
|
|
160
|
+
duration,
|
|
161
|
+
easing,
|
|
162
|
+
css: (_t, u) => `
|
|
163
|
+
transform: ${transform} scale(${1 - shrink * u});
|
|
164
|
+
opacity: ${target - drop * u}
|
|
165
|
+
`
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function draw(
|
|
170
|
+
node: SVGElement & { getTotalLength(): number },
|
|
171
|
+
{ delay = 0, speed, duration, easing = cubicInOut }: DrawParams = {}
|
|
172
|
+
): AnimationConfig {
|
|
173
|
+
let length = node.getTotalLength();
|
|
174
|
+
const style = getComputedStyle(node);
|
|
175
|
+
if (style.strokeLinecap !== 'butt') length += parseInt(style.strokeWidth);
|
|
176
|
+
const time =
|
|
177
|
+
duration === undefined
|
|
178
|
+
? speed === undefined
|
|
179
|
+
? 800
|
|
180
|
+
: length / speed
|
|
181
|
+
: typeof duration === 'function'
|
|
182
|
+
? duration(length)
|
|
183
|
+
: duration;
|
|
184
|
+
return {
|
|
185
|
+
delay,
|
|
186
|
+
duration: time,
|
|
187
|
+
easing,
|
|
188
|
+
css: (_, u) => `
|
|
189
|
+
stroke-dasharray: ${length};
|
|
190
|
+
stroke-dashoffset: ${u * length};
|
|
191
|
+
`
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type Fallback<P> = (node: Element, params: P, intro: boolean) => AnimationConfig;
|
|
196
|
+
|
|
197
|
+
export interface CrossfadeOptions<P> extends CrossfadeParams {
|
|
198
|
+
fallback?: Fallback<P>;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
type Keyed = CrossfadeParams & { key: unknown };
|
|
202
|
+
|
|
203
|
+
type Half = (node: Element, params: Keyed) => () => AnimationConfig | undefined;
|
|
204
|
+
|
|
205
|
+
export function crossfade<P extends Keyed>({
|
|
206
|
+
fallback,
|
|
207
|
+
...defaults
|
|
208
|
+
}: CrossfadeOptions<P>): [send: Half, receive: Half] {
|
|
209
|
+
const receiving = new Map<unknown, Transfer>();
|
|
210
|
+
const sending = new Map<unknown, Transfer>();
|
|
211
|
+
const fade = (
|
|
212
|
+
from: Capture,
|
|
213
|
+
to: Capture,
|
|
214
|
+
params: CrossfadeParams,
|
|
215
|
+
prepared = false
|
|
216
|
+
): AnimationConfig => {
|
|
217
|
+
const {
|
|
218
|
+
delay = 0,
|
|
219
|
+
duration = (distance: number) => Math.sqrt(distance) * 30,
|
|
220
|
+
easing = cubicOut
|
|
221
|
+
} = { ...defaults, ...params };
|
|
222
|
+
const vx = from.rect.left - to.rect.left;
|
|
223
|
+
const vy = from.rect.top - to.rect.top;
|
|
224
|
+
const local = project(from, to);
|
|
225
|
+
const dx = local === null ? vx : local.from.left - local.to.left;
|
|
226
|
+
const dy = local === null ? vy : local.from.top - local.to.top;
|
|
227
|
+
const dw = local === null ? from.rect.width / to.rect.width : local.from.width / local.to.width;
|
|
228
|
+
const dh =
|
|
229
|
+
local === null ? from.rect.height / to.rect.height : local.from.height / local.to.height;
|
|
230
|
+
const anchored = prepared || local !== null;
|
|
231
|
+
const [ox = 0, oy = 0] = anchored ? to.origin.split(' ').map(parseFloat) : [];
|
|
232
|
+
const origin = anchored ? to.origin : 'top left';
|
|
233
|
+
const distance = Math.sqrt(vx * vx + vy * vy);
|
|
234
|
+
return {
|
|
235
|
+
delay,
|
|
236
|
+
duration: typeof duration === 'function' ? duration(distance) : duration,
|
|
237
|
+
easing,
|
|
238
|
+
css: (t, u) => `
|
|
239
|
+
opacity: ${t * to.opacity};
|
|
240
|
+
transform-origin: ${origin};
|
|
241
|
+
transform: ${to.transform} translate(${u * (dx + (dw - 1) * ox)}px, ${u * (dy + (dh - 1) * oy)}px) scale(${t + u * dw}, ${t + u * dh});
|
|
242
|
+
`
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
class Pair {
|
|
247
|
+
#sender: Transfer | null;
|
|
248
|
+
#receiver: Transfer | null;
|
|
249
|
+
#stabilized = false;
|
|
250
|
+
#measured = false;
|
|
251
|
+
readonly from: Capture;
|
|
252
|
+
source!: Capture;
|
|
253
|
+
target!: Capture;
|
|
254
|
+
|
|
255
|
+
constructor(sender: Transfer, receiver: Transfer) {
|
|
256
|
+
this.#sender = sender;
|
|
257
|
+
this.#receiver = receiver;
|
|
258
|
+
this.from = sender.context!.captured;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
stabilize(): void {
|
|
262
|
+
if (this.#stabilized) return;
|
|
263
|
+
this.#stabilized = true;
|
|
264
|
+
this.#sender!.pin();
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
measure(): void {
|
|
268
|
+
if (this.#measured) return;
|
|
269
|
+
this.#measured = true;
|
|
270
|
+
this.source = capture(this.#sender!.node);
|
|
271
|
+
this.target = capture(this.#receiver!.node);
|
|
272
|
+
this.#sender = this.#receiver = null;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
class Transfer implements LayoutPlan {
|
|
277
|
+
readonly node: Element;
|
|
278
|
+
readonly context: LayoutContext | null;
|
|
279
|
+
readonly params: Keyed;
|
|
280
|
+
readonly intro: boolean;
|
|
281
|
+
readonly #items: Map<unknown, Transfer>;
|
|
282
|
+
readonly #counterparts: Map<unknown, Transfer>;
|
|
283
|
+
#config: AnimationConfig | undefined;
|
|
284
|
+
#stage: LayoutPass | null;
|
|
285
|
+
#release: (() => void) | undefined;
|
|
286
|
+
#resolved = false;
|
|
287
|
+
#cancelled = false;
|
|
288
|
+
pair: Pair | null = null;
|
|
289
|
+
|
|
290
|
+
constructor(node: Element, params: Keyed, intro: boolean) {
|
|
291
|
+
this.node = node;
|
|
292
|
+
this.params = params;
|
|
293
|
+
this.intro = intro;
|
|
294
|
+
this.context = layout?.element === node ? layout : null;
|
|
295
|
+
this.#items = intro ? receiving : sending;
|
|
296
|
+
this.#counterparts = intro ? sending : receiving;
|
|
297
|
+
this.#items.set(params.key, this);
|
|
298
|
+
this.#stage = this.context?.stage(this) ?? null;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
#remove(): void {
|
|
302
|
+
if (this.#items.get(this.params.key) === this) this.#items.delete(this.params.key);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
match(): void {
|
|
306
|
+
if (this.#cancelled || this.pair !== null || this.#stage === null) return;
|
|
307
|
+
const other = this.#counterparts.get(this.params.key);
|
|
308
|
+
if (other === undefined || other.#cancelled || other.#stage !== this.#stage) return;
|
|
309
|
+
this.pair = other.pair = this.intro ? new Pair(other, this) : new Pair(this, other);
|
|
310
|
+
this.#remove();
|
|
311
|
+
other.#remove();
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
pin(): void {
|
|
315
|
+
const context = this.context;
|
|
316
|
+
if (!this.#cancelled && context?.direction === 'out') {
|
|
317
|
+
this.#release ??= context.placement.acquire(context.captured);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
stabilize(): void {
|
|
322
|
+
if (!this.#cancelled) this.pair?.stabilize();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
measure(): void {
|
|
326
|
+
if (!this.#cancelled) this.pair?.measure();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
read(): AnimationConfig | undefined {
|
|
330
|
+
if (this.#resolved) return this.#config;
|
|
331
|
+
if (this.#cancelled) return;
|
|
332
|
+
if (this.#stage !== null && !this.#stage.ready) {
|
|
333
|
+
this.#stage.withdraw(this);
|
|
334
|
+
this.#stage = null;
|
|
335
|
+
}
|
|
336
|
+
const pair = this.pair;
|
|
337
|
+
if (pair !== null) {
|
|
338
|
+
this.#resolved = true;
|
|
339
|
+
return (this.#config = this.intro
|
|
340
|
+
? fade(pair.from, pair.target, this.params, true)
|
|
341
|
+
: fade(pair.target, pair.source, this.params, true));
|
|
342
|
+
}
|
|
343
|
+
const other = this.#counterparts.get(this.params.key);
|
|
344
|
+
if (other !== undefined) {
|
|
345
|
+
this.#counterparts.delete(this.params.key);
|
|
346
|
+
return fade(capture(other.node), capture(this.node), this.params);
|
|
347
|
+
}
|
|
348
|
+
this.#remove();
|
|
349
|
+
return fallback?.(this.node, this.params as P, this.intro);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
cancel(): void {
|
|
353
|
+
if (this.#cancelled) return;
|
|
354
|
+
this.#cancelled = true;
|
|
355
|
+
this.#remove();
|
|
356
|
+
this.#release?.();
|
|
357
|
+
this.#release = undefined;
|
|
358
|
+
this.pair = null;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const half =
|
|
363
|
+
(intro: boolean): Half =>
|
|
364
|
+
(node, params) => {
|
|
365
|
+
const transfer = new Transfer(node, params, intro);
|
|
366
|
+
return () => transfer.read();
|
|
367
|
+
};
|
|
368
|
+
return [half(false), half(true)];
|
|
369
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface AssignmentTarget<T> {
|
|
2
|
+
current: T;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function assignment<T>(write: (value: T) => void): AssignmentTarget<T> {
|
|
6
|
+
return {
|
|
7
|
+
set current(value: T) {
|
|
8
|
+
write(value);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function mutationTarget<T extends object, K extends keyof T>(
|
|
14
|
+
object: T,
|
|
15
|
+
key: K,
|
|
16
|
+
notify: (value: T[K]) => void
|
|
17
|
+
): AssignmentTarget<T[K]> {
|
|
18
|
+
return {
|
|
19
|
+
get current() {
|
|
20
|
+
return object[key];
|
|
21
|
+
},
|
|
22
|
+
set current(value: T[K]) {
|
|
23
|
+
object[key] = value;
|
|
24
|
+
notify(value);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { clsx as merge } from 'clsx';
|
|
2
|
+
|
|
3
|
+
export type ClassValue = Parameters<typeof merge>[0];
|
|
4
|
+
|
|
5
|
+
export type Styles = Readonly<Record<string, unknown>>;
|
|
6
|
+
|
|
7
|
+
export type StyleDirectives = Styles | readonly [Styles | null, Styles | null];
|
|
8
|
+
|
|
9
|
+
export function clsx(value: unknown): string {
|
|
10
|
+
return typeof value === 'object' ? merge(value as ClassValue) : String(value ?? '');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const separators = new Set([0x20, 0x09, 0x0a, 0x0d, 0x0c, 0xa0, 0x0b, 0xfeff]);
|
|
14
|
+
|
|
15
|
+
function separator(char: string | undefined): boolean {
|
|
16
|
+
return char === undefined || separators.has(char.charCodeAt(0));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function without(classes: string, name: string): string {
|
|
20
|
+
let result = classes;
|
|
21
|
+
let at = 0;
|
|
22
|
+
while ((at = result.indexOf(name, at)) >= 0) {
|
|
23
|
+
const end = at + name.length;
|
|
24
|
+
if (separator(at === 0 ? undefined : result[at - 1]) && separator(result[end])) {
|
|
25
|
+
result = result.slice(0, at) + result.slice(end + 1);
|
|
26
|
+
} else {
|
|
27
|
+
at = end;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toClass(
|
|
34
|
+
value: unknown,
|
|
35
|
+
hash?: string | null,
|
|
36
|
+
directives?: Readonly<Record<string, unknown>> | null
|
|
37
|
+
): string | null {
|
|
38
|
+
let classes = value == null ? '' : String(value);
|
|
39
|
+
if (hash) classes = classes === '' ? hash : `${classes} ${hash}`;
|
|
40
|
+
if (directives) {
|
|
41
|
+
for (const name of Object.keys(directives)) {
|
|
42
|
+
if (directives[name]) classes = classes === '' ? name : `${classes} ${name}`;
|
|
43
|
+
else if (classes !== '') classes = without(classes, name);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return classes === '' ? null : classes;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function cssName(name: string): string {
|
|
50
|
+
return name.startsWith('--') ? name : name.toLowerCase();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function declarations(styles: Styles, important: boolean): string {
|
|
54
|
+
let css = '';
|
|
55
|
+
for (const name of Object.keys(styles)) {
|
|
56
|
+
const value = styles[name];
|
|
57
|
+
if (value != null && value !== '') {
|
|
58
|
+
css += ` ${name}: ${String(value)}${important ? ' !important;' : ';'}`;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return css;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function kept(value: string, reserved: ReadonlySet<string>): string {
|
|
65
|
+
let css = '';
|
|
66
|
+
let quote: string | null = null;
|
|
67
|
+
let depth = 0;
|
|
68
|
+
let comment = false;
|
|
69
|
+
let start = 0;
|
|
70
|
+
let colon = -1;
|
|
71
|
+
const length = value.length;
|
|
72
|
+
for (let index = 0; index < length; index++) {
|
|
73
|
+
const char = value[index];
|
|
74
|
+
if (comment) {
|
|
75
|
+
if (char === '/' && value[index - 1] === '*') comment = false;
|
|
76
|
+
} else if (quote !== null) {
|
|
77
|
+
if (char === quote) quote = null;
|
|
78
|
+
} else if (char === '/' && value[index + 1] === '*') {
|
|
79
|
+
comment = true;
|
|
80
|
+
} else if (char === '"' || char === "'") {
|
|
81
|
+
quote = char;
|
|
82
|
+
} else if (char === '(') {
|
|
83
|
+
depth++;
|
|
84
|
+
} else if (char === ')') {
|
|
85
|
+
depth--;
|
|
86
|
+
}
|
|
87
|
+
if (comment || quote !== null || depth !== 0) continue;
|
|
88
|
+
if (char === ':' && colon === -1) {
|
|
89
|
+
colon = index;
|
|
90
|
+
} else if (char === ';' || index === length - 1) {
|
|
91
|
+
if (colon !== -1 && !reserved.has(cssName(value.slice(start, colon).trim()))) {
|
|
92
|
+
const end = char === ';' ? index : index + 1;
|
|
93
|
+
css += ` ${value.slice(start, end).trim()};`;
|
|
94
|
+
}
|
|
95
|
+
start = index + 1;
|
|
96
|
+
colon = -1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return css;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function toStyle(value: unknown, directives?: StyleDirectives | null): string | null {
|
|
103
|
+
if (!directives) return value == null ? null : String(value);
|
|
104
|
+
const [normal, important] = Array.isArray(directives)
|
|
105
|
+
? (directives as readonly [Styles | null, Styles | null])
|
|
106
|
+
: [directives as Styles, null];
|
|
107
|
+
let css = '';
|
|
108
|
+
if (value) {
|
|
109
|
+
const reserved = new Set<string>();
|
|
110
|
+
for (const name of Object.keys(normal ?? {})) reserved.add(cssName(name));
|
|
111
|
+
for (const name of Object.keys(important ?? {})) reserved.add(cssName(name));
|
|
112
|
+
css = kept(
|
|
113
|
+
String(value)
|
|
114
|
+
.replaceAll(/\/\*.*?\*\//g, '')
|
|
115
|
+
.trim(),
|
|
116
|
+
reserved
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
if (normal) css += declarations(normal, false);
|
|
120
|
+
if (important) css += declarations(important, true);
|
|
121
|
+
css = css.trim();
|
|
122
|
+
return css === '' ? null : css;
|
|
123
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { DEV } from 'esm-env';
|
|
2
|
+
import { warn } from './diagnostics.ts';
|
|
3
|
+
|
|
4
|
+
type Indexed = Record<PropertyKey, unknown>;
|
|
5
|
+
|
|
6
|
+
function clone(
|
|
7
|
+
value: unknown,
|
|
8
|
+
cloned: Map<object, unknown>,
|
|
9
|
+
path: string,
|
|
10
|
+
paths: string[] | null,
|
|
11
|
+
original: object | null = null
|
|
12
|
+
): unknown {
|
|
13
|
+
if (typeof value === 'object' && value !== null) {
|
|
14
|
+
const known = cloned.get(value);
|
|
15
|
+
if (known !== undefined) return known;
|
|
16
|
+
if (value instanceof Map) return new Map(value);
|
|
17
|
+
if (value instanceof Set) return new Set(value);
|
|
18
|
+
if (Array.isArray(value)) {
|
|
19
|
+
const copy: unknown[] = new Array(value.length);
|
|
20
|
+
cloned.set(value, copy);
|
|
21
|
+
if (original !== null) cloned.set(original, copy);
|
|
22
|
+
for (let position = 0; position < value.length; position++) {
|
|
23
|
+
if (!(position in value)) continue;
|
|
24
|
+
const at = paths === null ? path : `${path}[${position}]`;
|
|
25
|
+
copy[position] = clone(value[position], cloned, at, paths);
|
|
26
|
+
}
|
|
27
|
+
return copy;
|
|
28
|
+
}
|
|
29
|
+
if (Object.getPrototypeOf(value) === Object.prototype) {
|
|
30
|
+
const copy: Indexed = {};
|
|
31
|
+
cloned.set(value, copy);
|
|
32
|
+
if (original !== null) cloned.set(original, copy);
|
|
33
|
+
for (const key of Object.keys(value)) {
|
|
34
|
+
const at = paths === null ? path : `${path}.${key}`;
|
|
35
|
+
copy[key] = clone((value as Indexed)[key], cloned, at, paths);
|
|
36
|
+
}
|
|
37
|
+
return copy;
|
|
38
|
+
}
|
|
39
|
+
if (value instanceof Date) {
|
|
40
|
+
value.getTime();
|
|
41
|
+
return structuredClone(value);
|
|
42
|
+
}
|
|
43
|
+
const json = (value as { toJSON?: unknown }).toJSON;
|
|
44
|
+
if (typeof json === 'function') {
|
|
45
|
+
const at = paths === null ? path : `${path}.toJSON()`;
|
|
46
|
+
return clone(json.call(value), cloned, at, paths, value);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (typeof EventTarget === 'function' && value instanceof EventTarget) return value;
|
|
50
|
+
try {
|
|
51
|
+
return structuredClone(value);
|
|
52
|
+
} catch {
|
|
53
|
+
paths?.push(path);
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function uncloneable(paths: readonly string[]): void {
|
|
59
|
+
if (paths.length === 1 && paths[0] === '') {
|
|
60
|
+
warn(
|
|
61
|
+
'state_snapshot_uncloneable',
|
|
62
|
+
'Value cannot be cloned with `$state.snapshot` — the original value was returned'
|
|
63
|
+
);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const shown = paths.slice(0, paths.length > 10 ? 7 : 10);
|
|
67
|
+
let properties = shown.map((path) => `- <value>${path}`).join('\n');
|
|
68
|
+
if (paths.length > shown.length) properties += `\n- ...and ${paths.length - shown.length} more`;
|
|
69
|
+
warn(
|
|
70
|
+
'state_snapshot_uncloneable',
|
|
71
|
+
`The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:\n\n${properties}`,
|
|
72
|
+
{ properties }
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function snapshot<T>(value: T, silent = false): T {
|
|
77
|
+
if (!DEV || silent) return clone(value, new Map(), '', null) as T;
|
|
78
|
+
const paths: string[] = [];
|
|
79
|
+
const copy = clone(value, new Map(), '', paths) as T;
|
|
80
|
+
if (paths.length > 0) uncloneable(paths);
|
|
81
|
+
return copy;
|
|
82
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { failure } from './diagnostics.ts';
|
|
2
|
+
|
|
3
|
+
export type Context<T> = [get: () => T, set: (value: T) => T, has: () => boolean];
|
|
4
|
+
|
|
5
|
+
export interface Layer<Owner> {
|
|
6
|
+
parent: Layer<Owner> | null;
|
|
7
|
+
readonly owner: Owner | null;
|
|
8
|
+
readonly component: boolean;
|
|
9
|
+
readonly isolated?: boolean;
|
|
10
|
+
map: Map<unknown, unknown> | null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Contexts {
|
|
14
|
+
getContext<T>(key: unknown): T;
|
|
15
|
+
setContext<T>(key: unknown, value: T): T;
|
|
16
|
+
hasContext(key: unknown): boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function keyed<T>(contexts: Contexts): Context<T> {
|
|
20
|
+
const key = {};
|
|
21
|
+
return [
|
|
22
|
+
() => {
|
|
23
|
+
const value = contexts.getContext<T>(key);
|
|
24
|
+
if (value === undefined && !contexts.hasContext(key)) {
|
|
25
|
+
throw failure(
|
|
26
|
+
'missing_context',
|
|
27
|
+
'Context was not set in the current component or any of its ancestors'
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
return value;
|
|
31
|
+
},
|
|
32
|
+
(value) => contexts.setContext(key, value),
|
|
33
|
+
() => contexts.hasContext(key)
|
|
34
|
+
];
|
|
35
|
+
}
|