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,241 @@
|
|
|
1
|
+
import type * as ES from 'estree';
|
|
2
|
+
import type * as IR from '../../ir/nodes.ts';
|
|
3
|
+
|
|
4
|
+
export type PathNode = ES.Node | IR.Node | IR.Attribute | IR.Fragment;
|
|
5
|
+
|
|
6
|
+
export type BindingKind =
|
|
7
|
+
| 'normal'
|
|
8
|
+
| 'state'
|
|
9
|
+
| 'raw_state'
|
|
10
|
+
| 'derived'
|
|
11
|
+
| 'prop'
|
|
12
|
+
| 'bindable_prop'
|
|
13
|
+
| 'rest_prop'
|
|
14
|
+
| 'each'
|
|
15
|
+
| 'snippet'
|
|
16
|
+
| 'template'
|
|
17
|
+
| 'static'
|
|
18
|
+
| 'store_sub';
|
|
19
|
+
|
|
20
|
+
export type DeclarationKind =
|
|
21
|
+
| 'var'
|
|
22
|
+
| 'let'
|
|
23
|
+
| 'const'
|
|
24
|
+
| 'using'
|
|
25
|
+
| 'await using'
|
|
26
|
+
| 'function'
|
|
27
|
+
| 'import'
|
|
28
|
+
| 'param'
|
|
29
|
+
| 'rest_param'
|
|
30
|
+
| 'synthetic';
|
|
31
|
+
|
|
32
|
+
export type Initial = ES.Node | IR.Node | null;
|
|
33
|
+
|
|
34
|
+
export interface Reference {
|
|
35
|
+
readonly node: ES.Identifier;
|
|
36
|
+
readonly path: readonly PathNode[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export class Binding {
|
|
40
|
+
readonly scope: Scope;
|
|
41
|
+
readonly node: ES.Identifier;
|
|
42
|
+
readonly declaration: DeclarationKind;
|
|
43
|
+
kind: BindingKind;
|
|
44
|
+
initial: Initial;
|
|
45
|
+
readonly references: Reference[] = [];
|
|
46
|
+
reassigned = false;
|
|
47
|
+
mutated = false;
|
|
48
|
+
insideRest = false;
|
|
49
|
+
templateDeclaration = false;
|
|
50
|
+
|
|
51
|
+
constructor(
|
|
52
|
+
scope: Scope,
|
|
53
|
+
node: ES.Identifier,
|
|
54
|
+
kind: BindingKind,
|
|
55
|
+
declaration: DeclarationKind,
|
|
56
|
+
initial: Initial
|
|
57
|
+
) {
|
|
58
|
+
this.scope = scope;
|
|
59
|
+
this.node = node;
|
|
60
|
+
this.kind = kind;
|
|
61
|
+
this.declaration = declaration;
|
|
62
|
+
this.initial = initial;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
get updated(): boolean {
|
|
66
|
+
return this.mutated || this.reassigned;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
isFunction(): boolean {
|
|
70
|
+
if (this.updated) return false;
|
|
71
|
+
const type = (this.initial as { type?: string } | null)?.type;
|
|
72
|
+
return (
|
|
73
|
+
type === 'ArrowFunctionExpression' ||
|
|
74
|
+
type === 'FunctionExpression' ||
|
|
75
|
+
type === 'FunctionDeclaration'
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type Duplicate = (node: ES.Identifier) => never;
|
|
81
|
+
|
|
82
|
+
export class Scope {
|
|
83
|
+
readonly parent: Scope | null;
|
|
84
|
+
readonly porous: boolean;
|
|
85
|
+
readonly depth: number;
|
|
86
|
+
readonly declarations = new Map<string, Binding>();
|
|
87
|
+
readonly references = new Map<string, Reference[]>();
|
|
88
|
+
readonly #duplicate: Duplicate;
|
|
89
|
+
|
|
90
|
+
constructor(parent: Scope | null, porous: boolean, duplicate: Duplicate) {
|
|
91
|
+
this.parent = parent;
|
|
92
|
+
this.porous = porous;
|
|
93
|
+
this.depth = parent === null ? 0 : parent.depth + (porous ? 0 : 1);
|
|
94
|
+
this.#duplicate = duplicate;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
child(porous = false): Scope {
|
|
98
|
+
return new Scope(this, porous, this.#duplicate);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare(
|
|
102
|
+
node: ES.Identifier,
|
|
103
|
+
kind: BindingKind,
|
|
104
|
+
declaration: DeclarationKind,
|
|
105
|
+
initial: Initial = null
|
|
106
|
+
): Binding {
|
|
107
|
+
if (this.parent !== null) {
|
|
108
|
+
if (declaration === 'var' && this.porous) return this.parent.declare(node, kind, declaration);
|
|
109
|
+
if (declaration === 'import') return this.parent.declare(node, kind, declaration, initial);
|
|
110
|
+
}
|
|
111
|
+
const existing = this.declarations.get(node.name);
|
|
112
|
+
if (existing !== undefined && existing.declaration !== 'var' && declaration !== 'var') {
|
|
113
|
+
this.#duplicate(node);
|
|
114
|
+
}
|
|
115
|
+
const binding = new Binding(this, node, kind, declaration, initial);
|
|
116
|
+
this.declarations.set(node.name, binding);
|
|
117
|
+
return binding;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
get(name: string): Binding | null {
|
|
121
|
+
for (let scope: Scope | null = this; scope !== null; scope = scope.parent) {
|
|
122
|
+
const binding = scope.declarations.get(name);
|
|
123
|
+
if (binding !== undefined) return binding;
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
owner(name: string): Scope | null {
|
|
129
|
+
for (let scope: Scope | null = this; scope !== null; scope = scope.parent) {
|
|
130
|
+
if (scope.declarations.has(name)) return scope;
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
reference(reference: Reference): void {
|
|
136
|
+
const name = reference.node.name;
|
|
137
|
+
for (let scope: Scope | null = this; scope !== null; scope = scope.parent) {
|
|
138
|
+
let list = scope.references.get(name);
|
|
139
|
+
if (list === undefined) scope.references.set(name, (list = []));
|
|
140
|
+
list.push(reference);
|
|
141
|
+
const binding = scope.declarations.get(name);
|
|
142
|
+
if (binding !== undefined) {
|
|
143
|
+
binding.references.push(reference);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function typeOf(node: PathNode): string {
|
|
151
|
+
if ('type' in node) return node.type;
|
|
152
|
+
if ('kind' in node) return node.kind;
|
|
153
|
+
return 'fragment';
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function isReference(node: ES.Node, parent: ES.Node | null | undefined): boolean {
|
|
157
|
+
if (node.type === 'MemberExpression') return !node.computed && isReference(node.object, node);
|
|
158
|
+
if (node.type !== 'Identifier') return false;
|
|
159
|
+
if (parent === null || parent === undefined) return true;
|
|
160
|
+
switch (parent.type) {
|
|
161
|
+
case 'MemberExpression':
|
|
162
|
+
return parent.computed || node === parent.object;
|
|
163
|
+
case 'MethodDefinition':
|
|
164
|
+
return parent.computed;
|
|
165
|
+
case 'MetaProperty':
|
|
166
|
+
return parent.meta === node;
|
|
167
|
+
case 'PropertyDefinition':
|
|
168
|
+
return parent.computed || node === parent.value;
|
|
169
|
+
case 'Property':
|
|
170
|
+
return parent.computed || node === parent.value;
|
|
171
|
+
case 'ExportSpecifier':
|
|
172
|
+
case 'ImportSpecifier':
|
|
173
|
+
return node === parent.local;
|
|
174
|
+
case 'LabeledStatement':
|
|
175
|
+
case 'BreakStatement':
|
|
176
|
+
case 'ContinueStatement':
|
|
177
|
+
return false;
|
|
178
|
+
default:
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function identifiers(pattern: ES.Node, into: ES.Identifier[] = []): ES.Identifier[] {
|
|
184
|
+
switch (pattern.type) {
|
|
185
|
+
case 'Identifier':
|
|
186
|
+
into.push(pattern);
|
|
187
|
+
break;
|
|
188
|
+
case 'ObjectPattern':
|
|
189
|
+
for (const property of pattern.properties) {
|
|
190
|
+
identifiers(property.type === 'RestElement' ? property : property.value, into);
|
|
191
|
+
}
|
|
192
|
+
break;
|
|
193
|
+
case 'ArrayPattern':
|
|
194
|
+
for (const element of pattern.elements) if (element !== null) identifiers(element, into);
|
|
195
|
+
break;
|
|
196
|
+
case 'RestElement':
|
|
197
|
+
identifiers(pattern.argument, into);
|
|
198
|
+
break;
|
|
199
|
+
case 'AssignmentPattern':
|
|
200
|
+
identifiers(pattern.left, into);
|
|
201
|
+
break;
|
|
202
|
+
default:
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
return into;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function leaves(
|
|
209
|
+
pattern: ES.Node,
|
|
210
|
+
into: (ES.Identifier | ES.MemberExpression)[] = []
|
|
211
|
+
): (ES.Identifier | ES.MemberExpression)[] {
|
|
212
|
+
switch (pattern.type) {
|
|
213
|
+
case 'ObjectPattern':
|
|
214
|
+
for (const property of pattern.properties) {
|
|
215
|
+
leaves(property.type === 'RestElement' ? property : property.value, into);
|
|
216
|
+
}
|
|
217
|
+
break;
|
|
218
|
+
case 'ArrayPattern':
|
|
219
|
+
for (const element of pattern.elements) if (element !== null) leaves(element, into);
|
|
220
|
+
break;
|
|
221
|
+
case 'RestElement':
|
|
222
|
+
leaves(pattern.argument, into);
|
|
223
|
+
break;
|
|
224
|
+
case 'AssignmentPattern':
|
|
225
|
+
leaves(pattern.left, into);
|
|
226
|
+
break;
|
|
227
|
+
case 'Identifier':
|
|
228
|
+
case 'MemberExpression':
|
|
229
|
+
into.push(pattern);
|
|
230
|
+
break;
|
|
231
|
+
default:
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
return into;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function base(expression: ES.Node): ES.Identifier | null {
|
|
238
|
+
let node = expression;
|
|
239
|
+
while (node.type === 'MemberExpression') node = node.object;
|
|
240
|
+
return node.type === 'Identifier' ? node : null;
|
|
241
|
+
}
|
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
import type * as ES from 'estree';
|
|
2
|
+
import { children } from '../../ir/estree.ts';
|
|
3
|
+
import type * as IR from '../../ir/nodes.ts';
|
|
4
|
+
import type { Runes } from '../../ir/port.ts';
|
|
5
|
+
import {
|
|
6
|
+
base,
|
|
7
|
+
identifiers,
|
|
8
|
+
isReference,
|
|
9
|
+
leaves,
|
|
10
|
+
Scope,
|
|
11
|
+
type Binding,
|
|
12
|
+
type Duplicate,
|
|
13
|
+
type PathNode,
|
|
14
|
+
type Reference
|
|
15
|
+
} from './scope.ts';
|
|
16
|
+
|
|
17
|
+
type Callable = ES.FunctionDeclaration | ES.FunctionExpression | ES.ArrowFunctionExpression;
|
|
18
|
+
|
|
19
|
+
function isCallable(node: ES.Node | PathNode | undefined): node is Callable {
|
|
20
|
+
const type = (node as { type?: string } | undefined)?.type;
|
|
21
|
+
return (
|
|
22
|
+
type === 'FunctionDeclaration' ||
|
|
23
|
+
type === 'FunctionExpression' ||
|
|
24
|
+
type === 'ArrowFunctionExpression'
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function runeOf(runes: Runes, node: ES.Node | null | undefined): string | null {
|
|
29
|
+
if (node?.type !== 'CallExpression') return null;
|
|
30
|
+
return runes.get(node.callee) ?? null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function settleProps(pattern: ES.Pattern, scope: Scope, runes: Runes): void {
|
|
34
|
+
if (pattern.type === 'Identifier') {
|
|
35
|
+
const binding = scope.get(pattern.name);
|
|
36
|
+
if (binding !== null) {
|
|
37
|
+
binding.initial = null;
|
|
38
|
+
binding.kind = 'rest_prop';
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (pattern.type !== 'ObjectPattern') return;
|
|
43
|
+
for (const property of pattern.properties) {
|
|
44
|
+
if (property.type === 'RestElement') {
|
|
45
|
+
for (const id of identifiers(property)) {
|
|
46
|
+
const binding = scope.get(id.name);
|
|
47
|
+
if (binding !== null) binding.kind = 'rest_prop';
|
|
48
|
+
}
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const value =
|
|
52
|
+
property.value.type === 'AssignmentPattern' ? property.value.left : property.value;
|
|
53
|
+
if (value.type !== 'Identifier') continue;
|
|
54
|
+
const binding = scope.get(value.name);
|
|
55
|
+
if (binding === null) continue;
|
|
56
|
+
const initial = property.value.type === 'AssignmentPattern' ? property.value.right : null;
|
|
57
|
+
if (initial?.type === 'CallExpression' && runes.get(initial.callee) === '$bindable') {
|
|
58
|
+
binding.initial = (initial.arguments[0] as ES.Expression | undefined) ?? null;
|
|
59
|
+
binding.kind = 'bindable_prop';
|
|
60
|
+
} else {
|
|
61
|
+
binding.initial = initial;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function settle(
|
|
67
|
+
declarator: ES.VariableDeclarator,
|
|
68
|
+
scope: Scope,
|
|
69
|
+
runes: Runes,
|
|
70
|
+
rune: string | null
|
|
71
|
+
): void {
|
|
72
|
+
const kind =
|
|
73
|
+
rune === '$state'
|
|
74
|
+
? 'state'
|
|
75
|
+
: rune === '$state.raw'
|
|
76
|
+
? 'raw_state'
|
|
77
|
+
: rune === '$derived' || rune === '$derived.by'
|
|
78
|
+
? 'derived'
|
|
79
|
+
: rune === '$props'
|
|
80
|
+
? 'prop'
|
|
81
|
+
: null;
|
|
82
|
+
if (kind === null) return;
|
|
83
|
+
for (const id of identifiers(declarator.id)) {
|
|
84
|
+
const binding = scope.get(id.name);
|
|
85
|
+
if (binding !== null) binding.kind = kind;
|
|
86
|
+
}
|
|
87
|
+
if (rune === '$props') settleProps(declarator.id, scope, runes);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export class Scopes {
|
|
91
|
+
readonly map = new Map<object, Scope>();
|
|
92
|
+
readonly runes: Runes;
|
|
93
|
+
readonly path: PathNode[] = [];
|
|
94
|
+
readonly #references: [Scope, Reference][] = [];
|
|
95
|
+
readonly #updates: [Scope, ES.Node][] = [];
|
|
96
|
+
readonly #duplicate: Duplicate;
|
|
97
|
+
|
|
98
|
+
constructor(runes: Runes, duplicate: Duplicate) {
|
|
99
|
+
this.runes = runes;
|
|
100
|
+
this.#duplicate = duplicate;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
root(parent: Scope | null): Scope {
|
|
104
|
+
return parent === null ? new Scope(null, false, this.#duplicate) : parent.child();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
program(program: ES.Program, scope: Scope): void {
|
|
108
|
+
this.map.set(program, scope);
|
|
109
|
+
this.es(program, scope);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
#params(scope: Scope, params: readonly ES.Pattern[]): void {
|
|
113
|
+
for (const param of params) {
|
|
114
|
+
for (const id of identifiers(param)) {
|
|
115
|
+
scope.declare(id, 'normal', param.type === 'RestElement' ? 'rest_param' : 'param');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
#children(node: ES.Node, scope: Scope): void {
|
|
121
|
+
this.path.push(node);
|
|
122
|
+
children(node, (child) => this.es(child, scope));
|
|
123
|
+
this.path.pop();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
#scoped(node: ES.Node, scope: Scope): void {
|
|
127
|
+
this.map.set(node, scope);
|
|
128
|
+
this.#children(node, scope);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declarator(
|
|
132
|
+
declarator: ES.VariableDeclarator,
|
|
133
|
+
scope: Scope,
|
|
134
|
+
kind: ES.VariableDeclaration['kind'],
|
|
135
|
+
template: boolean
|
|
136
|
+
): void {
|
|
137
|
+
for (const id of identifiers(declarator.id)) {
|
|
138
|
+
const binding = scope.declare(
|
|
139
|
+
id,
|
|
140
|
+
template ? 'template' : 'normal',
|
|
141
|
+
kind,
|
|
142
|
+
declarator.init ?? null
|
|
143
|
+
);
|
|
144
|
+
binding.templateDeclaration = true;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
es(node: ES.Node, scope: Scope): void {
|
|
149
|
+
switch (node.type) {
|
|
150
|
+
case 'Identifier': {
|
|
151
|
+
const parent = this.path.at(-1);
|
|
152
|
+
if (parent !== undefined && isReference(node, parent as ES.Node)) {
|
|
153
|
+
this.#references.push([scope, { node, path: this.path.slice() }]);
|
|
154
|
+
}
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
case 'AssignmentExpression':
|
|
158
|
+
this.#updates.push([scope, node.left]);
|
|
159
|
+
break;
|
|
160
|
+
case 'UpdateExpression':
|
|
161
|
+
this.#updates.push([scope, node.argument]);
|
|
162
|
+
break;
|
|
163
|
+
case 'ImportDeclaration':
|
|
164
|
+
for (const specifier of node.specifiers)
|
|
165
|
+
scope.declare(specifier.local, 'normal', 'import', node);
|
|
166
|
+
return;
|
|
167
|
+
case 'FunctionExpression': {
|
|
168
|
+
const inner = scope.child(true);
|
|
169
|
+
if (node.id) inner.declare(node.id, 'normal', 'function');
|
|
170
|
+
this.#params(inner, node.params);
|
|
171
|
+
this.#scoped(node, inner);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
case 'FunctionDeclaration': {
|
|
175
|
+
if (node.id) scope.declare(node.id, 'normal', 'function', node);
|
|
176
|
+
const inner = scope.child(true);
|
|
177
|
+
this.#params(inner, node.params);
|
|
178
|
+
this.#scoped(node, inner);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
case 'ArrowFunctionExpression': {
|
|
182
|
+
const inner = scope.child(true);
|
|
183
|
+
this.#params(inner, node.params);
|
|
184
|
+
this.#scoped(node, inner);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
case 'ForStatement':
|
|
188
|
+
case 'ForInStatement':
|
|
189
|
+
case 'ForOfStatement':
|
|
190
|
+
case 'SwitchStatement':
|
|
191
|
+
this.#scoped(node, scope.child(true));
|
|
192
|
+
return;
|
|
193
|
+
case 'BlockStatement':
|
|
194
|
+
this.#scoped(node, scope.child(!isCallable(this.path.at(-1))));
|
|
195
|
+
return;
|
|
196
|
+
case 'ClassDeclaration':
|
|
197
|
+
if (node.id) scope.declare(node.id, 'normal', 'let', node);
|
|
198
|
+
break;
|
|
199
|
+
case 'VariableDeclaration':
|
|
200
|
+
for (const declarator of node.declarations)
|
|
201
|
+
this.declarator(declarator, scope, node.kind, false);
|
|
202
|
+
break;
|
|
203
|
+
case 'CatchClause':
|
|
204
|
+
if (node.param) {
|
|
205
|
+
const inner = scope.child(true);
|
|
206
|
+
for (const id of identifiers(node.param)) inner.declare(id, 'normal', 'let');
|
|
207
|
+
this.#scoped(node, inner);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
default:
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
this.#children(node, scope);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
#within(node: PathNode, run: () => void): void {
|
|
218
|
+
this.path.push(node);
|
|
219
|
+
run();
|
|
220
|
+
this.path.pop();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
expression(node: ES.Node, scope: Scope): void {
|
|
224
|
+
this.es(node, scope);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
fragment(fragment: IR.Fragment, scope: Scope, transparent: boolean): Scope {
|
|
228
|
+
const inner = scope.child(transparent);
|
|
229
|
+
this.map.set(fragment, inner);
|
|
230
|
+
this.#nodes(fragment, inner);
|
|
231
|
+
return inner;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
#nodes(fragment: IR.Fragment, scope: Scope): void {
|
|
235
|
+
this.#within(fragment, () => {
|
|
236
|
+
for (const node of fragment.nodes) this.node(node, scope);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
#value(value: IR.Value, scope: Scope): void {
|
|
241
|
+
if (value.kind === 'expression') this.expression(value.expression, scope);
|
|
242
|
+
else if (value.kind === 'text') {
|
|
243
|
+
for (const part of value.parts) {
|
|
244
|
+
if (part.kind === 'expression')
|
|
245
|
+
this.#within(part, () => this.expression(part.expression, scope));
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
attribute(attribute: IR.Attribute, scope: Scope): void {
|
|
251
|
+
this.#within(attribute, () => {
|
|
252
|
+
switch (attribute.kind) {
|
|
253
|
+
case 'attribute':
|
|
254
|
+
case 'style':
|
|
255
|
+
this.#value(attribute.value, scope);
|
|
256
|
+
return;
|
|
257
|
+
case 'spread':
|
|
258
|
+
case 'class':
|
|
259
|
+
case 'attachment':
|
|
260
|
+
this.expression(attribute.expression, scope);
|
|
261
|
+
return;
|
|
262
|
+
case 'binding':
|
|
263
|
+
if (attribute.expression.type !== 'SequenceExpression') {
|
|
264
|
+
this.#updates.push([scope, attribute.expression]);
|
|
265
|
+
}
|
|
266
|
+
this.expression(attribute.expression, scope);
|
|
267
|
+
return;
|
|
268
|
+
case 'action':
|
|
269
|
+
this.expression(attribute.action, scope);
|
|
270
|
+
if (attribute.argument) this.expression(attribute.argument, scope);
|
|
271
|
+
return;
|
|
272
|
+
case 'transition':
|
|
273
|
+
this.expression(attribute.transition, scope);
|
|
274
|
+
if (attribute.argument) this.expression(attribute.argument, scope);
|
|
275
|
+
return;
|
|
276
|
+
case 'animation':
|
|
277
|
+
this.expression(attribute.animation, scope);
|
|
278
|
+
if (attribute.argument) this.expression(attribute.argument, scope);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
#list(node: IR.KeyedList | IR.UnkeyedList, scope: Scope): void {
|
|
285
|
+
this.expression(node.collection, scope);
|
|
286
|
+
if (node.fallback) this.fragment(node.fallback, scope, false);
|
|
287
|
+
const inner = scope.child();
|
|
288
|
+
this.map.set(node, inner);
|
|
289
|
+
this.map.set(node.body, inner);
|
|
290
|
+
if (node.item) {
|
|
291
|
+
const rest = new Set<ES.Identifier>();
|
|
292
|
+
collectRest(node.item, false, rest);
|
|
293
|
+
for (const id of identifiers(node.item)) {
|
|
294
|
+
const binding = inner.declare(id, 'each', 'const');
|
|
295
|
+
binding.insideRest = rest.has(id);
|
|
296
|
+
}
|
|
297
|
+
this.expression(node.item, inner);
|
|
298
|
+
}
|
|
299
|
+
if (node.index) {
|
|
300
|
+
const keyed =
|
|
301
|
+
node.kind === 'keyed-list' &&
|
|
302
|
+
(node.key.type !== 'Identifier' || node.key.name !== node.index.name);
|
|
303
|
+
inner.declare(
|
|
304
|
+
{ type: 'Identifier', name: node.index.name },
|
|
305
|
+
keyed ? 'template' : 'static',
|
|
306
|
+
'const',
|
|
307
|
+
node
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
if (node.kind === 'keyed-list') this.expression(node.key, inner);
|
|
311
|
+
this.#nodes(node.body, inner);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
#outcome(outcome: IR.Outcome, scope: Scope): void {
|
|
315
|
+
const body = this.fragment(outcome.body, scope, false);
|
|
316
|
+
if (outcome.binding === null) return;
|
|
317
|
+
const value = scope.child();
|
|
318
|
+
this.map.set(outcome.binding, value);
|
|
319
|
+
this.expression(outcome.binding, value);
|
|
320
|
+
for (const id of identifiers(outcome.binding)) {
|
|
321
|
+
body.declare(id, 'template', 'const');
|
|
322
|
+
value.declare(id, 'normal', 'const');
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
#snippet(node: IR.Snippet, scope: Scope): void {
|
|
327
|
+
scope.declare(node.name, 'normal', 'function', node);
|
|
328
|
+
const inner = scope.child();
|
|
329
|
+
this.map.set(node, inner);
|
|
330
|
+
for (const parameter of node.parameters) {
|
|
331
|
+
for (const id of identifiers(parameter)) inner.declare(id, 'snippet', 'let');
|
|
332
|
+
}
|
|
333
|
+
this.expression(node.name, inner);
|
|
334
|
+
for (const parameter of node.parameters) this.expression(parameter, inner);
|
|
335
|
+
const body = this.fragment(node.body, inner, false);
|
|
336
|
+
for (const [name, binding] of body.declarations) {
|
|
337
|
+
if (inner.declarations.has(name)) this.#duplicate(binding.node);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
node(node: IR.Node, scope: Scope): void {
|
|
342
|
+
this.#within(node, () => {
|
|
343
|
+
switch (node.kind) {
|
|
344
|
+
case 'text':
|
|
345
|
+
case 'comment':
|
|
346
|
+
return;
|
|
347
|
+
case 'expression':
|
|
348
|
+
case 'raw-html':
|
|
349
|
+
this.expression(node.expression, scope);
|
|
350
|
+
return;
|
|
351
|
+
case 'element':
|
|
352
|
+
case 'special':
|
|
353
|
+
case 'boundary':
|
|
354
|
+
for (const attribute of node.attributes) this.attribute(attribute, scope);
|
|
355
|
+
this.fragment(node.body, scope, true);
|
|
356
|
+
return;
|
|
357
|
+
case 'dynamic-element':
|
|
358
|
+
this.expression(node.tag, scope);
|
|
359
|
+
for (const attribute of node.attributes) this.attribute(attribute, scope);
|
|
360
|
+
this.fragment(node.body, scope, true);
|
|
361
|
+
return;
|
|
362
|
+
case 'slot':
|
|
363
|
+
for (const attribute of node.attributes) this.attribute(attribute, scope);
|
|
364
|
+
this.fragment(node.fallback, scope, true);
|
|
365
|
+
return;
|
|
366
|
+
case 'component': {
|
|
367
|
+
for (const attribute of node.attributes) this.attribute(attribute, scope);
|
|
368
|
+
const inner = scope.child();
|
|
369
|
+
this.map.set(node.body, inner);
|
|
370
|
+
this.#nodes(node.body, inner);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
case 'branch':
|
|
374
|
+
for (const arm of node.arms) {
|
|
375
|
+
this.expression(arm.test, scope);
|
|
376
|
+
this.fragment(arm.body, scope, false);
|
|
377
|
+
}
|
|
378
|
+
if (node.fallback) this.fragment(node.fallback, scope, false);
|
|
379
|
+
return;
|
|
380
|
+
case 'keyed-list':
|
|
381
|
+
case 'unkeyed-list':
|
|
382
|
+
this.#list(node, scope);
|
|
383
|
+
return;
|
|
384
|
+
case 'keyed-block':
|
|
385
|
+
this.expression(node.key, scope);
|
|
386
|
+
this.fragment(node.body, scope, false);
|
|
387
|
+
return;
|
|
388
|
+
case 'async-block':
|
|
389
|
+
this.expression(node.promise, scope);
|
|
390
|
+
if (node.pending) this.fragment(node.pending, scope, false);
|
|
391
|
+
if (node.resolved) this.#outcome(node.resolved, scope);
|
|
392
|
+
if (node.rejected) this.#outcome(node.rejected, scope);
|
|
393
|
+
return;
|
|
394
|
+
case 'snippet':
|
|
395
|
+
this.#snippet(node, scope);
|
|
396
|
+
return;
|
|
397
|
+
case 'render':
|
|
398
|
+
this.expression(node.call, scope);
|
|
399
|
+
return;
|
|
400
|
+
case 'constant':
|
|
401
|
+
this.declarator(node.declarator, scope, 'const', true);
|
|
402
|
+
this.#within(node.declarator, () => {
|
|
403
|
+
this.expression(node.declarator.id, scope);
|
|
404
|
+
if (node.declarator.init) this.expression(node.declarator.init, scope);
|
|
405
|
+
});
|
|
406
|
+
return;
|
|
407
|
+
case 'declaration':
|
|
408
|
+
this.expression(node.declaration, scope);
|
|
409
|
+
return;
|
|
410
|
+
case 'debug':
|
|
411
|
+
for (const identifier of node.identifiers) this.expression(identifier, scope);
|
|
412
|
+
return;
|
|
413
|
+
case 'title':
|
|
414
|
+
for (const part of node.parts) {
|
|
415
|
+
if (part.kind === 'expression')
|
|
416
|
+
this.#within(part, () => this.expression(part.expression, scope));
|
|
417
|
+
}
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
finish(): void {
|
|
424
|
+
for (const [scope, reference] of this.#references) scope.reference(reference);
|
|
425
|
+
for (const [scope, node] of this.#updates) {
|
|
426
|
+
for (const leaf of leaves(node)) {
|
|
427
|
+
const left = base(leaf);
|
|
428
|
+
const binding: Binding | null = left === null ? null : scope.get(left.name);
|
|
429
|
+
if (binding === null || left === binding.node) continue;
|
|
430
|
+
if (left === leaf) binding.reassigned = true;
|
|
431
|
+
else binding.mutated = true;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function collectRest(pattern: ES.Node, inside: boolean, into: Set<ES.Identifier>): void {
|
|
438
|
+
switch (pattern.type) {
|
|
439
|
+
case 'Identifier':
|
|
440
|
+
if (inside) into.add(pattern);
|
|
441
|
+
return;
|
|
442
|
+
case 'ObjectPattern':
|
|
443
|
+
for (const property of pattern.properties) {
|
|
444
|
+
collectRest(property.type === 'RestElement' ? property : property.value, inside, into);
|
|
445
|
+
}
|
|
446
|
+
return;
|
|
447
|
+
case 'ArrayPattern':
|
|
448
|
+
for (const element of pattern.elements)
|
|
449
|
+
if (element !== null) collectRest(element, inside, into);
|
|
450
|
+
return;
|
|
451
|
+
case 'RestElement':
|
|
452
|
+
collectRest(pattern.argument, true, into);
|
|
453
|
+
return;
|
|
454
|
+
case 'AssignmentPattern':
|
|
455
|
+
collectRest(pattern.left, inside, into);
|
|
456
|
+
return;
|
|
457
|
+
default:
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
}
|