@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
|
@@ -2,173 +2,83 @@ import { _isDOMElement } from "../common/vnode.js";
|
|
|
2
2
|
import "./types.js";
|
|
3
3
|
import { getCurrentContextFrame, getVNodeContextFrame, markVNodeTreeWithContextFrame, withContext } from "../runtime/context.js";
|
|
4
4
|
import { getCurrentInstance } from "../runtime/component-scope.js";
|
|
5
|
-
import { cleanupComponent } from "../runtime/component-cleanup.js";
|
|
6
5
|
import { isPromiseLike } from "../common/promise.js";
|
|
7
6
|
import { captureInlineRenderSnapshot, createComponentInstance, mountInstanceInline, renderComponentInline, warnUnusedStateReads } from "../runtime/component-internal.js";
|
|
8
|
-
import "../runtime/
|
|
7
|
+
import "../runtime/index.js";
|
|
9
8
|
import { tagNamesEqualIgnoreCase } from "./utils.js";
|
|
10
|
-
import { materializeKey } from "./attributes.js";
|
|
11
|
-
import { normalizeComponentChildren } from "./child-shape.js";
|
|
12
|
-
import { cleanupDetachedComponentHost, pruneComponentHostInstances } from "./component-host-cleanup.js";
|
|
9
|
+
import { materializeFreshKey, materializeKey } from "./attributes.js";
|
|
13
10
|
import { getRendererDOMHost } from "./dom-host.js";
|
|
14
|
-
import {
|
|
11
|
+
import { normalizeComponentChildren } from "./child-shape.js";
|
|
12
|
+
import { pruneComponentHostInstances } from "./component-host-cleanup.js";
|
|
13
|
+
import { findHostInstanceByType, getVNodeComponentInstance, inheritComponentCleanupStrict, inheritComponentKey, isRouteRootComponentVNode, nextComponentInstanceId, restoreVNodeComponentInstance, setComponentOwnershipIdentity, setVNodeComponentInstance } from "./component-host-instances.js";
|
|
14
|
+
import { beginComponentHostReplacement, cleanupProvisionalComponentInstance, createRetainedHostInstanceSet, registerVNodeComponentInstanceRollback } from "./component-host-replacement.js";
|
|
15
|
+
import { materializeComponentResultNode, resolveHostNestedComponentResult, resolveNestedComponentResult, resolveWrapperHostResult } from "./component-host-results.js";
|
|
15
16
|
//#region src/renderer/component-host.ts
|
|
16
|
-
function materializeComponentResultNode(childInstance, result, parentNamespace) {
|
|
17
|
-
const dom = getRendererDOMHost().createDOMNode(result, parentNamespace);
|
|
18
|
-
if (dom instanceof Element) {
|
|
19
|
-
mountInstanceInline(childInstance, dom);
|
|
20
|
-
return dom;
|
|
21
|
-
}
|
|
22
|
-
if (!dom) {
|
|
23
|
-
const placeholder = document.createComment("");
|
|
24
|
-
try {
|
|
25
|
-
placeholder.__ASKR_INSTANCE = childInstance;
|
|
26
|
-
} catch {}
|
|
27
|
-
childInstance._placeholder = placeholder;
|
|
28
|
-
mountInstanceInline(childInstance, null);
|
|
29
|
-
return placeholder;
|
|
30
|
-
}
|
|
31
|
-
const host = document.createElement("div");
|
|
32
|
-
host.appendChild(dom);
|
|
33
|
-
host.__ASKR_WRAPPER_HOST = true;
|
|
34
|
-
mountInstanceInline(childInstance, host);
|
|
35
|
-
return host;
|
|
36
|
-
}
|
|
37
|
-
function resolveNestedComponentResult(result, snapshot, parentInstance) {
|
|
38
|
-
let currentResult = result;
|
|
39
|
-
let activeSnapshot = snapshot;
|
|
40
|
-
let depth = 0;
|
|
41
|
-
while (_isDOMElement(currentResult) && typeof currentResult.type === "function" && depth < 16) {
|
|
42
|
-
const nestedSnapshot = getVNodeContextFrame(currentResult) ?? activeSnapshot;
|
|
43
|
-
const nestedInstance = createComponentInstance(nextComponentInstanceId(), currentResult.type, currentResult.props ?? {}, null);
|
|
44
|
-
nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);
|
|
45
|
-
nestedInstance.parentInstance = parentInstance;
|
|
46
|
-
nestedInstance.portalScope = parentInstance?.portalScope ?? nestedInstance.portalScope;
|
|
47
|
-
inheritComponentCleanupStrict(nestedInstance);
|
|
48
|
-
if (nestedSnapshot) nestedInstance.ownerFrame = nestedSnapshot;
|
|
49
|
-
const nextResult = withContext(nestedSnapshot ?? null, () => renderComponentInline(nestedInstance));
|
|
50
|
-
cleanupComponent(nestedInstance);
|
|
51
|
-
if (isPromiseLike(nextResult)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
52
|
-
activeSnapshot = nestedSnapshot ?? null;
|
|
53
|
-
currentResult = nextResult;
|
|
54
|
-
depth += 1;
|
|
55
|
-
}
|
|
56
|
-
return currentResult;
|
|
57
|
-
}
|
|
58
|
-
function resolveHostNestedComponentResult(host, retainedInstance, result, snapshot, retainedHostInstances) {
|
|
59
|
-
let currentResult = result;
|
|
60
|
-
let activeSnapshot = snapshot;
|
|
61
|
-
let depth = 0;
|
|
62
|
-
const retainedInstances = /* @__PURE__ */ new Set([retainedInstance]);
|
|
63
|
-
if (retainedHostInstances) for (const instance of retainedHostInstances) retainedInstances.add(instance);
|
|
64
|
-
const createdInstances = [];
|
|
65
|
-
while (_isDOMElement(currentResult) && typeof currentResult.type === "function" && depth < 16) {
|
|
66
|
-
const nestedSnapshot = getVNodeContextFrame(currentResult) ?? activeSnapshot;
|
|
67
|
-
let nestedInstance = findHostInstanceByType(host, currentResult.type);
|
|
68
|
-
const hadNestedInstance = !!nestedInstance;
|
|
69
|
-
if (!nestedInstance) {
|
|
70
|
-
nestedInstance = createComponentInstance(nextComponentInstanceId(), currentResult.type, currentResult.props ?? {}, null);
|
|
71
|
-
createdInstances.push(nestedInstance);
|
|
72
|
-
}
|
|
73
|
-
if (hadNestedInstance) captureInlineRenderSnapshot(nestedInstance);
|
|
74
|
-
setVNodeComponentInstance(currentResult, nestedInstance);
|
|
75
|
-
nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);
|
|
76
|
-
nestedInstance.parentInstance = retainedInstance;
|
|
77
|
-
nestedInstance.portalScope = retainedInstance.portalScope ?? nestedInstance.portalScope;
|
|
78
|
-
inheritComponentCleanupStrict(nestedInstance);
|
|
79
|
-
nestedInstance.props = (currentResult.props ?? {}) || {};
|
|
80
|
-
if (nestedSnapshot) nestedInstance.ownerFrame = nestedSnapshot;
|
|
81
|
-
const nextResult = withContext(nestedSnapshot ?? null, () => renderComponentInline(nestedInstance));
|
|
82
|
-
if (isPromiseLike(nextResult)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
83
|
-
retainedInstances.add(nestedInstance);
|
|
84
|
-
warnUnusedStateReads(nestedInstance);
|
|
85
|
-
activeSnapshot = nestedSnapshot ?? null;
|
|
86
|
-
currentResult = markVNodeTreeWithContextFrame(nextResult, activeSnapshot);
|
|
87
|
-
depth += 1;
|
|
88
|
-
}
|
|
89
|
-
const previousInstances = host.__ASKR_INSTANCES ?? [];
|
|
90
|
-
for (const instance of previousInstances) if (!retainedInstances.has(instance)) cleanupComponent(instance);
|
|
91
|
-
const nextHostInstances = previousInstances.filter((instance) => retainedInstances.has(instance));
|
|
92
|
-
for (const instance of retainedInstances) if (instance.target === host && !nextHostInstances.includes(instance)) nextHostInstances.push(instance);
|
|
93
|
-
host.__ASKR_INSTANCES = nextHostInstances;
|
|
94
|
-
host.__ASKR_INSTANCE = host.__ASKR_INSTANCES[0] ?? retainedInstance;
|
|
95
|
-
for (const instance of createdInstances) mountInstanceInline(instance, host);
|
|
96
|
-
return currentResult;
|
|
97
|
-
}
|
|
98
|
-
function resolveWrapperHostResult(host, result, snapshot) {
|
|
99
|
-
let currentResult = result;
|
|
100
|
-
let activeSnapshot = snapshot;
|
|
101
|
-
let depth = 0;
|
|
102
|
-
while (_isDOMElement(currentResult) && typeof currentResult.type === "function" && depth < 16) {
|
|
103
|
-
const nestedSnapshot = getVNodeContextFrame(currentResult) ?? activeSnapshot;
|
|
104
|
-
const nestedInstance = findHostInstanceByType(host, currentResult.type);
|
|
105
|
-
if (!nestedInstance) break;
|
|
106
|
-
captureInlineRenderSnapshot(nestedInstance);
|
|
107
|
-
nestedInstance.props = (currentResult.props ?? {}) || {};
|
|
108
|
-
nestedInstance.parentInstance = getCurrentInstance();
|
|
109
|
-
nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);
|
|
110
|
-
nestedInstance.portalScope = getCurrentInstance()?.portalScope ?? nestedInstance.portalScope;
|
|
111
|
-
inheritComponentCleanupStrict(nestedInstance);
|
|
112
|
-
if (nestedSnapshot) nestedInstance.ownerFrame = nestedSnapshot;
|
|
113
|
-
const nextResult = withContext(nestedSnapshot ?? null, () => renderComponentInline(nestedInstance));
|
|
114
|
-
if (isPromiseLike(nextResult)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
115
|
-
warnUnusedStateReads(nestedInstance);
|
|
116
|
-
activeSnapshot = nestedSnapshot ?? null;
|
|
117
|
-
currentResult = nextResult;
|
|
118
|
-
depth += 1;
|
|
119
|
-
}
|
|
120
|
-
return markVNodeTreeWithContextFrame(currentResult, activeSnapshot);
|
|
121
|
-
}
|
|
122
17
|
function syncComponentElement(currentDom, node, type, props, parentNamespace, forceChildrenUpdate = false, retainedHostInstances) {
|
|
123
18
|
const existingHost = currentDom instanceof Element ? currentDom : null;
|
|
124
|
-
const existingInstance = existingHost ? findHostInstanceByType(existingHost, type) : null;
|
|
19
|
+
const existingInstance = existingHost ? findHostInstanceByType(existingHost, type, node, getCurrentInstance(), 0) : null;
|
|
125
20
|
if (!existingHost) return null;
|
|
126
21
|
const domHost = getRendererDOMHost();
|
|
127
22
|
if (!existingInstance || existingInstance.fn !== type) {
|
|
128
23
|
const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame() || null;
|
|
129
24
|
const hydrationInstance = createComponentInstance(nextComponentInstanceId(), type, props || {}, existingHost);
|
|
25
|
+
setComponentOwnershipIdentity(hydrationInstance, node, getCurrentInstance(), 0);
|
|
130
26
|
hydrationInstance.isRoot = isRouteRootComponentVNode(node);
|
|
131
27
|
hydrationInstance.portalScope = getCurrentInstance()?.portalScope ?? hydrationInstance.portalScope;
|
|
132
28
|
inheritComponentCleanupStrict(hydrationInstance);
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
29
|
+
const previousVNodeInstance = getVNodeComponentInstance(node);
|
|
30
|
+
const liveRetainedInstances = createRetainedHostInstanceSet(hydrationInstance, retainedHostInstances);
|
|
31
|
+
pruneComponentHostInstances(existingHost, liveRetainedInstances);
|
|
32
|
+
const replacement = beginComponentHostReplacement(existingHost, hydrationInstance, hydrationInstance.target, liveRetainedInstances, true);
|
|
33
|
+
try {
|
|
34
|
+
registerVNodeComponentInstanceRollback(node, previousVNodeInstance, hydrationInstance);
|
|
35
|
+
setVNodeComponentInstance(node, hydrationInstance);
|
|
36
|
+
if (snapshot) hydrationInstance.ownerFrame = snapshot;
|
|
37
|
+
const result = withContext(snapshot, () => renderComponentInline(hydrationInstance));
|
|
38
|
+
if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
39
|
+
const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
|
|
40
|
+
if (scopedResult && typeof scopedResult === "object" && "type" in scopedResult && typeof scopedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, scopedResult.type)) {
|
|
41
|
+
withContext(snapshot, () => {
|
|
42
|
+
domHost.updateElementFromVnode(existingHost, inheritComponentKey(scopedResult, node), true, forceChildrenUpdate || hydrationInstance.mounted === false);
|
|
43
|
+
materializeKey(existingHost, node, props);
|
|
44
|
+
});
|
|
45
|
+
mountInstanceInline(hydrationInstance, existingHost);
|
|
46
|
+
itemInstanceHydrationComplete(existingHost);
|
|
47
|
+
warnUnusedStateReads(hydrationInstance);
|
|
48
|
+
return existingHost;
|
|
49
|
+
}
|
|
50
|
+
const resolvedResult = resolveHostNestedComponentResult(existingHost, hydrationInstance, scopedResult, snapshot ?? null, liveRetainedInstances);
|
|
51
|
+
if (_isDOMElement(resolvedResult) && typeof resolvedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, resolvedResult.type)) {
|
|
52
|
+
withContext(snapshot, () => {
|
|
53
|
+
domHost.updateElementFromVnode(existingHost, inheritComponentKey(resolvedResult, node), true, forceChildrenUpdate || hydrationInstance.mounted === false);
|
|
54
|
+
materializeKey(existingHost, node, props);
|
|
55
|
+
});
|
|
56
|
+
mountInstanceInline(hydrationInstance, existingHost);
|
|
57
|
+
itemInstanceHydrationComplete(existingHost);
|
|
58
|
+
warnUnusedStateReads(hydrationInstance);
|
|
59
|
+
return existingHost;
|
|
60
|
+
}
|
|
61
|
+
const nextDom = replacement.replace(() => materializeComponentResultNode(hydrationInstance, scopedResult, parentNamespace), (replacement) => {
|
|
62
|
+
if (replacement instanceof Element) {
|
|
63
|
+
materializeKey(replacement, node, props);
|
|
64
|
+
retainReplacementOwnerChain(replacement, hydrationInstance, liveRetainedInstances);
|
|
65
|
+
}
|
|
154
66
|
});
|
|
155
|
-
mountInstanceInline(hydrationInstance, existingHost);
|
|
156
|
-
itemInstanceHydrationComplete(existingHost);
|
|
157
67
|
warnUnusedStateReads(hydrationInstance);
|
|
158
|
-
return
|
|
68
|
+
return nextDom;
|
|
69
|
+
} catch (error) {
|
|
70
|
+
restoreVNodeComponentInstance(node, previousVNodeInstance);
|
|
71
|
+
if (!hydrationInstance.mounted) cleanupProvisionalComponentInstance(hydrationInstance);
|
|
72
|
+
throw error;
|
|
159
73
|
}
|
|
160
|
-
const nextDom = materializeComponentResultNode(hydrationInstance, scopedResult, parentNamespace);
|
|
161
|
-
if (nextDom instanceof Element) materializeKey(nextDom, node, props);
|
|
162
|
-
if (nextDom !== existingHost && existingHost.parentNode) {
|
|
163
|
-
existingHost.parentNode.replaceChild(nextDom, existingHost);
|
|
164
|
-
cleanupDetachedComponentHost(existingHost, hydrationInstance);
|
|
165
|
-
}
|
|
166
|
-
warnUnusedStateReads(hydrationInstance);
|
|
167
|
-
return nextDom;
|
|
168
74
|
}
|
|
169
75
|
const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame() || existingInstance.ownerFrame || null;
|
|
76
|
+
const liveRetainedInstances = createRetainedHostInstanceSet(existingInstance, retainedHostInstances);
|
|
77
|
+
pruneComponentHostInstances(existingHost, liveRetainedInstances);
|
|
78
|
+
const replacement = beginComponentHostReplacement(existingHost, existingInstance, existingInstance.target, liveRetainedInstances);
|
|
170
79
|
captureInlineRenderSnapshot(existingInstance);
|
|
171
80
|
existingInstance.props = props || {};
|
|
81
|
+
setComponentOwnershipIdentity(existingInstance, node, getCurrentInstance(), 0);
|
|
172
82
|
existingInstance.isRoot = isRouteRootComponentVNode(node);
|
|
173
83
|
existingInstance.portalScope = getCurrentInstance()?.portalScope ?? existingInstance.portalScope;
|
|
174
84
|
inheritComponentCleanupStrict(existingInstance);
|
|
@@ -177,13 +87,12 @@ function syncComponentElement(currentDom, node, type, props, parentNamespace, fo
|
|
|
177
87
|
if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
178
88
|
const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
|
|
179
89
|
if (existingHost.__ASKR_WRAPPER_HOST) {
|
|
180
|
-
const wrapperResult = resolveWrapperHostResult(existingHost, scopedResult, snapshot ?? null);
|
|
90
|
+
const wrapperResult = resolveWrapperHostResult(existingHost, scopedResult, snapshot ?? null, liveRetainedInstances);
|
|
181
91
|
domHost.updateElementChildren(existingHost, normalizeComponentChildren(wrapperResult));
|
|
182
92
|
warnUnusedStateReads(existingInstance);
|
|
183
93
|
return existingHost;
|
|
184
94
|
}
|
|
185
95
|
if (scopedResult && typeof scopedResult === "object" && "type" in scopedResult && typeof scopedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, scopedResult.type)) {
|
|
186
|
-
pruneComponentHostInstances(existingHost, retainedHostInstances ? [existingInstance, ...retainedHostInstances] : [existingInstance]);
|
|
187
96
|
withContext(snapshot, () => {
|
|
188
97
|
domHost.updateElementFromVnode(existingHost, inheritComponentKey(scopedResult, node), true, forceChildrenUpdate || existingInstance.mounted === false);
|
|
189
98
|
materializeKey(existingHost, node, props);
|
|
@@ -191,7 +100,7 @@ function syncComponentElement(currentDom, node, type, props, parentNamespace, fo
|
|
|
191
100
|
warnUnusedStateReads(existingInstance);
|
|
192
101
|
return existingHost;
|
|
193
102
|
}
|
|
194
|
-
const resolvedResult = resolveHostNestedComponentResult(existingHost, existingInstance, scopedResult, snapshot ?? null,
|
|
103
|
+
const resolvedResult = resolveHostNestedComponentResult(existingHost, existingInstance, scopedResult, snapshot ?? null, liveRetainedInstances);
|
|
195
104
|
if (_isDOMElement(resolvedResult) && typeof resolvedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, resolvedResult.type)) {
|
|
196
105
|
withContext(snapshot, () => {
|
|
197
106
|
domHost.updateElementFromVnode(existingHost, inheritComponentKey(resolvedResult, node), true, forceChildrenUpdate || existingInstance.mounted === false);
|
|
@@ -200,15 +109,22 @@ function syncComponentElement(currentDom, node, type, props, parentNamespace, fo
|
|
|
200
109
|
warnUnusedStateReads(existingInstance);
|
|
201
110
|
return existingHost;
|
|
202
111
|
}
|
|
203
|
-
const nextDom = materializeComponentResultNode(existingInstance, scopedResult, parentNamespace)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
112
|
+
const nextDom = replacement.replace(() => materializeComponentResultNode(existingInstance, scopedResult, parentNamespace), (replacement) => {
|
|
113
|
+
if (replacement instanceof Element) {
|
|
114
|
+
materializeKey(replacement, node, props);
|
|
115
|
+
retainReplacementOwnerChain(replacement, existingInstance, liveRetainedInstances);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
209
118
|
warnUnusedStateReads(existingInstance);
|
|
210
119
|
return nextDom;
|
|
211
120
|
}
|
|
121
|
+
function retainReplacementOwnerChain(host, owner, retainedInstances) {
|
|
122
|
+
const componentHost = host;
|
|
123
|
+
const next = [...componentHost.__ASKR_INSTANCES ?? []];
|
|
124
|
+
for (const instance of retainedInstances) if (!next.includes(instance)) next.push(instance);
|
|
125
|
+
componentHost.__ASKR_INSTANCES = next;
|
|
126
|
+
componentHost.__ASKR_INSTANCE = owner;
|
|
127
|
+
}
|
|
212
128
|
function itemInstanceHydrationComplete(host) {
|
|
213
129
|
const instance = host.__ASKR_INSTANCE;
|
|
214
130
|
if (instance) {
|
|
@@ -222,26 +138,35 @@ function createComponentElement(node, type, props, parentNamespace) {
|
|
|
222
138
|
if (componentFn.constructor.name === "AsyncFunction") throw new Error("Async components are not supported. Use resource() for async work.");
|
|
223
139
|
let childInstance = getVNodeComponentInstance(node);
|
|
224
140
|
const hadChildInstance = !!childInstance;
|
|
141
|
+
const previousVNodeInstance = childInstance;
|
|
225
142
|
if (!childInstance) {
|
|
226
143
|
childInstance = createComponentInstance(nextComponentInstanceId(), componentFn, props || {}, null);
|
|
144
|
+
registerVNodeComponentInstanceRollback(node, previousVNodeInstance, childInstance);
|
|
227
145
|
setVNodeComponentInstance(node, childInstance);
|
|
228
146
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
147
|
+
try {
|
|
148
|
+
if (hadChildInstance) captureInlineRenderSnapshot(childInstance);
|
|
149
|
+
childInstance.portalScope = getCurrentInstance()?.portalScope ?? childInstance.portalScope;
|
|
150
|
+
setComponentOwnershipIdentity(childInstance, node, getCurrentInstance(), 0);
|
|
151
|
+
childInstance.parentInstance = getCurrentInstance();
|
|
152
|
+
childInstance.props = props || {};
|
|
153
|
+
childInstance.isRoot = isRouteRootComponentVNode(node);
|
|
154
|
+
inheritComponentCleanupStrict(childInstance);
|
|
155
|
+
if (snapshot) childInstance.ownerFrame = snapshot;
|
|
156
|
+
const result = snapshot ? withContext(snapshot, () => renderComponentInline(childInstance)) : renderComponentInline(childInstance);
|
|
157
|
+
if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
158
|
+
const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
|
|
159
|
+
const dom = snapshot ? withContext(snapshot, () => materializeComponentResultNode(childInstance, scopedResult, parentNamespace)) : materializeComponentResultNode(childInstance, scopedResult, parentNamespace);
|
|
160
|
+
warnUnusedStateReads(childInstance);
|
|
161
|
+
if (dom instanceof Element) materializeFreshKey(dom, node, props);
|
|
162
|
+
return dom;
|
|
163
|
+
} catch (error) {
|
|
164
|
+
if (!hadChildInstance) {
|
|
165
|
+
restoreVNodeComponentInstance(node, previousVNodeInstance);
|
|
166
|
+
cleanupProvisionalComponentInstance(childInstance);
|
|
167
|
+
}
|
|
168
|
+
throw error;
|
|
169
|
+
}
|
|
243
170
|
}
|
|
244
171
|
//#endregion
|
|
245
172
|
export { createComponentElement, findHostInstanceByType, inheritComponentCleanupStrict, inheritComponentKey, isRouteRootComponentVNode, resolveNestedComponentResult, syncComponentElement };
|
|
246
|
-
|
|
247
|
-
//# sourceMappingURL=component-host.js.map
|
|
@@ -1,29 +1,44 @@
|
|
|
1
1
|
import { __ERROR_BOUNDARY__, __FOR_BOUNDARY__, _isDOMElement } from "../common/vnode.js";
|
|
2
2
|
import "./types.js";
|
|
3
3
|
import { getRuntimeEnv } from "../common/env.js";
|
|
4
|
-
import { logger } from "../
|
|
4
|
+
import { logger } from "../common/logger.js";
|
|
5
5
|
import { Fragment } from "../common/jsx.js";
|
|
6
|
+
import { getCurrentInstance } from "../runtime/component-scope.js";
|
|
7
|
+
import { beginLifecycleCommitBatch, discardLifecycleCommitBatch, flushLifecycleCommitBatch } from "../runtime/lifecycle-batch.js";
|
|
8
|
+
import { isBenchMetricScopeActive, recordBenchCounter } from "../runtime/for-bench.js";
|
|
9
|
+
import "../runtime/index.js";
|
|
6
10
|
import { removeAllListeners, removeElementReactiveProps, teardownNodeSubtree, updateElementRef } from "./cleanup.js";
|
|
7
11
|
import "./env.js";
|
|
8
12
|
import "../jsx-runtime.js";
|
|
9
|
-
import {
|
|
10
|
-
import "../runtime/for.js";
|
|
11
|
-
import { applyStaticScalarPropsToElement, hasMatchingStaticProps, materializeKey } from "./attributes.js";
|
|
13
|
+
import { applyStaticScalarPropsToElement, hasMatchingStaticProps, materializeFreshKey, materializeKey } from "./attributes.js";
|
|
12
14
|
import { createElementForNamespace, resolveChildNamespace } from "./namespaces.js";
|
|
13
|
-
import {
|
|
14
|
-
import { isBulkTextFastPathEligible,
|
|
15
|
-
import { maybeWarnMissingKeys, tryGetStaticCreateFastPathShape } from "./child-shape.js";
|
|
15
|
+
import { performBulkPositionalKeyedTextUpdate } from "./children-fastpath.js";
|
|
16
|
+
import { isBulkTextFastPathEligible, performBulkTextReplace } from "./children.js";
|
|
16
17
|
import { configureRendererDOMHost } from "./dom-host.js";
|
|
17
|
-
import {
|
|
18
|
+
import { maybeWarnMissingKeys, tryGetStaticCreateFastPathShape } from "./child-shape.js";
|
|
18
19
|
import { syncReactiveScalarChild } from "./reactive-children.js";
|
|
19
20
|
import { canReuseStaticSubtree, setStaticChildSlotsCacheEnabled } from "./static-reuse.js";
|
|
20
21
|
import { rendererReactiveChildDOMHost, updateElementChildren, updateUnkeyedChildren } from "./element-children.js";
|
|
21
|
-
import { createErrorBoundaryElement } from "./error-boundary-dom.js";
|
|
22
|
-
import { applyPropsToElement, hasTrackedElementPropBindings, markReactivePropsDirtySource, syncElementPropBindings } from "./prop-bindings.js";
|
|
23
22
|
import { runRetainedElementUpdate } from "./retained-element-rollback.js";
|
|
23
|
+
import { beginHydrationListenerTransaction, commitHydrationListenerTransaction, discardHydrationListenerTransaction } from "./hydration-listener-transaction.js";
|
|
24
|
+
import { applyPropsToElement, hasTrackedElementPropBindings, markReactivePropsDirtySource, syncElementPropBindings } from "./prop-bindings.js";
|
|
25
|
+
import { tryAdoptMatchingIntrinsicSubtree, withIntrinsicHydrationAdoption } from "./intrinsic-hydration-adoption.js";
|
|
26
|
+
import { getControlBoundaryState, getDirectControlBoundaryVNode } from "./boundary-state.js";
|
|
27
|
+
import { createForBoundary } from "./boundary-materialization.js";
|
|
28
|
+
import { configureBoundaryDOMHost, registerControlBoundaryCommitOwner } from "./boundaries.js";
|
|
29
|
+
import { createComponentElement, syncComponentElement } from "./component-host.js";
|
|
30
|
+
import { createErrorBoundaryElement } from "./error-boundary-dom.js";
|
|
24
31
|
import { tryPatchStableForDirtyItem } from "./stable-patch.js";
|
|
32
|
+
import { beginDeferredHydrationActivation, commitDeferredHydrationActivation, rememberDeferredHydrationVNode, rollbackDeferredHydrationActivation } from "./hydration-boundaries.js";
|
|
33
|
+
import { createComponentResultNodeWithBlueprint, createResultNodeWithBlueprint } from "./intrinsic-blueprint.js";
|
|
25
34
|
//#region src/renderer/dom-internal.ts
|
|
26
35
|
const IS_DOM_AVAILABLE = typeof document !== "undefined";
|
|
36
|
+
function cleanupFailedDOMConstruction(root) {
|
|
37
|
+
const nodes = root instanceof DocumentFragment ? Array.from(root.childNodes) : [root];
|
|
38
|
+
for (const node of nodes) try {
|
|
39
|
+
teardownNodeSubtree(node);
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
27
42
|
function getHydrationSkipBoundary(el) {
|
|
28
43
|
return el.closest("[data-skip-hydrate=\"true\"]");
|
|
29
44
|
}
|
|
@@ -57,11 +72,16 @@ function createDOMNode(node, parentNamespace) {
|
|
|
57
72
|
if (Array.isArray(node)) {
|
|
58
73
|
maybeWarnMissingKeys(node);
|
|
59
74
|
const fragment = document.createDocumentFragment();
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
75
|
+
try {
|
|
76
|
+
for (const child of node) {
|
|
77
|
+
const dom = createDOMNode(child, parentNamespace);
|
|
78
|
+
if (dom) fragment.appendChild(dom);
|
|
79
|
+
}
|
|
80
|
+
return fragment;
|
|
81
|
+
} catch (error) {
|
|
82
|
+
cleanupFailedDOMConstruction(fragment);
|
|
83
|
+
throw error;
|
|
63
84
|
}
|
|
64
|
-
return fragment;
|
|
65
85
|
}
|
|
66
86
|
if (typeof node === "object" && node !== null && "type" in node) {
|
|
67
87
|
const type = node.type;
|
|
@@ -74,66 +94,80 @@ function createDOMNode(node, parentNamespace) {
|
|
|
74
94
|
}
|
|
75
95
|
return null;
|
|
76
96
|
}
|
|
97
|
+
function createComponentResultNode(component, node, parentNamespace) {
|
|
98
|
+
return createComponentResultNodeWithBlueprint(component, node, parentNamespace, () => createDOMNode(node, parentNamespace), rendererReactiveChildDOMHost);
|
|
99
|
+
}
|
|
100
|
+
function createOwnedResultNodeWithBlueprint(owner, node, parentNamespace) {
|
|
101
|
+
return createResultNodeWithBlueprint(owner, node, parentNamespace, () => createDOMNode(node, parentNamespace), rendererReactiveChildDOMHost);
|
|
102
|
+
}
|
|
77
103
|
function createIntrinsicElement(node, type, props, parentNamespace) {
|
|
78
104
|
const children = props.children ?? node.children;
|
|
79
105
|
const elementNamespace = resolveChildNamespace(type, parentNamespace);
|
|
80
106
|
const el = createElementForNamespace(type, parentNamespace);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
applyPropsToElement(el, props, type, isHydrationSkipped);
|
|
93
|
-
if (children !== null && children !== void 0) {
|
|
94
|
-
const controlBoundaryVNode = getDirectControlBoundaryVNode(children);
|
|
95
|
-
if (controlBoundaryVNode) {
|
|
96
|
-
const controlState = getControlBoundaryState(controlBoundaryVNode);
|
|
97
|
-
if (!controlState) throw new Error("[createIntrinsicElement] Control boundary missing internal state");
|
|
98
|
-
registerControlBoundaryCommitOwner(el, controlState);
|
|
107
|
+
try {
|
|
108
|
+
if (isBenchMetricScopeActive("coldCreate")) recordBenchCounter("domNodesCreated");
|
|
109
|
+
materializeFreshKey(el, node, props);
|
|
110
|
+
const staticCreateFastPath = tryGetStaticCreateFastPathShape(props, children);
|
|
111
|
+
if (staticCreateFastPath) {
|
|
112
|
+
applyStaticScalarPropsToElement(el, props, type);
|
|
113
|
+
if (staticCreateFastPath.textContent !== null) {
|
|
114
|
+
el.textContent = staticCreateFastPath.textContent;
|
|
115
|
+
if (isBenchMetricScopeActive("coldCreate")) recordBenchCounter("domNodesCreated");
|
|
116
|
+
}
|
|
117
|
+
return el;
|
|
99
118
|
}
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
|
|
119
|
+
applyPropsToElement(el, props, type, isHydrationSkipped);
|
|
120
|
+
if (children !== null && children !== void 0) {
|
|
121
|
+
const controlBoundaryVNode = getDirectControlBoundaryVNode(children);
|
|
122
|
+
if (controlBoundaryVNode) {
|
|
123
|
+
const controlState = getControlBoundaryState(controlBoundaryVNode);
|
|
124
|
+
if (!controlState) throw new Error("[createIntrinsicElement] Control boundary missing internal state");
|
|
125
|
+
registerControlBoundaryCommitOwner(el, controlState);
|
|
126
|
+
}
|
|
127
|
+
if (syncReactiveScalarChild(el, children, rendererReactiveChildDOMHost)) return el;
|
|
128
|
+
if (Array.isArray(children)) {
|
|
129
|
+
maybeWarnMissingKeys(children);
|
|
130
|
+
if (children.length > 1) for (const child of children) {
|
|
106
131
|
const dom = createDOMNode(child, elementNamespace);
|
|
107
|
-
if (dom)
|
|
132
|
+
if (dom) el.appendChild(dom);
|
|
133
|
+
}
|
|
134
|
+
else if (children.length === 1) {
|
|
135
|
+
const dom = createDOMNode(children[0], elementNamespace);
|
|
136
|
+
if (dom) el.appendChild(dom);
|
|
108
137
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const dom = createDOMNode(children[0], elementNamespace);
|
|
138
|
+
} else {
|
|
139
|
+
const dom = createDOMNode(children, elementNamespace);
|
|
112
140
|
if (dom) el.appendChild(dom);
|
|
113
141
|
}
|
|
114
|
-
} else {
|
|
115
|
-
const dom = createDOMNode(children, elementNamespace);
|
|
116
|
-
if (dom) el.appendChild(dom);
|
|
117
142
|
}
|
|
143
|
+
return el;
|
|
144
|
+
} catch (error) {
|
|
145
|
+
cleanupFailedDOMConstruction(el);
|
|
146
|
+
throw error;
|
|
118
147
|
}
|
|
119
|
-
return el;
|
|
120
148
|
}
|
|
121
149
|
function createFragmentElement(node, props, parentNamespace) {
|
|
122
150
|
const fragment = document.createDocumentFragment();
|
|
123
151
|
const children = props.children ?? node.children;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const
|
|
152
|
+
try {
|
|
153
|
+
if (children) if (Array.isArray(children)) {
|
|
154
|
+
maybeWarnMissingKeys(children);
|
|
155
|
+
for (const child of children) {
|
|
156
|
+
const dom = createDOMNode(child, parentNamespace);
|
|
157
|
+
if (dom) fragment.appendChild(dom);
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
const dom = createDOMNode(children, parentNamespace);
|
|
128
161
|
if (dom) fragment.appendChild(dom);
|
|
129
162
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
163
|
+
return fragment;
|
|
164
|
+
} catch (error) {
|
|
165
|
+
cleanupFailedDOMConstruction(fragment);
|
|
166
|
+
throw error;
|
|
133
167
|
}
|
|
134
|
-
return fragment;
|
|
135
168
|
}
|
|
136
169
|
function updateElementFromVnode(el, vnode, updateChildren = true, forceChildrenUpdate = false) {
|
|
170
|
+
if (updateChildren && !forceChildrenUpdate && _isDOMElement(vnode) && tryAdoptMatchingIntrinsicSubtree(el, vnode)) return;
|
|
137
171
|
runRetainedElementUpdate(el, teardownNodeSubtree, () => {
|
|
138
172
|
applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpdate);
|
|
139
173
|
});
|
|
@@ -143,6 +177,7 @@ function applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpd
|
|
|
143
177
|
const props = vnode.props || {};
|
|
144
178
|
const domVNode = vnode;
|
|
145
179
|
if (isHydrationSkipped(el)) {
|
|
180
|
+
rememberDeferredHydrationVNode(el, vnode, getCurrentInstance(), getCurrentInstance()?.ownerFrame ?? null);
|
|
146
181
|
clearHydrationDeferredSubtree(el);
|
|
147
182
|
return;
|
|
148
183
|
}
|
|
@@ -166,8 +201,32 @@ function applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpd
|
|
|
166
201
|
updateElementChildren(el, children, forceChildrenUpdate);
|
|
167
202
|
}
|
|
168
203
|
}
|
|
204
|
+
/** @internal Activate one recorded deferred hydration boundary in place. */
|
|
205
|
+
function activateHydrationBoundary(element) {
|
|
206
|
+
const record = beginDeferredHydrationActivation(element);
|
|
207
|
+
if (!record?.vnode) return false;
|
|
208
|
+
const lifecycleBatch = beginLifecycleCommitBatch();
|
|
209
|
+
const listenerTransaction = beginHydrationListenerTransaction();
|
|
210
|
+
try {
|
|
211
|
+
element.removeAttribute("data-skip-hydrate");
|
|
212
|
+
withIntrinsicHydrationAdoption(() => {
|
|
213
|
+
updateElementFromVnode(element, record.vnode, true, true);
|
|
214
|
+
});
|
|
215
|
+
commitHydrationListenerTransaction(listenerTransaction);
|
|
216
|
+
flushLifecycleCommitBatch(lifecycleBatch);
|
|
217
|
+
commitDeferredHydrationActivation(record);
|
|
218
|
+
return true;
|
|
219
|
+
} catch (error) {
|
|
220
|
+
discardHydrationListenerTransaction(listenerTransaction);
|
|
221
|
+
discardLifecycleCommitBatch(lifecycleBatch);
|
|
222
|
+
element.setAttribute("data-skip-hydrate", "true");
|
|
223
|
+
rollbackDeferredHydrationActivation(record);
|
|
224
|
+
throw error;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
169
227
|
configureRendererDOMHost({
|
|
170
228
|
createDOMNode,
|
|
229
|
+
createComponentResultNode,
|
|
171
230
|
syncComponentElement,
|
|
172
231
|
updateElementFromVnode,
|
|
173
232
|
updateElementChildren,
|
|
@@ -175,11 +234,10 @@ configureRendererDOMHost({
|
|
|
175
234
|
});
|
|
176
235
|
configureBoundaryDOMHost({
|
|
177
236
|
createDOMNode,
|
|
237
|
+
createResultNodeWithBlueprint: createOwnedResultNodeWithBlueprint,
|
|
178
238
|
syncComponentElement,
|
|
179
239
|
updateElementFromVnode,
|
|
180
240
|
tryPatchStableForDirtyItem
|
|
181
241
|
});
|
|
182
242
|
//#endregion
|
|
183
|
-
export { IS_DOM_AVAILABLE, createDOMNode, isBulkTextFastPathEligible, markReactivePropsDirtySource, performBulkPositionalKeyedTextUpdate, performBulkTextReplace, setStaticChildSlotsCacheEnabled, syncComponentElement, tryPatchStableForDirtyItem, updateElementChildren, updateElementFromVnode, updateUnkeyedChildren };
|
|
184
|
-
|
|
185
|
-
//# sourceMappingURL=dom-internal.js.map
|
|
243
|
+
export { IS_DOM_AVAILABLE, activateHydrationBoundary, createDOMNode, isBulkTextFastPathEligible, markReactivePropsDirtySource, performBulkPositionalKeyedTextUpdate, performBulkTextReplace, setStaticChildSlotsCacheEnabled, syncComponentElement, tryPatchStableForDirtyItem, updateElementChildren, updateElementFromVnode, updateUnkeyedChildren };
|