@askrjs/askr 0.0.50 → 0.0.52
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/bench/components/benchmark-row.d.ts +2 -2
- package/dist/bench/components/benchmark-row.js +0 -2
- package/dist/bench/components/benchmark-table.js +0 -2
- package/dist/benchmark.d.ts +1 -2
- package/dist/benchmark.js +5 -6
- package/dist/bin/askr-ssg.d.ts +1 -2
- package/dist/bin/askr-ssg.js +21 -6
- package/dist/boot/hydration.js +10 -11
- package/dist/boot/index.d.ts +1 -2
- package/dist/boot/index.js +21 -11
- package/dist/boot/root-lifecycle.d.ts +6 -3
- package/dist/boot/root-lifecycle.js +18 -14
- package/dist/boot/route-startup.js +13 -4
- package/dist/boot/types.d.ts +1 -2
- package/dist/common/attr-names.js +0 -2
- package/dist/common/component.d.ts +1 -2
- package/dist/common/control.d.ts +1 -2
- package/dist/common/control.js +0 -2
- package/dist/common/dom-range.d.ts +13 -0
- package/dist/common/env.js +1 -7
- package/dist/common/error-boundary.d.ts +15 -0
- package/dist/common/invariant.js +15 -0
- package/dist/common/jsx.d.ts +1 -2
- package/dist/common/jsx.js +0 -2
- package/dist/{dev → common}/logger.js +5 -8
- package/dist/common/promise.js +0 -2
- package/dist/common/props.d.ts +1 -2
- package/dist/common/render-context.js +0 -2
- package/dist/common/route-activity.js +0 -2
- package/dist/common/router-internal.js +0 -2
- package/dist/common/router.d.ts +1 -2
- package/dist/common/ssr-errors.d.ts +1 -2
- package/dist/common/ssr-errors.js +0 -2
- package/dist/common/ssr.d.ts +1 -2
- package/dist/common/ssr.js +0 -2
- package/dist/common/vnode.d.ts +1 -2
- package/dist/common/vnode.js +0 -2
- package/dist/components/error-boundary.d.ts +2 -16
- package/dist/components/error-boundary.js +2 -76
- package/dist/components/index.d.ts +2 -1
- package/dist/components/link.d.ts +2 -2
- package/dist/components/link.js +2 -2
- package/dist/control/case.d.ts +1 -2
- package/dist/control/case.js +1 -2
- package/dist/control/for.d.ts +3 -4
- package/dist/control/for.js +2 -4
- package/dist/control/shared.d.ts +1 -2
- package/dist/control/shared.js +0 -2
- package/dist/control/show.d.ts +1 -2
- package/dist/control/show.js +1 -2
- package/dist/data/data-runtime.d.ts +1 -2
- package/dist/data/data-runtime.js +3 -5
- package/dist/data/invalidation-listeners.js +0 -2
- package/dist/data/invalidation.d.ts +1 -2
- package/dist/data/invalidation.js +2 -4
- package/dist/data/mutation-cell.d.ts +1 -2
- package/dist/data/mutation-cell.js +7 -6
- package/dist/data/query-cell.d.ts +3 -2
- package/dist/data/query-cell.js +45 -11
- package/dist/data/query-key.js +0 -2
- package/dist/data/shared.js +3 -3
- package/dist/data/testing.js +2 -0
- package/dist/data/types.d.ts +1 -2
- package/dist/foundations/icon/icon.d.ts +1 -2
- package/dist/foundations/icon/icon.js +0 -2
- package/dist/foundations/icon/icon.types.d.ts +1 -2
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/dismissable.d.ts +1 -2
- package/dist/foundations/interactions/dismissable.js +0 -2
- package/dist/foundations/interactions/focusable.d.ts +1 -2
- package/dist/foundations/interactions/focusable.js +0 -2
- package/dist/foundations/interactions/hoverable.d.ts +1 -2
- package/dist/foundations/interactions/hoverable.js +0 -2
- package/dist/foundations/interactions/interaction-policy.d.ts +1 -2
- package/dist/foundations/interactions/interaction-policy.js +0 -2
- package/dist/foundations/interactions/pressable.d.ts +1 -2
- package/dist/foundations/interactions/pressable.js +0 -2
- package/dist/foundations/interactions/roving-focus.d.ts +1 -2
- package/dist/foundations/interactions/roving-focus.js +0 -2
- package/dist/foundations/state/controllable.d.ts +1 -3
- package/dist/foundations/state/controllable.js +1 -2
- package/dist/foundations/structures/collection.d.ts +1 -2
- package/dist/foundations/structures/collection.js +0 -2
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/foundations/structures/index.js +2 -1
- package/dist/foundations/structures/layer.d.ts +1 -2
- package/dist/foundations/structures/layer.js +0 -2
- package/dist/foundations/structures/layout.d.ts +1 -2
- package/dist/foundations/structures/layout.js +0 -2
- package/dist/foundations/structures/portal.d.ts +2 -24
- package/dist/foundations/structures/portal.js +3 -187
- package/dist/foundations/structures/presence.d.ts +1 -2
- package/dist/foundations/structures/presence.js +0 -2
- package/dist/foundations/structures/slot.d.ts +1 -2
- package/dist/foundations/structures/slot.js +0 -2
- package/dist/foundations/utilities/aria.d.ts +1 -2
- package/dist/foundations/utilities/aria.js +0 -2
- package/dist/foundations/utilities/compose-handlers.d.ts +1 -2
- package/dist/foundations/utilities/compose-handlers.js +0 -2
- package/dist/foundations/utilities/compose-ref.d.ts +1 -2
- package/dist/foundations/utilities/compose-ref.js +0 -2
- package/dist/foundations/utilities/event-types.d.ts +1 -2
- package/dist/foundations/utilities/merge-props.d.ts +1 -2
- package/dist/foundations/utilities/merge-props.js +0 -2
- package/dist/foundations/utilities/use-id.d.ts +1 -2
- package/dist/foundations/utilities/use-id.js +0 -2
- package/dist/fx/fx.d.ts +1 -2
- package/dist/fx/fx.js +2 -4
- package/dist/fx/index.js +1 -0
- package/dist/fx/noop.js +0 -2
- package/dist/fx/timing.d.ts +1 -2
- package/dist/fx/timing.js +0 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -6
- package/dist/jsx/types.d.ts +1 -2
- package/dist/jsx/utils.d.ts +1 -2
- package/dist/jsx/utils.js +0 -2
- package/dist/jsx-dev-runtime.d.ts +16 -2
- package/dist/jsx-dev-runtime.js +4 -12
- package/dist/jsx-runtime.d.ts +16 -2
- package/dist/jsx-runtime.js +16 -24
- package/dist/jsx-runtime2.d.ts +1 -1
- package/dist/renderer/attributes.js +29 -6
- package/dist/renderer/boundaries.js +50 -174
- package/dist/renderer/boundary-materialization.js +72 -0
- package/dist/renderer/boundary-range-adoption.js +76 -0
- package/dist/renderer/boundary-range-sync.js +101 -0
- package/dist/renderer/boundary-state.js +50 -0
- package/dist/renderer/child-shape.js +2 -4
- package/dist/renderer/children-fastpath.js +149 -0
- package/dist/renderer/children.js +3 -140
- package/dist/renderer/cleanup.js +72 -15
- package/dist/renderer/component-host-cleanup.js +124 -49
- package/dist/renderer/component-host-instances.js +60 -9
- package/dist/renderer/component-host-replacement.js +105 -0
- package/dist/renderer/component-host-results.js +138 -0
- package/dist/renderer/component-host.js +95 -170
- package/dist/renderer/dom-host.js +0 -2
- package/dist/renderer/dom-internal.js +115 -57
- package/dist/renderer/dom-range.js +161 -0
- package/dist/renderer/dom.js +7 -5
- package/dist/renderer/element-children.js +112 -32
- package/dist/renderer/error-boundary-dom.js +70 -13
- package/dist/renderer/evaluate-dom-range.js +3 -4
- package/dist/renderer/evaluate-reconcile.js +18 -42
- package/dist/renderer/evaluate.js +14 -3
- package/dist/renderer/fastpath.js +7 -14
- package/dist/renderer/for-commit-dom-map.js +6 -18
- package/dist/renderer/for-commit-removal.js +8 -17
- package/dist/renderer/for-commit-reorder.js +2 -4
- package/dist/renderer/for-commit.js +173 -45
- package/dist/renderer/hydration-boundaries.js +60 -0
- package/dist/renderer/hydration-listener-transaction.js +49 -0
- package/dist/renderer/index.js +11 -8
- package/dist/renderer/intrinsic-blueprint-analysis.js +202 -0
- package/dist/renderer/intrinsic-blueprint-bindings.js +152 -0
- package/dist/renderer/intrinsic-blueprint-materialization.js +100 -0
- package/dist/renderer/intrinsic-blueprint.js +30 -0
- package/dist/renderer/intrinsic-hydration-adoption.js +66 -0
- package/dist/renderer/keyed-children.js +3 -9
- package/dist/renderer/keyed.js +10 -10
- package/dist/renderer/namespaces.js +0 -2
- package/dist/renderer/prop-bindings.js +59 -24
- package/dist/renderer/reactive-child-dom.js +10 -4
- package/dist/renderer/reactive-child-sources.js +0 -2
- package/dist/renderer/reactive-children.js +33 -24
- package/dist/renderer/reconcile-commit.js +0 -2
- package/dist/renderer/reconcile-fastpaths.js +6 -12
- package/dist/renderer/reconcile-resolution.js +32 -56
- package/dist/renderer/reconcile.js +0 -2
- package/dist/renderer/retained-element-rollback.js +161 -149
- package/dist/renderer/stable-patch.js +5 -7
- package/dist/renderer/static-reuse.js +0 -2
- package/dist/renderer/utils.js +20 -10
- package/dist/resources/index.js +1 -2
- package/dist/router/access.js +0 -2
- package/dist/router/activity.d.ts +1 -2
- package/dist/router/activity.js +20 -24
- package/dist/router/authoring.d.ts +1 -2
- package/dist/router/authoring.js +1 -3
- package/dist/router/index.d.ts +1 -1
- package/dist/router/internal-types.d.ts +1 -2
- package/dist/router/lazy.d.ts +1 -2
- package/dist/router/lazy.js +0 -2
- package/dist/router/manifest.d.ts +1 -2
- package/dist/router/manifest.js +0 -2
- package/dist/router/match.js +0 -2
- package/dist/router/navigate.d.ts +1 -2
- package/dist/router/navigate.js +5 -8
- package/dist/router/navigation-registry.d.ts +1 -2
- package/dist/router/navigation-registry.js +1 -3
- package/dist/router/navigation-scroll.d.ts +1 -2
- package/dist/router/navigation-scroll.js +0 -2
- package/dist/router/navigation-targets.d.ts +3 -4
- package/dist/router/navigation-targets.js +425 -44
- package/dist/router/policy.d.ts +1 -2
- package/dist/router/policy.js +0 -2
- package/dist/router/rendering.d.ts +1 -2
- package/dist/router/rendering.js +5 -3
- package/dist/router/resolution.d.ts +2 -16
- package/dist/router/resolution.js +6 -175
- package/dist/router/route-context.js +0 -2
- package/dist/router/route-matching.d.ts +19 -0
- package/dist/router/route-matching.js +173 -0
- package/dist/router/route-query.d.ts +1 -2
- package/dist/router/route-query.js +1 -3
- package/dist/router/route.js +4 -2
- package/dist/router/store.d.ts +1 -2
- package/dist/router/store.js +0 -2
- package/dist/router/testing.js +4 -0
- package/dist/runtime/access.d.ts +19 -0
- package/dist/runtime/access.js +0 -2
- package/dist/runtime/child-scope.d.ts +21 -2
- package/dist/runtime/child-scope.js +101 -54
- package/dist/runtime/component-cleanup.d.ts +1 -2
- package/dist/runtime/component-cleanup.js +3 -5
- package/dist/runtime/component-commit.js +26 -24
- package/dist/runtime/component-facade.js +5 -3
- package/dist/runtime/component-internal.d.ts +12 -7
- package/dist/runtime/component-internal.js +64 -46
- package/dist/runtime/component-lifecycle.d.ts +2 -41
- package/dist/runtime/component-lifecycle.js +6 -149
- package/dist/runtime/component-scope.d.ts +4 -5
- package/dist/runtime/component-scope.js +27 -8
- package/dist/runtime/component.js +4 -3
- package/dist/runtime/context.d.ts +5 -2
- package/dist/runtime/context.js +29 -3
- package/dist/runtime/control.d.ts +22 -3
- package/dist/runtime/control.js +168 -55
- package/dist/runtime/derive.d.ts +1 -2
- package/dist/runtime/derive.js +0 -2
- package/dist/runtime/dev-namespace.d.ts +30 -0
- package/dist/runtime/dev-namespace.js +32 -25
- package/dist/runtime/effect.d.ts +8 -5
- package/dist/runtime/effect.js +158 -75
- package/dist/runtime/error-boundary.d.ts +4 -0
- package/dist/runtime/error-boundary.js +29 -0
- package/dist/runtime/events.d.ts +58 -0
- package/dist/runtime/events.js +67 -70
- package/dist/runtime/execution-model.d.ts +6 -0
- package/dist/runtime/execution-model.js +0 -2
- package/dist/runtime/fastlane.d.ts +33 -0
- package/dist/runtime/fastlane.js +0 -2
- package/dist/runtime/for-bench.d.ts +1 -2
- package/dist/runtime/for-bench.js +9 -167
- package/dist/runtime/for-internal.d.ts +73 -10
- package/dist/runtime/for-internal.js +201 -14
- package/dist/runtime/for-reconcile.d.ts +1 -2
- package/dist/runtime/for-reconcile.js +76 -23
- package/dist/runtime/for-scopes.d.ts +5 -5
- package/dist/runtime/for-scopes.js +168 -48
- package/dist/runtime/for-signals.d.ts +14 -5
- package/dist/runtime/for-signals.js +157 -83
- package/dist/runtime/for-types.d.ts +8 -0
- package/dist/runtime/for.d.ts +2 -2
- package/dist/runtime/for.js +3 -3
- package/dist/runtime/index.d.ts +24 -0
- package/dist/runtime/index.js +33 -0
- package/dist/runtime/lifecycle-batch.d.ts +59 -0
- package/dist/runtime/lifecycle-batch.js +178 -0
- package/dist/runtime/lifecycle-operation-settlement.d.ts +5 -0
- package/dist/runtime/lifecycle-operation-settlement.js +51 -0
- package/dist/runtime/lifecycle-operations.d.ts +1 -2
- package/dist/runtime/lifecycle-operations.js +5 -6
- package/dist/runtime/perf-metrics.d.ts +27 -0
- package/dist/runtime/perf-metrics.js +4 -68
- package/dist/runtime/portal.d.ts +21 -0
- package/dist/runtime/portal.js +305 -0
- package/dist/runtime/readable.d.ts +9 -4
- package/dist/runtime/readable.js +41 -17
- package/dist/runtime/resource-cell.js +3 -5
- package/dist/runtime/resource-operation.d.ts +1 -2
- package/dist/runtime/resource-operation.js +38 -35
- package/dist/runtime/runtime.d.ts +2 -3
- package/dist/runtime/runtime.js +0 -2
- package/dist/runtime/scheduler.d.ts +1 -2
- package/dist/runtime/scheduler.js +10 -13
- package/dist/runtime/selector-store.js +22 -0
- package/dist/runtime/selector.d.ts +1 -2
- package/dist/runtime/selector.js +6 -29
- package/dist/runtime/snapshot-source.d.ts +1 -2
- package/dist/runtime/snapshot-source.js +0 -2
- package/dist/runtime/state.d.ts +1 -2
- package/dist/runtime/state.js +1 -3
- package/dist/ssg/batch-render.js +0 -2
- package/dist/ssg/create-static-gen.d.ts +4 -2
- package/dist/ssg/create-static-gen.js +66 -14
- package/dist/ssg/generate-metadata.js +0 -2
- package/dist/ssg/generation-plan.js +0 -2
- package/dist/ssg/incremental-manifest.js +1 -3
- package/dist/ssg/resolve-ssg-data.js +0 -2
- package/dist/ssg/route-utils.js +0 -2
- package/dist/ssg/static-routes.js +1 -2
- package/dist/ssg/types.d.ts +2 -3
- package/dist/ssg/write-static-files.js +16 -12
- package/dist/ssr/attrs.js +0 -2
- package/dist/ssr/boundaries.js +17 -6
- package/dist/ssr/component-runtime.js +4 -30
- package/dist/ssr/context.d.ts +1 -2
- package/dist/ssr/context.js +0 -2
- package/dist/ssr/errors.d.ts +1 -2
- package/dist/ssr/errors.js +0 -2
- package/dist/ssr/escape.js +0 -2
- package/dist/ssr/hydration-data.js +0 -2
- package/dist/ssr/hydration-verify.d.ts +1 -2
- package/dist/ssr/hydration-verify.js +34 -7
- package/dist/ssr/index-internal.d.ts +1 -2
- package/dist/ssr/index-internal.js +0 -2
- package/dist/ssr/render-keys.js +0 -2
- package/dist/ssr/render-resolved.d.ts +1 -2
- package/dist/ssr/render-resolved.js +1 -3
- package/dist/ssr/render-sync.d.ts +1 -2
- package/dist/ssr/render-sync.js +28 -20
- package/dist/ssr/route-policy-resolution.js +2 -3
- package/dist/ssr/route-render.d.ts +1 -2
- package/dist/ssr/route-render.js +2 -3
- package/dist/ssr/sink.d.ts +1 -2
- package/dist/ssr/sink.js +0 -2
- package/dist/ssr/types.d.ts +1 -2
- package/dist/ssr/verify-hydration.js +0 -2
- package/dist/testing/index.d.ts +1 -2
- package/dist/testing/index.js +3 -4
- package/package.json +60 -47
- package/dist/bench/components/benchmark-row.d.ts.map +0 -1
- package/dist/bench/components/benchmark-row.js.map +0 -1
- package/dist/bench/components/benchmark-table.js.map +0 -1
- package/dist/benchmark.d.ts.map +0 -1
- package/dist/benchmark.js.map +0 -1
- package/dist/bin/askr-ssg.d.ts.map +0 -1
- package/dist/bin/askr-ssg.js.map +0 -1
- package/dist/boot/hydration.js.map +0 -1
- package/dist/boot/index.d.ts.map +0 -1
- package/dist/boot/index.js.map +0 -1
- package/dist/boot/root-lifecycle.d.ts.map +0 -1
- package/dist/boot/root-lifecycle.js.map +0 -1
- package/dist/boot/route-startup.js.map +0 -1
- package/dist/boot/types.d.ts.map +0 -1
- package/dist/common/attr-names.js.map +0 -1
- package/dist/common/component.d.ts.map +0 -1
- package/dist/common/control.d.ts.map +0 -1
- package/dist/common/control.js.map +0 -1
- package/dist/common/env.js.map +0 -1
- package/dist/common/jsx.d.ts.map +0 -1
- package/dist/common/jsx.js.map +0 -1
- package/dist/common/promise.js.map +0 -1
- package/dist/common/props.d.ts.map +0 -1
- package/dist/common/render-context.js.map +0 -1
- package/dist/common/route-activity.js.map +0 -1
- package/dist/common/router-internal.js.map +0 -1
- package/dist/common/router.d.ts.map +0 -1
- package/dist/common/ssr-errors.d.ts.map +0 -1
- package/dist/common/ssr-errors.js.map +0 -1
- package/dist/common/ssr.d.ts.map +0 -1
- package/dist/common/ssr.js.map +0 -1
- package/dist/common/vnode.d.ts.map +0 -1
- package/dist/common/vnode.js.map +0 -1
- package/dist/components/error-boundary.d.ts.map +0 -1
- package/dist/components/error-boundary.js.map +0 -1
- package/dist/components/link.d.ts.map +0 -1
- package/dist/components/link.js.map +0 -1
- package/dist/control/case.d.ts.map +0 -1
- package/dist/control/case.js.map +0 -1
- package/dist/control/for.d.ts.map +0 -1
- package/dist/control/for.js.map +0 -1
- package/dist/control/shared.d.ts.map +0 -1
- package/dist/control/shared.js.map +0 -1
- package/dist/control/show.d.ts.map +0 -1
- package/dist/control/show.js.map +0 -1
- package/dist/data/data-runtime.d.ts.map +0 -1
- package/dist/data/data-runtime.js.map +0 -1
- package/dist/data/invalidation-listeners.js.map +0 -1
- package/dist/data/invalidation.d.ts.map +0 -1
- package/dist/data/invalidation.js.map +0 -1
- package/dist/data/mutation-cell.d.ts.map +0 -1
- package/dist/data/mutation-cell.js.map +0 -1
- package/dist/data/query-cell.d.ts.map +0 -1
- package/dist/data/query-cell.js.map +0 -1
- package/dist/data/query-key.js.map +0 -1
- package/dist/data/shared.js.map +0 -1
- package/dist/data/types.d.ts.map +0 -1
- package/dist/dev/invariant.js +0 -29
- package/dist/dev/invariant.js.map +0 -1
- package/dist/dev/logger.js.map +0 -1
- package/dist/foundations/icon/icon.d.ts.map +0 -1
- package/dist/foundations/icon/icon.js.map +0 -1
- package/dist/foundations/icon/icon.types.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.js.map +0 -1
- package/dist/foundations/interactions/focusable.d.ts.map +0 -1
- package/dist/foundations/interactions/focusable.js.map +0 -1
- package/dist/foundations/interactions/hoverable.d.ts.map +0 -1
- package/dist/foundations/interactions/hoverable.js.map +0 -1
- package/dist/foundations/interactions/interaction-policy.d.ts.map +0 -1
- package/dist/foundations/interactions/interaction-policy.js.map +0 -1
- package/dist/foundations/interactions/pressable.d.ts.map +0 -1
- package/dist/foundations/interactions/pressable.js.map +0 -1
- package/dist/foundations/interactions/roving-focus.d.ts.map +0 -1
- package/dist/foundations/interactions/roving-focus.js.map +0 -1
- package/dist/foundations/state/controllable.d.ts.map +0 -1
- package/dist/foundations/state/controllable.js.map +0 -1
- package/dist/foundations/structures/collection.d.ts.map +0 -1
- package/dist/foundations/structures/collection.js.map +0 -1
- package/dist/foundations/structures/layer.d.ts.map +0 -1
- package/dist/foundations/structures/layer.js.map +0 -1
- package/dist/foundations/structures/layout.d.ts.map +0 -1
- package/dist/foundations/structures/layout.js.map +0 -1
- package/dist/foundations/structures/portal.d.ts.map +0 -1
- package/dist/foundations/structures/portal.js.map +0 -1
- package/dist/foundations/structures/presence.d.ts.map +0 -1
- package/dist/foundations/structures/presence.js.map +0 -1
- package/dist/foundations/structures/slot.d.ts.map +0 -1
- package/dist/foundations/structures/slot.js.map +0 -1
- package/dist/foundations/utilities/aria.d.ts.map +0 -1
- package/dist/foundations/utilities/aria.js.map +0 -1
- package/dist/foundations/utilities/compose-handlers.d.ts.map +0 -1
- package/dist/foundations/utilities/compose-handlers.js.map +0 -1
- package/dist/foundations/utilities/compose-ref.d.ts.map +0 -1
- package/dist/foundations/utilities/compose-ref.js.map +0 -1
- package/dist/foundations/utilities/event-types.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.js.map +0 -1
- package/dist/foundations/utilities/use-id.d.ts.map +0 -1
- package/dist/foundations/utilities/use-id.js.map +0 -1
- package/dist/fx/fx.d.ts.map +0 -1
- package/dist/fx/fx.js.map +0 -1
- package/dist/fx/noop.js.map +0 -1
- package/dist/fx/timing.d.ts.map +0 -1
- package/dist/fx/timing.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/jsx/types.d.ts.map +0 -1
- package/dist/jsx/utils.d.ts.map +0 -1
- package/dist/jsx/utils.js.map +0 -1
- package/dist/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx-runtime.js.map +0 -1
- package/dist/renderer/attributes.js.map +0 -1
- package/dist/renderer/boundaries.js.map +0 -1
- package/dist/renderer/child-shape.js.map +0 -1
- package/dist/renderer/children.js.map +0 -1
- package/dist/renderer/cleanup.js.map +0 -1
- package/dist/renderer/component-host-cleanup.js.map +0 -1
- package/dist/renderer/component-host-instances.js.map +0 -1
- package/dist/renderer/component-host.js.map +0 -1
- package/dist/renderer/dom-host.js.map +0 -1
- package/dist/renderer/dom-internal.js.map +0 -1
- package/dist/renderer/element-children.js.map +0 -1
- package/dist/renderer/error-boundary-dom.js.map +0 -1
- package/dist/renderer/evaluate-dom-range.js.map +0 -1
- package/dist/renderer/evaluate-reconcile.js.map +0 -1
- package/dist/renderer/evaluate.js.map +0 -1
- package/dist/renderer/fastpath.js.map +0 -1
- package/dist/renderer/for-commit-dom-map.js.map +0 -1
- package/dist/renderer/for-commit-removal.js.map +0 -1
- package/dist/renderer/for-commit-reorder.js.map +0 -1
- package/dist/renderer/for-commit.js.map +0 -1
- package/dist/renderer/index.js.map +0 -1
- package/dist/renderer/keyed-children.js.map +0 -1
- package/dist/renderer/keyed.js.map +0 -1
- package/dist/renderer/namespaces.js.map +0 -1
- package/dist/renderer/prop-bindings.js.map +0 -1
- package/dist/renderer/reactive-child-dom.js.map +0 -1
- package/dist/renderer/reactive-child-sources.js.map +0 -1
- package/dist/renderer/reactive-children.js.map +0 -1
- package/dist/renderer/reconcile-commit.js.map +0 -1
- package/dist/renderer/reconcile-fastpaths.js.map +0 -1
- package/dist/renderer/reconcile-resolution.js.map +0 -1
- package/dist/renderer/reconcile.js.map +0 -1
- package/dist/renderer/retained-element-rollback.js.map +0 -1
- package/dist/renderer/stable-patch.js.map +0 -1
- package/dist/renderer/static-reuse.js.map +0 -1
- package/dist/renderer/utils.js.map +0 -1
- package/dist/router/access.js.map +0 -1
- package/dist/router/activity.d.ts.map +0 -1
- package/dist/router/activity.js.map +0 -1
- package/dist/router/authoring.d.ts.map +0 -1
- package/dist/router/authoring.js.map +0 -1
- package/dist/router/internal-types.d.ts.map +0 -1
- package/dist/router/lazy.d.ts.map +0 -1
- package/dist/router/lazy.js.map +0 -1
- package/dist/router/manifest.d.ts.map +0 -1
- package/dist/router/manifest.js.map +0 -1
- package/dist/router/match.js.map +0 -1
- package/dist/router/navigate.d.ts.map +0 -1
- package/dist/router/navigate.js.map +0 -1
- package/dist/router/navigation-registry.d.ts.map +0 -1
- package/dist/router/navigation-registry.js.map +0 -1
- package/dist/router/navigation-scroll.d.ts.map +0 -1
- package/dist/router/navigation-scroll.js.map +0 -1
- package/dist/router/navigation-targets.d.ts.map +0 -1
- package/dist/router/navigation-targets.js.map +0 -1
- package/dist/router/policy.d.ts.map +0 -1
- package/dist/router/policy.js.map +0 -1
- package/dist/router/rendering.d.ts.map +0 -1
- package/dist/router/rendering.js.map +0 -1
- package/dist/router/resolution.d.ts.map +0 -1
- package/dist/router/resolution.js.map +0 -1
- package/dist/router/route-context.js.map +0 -1
- package/dist/router/route-query.d.ts.map +0 -1
- package/dist/router/route-query.js.map +0 -1
- package/dist/router/store.d.ts.map +0 -1
- package/dist/router/store.js.map +0 -1
- package/dist/runtime/access.js.map +0 -1
- package/dist/runtime/child-scope.d.ts.map +0 -1
- package/dist/runtime/child-scope.js.map +0 -1
- package/dist/runtime/component-cleanup.d.ts.map +0 -1
- package/dist/runtime/component-cleanup.js.map +0 -1
- package/dist/runtime/component-commit.js.map +0 -1
- package/dist/runtime/component-contracts.js +0 -5
- package/dist/runtime/component-internal.d.ts.map +0 -1
- package/dist/runtime/component-internal.js.map +0 -1
- package/dist/runtime/component-lifecycle.d.ts.map +0 -1
- package/dist/runtime/component-lifecycle.js.map +0 -1
- package/dist/runtime/component-scope.d.ts.map +0 -1
- package/dist/runtime/component-scope.js.map +0 -1
- package/dist/runtime/context.d.ts.map +0 -1
- package/dist/runtime/context.js.map +0 -1
- package/dist/runtime/control.d.ts.map +0 -1
- package/dist/runtime/control.js.map +0 -1
- package/dist/runtime/derive.d.ts.map +0 -1
- package/dist/runtime/derive.js.map +0 -1
- package/dist/runtime/dev-namespace.js.map +0 -1
- package/dist/runtime/effect.d.ts.map +0 -1
- package/dist/runtime/effect.js.map +0 -1
- package/dist/runtime/events.js.map +0 -1
- package/dist/runtime/execution-model.js.map +0 -1
- package/dist/runtime/fastlane.js.map +0 -1
- package/dist/runtime/for-bench.d.ts.map +0 -1
- package/dist/runtime/for-bench.js.map +0 -1
- package/dist/runtime/for-internal.d.ts.map +0 -1
- package/dist/runtime/for-internal.js.map +0 -1
- package/dist/runtime/for-reconcile.d.ts.map +0 -1
- package/dist/runtime/for-reconcile.js.map +0 -1
- package/dist/runtime/for-scopes.d.ts.map +0 -1
- package/dist/runtime/for-scopes.js.map +0 -1
- package/dist/runtime/for-signals.d.ts.map +0 -1
- package/dist/runtime/for-signals.js.map +0 -1
- package/dist/runtime/lifecycle-operations.d.ts.map +0 -1
- package/dist/runtime/lifecycle-operations.js.map +0 -1
- package/dist/runtime/perf-metrics.js.map +0 -1
- package/dist/runtime/readable.d.ts.map +0 -1
- package/dist/runtime/readable.js.map +0 -1
- package/dist/runtime/resource-cell.js.map +0 -1
- package/dist/runtime/resource-operation.d.ts.map +0 -1
- package/dist/runtime/resource-operation.js.map +0 -1
- package/dist/runtime/runtime.d.ts.map +0 -1
- package/dist/runtime/runtime.js.map +0 -1
- package/dist/runtime/scheduler.d.ts.map +0 -1
- package/dist/runtime/scheduler.js.map +0 -1
- package/dist/runtime/selector.d.ts.map +0 -1
- package/dist/runtime/selector.js.map +0 -1
- package/dist/runtime/snapshot-source.d.ts.map +0 -1
- package/dist/runtime/snapshot-source.js.map +0 -1
- package/dist/runtime/state.d.ts.map +0 -1
- package/dist/runtime/state.js.map +0 -1
- package/dist/ssg/batch-render.js.map +0 -1
- package/dist/ssg/create-static-gen.d.ts.map +0 -1
- package/dist/ssg/create-static-gen.js.map +0 -1
- package/dist/ssg/generate-metadata.js.map +0 -1
- package/dist/ssg/generation-plan.js.map +0 -1
- package/dist/ssg/incremental-manifest.js.map +0 -1
- package/dist/ssg/resolve-ssg-data.js.map +0 -1
- package/dist/ssg/route-utils.js.map +0 -1
- package/dist/ssg/static-routes.js.map +0 -1
- package/dist/ssg/types.d.ts.map +0 -1
- package/dist/ssg/write-static-files.js.map +0 -1
- package/dist/ssr/attrs.js.map +0 -1
- package/dist/ssr/boundaries.js.map +0 -1
- package/dist/ssr/component-runtime.js.map +0 -1
- package/dist/ssr/context.d.ts.map +0 -1
- package/dist/ssr/context.js.map +0 -1
- package/dist/ssr/errors.d.ts.map +0 -1
- package/dist/ssr/errors.js.map +0 -1
- package/dist/ssr/escape.js.map +0 -1
- package/dist/ssr/hydration-data.js.map +0 -1
- package/dist/ssr/hydration-verify.d.ts.map +0 -1
- package/dist/ssr/hydration-verify.js.map +0 -1
- package/dist/ssr/index-internal.d.ts.map +0 -1
- package/dist/ssr/index-internal.js.map +0 -1
- package/dist/ssr/render-keys.js.map +0 -1
- package/dist/ssr/render-resolved.d.ts.map +0 -1
- package/dist/ssr/render-resolved.js.map +0 -1
- package/dist/ssr/render-sync.d.ts.map +0 -1
- package/dist/ssr/render-sync.js.map +0 -1
- package/dist/ssr/route-policy-resolution.js.map +0 -1
- package/dist/ssr/route-render.d.ts.map +0 -1
- package/dist/ssr/route-render.js.map +0 -1
- package/dist/ssr/sink.d.ts.map +0 -1
- package/dist/ssr/sink.js.map +0 -1
- package/dist/ssr/types.d.ts.map +0 -1
- package/dist/ssr/verify-hydration.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
|
@@ -1,10 +1,77 @@
|
|
|
1
1
|
import { _isDOMElement } from "../common/vnode.js";
|
|
2
2
|
import { isDevelopmentEnvironment } from "../common/env.js";
|
|
3
|
-
import { getCurrentStateIndex } from "./component-scope.js";
|
|
3
|
+
import { clearRenderTracking, getCurrentInstance, getCurrentStateIndex } from "./component-scope.js";
|
|
4
4
|
import { cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope } from "./component-cleanup.js";
|
|
5
|
-
import {
|
|
5
|
+
import { finalizeInlineReadSubscriptions } from "./lifecycle-batch.js";
|
|
6
|
+
import "./component-lifecycle.js";
|
|
7
|
+
import { createComponentInstance, renderScopedComponent } from "./component-internal.js";
|
|
6
8
|
import "./component.js";
|
|
7
|
-
|
|
9
|
+
const EMPTY_CHILD_SCOPE_PROPS = {};
|
|
10
|
+
const childScopesByInstance = /* @__PURE__ */ new WeakMap();
|
|
11
|
+
function executeChildScopeComponent() {
|
|
12
|
+
const instance = getCurrentInstance();
|
|
13
|
+
const scope = instance ? childScopesByInstance.get(instance) : void 0;
|
|
14
|
+
if (!scope?._renderFn) return null;
|
|
15
|
+
return scope._renderFn();
|
|
16
|
+
}
|
|
17
|
+
function ensureChildScopeFlushTask(scope) {
|
|
18
|
+
const instance = scope.componentInstance;
|
|
19
|
+
if (instance._pendingFlushTask) return;
|
|
20
|
+
instance._pendingFlushTask = () => {
|
|
21
|
+
instance.hasPendingUpdate = false;
|
|
22
|
+
if (instance.notifyUpdate === null || scope._disposed) return;
|
|
23
|
+
renderScope(scope);
|
|
24
|
+
scope._onDirty?.();
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
var ChildScopeImpl = class {
|
|
28
|
+
constructor(parent, key, onDirty) {
|
|
29
|
+
this.previousVnode = void 0;
|
|
30
|
+
this.vnode = void 0;
|
|
31
|
+
this.dom = void 0;
|
|
32
|
+
this.range = void 0;
|
|
33
|
+
this.needsDomUpdate = true;
|
|
34
|
+
this.hydrationPending = true;
|
|
35
|
+
this.blueprintOwner = void 0;
|
|
36
|
+
this._renderFn = void 0;
|
|
37
|
+
this._disposed = false;
|
|
38
|
+
this.key = key;
|
|
39
|
+
this._parent = parent;
|
|
40
|
+
this._onDirty = onDirty;
|
|
41
|
+
this._startStateIndex = getCurrentStateIndex();
|
|
42
|
+
this.componentInstance = createComponentInstance("child-scope", executeChildScopeComponent, EMPTY_CHILD_SCOPE_PROPS, null);
|
|
43
|
+
childScopesByInstance.set(this.componentInstance, this);
|
|
44
|
+
if (parent) {
|
|
45
|
+
this.componentInstance.parentInstance = parent;
|
|
46
|
+
this.componentInstance.ownerFrame = parent.ownerFrame;
|
|
47
|
+
this.componentInstance.portalScope = parent.portalScope;
|
|
48
|
+
registerOwnedChildScope(parent, this);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
markDirty() {
|
|
52
|
+
this.needsDomUpdate = true;
|
|
53
|
+
}
|
|
54
|
+
render(renderFn) {
|
|
55
|
+
this._renderFn = renderFn;
|
|
56
|
+
return renderScope(this);
|
|
57
|
+
}
|
|
58
|
+
dispose() {
|
|
59
|
+
if (this._disposed) return;
|
|
60
|
+
this._disposed = true;
|
|
61
|
+
if (this._parent) unregisterOwnedChildScope(this._parent, this);
|
|
62
|
+
childScopesByInstance.delete(this.componentInstance);
|
|
63
|
+
cleanupComponent(this.componentInstance);
|
|
64
|
+
this._renderFn = void 0;
|
|
65
|
+
this.previousVnode = void 0;
|
|
66
|
+
this.vnode = void 0;
|
|
67
|
+
this.dom = void 0;
|
|
68
|
+
this.range = void 0;
|
|
69
|
+
this.needsDomUpdate = false;
|
|
70
|
+
this.hydrationPending = false;
|
|
71
|
+
this.blueprintOwner = void 0;
|
|
72
|
+
this.componentInstance.hasPendingUpdate = false;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
8
75
|
function renderScope(scope) {
|
|
9
76
|
if (scope._disposed) {
|
|
10
77
|
if (isDevelopmentEnvironment()) throw new Error(`[askr] Attempted to render disposed child scope ${String(scope.key)}.`);
|
|
@@ -19,7 +86,9 @@ function renderScope(scope) {
|
|
|
19
86
|
scope.previousVnode = previousVNode;
|
|
20
87
|
scope.vnode = nextVNode;
|
|
21
88
|
scope.markDirty();
|
|
22
|
-
|
|
89
|
+
if ((componentInstance._pendingReadSources?.size ?? 0) > 0) ensureChildScopeFlushTask(scope);
|
|
90
|
+
finalizeInlineReadSubscriptions(componentInstance, componentInstance._currentRenderToken, componentInstance._pendingReadSources, componentInstance._pendingReadSourceVersions);
|
|
91
|
+
clearRenderTracking(componentInstance);
|
|
23
92
|
return scope.vnode;
|
|
24
93
|
} catch (error) {
|
|
25
94
|
componentInstance.hasPendingUpdate = false;
|
|
@@ -29,59 +98,37 @@ function renderScope(scope) {
|
|
|
29
98
|
function rerenderChildScope(scope) {
|
|
30
99
|
return renderScope(scope);
|
|
31
100
|
}
|
|
101
|
+
/** @internal */
|
|
102
|
+
function captureChildScopeTransactionSnapshot(scope) {
|
|
103
|
+
const mutableScope = scope;
|
|
104
|
+
return {
|
|
105
|
+
previousVnode: scope.previousVnode,
|
|
106
|
+
vnode: scope.vnode,
|
|
107
|
+
dom: scope.dom,
|
|
108
|
+
range: scope.range,
|
|
109
|
+
domTextData: scope.dom?.nodeType === 3 ? scope.dom.data : void 0,
|
|
110
|
+
needsDomUpdate: scope.needsDomUpdate,
|
|
111
|
+
hydrationPending: scope.hydrationPending,
|
|
112
|
+
renderFn: mutableScope._renderFn
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/** @internal */
|
|
116
|
+
function restoreChildScopeTransactionSnapshot(scope, snapshot) {
|
|
117
|
+
const mutableScope = scope;
|
|
118
|
+
scope.previousVnode = snapshot.previousVnode;
|
|
119
|
+
scope.vnode = snapshot.vnode;
|
|
120
|
+
scope.dom = snapshot.dom;
|
|
121
|
+
scope.range = snapshot.range;
|
|
122
|
+
if (snapshot.domTextData !== void 0 && snapshot.dom?.nodeType === 3) snapshot.dom.data = snapshot.domTextData;
|
|
123
|
+
scope.needsDomUpdate = snapshot.needsDomUpdate;
|
|
124
|
+
scope.hydrationPending = snapshot.hydrationPending;
|
|
125
|
+
mutableScope._renderFn = snapshot.renderFn;
|
|
126
|
+
}
|
|
32
127
|
function disposeChildScope(scope) {
|
|
33
128
|
scope.dispose();
|
|
34
129
|
}
|
|
35
130
|
function createChildScope(parent, key, onDirty) {
|
|
36
|
-
|
|
37
|
-
const componentInstance = createComponentInstance(`child-scope-${String(key)}`, () => scope._renderFn?.() ?? null, {}, null);
|
|
38
|
-
if (parent) {
|
|
39
|
-
componentInstance.parentInstance = parent;
|
|
40
|
-
componentInstance.ownerFrame = parent.ownerFrame;
|
|
41
|
-
componentInstance.portalScope = parent.portalScope;
|
|
42
|
-
}
|
|
43
|
-
scope.key = key;
|
|
44
|
-
scope.componentInstance = componentInstance;
|
|
45
|
-
scope.previousVnode = void 0;
|
|
46
|
-
scope.vnode = void 0;
|
|
47
|
-
scope.dom = void 0;
|
|
48
|
-
scope.needsDomUpdate = true;
|
|
49
|
-
scope.hydrationPending = true;
|
|
50
|
-
scope._startStateIndex = getCurrentStateIndex();
|
|
51
|
-
scope._renderFn = void 0;
|
|
52
|
-
scope._onDirty = onDirty;
|
|
53
|
-
scope._parent = parent;
|
|
54
|
-
scope._disposed = false;
|
|
55
|
-
scope.markDirty = () => {
|
|
56
|
-
scope.needsDomUpdate = true;
|
|
57
|
-
};
|
|
58
|
-
scope.render = (renderFn) => {
|
|
59
|
-
scope._renderFn = renderFn;
|
|
60
|
-
return renderScope(scope);
|
|
61
|
-
};
|
|
62
|
-
scope.dispose = () => {
|
|
63
|
-
if (scope._disposed) return;
|
|
64
|
-
scope._disposed = true;
|
|
65
|
-
if (scope._parent) unregisterOwnedChildScope(scope._parent, scope);
|
|
66
|
-
cleanupComponent(componentInstance);
|
|
67
|
-
scope._renderFn = void 0;
|
|
68
|
-
scope.previousVnode = void 0;
|
|
69
|
-
scope.vnode = void 0;
|
|
70
|
-
scope.dom = void 0;
|
|
71
|
-
scope.needsDomUpdate = false;
|
|
72
|
-
scope.hydrationPending = false;
|
|
73
|
-
componentInstance.hasPendingUpdate = false;
|
|
74
|
-
};
|
|
75
|
-
componentInstance._pendingFlushTask = () => {
|
|
76
|
-
componentInstance.hasPendingUpdate = false;
|
|
77
|
-
if (componentInstance.notifyUpdate === null || scope._disposed) return;
|
|
78
|
-
renderScope(scope);
|
|
79
|
-
scope._onDirty?.();
|
|
80
|
-
};
|
|
81
|
-
if (parent) registerOwnedChildScope(parent, scope);
|
|
82
|
-
return scope;
|
|
131
|
+
return new ChildScopeImpl(parent, key, onDirty);
|
|
83
132
|
}
|
|
84
133
|
//#endregion
|
|
85
|
-
export { createChildScope, disposeChildScope, rerenderChildScope };
|
|
86
|
-
|
|
87
|
-
//# sourceMappingURL=child-scope.js.map
|
|
134
|
+
export { captureChildScopeTransactionSnapshot, createChildScope, disposeChildScope, rerenderChildScope, restoreChildScopeTransactionSnapshot };
|
|
@@ -12,5 +12,4 @@ declare function cleanupComponent(instance: ComponentInstance): void;
|
|
|
12
12
|
declare function registerOwnedChildScope(instance: ComponentInstance, scope: OwnedChildScope): void;
|
|
13
13
|
declare function unregisterOwnedChildScope(instance: ComponentInstance, scope: OwnedChildScope): void;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { OwnedChildScope, cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope };
|
|
16
|
-
//# sourceMappingURL=component-cleanup.d.ts.map
|
|
15
|
+
export { OwnedChildScope, cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isDevelopmentEnvironment } from "../common/env.js";
|
|
2
|
-
import { logger } from "../
|
|
2
|
+
import { logger } from "../common/logger.js";
|
|
3
3
|
import { cleanupReadableSubscriptions } from "./readable.js";
|
|
4
4
|
import { clearCurrentComponentScope, restoreCurrentComponentScope } from "./component-scope.js";
|
|
5
5
|
//#region src/runtime/component-cleanup.ts
|
|
@@ -26,7 +26,7 @@ function cleanupComponent(instance) {
|
|
|
26
26
|
recordCleanupError("[Askr] child scope cleanup threw:", err);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
const cleanupFns = instance.cleanupFns;
|
|
29
|
+
const cleanupFns = instance.cleanupFns ?? [];
|
|
30
30
|
instance.cleanupFns = [];
|
|
31
31
|
for (const cleanup of cleanupFns) try {
|
|
32
32
|
cleanup();
|
|
@@ -48,7 +48,7 @@ function cleanupComponent(instance) {
|
|
|
48
48
|
instance.evaluationGeneration++;
|
|
49
49
|
instance.mountOperations = [];
|
|
50
50
|
instance.commitOperations = [];
|
|
51
|
-
instance.lifecycleSlots =
|
|
51
|
+
instance.lifecycleSlots = void 0;
|
|
52
52
|
instance.hasPendingUpdate = false;
|
|
53
53
|
instance.notifyUpdate = null;
|
|
54
54
|
instance._placeholder = void 0;
|
|
@@ -66,5 +66,3 @@ function unregisterOwnedChildScope(instance, scope) {
|
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
export { cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope };
|
|
69
|
-
|
|
70
|
-
//# sourceMappingURL=component-cleanup.js.map
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { isDevelopmentEnvironment } from "../common/env.js";
|
|
2
|
-
import { logger } from "../
|
|
2
|
+
import { logger } from "../common/logger.js";
|
|
3
3
|
import { enqueueRuntimeTask, getRuntimeRenderer } from "./access.js";
|
|
4
|
-
import { withContext } from "./context.js";
|
|
4
|
+
import { getExecutionContextFrame, withContext } from "./context.js";
|
|
5
5
|
import { incDevCounter, setDevValue } from "./dev-namespace.js";
|
|
6
6
|
import { beginRenderTracking, enterDomCommitScope, restoreDomCommitScope } from "./component-scope.js";
|
|
7
7
|
import { isPromiseLike } from "../common/promise.js";
|
|
8
8
|
import { tryRuntimeFastLaneSync } from "./fastlane.js";
|
|
9
|
-
import {
|
|
9
|
+
import { discardCommitOperations } from "./lifecycle-operation-settlement.js";
|
|
10
|
+
import { beginLifecycleCommitBatch, discardLifecycleCommitBatch, flushLifecycleCommitBatch } from "./lifecycle-batch.js";
|
|
11
|
+
import { commitLifecycleForInstance } from "./component-lifecycle.js";
|
|
10
12
|
//#region src/runtime/component-commit.ts
|
|
11
13
|
function runScheduledComponent(instance, host) {
|
|
12
14
|
instance.notifyUpdate = instance._enqueueRun;
|
|
13
15
|
beginRenderTracking(instance);
|
|
14
|
-
const domSnapshot = instance.target ? instance.target.innerHTML : "";
|
|
15
16
|
let result;
|
|
16
17
|
try {
|
|
17
18
|
result = host.execute(instance);
|
|
@@ -33,7 +34,7 @@ function runScheduledComponent(instance, host) {
|
|
|
33
34
|
commitPlaceholderReplacement(instance, result, host);
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
36
|
-
if (instance.target) commitToTarget(instance, result,
|
|
37
|
+
if (instance.target) commitToTarget(instance, result, host);
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
function commitPlaceholderReplacement(instance, result, host) {
|
|
@@ -51,10 +52,7 @@ function commitPlaceholderReplacement(instance, result, host) {
|
|
|
51
52
|
}
|
|
52
53
|
const renderer = getRuntimeRenderer();
|
|
53
54
|
const hostElement = document.createElement("div");
|
|
54
|
-
const executionFrame =
|
|
55
|
-
parent: instance.ownerFrame,
|
|
56
|
-
values: null
|
|
57
|
-
};
|
|
55
|
+
const executionFrame = getExecutionContextFrame(instance.ownerFrame);
|
|
58
56
|
const oldInstance = enterDomCommitScope(instance);
|
|
59
57
|
const lifecycleBatch = beginLifecycleCommitBatch();
|
|
60
58
|
try {
|
|
@@ -62,23 +60,30 @@ function commitPlaceholderReplacement(instance, result, host) {
|
|
|
62
60
|
withContext(executionFrame, () => {
|
|
63
61
|
renderer.evaluate(result, hostElement);
|
|
64
62
|
});
|
|
65
|
-
|
|
63
|
+
const onlyChild = hostElement.childNodes.length === 1 ? hostElement.firstChild : null;
|
|
64
|
+
const replacement = onlyChild instanceof Element ? onlyChild : hostElement;
|
|
65
|
+
if (replacement === hostElement) hostElement.__ASKR_WRAPPER_HOST = true;
|
|
66
|
+
parent.replaceChild(replacement, placeholder);
|
|
67
|
+
instance.target = replacement;
|
|
68
|
+
const instanceHost = replacement;
|
|
69
|
+
const instances = instanceHost.__ASKR_INSTANCES ?? [];
|
|
70
|
+
if (!instances.includes(instance)) instances.push(instance);
|
|
71
|
+
instanceHost.__ASKR_INSTANCES = instances;
|
|
72
|
+
instanceHost.__ASKR_INSTANCE = instances[0] ?? instance;
|
|
66
73
|
} catch (err) {
|
|
67
74
|
discardLifecycleCommitBatch(lifecycleBatch);
|
|
68
75
|
throw err;
|
|
69
76
|
}
|
|
70
|
-
instance.target = hostElement;
|
|
71
77
|
instance._placeholder = void 0;
|
|
72
|
-
hostElement.__ASKR_INSTANCE = instance;
|
|
73
|
-
flushLifecycleCommitBatch(lifecycleBatch);
|
|
74
78
|
host.finalizeReadSubscriptions(instance);
|
|
75
79
|
host.warnUnusedStateReads(instance);
|
|
76
80
|
host.commitRenderedComponent(instance);
|
|
81
|
+
flushLifecycleCommitBatch(lifecycleBatch);
|
|
77
82
|
} finally {
|
|
78
83
|
restoreDomCommitScope(oldInstance);
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
|
-
function commitToTarget(instance, result,
|
|
86
|
+
function commitToTarget(instance, result, host) {
|
|
82
87
|
const renderer = getRuntimeRenderer();
|
|
83
88
|
const target = instance.target;
|
|
84
89
|
let oldChildren = [];
|
|
@@ -86,10 +91,7 @@ function commitToTarget(instance, result, domSnapshot, host) {
|
|
|
86
91
|
try {
|
|
87
92
|
const wasFirstMount = !instance.mounted;
|
|
88
93
|
const oldInstance = enterDomCommitScope(instance);
|
|
89
|
-
const executionFrame =
|
|
90
|
-
parent: instance.ownerFrame,
|
|
91
|
-
values: null
|
|
92
|
-
};
|
|
94
|
+
const executionFrame = getExecutionContextFrame(instance.ownerFrame);
|
|
93
95
|
oldChildren = Array.from(target.childNodes);
|
|
94
96
|
const lifecycleBatch = beginLifecycleCommitBatch();
|
|
95
97
|
try {
|
|
@@ -113,21 +115,23 @@ function commitToTarget(instance, result, domSnapshot, host) {
|
|
|
113
115
|
} finally {
|
|
114
116
|
restoreDomCommitScope(oldInstance);
|
|
115
117
|
}
|
|
116
|
-
flushLifecycleCommitBatch(lifecycleBatch);
|
|
117
118
|
host.finalizeReadSubscriptions(instance);
|
|
118
119
|
host.warnUnusedStateReads(instance);
|
|
119
120
|
instance.mounted = true;
|
|
120
|
-
|
|
121
|
+
commitLifecycleForInstance(instance, wasFirstMount);
|
|
122
|
+
flushLifecycleCommitBatch(lifecycleBatch);
|
|
121
123
|
} catch (renderError) {
|
|
122
124
|
discardCommitOperations(instance);
|
|
123
125
|
cleanupRollbackChildren(renderer, target, oldChildren, restoredOldChildren);
|
|
126
|
+
const rollbackErrors = [];
|
|
124
127
|
try {
|
|
125
128
|
incDevCounter("__DOM_REPLACE_COUNT");
|
|
126
129
|
setDevValue("__LAST_DOM_REPLACE_STACK_COMPONENT_ROLLBACK", (/* @__PURE__ */ new Error()).stack);
|
|
127
130
|
target.replaceChildren(...oldChildren);
|
|
128
|
-
} catch {
|
|
129
|
-
|
|
131
|
+
} catch (rollbackError) {
|
|
132
|
+
rollbackErrors.push(rollbackError);
|
|
130
133
|
}
|
|
134
|
+
if (rollbackErrors.length > 0) logger.error("[Askr] component rollback failed after render error:", new AggregateError(rollbackErrors, "Component rollback failed"));
|
|
131
135
|
throw renderError;
|
|
132
136
|
}
|
|
133
137
|
}
|
|
@@ -161,5 +165,3 @@ function cleanupRollbackChildren(renderer, target, oldChildren, restoredOldChild
|
|
|
161
165
|
}
|
|
162
166
|
//#endregion
|
|
163
167
|
export { runScheduledComponent };
|
|
164
|
-
|
|
165
|
-
//# sourceMappingURL=component-commit.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { claimHookIndex, getCurrentComponentInstance, getCurrentInstance, getCurrentPortalScope, getCurrentStateIndex, getSignal, setCurrentComponentInstance } from "./component-scope.js";
|
|
1
|
+
import { claimHookIndex, enterDomCommitScope, getCurrentComponentInstance, getCurrentInstance, getCurrentPortalScope, getCurrentStateIndex, getSignal, restoreDomCommitScope, setCurrentComponentInstance } from "./component-scope.js";
|
|
2
2
|
import { cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope } from "./component-cleanup.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { getCurrentLifecycleCommitBatch, registerLifecycleRollback, registerLifecycleTransaction } from "./lifecycle-batch.js";
|
|
4
|
+
import "./component-lifecycle.js";
|
|
5
|
+
import { captureInlineRenderSnapshot, createComponentInstance, mountComponent, mountInstanceInline, registerCommitOperation, renderComponentInline, renderScopedComponent, warnUnusedStateReads } from "./component-internal.js";
|
|
6
|
+
export { captureInlineRenderSnapshot, claimHookIndex, cleanupComponent, createComponentInstance, enterDomCommitScope, getCurrentComponentInstance, getCurrentInstance, getCurrentLifecycleCommitBatch, getCurrentPortalScope, getCurrentStateIndex, getSignal, mountComponent, mountInstanceInline, registerCommitOperation, registerLifecycleRollback, registerLifecycleTransaction, registerOwnedChildScope, renderComponentInline, renderScopedComponent, restoreDomCommitScope, setCurrentComponentInstance, unregisterOwnedChildScope, warnUnusedStateReads };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Props } from "../common/props.js";
|
|
2
|
-
import { ReadableSource } from "./readable.js";
|
|
3
2
|
import { State } from "./state.js";
|
|
4
3
|
import { ContextFrame } from "./context.js";
|
|
5
4
|
import { OwnedChildScope, cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope } from "./component-cleanup.js";
|
|
6
|
-
import { LifecycleOperation } from "./
|
|
5
|
+
import { LifecycleOperation } from "./lifecycle-batch.js";
|
|
6
|
+
import { ReadableSource } from "./readable.js";
|
|
7
7
|
import { ComponentFunction } from "../common/component.js";
|
|
8
8
|
|
|
9
9
|
//#region src/runtime/component-internal.d.ts
|
|
@@ -18,23 +18,29 @@ interface ComponentInstance {
|
|
|
18
18
|
abortController: AbortController | null;
|
|
19
19
|
ssr?: boolean;
|
|
20
20
|
cleanupStrict?: boolean;
|
|
21
|
-
stateValues
|
|
21
|
+
stateValues?: State<unknown>[];
|
|
22
22
|
evaluationGeneration: number;
|
|
23
23
|
notifyUpdate: (() => void) | null;
|
|
24
24
|
_pendingFlushTask?: () => void;
|
|
25
25
|
_pendingRunTask?: () => void;
|
|
26
26
|
_enqueueRun?: () => void;
|
|
27
27
|
stateIndexCheck: number;
|
|
28
|
-
expectedStateIndices
|
|
28
|
+
expectedStateIndices?: number[];
|
|
29
29
|
firstRenderComplete: boolean;
|
|
30
30
|
mountOperations: Array<() => void | (() => void) | PromiseLike<void | (() => void)>>;
|
|
31
31
|
commitOperations: Array<() => void | (() => void) | PromiseLike<void | (() => void)>>;
|
|
32
32
|
cleanupFns: Array<() => void>;
|
|
33
|
-
lifecycleSlots
|
|
33
|
+
lifecycleSlots?: unknown[];
|
|
34
34
|
lifecycleGeneration: number;
|
|
35
35
|
hasPendingUpdate: boolean;
|
|
36
36
|
ownerFrame: ContextFrame | null;
|
|
37
37
|
isRoot?: boolean;
|
|
38
|
+
_rootComponentFn?: ComponentFunction;
|
|
39
|
+
_vnodeOwner?: object;
|
|
40
|
+
_vnodeParent?: ComponentInstance | null;
|
|
41
|
+
_vnodeKey?: string | number;
|
|
42
|
+
_vnodePosition?: number;
|
|
43
|
+
_wrapperDepth?: number;
|
|
38
44
|
_currentRenderToken?: number;
|
|
39
45
|
lastRenderToken?: number;
|
|
40
46
|
_pendingReadSources?: Set<ReadableSource<unknown>>;
|
|
@@ -96,5 +102,4 @@ declare function finalizeReadSubscriptions(instance: ComponentInstance): void;
|
|
|
96
102
|
*/
|
|
97
103
|
declare function mountComponent(instance: ComponentInstance): void;
|
|
98
104
|
//#endregion
|
|
99
|
-
export { type ComponentFunction, ComponentInstance, cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope };
|
|
100
|
-
//# sourceMappingURL=component-internal.d.ts.map
|
|
105
|
+
export { type ComponentFunction, ComponentInstance, cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope };
|
|
@@ -1,14 +1,47 @@
|
|
|
1
1
|
import { isDevelopmentEnvironment, isProductionEnvironment } from "../common/env.js";
|
|
2
|
-
import { logger } from "../
|
|
2
|
+
import { logger } from "../common/logger.js";
|
|
3
3
|
import { enqueueRuntimeTask } from "./access.js";
|
|
4
|
-
import { withContext } from "./context.js";
|
|
4
|
+
import { callWithContext, getExecutionContextFrame, withContext } from "./context.js";
|
|
5
5
|
import { finalizeReadableSubscriptions } from "./readable.js";
|
|
6
6
|
import { incDevCounter } from "./dev-namespace.js";
|
|
7
7
|
import { beginRenderTracking, captureInlineComponentScope, captureInlineRenderTracking, clearRenderTracking, enterComponentExecutionScope, enterRenderScopedComponent, exitComponentExecutionScope, getCurrentComponentInstance, getCurrentInstance, getCurrentPortalScope, getSignalForInstance, resetRenderState, restoreInlineComponentScope, restoreInlineRenderTracking, restoreRenderScopedComponent } from "./component-scope.js";
|
|
8
8
|
import { cleanupComponent, registerOwnedChildScope, unregisterOwnedChildScope } from "./component-cleanup.js";
|
|
9
|
-
import {
|
|
9
|
+
import { discardCommitOperations } from "./lifecycle-operation-settlement.js";
|
|
10
|
+
import { captureInlineRenderSnapshot as captureInlineRenderSnapshot$1, finalizeInlineReadSubscriptions } from "./lifecycle-batch.js";
|
|
11
|
+
import { commitLifecycleForInstance, commitRenderedComponent as commitRenderedComponent$1, registerCommitOperationForInstance } from "./component-lifecycle.js";
|
|
10
12
|
import { runScheduledComponent } from "./component-commit.js";
|
|
11
13
|
//#region src/runtime/component-internal.ts
|
|
14
|
+
const PRODUCTION_BUILD_ENABLED = isProductionEnvironment();
|
|
15
|
+
function ensurePendingRunTask(instance) {
|
|
16
|
+
const existing = instance._pendingRunTask;
|
|
17
|
+
if (existing) return existing;
|
|
18
|
+
const task = () => {
|
|
19
|
+
instance.hasPendingUpdate = false;
|
|
20
|
+
if (instance.notifyUpdate === null) return;
|
|
21
|
+
runScheduledComponent(instance, {
|
|
22
|
+
execute: executeComponentSync,
|
|
23
|
+
finalizeReadSubscriptions,
|
|
24
|
+
warnUnusedStateReads,
|
|
25
|
+
commitRenderedComponent
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
instance._pendingRunTask = task;
|
|
29
|
+
if (!instance._pendingFlushTask) instance._pendingFlushTask = task;
|
|
30
|
+
return task;
|
|
31
|
+
}
|
|
32
|
+
function enqueueComponentRun() {
|
|
33
|
+
if (this.hasPendingUpdate) return;
|
|
34
|
+
this.hasPendingUpdate = true;
|
|
35
|
+
enqueueRuntimeTask(ensurePendingRunTask(this));
|
|
36
|
+
}
|
|
37
|
+
var ComponentExecutionContext = class {
|
|
38
|
+
constructor(instance) {
|
|
39
|
+
this.instance = instance;
|
|
40
|
+
}
|
|
41
|
+
get signal() {
|
|
42
|
+
return getSignalForInstance(this.instance);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
12
45
|
function createComponentInstance(id, fn, props, target) {
|
|
13
46
|
const parentInstance = getCurrentInstance();
|
|
14
47
|
const instance = {
|
|
@@ -20,19 +53,19 @@ function createComponentInstance(id, fn, props, target) {
|
|
|
20
53
|
portalScope: parentInstance?.portalScope ?? getCurrentPortalScope() ?? null,
|
|
21
54
|
mounted: false,
|
|
22
55
|
abortController: null,
|
|
23
|
-
stateValues:
|
|
56
|
+
stateValues: void 0,
|
|
24
57
|
evaluationGeneration: 0,
|
|
25
58
|
notifyUpdate: null,
|
|
26
59
|
_pendingFlushTask: void 0,
|
|
27
60
|
_pendingRunTask: void 0,
|
|
28
61
|
_enqueueRun: void 0,
|
|
29
62
|
stateIndexCheck: -1,
|
|
30
|
-
expectedStateIndices:
|
|
63
|
+
expectedStateIndices: void 0,
|
|
31
64
|
firstRenderComplete: false,
|
|
32
65
|
mountOperations: [],
|
|
33
66
|
commitOperations: [],
|
|
34
67
|
cleanupFns: [],
|
|
35
|
-
lifecycleSlots:
|
|
68
|
+
lifecycleSlots: void 0,
|
|
36
69
|
lifecycleGeneration: 0,
|
|
37
70
|
hasPendingUpdate: false,
|
|
38
71
|
ownerFrame: null,
|
|
@@ -46,23 +79,7 @@ function createComponentInstance(id, fn, props, target) {
|
|
|
46
79
|
_lastReadSources: void 0,
|
|
47
80
|
devWarningsEmitted: void 0
|
|
48
81
|
};
|
|
49
|
-
instance.
|
|
50
|
-
instance.hasPendingUpdate = false;
|
|
51
|
-
if (instance.notifyUpdate === null) return;
|
|
52
|
-
runScheduledComponent(instance, {
|
|
53
|
-
execute: executeComponentSync,
|
|
54
|
-
finalizeReadSubscriptions,
|
|
55
|
-
warnUnusedStateReads,
|
|
56
|
-
commitRenderedComponent
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
instance._enqueueRun = () => {
|
|
60
|
-
if (!instance.hasPendingUpdate) {
|
|
61
|
-
instance.hasPendingUpdate = true;
|
|
62
|
-
enqueueRuntimeTask(instance._pendingRunTask);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
instance._pendingFlushTask = instance._pendingRunTask;
|
|
82
|
+
instance._enqueueRun = enqueueComponentRun;
|
|
66
83
|
return instance;
|
|
67
84
|
}
|
|
68
85
|
/**
|
|
@@ -83,10 +100,16 @@ function mountInstanceInline(instance, target) {
|
|
|
83
100
|
try {
|
|
84
101
|
if (target instanceof Element) {
|
|
85
102
|
const host = target;
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
103
|
+
const instances = host.__ASKR_INSTANCES;
|
|
104
|
+
if (!instances) {
|
|
105
|
+
host.__ASKR_INSTANCES = [instance];
|
|
106
|
+
host.__ASKR_INSTANCE = instance;
|
|
107
|
+
} else if (instances[instances.length - 1] !== instance) {
|
|
108
|
+
const nextInstances = instances.indexOf(instance) === -1 ? instances.slice() : instances.filter((entry) => entry !== instance);
|
|
109
|
+
nextInstances.push(instance);
|
|
110
|
+
host.__ASKR_INSTANCES = nextInstances;
|
|
111
|
+
host.__ASKR_INSTANCE = nextInstances[0] ?? instance;
|
|
112
|
+
}
|
|
90
113
|
}
|
|
91
114
|
} catch (err) {}
|
|
92
115
|
instance.notifyUpdate = instance._enqueueRun;
|
|
@@ -108,10 +131,7 @@ function renderScopedComponent(instance, startStateIndex, render) {
|
|
|
108
131
|
const savedScope = enterRenderScopedComponent(instance, startStateIndex);
|
|
109
132
|
let didComplete = false;
|
|
110
133
|
try {
|
|
111
|
-
const result = withContext(
|
|
112
|
-
parent: instance.ownerFrame,
|
|
113
|
-
values: null
|
|
114
|
-
}, render);
|
|
134
|
+
const result = withContext(getExecutionContextFrame(instance.ownerFrame), render);
|
|
115
135
|
didComplete = true;
|
|
116
136
|
return result;
|
|
117
137
|
} finally {
|
|
@@ -141,8 +161,10 @@ function renderComponentInline(instance) {
|
|
|
141
161
|
}
|
|
142
162
|
}
|
|
143
163
|
function warnUnusedStateReads(instance) {
|
|
144
|
-
|
|
145
|
-
|
|
164
|
+
const stateValues = instance.stateValues;
|
|
165
|
+
if (!stateValues) return;
|
|
166
|
+
for (let i = 0; i < stateValues.length; i++) {
|
|
167
|
+
const state = stateValues[i];
|
|
146
168
|
const hasCommittedUsage = (state?._readers?.size ?? 0) > 0 || (state?._derivedSubscribers?.size ?? 0) > 0;
|
|
147
169
|
if (state && !state._hasBeenRead && !state._hasEverBeenRead && !hasCommittedUsage) try {
|
|
148
170
|
const name = instance.fn?.name || "<anonymous>";
|
|
@@ -159,16 +181,14 @@ function executeComponentSync(instance) {
|
|
|
159
181
|
const savedPortalScope = enterComponentExecutionScope(instance);
|
|
160
182
|
let didComplete = false;
|
|
161
183
|
try {
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
const renderTime = Date.now() - renderStartTime;
|
|
171
|
-
if (renderTime > 5) warnInstanceOnce(instance, "slow-render", `[askr] Slow render detected: ${renderTime}ms. Consider optimizing component performance.`);
|
|
184
|
+
const trackRenderTime = !PRODUCTION_BUILD_ENABLED && isDevelopmentEnvironment();
|
|
185
|
+
const renderStartTime = trackRenderTime ? Date.now() : 0;
|
|
186
|
+
const context = new ComponentExecutionContext(instance);
|
|
187
|
+
const result = callWithContext(getExecutionContextFrame(instance.ownerFrame), instance.fn, instance.props, context);
|
|
188
|
+
if (trackRenderTime) {
|
|
189
|
+
const renderTime = Date.now() - renderStartTime;
|
|
190
|
+
if (renderTime > 5) warnInstanceOnce(instance, "slow-render", `[askr] Slow render detected: ${renderTime}ms. Consider optimizing component performance.`);
|
|
191
|
+
}
|
|
172
192
|
if (!instance.firstRenderComplete) instance.firstRenderComplete = true;
|
|
173
193
|
didComplete = true;
|
|
174
194
|
return result;
|
|
@@ -185,7 +205,7 @@ function executeComponentSync(instance) {
|
|
|
185
205
|
function executeComponent(instance) {
|
|
186
206
|
instance.abortController = null;
|
|
187
207
|
instance.notifyUpdate = instance._enqueueRun;
|
|
188
|
-
enqueueRuntimeTask(instance
|
|
208
|
+
enqueueRuntimeTask(ensurePendingRunTask(instance));
|
|
189
209
|
}
|
|
190
210
|
/**
|
|
191
211
|
* Finalize read subscriptions for an instance after a successful commit.
|
|
@@ -215,5 +235,3 @@ function warnInstanceOnce(instance, key, message) {
|
|
|
215
235
|
}
|
|
216
236
|
//#endregion
|
|
217
237
|
export { captureInlineRenderSnapshot, cleanupComponent, commitRenderedComponent, createComponentInstance, executeComponent, finalizeReadSubscriptions, mountComponent, mountInstanceInline, registerCommitOperation, registerOwnedChildScope, renderComponentInline, renderScopedComponent, unregisterOwnedChildScope, warnUnusedStateReads };
|
|
218
|
-
|
|
219
|
-
//# sourceMappingURL=component-internal.js.map
|
|
@@ -1,49 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReadableSource } from "./readable.js";
|
|
3
|
-
import { ContextFrame } from "./context.js";
|
|
1
|
+
import { LifecycleCommitBatch, LifecycleOperation, LifecycleTransaction } from "./lifecycle-batch.js";
|
|
4
2
|
import { ComponentInstance } from "./component-internal.js";
|
|
5
3
|
|
|
6
4
|
//#region src/runtime/component-lifecycle.d.ts
|
|
7
|
-
type LifecycleOperation = () => void | (() => void) | PromiseLike<void | (() => void)>;
|
|
8
|
-
type LifecycleCommitBatchEntry = {
|
|
9
|
-
instance: ComponentInstance;
|
|
10
|
-
wasFirstMount: boolean;
|
|
11
|
-
};
|
|
12
|
-
type ReadSubscriptionCommit = {
|
|
13
|
-
instance: ComponentInstance;
|
|
14
|
-
token: number;
|
|
15
|
-
pendingReadSources: Set<ReadableSource<unknown>> | undefined;
|
|
16
|
-
pendingReadSourceVersions: Map<ReadableSource<unknown>, number> | undefined;
|
|
17
|
-
};
|
|
18
|
-
type InlineRenderSnapshot = {
|
|
19
|
-
instance: ComponentInstance;
|
|
20
|
-
props: Props;
|
|
21
|
-
ownerFrame: ContextFrame | null;
|
|
22
|
-
portalScope: object | null;
|
|
23
|
-
parentInstance: ComponentInstance | null;
|
|
24
|
-
isRoot: boolean | undefined;
|
|
25
|
-
};
|
|
26
|
-
type LifecycleCommitBatch = {
|
|
27
|
-
parent: LifecycleCommitBatch | null;
|
|
28
|
-
entries: LifecycleCommitBatchEntry[];
|
|
29
|
-
entriesByInstance: Map<ComponentInstance, LifecycleCommitBatchEntry>;
|
|
30
|
-
readCommits: ReadSubscriptionCommit[];
|
|
31
|
-
readCommitsByInstance: Map<ComponentInstance, ReadSubscriptionCommit>;
|
|
32
|
-
renderSnapshots: InlineRenderSnapshot[];
|
|
33
|
-
renderSnapshotsByInstance: Map<ComponentInstance, InlineRenderSnapshot>;
|
|
34
|
-
active: boolean;
|
|
35
|
-
};
|
|
36
|
-
declare function beginLifecycleCommitBatch(): LifecycleCommitBatch;
|
|
37
|
-
declare function captureInlineRenderSnapshot(instance: ComponentInstance): void;
|
|
38
|
-
declare function finalizeInlineReadSubscriptions(instance: ComponentInstance, token: number, pendingReadSources: Set<ReadableSource<unknown>> | undefined, pendingReadSourceVersions: Map<ReadableSource<unknown>, number> | undefined): void;
|
|
39
|
-
declare function flushLifecycleCommitBatch(batch: LifecycleCommitBatch): void;
|
|
40
|
-
declare function discardLifecycleCommitBatch(batch: LifecycleCommitBatch): void;
|
|
41
5
|
declare function registerMountOperationForInstance(instance: ComponentInstance | null, operation: LifecycleOperation): void;
|
|
42
6
|
declare function registerCommitOperationForInstance(instance: ComponentInstance | null, operation: LifecycleOperation): void;
|
|
43
|
-
declare function discardCommitOperations(instance: ComponentInstance): void;
|
|
44
|
-
declare function executeCommittedLifecycleOperations(instance: ComponentInstance, wasFirstMount: boolean): void;
|
|
45
7
|
declare function commitLifecycleForInstance(instance: ComponentInstance, wasFirstMount: boolean): void;
|
|
46
8
|
declare function commitRenderedComponent(instance: ComponentInstance): void;
|
|
47
9
|
//#endregion
|
|
48
|
-
export {
|
|
49
|
-
//# sourceMappingURL=component-lifecycle.d.ts.map
|
|
10
|
+
export type { LifecycleOperation };
|