vigla 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler/analysis/asynchronous.d.ts +18 -0
- package/dist/compiler/analysis/asynchronous.d.ts.map +1 -0
- package/dist/compiler/analysis/asynchronous.js +195 -0
- package/dist/compiler/analysis/asynchronous.js.map +1 -0
- package/dist/compiler/analysis/classes.d.ts +13 -0
- package/dist/compiler/analysis/classes.d.ts.map +1 -0
- package/dist/compiler/analysis/classes.js +96 -0
- package/dist/compiler/analysis/classes.js.map +1 -0
- package/dist/compiler/analysis/ignoring.d.ts +5 -0
- package/dist/compiler/analysis/ignoring.d.ts.map +1 -0
- package/dist/compiler/analysis/ignoring.js +23 -0
- package/dist/compiler/analysis/ignoring.js.map +1 -0
- package/dist/compiler/analysis/index.d.ts +53 -0
- package/dist/compiler/analysis/index.d.ts.map +1 -0
- package/dist/compiler/analysis/index.js +334 -0
- package/dist/compiler/analysis/index.js.map +1 -0
- package/dist/compiler/analysis/scope.d.ts +59 -0
- package/dist/compiler/analysis/scope.d.ts.map +1 -0
- package/dist/compiler/analysis/scope.js +360 -0
- package/dist/compiler/analysis/scope.js.map +1 -0
- package/dist/compiler/analysis/template.d.ts +40 -0
- package/dist/compiler/analysis/template.d.ts.map +1 -0
- package/dist/compiler/analysis/template.js +504 -0
- package/dist/compiler/analysis/template.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/attributes.d.ts +12 -0
- package/dist/compiler/analysis/validate/a11y/attributes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/attributes.js +197 -0
- package/dist/compiler/analysis/validate/a11y/attributes.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/axobject-query.d.ts +20 -0
- package/dist/compiler/analysis/validate/a11y/elements.d.ts +3 -0
- package/dist/compiler/analysis/validate/a11y/elements.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/elements.js +220 -0
- package/dist/compiler/analysis/validate/a11y/elements.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/facts.d.ts +23 -0
- package/dist/compiler/analysis/validate/a11y/facts.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/facts.js +91 -0
- package/dist/compiler/analysis/validate/a11y/facts.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.d.ts +2 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.js +112 -0
- package/dist/compiler/analysis/validate/a11y/fuzzy.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/index.d.ts +8 -0
- package/dist/compiler/analysis/validate/a11y/index.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/index.js +13 -0
- package/dist/compiler/analysis/validate/a11y/index.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/interactions.d.ts +3 -0
- package/dist/compiler/analysis/validate/a11y/interactions.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/interactions.js +99 -0
- package/dist/compiler/analysis/validate/a11y/interactions.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/roles.d.ts +16 -0
- package/dist/compiler/analysis/validate/a11y/roles.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/roles.js +135 -0
- package/dist/compiler/analysis/validate/a11y/roles.js.map +1 -0
- package/dist/compiler/analysis/validate/a11y/tables.d.ts +22 -0
- package/dist/compiler/analysis/validate/a11y/tables.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/a11y/tables.js +227 -0
- package/dist/compiler/analysis/validate/a11y/tables.js.map +1 -0
- package/dist/compiler/analysis/validate/assignment.d.ts +5 -0
- package/dist/compiler/analysis/validate/assignment.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/assignment.js +64 -0
- package/dist/compiler/analysis/validate/assignment.js.map +1 -0
- package/dist/compiler/analysis/validate/bindings.d.ts +6 -0
- package/dist/compiler/analysis/validate/bindings.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/bindings.js +196 -0
- package/dist/compiler/analysis/validate/bindings.js.map +1 -0
- package/dist/compiler/analysis/validate/classes.d.ts +6 -0
- package/dist/compiler/analysis/validate/classes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/classes.js +100 -0
- package/dist/compiler/analysis/validate/classes.js.map +1 -0
- package/dist/compiler/analysis/validate/context.d.ts +47 -0
- package/dist/compiler/analysis/validate/context.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/context.js +84 -0
- package/dist/compiler/analysis/validate/context.js.map +1 -0
- package/dist/compiler/analysis/validate/element.d.ts +10 -0
- package/dist/compiler/analysis/validate/element.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/element.js +147 -0
- package/dist/compiler/analysis/validate/element.js.map +1 -0
- package/dist/compiler/analysis/validate/front.d.ts +18 -0
- package/dist/compiler/analysis/validate/front.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/front.js +65 -0
- package/dist/compiler/analysis/validate/front.js.map +1 -0
- package/dist/compiler/analysis/validate/index.d.ts +19 -0
- package/dist/compiler/analysis/validate/index.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/index.js +237 -0
- package/dist/compiler/analysis/validate/index.js.map +1 -0
- package/dist/compiler/analysis/validate/messages.d.ts +3 -0
- package/dist/compiler/analysis/validate/messages.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/messages.js +451 -0
- package/dist/compiler/analysis/validate/messages.js.map +1 -0
- package/dist/compiler/analysis/validate/report.d.ts +29 -0
- package/dist/compiler/analysis/validate/report.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/report.js +79 -0
- package/dist/compiler/analysis/validate/report.js.map +1 -0
- package/dist/compiler/analysis/validate/scope.d.ts +46 -0
- package/dist/compiler/analysis/validate/scope.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/scope.js +187 -0
- package/dist/compiler/analysis/validate/scope.js.map +1 -0
- package/dist/compiler/analysis/validate/scopes.d.ts +23 -0
- package/dist/compiler/analysis/validate/scopes.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/scopes.js +436 -0
- package/dist/compiler/analysis/validate/scopes.js.map +1 -0
- package/dist/compiler/analysis/validate/script.d.ts +5 -0
- package/dist/compiler/analysis/validate/script.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/script.js +502 -0
- package/dist/compiler/analysis/validate/script.js.map +1 -0
- package/dist/compiler/analysis/validate/template.d.ts +13 -0
- package/dist/compiler/analysis/validate/template.d.ts.map +1 -0
- package/dist/compiler/analysis/validate/template.js +316 -0
- package/dist/compiler/analysis/validate/template.js.map +1 -0
- package/dist/compiler/analysis/whitespace.d.ts +8 -0
- package/dist/compiler/analysis/whitespace.d.ts.map +1 -0
- package/dist/compiler/analysis/whitespace.js +71 -0
- package/dist/compiler/analysis/whitespace.js.map +1 -0
- package/dist/compiler/client/asynchronous.d.ts +9 -0
- package/dist/compiler/client/asynchronous.d.ts.map +1 -0
- package/dist/compiler/client/asynchronous.js +38 -0
- package/dist/compiler/client/asynchronous.js.map +1 -0
- package/dist/compiler/client/bindings.d.ts +16 -0
- package/dist/compiler/client/bindings.d.ts.map +1 -0
- package/dist/compiler/client/bindings.js +200 -0
- package/dist/compiler/client/bindings.js.map +1 -0
- package/dist/compiler/client/blocks.d.ts +9 -0
- package/dist/compiler/client/blocks.d.ts.map +1 -0
- package/dist/compiler/client/blocks.js +147 -0
- package/dist/compiler/client/blocks.js.map +1 -0
- package/dist/compiler/client/classes.d.ts +9 -0
- package/dist/compiler/client/classes.d.ts.map +1 -0
- package/dist/compiler/client/classes.js +104 -0
- package/dist/compiler/client/classes.js.map +1 -0
- package/dist/compiler/client/component.d.ts +12 -0
- package/dist/compiler/client/component.d.ts.map +1 -0
- package/dist/compiler/client/component.js +412 -0
- package/dist/compiler/client/component.js.map +1 -0
- package/dist/compiler/client/constants.d.ts +5 -0
- package/dist/compiler/client/constants.d.ts.map +1 -0
- package/dist/compiler/client/constants.js +103 -0
- package/dist/compiler/client/constants.js.map +1 -0
- package/dist/compiler/client/custom-element.d.ts +7 -0
- package/dist/compiler/client/custom-element.d.ts.map +1 -0
- package/dist/compiler/client/custom-element.js +124 -0
- package/dist/compiler/client/custom-element.js.map +1 -0
- package/dist/compiler/client/directives.d.ts +6 -0
- package/dist/compiler/client/directives.d.ts.map +1 -0
- package/dist/compiler/client/directives.js +22 -0
- package/dist/compiler/client/directives.js.map +1 -0
- package/dist/compiler/client/dynamic.d.ts +5 -0
- package/dist/compiler/client/dynamic.d.ts.map +1 -0
- package/dist/compiler/client/dynamic.js +79 -0
- package/dist/compiler/client/dynamic.js.map +1 -0
- package/dist/compiler/client/element.d.ts +6 -0
- package/dist/compiler/client/element.d.ts.map +1 -0
- package/dist/compiler/client/element.js +492 -0
- package/dist/compiler/client/element.js.map +1 -0
- package/dist/compiler/client/events.d.ts +8 -0
- package/dist/compiler/client/events.d.ts.map +1 -0
- package/dist/compiler/client/events.js +116 -0
- package/dist/compiler/client/events.js.map +1 -0
- package/dist/compiler/client/exports.d.ts +9 -0
- package/dist/compiler/client/exports.d.ts.map +1 -0
- package/dist/compiler/client/exports.js +22 -0
- package/dist/compiler/client/exports.js.map +1 -0
- package/dist/compiler/client/external.d.ts +6 -0
- package/dist/compiler/client/external.d.ts.map +1 -0
- package/dist/compiler/client/external.js +133 -0
- package/dist/compiler/client/external.js.map +1 -0
- package/dist/compiler/client/hot.d.ts +3 -0
- package/dist/compiler/client/hot.d.ts.map +1 -0
- package/dist/compiler/client/hot.js +54 -0
- package/dist/compiler/client/hot.js.map +1 -0
- package/dist/compiler/client/index.d.ts +26 -0
- package/dist/compiler/client/index.d.ts.map +1 -0
- package/dist/compiler/client/index.js +241 -0
- package/dist/compiler/client/index.js.map +1 -0
- package/dist/compiler/client/inspect.d.ts +11 -0
- package/dist/compiler/client/inspect.d.ts.map +1 -0
- package/dist/compiler/client/inspect.js +127 -0
- package/dist/compiler/client/inspect.js.map +1 -0
- package/dist/compiler/client/loss.d.ts +14 -0
- package/dist/compiler/client/loss.d.ts.map +1 -0
- package/dist/compiler/client/loss.js +39 -0
- package/dist/compiler/client/loss.js.map +1 -0
- package/dist/compiler/client/markup.d.ts +24 -0
- package/dist/compiler/client/markup.d.ts.map +1 -0
- package/dist/compiler/client/markup.js +82 -0
- package/dist/compiler/client/markup.js.map +1 -0
- package/dist/compiler/client/meta.d.ts +11 -0
- package/dist/compiler/client/meta.d.ts.map +1 -0
- package/dist/compiler/client/meta.js +43 -0
- package/dist/compiler/client/meta.js.map +1 -0
- package/dist/compiler/client/ownership.d.ts +12 -0
- package/dist/compiler/client/ownership.d.ts.map +1 -0
- package/dist/compiler/client/ownership.js +39 -0
- package/dist/compiler/client/ownership.js.map +1 -0
- package/dist/compiler/client/parameters.d.ts +7 -0
- package/dist/compiler/client/parameters.d.ts.map +1 -0
- package/dist/compiler/client/parameters.js +31 -0
- package/dist/compiler/client/parameters.js.map +1 -0
- package/dist/compiler/client/patterns.d.ts +17 -0
- package/dist/compiler/client/patterns.d.ts.map +1 -0
- package/dist/compiler/client/patterns.js +118 -0
- package/dist/compiler/client/patterns.js.map +1 -0
- package/dist/compiler/client/script.d.ts +42 -0
- package/dist/compiler/client/script.d.ts.map +1 -0
- package/dist/compiler/client/script.js +476 -0
- package/dist/compiler/client/script.js.map +1 -0
- package/dist/compiler/client/special.d.ts +7 -0
- package/dist/compiler/client/special.d.ts.map +1 -0
- package/dist/compiler/client/special.js +148 -0
- package/dist/compiler/client/special.js.map +1 -0
- package/dist/compiler/client/template.d.ts +59 -0
- package/dist/compiler/client/template.d.ts.map +1 -0
- package/dist/compiler/client/template.js +380 -0
- package/dist/compiler/client/template.js.map +1 -0
- package/dist/compiler/client/transitions.d.ts +6 -0
- package/dist/compiler/client/transitions.d.ts.map +1 -0
- package/dist/compiler/client/transitions.js +25 -0
- package/dist/compiler/client/transitions.js.map +1 -0
- package/dist/compiler/client/values.d.ts +8 -0
- package/dist/compiler/client/values.d.ts.map +1 -0
- package/dist/compiler/client/values.js +46 -0
- package/dist/compiler/client/values.js.map +1 -0
- package/dist/compiler/css/analyze.d.ts +12 -0
- package/dist/compiler/css/analyze.d.ts.map +1 -0
- package/dist/compiler/css/analyze.js +252 -0
- package/dist/compiler/css/analyze.js.map +1 -0
- package/dist/compiler/css/attributes.d.ts +3 -0
- package/dist/compiler/css/attributes.d.ts.map +1 -0
- package/dist/compiler/css/attributes.js +207 -0
- package/dist/compiler/css/attributes.js.map +1 -0
- package/dist/compiler/css/hash.d.ts +2 -0
- package/dist/compiler/css/hash.d.ts.map +1 -0
- package/dist/compiler/css/hash.js +2 -0
- package/dist/compiler/css/hash.js.map +1 -0
- package/dist/compiler/css/index.d.ts +42 -0
- package/dist/compiler/css/index.d.ts.map +1 -0
- package/dist/compiler/css/index.js +109 -0
- package/dist/compiler/css/index.js.map +1 -0
- package/dist/compiler/css/marks.d.ts +39 -0
- package/dist/compiler/css/marks.d.ts.map +1 -0
- package/dist/compiler/css/marks.js +90 -0
- package/dist/compiler/css/marks.js.map +1 -0
- package/dist/compiler/css/prune.d.ts +10 -0
- package/dist/compiler/css/prune.d.ts.map +1 -0
- package/dist/compiler/css/prune.js +418 -0
- package/dist/compiler/css/prune.js.map +1 -0
- package/dist/compiler/css/relations.d.ts +25 -0
- package/dist/compiler/css/relations.d.ts.map +1 -0
- package/dist/compiler/css/relations.js +262 -0
- package/dist/compiler/css/relations.js.map +1 -0
- package/dist/compiler/css/render.d.ts +22 -0
- package/dist/compiler/css/render.d.ts.map +1 -0
- package/dist/compiler/css/render.js +389 -0
- package/dist/compiler/css/render.js.map +1 -0
- package/dist/compiler/css/template.d.ts +26 -0
- package/dist/compiler/css/template.d.ts.map +1 -0
- package/dist/compiler/css/template.js +271 -0
- package/dist/compiler/css/template.js.map +1 -0
- package/dist/compiler/ir/estree.d.ts +29 -0
- package/dist/compiler/ir/estree.d.ts.map +1 -0
- package/dist/compiler/ir/estree.js +205 -0
- package/dist/compiler/ir/estree.js.map +1 -0
- package/dist/compiler/ir/maps.d.ts +11 -0
- package/dist/compiler/ir/maps.d.ts.map +1 -0
- package/dist/compiler/ir/maps.js +45 -0
- package/dist/compiler/ir/maps.js.map +1 -0
- package/dist/compiler/ir/nodes.d.ts +197 -0
- package/dist/compiler/ir/nodes.d.ts.map +1 -0
- package/dist/compiler/ir/nodes.js +1 -0
- package/dist/compiler/ir/nodes.js.map +1 -0
- package/dist/compiler/ir/port.d.ts +55 -0
- package/dist/compiler/ir/port.d.ts.map +1 -0
- package/dist/compiler/ir/port.js +9 -0
- package/dist/compiler/ir/port.js.map +1 -0
- package/dist/compiler/ir/runtime.d.ts +16 -0
- package/dist/compiler/ir/runtime.d.ts.map +1 -0
- package/dist/compiler/ir/runtime.js +1 -0
- package/dist/compiler/ir/runtime.js.map +1 -0
- package/dist/compiler/ir/script.d.ts +6 -0
- package/dist/compiler/ir/script.d.ts.map +1 -0
- package/dist/compiler/ir/script.js +33 -0
- package/dist/compiler/ir/script.js.map +1 -0
- package/dist/compiler/ir/style.d.ts +92 -0
- package/dist/compiler/ir/style.d.ts.map +1 -0
- package/dist/compiler/ir/style.js +1 -0
- package/dist/compiler/ir/style.js.map +1 -0
- package/dist/compiler/server/asynchronous.d.ts +8 -0
- package/dist/compiler/server/asynchronous.d.ts.map +1 -0
- package/dist/compiler/server/asynchronous.js +44 -0
- package/dist/compiler/server/asynchronous.js.map +1 -0
- package/dist/compiler/server/bindings.d.ts +15 -0
- package/dist/compiler/server/bindings.d.ts.map +1 -0
- package/dist/compiler/server/bindings.js +80 -0
- package/dist/compiler/server/bindings.js.map +1 -0
- package/dist/compiler/server/blocks.d.ts +7 -0
- package/dist/compiler/server/blocks.d.ts.map +1 -0
- package/dist/compiler/server/blocks.js +136 -0
- package/dist/compiler/server/blocks.js.map +1 -0
- package/dist/compiler/server/classes.d.ts +11 -0
- package/dist/compiler/server/classes.d.ts.map +1 -0
- package/dist/compiler/server/classes.js +100 -0
- package/dist/compiler/server/classes.js.map +1 -0
- package/dist/compiler/server/component.d.ts +11 -0
- package/dist/compiler/server/component.d.ts.map +1 -0
- package/dist/compiler/server/component.js +321 -0
- package/dist/compiler/server/component.js.map +1 -0
- package/dist/compiler/server/external.d.ts +6 -0
- package/dist/compiler/server/external.d.ts.map +1 -0
- package/dist/compiler/server/external.js +130 -0
- package/dist/compiler/server/external.js.map +1 -0
- package/dist/compiler/server/index.d.ts +20 -0
- package/dist/compiler/server/index.d.ts.map +1 -0
- package/dist/compiler/server/index.js +161 -0
- package/dist/compiler/server/index.js.map +1 -0
- package/dist/compiler/server/placement.d.ts +5 -0
- package/dist/compiler/server/placement.d.ts.map +1 -0
- package/dist/compiler/server/placement.js +37 -0
- package/dist/compiler/server/placement.js.map +1 -0
- package/dist/compiler/server/script.d.ts +29 -0
- package/dist/compiler/server/script.d.ts.map +1 -0
- package/dist/compiler/server/script.js +404 -0
- package/dist/compiler/server/script.js.map +1 -0
- package/dist/compiler/server/slot.d.ts +5 -0
- package/dist/compiler/server/slot.d.ts.map +1 -0
- package/dist/compiler/server/slot.js +38 -0
- package/dist/compiler/server/slot.js.map +1 -0
- package/dist/compiler/server/special.d.ts +5 -0
- package/dist/compiler/server/special.d.ts.map +1 -0
- package/dist/compiler/server/special.js +60 -0
- package/dist/compiler/server/special.js.map +1 -0
- package/dist/compiler/server/template.d.ts +28 -0
- package/dist/compiler/server/template.d.ts.map +1 -0
- package/dist/compiler/server/template.js +475 -0
- package/dist/compiler/server/template.js.map +1 -0
- package/dist/entries/action.d.ts +9 -0
- package/dist/entries/action.d.ts.map +1 -0
- package/dist/entries/action.js +1 -0
- package/dist/entries/action.js.map +1 -0
- package/dist/entries/animate.d.ts +4 -0
- package/dist/entries/animate.d.ts.map +1 -0
- package/dist/entries/animate.js +2 -0
- package/dist/entries/animate.js.map +1 -0
- package/dist/entries/attachments.d.ts +6 -0
- package/dist/entries/attachments.d.ts.map +1 -0
- package/dist/entries/attachments.js +23 -0
- package/dist/entries/attachments.js.map +1 -0
- package/dist/entries/compiler.d.ts +61 -0
- package/dist/entries/compiler.d.ts.map +1 -0
- package/dist/entries/compiler.js +97 -0
- package/dist/entries/compiler.js.map +1 -0
- package/dist/entries/easing.d.ts +2 -0
- package/dist/entries/easing.d.ts.map +1 -0
- package/dist/entries/easing.js +2 -0
- package/dist/entries/easing.js.map +1 -0
- package/dist/entries/events.d.ts +2 -0
- package/dist/entries/events.d.ts.map +1 -0
- package/dist/entries/events.js +5 -0
- package/dist/entries/events.js.map +1 -0
- package/dist/entries/index-server.d.ts +37 -0
- package/dist/entries/index-server.d.ts.map +1 -0
- package/dist/entries/index-server.js +62 -0
- package/dist/entries/index-server.js.map +1 -0
- package/dist/entries/index.d.ts +29 -0
- package/dist/entries/index.d.ts.map +1 -0
- package/dist/entries/index.js +19 -0
- package/dist/entries/index.js.map +1 -0
- package/dist/entries/internal/client.d.ts +54 -0
- package/dist/entries/internal/client.d.ts.map +1 -0
- package/dist/entries/internal/client.js +50 -0
- package/dist/entries/internal/client.js.map +1 -0
- package/dist/entries/internal/server.d.ts +18 -0
- package/dist/entries/internal/server.d.ts.map +1 -0
- package/dist/entries/internal/server.js +16 -0
- package/dist/entries/internal/server.js.map +1 -0
- package/dist/entries/motion-server.d.ts +6 -0
- package/dist/entries/motion-server.d.ts.map +1 -0
- package/dist/entries/motion-server.js +4 -0
- package/dist/entries/motion-server.js.map +1 -0
- package/dist/entries/motion.d.ts +6 -0
- package/dist/entries/motion.d.ts.map +1 -0
- package/dist/entries/motion.js +4 -0
- package/dist/entries/motion.js.map +1 -0
- package/dist/entries/reactivity-server.d.ts +17 -0
- package/dist/entries/reactivity-server.d.ts.map +1 -0
- package/dist/entries/reactivity-server.js +7 -0
- package/dist/entries/reactivity-server.js.map +1 -0
- package/dist/entries/reactivity.d.ts +8 -0
- package/dist/entries/reactivity.d.ts.map +1 -0
- package/dist/entries/reactivity.js +8 -0
- package/dist/entries/reactivity.js.map +1 -0
- package/dist/entries/server.d.ts +5 -0
- package/dist/entries/server.d.ts.map +1 -0
- package/dist/entries/server.js +2 -0
- package/dist/entries/server.js.map +1 -0
- package/dist/entries/transition.d.ts +5 -0
- package/dist/entries/transition.d.ts.map +1 -0
- package/dist/entries/transition.js +2 -0
- package/dist/entries/transition.js.map +1 -0
- package/dist/entries/window-server.d.ts +2 -0
- package/dist/entries/window-server.d.ts.map +1 -0
- package/dist/entries/window-server.js +2 -0
- package/dist/entries/window-server.js.map +1 -0
- package/dist/entries/window.d.ts +2 -0
- package/dist/entries/window.d.ts.map +1 -0
- package/dist/entries/window.js +2 -0
- package/dist/entries/window.js.map +1 -0
- package/dist/runtime/classes/date.d.ts +5 -0
- package/dist/runtime/classes/date.d.ts.map +1 -0
- package/dist/runtime/classes/date.js +58 -0
- package/dist/runtime/classes/date.js.map +1 -0
- package/dist/runtime/classes/frames.d.ts +6 -0
- package/dist/runtime/classes/frames.d.ts.map +1 -0
- package/dist/runtime/classes/frames.js +28 -0
- package/dist/runtime/classes/frames.js.map +1 -0
- package/dist/runtime/classes/local.d.ts +3 -0
- package/dist/runtime/classes/local.d.ts.map +1 -0
- package/dist/runtime/classes/local.js +6 -0
- package/dist/runtime/classes/local.js.map +1 -0
- package/dist/runtime/classes/map.d.ts +18 -0
- package/dist/runtime/classes/map.d.ts.map +1 -0
- package/dist/runtime/classes/map.js +126 -0
- package/dist/runtime/classes/map.js.map +1 -0
- package/dist/runtime/classes/media.d.ts +6 -0
- package/dist/runtime/classes/media.d.ts.map +1 -0
- package/dist/runtime/classes/media.js +22 -0
- package/dist/runtime/classes/media.js.map +1 -0
- package/dist/runtime/classes/motion.d.ts +3 -0
- package/dist/runtime/classes/motion.d.ts.map +1 -0
- package/dist/runtime/classes/motion.js +3 -0
- package/dist/runtime/classes/motion.js.map +1 -0
- package/dist/runtime/classes/search.d.ts +23 -0
- package/dist/runtime/classes/search.d.ts.map +1 -0
- package/dist/runtime/classes/search.js +115 -0
- package/dist/runtime/classes/search.js.map +1 -0
- package/dist/runtime/classes/server.d.ts +8 -0
- package/dist/runtime/classes/server.d.ts.map +1 -0
- package/dist/runtime/classes/server.js +13 -0
- package/dist/runtime/classes/server.js.map +1 -0
- package/dist/runtime/classes/set.d.ts +28 -0
- package/dist/runtime/classes/set.d.ts.map +1 -0
- package/dist/runtime/classes/set.js +113 -0
- package/dist/runtime/classes/set.js.map +1 -0
- package/dist/runtime/classes/spring.d.ts +25 -0
- package/dist/runtime/classes/spring.d.ts.map +1 -0
- package/dist/runtime/classes/spring.js +154 -0
- package/dist/runtime/classes/spring.js.map +1 -0
- package/dist/runtime/classes/subscriber.d.ts +10 -0
- package/dist/runtime/classes/subscriber.d.ts.map +1 -0
- package/dist/runtime/classes/subscriber.js +46 -0
- package/dist/runtime/classes/subscriber.js.map +1 -0
- package/dist/runtime/classes/tween.d.ts +17 -0
- package/dist/runtime/classes/tween.d.ts.map +1 -0
- package/dist/runtime/classes/tween.js +112 -0
- package/dist/runtime/classes/tween.js.map +1 -0
- package/dist/runtime/classes/url.d.ts +30 -0
- package/dist/runtime/classes/url.d.ts.map +1 -0
- package/dist/runtime/classes/url.js +127 -0
- package/dist/runtime/classes/url.js.map +1 -0
- package/dist/runtime/classes/window-server.d.ts +14 -0
- package/dist/runtime/classes/window-server.d.ts.map +1 -0
- package/dist/runtime/classes/window-server.js +14 -0
- package/dist/runtime/classes/window-server.js.map +1 -0
- package/dist/runtime/classes/window.d.ts +18 -0
- package/dist/runtime/classes/window.d.ts.map +1 -0
- package/dist/runtime/classes/window.js +54 -0
- package/dist/runtime/classes/window.js.map +1 -0
- package/dist/runtime/dom/async.d.ts +21 -0
- package/dist/runtime/dom/async.d.ts.map +1 -0
- package/dist/runtime/dom/async.js +179 -0
- package/dist/runtime/dom/async.js.map +1 -0
- package/dist/runtime/dom/attachments.d.ts +18 -0
- package/dist/runtime/dom/attachments.d.ts.map +1 -0
- package/dist/runtime/dom/attachments.js +134 -0
- package/dist/runtime/dom/attachments.js.map +1 -0
- package/dist/runtime/dom/attributes.d.ts +21 -0
- package/dist/runtime/dom/attributes.d.ts.map +1 -0
- package/dist/runtime/dom/attributes.js +450 -0
- package/dist/runtime/dom/attributes.js.map +1 -0
- package/dist/runtime/dom/await.d.ts +5 -0
- package/dist/runtime/dom/await.d.ts.map +1 -0
- package/dist/runtime/dom/await.js +95 -0
- package/dist/runtime/dom/await.js.map +1 -0
- package/dist/runtime/dom/bindings.d.ts +21 -0
- package/dist/runtime/dom/bindings.d.ts.map +1 -0
- package/dist/runtime/dom/bindings.js +299 -0
- package/dist/runtime/dom/bindings.js.map +1 -0
- package/dist/runtime/dom/blocks.d.ts +4 -0
- package/dist/runtime/dom/blocks.d.ts.map +1 -0
- package/dist/runtime/dom/blocks.js +32 -0
- package/dist/runtime/dom/blocks.js.map +1 -0
- package/dist/runtime/dom/boundary.d.ts +14 -0
- package/dist/runtime/dom/boundary.d.ts.map +1 -0
- package/dist/runtime/dom/boundary.js +313 -0
- package/dist/runtime/dom/boundary.js.map +1 -0
- package/dist/runtime/dom/branches.d.ts +14 -0
- package/dist/runtime/dom/branches.d.ts.map +1 -0
- package/dist/runtime/dom/branches.js +210 -0
- package/dist/runtime/dom/branches.js.map +1 -0
- package/dist/runtime/dom/context.d.ts +9 -0
- package/dist/runtime/dom/context.d.ts.map +1 -0
- package/dist/runtime/dom/context.js +78 -0
- package/dist/runtime/dom/context.js.map +1 -0
- package/dist/runtime/dom/custom-element.d.ts +16 -0
- package/dist/runtime/dom/custom-element.d.ts.map +1 -0
- package/dist/runtime/dom/custom-element.js +198 -0
- package/dist/runtime/dom/custom-element.js.map +1 -0
- package/dist/runtime/dom/data.d.ts +11 -0
- package/dist/runtime/dom/data.d.ts.map +1 -0
- package/dist/runtime/dom/data.js +114 -0
- package/dist/runtime/dom/data.js.map +1 -0
- package/dist/runtime/dom/element.d.ts +3 -0
- package/dist/runtime/dom/element.d.ts.map +1 -0
- package/dist/runtime/dom/element.js +81 -0
- package/dist/runtime/dom/element.js.map +1 -0
- package/dist/runtime/dom/events.d.ts +9 -0
- package/dist/runtime/dom/events.d.ts.map +1 -0
- package/dist/runtime/dom/events.js +211 -0
- package/dist/runtime/dom/events.js.map +1 -0
- package/dist/runtime/dom/head.d.ts +4 -0
- package/dist/runtime/dom/head.d.ts.map +1 -0
- package/dist/runtime/dom/head.js +54 -0
- package/dist/runtime/dom/head.js.map +1 -0
- package/dist/runtime/dom/hot.d.ts +15 -0
- package/dist/runtime/dom/hot.d.ts.map +1 -0
- package/dist/runtime/dom/hot.js +38 -0
- package/dist/runtime/dom/hot.js.map +1 -0
- package/dist/runtime/dom/html.d.ts +7 -0
- package/dist/runtime/dom/html.d.ts.map +1 -0
- package/dist/runtime/dom/html.js +91 -0
- package/dist/runtime/dom/html.js.map +1 -0
- package/dist/runtime/dom/hydration.d.ts +16 -0
- package/dist/runtime/dom/hydration.d.ts.map +1 -0
- package/dist/runtime/dom/hydration.js +92 -0
- package/dist/runtime/dom/hydration.js.map +1 -0
- package/dist/runtime/dom/inspect.d.ts +2 -0
- package/dist/runtime/dom/inspect.d.ts.map +1 -0
- package/dist/runtime/dom/inspect.js +71 -0
- package/dist/runtime/dom/inspect.js.map +1 -0
- package/dist/runtime/dom/list.d.ts +7 -0
- package/dist/runtime/dom/list.d.ts.map +1 -0
- package/dist/runtime/dom/list.js +388 -0
- package/dist/runtime/dom/list.js.map +1 -0
- package/dist/runtime/dom/media.d.ts +26 -0
- package/dist/runtime/dom/media.d.ts.map +1 -0
- package/dist/runtime/dom/media.js +126 -0
- package/dist/runtime/dom/media.js.map +1 -0
- package/dist/runtime/dom/meta.d.ts +16 -0
- package/dist/runtime/dom/meta.d.ts.map +1 -0
- package/dist/runtime/dom/meta.js +48 -0
- package/dist/runtime/dom/meta.js.map +1 -0
- package/dist/runtime/dom/mount.d.ts +23 -0
- package/dist/runtime/dom/mount.d.ts.map +1 -0
- package/dist/runtime/dom/mount.js +134 -0
- package/dist/runtime/dom/mount.js.map +1 -0
- package/dist/runtime/dom/ownership.d.ts +6 -0
- package/dist/runtime/dom/ownership.d.ts.map +1 -0
- package/dist/runtime/dom/ownership.js +32 -0
- package/dist/runtime/dom/ownership.js.map +1 -0
- package/dist/runtime/dom/props.d.ts +20 -0
- package/dist/runtime/dom/props.d.ts.map +1 -0
- package/dist/runtime/dom/props.js +193 -0
- package/dist/runtime/dom/props.js.map +1 -0
- package/dist/runtime/dom/range.d.ts +16 -0
- package/dist/runtime/dom/range.d.ts.map +1 -0
- package/dist/runtime/dom/range.js +120 -0
- package/dist/runtime/dom/range.js.map +1 -0
- package/dist/runtime/dom/reset.d.ts +4 -0
- package/dist/runtime/dom/reset.d.ts.map +1 -0
- package/dist/runtime/dom/reset.js +39 -0
- package/dist/runtime/dom/reset.js.map +1 -0
- package/dist/runtime/dom/select.d.ts +8 -0
- package/dist/runtime/dom/select.d.ts.map +1 -0
- package/dist/runtime/dom/select.js +175 -0
- package/dist/runtime/dom/select.js.map +1 -0
- package/dist/runtime/dom/snippet.d.ts +7 -0
- package/dist/runtime/dom/snippet.d.ts.map +1 -0
- package/dist/runtime/dom/snippet.js +49 -0
- package/dist/runtime/dom/snippet.js.map +1 -0
- package/dist/runtime/dom/styles.d.ts +6 -0
- package/dist/runtime/dom/styles.d.ts.map +1 -0
- package/dist/runtime/dom/styles.js +22 -0
- package/dist/runtime/dom/styles.js.map +1 -0
- package/dist/runtime/dom/swap.d.ts +10 -0
- package/dist/runtime/dom/swap.d.ts.map +1 -0
- package/dist/runtime/dom/swap.js +84 -0
- package/dist/runtime/dom/swap.js.map +1 -0
- package/dist/runtime/dom/targets.d.ts +9 -0
- package/dist/runtime/dom/targets.d.ts.map +1 -0
- package/dist/runtime/dom/targets.js +84 -0
- package/dist/runtime/dom/targets.js.map +1 -0
- package/dist/runtime/dom/template.d.ts +19 -0
- package/dist/runtime/dom/template.d.ts.map +1 -0
- package/dist/runtime/dom/template.js +269 -0
- package/dist/runtime/dom/template.js.map +1 -0
- package/dist/runtime/dom/trusted.d.ts +4 -0
- package/dist/runtime/dom/trusted.d.ts.map +1 -0
- package/dist/runtime/dom/trusted.js +47 -0
- package/dist/runtime/dom/trusted.js.map +1 -0
- package/dist/runtime/dom/values.d.ts +4 -0
- package/dist/runtime/dom/values.d.ts.map +1 -0
- package/dist/runtime/dom/values.js +31 -0
- package/dist/runtime/dom/values.js.map +1 -0
- package/dist/runtime/reactivity/abort.d.ts +8 -0
- package/dist/runtime/reactivity/abort.d.ts.map +1 -0
- package/dist/runtime/reactivity/abort.js +50 -0
- package/dist/runtime/reactivity/abort.js.map +1 -0
- package/dist/runtime/reactivity/async.d.ts +13 -0
- package/dist/runtime/reactivity/async.d.ts.map +1 -0
- package/dist/runtime/reactivity/async.js +285 -0
- package/dist/runtime/reactivity/async.js.map +1 -0
- package/dist/runtime/reactivity/batch.d.ts +84 -0
- package/dist/runtime/reactivity/batch.d.ts.map +1 -0
- package/dist/runtime/reactivity/batch.js +359 -0
- package/dist/runtime/reactivity/batch.js.map +1 -0
- package/dist/runtime/reactivity/carried.d.ts +15 -0
- package/dist/runtime/reactivity/carried.d.ts.map +1 -0
- package/dist/runtime/reactivity/carried.js +49 -0
- package/dist/runtime/reactivity/carried.js.map +1 -0
- package/dist/runtime/reactivity/collector.d.ts +4 -0
- package/dist/runtime/reactivity/collector.d.ts.map +1 -0
- package/dist/runtime/reactivity/collector.js +19 -0
- package/dist/runtime/reactivity/collector.js.map +1 -0
- package/dist/runtime/reactivity/drafts.d.ts +25 -0
- package/dist/runtime/reactivity/drafts.d.ts.map +1 -0
- package/dist/runtime/reactivity/drafts.js +125 -0
- package/dist/runtime/reactivity/drafts.js.map +1 -0
- package/dist/runtime/reactivity/eager.d.ts +5 -0
- package/dist/runtime/reactivity/eager.d.ts.map +1 -0
- package/dist/runtime/reactivity/eager.js +45 -0
- package/dist/runtime/reactivity/eager.js.map +1 -0
- package/dist/runtime/reactivity/edges.d.ts +14 -0
- package/dist/runtime/reactivity/edges.d.ts.map +1 -0
- package/dist/runtime/reactivity/edges.js +207 -0
- package/dist/runtime/reactivity/edges.js.map +1 -0
- package/dist/runtime/reactivity/effects.d.ts +41 -0
- package/dist/runtime/reactivity/effects.d.ts.map +1 -0
- package/dist/runtime/reactivity/effects.js +618 -0
- package/dist/runtime/reactivity/effects.js.map +1 -0
- package/dist/runtime/reactivity/errors.d.ts +12 -0
- package/dist/runtime/reactivity/errors.d.ts.map +1 -0
- package/dist/runtime/reactivity/errors.js +38 -0
- package/dist/runtime/reactivity/errors.js.map +1 -0
- package/dist/runtime/reactivity/external.d.ts +3 -0
- package/dist/runtime/reactivity/external.d.ts.map +1 -0
- package/dist/runtime/reactivity/external.js +48 -0
- package/dist/runtime/reactivity/external.js.map +1 -0
- package/dist/runtime/reactivity/fork.d.ts +6 -0
- package/dist/runtime/reactivity/fork.d.ts.map +1 -0
- package/dist/runtime/reactivity/fork.js +64 -0
- package/dist/runtime/reactivity/fork.js.map +1 -0
- package/dist/runtime/reactivity/front.d.ts +5 -0
- package/dist/runtime/reactivity/front.d.ts.map +1 -0
- package/dist/runtime/reactivity/front.js +16 -0
- package/dist/runtime/reactivity/front.js.map +1 -0
- package/dist/runtime/reactivity/graph.d.ts +86 -0
- package/dist/runtime/reactivity/graph.d.ts.map +1 -0
- package/dist/runtime/reactivity/graph.js +38 -0
- package/dist/runtime/reactivity/graph.js.map +1 -0
- package/dist/runtime/reactivity/handlers.d.ts +6 -0
- package/dist/runtime/reactivity/handlers.d.ts.map +1 -0
- package/dist/runtime/reactivity/handlers.js +48 -0
- package/dist/runtime/reactivity/handlers.js.map +1 -0
- package/dist/runtime/reactivity/held.d.ts +12 -0
- package/dist/runtime/reactivity/held.d.ts.map +1 -0
- package/dist/runtime/reactivity/held.js +343 -0
- package/dist/runtime/reactivity/held.js.map +1 -0
- package/dist/runtime/reactivity/history.d.ts +25 -0
- package/dist/runtime/reactivity/history.d.ts.map +1 -0
- package/dist/runtime/reactivity/history.js +88 -0
- package/dist/runtime/reactivity/history.js.map +1 -0
- package/dist/runtime/reactivity/latest.d.ts +2 -0
- package/dist/runtime/reactivity/latest.d.ts.map +1 -0
- package/dist/runtime/reactivity/latest.js +42 -0
- package/dist/runtime/reactivity/latest.js.map +1 -0
- package/dist/runtime/reactivity/leaving.d.ts +30 -0
- package/dist/runtime/reactivity/leaving.d.ts.map +1 -0
- package/dist/runtime/reactivity/leaving.js +278 -0
- package/dist/runtime/reactivity/leaving.js.map +1 -0
- package/dist/runtime/reactivity/loss.d.ts +5 -0
- package/dist/runtime/reactivity/loss.d.ts.map +1 -0
- package/dist/runtime/reactivity/loss.js +70 -0
- package/dist/runtime/reactivity/loss.js.map +1 -0
- package/dist/runtime/reactivity/outgoing.d.ts +11 -0
- package/dist/runtime/reactivity/outgoing.d.ts.map +1 -0
- package/dist/runtime/reactivity/outgoing.js +37 -0
- package/dist/runtime/reactivity/outgoing.js.map +1 -0
- package/dist/runtime/reactivity/owners.d.ts +33 -0
- package/dist/runtime/reactivity/owners.d.ts.map +1 -0
- package/dist/runtime/reactivity/owners.js +215 -0
- package/dist/runtime/reactivity/owners.js.map +1 -0
- package/dist/runtime/reactivity/past.d.ts +9 -0
- package/dist/runtime/reactivity/past.d.ts.map +1 -0
- package/dist/runtime/reactivity/past.js +57 -0
- package/dist/runtime/reactivity/past.js.map +1 -0
- package/dist/runtime/reactivity/provenance.d.ts +34 -0
- package/dist/runtime/reactivity/provenance.d.ts.map +1 -0
- package/dist/runtime/reactivity/provenance.js +163 -0
- package/dist/runtime/reactivity/provenance.js.map +1 -0
- package/dist/runtime/reactivity/proxy.d.ts +6 -0
- package/dist/runtime/reactivity/proxy.d.ts.map +1 -0
- package/dist/runtime/reactivity/proxy.js +219 -0
- package/dist/runtime/reactivity/proxy.js.map +1 -0
- package/dist/runtime/reactivity/public.d.ts +16 -0
- package/dist/runtime/reactivity/public.d.ts.map +1 -0
- package/dist/runtime/reactivity/public.js +28 -0
- package/dist/runtime/reactivity/public.js.map +1 -0
- package/dist/runtime/reactivity/reads.d.ts +7 -0
- package/dist/runtime/reactivity/reads.d.ts.map +1 -0
- package/dist/runtime/reactivity/reads.js +383 -0
- package/dist/runtime/reactivity/reads.js.map +1 -0
- package/dist/runtime/reactivity/scheduler.d.ts +8 -0
- package/dist/runtime/reactivity/scheduler.d.ts.map +1 -0
- package/dist/runtime/reactivity/scheduler.js +406 -0
- package/dist/runtime/reactivity/scheduler.js.map +1 -0
- package/dist/runtime/reactivity/settle.d.ts +6 -0
- package/dist/runtime/reactivity/settle.d.ts.map +1 -0
- package/dist/runtime/reactivity/settle.js +76 -0
- package/dist/runtime/reactivity/settle.js.map +1 -0
- package/dist/runtime/reactivity/sources.d.ts +17 -0
- package/dist/runtime/reactivity/sources.d.ts.map +1 -0
- package/dist/runtime/reactivity/sources.js +124 -0
- package/dist/runtime/reactivity/sources.js.map +1 -0
- package/dist/runtime/reactivity/tallies.d.ts +12 -0
- package/dist/runtime/reactivity/tallies.d.ts.map +1 -0
- package/dist/runtime/reactivity/tallies.js +25 -0
- package/dist/runtime/reactivity/tallies.js.map +1 -0
- package/dist/runtime/reactivity/tasks.d.ts +3 -0
- package/dist/runtime/reactivity/tasks.d.ts.map +1 -0
- package/dist/runtime/reactivity/tasks.js +35 -0
- package/dist/runtime/reactivity/tasks.js.map +1 -0
- package/dist/runtime/reactivity/trace.d.ts +5 -0
- package/dist/runtime/reactivity/trace.d.ts.map +1 -0
- package/dist/runtime/reactivity/trace.js +109 -0
- package/dist/runtime/reactivity/trace.js.map +1 -0
- package/dist/runtime/reactivity/tracking.d.ts +62 -0
- package/dist/runtime/reactivity/tracking.d.ts.map +1 -0
- package/dist/runtime/reactivity/tracking.js +520 -0
- package/dist/runtime/reactivity/tracking.js.map +1 -0
- package/dist/runtime/reactivity/units.d.ts +12 -0
- package/dist/runtime/reactivity/units.d.ts.map +1 -0
- package/dist/runtime/reactivity/units.js +112 -0
- package/dist/runtime/reactivity/units.js.map +1 -0
- package/dist/runtime/reactivity/views.d.ts +12 -0
- package/dist/runtime/reactivity/views.d.ts.map +1 -0
- package/dist/runtime/reactivity/views.js +105 -0
- package/dist/runtime/reactivity/views.js.map +1 -0
- package/dist/runtime/server/attributes.d.ts +9 -0
- package/dist/runtime/server/attributes.d.ts.map +1 -0
- package/dist/runtime/server/attributes.js +73 -0
- package/dist/runtime/server/attributes.js.map +1 -0
- package/dist/runtime/server/cells.d.ts +9 -0
- package/dist/runtime/server/cells.d.ts.map +1 -0
- package/dist/runtime/server/cells.js +120 -0
- package/dist/runtime/server/cells.js.map +1 -0
- package/dist/runtime/server/context.d.ts +51 -0
- package/dist/runtime/server/context.d.ts.map +1 -0
- package/dist/runtime/server/context.js +260 -0
- package/dist/runtime/server/context.js.map +1 -0
- package/dist/runtime/server/derived.d.ts +5 -0
- package/dist/runtime/server/derived.d.ts.map +1 -0
- package/dist/runtime/server/derived.js +30 -0
- package/dist/runtime/server/derived.js.map +1 -0
- package/dist/runtime/server/external.d.ts +3 -0
- package/dist/runtime/server/external.d.ts.map +1 -0
- package/dist/runtime/server/external.js +53 -0
- package/dist/runtime/server/external.js.map +1 -0
- package/dist/runtime/server/hydration.d.ts +26 -0
- package/dist/runtime/server/hydration.d.ts.map +1 -0
- package/dist/runtime/server/hydration.js +187 -0
- package/dist/runtime/server/hydration.js.map +1 -0
- package/dist/runtime/server/placement.d.ts +9 -0
- package/dist/runtime/server/placement.d.ts.map +1 -0
- package/dist/runtime/server/placement.js +35 -0
- package/dist/runtime/server/placement.js.map +1 -0
- package/dist/runtime/server/render.d.ts +89 -0
- package/dist/runtime/server/render.d.ts.map +1 -0
- package/dist/runtime/server/render.js +470 -0
- package/dist/runtime/server/render.js.map +1 -0
- package/dist/runtime/server/snippet.d.ts +7 -0
- package/dist/runtime/server/snippet.d.ts.map +1 -0
- package/dist/runtime/server/snippet.js +15 -0
- package/dist/runtime/server/snippet.js.map +1 -0
- package/dist/runtime/transitions/animate.d.ts +22 -0
- package/dist/runtime/transitions/animate.d.ts.map +1 -0
- package/dist/runtime/transitions/animate.js +140 -0
- package/dist/runtime/transitions/animate.js.map +1 -0
- package/dist/runtime/transitions/easing.d.ts +33 -0
- package/dist/runtime/transitions/easing.d.ts.map +1 -0
- package/dist/runtime/transitions/easing.js +128 -0
- package/dist/runtime/transitions/easing.js.map +1 -0
- package/dist/runtime/transitions/flip.d.ts +12 -0
- package/dist/runtime/transitions/flip.d.ts.map +1 -0
- package/dist/runtime/transitions/flip.js +51 -0
- package/dist/runtime/transitions/flip.js.map +1 -0
- package/dist/runtime/transitions/frame.d.ts +37 -0
- package/dist/runtime/transitions/frame.d.ts.map +1 -0
- package/dist/runtime/transitions/frame.js +219 -0
- package/dist/runtime/transitions/frame.js.map +1 -0
- package/dist/runtime/transitions/layout.d.ts +37 -0
- package/dist/runtime/transitions/layout.d.ts.map +1 -0
- package/dist/runtime/transitions/layout.js +150 -0
- package/dist/runtime/transitions/layout.js.map +1 -0
- package/dist/runtime/transitions/manager.d.ts +30 -0
- package/dist/runtime/transitions/manager.d.ts.map +1 -0
- package/dist/runtime/transitions/manager.js +278 -0
- package/dist/runtime/transitions/manager.js.map +1 -0
- package/dist/runtime/transitions/placement.d.ts +25 -0
- package/dist/runtime/transitions/placement.d.ts.map +1 -0
- package/dist/runtime/transitions/placement.js +135 -0
- package/dist/runtime/transitions/placement.js.map +1 -0
- package/dist/runtime/transitions/presets.d.ts +53 -0
- package/dist/runtime/transitions/presets.d.ts.map +1 -0
- package/dist/runtime/transitions/presets.js +266 -0
- package/dist/runtime/transitions/presets.js.map +1 -0
- package/dist/shared/abort.d.ts +6 -0
- package/dist/shared/abort.d.ts.map +1 -0
- package/dist/shared/abort.js +8 -0
- package/dist/shared/abort.js.map +1 -0
- package/dist/shared/assignment.d.ts +6 -0
- package/dist/shared/assignment.d.ts.map +1 -0
- package/dist/shared/assignment.js +19 -0
- package/dist/shared/assignment.js.map +1 -0
- package/dist/shared/attributes.d.ts +8 -0
- package/dist/shared/attributes.d.ts.map +1 -0
- package/dist/shared/attributes.js +120 -0
- package/dist/shared/attributes.js.map +1 -0
- package/dist/shared/clone.d.ts +2 -0
- package/dist/shared/clone.d.ts.map +1 -0
- package/dist/shared/clone.js +76 -0
- package/dist/shared/clone.js.map +1 -0
- package/dist/shared/context.d.ts +15 -0
- package/dist/shared/context.d.ts.map +1 -0
- package/dist/shared/context.js +16 -0
- package/dist/shared/context.js.map +1 -0
- package/dist/shared/diagnostics.d.ts +22 -0
- package/dist/shared/diagnostics.d.ts.map +1 -0
- package/dist/shared/diagnostics.js +58 -0
- package/dist/shared/diagnostics.js.map +1 -0
- package/dist/shared/escape.d.ts +3 -0
- package/dist/shared/escape.d.ts.map +1 -0
- package/dist/shared/escape.js +17 -0
- package/dist/shared/escape.js.map +1 -0
- package/dist/shared/external.d.ts +37 -0
- package/dist/shared/external.d.ts.map +1 -0
- package/dist/shared/external.js +76 -0
- package/dist/shared/external.js.map +1 -0
- package/dist/shared/format.d.ts +9 -0
- package/dist/shared/format.d.ts.map +1 -0
- package/dist/shared/format.js +10 -0
- package/dist/shared/format.js.map +1 -0
- package/dist/shared/hash.d.ts +2 -0
- package/dist/shared/hash.d.ts.map +1 -0
- package/dist/shared/hash.js +9 -0
- package/dist/shared/hash.js.map +1 -0
- package/dist/shared/html.d.ts +18 -0
- package/dist/shared/html.d.ts.map +1 -0
- package/dist/shared/html.js +277 -0
- package/dist/shared/html.js.map +1 -0
- package/dist/shared/markers.d.ts +12 -0
- package/dist/shared/markers.d.ts.map +1 -0
- package/dist/shared/markers.js +16 -0
- package/dist/shared/markers.js.map +1 -0
- package/dist/shared/nesting.d.ts +3 -0
- package/dist/shared/nesting.d.ts.map +1 -0
- package/dist/shared/nesting.js +143 -0
- package/dist/shared/nesting.js.map +1 -0
- package/dist/shared/slots.d.ts +8 -0
- package/dist/shared/slots.d.ts.map +1 -0
- package/dist/shared/slots.js +9 -0
- package/dist/shared/slots.js.map +1 -0
- package/dist/shared/snippet.d.ts +11 -0
- package/dist/shared/snippet.d.ts.map +1 -0
- package/dist/shared/snippet.js +11 -0
- package/dist/shared/snippet.js.map +1 -0
- package/package.json +54 -3
- package/src/compiler/analysis/asynchronous.ts +206 -0
- package/src/compiler/analysis/classes.ts +110 -0
- package/src/compiler/analysis/ignoring.ts +25 -0
- package/src/compiler/analysis/index.ts +433 -0
- package/src/compiler/analysis/scope.ts +410 -0
- package/src/compiler/analysis/template.ts +525 -0
- package/src/compiler/analysis/validate/a11y/attributes.ts +252 -0
- package/src/compiler/analysis/validate/a11y/axobject-query.d.ts +20 -0
- package/src/compiler/analysis/validate/a11y/elements.ts +241 -0
- package/src/compiler/analysis/validate/a11y/facts.ts +102 -0
- package/src/compiler/analysis/validate/a11y/fuzzy.ts +123 -0
- package/src/compiler/analysis/validate/a11y/index.ts +24 -0
- package/src/compiler/analysis/validate/a11y/interactions.ts +125 -0
- package/src/compiler/analysis/validate/a11y/roles.ts +182 -0
- package/src/compiler/analysis/validate/a11y/tables.ts +250 -0
- package/src/compiler/analysis/validate/assignment.ts +74 -0
- package/src/compiler/analysis/validate/bindings.ts +210 -0
- package/src/compiler/analysis/validate/classes.ts +102 -0
- package/src/compiler/analysis/validate/context.ts +119 -0
- package/src/compiler/analysis/validate/element.ts +148 -0
- package/src/compiler/analysis/validate/front.ts +75 -0
- package/src/compiler/analysis/validate/index.ts +268 -0
- package/src/compiler/analysis/validate/messages.ts +451 -0
- package/src/compiler/analysis/validate/report.ts +100 -0
- package/src/compiler/analysis/validate/scope.ts +241 -0
- package/src/compiler/analysis/validate/scopes.ts +460 -0
- package/src/compiler/analysis/validate/script.ts +528 -0
- package/src/compiler/analysis/validate/template.ts +326 -0
- package/src/compiler/analysis/whitespace.ts +87 -0
- package/src/compiler/client/asynchronous.ts +68 -0
- package/src/compiler/client/bindings.ts +246 -0
- package/src/compiler/client/blocks.ts +239 -0
- package/src/compiler/client/classes.ts +154 -0
- package/src/compiler/client/component.ts +549 -0
- package/src/compiler/client/constants.ts +107 -0
- package/src/compiler/client/custom-element.ts +173 -0
- package/src/compiler/client/directives.ts +35 -0
- package/src/compiler/client/dynamic.ts +85 -0
- package/src/compiler/client/element.ts +631 -0
- package/src/compiler/client/events.ts +147 -0
- package/src/compiler/client/exports.ts +39 -0
- package/src/compiler/client/external.ts +190 -0
- package/src/compiler/client/hot.ts +62 -0
- package/src/compiler/client/index.ts +307 -0
- package/src/compiler/client/inspect.ts +153 -0
- package/src/compiler/client/loss.ts +53 -0
- package/src/compiler/client/markup.ts +126 -0
- package/src/compiler/client/meta.ts +64 -0
- package/src/compiler/client/ownership.ts +54 -0
- package/src/compiler/client/parameters.ts +38 -0
- package/src/compiler/client/patterns.ts +154 -0
- package/src/compiler/client/script.ts +587 -0
- package/src/compiler/client/special.ts +177 -0
- package/src/compiler/client/template.ts +533 -0
- package/src/compiler/client/transitions.ts +38 -0
- package/src/compiler/client/values.ts +52 -0
- package/src/compiler/css/analyze.ts +281 -0
- package/src/compiler/css/attributes.ts +195 -0
- package/src/compiler/css/hash.ts +1 -0
- package/src/compiler/css/index.ts +152 -0
- package/src/compiler/css/marks.ts +142 -0
- package/src/compiler/css/prune.ts +466 -0
- package/src/compiler/css/relations.ts +264 -0
- package/src/compiler/css/render.ts +422 -0
- package/src/compiler/css/template.ts +297 -0
- package/src/compiler/ir/estree.ts +256 -0
- package/src/compiler/ir/maps.ts +64 -0
- package/src/compiler/ir/nodes.ts +263 -0
- package/src/compiler/ir/port.ts +88 -0
- package/src/compiler/ir/runtime.ts +19 -0
- package/src/compiler/ir/script.ts +34 -0
- package/src/compiler/ir/style.ts +120 -0
- package/src/compiler/server/asynchronous.ts +71 -0
- package/src/compiler/server/bindings.ts +101 -0
- package/src/compiler/server/blocks.ts +165 -0
- package/src/compiler/server/classes.ts +139 -0
- package/src/compiler/server/component.ts +400 -0
- package/src/compiler/server/external.ts +176 -0
- package/src/compiler/server/index.ts +205 -0
- package/src/compiler/server/placement.ts +58 -0
- package/src/compiler/server/script.ts +492 -0
- package/src/compiler/server/slot.ts +51 -0
- package/src/compiler/server/special.ts +60 -0
- package/src/compiler/server/template.ts +620 -0
- package/src/entries/action.ts +20 -0
- package/src/entries/animate.ts +3 -0
- package/src/entries/attachments.ts +30 -0
- package/src/entries/compiler.ts +206 -0
- package/src/entries/easing.ts +1 -0
- package/src/entries/events.ts +10 -0
- package/src/entries/index-server.ts +118 -0
- package/src/entries/index.ts +50 -0
- package/src/entries/internal/client.ts +135 -0
- package/src/entries/internal/server.ts +46 -0
- package/src/entries/motion-server.ts +5 -0
- package/src/entries/motion.ts +5 -0
- package/src/entries/reactivity-server.ts +7 -0
- package/src/entries/reactivity.ts +7 -0
- package/src/entries/server.ts +11 -0
- package/src/entries/transition.ts +12 -0
- package/src/entries/window-server.ts +12 -0
- package/src/entries/window.ts +12 -0
- package/src/runtime/classes/date.ts +65 -0
- package/src/runtime/classes/frames.ts +27 -0
- package/src/runtime/classes/local.ts +7 -0
- package/src/runtime/classes/map.ts +135 -0
- package/src/runtime/classes/media.ts +25 -0
- package/src/runtime/classes/motion.ts +3 -0
- package/src/runtime/classes/search.ts +136 -0
- package/src/runtime/classes/server.ts +17 -0
- package/src/runtime/classes/set.ts +146 -0
- package/src/runtime/classes/spring.ts +199 -0
- package/src/runtime/classes/subscriber.ts +50 -0
- package/src/runtime/classes/tween.ts +128 -0
- package/src/runtime/classes/url.ts +152 -0
- package/src/runtime/classes/window-server.ts +27 -0
- package/src/runtime/classes/window.ts +72 -0
- package/src/runtime/dom/async.ts +208 -0
- package/src/runtime/dom/attachments.ts +139 -0
- package/src/runtime/dom/attributes.ts +526 -0
- package/src/runtime/dom/await.ts +108 -0
- package/src/runtime/dom/bindings.ts +369 -0
- package/src/runtime/dom/blocks.ts +39 -0
- package/src/runtime/dom/boundary.ts +349 -0
- package/src/runtime/dom/branches.ts +219 -0
- package/src/runtime/dom/context.ts +90 -0
- package/src/runtime/dom/custom-element.ts +214 -0
- package/src/runtime/dom/data.ts +131 -0
- package/src/runtime/dom/element.ts +89 -0
- package/src/runtime/dom/events.ts +254 -0
- package/src/runtime/dom/head.ts +56 -0
- package/src/runtime/dom/hot.ts +45 -0
- package/src/runtime/dom/html.ts +92 -0
- package/src/runtime/dom/hydration.ts +108 -0
- package/src/runtime/dom/inspect.ts +70 -0
- package/src/runtime/dom/list.ts +432 -0
- package/src/runtime/dom/media.ts +164 -0
- package/src/runtime/dom/meta.ts +67 -0
- package/src/runtime/dom/mount.ts +190 -0
- package/src/runtime/dom/ownership.ts +45 -0
- package/src/runtime/dom/props.ts +212 -0
- package/src/runtime/dom/range.ts +132 -0
- package/src/runtime/dom/reset.ts +39 -0
- package/src/runtime/dom/select.ts +184 -0
- package/src/runtime/dom/snippet.ts +54 -0
- package/src/runtime/dom/styles.ts +26 -0
- package/src/runtime/dom/swap.ts +117 -0
- package/src/runtime/dom/targets.ts +96 -0
- package/src/runtime/dom/template.ts +319 -0
- package/src/runtime/dom/trusted.ts +81 -0
- package/src/runtime/dom/values.ts +33 -0
- package/src/runtime/reactivity/abort.ts +56 -0
- package/src/runtime/reactivity/async.ts +272 -0
- package/src/runtime/reactivity/batch.ts +382 -0
- package/src/runtime/reactivity/carried.ts +64 -0
- package/src/runtime/reactivity/collector.ts +20 -0
- package/src/runtime/reactivity/drafts.ts +126 -0
- package/src/runtime/reactivity/eager.ts +45 -0
- package/src/runtime/reactivity/edges.ts +210 -0
- package/src/runtime/reactivity/effects.ts +669 -0
- package/src/runtime/reactivity/errors.ts +73 -0
- package/src/runtime/reactivity/external.ts +56 -0
- package/src/runtime/reactivity/fork.ts +60 -0
- package/src/runtime/reactivity/front.ts +20 -0
- package/src/runtime/reactivity/graph.ts +129 -0
- package/src/runtime/reactivity/handlers.ts +55 -0
- package/src/runtime/reactivity/held.ts +337 -0
- package/src/runtime/reactivity/history.ts +108 -0
- package/src/runtime/reactivity/latest.ts +41 -0
- package/src/runtime/reactivity/leaving.ts +303 -0
- package/src/runtime/reactivity/loss.ts +71 -0
- package/src/runtime/reactivity/outgoing.ts +41 -0
- package/src/runtime/reactivity/owners.ts +234 -0
- package/src/runtime/reactivity/past.ts +57 -0
- package/src/runtime/reactivity/provenance.ts +189 -0
- package/src/runtime/reactivity/proxy.ts +212 -0
- package/src/runtime/reactivity/public.ts +51 -0
- package/src/runtime/reactivity/reads.ts +376 -0
- package/src/runtime/reactivity/scheduler.ts +400 -0
- package/src/runtime/reactivity/settle.ts +73 -0
- package/src/runtime/reactivity/sources.ts +150 -0
- package/src/runtime/reactivity/tallies.ts +34 -0
- package/src/runtime/reactivity/tasks.ts +33 -0
- package/src/runtime/reactivity/trace.ts +113 -0
- package/src/runtime/reactivity/tracking.ts +569 -0
- package/src/runtime/reactivity/units.ts +103 -0
- package/src/runtime/reactivity/views.ts +114 -0
- package/src/runtime/server/attributes.ts +80 -0
- package/src/runtime/server/cells.ts +135 -0
- package/src/runtime/server/context.ts +319 -0
- package/src/runtime/server/derived.ts +37 -0
- package/src/runtime/server/external.ts +59 -0
- package/src/runtime/server/hydration.ts +238 -0
- package/src/runtime/server/placement.ts +47 -0
- package/src/runtime/server/render.ts +612 -0
- package/src/runtime/server/snippet.ts +21 -0
- package/src/runtime/transitions/animate.ts +161 -0
- package/src/runtime/transitions/easing.ts +153 -0
- package/src/runtime/transitions/flip.ts +66 -0
- package/src/runtime/transitions/frame.ts +273 -0
- package/src/runtime/transitions/layout.ts +176 -0
- package/src/runtime/transitions/manager.ts +343 -0
- package/src/runtime/transitions/placement.ts +161 -0
- package/src/runtime/transitions/presets.ts +369 -0
- package/src/shared/abort.ts +8 -0
- package/src/shared/assignment.ts +27 -0
- package/src/shared/attributes.ts +123 -0
- package/src/shared/clone.ts +82 -0
- package/src/shared/context.ts +35 -0
- package/src/shared/diagnostics.ts +83 -0
- package/src/shared/escape.ts +20 -0
- package/src/shared/external.ts +113 -0
- package/src/shared/format.ts +17 -0
- package/src/shared/hash.ts +8 -0
- package/src/shared/html.ts +298 -0
- package/src/shared/markers.ts +25 -0
- package/src/shared/nesting.ts +156 -0
- package/src/shared/slots.ts +16 -0
- package/src/shared/snippet.ts +29 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { alias, collect, current, holds, onMerge, request, within, type Batch } from './batch.ts';
|
|
2
|
+
import { stage, write } from './scheduler.ts';
|
|
3
|
+
import { inside } from './views.ts';
|
|
4
|
+
import { staleReaction } from '../../shared/abort.ts';
|
|
5
|
+
import { block, fail } from './effects.ts';
|
|
6
|
+
import { sequence } from './history.ts';
|
|
7
|
+
import { changed, get } from './reads.ts';
|
|
8
|
+
import { waitFor } from './held.ts';
|
|
9
|
+
import { asyncOrphan, pendingOutside } from './errors.ts';
|
|
10
|
+
import { type Boundary, type Effect, type Source } from './graph.ts';
|
|
11
|
+
import { source } from './sources.ts';
|
|
12
|
+
import { showing, tallied, tally } from './tallies.ts';
|
|
13
|
+
import { begin, exempt, recheck, released } from './units.ts';
|
|
14
|
+
import { awaiting, owner, running, settleReads, type Resumption } from './tracking.ts';
|
|
15
|
+
|
|
16
|
+
export interface AsyncRun {
|
|
17
|
+
stale(): boolean;
|
|
18
|
+
supersede(): void;
|
|
19
|
+
adopt(batch: Batch): void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface Result {
|
|
23
|
+
readonly order: number;
|
|
24
|
+
readonly revision: number;
|
|
25
|
+
readonly reading: Resumption;
|
|
26
|
+
readonly speculative: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function reveal(boundary: Boundary): void {
|
|
30
|
+
const found = tallied(boundary);
|
|
31
|
+
if (found === undefined) return;
|
|
32
|
+
for (const effect of found.effects.splice(0)) if (!effect.destroyed) collect(effect);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function count(boundary: Boundary | null, delta: 1 | -1): void {
|
|
36
|
+
if (boundary === null) return;
|
|
37
|
+
const found = tally(boundary);
|
|
38
|
+
found.units += delta;
|
|
39
|
+
boundary.settle(delta);
|
|
40
|
+
if (found.source === null || found.queued) return;
|
|
41
|
+
found.queued = true;
|
|
42
|
+
queueMicrotask(() => {
|
|
43
|
+
found.queued = false;
|
|
44
|
+
if (found.source !== null) write(found.source, found.units);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export async function hold<T>(fn: () => T): Promise<Awaited<T>> {
|
|
49
|
+
const finish = work();
|
|
50
|
+
try {
|
|
51
|
+
return await fn();
|
|
52
|
+
} finally {
|
|
53
|
+
finish();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function work(): () => void {
|
|
58
|
+
const batch = current();
|
|
59
|
+
const holder = owner;
|
|
60
|
+
const boundary = holder === null ? null : holder.boundary;
|
|
61
|
+
const blocking = !showing(boundary);
|
|
62
|
+
const counted = !batch.fork;
|
|
63
|
+
if (counted) begin();
|
|
64
|
+
count(boundary, 1);
|
|
65
|
+
if (blocking) {
|
|
66
|
+
batch.work += 1;
|
|
67
|
+
if (holder !== null) {
|
|
68
|
+
const owners = (batch.owners ??= new Map());
|
|
69
|
+
owners.set(holder, (owners.get(holder) ?? 0) + 1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
let unsettled = true;
|
|
73
|
+
const settle = (): void => {
|
|
74
|
+
if (!unsettled) return;
|
|
75
|
+
unsettled = false;
|
|
76
|
+
holder?.units?.delete(settle);
|
|
77
|
+
count(boundary, -1);
|
|
78
|
+
if (blocking) {
|
|
79
|
+
const target = alias(batch);
|
|
80
|
+
target.work -= 1;
|
|
81
|
+
const owners = target.owners;
|
|
82
|
+
if (holder !== null && owners !== null) {
|
|
83
|
+
const left = (owners.get(holder) ?? 1) - 1;
|
|
84
|
+
if (left > 0) owners.set(holder, left);
|
|
85
|
+
else owners.delete(holder);
|
|
86
|
+
}
|
|
87
|
+
if (!target.done && !holds(target)) request();
|
|
88
|
+
}
|
|
89
|
+
if (counted) released();
|
|
90
|
+
else recheck();
|
|
91
|
+
};
|
|
92
|
+
if (!counted) exempt(settle);
|
|
93
|
+
if (holder !== null && !holder.destroyed) (holder.units ??= new Set()).add(settle);
|
|
94
|
+
return settle;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function asyncDerived<T>(fn: () => T | PromiseLike<T>): Promise<Source<T>> {
|
|
98
|
+
if (owner === null) asyncOrphan();
|
|
99
|
+
const signal = source<T>(undefined as T);
|
|
100
|
+
const latest = new Map<Batch, AsyncRun>();
|
|
101
|
+
const results = new Map<Batch, Result>();
|
|
102
|
+
const ranks = new WeakMap<Batch, number>();
|
|
103
|
+
let resolved = false;
|
|
104
|
+
let committed = 0;
|
|
105
|
+
let committedRevision = 0;
|
|
106
|
+
let revision = 0;
|
|
107
|
+
let retained: Resumption | null = null;
|
|
108
|
+
const prune = (): void => {
|
|
109
|
+
if (latest.size === 0 && results.size === 0 && retained !== null) settleReads(retained);
|
|
110
|
+
};
|
|
111
|
+
const realOrder = (finished = false): number => {
|
|
112
|
+
let order = committed;
|
|
113
|
+
for (const [holder, result] of results) {
|
|
114
|
+
const batch = alias(holder);
|
|
115
|
+
if (batch.fork || batch.discarded || (finished && !batch.done)) continue;
|
|
116
|
+
order = Math.max(order, result.order);
|
|
117
|
+
}
|
|
118
|
+
return order;
|
|
119
|
+
};
|
|
120
|
+
const rank = (given: Batch): number => {
|
|
121
|
+
const batch = alias(given);
|
|
122
|
+
const result = results.get(batch);
|
|
123
|
+
let order = Math.max(batch.order, ranks.get(batch) ?? 0, result?.order ?? 0);
|
|
124
|
+
if (result?.speculative && !batch.fork) order = Math.max(order, realOrder(true));
|
|
125
|
+
return order;
|
|
126
|
+
};
|
|
127
|
+
const move = (from: Batch, into: Batch): void => {
|
|
128
|
+
ranks.set(into, Math.max(from.order, ranks.get(from) ?? 0, rank(into)));
|
|
129
|
+
const incoming = results.get(from);
|
|
130
|
+
if (incoming === undefined) return;
|
|
131
|
+
results.delete(from);
|
|
132
|
+
const current = results.get(into);
|
|
133
|
+
const newer =
|
|
134
|
+
current === undefined ||
|
|
135
|
+
incoming.order > current.order ||
|
|
136
|
+
(incoming.order === current.order && incoming.revision > current.revision);
|
|
137
|
+
const selected = newer ? incoming : current;
|
|
138
|
+
results.set(into, {
|
|
139
|
+
...selected,
|
|
140
|
+
speculative: incoming.speculative || current?.speculative === true
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
const finish = (holder: Batch): void => {
|
|
144
|
+
const batch = alias(holder);
|
|
145
|
+
const result = results.get(batch);
|
|
146
|
+
if (result === undefined) return;
|
|
147
|
+
results.delete(batch);
|
|
148
|
+
if (!batch.discarded) {
|
|
149
|
+
const order = result.speculative ? Math.max(committed, result.order) : result.order;
|
|
150
|
+
if (
|
|
151
|
+
result.speculative ||
|
|
152
|
+
order > committed ||
|
|
153
|
+
(order === committed && result.revision > committedRevision)
|
|
154
|
+
) {
|
|
155
|
+
committed = order;
|
|
156
|
+
ranks.set(batch, Math.max(rank(batch), order));
|
|
157
|
+
committedRevision = result.revision;
|
|
158
|
+
retained = result.reading;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
prune();
|
|
162
|
+
};
|
|
163
|
+
const retain = (batch: Batch, reading: Resumption, order: number): void => {
|
|
164
|
+
ranks.set(batch, Math.max(rank(batch), order));
|
|
165
|
+
const current = results.get(batch);
|
|
166
|
+
results.set(batch, {
|
|
167
|
+
order,
|
|
168
|
+
revision: ++revision,
|
|
169
|
+
reading,
|
|
170
|
+
speculative: batch.fork || current?.speculative === true
|
|
171
|
+
});
|
|
172
|
+
if (current !== undefined) return;
|
|
173
|
+
onMerge(batch, move);
|
|
174
|
+
void waitFor(batch).then(() => finish(batch));
|
|
175
|
+
};
|
|
176
|
+
let initial = true;
|
|
177
|
+
let first!: (source: Source<T>) => void;
|
|
178
|
+
let refuse!: (error: unknown) => void;
|
|
179
|
+
const ready = new Promise<Source<T>>((resolve, reject) => {
|
|
180
|
+
first = resolve;
|
|
181
|
+
refuse = reject;
|
|
182
|
+
});
|
|
183
|
+
const effect: Effect = block(() => {
|
|
184
|
+
const batch = current();
|
|
185
|
+
const origin = sequence();
|
|
186
|
+
let order = Math.max(rank(batch), realOrder(true));
|
|
187
|
+
latest.get(batch)?.supersede();
|
|
188
|
+
const done = initial ? null : work();
|
|
189
|
+
initial = false;
|
|
190
|
+
let target = batch;
|
|
191
|
+
let owned = true;
|
|
192
|
+
const token: AsyncRun = {
|
|
193
|
+
stale() {
|
|
194
|
+
if (owned && !alias(target).fork && order < realOrder(true)) return true;
|
|
195
|
+
return changed(run.values, run.reaction);
|
|
196
|
+
},
|
|
197
|
+
supersede() {
|
|
198
|
+
if (!owned) return;
|
|
199
|
+
owned = false;
|
|
200
|
+
if (latest.get(target) === token) latest.delete(target);
|
|
201
|
+
done?.();
|
|
202
|
+
},
|
|
203
|
+
adopt(into) {
|
|
204
|
+
move(target, into);
|
|
205
|
+
order = Math.max(order, rank(into));
|
|
206
|
+
if (owned) {
|
|
207
|
+
latest.delete(target);
|
|
208
|
+
latest.set(into, token);
|
|
209
|
+
}
|
|
210
|
+
target = into;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
latest.set(batch, token);
|
|
214
|
+
(batch.runs ??= new Map()).set(owner as Effect, token);
|
|
215
|
+
const run: Resumption = {
|
|
216
|
+
reaction: running() as Effect,
|
|
217
|
+
reads: new Set(),
|
|
218
|
+
values: new Map(),
|
|
219
|
+
ended: false
|
|
220
|
+
};
|
|
221
|
+
let promise: Promise<T>;
|
|
222
|
+
try {
|
|
223
|
+
promise = Promise.resolve(awaiting(run, fn));
|
|
224
|
+
} catch (error) {
|
|
225
|
+
promise = Promise.reject(error);
|
|
226
|
+
}
|
|
227
|
+
const own = (): boolean => {
|
|
228
|
+
if (!owned || latest.get(target) !== token) return false;
|
|
229
|
+
owned = false;
|
|
230
|
+
latest.delete(target);
|
|
231
|
+
const current = alias(target);
|
|
232
|
+
if (effect.destroyed || current.discarded) return false;
|
|
233
|
+
return current.fork || order >= realOrder(true);
|
|
234
|
+
};
|
|
235
|
+
promise.then(
|
|
236
|
+
(value) => {
|
|
237
|
+
if (own()) {
|
|
238
|
+
within(batch, () => {
|
|
239
|
+
const holder = alias(target);
|
|
240
|
+
if (holder.fork || order >= realOrder()) write(signal, value, origin);
|
|
241
|
+
else inside(holder, () => stage(holder, signal, value, origin));
|
|
242
|
+
retain(current(), run, order);
|
|
243
|
+
});
|
|
244
|
+
resolved = true;
|
|
245
|
+
first(signal);
|
|
246
|
+
}
|
|
247
|
+
prune();
|
|
248
|
+
done?.();
|
|
249
|
+
},
|
|
250
|
+
(error: unknown) => {
|
|
251
|
+
if (error === staleReaction && !alias(target).discarded) return;
|
|
252
|
+
const owned = own();
|
|
253
|
+
prune();
|
|
254
|
+
done?.();
|
|
255
|
+
if (!owned) return;
|
|
256
|
+
if (resolved) within(target, () => fail(effect, error));
|
|
257
|
+
else refuse(error);
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
});
|
|
261
|
+
effect.async = true;
|
|
262
|
+
return ready;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export function pending(): number {
|
|
266
|
+
if (owner === null) return pendingOutside();
|
|
267
|
+
const boundary = owner.boundary;
|
|
268
|
+
if (boundary === null) return 0;
|
|
269
|
+
const found = tally(boundary);
|
|
270
|
+
found.source ??= source(found.units);
|
|
271
|
+
return get(found.source);
|
|
272
|
+
}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import { DEV } from 'esm-env';
|
|
2
|
+
import type { AsyncRun } from './async.ts';
|
|
3
|
+
import { BRANCH, CLEAN, ROOT, type Effect, type Source } from './graph.ts';
|
|
4
|
+
import { clear, detach, enter, sequence, type History, type Origin } from './history.ts';
|
|
5
|
+
import { forgotten } from './provenance.ts';
|
|
6
|
+
import { parked, showing } from './tallies.ts';
|
|
7
|
+
|
|
8
|
+
type Phase = 'structure' | 'commit' | 'content' | 'effects';
|
|
9
|
+
export type Transfer = (from: Batch, into: Batch) => void;
|
|
10
|
+
|
|
11
|
+
export interface Change {
|
|
12
|
+
prepare?(): void;
|
|
13
|
+
apply(): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Batch extends History {
|
|
17
|
+
after: Map<Source, unknown> | null;
|
|
18
|
+
origins: Map<Source, Origin> | null;
|
|
19
|
+
runs: Map<Effect, AsyncRun> | null;
|
|
20
|
+
reads: Map<Effect, ReadonlyMap<Source, unknown>> | null;
|
|
21
|
+
readonly queued: Effect[];
|
|
22
|
+
readonly commits: Change[];
|
|
23
|
+
merges: Transfer[] | null;
|
|
24
|
+
readonly effects: Effect[];
|
|
25
|
+
discards: (() => void)[] | null;
|
|
26
|
+
content: Effect[] | null;
|
|
27
|
+
deferred: Effect[] | null;
|
|
28
|
+
members: Set<Effect> | null;
|
|
29
|
+
forced: Set<Effect> | null;
|
|
30
|
+
skipped: Set<Effect> | null;
|
|
31
|
+
shown: Set<Effect> | null;
|
|
32
|
+
owners: Map<Effect, number> | null;
|
|
33
|
+
roots: Set<Effect> | null;
|
|
34
|
+
waits: Map<Batch, Set<Effect>> | null;
|
|
35
|
+
settles: (() => void)[] | null;
|
|
36
|
+
into: Batch | null;
|
|
37
|
+
work: number;
|
|
38
|
+
phase: Phase | null;
|
|
39
|
+
started: boolean;
|
|
40
|
+
fork: boolean;
|
|
41
|
+
held: boolean;
|
|
42
|
+
done: boolean;
|
|
43
|
+
discarded: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function createBatch(): Batch {
|
|
47
|
+
const created: Batch = {
|
|
48
|
+
order: sequence(),
|
|
49
|
+
log: [],
|
|
50
|
+
map: null,
|
|
51
|
+
prior: null,
|
|
52
|
+
passed: null,
|
|
53
|
+
crowded: false,
|
|
54
|
+
after: null,
|
|
55
|
+
origins: null,
|
|
56
|
+
runs: null,
|
|
57
|
+
reads: null,
|
|
58
|
+
queued: [],
|
|
59
|
+
commits: [],
|
|
60
|
+
merges: null,
|
|
61
|
+
effects: [],
|
|
62
|
+
discards: null,
|
|
63
|
+
content: null,
|
|
64
|
+
deferred: null,
|
|
65
|
+
members: null,
|
|
66
|
+
forced: null,
|
|
67
|
+
skipped: null,
|
|
68
|
+
shown: null,
|
|
69
|
+
owners: null,
|
|
70
|
+
roots: null,
|
|
71
|
+
waits: null,
|
|
72
|
+
settles: null,
|
|
73
|
+
into: null,
|
|
74
|
+
work: 0,
|
|
75
|
+
phase: null,
|
|
76
|
+
started: false,
|
|
77
|
+
fork: false,
|
|
78
|
+
held: false,
|
|
79
|
+
done: false,
|
|
80
|
+
discarded: false
|
|
81
|
+
};
|
|
82
|
+
enter(created);
|
|
83
|
+
return created;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function release(batch: Batch): void {
|
|
87
|
+
if (DEV) forgotten(batch);
|
|
88
|
+
batch.runs = null;
|
|
89
|
+
batch.merges = null;
|
|
90
|
+
batch.origins = null;
|
|
91
|
+
batch.reads = null;
|
|
92
|
+
clear(batch);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export let open: Batch | null = null;
|
|
96
|
+
export let processing: Batch | null = null;
|
|
97
|
+
export let active: Batch | null = null;
|
|
98
|
+
export const pending: Batch[] = [];
|
|
99
|
+
export const offscreen = new Set<Effect>();
|
|
100
|
+
export const overlooked = new WeakSet<Effect>();
|
|
101
|
+
let requested = false;
|
|
102
|
+
let flusher: () => void = () => {};
|
|
103
|
+
|
|
104
|
+
export function setOpen(next: Batch | null): void {
|
|
105
|
+
open = next;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function setProcessing(next: Batch | null): Batch | null {
|
|
109
|
+
const previous = processing;
|
|
110
|
+
processing = next;
|
|
111
|
+
return previous;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function setActive(next: Batch | null): Batch | null {
|
|
115
|
+
const previous = active;
|
|
116
|
+
active = next;
|
|
117
|
+
return previous;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function onFlush(flush: () => void): void {
|
|
121
|
+
flusher = flush;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function alias(batch: Batch): Batch {
|
|
125
|
+
let found = batch;
|
|
126
|
+
while (found.into !== null) found = found.into;
|
|
127
|
+
return found;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function joins(batch: Batch | null): batch is Batch {
|
|
131
|
+
return batch !== null && (batch.phase === 'structure' || batch.phase === 'commit');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function receiver(): Batch | null {
|
|
135
|
+
return active ?? (joins(processing) ? processing : null);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function request(): void {
|
|
139
|
+
if (requested) return;
|
|
140
|
+
requested = true;
|
|
141
|
+
queueMicrotask(() => {
|
|
142
|
+
requested = false;
|
|
143
|
+
if (processing === null) flusher();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function opening(): Batch {
|
|
148
|
+
if (open === null) {
|
|
149
|
+
open = createBatch();
|
|
150
|
+
request();
|
|
151
|
+
}
|
|
152
|
+
return open;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function receiving(): Batch {
|
|
156
|
+
return receiver() ?? opening();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function current(): Batch {
|
|
160
|
+
return receiving();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function holds(batch: Batch): boolean {
|
|
164
|
+
if (batch.fork) return true;
|
|
165
|
+
if (batch.work === 0) return false;
|
|
166
|
+
const owners = batch.owners;
|
|
167
|
+
if (owners === null || (batch.skipped === null && offscreen.size === 0)) return true;
|
|
168
|
+
let free = batch.work;
|
|
169
|
+
for (const [effect, count] of owners) if (excluded(effect, batch)) free -= count;
|
|
170
|
+
return free > 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function excluded(effect: Effect, batch: Batch): boolean {
|
|
174
|
+
const skipped = batch.skipped;
|
|
175
|
+
const shown = batch.shown;
|
|
176
|
+
for (let at: Effect | null = effect; at !== null; at = at.parent) {
|
|
177
|
+
if (skipped !== null && skipped.has(at)) return true;
|
|
178
|
+
if (at.inert && (shown === null || !shown.has(at))) return true;
|
|
179
|
+
}
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function live(batch: Batch | null): Batch | null {
|
|
184
|
+
if (batch === null) return null;
|
|
185
|
+
const found = alias(batch);
|
|
186
|
+
return found.done ? null : found;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function within<T>(batch: Batch, fn: () => T): T {
|
|
190
|
+
const previous = active;
|
|
191
|
+
active = live(batch);
|
|
192
|
+
try {
|
|
193
|
+
return fn();
|
|
194
|
+
} finally {
|
|
195
|
+
active = previous;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export function members(batch: Batch): Set<Effect> {
|
|
200
|
+
return (batch.members ??= new Set(batch.queued));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function enqueue(batch: Batch, effect: Effect): void {
|
|
204
|
+
const known = batch.members;
|
|
205
|
+
if (known !== null) {
|
|
206
|
+
if (known.has(effect)) return;
|
|
207
|
+
known.add(effect);
|
|
208
|
+
}
|
|
209
|
+
const queued = batch.queued;
|
|
210
|
+
queued[queued.length] = effect;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function schedule(effect: Effect): void {
|
|
214
|
+
const batch = receiving();
|
|
215
|
+
enqueue(batch, effect);
|
|
216
|
+
if (batch !== processing && batch.started) request();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function collect(effect: Effect): void {
|
|
220
|
+
if (effect.boundary !== null && showing(effect.boundary)) {
|
|
221
|
+
parked(effect.boundary).push(effect);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
const batch = receiver();
|
|
225
|
+
if (batch !== null) batch.effects.push(effect);
|
|
226
|
+
else schedule(effect);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function atCommit(change: Change): void {
|
|
230
|
+
if (joins(processing)) processing.commits.push(change);
|
|
231
|
+
else {
|
|
232
|
+
change.prepare?.();
|
|
233
|
+
change.apply();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function atDiscard(fn: () => void): void {
|
|
238
|
+
if (joins(processing)) (processing.discards ??= []).push(fn);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export function atMerge(fn: Transfer): void {
|
|
242
|
+
if (joins(processing)) (processing.merges ??= []).push(fn);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export function onMerge(batch: Batch, fn: Transfer): void {
|
|
246
|
+
const found = alias(batch);
|
|
247
|
+
if (!found.done) (found.merges ??= []).push(fn);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function onCommit(batch: Batch, change: Change): void {
|
|
251
|
+
const found = alias(batch);
|
|
252
|
+
if (found.done) return;
|
|
253
|
+
found.commits.push(change);
|
|
254
|
+
if (found.started && found !== processing && !holds(found)) request();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export function skip(effect: Effect, batch: Batch | null = processing): void {
|
|
258
|
+
if (batch !== null) (alias(batch).skipped ??= new Set()).add(effect);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export function unskip(effect: Effect): void {
|
|
262
|
+
const batch = processing;
|
|
263
|
+
if (batch === null) return;
|
|
264
|
+
const skipped = batch.skipped !== null && batch.skipped.delete(effect);
|
|
265
|
+
(batch.shown ??= new Set()).add(effect);
|
|
266
|
+
const foreign = effect.batch !== 0 && effect.batch !== batch.order;
|
|
267
|
+
if (skipped || foreign || overlooked.has(effect)) requeue(batch, effect);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function processed(): Batch | null {
|
|
271
|
+
return processing;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function force(batch: Batch, effect: Effect): void {
|
|
275
|
+
if (effect.destroyed) return;
|
|
276
|
+
(batch.forced ??= new Set()).add(effect);
|
|
277
|
+
enqueue(batch, effect);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
function gather(effect: Effect, out: Effect[], marked: boolean, adopter = 0): void {
|
|
281
|
+
if (marked) effect.pending = false;
|
|
282
|
+
for (let child = effect.first; child !== null; child = child.next) {
|
|
283
|
+
if (child.destroyed) continue;
|
|
284
|
+
const foreign = adopter !== 0 && child.batch !== 0 && child.batch !== adopter;
|
|
285
|
+
if ((child.status !== CLEAN || foreign) && child.kind !== BRANCH && child.kind !== ROOT)
|
|
286
|
+
out.push(child);
|
|
287
|
+
if (!marked || child.pending) gather(child, out, marked, adopter);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function overlook(branch: Effect, from: Batch): void {
|
|
292
|
+
const found: Effect[] = [];
|
|
293
|
+
gather(branch, found, true);
|
|
294
|
+
overlooked.add(branch);
|
|
295
|
+
if (found.length === 0 || from.fork) return;
|
|
296
|
+
const pass = (other: Batch | null): void => {
|
|
297
|
+
if (other === null || other === from || other.done) return;
|
|
298
|
+
if (other.shown === null || !other.shown.has(branch)) return;
|
|
299
|
+
for (const effect of found) force(other, effect);
|
|
300
|
+
request();
|
|
301
|
+
};
|
|
302
|
+
for (const other of pending) pass(other);
|
|
303
|
+
pass(open);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export function handOver(effect: Effect, holder: Batch): void {
|
|
307
|
+
const found: Effect[] = [];
|
|
308
|
+
if (effect.status !== CLEAN && effect.kind !== BRANCH && effect.kind !== ROOT) found.push(effect);
|
|
309
|
+
gather(effect, found, true);
|
|
310
|
+
if (found.length === 0) return;
|
|
311
|
+
if (!pending.includes(holder)) pending.push(holder);
|
|
312
|
+
for (const each of found) force(holder, each);
|
|
313
|
+
request();
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export function requeue(batch: Batch, branch: Effect): void {
|
|
317
|
+
overlooked.delete(branch);
|
|
318
|
+
const found: Effect[] = [];
|
|
319
|
+
gather(branch, found, false, batch.order);
|
|
320
|
+
for (const effect of found) force(batch, effect);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function park(batch: Batch): void {
|
|
324
|
+
const index = pending.indexOf(batch);
|
|
325
|
+
if (index !== -1) pending.splice(index, 1);
|
|
326
|
+
batch.queued.length = 0;
|
|
327
|
+
batch.commits.length = 0;
|
|
328
|
+
batch.effects.length = 0;
|
|
329
|
+
batch.members = batch.forced = batch.skipped = batch.shown = batch.waits = null;
|
|
330
|
+
batch.content = batch.deferred = batch.discards = null;
|
|
331
|
+
batch.runs = null;
|
|
332
|
+
batch.merges = null;
|
|
333
|
+
for (const other of pending) other.waits?.delete(batch);
|
|
334
|
+
open?.waits?.delete(batch);
|
|
335
|
+
detach(batch);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function orphaned(root: Effect): void {
|
|
339
|
+
if (pending.length === 0) return;
|
|
340
|
+
for (const batch of [...pending]) {
|
|
341
|
+
const roots = batch.roots;
|
|
342
|
+
if (!batch.fork || roots === null || !roots.delete(root)) continue;
|
|
343
|
+
if (roots.size === 0) park(batch);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export function untouched(batch: Batch): void {
|
|
348
|
+
if (batch.fork && batch.roots === null && !batch.done) park(batch);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export function rerunAfter(reader: Batch, writer: Batch, effects: Iterable<Effect>): void {
|
|
352
|
+
if (writer.done) return;
|
|
353
|
+
if (writer === reader) {
|
|
354
|
+
for (const effect of effects) force(reader, effect);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
const waits = (reader.waits ??= new Map());
|
|
358
|
+
let found = waits.get(writer);
|
|
359
|
+
if (found === undefined) waits.set(writer, (found = new Set()));
|
|
360
|
+
for (const effect of effects) found.add(effect);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export function revisit(effect: Effect, hidden: Set<Batch> | null): void {
|
|
364
|
+
const reader = active ?? processing;
|
|
365
|
+
for (const found of hidden ?? []) {
|
|
366
|
+
const writer = alias(found);
|
|
367
|
+
if (writer.done) continue;
|
|
368
|
+
if (members(writer).has(effect)) (writer.forced ??= new Set()).add(effect);
|
|
369
|
+
if (reader !== null && reader !== writer) rerunAfter(reader, writer, [effect]);
|
|
370
|
+
}
|
|
371
|
+
for (const other of pending) {
|
|
372
|
+
if (other === reader || other.done || other.fork || other.queued.length === 0) continue;
|
|
373
|
+
if (members(other).has(effect)) (other.forced ??= new Set()).add(effect);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export function tick(): Promise<void> {
|
|
378
|
+
return new Promise((done) => {
|
|
379
|
+
if (typeof requestAnimationFrame === 'function') requestAnimationFrame(() => done());
|
|
380
|
+
setTimeout(done, 0);
|
|
381
|
+
});
|
|
382
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { failure } from '../../shared/diagnostics.ts';
|
|
2
|
+
import type { Effect } from './graph.ts';
|
|
3
|
+
import { owner } from './tracking.ts';
|
|
4
|
+
|
|
5
|
+
export interface AsyncStore {
|
|
6
|
+
run<R>(value: unknown, fn: () => R): R;
|
|
7
|
+
getStore(): unknown;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type Frame = readonly unknown[];
|
|
11
|
+
|
|
12
|
+
const empty: Frame = [];
|
|
13
|
+
export let port: AsyncStore | null = null;
|
|
14
|
+
let slots = 1;
|
|
15
|
+
|
|
16
|
+
export function carryAcrossAwait(store: AsyncStore): void {
|
|
17
|
+
if (port === store) return;
|
|
18
|
+
if (port !== null) {
|
|
19
|
+
throw failure(
|
|
20
|
+
'async_store_conflict',
|
|
21
|
+
'A different async store already carries values across `await` in this realm'
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
port = store;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function frame(store: AsyncStore): Frame {
|
|
28
|
+
return (store.getStore() as Frame | undefined) ?? empty;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function within<R>(store: AsyncStore, slot: number, value: unknown, fn: () => R): R {
|
|
32
|
+
const next = frame(store).slice();
|
|
33
|
+
next[slot] = value;
|
|
34
|
+
return store.run(next, fn);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function carry<R>(effect: Effect, fn: () => R): R {
|
|
38
|
+
return port === null ? fn() : within(port, 0, effect, fn);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function ambient(): Effect | null {
|
|
42
|
+
if (owner !== null || port === null) return owner;
|
|
43
|
+
return (frame(port)[0] as Effect | undefined) ?? null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class AsyncVariable<T> {
|
|
47
|
+
readonly #slot = slots++;
|
|
48
|
+
#value: T | undefined;
|
|
49
|
+
|
|
50
|
+
run<R>(value: T, fn: () => R): R {
|
|
51
|
+
if (port !== null) return within(port, this.#slot, value, fn);
|
|
52
|
+
const previous = this.#value;
|
|
53
|
+
this.#value = value;
|
|
54
|
+
try {
|
|
55
|
+
return fn();
|
|
56
|
+
} finally {
|
|
57
|
+
this.#value = previous;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
get(): T | undefined {
|
|
62
|
+
return port === null ? this.#value : (frame(port)[this.#slot] as T | undefined);
|
|
63
|
+
}
|
|
64
|
+
}
|