vigla 0.0.0 → 0.2.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 +222 -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 +59 -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 +242 -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,549 @@
|
|
|
1
|
+
import type * as ES from 'estree';
|
|
2
|
+
import { spanOf, unsupported } from '../analysis/index.ts';
|
|
3
|
+
import * as b from '../ir/estree.ts';
|
|
4
|
+
import type { Boundary, Component, Node, Render, Snippet } from '../ir/nodes.ts';
|
|
5
|
+
import { bindThisCall, validateBinding } from './bindings.ts';
|
|
6
|
+
import { anchorComment } from './markup.ts';
|
|
7
|
+
import { snippetParameters } from './parameters.ts';
|
|
8
|
+
import { valueOf } from './values.ts';
|
|
9
|
+
import { accessor, rewrite, runtime } from './script.ts';
|
|
10
|
+
import { scoped } from './meta.ts';
|
|
11
|
+
import {
|
|
12
|
+
cleaned,
|
|
13
|
+
hasCall,
|
|
14
|
+
isDynamic,
|
|
15
|
+
render,
|
|
16
|
+
type Emit,
|
|
17
|
+
type Part,
|
|
18
|
+
type TemplateContext
|
|
19
|
+
} from './template.ts';
|
|
20
|
+
|
|
21
|
+
function getter(name: string, value: ES.Expression): ES.Property {
|
|
22
|
+
return {
|
|
23
|
+
type: 'Property',
|
|
24
|
+
key: b.literal(name),
|
|
25
|
+
value: b.functionExpression([], [{ type: 'ReturnStatement', argument: value }]),
|
|
26
|
+
kind: 'get',
|
|
27
|
+
method: false,
|
|
28
|
+
shorthand: false,
|
|
29
|
+
computed: false
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function setter(name: string, param: ES.Identifier, body: ES.Statement[]): ES.Property {
|
|
34
|
+
return {
|
|
35
|
+
type: 'Property',
|
|
36
|
+
key: b.literal(name),
|
|
37
|
+
value: b.functionExpression([param], body),
|
|
38
|
+
kind: 'set',
|
|
39
|
+
method: false,
|
|
40
|
+
shorthand: false,
|
|
41
|
+
computed: false
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function plain(name: string, value: ES.Expression): ES.Property {
|
|
46
|
+
return {
|
|
47
|
+
type: 'Property',
|
|
48
|
+
key: b.literal(name),
|
|
49
|
+
value,
|
|
50
|
+
kind: 'init',
|
|
51
|
+
method: false,
|
|
52
|
+
shorthand: false,
|
|
53
|
+
computed: false
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function isDynamicComponent(context: TemplateContext, node: Component): boolean {
|
|
58
|
+
const reference = node.reference;
|
|
59
|
+
if (reference.type === 'MemberExpression') return true;
|
|
60
|
+
if (reference.type !== 'Identifier') return true;
|
|
61
|
+
const binding = context.analysis.references.get(reference);
|
|
62
|
+
if (binding === undefined) return false;
|
|
63
|
+
return (binding.kind !== 'normal' && binding.kind !== 'import') || binding.reassigned;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function bindingProperties(
|
|
67
|
+
context: TemplateContext,
|
|
68
|
+
name: string,
|
|
69
|
+
expression: ES.Expression
|
|
70
|
+
): ES.Property[] {
|
|
71
|
+
const value = b.id(context.names.unique('$$value'));
|
|
72
|
+
if (expression.type === 'SequenceExpression') {
|
|
73
|
+
const [get, set] = expression.expressions as [ES.Expression, ES.Expression];
|
|
74
|
+
return [
|
|
75
|
+
getter(name, b.call(rewrite(context, get))),
|
|
76
|
+
setter(name, value, [b.statement(b.call(rewrite(context, set), value))])
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
const assignment: ES.AssignmentExpression = {
|
|
80
|
+
type: 'AssignmentExpression',
|
|
81
|
+
operator: '=',
|
|
82
|
+
left: expression as ES.Pattern,
|
|
83
|
+
right: value
|
|
84
|
+
};
|
|
85
|
+
return [
|
|
86
|
+
getter(name, rewrite(context, expression)),
|
|
87
|
+
setter(name, value, [b.statement(rewrite(context, assignment))])
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function memoValue(
|
|
92
|
+
context: TemplateContext,
|
|
93
|
+
declarations: ES.Statement[],
|
|
94
|
+
sources: readonly ES.Expression[],
|
|
95
|
+
value: ES.Expression,
|
|
96
|
+
force = false
|
|
97
|
+
): ES.Expression {
|
|
98
|
+
if (!force && !sources.some(hasCall)) return value;
|
|
99
|
+
const cell = b.id(context.names.unique('value'));
|
|
100
|
+
declarations.push(b.constant(cell.name, runtime(context, 'derived', b.arrow([], value))));
|
|
101
|
+
return runtime(context, 'get', cell);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function propsObject(
|
|
105
|
+
context: TemplateContext,
|
|
106
|
+
node: Component,
|
|
107
|
+
declarations: ES.Statement[]
|
|
108
|
+
): ES.Expression {
|
|
109
|
+
const groups: (ES.Property[] | ES.Expression)[] = [];
|
|
110
|
+
const bindings: (ES.Property[] | ES.Expression)[] = [];
|
|
111
|
+
const push = (...properties: ES.Property[]): void => {
|
|
112
|
+
const last = groups.at(-1);
|
|
113
|
+
if (Array.isArray(last)) last.push(...properties);
|
|
114
|
+
else groups.push([...properties]);
|
|
115
|
+
};
|
|
116
|
+
for (const attribute of node.attributes) {
|
|
117
|
+
switch (attribute.kind) {
|
|
118
|
+
case 'attribute': {
|
|
119
|
+
if (attribute.name.startsWith('--')) break;
|
|
120
|
+
const sources =
|
|
121
|
+
attribute.value.kind === 'expression'
|
|
122
|
+
? [attribute.value.expression]
|
|
123
|
+
: attribute.value.kind === 'text'
|
|
124
|
+
? attribute.value.parts.flatMap((part) =>
|
|
125
|
+
part.kind === 'expression' ? [part.expression] : []
|
|
126
|
+
)
|
|
127
|
+
: [];
|
|
128
|
+
const reactive =
|
|
129
|
+
attribute.value.kind !== 'boolean' &&
|
|
130
|
+
(attribute.value.kind === 'expression'
|
|
131
|
+
? isDynamic(context, attribute.value.expression)
|
|
132
|
+
: attribute.value.parts.some(
|
|
133
|
+
(part) => part.kind === 'expression' && isDynamic(context, part.expression)
|
|
134
|
+
));
|
|
135
|
+
const value = memoValue(
|
|
136
|
+
context,
|
|
137
|
+
declarations,
|
|
138
|
+
sources,
|
|
139
|
+
valueOf(context, null, attribute.value),
|
|
140
|
+
reactive &&
|
|
141
|
+
sources.some(
|
|
142
|
+
(source) => source.type !== 'Identifier' && source.type !== 'MemberExpression'
|
|
143
|
+
)
|
|
144
|
+
);
|
|
145
|
+
push(reactive ? getter(attribute.name, value) : plain(attribute.name, value));
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
case 'spread': {
|
|
149
|
+
const value = memoValue(
|
|
150
|
+
context,
|
|
151
|
+
declarations,
|
|
152
|
+
[attribute.expression],
|
|
153
|
+
rewrite(context, attribute.expression)
|
|
154
|
+
);
|
|
155
|
+
groups.push(isDynamic(context, attribute.expression) ? b.arrow([], value) : value);
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
case 'binding': {
|
|
159
|
+
if (attribute.name === 'this') break;
|
|
160
|
+
const properties = bindingProperties(context, attribute.name, attribute.expression);
|
|
161
|
+
const target = attribute.expression.type === 'SequenceExpression' ? groups : bindings;
|
|
162
|
+
const props: ES.ObjectExpression = { type: 'ObjectExpression', properties };
|
|
163
|
+
let external = false;
|
|
164
|
+
b.walk(attribute.expression, (node) => {
|
|
165
|
+
if (node.type === 'Identifier' && context.analysis.externals.has(node)) external = true;
|
|
166
|
+
});
|
|
167
|
+
if (external) {
|
|
168
|
+
target.push(
|
|
169
|
+
runtime(context, 'mutableProps', props, {
|
|
170
|
+
type: 'ArrayExpression',
|
|
171
|
+
elements: [b.literal(attribute.name)]
|
|
172
|
+
})
|
|
173
|
+
);
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
let base: ES.Node = attribute.expression;
|
|
177
|
+
while (base.type === 'MemberExpression') base = base.object;
|
|
178
|
+
const binding =
|
|
179
|
+
base.type === 'Identifier' ? context.analysis.references.get(base) : undefined;
|
|
180
|
+
if (binding?.kind === 'prop' && accessor(binding))
|
|
181
|
+
target.push(
|
|
182
|
+
runtime(
|
|
183
|
+
context,
|
|
184
|
+
'forwardProps',
|
|
185
|
+
props,
|
|
186
|
+
b.literal(attribute.name),
|
|
187
|
+
base as ES.Identifier
|
|
188
|
+
)
|
|
189
|
+
);
|
|
190
|
+
else if (target === bindings) bindings.push(properties);
|
|
191
|
+
else push(...properties);
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
case 'attachment': {
|
|
195
|
+
let value = rewrite(context, attribute.expression);
|
|
196
|
+
if (isDynamic(context, attribute.expression)) {
|
|
197
|
+
const target = b.id(context.names.unique('$$node'));
|
|
198
|
+
const fn = b.logical('||', value, b.member(context.runtime, 'noop'));
|
|
199
|
+
value = b.arrow([target], b.call(fn, target));
|
|
200
|
+
}
|
|
201
|
+
push({
|
|
202
|
+
type: 'Property',
|
|
203
|
+
key: runtime(context, 'attachment'),
|
|
204
|
+
value,
|
|
205
|
+
kind: 'init',
|
|
206
|
+
method: false,
|
|
207
|
+
shorthand: false,
|
|
208
|
+
computed: true
|
|
209
|
+
});
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
default:
|
|
213
|
+
throw unsupported(attribute, `The ${attribute.kind} directive on a component`);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
for (const binding of bindings) {
|
|
217
|
+
if (Array.isArray(binding)) push(...binding);
|
|
218
|
+
else groups.push(binding);
|
|
219
|
+
}
|
|
220
|
+
const nodes = cleaned(context, node.body);
|
|
221
|
+
const slots: Record<string, ES.Expression> = {};
|
|
222
|
+
const regular: Node[] = [];
|
|
223
|
+
for (const child of nodes) {
|
|
224
|
+
if (child.kind === 'snippet') {
|
|
225
|
+
push(plain(child.name.name, { ...child.name, name: context.names.bound(child.name) }));
|
|
226
|
+
slots[child.name.name === 'children' ? 'default' : child.name.name] = b.literal(true);
|
|
227
|
+
} else {
|
|
228
|
+
regular.push(child);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (regular.length > 0) {
|
|
232
|
+
const anchor = b.id(context.names.unique('$$anchor'));
|
|
233
|
+
const namespace = context.component.fragmentNamespaces.get(node.body) ?? 'html';
|
|
234
|
+
const body = render(context, regular, anchor, namespace, true);
|
|
235
|
+
const children = b.arrow([anchor], body);
|
|
236
|
+
push(plain('children', context.dev ? runtime(context, 'snippet', children) : children));
|
|
237
|
+
slots.default = b.literal(true);
|
|
238
|
+
}
|
|
239
|
+
const objects = groups.map((group) =>
|
|
240
|
+
Array.isArray(group)
|
|
241
|
+
? ({ type: 'ObjectExpression', properties: group } as ES.ObjectExpression)
|
|
242
|
+
: group
|
|
243
|
+
);
|
|
244
|
+
if (objects.length === 0) return { type: 'ObjectExpression', properties: [] };
|
|
245
|
+
const props =
|
|
246
|
+
objects.length === 1 && groups[0] !== undefined && Array.isArray(groups[0])
|
|
247
|
+
? (objects[0] as ES.Expression)
|
|
248
|
+
: runtime(context, 'spreadProps', ...objects);
|
|
249
|
+
return Object.keys(slots).length === 0
|
|
250
|
+
? props
|
|
251
|
+
: runtime(context, 'slotProps', props, b.object(slots));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export function styledComponent(
|
|
255
|
+
context: TemplateContext,
|
|
256
|
+
node: Component,
|
|
257
|
+
svg: boolean
|
|
258
|
+
): Part | null {
|
|
259
|
+
const properties = node.attributes.filter(
|
|
260
|
+
(attribute) => attribute.kind === 'attribute' && attribute.name.startsWith('--')
|
|
261
|
+
);
|
|
262
|
+
if (properties.length === 0) return null;
|
|
263
|
+
const tag = svg ? 'g' : context.format.cssWrapper;
|
|
264
|
+
return {
|
|
265
|
+
markup: {
|
|
266
|
+
kind: 'element',
|
|
267
|
+
name: tag,
|
|
268
|
+
namespace: svg ? 'svg' : 'html',
|
|
269
|
+
attributes: svg ? [] : [['style', 'display: contents']],
|
|
270
|
+
children: [anchorComment]
|
|
271
|
+
},
|
|
272
|
+
hint: tag,
|
|
273
|
+
text: false,
|
|
274
|
+
referenced: true,
|
|
275
|
+
children: [],
|
|
276
|
+
setup(wrapper, emit) {
|
|
277
|
+
const updates: Emit = { init: [], after: [], update: [], thunks: [], params: [] };
|
|
278
|
+
const styles = b.object(
|
|
279
|
+
Object.fromEntries(
|
|
280
|
+
properties.map((attribute) => {
|
|
281
|
+
if (attribute.kind !== 'attribute') throw new Error('expected CSS property');
|
|
282
|
+
return [attribute.name, valueOf(context, updates, attribute.value)];
|
|
283
|
+
})
|
|
284
|
+
)
|
|
285
|
+
);
|
|
286
|
+
emit.init.push(
|
|
287
|
+
b.statement(
|
|
288
|
+
runtime(
|
|
289
|
+
context,
|
|
290
|
+
'content',
|
|
291
|
+
b.arrow(updates.params, [
|
|
292
|
+
b.statement(
|
|
293
|
+
runtime(
|
|
294
|
+
context,
|
|
295
|
+
'style',
|
|
296
|
+
wrapper,
|
|
297
|
+
b.literal(svg ? null : 'display: contents;'),
|
|
298
|
+
b.literal(null),
|
|
299
|
+
styles
|
|
300
|
+
)
|
|
301
|
+
)
|
|
302
|
+
]),
|
|
303
|
+
...(updates.thunks.length > 0
|
|
304
|
+
? [{ type: 'ArrayExpression', elements: updates.thunks } as ES.ArrayExpression]
|
|
305
|
+
: [])
|
|
306
|
+
)
|
|
307
|
+
)
|
|
308
|
+
);
|
|
309
|
+
const anchor = b.id(context.names.unique('$$anchor'));
|
|
310
|
+
emit.init.push(
|
|
311
|
+
b.constant(anchor.name, runtime(context, 'child', wrapper)),
|
|
312
|
+
...componentCall(context, node, anchor)
|
|
313
|
+
);
|
|
314
|
+
emit.init.push(b.statement(runtime(context, 'reset', wrapper)));
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function ownershipBindings(
|
|
320
|
+
context: TemplateContext,
|
|
321
|
+
node: Component,
|
|
322
|
+
reference: ES.Expression
|
|
323
|
+
): ES.Statement[] {
|
|
324
|
+
if (
|
|
325
|
+
!context.dev ||
|
|
326
|
+
context.ownership === undefined ||
|
|
327
|
+
context.component.ignored.get(node)?.has('ownership_invalid_binding')
|
|
328
|
+
)
|
|
329
|
+
return [];
|
|
330
|
+
const result: ES.Statement[] = [];
|
|
331
|
+
for (const attribute of node.attributes) {
|
|
332
|
+
if (
|
|
333
|
+
attribute.kind !== 'binding' ||
|
|
334
|
+
attribute.name === 'this' ||
|
|
335
|
+
attribute.expression.type === 'SequenceExpression'
|
|
336
|
+
)
|
|
337
|
+
continue;
|
|
338
|
+
let base: ES.Node = attribute.expression;
|
|
339
|
+
while (base.type === 'MemberExpression') base = base.object;
|
|
340
|
+
if (base.type !== 'Identifier') continue;
|
|
341
|
+
const binding = context.analysis.references.get(base);
|
|
342
|
+
if (binding?.kind !== 'prop') continue;
|
|
343
|
+
result.push(
|
|
344
|
+
b.statement(
|
|
345
|
+
b.call(
|
|
346
|
+
b.member(context.ownership.validator, 'binding'),
|
|
347
|
+
b.literal(base.name),
|
|
348
|
+
reference,
|
|
349
|
+
b.arrow([], rewrite(context, attribute.expression))
|
|
350
|
+
)
|
|
351
|
+
)
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
return result;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export function componentCall(
|
|
358
|
+
context: TemplateContext,
|
|
359
|
+
node: Component,
|
|
360
|
+
anchor: ES.Expression
|
|
361
|
+
): ES.Statement[] {
|
|
362
|
+
const declarations = snippetDeclarations(context, cleaned(context, node.body));
|
|
363
|
+
for (const attribute of node.attributes) {
|
|
364
|
+
if (attribute.kind === 'binding')
|
|
365
|
+
declarations.push(...validateBinding(context, node, attribute));
|
|
366
|
+
}
|
|
367
|
+
const props = propsObject(context, node, declarations);
|
|
368
|
+
const self = node.attributes.find(
|
|
369
|
+
(attribute): attribute is Extract<typeof attribute, { kind: 'binding' }> =>
|
|
370
|
+
attribute.kind === 'binding' && attribute.name === 'this'
|
|
371
|
+
);
|
|
372
|
+
const bound = (call: ES.Expression): ES.Expression =>
|
|
373
|
+
self === undefined ? call : bindThisCall(context, call, self.expression);
|
|
374
|
+
const referenceSpan = spanOf(node.reference);
|
|
375
|
+
const tag = context.component.unit.source.slice(referenceSpan.start, referenceSpan.end);
|
|
376
|
+
const within = (body: ES.Statement[]): ES.Statement[] =>
|
|
377
|
+
scoped(context, node, 'component', body, { componentTag: b.literal(tag) });
|
|
378
|
+
if (!isDynamicComponent(context, node)) {
|
|
379
|
+
return within([
|
|
380
|
+
...declarations,
|
|
381
|
+
...ownershipBindings(context, node, rewrite(context, node.reference)),
|
|
382
|
+
b.statement(bound(b.call(rewrite(context, node.reference), anchor, props)))
|
|
383
|
+
]);
|
|
384
|
+
}
|
|
385
|
+
const inner = b.id(context.names.unique('$$anchor'));
|
|
386
|
+
const reference = b.id(context.names.unique('$$component'));
|
|
387
|
+
const checks = ownershipBindings(context, node, reference);
|
|
388
|
+
const call = bound(b.call(reference, inner, props));
|
|
389
|
+
return within([
|
|
390
|
+
...declarations,
|
|
391
|
+
b.statement(
|
|
392
|
+
runtime(
|
|
393
|
+
context,
|
|
394
|
+
'component',
|
|
395
|
+
anchor,
|
|
396
|
+
b.arrow([], rewrite(context, node.reference)),
|
|
397
|
+
b.arrow([inner, reference], checks.length === 0 ? call : [...checks, b.statement(call)])
|
|
398
|
+
)
|
|
399
|
+
)
|
|
400
|
+
]);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export function boundaryCall(
|
|
404
|
+
context: TemplateContext,
|
|
405
|
+
node: Boundary,
|
|
406
|
+
anchor: ES.Expression
|
|
407
|
+
): ES.Statement[] {
|
|
408
|
+
const nodes = cleaned(context, node.body);
|
|
409
|
+
const properties: ES.Property[] = [];
|
|
410
|
+
const named = new Set<string>();
|
|
411
|
+
const handed: Node[] = [];
|
|
412
|
+
for (const child of nodes) {
|
|
413
|
+
if (
|
|
414
|
+
child.kind === 'snippet' &&
|
|
415
|
+
(child.name.name === 'failed' || child.name.name === 'pending')
|
|
416
|
+
) {
|
|
417
|
+
named.add(child.name.name);
|
|
418
|
+
handed.push(child);
|
|
419
|
+
properties.push(
|
|
420
|
+
plain(child.name.name, { ...child.name, name: context.names.bound(child.name) })
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
const declarations = snippetDeclarations(context, handed);
|
|
425
|
+
for (const attribute of node.attributes) {
|
|
426
|
+
if (attribute.kind !== 'attribute' || named.has(attribute.name)) continue;
|
|
427
|
+
const value = valueOf(context, null, attribute.value);
|
|
428
|
+
properties.push(getter(attribute.name, value));
|
|
429
|
+
}
|
|
430
|
+
const regular = nodes.filter(
|
|
431
|
+
(child) => !(child.kind === 'snippet' && named.has(child.name.name))
|
|
432
|
+
);
|
|
433
|
+
const inner = b.id(context.names.unique('$$anchor'));
|
|
434
|
+
const namespace = context.component.fragmentNamespaces.get(node.body) ?? 'html';
|
|
435
|
+
const body = render(context, regular, inner, namespace, true);
|
|
436
|
+
return [
|
|
437
|
+
{
|
|
438
|
+
type: 'BlockStatement',
|
|
439
|
+
body: [
|
|
440
|
+
...declarations,
|
|
441
|
+
b.statement(
|
|
442
|
+
runtime(
|
|
443
|
+
context,
|
|
444
|
+
'boundary',
|
|
445
|
+
anchor,
|
|
446
|
+
{ type: 'ObjectExpression', properties },
|
|
447
|
+
b.arrow([inner], body)
|
|
448
|
+
)
|
|
449
|
+
)
|
|
450
|
+
]
|
|
451
|
+
}
|
|
452
|
+
];
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export function snippetDeclarations(
|
|
456
|
+
context: TemplateContext,
|
|
457
|
+
nodes: readonly Node[]
|
|
458
|
+
): ES.Statement[] {
|
|
459
|
+
const result: ES.Statement[] = [];
|
|
460
|
+
for (const node of nodes) {
|
|
461
|
+
if (node.kind !== 'snippet') continue;
|
|
462
|
+
const lifted = context.component.lifted.has(node);
|
|
463
|
+
const declaration = snippetDeclaration(lifted ? { ...context, props: null } : context, node);
|
|
464
|
+
const initialize = context.dev
|
|
465
|
+
? b.statement(runtime(context, 'snippet', { ...declaration.id! }))
|
|
466
|
+
: null;
|
|
467
|
+
if (lifted) {
|
|
468
|
+
context.hoisted.push(declaration);
|
|
469
|
+
if (initialize !== null) context.moduleSetup.push(initialize);
|
|
470
|
+
} else {
|
|
471
|
+
result.push(declaration);
|
|
472
|
+
if (initialize !== null) {
|
|
473
|
+
if (
|
|
474
|
+
!context.component.asynchronous &&
|
|
475
|
+
context.awaited === undefined &&
|
|
476
|
+
context.component.root.includes(node)
|
|
477
|
+
)
|
|
478
|
+
context.early.push(initialize);
|
|
479
|
+
else result.push(initialize);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return result;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function snippetDeclaration(context: TemplateContext, node: Snippet): ES.FunctionDeclaration {
|
|
487
|
+
const anchor = b.id(context.names.unique('$$anchor'));
|
|
488
|
+
const { params, declarations } = snippetParameters(context, node.parameters);
|
|
489
|
+
const namespace = context.component.fragmentNamespaces.get(node.body) ?? 'html';
|
|
490
|
+
const body = render(context, cleaned(context, node.body), anchor, namespace, true);
|
|
491
|
+
return {
|
|
492
|
+
type: 'FunctionDeclaration',
|
|
493
|
+
id: { ...node.name, name: context.names.bound(node.name) },
|
|
494
|
+
params: [anchor, ...params],
|
|
495
|
+
body: {
|
|
496
|
+
type: 'BlockStatement',
|
|
497
|
+
body: [
|
|
498
|
+
...(context.dev ? [b.statement(runtime(context, 'snippetArgs', b.id('arguments')))] : []),
|
|
499
|
+
...declarations,
|
|
500
|
+
...body
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
async: false,
|
|
504
|
+
generator: false
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
function callOf(node: Render): { call: ES.SimpleCallExpression; optional: boolean } {
|
|
509
|
+
const expression = node.call;
|
|
510
|
+
if (expression.type === 'ChainExpression') {
|
|
511
|
+
return { call: expression.expression as ES.SimpleCallExpression, optional: true };
|
|
512
|
+
}
|
|
513
|
+
return { call: expression, optional: expression.optional };
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export function isStaticRender(context: TemplateContext, node: Render): boolean {
|
|
517
|
+
const { call, optional } = callOf(node);
|
|
518
|
+
if (optional || call.callee.type !== 'Identifier') return false;
|
|
519
|
+
const binding = context.analysis.references.get(call.callee);
|
|
520
|
+
return binding?.kind === 'snippet' && !binding.reassigned;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export function renderCall(
|
|
524
|
+
context: TemplateContext,
|
|
525
|
+
node: Render,
|
|
526
|
+
anchor: ES.Expression
|
|
527
|
+
): ES.Statement[] {
|
|
528
|
+
const { call, optional } = callOf(node);
|
|
529
|
+
const declarations: ES.Statement[] = [];
|
|
530
|
+
const args = call.arguments.map((argument) => {
|
|
531
|
+
if (argument.type === 'SpreadElement')
|
|
532
|
+
throw unsupported(spanOf(argument), 'A spread argument to a snippet');
|
|
533
|
+
return b.arrow([], memoValue(context, declarations, [argument], rewrite(context, argument)));
|
|
534
|
+
});
|
|
535
|
+
if (isStaticRender(context, node)) {
|
|
536
|
+
return scoped(context, node, 'render', [
|
|
537
|
+
...declarations,
|
|
538
|
+
b.statement(b.call(rewrite(context, call.callee as ES.Identifier), anchor, ...args))
|
|
539
|
+
]);
|
|
540
|
+
}
|
|
541
|
+
const callee = rewrite(context, call.callee as ES.Expression);
|
|
542
|
+
const selected = optional
|
|
543
|
+
? b.logical('??', callee, b.member(context.runtime, context.runtimeNames?.noop ?? 'noop'))
|
|
544
|
+
: callee;
|
|
545
|
+
return scoped(context, node, 'render', [
|
|
546
|
+
...declarations,
|
|
547
|
+
b.statement(runtime(context, 'render', anchor, b.arrow([], selected), ...args))
|
|
548
|
+
]);
|
|
549
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type * as ES from 'estree';
|
|
2
|
+
import { hasAwait, patternNames, pendingAwaits, spanOf, unsupported } from '../analysis/index.ts';
|
|
3
|
+
import * as b from '../ir/estree.ts';
|
|
4
|
+
import type { Constant, Declaration, Node } from '../ir/nodes.ts';
|
|
5
|
+
import { rewrite, runtime } from './script.ts';
|
|
6
|
+
import type { TemplateContext } from './template.ts';
|
|
7
|
+
|
|
8
|
+
function constantDeclaration(context: TemplateContext, node: Constant): ES.Statement[] {
|
|
9
|
+
const { id, init } = node.declarator;
|
|
10
|
+
if (init == null) throw unsupported(node, 'A {@const} without a value');
|
|
11
|
+
if (hasAwait(init, context.awaited)) throw unsupported(spanOf(init), 'An await in {@const}');
|
|
12
|
+
if (id.type === 'Identifier') {
|
|
13
|
+
const value = runtime(context, 'derived', b.arrow([], rewrite(context, init)));
|
|
14
|
+
return [b.constant(id.name, value)];
|
|
15
|
+
}
|
|
16
|
+
const names = patternNames(id);
|
|
17
|
+
const bindings = names.map((name) => context.analysis.declarations.get(name));
|
|
18
|
+
const plain = new Set(context.plain);
|
|
19
|
+
for (const binding of bindings) if (binding !== undefined) plain.add(binding);
|
|
20
|
+
const inner = { ...context, plain };
|
|
21
|
+
const holder = b.id(context.names.unique('computed_const'));
|
|
22
|
+
const body: ES.Statement[] = [
|
|
23
|
+
{
|
|
24
|
+
type: 'VariableDeclaration',
|
|
25
|
+
kind: 'const',
|
|
26
|
+
declarations: [
|
|
27
|
+
{ type: 'VariableDeclarator', id: rewrite(inner, id), init: rewrite(context, init) }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'ReturnStatement',
|
|
32
|
+
argument: b.object(Object.fromEntries(names.map((name) => [name.name, b.id(name.name)])))
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
names.forEach((name, index) => {
|
|
36
|
+
const binding = bindings[index];
|
|
37
|
+
if (binding === undefined) return;
|
|
38
|
+
context.aliases?.set(binding, b.member(runtime(context, 'get', holder), name.name));
|
|
39
|
+
});
|
|
40
|
+
return [b.constant(holder.name, runtime(context, 'derived', b.arrow([], body)))];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function renamedPattern(pattern: ES.Pattern, names: ReadonlyMap<string, string>): ES.Pattern {
|
|
44
|
+
switch (pattern.type) {
|
|
45
|
+
case 'Identifier':
|
|
46
|
+
return { ...pattern, name: names.get(pattern.name) ?? pattern.name };
|
|
47
|
+
case 'AssignmentPattern':
|
|
48
|
+
return { ...pattern, left: renamedPattern(pattern.left, names) };
|
|
49
|
+
case 'ObjectPattern':
|
|
50
|
+
return {
|
|
51
|
+
...pattern,
|
|
52
|
+
properties: pattern.properties.map((property) =>
|
|
53
|
+
property.type === 'RestElement'
|
|
54
|
+
? { ...property, argument: renamedPattern(property.argument, names) }
|
|
55
|
+
: { ...property, value: renamedPattern(property.value, names), shorthand: false }
|
|
56
|
+
)
|
|
57
|
+
};
|
|
58
|
+
case 'ArrayPattern':
|
|
59
|
+
return {
|
|
60
|
+
...pattern,
|
|
61
|
+
elements: pattern.elements.map((element) =>
|
|
62
|
+
element === null ? null : renamedPattern(element, names)
|
|
63
|
+
)
|
|
64
|
+
};
|
|
65
|
+
case 'RestElement':
|
|
66
|
+
return { ...pattern, argument: renamedPattern(pattern.argument, names) };
|
|
67
|
+
default:
|
|
68
|
+
return pattern;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function nestedDeclaration(context: TemplateContext, node: Declaration): ES.Statement {
|
|
73
|
+
if (pendingAwaits(node, context.awaited).length > 0)
|
|
74
|
+
throw unsupported(node, 'An await in a declaration tag inside an element');
|
|
75
|
+
const names = new Map<string, string>();
|
|
76
|
+
for (const declarator of node.declaration.declarations) {
|
|
77
|
+
for (const name of patternNames(declarator.id)) {
|
|
78
|
+
const binding = context.analysis.declarations.get(name);
|
|
79
|
+
const fresh = context.names.unique(name.name);
|
|
80
|
+
names.set(name.name, fresh);
|
|
81
|
+
if (binding !== undefined) context.renamed?.set(binding, fresh);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const declaration = rewrite(context, node.declaration);
|
|
85
|
+
return {
|
|
86
|
+
...declaration,
|
|
87
|
+
declarations: declaration.declarations.map((declarator) => ({
|
|
88
|
+
...declarator,
|
|
89
|
+
id: renamedPattern(declarator.id, names)
|
|
90
|
+
}))
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function constantDeclarations(
|
|
95
|
+
context: TemplateContext,
|
|
96
|
+
nodes: readonly Node[],
|
|
97
|
+
own: ReadonlySet<Node> = new Set(nodes)
|
|
98
|
+
): ES.Statement[] {
|
|
99
|
+
const result: ES.Statement[] = [];
|
|
100
|
+
for (const node of nodes) {
|
|
101
|
+
if (node.kind === 'constant') result.push(...constantDeclaration(context, node));
|
|
102
|
+
else if (node.kind !== 'declaration') continue;
|
|
103
|
+
else if (own.has(node)) result.push(rewrite(context, node.declaration));
|
|
104
|
+
else result.push(nestedDeclaration(context, node));
|
|
105
|
+
}
|
|
106
|
+
return result;
|
|
107
|
+
}
|