vigla 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler/analysis/asynchronous.d.ts +18 -0
- package/dist/compiler/analysis/asynchronous.d.ts.map +1 -0
- package/dist/compiler/analysis/asynchronous.js +195 -0
- package/dist/compiler/analysis/asynchronous.js.map +1 -0
- package/dist/compiler/analysis/classes.d.ts +13 -0
- package/dist/compiler/analysis/classes.d.ts.map +1 -0
- package/dist/compiler/analysis/classes.js +96 -0
- package/dist/compiler/analysis/classes.js.map +1 -0
- package/dist/compiler/analysis/ignoring.d.ts +5 -0
- package/dist/compiler/analysis/ignoring.d.ts.map +1 -0
- package/dist/compiler/analysis/ignoring.js +23 -0
- package/dist/compiler/analysis/ignoring.js.map +1 -0
- package/dist/compiler/analysis/index.d.ts +53 -0
- package/dist/compiler/analysis/index.d.ts.map +1 -0
- package/dist/compiler/analysis/index.js +334 -0
- package/dist/compiler/analysis/index.js.map +1 -0
- package/dist/compiler/analysis/scope.d.ts +59 -0
- package/dist/compiler/analysis/scope.d.ts.map +1 -0
- package/dist/compiler/analysis/scope.js +360 -0
- package/dist/compiler/analysis/scope.js.map +1 -0
- package/dist/compiler/analysis/template.d.ts +40 -0
- package/dist/compiler/analysis/template.d.ts.map +1 -0
- package/dist/compiler/analysis/template.js +504 -0
- package/dist/compiler/analysis/template.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/attributes.d.ts +12 -0
- package/dist/compiler/analysis/validate/a11y/attributes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/attributes.js +197 -0
- package/dist/compiler/analysis/validate/a11y/attributes.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/axobject-query.d.ts +20 -0
- package/dist/compiler/analysis/validate/a11y/elements.d.ts +3 -0
- package/dist/compiler/analysis/validate/a11y/elements.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/elements.js +220 -0
- package/dist/compiler/analysis/validate/a11y/elements.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/facts.d.ts +23 -0
- package/dist/compiler/analysis/validate/a11y/facts.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/facts.js +91 -0
- package/dist/compiler/analysis/validate/a11y/facts.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.d.ts +2 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.js +112 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/index.d.ts +8 -0
- package/dist/compiler/analysis/validate/a11y/index.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/index.js +13 -0
- package/dist/compiler/analysis/validate/a11y/index.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/interactions.d.ts +3 -0
- package/dist/compiler/analysis/validate/a11y/interactions.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/interactions.js +99 -0
- package/dist/compiler/analysis/validate/a11y/interactions.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/roles.d.ts +16 -0
- package/dist/compiler/analysis/validate/a11y/roles.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/roles.js +135 -0
- package/dist/compiler/analysis/validate/a11y/roles.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/tables.d.ts +22 -0
- package/dist/compiler/analysis/validate/a11y/tables.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/tables.js +227 -0
- package/dist/compiler/analysis/validate/a11y/tables.js.map +1 -0
- package/dist/compiler/analysis/validate/assignment.d.ts +5 -0
- package/dist/compiler/analysis/validate/assignment.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/assignment.js +64 -0
- package/dist/compiler/analysis/validate/assignment.js.map +1 -0
- package/dist/compiler/analysis/validate/bindings.d.ts +6 -0
- package/dist/compiler/analysis/validate/bindings.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/bindings.js +196 -0
- package/dist/compiler/analysis/validate/bindings.js.map +1 -0
- package/dist/compiler/analysis/validate/classes.d.ts +6 -0
- package/dist/compiler/analysis/validate/classes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/classes.js +100 -0
- package/dist/compiler/analysis/validate/classes.js.map +1 -0
- package/dist/compiler/analysis/validate/context.d.ts +47 -0
- package/dist/compiler/analysis/validate/context.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/context.js +84 -0
- package/dist/compiler/analysis/validate/context.js.map +1 -0
- package/dist/compiler/analysis/validate/element.d.ts +10 -0
- package/dist/compiler/analysis/validate/element.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/element.js +147 -0
- package/dist/compiler/analysis/validate/element.js.map +1 -0
- package/dist/compiler/analysis/validate/front.d.ts +18 -0
- package/dist/compiler/analysis/validate/front.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/front.js +65 -0
- package/dist/compiler/analysis/validate/front.js.map +1 -0
- package/dist/compiler/analysis/validate/index.d.ts +19 -0
- package/dist/compiler/analysis/validate/index.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/index.js +237 -0
- package/dist/compiler/analysis/validate/index.js.map +1 -0
- package/dist/compiler/analysis/validate/messages.d.ts +3 -0
- package/dist/compiler/analysis/validate/messages.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/messages.js +451 -0
- package/dist/compiler/analysis/validate/messages.js.map +1 -0
- package/dist/compiler/analysis/validate/report.d.ts +29 -0
- package/dist/compiler/analysis/validate/report.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/report.js +79 -0
- package/dist/compiler/analysis/validate/report.js.map +1 -0
- package/dist/compiler/analysis/validate/scope.d.ts +46 -0
- package/dist/compiler/analysis/validate/scope.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/scope.js +187 -0
- package/dist/compiler/analysis/validate/scope.js.map +1 -0
- package/dist/compiler/analysis/validate/scopes.d.ts +23 -0
- package/dist/compiler/analysis/validate/scopes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/scopes.js +436 -0
- package/dist/compiler/analysis/validate/scopes.js.map +1 -0
- package/dist/compiler/analysis/validate/script.d.ts +5 -0
- package/dist/compiler/analysis/validate/script.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/script.js +502 -0
- package/dist/compiler/analysis/validate/script.js.map +1 -0
- package/dist/compiler/analysis/validate/template.d.ts +13 -0
- package/dist/compiler/analysis/validate/template.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/template.js +316 -0
- package/dist/compiler/analysis/validate/template.js.map +1 -0
- package/dist/compiler/analysis/whitespace.d.ts +8 -0
- package/dist/compiler/analysis/whitespace.d.ts.map +1 -0
- package/dist/compiler/analysis/whitespace.js +71 -0
- package/dist/compiler/analysis/whitespace.js.map +1 -0
- package/dist/compiler/client/asynchronous.d.ts +9 -0
- package/dist/compiler/client/asynchronous.d.ts.map +1 -0
- package/dist/compiler/client/asynchronous.js +38 -0
- package/dist/compiler/client/asynchronous.js.map +1 -0
- package/dist/compiler/client/bindings.d.ts +16 -0
- package/dist/compiler/client/bindings.d.ts.map +1 -0
- package/dist/compiler/client/bindings.js +200 -0
- package/dist/compiler/client/bindings.js.map +1 -0
- package/dist/compiler/client/blocks.d.ts +9 -0
- package/dist/compiler/client/blocks.d.ts.map +1 -0
- package/dist/compiler/client/blocks.js +147 -0
- package/dist/compiler/client/blocks.js.map +1 -0
- package/dist/compiler/client/classes.d.ts +9 -0
- package/dist/compiler/client/classes.d.ts.map +1 -0
- package/dist/compiler/client/classes.js +104 -0
- package/dist/compiler/client/classes.js.map +1 -0
- package/dist/compiler/client/component.d.ts +12 -0
- package/dist/compiler/client/component.d.ts.map +1 -0
- package/dist/compiler/client/component.js +412 -0
- package/dist/compiler/client/component.js.map +1 -0
- package/dist/compiler/client/constants.d.ts +5 -0
- package/dist/compiler/client/constants.d.ts.map +1 -0
- package/dist/compiler/client/constants.js +103 -0
- package/dist/compiler/client/constants.js.map +1 -0
- package/dist/compiler/client/custom-element.d.ts +7 -0
- package/dist/compiler/client/custom-element.d.ts.map +1 -0
- package/dist/compiler/client/custom-element.js +124 -0
- package/dist/compiler/client/custom-element.js.map +1 -0
- package/dist/compiler/client/directives.d.ts +6 -0
- package/dist/compiler/client/directives.d.ts.map +1 -0
- package/dist/compiler/client/directives.js +22 -0
- package/dist/compiler/client/directives.js.map +1 -0
- package/dist/compiler/client/dynamic.d.ts +5 -0
- package/dist/compiler/client/dynamic.d.ts.map +1 -0
- package/dist/compiler/client/dynamic.js +79 -0
- package/dist/compiler/client/dynamic.js.map +1 -0
- package/dist/compiler/client/element.d.ts +6 -0
- package/dist/compiler/client/element.d.ts.map +1 -0
- package/dist/compiler/client/element.js +492 -0
- package/dist/compiler/client/element.js.map +1 -0
- package/dist/compiler/client/events.d.ts +8 -0
- package/dist/compiler/client/events.d.ts.map +1 -0
- package/dist/compiler/client/events.js +116 -0
- package/dist/compiler/client/events.js.map +1 -0
- package/dist/compiler/client/exports.d.ts +9 -0
- package/dist/compiler/client/exports.d.ts.map +1 -0
- package/dist/compiler/client/exports.js +22 -0
- package/dist/compiler/client/exports.js.map +1 -0
- package/dist/compiler/client/external.d.ts +6 -0
- package/dist/compiler/client/external.d.ts.map +1 -0
- package/dist/compiler/client/external.js +133 -0
- package/dist/compiler/client/external.js.map +1 -0
- package/dist/compiler/client/hot.d.ts +3 -0
- package/dist/compiler/client/hot.d.ts.map +1 -0
- package/dist/compiler/client/hot.js +54 -0
- package/dist/compiler/client/hot.js.map +1 -0
- package/dist/compiler/client/index.d.ts +26 -0
- package/dist/compiler/client/index.d.ts.map +1 -0
- package/dist/compiler/client/index.js +241 -0
- package/dist/compiler/client/index.js.map +1 -0
- package/dist/compiler/client/inspect.d.ts +11 -0
- package/dist/compiler/client/inspect.d.ts.map +1 -0
- package/dist/compiler/client/inspect.js +127 -0
- package/dist/compiler/client/inspect.js.map +1 -0
- package/dist/compiler/client/loss.d.ts +14 -0
- package/dist/compiler/client/loss.d.ts.map +1 -0
- package/dist/compiler/client/loss.js +39 -0
- package/dist/compiler/client/loss.js.map +1 -0
- package/dist/compiler/client/markup.d.ts +24 -0
- package/dist/compiler/client/markup.d.ts.map +1 -0
- package/dist/compiler/client/markup.js +82 -0
- package/dist/compiler/client/markup.js.map +1 -0
- package/dist/compiler/client/meta.d.ts +11 -0
- package/dist/compiler/client/meta.d.ts.map +1 -0
- package/dist/compiler/client/meta.js +43 -0
- package/dist/compiler/client/meta.js.map +1 -0
- package/dist/compiler/client/ownership.d.ts +12 -0
- package/dist/compiler/client/ownership.d.ts.map +1 -0
- package/dist/compiler/client/ownership.js +39 -0
- package/dist/compiler/client/ownership.js.map +1 -0
- package/dist/compiler/client/parameters.d.ts +7 -0
- package/dist/compiler/client/parameters.d.ts.map +1 -0
- package/dist/compiler/client/parameters.js +31 -0
- package/dist/compiler/client/parameters.js.map +1 -0
- package/dist/compiler/client/patterns.d.ts +17 -0
- package/dist/compiler/client/patterns.d.ts.map +1 -0
- package/dist/compiler/client/patterns.js +118 -0
- package/dist/compiler/client/patterns.js.map +1 -0
- package/dist/compiler/client/script.d.ts +42 -0
- package/dist/compiler/client/script.d.ts.map +1 -0
- package/dist/compiler/client/script.js +476 -0
- package/dist/compiler/client/script.js.map +1 -0
- package/dist/compiler/client/special.d.ts +7 -0
- package/dist/compiler/client/special.d.ts.map +1 -0
- package/dist/compiler/client/special.js +148 -0
- package/dist/compiler/client/special.js.map +1 -0
- package/dist/compiler/client/template.d.ts +59 -0
- package/dist/compiler/client/template.d.ts.map +1 -0
- package/dist/compiler/client/template.js +380 -0
- package/dist/compiler/client/template.js.map +1 -0
- package/dist/compiler/client/transitions.d.ts +6 -0
- package/dist/compiler/client/transitions.d.ts.map +1 -0
- package/dist/compiler/client/transitions.js +25 -0
- package/dist/compiler/client/transitions.js.map +1 -0
- package/dist/compiler/client/values.d.ts +8 -0
- package/dist/compiler/client/values.d.ts.map +1 -0
- package/dist/compiler/client/values.js +46 -0
- package/dist/compiler/client/values.js.map +1 -0
- package/dist/compiler/css/analyze.d.ts +12 -0
- package/dist/compiler/css/analyze.d.ts.map +1 -0
- package/dist/compiler/css/analyze.js +252 -0
- package/dist/compiler/css/analyze.js.map +1 -0
- package/dist/compiler/css/attributes.d.ts +3 -0
- package/dist/compiler/css/attributes.d.ts.map +1 -0
- package/dist/compiler/css/attributes.js +207 -0
- package/dist/compiler/css/attributes.js.map +1 -0
- package/dist/compiler/css/hash.d.ts +2 -0
- package/dist/compiler/css/hash.d.ts.map +1 -0
- package/dist/compiler/css/hash.js +2 -0
- package/dist/compiler/css/hash.js.map +1 -0
- package/dist/compiler/css/index.d.ts +42 -0
- package/dist/compiler/css/index.d.ts.map +1 -0
- package/dist/compiler/css/index.js +109 -0
- package/dist/compiler/css/index.js.map +1 -0
- package/dist/compiler/css/marks.d.ts +39 -0
- package/dist/compiler/css/marks.d.ts.map +1 -0
- package/dist/compiler/css/marks.js +90 -0
- package/dist/compiler/css/marks.js.map +1 -0
- package/dist/compiler/css/prune.d.ts +10 -0
- package/dist/compiler/css/prune.d.ts.map +1 -0
- package/dist/compiler/css/prune.js +418 -0
- package/dist/compiler/css/prune.js.map +1 -0
- package/dist/compiler/css/relations.d.ts +25 -0
- package/dist/compiler/css/relations.d.ts.map +1 -0
- package/dist/compiler/css/relations.js +262 -0
- package/dist/compiler/css/relations.js.map +1 -0
- package/dist/compiler/css/render.d.ts +22 -0
- package/dist/compiler/css/render.d.ts.map +1 -0
- package/dist/compiler/css/render.js +389 -0
- package/dist/compiler/css/render.js.map +1 -0
- package/dist/compiler/css/template.d.ts +26 -0
- package/dist/compiler/css/template.d.ts.map +1 -0
- package/dist/compiler/css/template.js +271 -0
- package/dist/compiler/css/template.js.map +1 -0
- package/dist/compiler/ir/estree.d.ts +29 -0
- package/dist/compiler/ir/estree.d.ts.map +1 -0
- package/dist/compiler/ir/estree.js +205 -0
- package/dist/compiler/ir/estree.js.map +1 -0
- package/dist/compiler/ir/maps.d.ts +11 -0
- package/dist/compiler/ir/maps.d.ts.map +1 -0
- package/dist/compiler/ir/maps.js +45 -0
- package/dist/compiler/ir/maps.js.map +1 -0
- package/dist/compiler/ir/nodes.d.ts +197 -0
- package/dist/compiler/ir/nodes.d.ts.map +1 -0
- package/dist/compiler/ir/nodes.js +1 -0
- package/dist/compiler/ir/nodes.js.map +1 -0
- package/dist/compiler/ir/port.d.ts +55 -0
- package/dist/compiler/ir/port.d.ts.map +1 -0
- package/dist/compiler/ir/port.js +9 -0
- package/dist/compiler/ir/port.js.map +1 -0
- package/dist/compiler/ir/runtime.d.ts +16 -0
- package/dist/compiler/ir/runtime.d.ts.map +1 -0
- package/dist/compiler/ir/runtime.js +1 -0
- package/dist/compiler/ir/runtime.js.map +1 -0
- package/dist/compiler/ir/script.d.ts +6 -0
- package/dist/compiler/ir/script.d.ts.map +1 -0
- package/dist/compiler/ir/script.js +33 -0
- package/dist/compiler/ir/script.js.map +1 -0
- package/dist/compiler/ir/style.d.ts +92 -0
- package/dist/compiler/ir/style.d.ts.map +1 -0
- package/dist/compiler/ir/style.js +1 -0
- package/dist/compiler/ir/style.js.map +1 -0
- package/dist/compiler/server/asynchronous.d.ts +8 -0
- package/dist/compiler/server/asynchronous.d.ts.map +1 -0
- package/dist/compiler/server/asynchronous.js +44 -0
- package/dist/compiler/server/asynchronous.js.map +1 -0
- package/dist/compiler/server/bindings.d.ts +15 -0
- package/dist/compiler/server/bindings.d.ts.map +1 -0
- package/dist/compiler/server/bindings.js +80 -0
- package/dist/compiler/server/bindings.js.map +1 -0
- package/dist/compiler/server/blocks.d.ts +7 -0
- package/dist/compiler/server/blocks.d.ts.map +1 -0
- package/dist/compiler/server/blocks.js +136 -0
- package/dist/compiler/server/blocks.js.map +1 -0
- package/dist/compiler/server/classes.d.ts +11 -0
- package/dist/compiler/server/classes.d.ts.map +1 -0
- package/dist/compiler/server/classes.js +100 -0
- package/dist/compiler/server/classes.js.map +1 -0
- package/dist/compiler/server/component.d.ts +11 -0
- package/dist/compiler/server/component.d.ts.map +1 -0
- package/dist/compiler/server/component.js +321 -0
- package/dist/compiler/server/component.js.map +1 -0
- package/dist/compiler/server/external.d.ts +6 -0
- package/dist/compiler/server/external.d.ts.map +1 -0
- package/dist/compiler/server/external.js +130 -0
- package/dist/compiler/server/external.js.map +1 -0
- package/dist/compiler/server/index.d.ts +20 -0
- package/dist/compiler/server/index.d.ts.map +1 -0
- package/dist/compiler/server/index.js +161 -0
- package/dist/compiler/server/index.js.map +1 -0
- package/dist/compiler/server/placement.d.ts +5 -0
- package/dist/compiler/server/placement.d.ts.map +1 -0
- package/dist/compiler/server/placement.js +37 -0
- package/dist/compiler/server/placement.js.map +1 -0
- package/dist/compiler/server/script.d.ts +29 -0
- package/dist/compiler/server/script.d.ts.map +1 -0
- package/dist/compiler/server/script.js +404 -0
- package/dist/compiler/server/script.js.map +1 -0
- package/dist/compiler/server/slot.d.ts +5 -0
- package/dist/compiler/server/slot.d.ts.map +1 -0
- package/dist/compiler/server/slot.js +38 -0
- package/dist/compiler/server/slot.js.map +1 -0
- package/dist/compiler/server/special.d.ts +5 -0
- package/dist/compiler/server/special.d.ts.map +1 -0
- package/dist/compiler/server/special.js +60 -0
- package/dist/compiler/server/special.js.map +1 -0
- package/dist/compiler/server/template.d.ts +28 -0
- package/dist/compiler/server/template.d.ts.map +1 -0
- package/dist/compiler/server/template.js +475 -0
- package/dist/compiler/server/template.js.map +1 -0
- package/dist/entries/action.d.ts +9 -0
- package/dist/entries/action.d.ts.map +1 -0
- package/dist/entries/action.js +1 -0
- package/dist/entries/action.js.map +1 -0
- package/dist/entries/animate.d.ts +4 -0
- package/dist/entries/animate.d.ts.map +1 -0
- package/dist/entries/animate.js +2 -0
- package/dist/entries/animate.js.map +1 -0
- package/dist/entries/attachments.d.ts +6 -0
- package/dist/entries/attachments.d.ts.map +1 -0
- package/dist/entries/attachments.js +23 -0
- package/dist/entries/attachments.js.map +1 -0
- package/dist/entries/compiler.d.ts +61 -0
- package/dist/entries/compiler.d.ts.map +1 -0
- package/dist/entries/compiler.js +97 -0
- package/dist/entries/compiler.js.map +1 -0
- package/dist/entries/easing.d.ts +2 -0
- package/dist/entries/easing.d.ts.map +1 -0
- package/dist/entries/easing.js +2 -0
- package/dist/entries/easing.js.map +1 -0
- package/dist/entries/events.d.ts +2 -0
- package/dist/entries/events.d.ts.map +1 -0
- package/dist/entries/events.js +5 -0
- package/dist/entries/events.js.map +1 -0
- package/dist/entries/index-server.d.ts +37 -0
- package/dist/entries/index-server.d.ts.map +1 -0
- package/dist/entries/index-server.js +62 -0
- package/dist/entries/index-server.js.map +1 -0
- package/dist/entries/index.d.ts +29 -0
- package/dist/entries/index.d.ts.map +1 -0
- package/dist/entries/index.js +19 -0
- package/dist/entries/index.js.map +1 -0
- package/dist/entries/internal/client.d.ts +54 -0
- package/dist/entries/internal/client.d.ts.map +1 -0
- package/dist/entries/internal/client.js +50 -0
- package/dist/entries/internal/client.js.map +1 -0
- package/dist/entries/internal/server.d.ts +18 -0
- package/dist/entries/internal/server.d.ts.map +1 -0
- package/dist/entries/internal/server.js +16 -0
- package/dist/entries/internal/server.js.map +1 -0
- package/dist/entries/motion-server.d.ts +6 -0
- package/dist/entries/motion-server.d.ts.map +1 -0
- package/dist/entries/motion-server.js +4 -0
- package/dist/entries/motion-server.js.map +1 -0
- package/dist/entries/motion.d.ts +6 -0
- package/dist/entries/motion.d.ts.map +1 -0
- package/dist/entries/motion.js +4 -0
- package/dist/entries/motion.js.map +1 -0
- package/dist/entries/reactivity-server.d.ts +17 -0
- package/dist/entries/reactivity-server.d.ts.map +1 -0
- package/dist/entries/reactivity-server.js +7 -0
- package/dist/entries/reactivity-server.js.map +1 -0
- package/dist/entries/reactivity.d.ts +8 -0
- package/dist/entries/reactivity.d.ts.map +1 -0
- package/dist/entries/reactivity.js +8 -0
- package/dist/entries/reactivity.js.map +1 -0
- package/dist/entries/server.d.ts +5 -0
- package/dist/entries/server.d.ts.map +1 -0
- package/dist/entries/server.js +2 -0
- package/dist/entries/server.js.map +1 -0
- package/dist/entries/transition.d.ts +5 -0
- package/dist/entries/transition.d.ts.map +1 -0
- package/dist/entries/transition.js +2 -0
- package/dist/entries/transition.js.map +1 -0
- package/dist/entries/window-server.d.ts +2 -0
- package/dist/entries/window-server.d.ts.map +1 -0
- package/dist/entries/window-server.js +2 -0
- package/dist/entries/window-server.js.map +1 -0
- package/dist/entries/window.d.ts +2 -0
- package/dist/entries/window.d.ts.map +1 -0
- package/dist/entries/window.js +2 -0
- package/dist/entries/window.js.map +1 -0
- package/dist/runtime/classes/date.d.ts +5 -0
- package/dist/runtime/classes/date.d.ts.map +1 -0
- package/dist/runtime/classes/date.js +58 -0
- package/dist/runtime/classes/date.js.map +1 -0
- package/dist/runtime/classes/frames.d.ts +6 -0
- package/dist/runtime/classes/frames.d.ts.map +1 -0
- package/dist/runtime/classes/frames.js +28 -0
- package/dist/runtime/classes/frames.js.map +1 -0
- package/dist/runtime/classes/local.d.ts +3 -0
- package/dist/runtime/classes/local.d.ts.map +1 -0
- package/dist/runtime/classes/local.js +6 -0
- package/dist/runtime/classes/local.js.map +1 -0
- package/dist/runtime/classes/map.d.ts +18 -0
- package/dist/runtime/classes/map.d.ts.map +1 -0
- package/dist/runtime/classes/map.js +126 -0
- package/dist/runtime/classes/map.js.map +1 -0
- package/dist/runtime/classes/media.d.ts +6 -0
- package/dist/runtime/classes/media.d.ts.map +1 -0
- package/dist/runtime/classes/media.js +22 -0
- package/dist/runtime/classes/media.js.map +1 -0
- package/dist/runtime/classes/motion.d.ts +3 -0
- package/dist/runtime/classes/motion.d.ts.map +1 -0
- package/dist/runtime/classes/motion.js +3 -0
- package/dist/runtime/classes/motion.js.map +1 -0
- package/dist/runtime/classes/search.d.ts +23 -0
- package/dist/runtime/classes/search.d.ts.map +1 -0
- package/dist/runtime/classes/search.js +115 -0
- package/dist/runtime/classes/search.js.map +1 -0
- package/dist/runtime/classes/server.d.ts +8 -0
- package/dist/runtime/classes/server.d.ts.map +1 -0
- package/dist/runtime/classes/server.js +13 -0
- package/dist/runtime/classes/server.js.map +1 -0
- package/dist/runtime/classes/set.d.ts +28 -0
- package/dist/runtime/classes/set.d.ts.map +1 -0
- package/dist/runtime/classes/set.js +113 -0
- package/dist/runtime/classes/set.js.map +1 -0
- package/dist/runtime/classes/spring.d.ts +25 -0
- package/dist/runtime/classes/spring.d.ts.map +1 -0
- package/dist/runtime/classes/spring.js +154 -0
- package/dist/runtime/classes/spring.js.map +1 -0
- package/dist/runtime/classes/subscriber.d.ts +10 -0
- package/dist/runtime/classes/subscriber.d.ts.map +1 -0
- package/dist/runtime/classes/subscriber.js +46 -0
- package/dist/runtime/classes/subscriber.js.map +1 -0
- package/dist/runtime/classes/tween.d.ts +17 -0
- package/dist/runtime/classes/tween.d.ts.map +1 -0
- package/dist/runtime/classes/tween.js +112 -0
- package/dist/runtime/classes/tween.js.map +1 -0
- package/dist/runtime/classes/url.d.ts +30 -0
- package/dist/runtime/classes/url.d.ts.map +1 -0
- package/dist/runtime/classes/url.js +127 -0
- package/dist/runtime/classes/url.js.map +1 -0
- package/dist/runtime/classes/window-server.d.ts +14 -0
- package/dist/runtime/classes/window-server.d.ts.map +1 -0
- package/dist/runtime/classes/window-server.js +14 -0
- package/dist/runtime/classes/window-server.js.map +1 -0
- package/dist/runtime/classes/window.d.ts +18 -0
- package/dist/runtime/classes/window.d.ts.map +1 -0
- package/dist/runtime/classes/window.js +54 -0
- package/dist/runtime/classes/window.js.map +1 -0
- package/dist/runtime/dom/async.d.ts +21 -0
- package/dist/runtime/dom/async.d.ts.map +1 -0
- package/dist/runtime/dom/async.js +179 -0
- package/dist/runtime/dom/async.js.map +1 -0
- package/dist/runtime/dom/attachments.d.ts +18 -0
- package/dist/runtime/dom/attachments.d.ts.map +1 -0
- package/dist/runtime/dom/attachments.js +134 -0
- package/dist/runtime/dom/attachments.js.map +1 -0
- package/dist/runtime/dom/attributes.d.ts +21 -0
- package/dist/runtime/dom/attributes.d.ts.map +1 -0
- package/dist/runtime/dom/attributes.js +450 -0
- package/dist/runtime/dom/attributes.js.map +1 -0
- package/dist/runtime/dom/await.d.ts +5 -0
- package/dist/runtime/dom/await.d.ts.map +1 -0
- package/dist/runtime/dom/await.js +95 -0
- package/dist/runtime/dom/await.js.map +1 -0
- package/dist/runtime/dom/bindings.d.ts +21 -0
- package/dist/runtime/dom/bindings.d.ts.map +1 -0
- package/dist/runtime/dom/bindings.js +299 -0
- package/dist/runtime/dom/bindings.js.map +1 -0
- package/dist/runtime/dom/blocks.d.ts +4 -0
- package/dist/runtime/dom/blocks.d.ts.map +1 -0
- package/dist/runtime/dom/blocks.js +32 -0
- package/dist/runtime/dom/blocks.js.map +1 -0
- package/dist/runtime/dom/boundary.d.ts +14 -0
- package/dist/runtime/dom/boundary.d.ts.map +1 -0
- package/dist/runtime/dom/boundary.js +313 -0
- package/dist/runtime/dom/boundary.js.map +1 -0
- package/dist/runtime/dom/branches.d.ts +14 -0
- package/dist/runtime/dom/branches.d.ts.map +1 -0
- package/dist/runtime/dom/branches.js +210 -0
- package/dist/runtime/dom/branches.js.map +1 -0
- package/dist/runtime/dom/context.d.ts +9 -0
- package/dist/runtime/dom/context.d.ts.map +1 -0
- package/dist/runtime/dom/context.js +78 -0
- package/dist/runtime/dom/context.js.map +1 -0
- package/dist/runtime/dom/custom-element.d.ts +16 -0
- package/dist/runtime/dom/custom-element.d.ts.map +1 -0
- package/dist/runtime/dom/custom-element.js +198 -0
- package/dist/runtime/dom/custom-element.js.map +1 -0
- package/dist/runtime/dom/data.d.ts +11 -0
- package/dist/runtime/dom/data.d.ts.map +1 -0
- package/dist/runtime/dom/data.js +114 -0
- package/dist/runtime/dom/data.js.map +1 -0
- package/dist/runtime/dom/element.d.ts +3 -0
- package/dist/runtime/dom/element.d.ts.map +1 -0
- package/dist/runtime/dom/element.js +81 -0
- package/dist/runtime/dom/element.js.map +1 -0
- package/dist/runtime/dom/events.d.ts +9 -0
- package/dist/runtime/dom/events.d.ts.map +1 -0
- package/dist/runtime/dom/events.js +211 -0
- package/dist/runtime/dom/events.js.map +1 -0
- package/dist/runtime/dom/head.d.ts +4 -0
- package/dist/runtime/dom/head.d.ts.map +1 -0
- package/dist/runtime/dom/head.js +54 -0
- package/dist/runtime/dom/head.js.map +1 -0
- package/dist/runtime/dom/hot.d.ts +15 -0
- package/dist/runtime/dom/hot.d.ts.map +1 -0
- package/dist/runtime/dom/hot.js +38 -0
- package/dist/runtime/dom/hot.js.map +1 -0
- package/dist/runtime/dom/html.d.ts +7 -0
- package/dist/runtime/dom/html.d.ts.map +1 -0
- package/dist/runtime/dom/html.js +91 -0
- package/dist/runtime/dom/html.js.map +1 -0
- package/dist/runtime/dom/hydration.d.ts +16 -0
- package/dist/runtime/dom/hydration.d.ts.map +1 -0
- package/dist/runtime/dom/hydration.js +92 -0
- package/dist/runtime/dom/hydration.js.map +1 -0
- package/dist/runtime/dom/inspect.d.ts +2 -0
- package/dist/runtime/dom/inspect.d.ts.map +1 -0
- package/dist/runtime/dom/inspect.js +71 -0
- package/dist/runtime/dom/inspect.js.map +1 -0
- package/dist/runtime/dom/list.d.ts +7 -0
- package/dist/runtime/dom/list.d.ts.map +1 -0
- package/dist/runtime/dom/list.js +388 -0
- package/dist/runtime/dom/list.js.map +1 -0
- package/dist/runtime/dom/media.d.ts +26 -0
- package/dist/runtime/dom/media.d.ts.map +1 -0
- package/dist/runtime/dom/media.js +126 -0
- package/dist/runtime/dom/media.js.map +1 -0
- package/dist/runtime/dom/meta.d.ts +16 -0
- package/dist/runtime/dom/meta.d.ts.map +1 -0
- package/dist/runtime/dom/meta.js +48 -0
- package/dist/runtime/dom/meta.js.map +1 -0
- package/dist/runtime/dom/mount.d.ts +23 -0
- package/dist/runtime/dom/mount.d.ts.map +1 -0
- package/dist/runtime/dom/mount.js +134 -0
- package/dist/runtime/dom/mount.js.map +1 -0
- package/dist/runtime/dom/ownership.d.ts +6 -0
- package/dist/runtime/dom/ownership.d.ts.map +1 -0
- package/dist/runtime/dom/ownership.js +32 -0
- package/dist/runtime/dom/ownership.js.map +1 -0
- package/dist/runtime/dom/props.d.ts +20 -0
- package/dist/runtime/dom/props.d.ts.map +1 -0
- package/dist/runtime/dom/props.js +193 -0
- package/dist/runtime/dom/props.js.map +1 -0
- package/dist/runtime/dom/range.d.ts +16 -0
- package/dist/runtime/dom/range.d.ts.map +1 -0
- package/dist/runtime/dom/range.js +120 -0
- package/dist/runtime/dom/range.js.map +1 -0
- package/dist/runtime/dom/reset.d.ts +4 -0
- package/dist/runtime/dom/reset.d.ts.map +1 -0
- package/dist/runtime/dom/reset.js +39 -0
- package/dist/runtime/dom/reset.js.map +1 -0
- package/dist/runtime/dom/select.d.ts +8 -0
- package/dist/runtime/dom/select.d.ts.map +1 -0
- package/dist/runtime/dom/select.js +175 -0
- package/dist/runtime/dom/select.js.map +1 -0
- package/dist/runtime/dom/snippet.d.ts +7 -0
- package/dist/runtime/dom/snippet.d.ts.map +1 -0
- package/dist/runtime/dom/snippet.js +49 -0
- package/dist/runtime/dom/snippet.js.map +1 -0
- package/dist/runtime/dom/styles.d.ts +6 -0
- package/dist/runtime/dom/styles.d.ts.map +1 -0
- package/dist/runtime/dom/styles.js +22 -0
- package/dist/runtime/dom/styles.js.map +1 -0
- package/dist/runtime/dom/swap.d.ts +10 -0
- package/dist/runtime/dom/swap.d.ts.map +1 -0
- package/dist/runtime/dom/swap.js +84 -0
- package/dist/runtime/dom/swap.js.map +1 -0
- package/dist/runtime/dom/targets.d.ts +9 -0
- package/dist/runtime/dom/targets.d.ts.map +1 -0
- package/dist/runtime/dom/targets.js +84 -0
- package/dist/runtime/dom/targets.js.map +1 -0
- package/dist/runtime/dom/template.d.ts +19 -0
- package/dist/runtime/dom/template.d.ts.map +1 -0
- package/dist/runtime/dom/template.js +269 -0
- package/dist/runtime/dom/template.js.map +1 -0
- package/dist/runtime/dom/trusted.d.ts +4 -0
- package/dist/runtime/dom/trusted.d.ts.map +1 -0
- package/dist/runtime/dom/trusted.js +47 -0
- package/dist/runtime/dom/trusted.js.map +1 -0
- package/dist/runtime/dom/values.d.ts +4 -0
- package/dist/runtime/dom/values.d.ts.map +1 -0
- package/dist/runtime/dom/values.js +31 -0
- package/dist/runtime/dom/values.js.map +1 -0
- package/dist/runtime/reactivity/abort.d.ts +8 -0
- package/dist/runtime/reactivity/abort.d.ts.map +1 -0
- package/dist/runtime/reactivity/abort.js +50 -0
- package/dist/runtime/reactivity/abort.js.map +1 -0
- package/dist/runtime/reactivity/async.d.ts +13 -0
- package/dist/runtime/reactivity/async.d.ts.map +1 -0
- package/dist/runtime/reactivity/async.js +285 -0
- package/dist/runtime/reactivity/async.js.map +1 -0
- package/dist/runtime/reactivity/batch.d.ts +84 -0
- package/dist/runtime/reactivity/batch.d.ts.map +1 -0
- package/dist/runtime/reactivity/batch.js +359 -0
- package/dist/runtime/reactivity/batch.js.map +1 -0
- package/dist/runtime/reactivity/carried.d.ts +15 -0
- package/dist/runtime/reactivity/carried.d.ts.map +1 -0
- package/dist/runtime/reactivity/carried.js +49 -0
- package/dist/runtime/reactivity/carried.js.map +1 -0
- package/dist/runtime/reactivity/collector.d.ts +4 -0
- package/dist/runtime/reactivity/collector.d.ts.map +1 -0
- package/dist/runtime/reactivity/collector.js +19 -0
- package/dist/runtime/reactivity/collector.js.map +1 -0
- package/dist/runtime/reactivity/drafts.d.ts +25 -0
- package/dist/runtime/reactivity/drafts.d.ts.map +1 -0
- package/dist/runtime/reactivity/drafts.js +125 -0
- package/dist/runtime/reactivity/drafts.js.map +1 -0
- package/dist/runtime/reactivity/eager.d.ts +5 -0
- package/dist/runtime/reactivity/eager.d.ts.map +1 -0
- package/dist/runtime/reactivity/eager.js +45 -0
- package/dist/runtime/reactivity/eager.js.map +1 -0
- package/dist/runtime/reactivity/edges.d.ts +14 -0
- package/dist/runtime/reactivity/edges.d.ts.map +1 -0
- package/dist/runtime/reactivity/edges.js +207 -0
- package/dist/runtime/reactivity/edges.js.map +1 -0
- package/dist/runtime/reactivity/effects.d.ts +41 -0
- package/dist/runtime/reactivity/effects.d.ts.map +1 -0
- package/dist/runtime/reactivity/effects.js +618 -0
- package/dist/runtime/reactivity/effects.js.map +1 -0
- package/dist/runtime/reactivity/errors.d.ts +12 -0
- package/dist/runtime/reactivity/errors.d.ts.map +1 -0
- package/dist/runtime/reactivity/errors.js +38 -0
- package/dist/runtime/reactivity/errors.js.map +1 -0
- package/dist/runtime/reactivity/external.d.ts +3 -0
- package/dist/runtime/reactivity/external.d.ts.map +1 -0
- package/dist/runtime/reactivity/external.js +48 -0
- package/dist/runtime/reactivity/external.js.map +1 -0
- package/dist/runtime/reactivity/fork.d.ts +6 -0
- package/dist/runtime/reactivity/fork.d.ts.map +1 -0
- package/dist/runtime/reactivity/fork.js +64 -0
- package/dist/runtime/reactivity/fork.js.map +1 -0
- package/dist/runtime/reactivity/front.d.ts +5 -0
- package/dist/runtime/reactivity/front.d.ts.map +1 -0
- package/dist/runtime/reactivity/front.js +16 -0
- package/dist/runtime/reactivity/front.js.map +1 -0
- package/dist/runtime/reactivity/graph.d.ts +86 -0
- package/dist/runtime/reactivity/graph.d.ts.map +1 -0
- package/dist/runtime/reactivity/graph.js +38 -0
- package/dist/runtime/reactivity/graph.js.map +1 -0
- package/dist/runtime/reactivity/handlers.d.ts +6 -0
- package/dist/runtime/reactivity/handlers.d.ts.map +1 -0
- package/dist/runtime/reactivity/handlers.js +48 -0
- package/dist/runtime/reactivity/handlers.js.map +1 -0
- package/dist/runtime/reactivity/held.d.ts +12 -0
- package/dist/runtime/reactivity/held.d.ts.map +1 -0
- package/dist/runtime/reactivity/held.js +343 -0
- package/dist/runtime/reactivity/held.js.map +1 -0
- package/dist/runtime/reactivity/history.d.ts +25 -0
- package/dist/runtime/reactivity/history.d.ts.map +1 -0
- package/dist/runtime/reactivity/history.js +88 -0
- package/dist/runtime/reactivity/history.js.map +1 -0
- package/dist/runtime/reactivity/latest.d.ts +2 -0
- package/dist/runtime/reactivity/latest.d.ts.map +1 -0
- package/dist/runtime/reactivity/latest.js +42 -0
- package/dist/runtime/reactivity/latest.js.map +1 -0
- package/dist/runtime/reactivity/leaving.d.ts +30 -0
- package/dist/runtime/reactivity/leaving.d.ts.map +1 -0
- package/dist/runtime/reactivity/leaving.js +278 -0
- package/dist/runtime/reactivity/leaving.js.map +1 -0
- package/dist/runtime/reactivity/loss.d.ts +5 -0
- package/dist/runtime/reactivity/loss.d.ts.map +1 -0
- package/dist/runtime/reactivity/loss.js +70 -0
- package/dist/runtime/reactivity/loss.js.map +1 -0
- package/dist/runtime/reactivity/outgoing.d.ts +11 -0
- package/dist/runtime/reactivity/outgoing.d.ts.map +1 -0
- package/dist/runtime/reactivity/outgoing.js +37 -0
- package/dist/runtime/reactivity/outgoing.js.map +1 -0
- package/dist/runtime/reactivity/owners.d.ts +33 -0
- package/dist/runtime/reactivity/owners.d.ts.map +1 -0
- package/dist/runtime/reactivity/owners.js +215 -0
- package/dist/runtime/reactivity/owners.js.map +1 -0
- package/dist/runtime/reactivity/past.d.ts +9 -0
- package/dist/runtime/reactivity/past.d.ts.map +1 -0
- package/dist/runtime/reactivity/past.js +57 -0
- package/dist/runtime/reactivity/past.js.map +1 -0
- package/dist/runtime/reactivity/provenance.d.ts +34 -0
- package/dist/runtime/reactivity/provenance.d.ts.map +1 -0
- package/dist/runtime/reactivity/provenance.js +163 -0
- package/dist/runtime/reactivity/provenance.js.map +1 -0
- package/dist/runtime/reactivity/proxy.d.ts +6 -0
- package/dist/runtime/reactivity/proxy.d.ts.map +1 -0
- package/dist/runtime/reactivity/proxy.js +219 -0
- package/dist/runtime/reactivity/proxy.js.map +1 -0
- package/dist/runtime/reactivity/public.d.ts +16 -0
- package/dist/runtime/reactivity/public.d.ts.map +1 -0
- package/dist/runtime/reactivity/public.js +28 -0
- package/dist/runtime/reactivity/public.js.map +1 -0
- package/dist/runtime/reactivity/reads.d.ts +7 -0
- package/dist/runtime/reactivity/reads.d.ts.map +1 -0
- package/dist/runtime/reactivity/reads.js +383 -0
- package/dist/runtime/reactivity/reads.js.map +1 -0
- package/dist/runtime/reactivity/scheduler.d.ts +8 -0
- package/dist/runtime/reactivity/scheduler.d.ts.map +1 -0
- package/dist/runtime/reactivity/scheduler.js +406 -0
- package/dist/runtime/reactivity/scheduler.js.map +1 -0
- package/dist/runtime/reactivity/settle.d.ts +6 -0
- package/dist/runtime/reactivity/settle.d.ts.map +1 -0
- package/dist/runtime/reactivity/settle.js +76 -0
- package/dist/runtime/reactivity/settle.js.map +1 -0
- package/dist/runtime/reactivity/sources.d.ts +17 -0
- package/dist/runtime/reactivity/sources.d.ts.map +1 -0
- package/dist/runtime/reactivity/sources.js +124 -0
- package/dist/runtime/reactivity/sources.js.map +1 -0
- package/dist/runtime/reactivity/tallies.d.ts +12 -0
- package/dist/runtime/reactivity/tallies.d.ts.map +1 -0
- package/dist/runtime/reactivity/tallies.js +25 -0
- package/dist/runtime/reactivity/tallies.js.map +1 -0
- package/dist/runtime/reactivity/tasks.d.ts +3 -0
- package/dist/runtime/reactivity/tasks.d.ts.map +1 -0
- package/dist/runtime/reactivity/tasks.js +35 -0
- package/dist/runtime/reactivity/tasks.js.map +1 -0
- package/dist/runtime/reactivity/trace.d.ts +5 -0
- package/dist/runtime/reactivity/trace.d.ts.map +1 -0
- package/dist/runtime/reactivity/trace.js +109 -0
- package/dist/runtime/reactivity/trace.js.map +1 -0
- package/dist/runtime/reactivity/tracking.d.ts +62 -0
- package/dist/runtime/reactivity/tracking.d.ts.map +1 -0
- package/dist/runtime/reactivity/tracking.js +520 -0
- package/dist/runtime/reactivity/tracking.js.map +1 -0
- package/dist/runtime/reactivity/units.d.ts +12 -0
- package/dist/runtime/reactivity/units.d.ts.map +1 -0
- package/dist/runtime/reactivity/units.js +112 -0
- package/dist/runtime/reactivity/units.js.map +1 -0
- package/dist/runtime/reactivity/views.d.ts +12 -0
- package/dist/runtime/reactivity/views.d.ts.map +1 -0
- package/dist/runtime/reactivity/views.js +105 -0
- package/dist/runtime/reactivity/views.js.map +1 -0
- package/dist/runtime/server/attributes.d.ts +9 -0
- package/dist/runtime/server/attributes.d.ts.map +1 -0
- package/dist/runtime/server/attributes.js +73 -0
- package/dist/runtime/server/attributes.js.map +1 -0
- package/dist/runtime/server/cells.d.ts +9 -0
- package/dist/runtime/server/cells.d.ts.map +1 -0
- package/dist/runtime/server/cells.js +120 -0
- package/dist/runtime/server/cells.js.map +1 -0
- package/dist/runtime/server/context.d.ts +51 -0
- package/dist/runtime/server/context.d.ts.map +1 -0
- package/dist/runtime/server/context.js +260 -0
- package/dist/runtime/server/context.js.map +1 -0
- package/dist/runtime/server/derived.d.ts +5 -0
- package/dist/runtime/server/derived.d.ts.map +1 -0
- package/dist/runtime/server/derived.js +30 -0
- package/dist/runtime/server/derived.js.map +1 -0
- package/dist/runtime/server/external.d.ts +3 -0
- package/dist/runtime/server/external.d.ts.map +1 -0
- package/dist/runtime/server/external.js +53 -0
- package/dist/runtime/server/external.js.map +1 -0
- package/dist/runtime/server/hydration.d.ts +26 -0
- package/dist/runtime/server/hydration.d.ts.map +1 -0
- package/dist/runtime/server/hydration.js +187 -0
- package/dist/runtime/server/hydration.js.map +1 -0
- package/dist/runtime/server/placement.d.ts +9 -0
- package/dist/runtime/server/placement.d.ts.map +1 -0
- package/dist/runtime/server/placement.js +35 -0
- package/dist/runtime/server/placement.js.map +1 -0
- package/dist/runtime/server/render.d.ts +89 -0
- package/dist/runtime/server/render.d.ts.map +1 -0
- package/dist/runtime/server/render.js +470 -0
- package/dist/runtime/server/render.js.map +1 -0
- package/dist/runtime/server/snippet.d.ts +7 -0
- package/dist/runtime/server/snippet.d.ts.map +1 -0
- package/dist/runtime/server/snippet.js +15 -0
- package/dist/runtime/server/snippet.js.map +1 -0
- package/dist/runtime/transitions/animate.d.ts +22 -0
- package/dist/runtime/transitions/animate.d.ts.map +1 -0
- package/dist/runtime/transitions/animate.js +140 -0
- package/dist/runtime/transitions/animate.js.map +1 -0
- package/dist/runtime/transitions/easing.d.ts +33 -0
- package/dist/runtime/transitions/easing.d.ts.map +1 -0
- package/dist/runtime/transitions/easing.js +128 -0
- package/dist/runtime/transitions/easing.js.map +1 -0
- package/dist/runtime/transitions/flip.d.ts +12 -0
- package/dist/runtime/transitions/flip.d.ts.map +1 -0
- package/dist/runtime/transitions/flip.js +51 -0
- package/dist/runtime/transitions/flip.js.map +1 -0
- package/dist/runtime/transitions/frame.d.ts +37 -0
- package/dist/runtime/transitions/frame.d.ts.map +1 -0
- package/dist/runtime/transitions/frame.js +219 -0
- package/dist/runtime/transitions/frame.js.map +1 -0
- package/dist/runtime/transitions/layout.d.ts +37 -0
- package/dist/runtime/transitions/layout.d.ts.map +1 -0
- package/dist/runtime/transitions/layout.js +150 -0
- package/dist/runtime/transitions/layout.js.map +1 -0
- package/dist/runtime/transitions/manager.d.ts +30 -0
- package/dist/runtime/transitions/manager.d.ts.map +1 -0
- package/dist/runtime/transitions/manager.js +278 -0
- package/dist/runtime/transitions/manager.js.map +1 -0
- package/dist/runtime/transitions/placement.d.ts +25 -0
- package/dist/runtime/transitions/placement.d.ts.map +1 -0
- package/dist/runtime/transitions/placement.js +135 -0
- package/dist/runtime/transitions/placement.js.map +1 -0
- package/dist/runtime/transitions/presets.d.ts +53 -0
- package/dist/runtime/transitions/presets.d.ts.map +1 -0
- package/dist/runtime/transitions/presets.js +266 -0
- package/dist/runtime/transitions/presets.js.map +1 -0
- package/dist/shared/abort.d.ts +6 -0
- package/dist/shared/abort.d.ts.map +1 -0
- package/dist/shared/abort.js +8 -0
- package/dist/shared/abort.js.map +1 -0
- package/dist/shared/assignment.d.ts +6 -0
- package/dist/shared/assignment.d.ts.map +1 -0
- package/dist/shared/assignment.js +19 -0
- package/dist/shared/assignment.js.map +1 -0
- package/dist/shared/attributes.d.ts +8 -0
- package/dist/shared/attributes.d.ts.map +1 -0
- package/dist/shared/attributes.js +120 -0
- package/dist/shared/attributes.js.map +1 -0
- package/dist/shared/clone.d.ts +2 -0
- package/dist/shared/clone.d.ts.map +1 -0
- package/dist/shared/clone.js +76 -0
- package/dist/shared/clone.js.map +1 -0
- package/dist/shared/context.d.ts +15 -0
- package/dist/shared/context.d.ts.map +1 -0
- package/dist/shared/context.js +16 -0
- package/dist/shared/context.js.map +1 -0
- package/dist/shared/diagnostics.d.ts +22 -0
- package/dist/shared/diagnostics.d.ts.map +1 -0
- package/dist/shared/diagnostics.js +58 -0
- package/dist/shared/diagnostics.js.map +1 -0
- package/dist/shared/escape.d.ts +3 -0
- package/dist/shared/escape.d.ts.map +1 -0
- package/dist/shared/escape.js +17 -0
- package/dist/shared/escape.js.map +1 -0
- package/dist/shared/external.d.ts +37 -0
- package/dist/shared/external.d.ts.map +1 -0
- package/dist/shared/external.js +76 -0
- package/dist/shared/external.js.map +1 -0
- package/dist/shared/format.d.ts +9 -0
- package/dist/shared/format.d.ts.map +1 -0
- package/dist/shared/format.js +10 -0
- package/dist/shared/format.js.map +1 -0
- package/dist/shared/hash.d.ts +2 -0
- package/dist/shared/hash.d.ts.map +1 -0
- package/dist/shared/hash.js +9 -0
- package/dist/shared/hash.js.map +1 -0
- package/dist/shared/html.d.ts +18 -0
- package/dist/shared/html.d.ts.map +1 -0
- package/dist/shared/html.js +277 -0
- package/dist/shared/html.js.map +1 -0
- package/dist/shared/markers.d.ts +12 -0
- package/dist/shared/markers.d.ts.map +1 -0
- package/dist/shared/markers.js +16 -0
- package/dist/shared/markers.js.map +1 -0
- package/dist/shared/nesting.d.ts +3 -0
- package/dist/shared/nesting.d.ts.map +1 -0
- package/dist/shared/nesting.js +143 -0
- package/dist/shared/nesting.js.map +1 -0
- package/dist/shared/slots.d.ts +8 -0
- package/dist/shared/slots.d.ts.map +1 -0
- package/dist/shared/slots.js +9 -0
- package/dist/shared/slots.js.map +1 -0
- package/dist/shared/snippet.d.ts +11 -0
- package/dist/shared/snippet.d.ts.map +1 -0
- package/dist/shared/snippet.js +11 -0
- package/dist/shared/snippet.js.map +1 -0
- package/package.json +56 -5
- package/src/compiler/analysis/asynchronous.ts +206 -0
- package/src/compiler/analysis/classes.ts +110 -0
- package/src/compiler/analysis/ignoring.ts +25 -0
- package/src/compiler/analysis/index.ts +433 -0
- package/src/compiler/analysis/scope.ts +410 -0
- package/src/compiler/analysis/template.ts +525 -0
- package/src/compiler/analysis/validate/a11y/attributes.ts +252 -0
- package/src/compiler/analysis/validate/a11y/axobject-query.d.ts +20 -0
- package/src/compiler/analysis/validate/a11y/elements.ts +241 -0
- package/src/compiler/analysis/validate/a11y/facts.ts +102 -0
- package/src/compiler/analysis/validate/a11y/fuzzy.ts +123 -0
- package/src/compiler/analysis/validate/a11y/index.ts +24 -0
- package/src/compiler/analysis/validate/a11y/interactions.ts +125 -0
- package/src/compiler/analysis/validate/a11y/roles.ts +182 -0
- package/src/compiler/analysis/validate/a11y/tables.ts +250 -0
- package/src/compiler/analysis/validate/assignment.ts +74 -0
- package/src/compiler/analysis/validate/bindings.ts +210 -0
- package/src/compiler/analysis/validate/classes.ts +102 -0
- package/src/compiler/analysis/validate/context.ts +119 -0
- package/src/compiler/analysis/validate/element.ts +148 -0
- package/src/compiler/analysis/validate/front.ts +75 -0
- package/src/compiler/analysis/validate/index.ts +268 -0
- package/src/compiler/analysis/validate/messages.ts +451 -0
- package/src/compiler/analysis/validate/report.ts +100 -0
- package/src/compiler/analysis/validate/scope.ts +241 -0
- package/src/compiler/analysis/validate/scopes.ts +460 -0
- package/src/compiler/analysis/validate/script.ts +528 -0
- package/src/compiler/analysis/validate/template.ts +326 -0
- package/src/compiler/analysis/whitespace.ts +87 -0
- package/src/compiler/client/asynchronous.ts +68 -0
- package/src/compiler/client/bindings.ts +246 -0
- package/src/compiler/client/blocks.ts +239 -0
- package/src/compiler/client/classes.ts +154 -0
- package/src/compiler/client/component.ts +549 -0
- package/src/compiler/client/constants.ts +107 -0
- package/src/compiler/client/custom-element.ts +173 -0
- package/src/compiler/client/directives.ts +35 -0
- package/src/compiler/client/dynamic.ts +85 -0
- package/src/compiler/client/element.ts +631 -0
- package/src/compiler/client/events.ts +147 -0
- package/src/compiler/client/exports.ts +39 -0
- package/src/compiler/client/external.ts +190 -0
- package/src/compiler/client/hot.ts +62 -0
- package/src/compiler/client/index.ts +307 -0
- package/src/compiler/client/inspect.ts +153 -0
- package/src/compiler/client/loss.ts +53 -0
- package/src/compiler/client/markup.ts +126 -0
- package/src/compiler/client/meta.ts +64 -0
- package/src/compiler/client/ownership.ts +54 -0
- package/src/compiler/client/parameters.ts +38 -0
- package/src/compiler/client/patterns.ts +154 -0
- package/src/compiler/client/script.ts +587 -0
- package/src/compiler/client/special.ts +177 -0
- package/src/compiler/client/template.ts +533 -0
- package/src/compiler/client/transitions.ts +38 -0
- package/src/compiler/client/values.ts +52 -0
- package/src/compiler/css/analyze.ts +281 -0
- package/src/compiler/css/attributes.ts +195 -0
- package/src/compiler/css/hash.ts +1 -0
- package/src/compiler/css/index.ts +152 -0
- package/src/compiler/css/marks.ts +142 -0
- package/src/compiler/css/prune.ts +466 -0
- package/src/compiler/css/relations.ts +264 -0
- package/src/compiler/css/render.ts +422 -0
- package/src/compiler/css/template.ts +297 -0
- package/src/compiler/ir/estree.ts +256 -0
- package/src/compiler/ir/maps.ts +64 -0
- package/src/compiler/ir/nodes.ts +263 -0
- package/src/compiler/ir/port.ts +88 -0
- package/src/compiler/ir/runtime.ts +19 -0
- package/src/compiler/ir/script.ts +34 -0
- package/src/compiler/ir/style.ts +120 -0
- package/src/compiler/server/asynchronous.ts +71 -0
- package/src/compiler/server/bindings.ts +101 -0
- package/src/compiler/server/blocks.ts +165 -0
- package/src/compiler/server/classes.ts +139 -0
- package/src/compiler/server/component.ts +400 -0
- package/src/compiler/server/external.ts +176 -0
- package/src/compiler/server/index.ts +205 -0
- package/src/compiler/server/placement.ts +58 -0
- package/src/compiler/server/script.ts +492 -0
- package/src/compiler/server/slot.ts +51 -0
- package/src/compiler/server/special.ts +60 -0
- package/src/compiler/server/template.ts +620 -0
- package/src/entries/action.ts +20 -0
- package/src/entries/animate.ts +3 -0
- package/src/entries/attachments.ts +30 -0
- package/src/entries/compiler.ts +206 -0
- package/src/entries/easing.ts +1 -0
- package/src/entries/events.ts +10 -0
- package/src/entries/index-server.ts +118 -0
- package/src/entries/index.ts +50 -0
- package/src/entries/internal/client.ts +135 -0
- package/src/entries/internal/server.ts +46 -0
- package/src/entries/motion-server.ts +5 -0
- package/src/entries/motion.ts +5 -0
- package/src/entries/reactivity-server.ts +7 -0
- package/src/entries/reactivity.ts +7 -0
- package/src/entries/server.ts +11 -0
- package/src/entries/transition.ts +12 -0
- package/src/entries/window-server.ts +12 -0
- package/src/entries/window.ts +12 -0
- package/src/runtime/classes/date.ts +65 -0
- package/src/runtime/classes/frames.ts +27 -0
- package/src/runtime/classes/local.ts +7 -0
- package/src/runtime/classes/map.ts +135 -0
- package/src/runtime/classes/media.ts +25 -0
- package/src/runtime/classes/motion.ts +3 -0
- package/src/runtime/classes/search.ts +136 -0
- package/src/runtime/classes/server.ts +17 -0
- package/src/runtime/classes/set.ts +146 -0
- package/src/runtime/classes/spring.ts +199 -0
- package/src/runtime/classes/subscriber.ts +50 -0
- package/src/runtime/classes/tween.ts +128 -0
- package/src/runtime/classes/url.ts +152 -0
- package/src/runtime/classes/window-server.ts +27 -0
- package/src/runtime/classes/window.ts +72 -0
- package/src/runtime/dom/async.ts +208 -0
- package/src/runtime/dom/attachments.ts +139 -0
- package/src/runtime/dom/attributes.ts +526 -0
- package/src/runtime/dom/await.ts +108 -0
- package/src/runtime/dom/bindings.ts +369 -0
- package/src/runtime/dom/blocks.ts +39 -0
- package/src/runtime/dom/boundary.ts +349 -0
- package/src/runtime/dom/branches.ts +219 -0
- package/src/runtime/dom/context.ts +90 -0
- package/src/runtime/dom/custom-element.ts +214 -0
- package/src/runtime/dom/data.ts +131 -0
- package/src/runtime/dom/element.ts +89 -0
- package/src/runtime/dom/events.ts +254 -0
- package/src/runtime/dom/head.ts +56 -0
- package/src/runtime/dom/hot.ts +45 -0
- package/src/runtime/dom/html.ts +92 -0
- package/src/runtime/dom/hydration.ts +108 -0
- package/src/runtime/dom/inspect.ts +70 -0
- package/src/runtime/dom/list.ts +432 -0
- package/src/runtime/dom/media.ts +164 -0
- package/src/runtime/dom/meta.ts +67 -0
- package/src/runtime/dom/mount.ts +190 -0
- package/src/runtime/dom/ownership.ts +45 -0
- package/src/runtime/dom/props.ts +212 -0
- package/src/runtime/dom/range.ts +132 -0
- package/src/runtime/dom/reset.ts +39 -0
- package/src/runtime/dom/select.ts +184 -0
- package/src/runtime/dom/snippet.ts +54 -0
- package/src/runtime/dom/styles.ts +26 -0
- package/src/runtime/dom/swap.ts +117 -0
- package/src/runtime/dom/targets.ts +96 -0
- package/src/runtime/dom/template.ts +319 -0
- package/src/runtime/dom/trusted.ts +81 -0
- package/src/runtime/dom/values.ts +33 -0
- package/src/runtime/reactivity/abort.ts +56 -0
- package/src/runtime/reactivity/async.ts +272 -0
- package/src/runtime/reactivity/batch.ts +382 -0
- package/src/runtime/reactivity/carried.ts +64 -0
- package/src/runtime/reactivity/collector.ts +20 -0
- package/src/runtime/reactivity/drafts.ts +126 -0
- package/src/runtime/reactivity/eager.ts +45 -0
- package/src/runtime/reactivity/edges.ts +210 -0
- package/src/runtime/reactivity/effects.ts +669 -0
- package/src/runtime/reactivity/errors.ts +73 -0
- package/src/runtime/reactivity/external.ts +56 -0
- package/src/runtime/reactivity/fork.ts +60 -0
- package/src/runtime/reactivity/front.ts +20 -0
- package/src/runtime/reactivity/graph.ts +129 -0
- package/src/runtime/reactivity/handlers.ts +55 -0
- package/src/runtime/reactivity/held.ts +337 -0
- package/src/runtime/reactivity/history.ts +108 -0
- package/src/runtime/reactivity/latest.ts +41 -0
- package/src/runtime/reactivity/leaving.ts +303 -0
- package/src/runtime/reactivity/loss.ts +71 -0
- package/src/runtime/reactivity/outgoing.ts +41 -0
- package/src/runtime/reactivity/owners.ts +234 -0
- package/src/runtime/reactivity/past.ts +57 -0
- package/src/runtime/reactivity/provenance.ts +189 -0
- package/src/runtime/reactivity/proxy.ts +212 -0
- package/src/runtime/reactivity/public.ts +51 -0
- package/src/runtime/reactivity/reads.ts +376 -0
- package/src/runtime/reactivity/scheduler.ts +400 -0
- package/src/runtime/reactivity/settle.ts +73 -0
- package/src/runtime/reactivity/sources.ts +150 -0
- package/src/runtime/reactivity/tallies.ts +34 -0
- package/src/runtime/reactivity/tasks.ts +33 -0
- package/src/runtime/reactivity/trace.ts +113 -0
- package/src/runtime/reactivity/tracking.ts +569 -0
- package/src/runtime/reactivity/units.ts +103 -0
- package/src/runtime/reactivity/views.ts +114 -0
- package/src/runtime/server/attributes.ts +80 -0
- package/src/runtime/server/cells.ts +135 -0
- package/src/runtime/server/context.ts +319 -0
- package/src/runtime/server/derived.ts +37 -0
- package/src/runtime/server/external.ts +59 -0
- package/src/runtime/server/hydration.ts +238 -0
- package/src/runtime/server/placement.ts +47 -0
- package/src/runtime/server/render.ts +612 -0
- package/src/runtime/server/snippet.ts +21 -0
- package/src/runtime/transitions/animate.ts +161 -0
- package/src/runtime/transitions/easing.ts +153 -0
- package/src/runtime/transitions/flip.ts +66 -0
- package/src/runtime/transitions/frame.ts +273 -0
- package/src/runtime/transitions/layout.ts +176 -0
- package/src/runtime/transitions/manager.ts +343 -0
- package/src/runtime/transitions/placement.ts +161 -0
- package/src/runtime/transitions/presets.ts +369 -0
- package/src/shared/abort.ts +8 -0
- package/src/shared/assignment.ts +27 -0
- package/src/shared/attributes.ts +123 -0
- package/src/shared/clone.ts +82 -0
- package/src/shared/context.ts +35 -0
- package/src/shared/diagnostics.ts +83 -0
- package/src/shared/escape.ts +20 -0
- package/src/shared/external.ts +113 -0
- package/src/shared/format.ts +17 -0
- package/src/shared/hash.ts +8 -0
- package/src/shared/html.ts +298 -0
- package/src/shared/markers.ts +25 -0
- package/src/shared/nesting.ts +156 -0
- package/src/shared/slots.ts +16 -0
- package/src/shared/snippet.ts +29 -0
- package/README.md +0 -3
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { active, alias, excluded, open, processing, type Batch } from './batch.ts';
|
|
2
|
+
import { destroy, detach, detachment, fail } from './effects.ts';
|
|
3
|
+
import { viewOf } from './views.ts';
|
|
4
|
+
import {
|
|
5
|
+
CLEAN,
|
|
6
|
+
isDerived,
|
|
7
|
+
retainsFailures,
|
|
8
|
+
type Derived,
|
|
9
|
+
type Effect,
|
|
10
|
+
type Failure,
|
|
11
|
+
type Reaction,
|
|
12
|
+
type Source
|
|
13
|
+
} from './graph.ts';
|
|
14
|
+
import { beforeOf } from './history.ts';
|
|
15
|
+
import { countLeaving, outgoing, selecting, setOutgoing } from './outgoing.ts';
|
|
16
|
+
import { running, setOwner, track, view } from './tracking.ts';
|
|
17
|
+
|
|
18
|
+
interface Entry {
|
|
19
|
+
readonly epoch: Epoch;
|
|
20
|
+
readonly value: unknown;
|
|
21
|
+
next: Entry | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface Chain {
|
|
25
|
+
first: Entry;
|
|
26
|
+
last: Entry;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface Epoch {
|
|
30
|
+
readonly order: number;
|
|
31
|
+
readonly sources: WeakRef<Source>[];
|
|
32
|
+
users: number;
|
|
33
|
+
next: Epoch | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Cached {
|
|
37
|
+
value: unknown;
|
|
38
|
+
failure: Failure | null;
|
|
39
|
+
ready: boolean;
|
|
40
|
+
readonly locals: Map<Source, number>;
|
|
41
|
+
effects: Effect[] | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface LeavingView {
|
|
45
|
+
readonly epoch: Epoch;
|
|
46
|
+
values: WeakMap<Derived, Cached>;
|
|
47
|
+
locals: WeakMap<Source, Reaction>;
|
|
48
|
+
effects: Set<Effect> | null;
|
|
49
|
+
computing: Derived | null;
|
|
50
|
+
cache: Cached | null;
|
|
51
|
+
users: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let clock = 0;
|
|
55
|
+
let first: Epoch | null = null;
|
|
56
|
+
let latest: Epoch | null = null;
|
|
57
|
+
let chains: WeakMap<Source, Chain> | null = null;
|
|
58
|
+
let commits = new WeakMap<Batch, Epoch>();
|
|
59
|
+
const branches = new WeakMap<Effect, LeavingView>();
|
|
60
|
+
const inheriting = new WeakMap<Effect, () => void>();
|
|
61
|
+
|
|
62
|
+
function append(epoch: Epoch, source: Source, value: unknown): void {
|
|
63
|
+
const map = chains as WeakMap<Source, Chain>;
|
|
64
|
+
const chain = map.get(source);
|
|
65
|
+
if (chain !== undefined && chain.last.epoch === epoch) return;
|
|
66
|
+
const entry: Entry = { epoch, value, next: null };
|
|
67
|
+
if (chain === undefined) map.set(source, { first: entry, last: entry });
|
|
68
|
+
else chain.last = chain.last.next = entry;
|
|
69
|
+
epoch.sources.push(new WeakRef(source));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function remember(source: Source, value: unknown): void {
|
|
73
|
+
if (latest !== null) append(latest, source, value);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function start(): Epoch {
|
|
77
|
+
const given = processing ?? active ?? open;
|
|
78
|
+
const batch = given === null ? null : alias(given);
|
|
79
|
+
const known = batch === null ? undefined : commits.get(batch);
|
|
80
|
+
if (known !== undefined && known.users > 0) return known;
|
|
81
|
+
const epoch: Epoch = { order: ++clock, sources: [], users: 0, next: null };
|
|
82
|
+
if (latest === null) {
|
|
83
|
+
chains = new WeakMap();
|
|
84
|
+
first = epoch;
|
|
85
|
+
} else latest.next = epoch;
|
|
86
|
+
latest = epoch;
|
|
87
|
+
if (batch !== null) {
|
|
88
|
+
commits.set(batch, epoch);
|
|
89
|
+
const before = beforeOf(batch);
|
|
90
|
+
for (const [source, value] of before) append(epoch, source, value);
|
|
91
|
+
const givenView = view !== null && alias(view.batch) === batch ? view : viewOf(batch);
|
|
92
|
+
for (const source of givenView.hidden.keys())
|
|
93
|
+
if (!before.has(source)) append(epoch, source, givenView.values.get(source));
|
|
94
|
+
}
|
|
95
|
+
return epoch;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function prune(): void {
|
|
99
|
+
while (first !== null && first.users === 0) {
|
|
100
|
+
const expired = first;
|
|
101
|
+
first = expired.next;
|
|
102
|
+
expired.next = null;
|
|
103
|
+
if (first === null) {
|
|
104
|
+
expired.sources.length = 0;
|
|
105
|
+
latest = null;
|
|
106
|
+
chains = null;
|
|
107
|
+
commits = new WeakMap();
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
for (const ref of expired.sources) {
|
|
111
|
+
const source = ref.deref();
|
|
112
|
+
if (source === undefined) continue;
|
|
113
|
+
const chain = chains?.get(source);
|
|
114
|
+
if (chain === undefined || chain.first.epoch !== expired) continue;
|
|
115
|
+
const next = chain.first.next;
|
|
116
|
+
if (next === null) chains?.delete(source);
|
|
117
|
+
else chain.first = next;
|
|
118
|
+
}
|
|
119
|
+
expired.sources.length = 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function release(given: LeavingView): void {
|
|
124
|
+
if (--given.users > 0) return;
|
|
125
|
+
given.values = new WeakMap();
|
|
126
|
+
given.locals = new WeakMap();
|
|
127
|
+
const effects = given.effects;
|
|
128
|
+
given.effects = null;
|
|
129
|
+
given.epoch.users--;
|
|
130
|
+
prune();
|
|
131
|
+
for (const effect of effects ?? []) destroy(effect);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function leaving(branch: Effect): () => boolean {
|
|
135
|
+
stayed(branch);
|
|
136
|
+
const epoch = start();
|
|
137
|
+
epoch.users++;
|
|
138
|
+
const given: LeavingView = {
|
|
139
|
+
epoch,
|
|
140
|
+
values: new WeakMap(),
|
|
141
|
+
locals: new WeakMap(),
|
|
142
|
+
effects: null,
|
|
143
|
+
computing: null,
|
|
144
|
+
cache: null,
|
|
145
|
+
users: 1
|
|
146
|
+
};
|
|
147
|
+
branches.set(branch, given);
|
|
148
|
+
countLeaving(1);
|
|
149
|
+
const inherited = detachment(branch);
|
|
150
|
+
if (inherited !== null) inheriting.set(branch, inherited);
|
|
151
|
+
detach(branch, () => {
|
|
152
|
+
stayed(branch);
|
|
153
|
+
inherited?.();
|
|
154
|
+
});
|
|
155
|
+
return () => {
|
|
156
|
+
if (branches.get(branch) !== given) return false;
|
|
157
|
+
stayed(branch);
|
|
158
|
+
return true;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function stayed(branch: Effect): void {
|
|
163
|
+
const given = branches.get(branch);
|
|
164
|
+
if (given === undefined) return;
|
|
165
|
+
branches.delete(branch);
|
|
166
|
+
countLeaving(-1);
|
|
167
|
+
detach(branch, branch.destroyed ? null : (inheriting.get(branch) ?? null));
|
|
168
|
+
inheriting.delete(branch);
|
|
169
|
+
release(given);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function admitted(branch: Effect): boolean {
|
|
173
|
+
const reaction = running();
|
|
174
|
+
if (reaction === null) return false;
|
|
175
|
+
const current = processing ?? active;
|
|
176
|
+
if (current === null) return false;
|
|
177
|
+
const batch = alias(current);
|
|
178
|
+
if (batch.shown?.has(branch) !== true || excluded(branch, batch)) return false;
|
|
179
|
+
for (
|
|
180
|
+
let at = isDerived(reaction) ? reaction.owner : (reaction as Effect);
|
|
181
|
+
at !== null;
|
|
182
|
+
at = at.parent
|
|
183
|
+
)
|
|
184
|
+
if (at === branch) return true;
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function leavingView(derived: Derived): LeavingView | null {
|
|
189
|
+
if (!selecting) return null;
|
|
190
|
+
for (let at = derived.owner; at !== null; at = at.parent) {
|
|
191
|
+
if (at.destroyed) return null;
|
|
192
|
+
const given = branches.get(at);
|
|
193
|
+
if (given !== undefined) return admitted(at) ? null : given;
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function entryOf(source: Source, epoch: Epoch): Entry | null {
|
|
199
|
+
let entry = chains?.get(source)?.first ?? null;
|
|
200
|
+
while (entry !== null && entry.epoch.order < epoch.order) entry = entry.next;
|
|
201
|
+
return entry;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function unchanged(source: Derived, epoch: Epoch, seen: Set<Derived>): boolean {
|
|
205
|
+
if (seen.has(source)) return true;
|
|
206
|
+
seen.add(source);
|
|
207
|
+
for (const dep of source.deps ?? []) {
|
|
208
|
+
if (entryOf(dep, epoch) !== null) return false;
|
|
209
|
+
if (isDerived(dep) && !unchanged(dep, epoch, seen)) return false;
|
|
210
|
+
}
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function inherit(given: LeavingView, locals: ReadonlyMap<Source, number>): void {
|
|
215
|
+
if (given.cache === null) return;
|
|
216
|
+
for (const [source, version] of locals)
|
|
217
|
+
if (given.locals.get(source) !== given.computing) given.cache.locals.set(source, version);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function cached(source: Derived, given: LeavingView): unknown {
|
|
221
|
+
let found = given.values.get(source);
|
|
222
|
+
if (found !== undefined && found.ready) {
|
|
223
|
+
for (const [local, version] of found.locals)
|
|
224
|
+
if (local.wv !== version) {
|
|
225
|
+
found.ready = false;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
if (found.ready) {
|
|
229
|
+
inherit(given, found.locals);
|
|
230
|
+
if (found.failure !== null) throw found.failure.error;
|
|
231
|
+
return found.value;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (found === undefined) {
|
|
235
|
+
found = { value: undefined, failure: null, ready: false, locals: new Map(), effects: null };
|
|
236
|
+
given.values.set(source, found);
|
|
237
|
+
if (
|
|
238
|
+
(source.computed || source.failure !== null) &&
|
|
239
|
+
source.status === CLEAN &&
|
|
240
|
+
unchanged(source, given.epoch, new Set())
|
|
241
|
+
) {
|
|
242
|
+
found.value = source.v;
|
|
243
|
+
found.failure = source.failure;
|
|
244
|
+
found.ready = true;
|
|
245
|
+
if (found.failure !== null) throw found.failure.error;
|
|
246
|
+
return found.value;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
for (const effect of found.effects ?? []) {
|
|
250
|
+
given.effects?.delete(effect);
|
|
251
|
+
destroy(effect);
|
|
252
|
+
}
|
|
253
|
+
found.effects = null;
|
|
254
|
+
found.failure = null;
|
|
255
|
+
found.locals.clear();
|
|
256
|
+
const previousCache = given.cache;
|
|
257
|
+
const previousDerived = given.computing;
|
|
258
|
+
const previousOwner = setOwner(source.owner);
|
|
259
|
+
given.cache = found;
|
|
260
|
+
given.computing = source;
|
|
261
|
+
try {
|
|
262
|
+
found.value = track(source, source.fn, true);
|
|
263
|
+
found.ready = true;
|
|
264
|
+
return found.value;
|
|
265
|
+
} catch (error) {
|
|
266
|
+
if (source.owner === null) throw error;
|
|
267
|
+
if (!source.owner.destroyed) fail(source.owner, error);
|
|
268
|
+
found.value = undefined;
|
|
269
|
+
found.ready = true;
|
|
270
|
+
if (!retainsFailures(source)) return undefined;
|
|
271
|
+
found.failure = { error };
|
|
272
|
+
throw error;
|
|
273
|
+
} finally {
|
|
274
|
+
given.cache = previousCache;
|
|
275
|
+
given.computing = previousDerived;
|
|
276
|
+
setOwner(previousOwner);
|
|
277
|
+
inherit(given, found.locals);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function read(source: Source, given: LeavingView): unknown {
|
|
282
|
+
const local = given.locals.get(source);
|
|
283
|
+
if (local !== undefined) {
|
|
284
|
+
if (given.cache !== null && local !== given.computing)
|
|
285
|
+
given.cache.locals.set(source, source.wv);
|
|
286
|
+
return source.v;
|
|
287
|
+
}
|
|
288
|
+
const entry = entryOf(source, given.epoch);
|
|
289
|
+
if (entry !== null) return entry.value;
|
|
290
|
+
return isDerived(source) ? cached(source, given) : source.v;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export function readLeaving(source: Source, given: LeavingView): unknown {
|
|
294
|
+
if (outgoing === given) return read(source, given);
|
|
295
|
+
const previous = setOutgoing(given);
|
|
296
|
+
given.users++;
|
|
297
|
+
try {
|
|
298
|
+
return read(source, given);
|
|
299
|
+
} finally {
|
|
300
|
+
setOutgoing(previous);
|
|
301
|
+
release(given);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { warn } from '../../shared/diagnostics.ts';
|
|
2
|
+
import { active, open, processing } from './batch.ts';
|
|
3
|
+
import type { Source } from './graph.ts';
|
|
4
|
+
import { labelOf } from './provenance.ts';
|
|
5
|
+
import { asyncRun, lost, setLost, type Resumption } from './tracking.ts';
|
|
6
|
+
|
|
7
|
+
const warned = new WeakSet<Resumption>();
|
|
8
|
+
|
|
9
|
+
function expire(run: Resumption | null): void {
|
|
10
|
+
queueMicrotask(() => {
|
|
11
|
+
if (lost === run) setLost(null);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function trackLoss<T>(value: T | PromiseLike<T>): Promise<() => T> {
|
|
16
|
+
const run = lost ?? asyncRun();
|
|
17
|
+
if (lost !== null) expire(lost);
|
|
18
|
+
const resolved = await value;
|
|
19
|
+
return () => {
|
|
20
|
+
setLost(run);
|
|
21
|
+
expire(run);
|
|
22
|
+
return resolved;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export async function* trackLossEach<T>(
|
|
27
|
+
iterable: Iterable<T> | AsyncIterable<T>
|
|
28
|
+
): AsyncGenerator<T, void> {
|
|
29
|
+
const iterator: Iterator<T> | AsyncIterator<T> | undefined =
|
|
30
|
+
(iterable as AsyncIterable<T>)[Symbol.asyncIterator]?.() ??
|
|
31
|
+
(iterable as Iterable<T>)[Symbol.iterator]?.();
|
|
32
|
+
if (iterator === undefined) throw new TypeError('value is not async iterable');
|
|
33
|
+
let close = true;
|
|
34
|
+
try {
|
|
35
|
+
while (true) {
|
|
36
|
+
const { done, value } = (await trackLoss(iterator.next()))();
|
|
37
|
+
if (done) {
|
|
38
|
+
close = false;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
const run = lost;
|
|
42
|
+
try {
|
|
43
|
+
yield value;
|
|
44
|
+
} catch (error) {
|
|
45
|
+
setLost(run);
|
|
46
|
+
if (iterator.return !== undefined) (await trackLoss(iterator.return()))();
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
setLost(run);
|
|
50
|
+
}
|
|
51
|
+
} catch (error) {
|
|
52
|
+
close = false;
|
|
53
|
+
throw error;
|
|
54
|
+
} finally {
|
|
55
|
+
if (close && iterator.return !== undefined) (await trackLoss(iterator.return()))();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function lose(source: Source): void {
|
|
60
|
+
const run = lost;
|
|
61
|
+
if (run === null || warned.has(run) || run.reads.has(source)) return;
|
|
62
|
+
if (active !== null || open !== null || processing !== null) return;
|
|
63
|
+
warned.add(run);
|
|
64
|
+
warn(
|
|
65
|
+
'await_reactivity_loss',
|
|
66
|
+
`Detected reactivity loss when reading \`${labelOf(source)}\`. This happens when state is read in an async function after an earlier \`await\``
|
|
67
|
+
);
|
|
68
|
+
const trace = new Error();
|
|
69
|
+
Object.defineProperty(trace, 'name', { value: 'traced at' });
|
|
70
|
+
console.warn(trace);
|
|
71
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ROOT, type Effect, type Reaction, type Source } from './graph.ts';
|
|
2
|
+
import type { LeavingView } from './leaving.ts';
|
|
3
|
+
|
|
4
|
+
export let outgoing: LeavingView | null = null;
|
|
5
|
+
export let leavingCount = 0;
|
|
6
|
+
export let selecting = true;
|
|
7
|
+
|
|
8
|
+
export function withoutLeaving<T>(fn: () => T): T {
|
|
9
|
+
const previous = outgoing;
|
|
10
|
+
const allowed = selecting;
|
|
11
|
+
outgoing = null;
|
|
12
|
+
selecting = false;
|
|
13
|
+
try {
|
|
14
|
+
return fn();
|
|
15
|
+
} finally {
|
|
16
|
+
outgoing = previous;
|
|
17
|
+
selecting = allowed;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function setOutgoing(next: LeavingView | null): LeavingView | null {
|
|
22
|
+
const previous = outgoing;
|
|
23
|
+
outgoing = next;
|
|
24
|
+
return previous;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function countLeaving(delta: 1 | -1): void {
|
|
28
|
+
leavingCount += delta;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function localLeaving(source: Source, reaction: Reaction): void {
|
|
32
|
+
outgoing?.locals.set(source, reaction);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function ownLeaving(effect: Effect): boolean {
|
|
36
|
+
const given = outgoing;
|
|
37
|
+
if (given === null || given.cache === null || effect.kind === ROOT) return false;
|
|
38
|
+
(given.cache.effects ??= []).push(effect);
|
|
39
|
+
(given.effects ??= new Set()).add(effect);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { keyed, type Context, type Layer } from '../../shared/context.ts';
|
|
2
|
+
import { failure } from '../../shared/diagnostics.ts';
|
|
3
|
+
import { format } from '../../shared/format.ts';
|
|
4
|
+
import { destroy, destroyed, detached, start } from './effects.ts';
|
|
5
|
+
import { setFront } from './front.ts';
|
|
6
|
+
import { lifetime } from './abort.ts';
|
|
7
|
+
import { settledUnder, unit } from './units.ts';
|
|
8
|
+
import { presently } from './past.ts';
|
|
9
|
+
import type { Effect } from './graph.ts';
|
|
10
|
+
import { ambient, carry, port } from './carried.ts';
|
|
11
|
+
import { handle } from './handlers.ts';
|
|
12
|
+
import { setOwner, withoutReaction } from './tracking.ts';
|
|
13
|
+
|
|
14
|
+
const effects = new WeakMap<Owner, Effect>();
|
|
15
|
+
const owners = new WeakMap<Effect, Owner>();
|
|
16
|
+
|
|
17
|
+
export interface Components {
|
|
18
|
+
layer(): Layer<Effect> | null;
|
|
19
|
+
teardown?(fn: () => void): boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const installed: Components[] = [];
|
|
23
|
+
|
|
24
|
+
export function installComponents(components: Components): void {
|
|
25
|
+
installed.push(components);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function layerOf(effect: Effect | null): Layer<Effect> | null {
|
|
29
|
+
return (effect?.context as Layer<Effect> | null | undefined) ?? null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function standing(): Layer<Effect> | null {
|
|
33
|
+
for (const components of installed) {
|
|
34
|
+
const layer = components.layer();
|
|
35
|
+
if (layer !== null) return layer;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function current(): Layer<Effect> | null {
|
|
41
|
+
return standing() ?? layerOf(ambient());
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function writable(): Layer<Effect> {
|
|
45
|
+
const layer = standing();
|
|
46
|
+
if (layer !== null) return layer;
|
|
47
|
+
const effect = ambient();
|
|
48
|
+
if (effect === null) {
|
|
49
|
+
throw failure('context_without_owner', 'Context can only be set where an owner exists');
|
|
50
|
+
}
|
|
51
|
+
return ownContext(effect);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function getContext<T>(key: unknown): T {
|
|
55
|
+
for (let layer = current(); layer !== null; layer = layer.parent) {
|
|
56
|
+
if (layer.map?.has(key)) return layer.map.get(key) as T;
|
|
57
|
+
}
|
|
58
|
+
return undefined as T;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function setContext<T>(key: unknown, value: T): T {
|
|
62
|
+
const layer = writable();
|
|
63
|
+
(layer.map ??= new Map()).set(key, value);
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function hasContext(key: unknown): boolean {
|
|
68
|
+
for (let layer = current(); layer !== null; layer = layer.parent) {
|
|
69
|
+
if (layer.map?.has(key)) return true;
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function createContext<T>(): Context<T> {
|
|
75
|
+
return keyed<T>({ getContext, setContext, hasContext });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function getAllContexts<T extends Map<unknown, unknown> = Map<unknown, unknown>>(): T {
|
|
79
|
+
const chain: Layer<Effect>[] = [];
|
|
80
|
+
for (let layer = current(); layer !== null; layer = layer.parent) chain.push(layer);
|
|
81
|
+
const all = new Map<unknown, unknown>();
|
|
82
|
+
for (let index = chain.length - 1; index >= 0; index--) {
|
|
83
|
+
for (const [key, value] of chain[index]?.map ?? []) all.set(key, value);
|
|
84
|
+
}
|
|
85
|
+
return all as T;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function register(effect: Effect | null, fn: () => void): Effect {
|
|
89
|
+
const previous = setOwner(effect);
|
|
90
|
+
try {
|
|
91
|
+
return destroyed(fn);
|
|
92
|
+
} finally {
|
|
93
|
+
setOwner(previous);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function onDestroy(fn: () => void): void {
|
|
98
|
+
const effect = ambient();
|
|
99
|
+
if (effect !== null && effect.destroyed) {
|
|
100
|
+
withoutReaction(() => presently(fn));
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
for (const components of installed) if (components.teardown?.(fn) === true) return;
|
|
104
|
+
register(effect, fn);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function ownContext(effect: Effect): Layer<Effect> {
|
|
108
|
+
const inherited = effect.context as Layer<Effect> | null;
|
|
109
|
+
if (inherited !== null && inherited.owner === effect) return inherited;
|
|
110
|
+
const layer: Layer<Effect> = { parent: inherited, owner: effect, component: false, map: null };
|
|
111
|
+
effect.context = layer;
|
|
112
|
+
repoint(effect, inherited, layer);
|
|
113
|
+
return layer;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function repoint(effect: Effect, inherited: Layer<Effect> | null, layer: Layer<Effect>): void {
|
|
117
|
+
for (let child = effect.first; child !== null; child = child.next) {
|
|
118
|
+
const context = child.context as Layer<Effect> | null;
|
|
119
|
+
if (context === inherited) {
|
|
120
|
+
child.context = layer;
|
|
121
|
+
repoint(child, inherited, layer);
|
|
122
|
+
} else if (context?.owner === child && context.parent === inherited && !context.isolated) {
|
|
123
|
+
context.parent = layer;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export class Owner {
|
|
129
|
+
constructor(effect: Effect) {
|
|
130
|
+
effects.set(this, effect);
|
|
131
|
+
owners.set(effect, this);
|
|
132
|
+
ownContext(effect);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
get parent(): Owner | null {
|
|
136
|
+
const parent = effectOf(this).parent;
|
|
137
|
+
return parent === null ? null : ownerOf(parent);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
get disposed(): boolean {
|
|
141
|
+
return effectOf(this).destroyed;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
get signal(): AbortSignal {
|
|
145
|
+
return lifetime(effectOf(this));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
onError(handler: (error: unknown) => void): () => void {
|
|
149
|
+
const effect = effectOf(this);
|
|
150
|
+
if (effect.destroyed) throw new Error('Cannot handle failures under a disposed owner');
|
|
151
|
+
return handle(effect, handler);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
run<T>(fn: () => T): T {
|
|
155
|
+
const effect = effectOf(this);
|
|
156
|
+
if (effect.destroyed) throw new Error('Cannot run code under a disposed owner');
|
|
157
|
+
return port === null ? enter(effect, fn) : carry(effect, () => enter(effect, fn));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async start<T>(fn: () => T): Promise<Awaited<T>> {
|
|
161
|
+
const effect = effectOf(this);
|
|
162
|
+
if (effect.destroyed) throw new Error('Cannot run code under a disposed owner');
|
|
163
|
+
const finish = unit(effect);
|
|
164
|
+
try {
|
|
165
|
+
return await this.run(fn);
|
|
166
|
+
} finally {
|
|
167
|
+
finish();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
settled(): Promise<void> {
|
|
172
|
+
return settledUnder(effectOf(this));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
root(fn?: () => void | (() => void)): Owner {
|
|
176
|
+
return root(fn, this);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
onDispose(fn: () => void): () => void {
|
|
180
|
+
const effect = effectOf(this);
|
|
181
|
+
if (effect.destroyed) {
|
|
182
|
+
withoutReaction(() => presently(fn));
|
|
183
|
+
return () => {};
|
|
184
|
+
}
|
|
185
|
+
let live = true;
|
|
186
|
+
const registered = register(effect, () => {
|
|
187
|
+
if (live) fn();
|
|
188
|
+
});
|
|
189
|
+
return () => {
|
|
190
|
+
live = false;
|
|
191
|
+
destroy(registered);
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
dispose(): void {
|
|
196
|
+
destroy(effectOf(this));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function enter<T>(effect: Effect, fn: () => T): T {
|
|
201
|
+
const previous = setOwner(effect);
|
|
202
|
+
try {
|
|
203
|
+
return withoutReaction(fn);
|
|
204
|
+
} finally {
|
|
205
|
+
setOwner(previous);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function effectOf(owner: Owner): Effect {
|
|
210
|
+
return effects.get(owner) as Effect;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function ownerOf(effect: Effect): Owner {
|
|
214
|
+
return owners.get(effect) ?? new Owner(effect);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function getOwner(): Owner | null {
|
|
218
|
+
const effect = ambient();
|
|
219
|
+
return effect === null ? null : ownerOf(effect);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function root(fn?: () => void | (() => void), parent: Owner | null = null): Owner {
|
|
223
|
+
if (parent !== null && parent.disposed)
|
|
224
|
+
throw new Error('Cannot create a root under a disposed owner');
|
|
225
|
+
const effect = detached(null, parent === null ? null : effectOf(parent));
|
|
226
|
+
effect.scope = true;
|
|
227
|
+
if (parent === null) setFront(effect, format);
|
|
228
|
+
const owner = ownerOf(effect);
|
|
229
|
+
if (fn !== undefined) {
|
|
230
|
+
effect.fn = fn;
|
|
231
|
+
start(effect);
|
|
232
|
+
}
|
|
233
|
+
return owner;
|
|
234
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { active, open, processing } from './batch.ts';
|
|
2
|
+
import type { Source } from './graph.ts';
|
|
3
|
+
import { earlier, prior, type Prior } from './history.ts';
|
|
4
|
+
import { withoutLeaving } from './outgoing.ts';
|
|
5
|
+
import { past, setPast, withoutReaction } from './tracking.ts';
|
|
6
|
+
|
|
7
|
+
let instant = false;
|
|
8
|
+
let retiring = 0;
|
|
9
|
+
|
|
10
|
+
export function tearingDown(): boolean {
|
|
11
|
+
return retiring !== 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function instantly(fn: () => void): void {
|
|
15
|
+
const outer = instant;
|
|
16
|
+
instant = true;
|
|
17
|
+
try {
|
|
18
|
+
fn();
|
|
19
|
+
} finally {
|
|
20
|
+
instant = outer;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function retire(teardown: () => void): void {
|
|
25
|
+
const batch = active ?? processing ?? open;
|
|
26
|
+
retiring++;
|
|
27
|
+
try {
|
|
28
|
+
if (batch === null || instant) withoutReaction(() => teardown.call(null));
|
|
29
|
+
else recalling(earlier(batch), open !== null && open !== batch ? prior(open) : null, teardown);
|
|
30
|
+
} finally {
|
|
31
|
+
retiring--;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function recalling(before: Prior, later: Prior | null, fn: () => void): void {
|
|
36
|
+
const previous = setPast({ before, later, written: null, derived: null });
|
|
37
|
+
try {
|
|
38
|
+
withoutReaction(() => fn.call(null));
|
|
39
|
+
} finally {
|
|
40
|
+
setPast(previous);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function presently(fn: () => void): void {
|
|
45
|
+
const previous = setPast(null);
|
|
46
|
+
try {
|
|
47
|
+
withoutLeaving(fn);
|
|
48
|
+
} finally {
|
|
49
|
+
setPast(previous);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function written(source: Source): void {
|
|
54
|
+
if (past === null) return;
|
|
55
|
+
(past.written ??= new Set()).add(source);
|
|
56
|
+
past.derived = null;
|
|
57
|
+
}
|