@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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { _isDOMElement } from "../common/vnode.js";
|
|
2
|
+
import "./types.js";
|
|
3
|
+
import { enterDomCommitScope, restoreDomCommitScope } from "../runtime/component-scope.js";
|
|
4
|
+
import { registerLifecycleTransaction } from "../runtime/lifecycle-batch.js";
|
|
5
|
+
import { clearCaseDomUpdateState, clearShowDomUpdateState } from "../runtime/control.js";
|
|
6
|
+
import { clearForDomUpdateState } from "../runtime/for-internal.js";
|
|
7
|
+
import "../runtime/index.js";
|
|
8
|
+
import { teardownNodeSubtree } from "./cleanup.js";
|
|
9
|
+
import { tagNamesEqualIgnoreCase } from "./utils.js";
|
|
10
|
+
import { insertRangeBefore, removeRange } from "./dom-range.js";
|
|
11
|
+
import { adoptHydratedRange, assignScopeRange, getBoundaryParentNamespace, getBoundaryRangeHost, getScopeRange, materializeChildScopeRange } from "./boundary-range-adoption.js";
|
|
12
|
+
//#region src/renderer/boundary-range-sync.ts
|
|
13
|
+
function clearBoundaryState(controlState) {
|
|
14
|
+
if (controlState.kind === "for") clearForDomUpdateState(controlState);
|
|
15
|
+
else if (controlState.kind === "show") clearShowDomUpdateState(controlState);
|
|
16
|
+
else clearCaseDomUpdateState(controlState);
|
|
17
|
+
}
|
|
18
|
+
function syncControlBoundaryScopeDom(parent, scope, vnode, before = null, allowHydrationAdoption = true, insertDetached = true) {
|
|
19
|
+
const previousInstance = enterDomCommitScope(scope.componentInstance);
|
|
20
|
+
try {
|
|
21
|
+
const currentRange = getScopeRange(scope);
|
|
22
|
+
const dom = currentRange?.single ? currentRange.start : null;
|
|
23
|
+
const host = getBoundaryRangeHost();
|
|
24
|
+
const hydratedRange = currentRange || !allowHydrationAdoption ? null : adoptHydratedRange(parent, scope, before, vnode);
|
|
25
|
+
if (hydratedRange) return hydratedRange;
|
|
26
|
+
const resolvedRange = hydratedRange ?? currentRange;
|
|
27
|
+
if (resolvedRange && scope.hydrationPending && !resolvedRange.single) {
|
|
28
|
+
scope.hydrationPending = false;
|
|
29
|
+
return resolvedRange;
|
|
30
|
+
}
|
|
31
|
+
if (_isDOMElement(vnode) && typeof vnode.type === "function") {
|
|
32
|
+
const synced = host.syncComponentElement(dom, vnode, vnode.type, (vnode.props ?? {}) || {}, getBoundaryParentNamespace(parent));
|
|
33
|
+
if (synced) {
|
|
34
|
+
const nextRange = {
|
|
35
|
+
start: synced,
|
|
36
|
+
end: synced,
|
|
37
|
+
single: true
|
|
38
|
+
};
|
|
39
|
+
assignScopeRange(scope, nextRange);
|
|
40
|
+
return nextRange;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (!resolvedRange) {
|
|
44
|
+
const nextRange = materializeChildScopeRange(vnode, getBoundaryParentNamespace(parent), scope, true);
|
|
45
|
+
assignScopeRange(scope, nextRange);
|
|
46
|
+
if (insertDetached) insertRangeBefore(parent, nextRange, before);
|
|
47
|
+
return nextRange;
|
|
48
|
+
}
|
|
49
|
+
if (resolvedRange.single && dom?.nodeType === 3 && (typeof vnode === "string" || typeof vnode === "number")) {
|
|
50
|
+
dom.data = String(vnode);
|
|
51
|
+
return currentRange;
|
|
52
|
+
}
|
|
53
|
+
if (resolvedRange.single && dom?.nodeType === 8 && (vnode === null || vnode === void 0 || vnode === false)) return currentRange;
|
|
54
|
+
if (resolvedRange.single && dom instanceof Element && _isDOMElement(vnode) && typeof vnode.type === "string" && tagNamesEqualIgnoreCase(dom.tagName, vnode.type)) {
|
|
55
|
+
host.updateElementFromVnode(dom, vnode, true);
|
|
56
|
+
return currentRange;
|
|
57
|
+
}
|
|
58
|
+
const nextRange = materializeChildScopeRange(vnode, getBoundaryParentNamespace(parent), scope);
|
|
59
|
+
const previousRange = resolvedRange;
|
|
60
|
+
const previousDom = scope.dom;
|
|
61
|
+
const previousParent = previousRange.start.parentNode;
|
|
62
|
+
const previousNextSibling = previousRange.end.nextSibling;
|
|
63
|
+
const registered = registerLifecycleTransaction({}, () => removeRange(previousRange, teardownBoundaryRangeNode), () => {
|
|
64
|
+
removeRange(nextRange, teardownBoundaryRangeNode);
|
|
65
|
+
if (previousParent && !previousRange.start.parentNode) previousParent.insertBefore(previousRange.start, previousNextSibling?.parentNode === previousParent ? previousNextSibling : null);
|
|
66
|
+
scope.range = previousRange;
|
|
67
|
+
scope.dom = previousDom;
|
|
68
|
+
});
|
|
69
|
+
if (previousRange.single && nextRange.single && previousRange.start.parentNode === parent) parent.replaceChild(nextRange.start, previousRange.start);
|
|
70
|
+
else insertRangeBefore(parent, nextRange, previousRange.start.parentNode === parent ? previousRange.start : null);
|
|
71
|
+
assignScopeRange(scope, nextRange);
|
|
72
|
+
if (!registered) removeRange(previousRange, teardownBoundaryRangeNode);
|
|
73
|
+
return nextRange;
|
|
74
|
+
} finally {
|
|
75
|
+
restoreDomCommitScope(previousInstance);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function teardownBoundaryRangeNode(node) {
|
|
79
|
+
if (node.nodeType === 8) {
|
|
80
|
+
node.parentNode?.removeChild(node);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
teardownNodeSubtree(node);
|
|
84
|
+
node.parentNode?.removeChild(node);
|
|
85
|
+
}
|
|
86
|
+
function syncControlBoundaryScopeNode(parent, scope, vnode) {
|
|
87
|
+
const range = syncControlBoundaryScopeDom(parent, scope, vnode, null, true, false);
|
|
88
|
+
return range?.single ? range.start : null;
|
|
89
|
+
}
|
|
90
|
+
function syncControlBoundaryInMixedParent(parent, controlState, childrenVNodes, before) {
|
|
91
|
+
if (controlState.kind === "for") throw new Error("[askr] For ranges require the keyed boundary commit path.");
|
|
92
|
+
const activeScope = controlState.activeScope;
|
|
93
|
+
const activeVNode = childrenVNodes[0];
|
|
94
|
+
const nextRange = activeScope && activeVNode !== void 0 ? syncControlBoundaryScopeDom(parent, activeScope, activeVNode, before, controlState.lastRemovedRanges.length === 0) : null;
|
|
95
|
+
for (const range of controlState.lastRemovedRanges) if (range !== nextRange) removeRange(range, teardownBoundaryRangeNode);
|
|
96
|
+
for (const node of controlState.lastRemovedNodes) if (node.parentNode === parent) teardownBoundaryRangeNode(node);
|
|
97
|
+
clearBoundaryState(controlState);
|
|
98
|
+
return nextRange ? [nextRange] : [];
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { syncControlBoundaryInMixedParent, syncControlBoundaryScopeDom, syncControlBoundaryScopeNode };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __FOR_BOUNDARY__, _isDOMElement } from "../common/vnode.js";
|
|
2
|
+
import "./types.js";
|
|
3
|
+
import { clearCaseDomUpdateState, clearShowDomUpdateState, evaluateCaseState, evaluateShowState } from "../runtime/control.js";
|
|
4
|
+
import { clearForDomUpdateState, evaluateForState } from "../runtime/for-internal.js";
|
|
5
|
+
import "../runtime/index.js";
|
|
6
|
+
//#region src/renderer/boundary-state.ts
|
|
7
|
+
function evaluateControlBoundaryState(controlState) {
|
|
8
|
+
if (controlState.kind === "for") return evaluateForState(controlState);
|
|
9
|
+
if (controlState.kind === "show") return evaluateShowState(controlState);
|
|
10
|
+
return evaluateCaseState(controlState);
|
|
11
|
+
}
|
|
12
|
+
function clearControlBoundaryDomUpdateState(controlState) {
|
|
13
|
+
if (controlState.kind === "for") {
|
|
14
|
+
clearForDomUpdateState(controlState);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (controlState.kind === "show") {
|
|
18
|
+
clearShowDomUpdateState(controlState);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
clearCaseDomUpdateState(controlState);
|
|
22
|
+
}
|
|
23
|
+
function getControlBoundaryState(node) {
|
|
24
|
+
return node._controlState ?? node._forState ?? null;
|
|
25
|
+
}
|
|
26
|
+
function getDirectControlBoundaryVNode(children) {
|
|
27
|
+
if (!Array.isArray(children) && _isDOMElement(children) && children.type === __FOR_BOUNDARY__) return children;
|
|
28
|
+
if (Array.isArray(children) && children.length === 1 && _isDOMElement(children[0]) && children[0].type === __FOR_BOUNDARY__) return children[0];
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
function getControlBoundaryCommitChildren(controlState) {
|
|
32
|
+
if (controlState.kind === "for" && controlState._needsSourceReconcile) return evaluateForState(controlState);
|
|
33
|
+
if (controlState.kind !== "for") {
|
|
34
|
+
const activeVNode = controlState.activeScope?.vnode;
|
|
35
|
+
return activeVNode == null || activeVNode === false ? [] : [activeVNode];
|
|
36
|
+
}
|
|
37
|
+
if (controlState.orderedKeys.length === 0) {
|
|
38
|
+
const fallbackVNode = controlState.fallbackScope?.vnode;
|
|
39
|
+
return fallbackVNode == null || fallbackVNode === false ? [] : [fallbackVNode];
|
|
40
|
+
}
|
|
41
|
+
const childrenVNodes = [];
|
|
42
|
+
for (let index = 0; index < controlState.orderedKeys.length; index += 1) {
|
|
43
|
+
const itemKey = controlState.orderedKeys[index];
|
|
44
|
+
const itemInstance = controlState.items.get(itemKey);
|
|
45
|
+
childrenVNodes.push(itemInstance?.scope.vnode ?? null);
|
|
46
|
+
}
|
|
47
|
+
return childrenVNodes;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { clearControlBoundaryDomUpdateState, evaluateControlBoundaryState, getControlBoundaryCommitChildren, getControlBoundaryState, getDirectControlBoundaryVNode };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __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, STATIC_CHILDREN } from "../common/jsx.js";
|
|
6
6
|
import { getCurrentInstance } from "../runtime/component-scope.js";
|
|
7
|
-
import "../runtime/
|
|
7
|
+
import "../runtime/index.js";
|
|
8
8
|
import "./env.js";
|
|
9
9
|
import { isSkippedProp, parseEventName } from "./utils.js";
|
|
10
10
|
import "../jsx-runtime.js";
|
|
@@ -81,5 +81,3 @@ function tryGetStaticCreateFastPathShape(props, children) {
|
|
|
81
81
|
}
|
|
82
82
|
//#endregion
|
|
83
83
|
export { isFragmentVNode, maybeWarnMissingKeys, normalizeComponentChildren, tryGetStaticCreateFastPathShape };
|
|
84
|
-
|
|
85
|
-
//# sourceMappingURL=child-shape.js.map
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { _isDOMElement } from "../common/vnode.js";
|
|
2
|
+
import "./types.js";
|
|
3
|
+
import { getRuntimeEnv } from "../common/env.js";
|
|
4
|
+
import { teardownNodeSubtree } from "./cleanup.js";
|
|
5
|
+
import "./env.js";
|
|
6
|
+
import { hasNonTrivialProps, logFastPathDebug, now, recordFastPathStats, tagNamesEqualIgnoreCase } from "./utils.js";
|
|
7
|
+
import { keyedElements } from "./keyed.js";
|
|
8
|
+
import { createDOMNode, updateElementFromVnode } from "./dom-internal.js";
|
|
9
|
+
import "./dom.js";
|
|
10
|
+
//#region src/renderer/children-fastpath.ts
|
|
11
|
+
function upperCommonTagName(tag) {
|
|
12
|
+
switch (tag) {
|
|
13
|
+
case "div": return "DIV";
|
|
14
|
+
case "span": return "SPAN";
|
|
15
|
+
case "p": return "P";
|
|
16
|
+
case "a": return "A";
|
|
17
|
+
case "button": return "BUTTON";
|
|
18
|
+
case "input": return "INPUT";
|
|
19
|
+
case "ul": return "UL";
|
|
20
|
+
case "ol": return "OL";
|
|
21
|
+
case "li": return "LI";
|
|
22
|
+
default: return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function tagsEqualIgnoreCase(elementTagName, vnodeType) {
|
|
26
|
+
if (elementTagName === vnodeType) return true;
|
|
27
|
+
const upperCommon = upperCommonTagName(vnodeType);
|
|
28
|
+
if (upperCommon !== null && elementTagName === upperCommon) return true;
|
|
29
|
+
return tagNamesEqualIgnoreCase(elementTagName, vnodeType);
|
|
30
|
+
}
|
|
31
|
+
function performBulkPositionalKeyedTextUpdate(parent, keyedVnodes) {
|
|
32
|
+
const total = keyedVnodes.length;
|
|
33
|
+
let reused = 0;
|
|
34
|
+
let updatedKeys = 0;
|
|
35
|
+
const start = now();
|
|
36
|
+
const env = getRuntimeEnv();
|
|
37
|
+
const debugFastPath = env.ASKR_FASTPATH_DEBUG === "1" || env.ASKR_FASTPATH_DEBUG === "true";
|
|
38
|
+
for (let index = 0; index < total; index += 1) {
|
|
39
|
+
const { key, vnode } = keyedVnodes[index];
|
|
40
|
+
const child = parent.children[index];
|
|
41
|
+
if (child && _isDOMElement(vnode) && typeof vnode.type === "string") {
|
|
42
|
+
const vnodeType = vnode.type;
|
|
43
|
+
if (tagsEqualIgnoreCase(child.tagName, vnodeType)) {
|
|
44
|
+
const children = vnode.children || vnode.props?.children;
|
|
45
|
+
if (debugFastPath) logFastPathDebug("positional idx", index, {
|
|
46
|
+
chTag: child.tagName,
|
|
47
|
+
vnodeType,
|
|
48
|
+
chChildNodes: child.childNodes.length,
|
|
49
|
+
childrenType: Array.isArray(children) ? "array" : typeof children
|
|
50
|
+
});
|
|
51
|
+
updateTextContent(child, children, vnode);
|
|
52
|
+
setDataKey(child, key, () => updatedKeys += 1);
|
|
53
|
+
reused += 1;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (debugFastPath) logFastPathDebug("positional tag mismatch", index, {
|
|
57
|
+
chTag: child.tagName,
|
|
58
|
+
vnodeType
|
|
59
|
+
});
|
|
60
|
+
} else if (debugFastPath) logFastPathDebug("positional missing or invalid", index, { ch: !!child });
|
|
61
|
+
replaceNodeAtPosition(parent, index, vnode);
|
|
62
|
+
}
|
|
63
|
+
const elapsed = now() - start;
|
|
64
|
+
updateKeyedElementsMap(parent, keyedVnodes);
|
|
65
|
+
const stats = {
|
|
66
|
+
n: total,
|
|
67
|
+
reused,
|
|
68
|
+
updatedKeys,
|
|
69
|
+
t: elapsed
|
|
70
|
+
};
|
|
71
|
+
recordFastPathStats(stats, "bulkKeyedPositionalHits");
|
|
72
|
+
return stats;
|
|
73
|
+
}
|
|
74
|
+
function updateTextContent(el, children, vnode) {
|
|
75
|
+
if (typeof children === "string" || typeof children === "number") {
|
|
76
|
+
setTextNodeData(el, String(children));
|
|
77
|
+
if (vnode.props && hasNonTrivialProps(vnode.props)) updateElementFromVnode(el, vnode, false);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (Array.isArray(children) && children.length === 1 && (typeof children[0] === "string" || typeof children[0] === "number")) {
|
|
81
|
+
setTextNodeData(el, String(children[0]));
|
|
82
|
+
if (vnode.props && hasNonTrivialProps(vnode.props)) updateElementFromVnode(el, vnode, false);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (!tryUpdateTwoChildTextPattern(el, vnode)) updateElementFromVnode(el, vnode);
|
|
86
|
+
}
|
|
87
|
+
function tryUpdateTwoChildTextPattern(parentEl, vnode) {
|
|
88
|
+
const vnodeChildren = vnode.props?.children ?? vnode.children;
|
|
89
|
+
if (!Array.isArray(vnodeChildren) || vnodeChildren.length !== 2) return false;
|
|
90
|
+
const firstChild = vnodeChildren[0];
|
|
91
|
+
const secondChild = vnodeChildren[1];
|
|
92
|
+
if (!_isDOMElement(firstChild) || !_isDOMElement(secondChild)) return false;
|
|
93
|
+
if (typeof firstChild.type !== "string" || typeof secondChild.type !== "string") return false;
|
|
94
|
+
const firstElement = parentEl.children[0];
|
|
95
|
+
const secondElement = parentEl.children[1];
|
|
96
|
+
if (!firstElement || !secondElement) return false;
|
|
97
|
+
if (parentEl.children.length !== 2 || parentEl.childNodes.length !== 2) return false;
|
|
98
|
+
if (!tagsEqualIgnoreCase(firstElement.tagName, firstChild.type)) return false;
|
|
99
|
+
if (!tagsEqualIgnoreCase(secondElement.tagName, secondChild.type)) return false;
|
|
100
|
+
const firstText = firstChild.children || firstChild.props?.children;
|
|
101
|
+
const secondText = secondChild.children || secondChild.props?.children;
|
|
102
|
+
if (typeof firstText === "string" || typeof firstText === "number") setTextNodeData(firstElement, String(firstText));
|
|
103
|
+
else if (Array.isArray(firstText) && firstText.length === 1 && (typeof firstText[0] === "string" || typeof firstText[0] === "number")) setTextNodeData(firstElement, String(firstText[0]));
|
|
104
|
+
else return false;
|
|
105
|
+
if (typeof secondText === "string" || typeof secondText === "number") setTextNodeData(secondElement, String(secondText));
|
|
106
|
+
else if (Array.isArray(secondText) && secondText.length === 1 && (typeof secondText[0] === "string" || typeof secondText[0] === "number")) setTextNodeData(secondElement, String(secondText[0]));
|
|
107
|
+
else return false;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
function setTextNodeData(el, text) {
|
|
111
|
+
if (el.childNodes.length === 1 && el.firstChild?.nodeType === 3) {
|
|
112
|
+
const textNode = el.firstChild;
|
|
113
|
+
if (textNode.data !== text) textNode.data = text;
|
|
114
|
+
} else el.textContent = text;
|
|
115
|
+
}
|
|
116
|
+
function setDataKey(el, key, onSet) {
|
|
117
|
+
try {
|
|
118
|
+
const next = String(key);
|
|
119
|
+
const keyKind = typeof key;
|
|
120
|
+
if (el.getAttribute("data-key") === next && el.getAttribute("data-askr-key-kind") === keyKind) return;
|
|
121
|
+
el.setAttribute("data-key", next);
|
|
122
|
+
el.setAttribute("data-askr-key-kind", keyKind);
|
|
123
|
+
onSet();
|
|
124
|
+
} catch {}
|
|
125
|
+
}
|
|
126
|
+
function replaceNodeAtPosition(parent, index, vnode) {
|
|
127
|
+
const dom = createDOMNode(vnode);
|
|
128
|
+
if (dom) {
|
|
129
|
+
const existing = parent.children[index];
|
|
130
|
+
if (existing) {
|
|
131
|
+
teardownNodeSubtree(existing);
|
|
132
|
+
parent.replaceChild(dom, existing);
|
|
133
|
+
} else parent.appendChild(dom);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function updateKeyedElementsMap(parent, keyedVnodes) {
|
|
137
|
+
try {
|
|
138
|
+
const existing = keyedElements.get(parent);
|
|
139
|
+
const newKeyMap = existing ? (existing.clear(), existing) : /* @__PURE__ */ new Map();
|
|
140
|
+
for (let index = 0; index < keyedVnodes.length; index += 1) {
|
|
141
|
+
const key = keyedVnodes[index].key;
|
|
142
|
+
const child = parent.children[index];
|
|
143
|
+
if (child) newKeyMap.set(key, child);
|
|
144
|
+
}
|
|
145
|
+
keyedElements.set(parent, newKeyMap);
|
|
146
|
+
} catch {}
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
export { performBulkPositionalKeyedTextUpdate, tagsEqualIgnoreCase };
|
|
@@ -1,149 +1,14 @@
|
|
|
1
|
-
import { _isDOMElement } from "../common/vnode.js";
|
|
2
|
-
import "./types.js";
|
|
3
1
|
import { getRuntimeEnv } from "../common/env.js";
|
|
4
2
|
import { incDevCounter, setDevValue } from "../runtime/dev-namespace.js";
|
|
3
|
+
import "../runtime/index.js";
|
|
5
4
|
import { teardownNodeSubtree } from "./cleanup.js";
|
|
6
5
|
import "./env.js";
|
|
7
|
-
import {
|
|
6
|
+
import { now, recordDOMReplace } from "./utils.js";
|
|
8
7
|
import { keyedElements } from "./keyed.js";
|
|
8
|
+
import { performBulkPositionalKeyedTextUpdate, tagsEqualIgnoreCase } from "./children-fastpath.js";
|
|
9
9
|
import { createDOMNode, updateElementFromVnode } from "./dom-internal.js";
|
|
10
10
|
import "./dom.js";
|
|
11
11
|
//#region src/renderer/children.ts
|
|
12
|
-
function upperCommonTagName(tag) {
|
|
13
|
-
switch (tag) {
|
|
14
|
-
case "div": return "DIV";
|
|
15
|
-
case "span": return "SPAN";
|
|
16
|
-
case "p": return "P";
|
|
17
|
-
case "a": return "A";
|
|
18
|
-
case "button": return "BUTTON";
|
|
19
|
-
case "input": return "INPUT";
|
|
20
|
-
case "ul": return "UL";
|
|
21
|
-
case "ol": return "OL";
|
|
22
|
-
case "li": return "LI";
|
|
23
|
-
default: return null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function tagsEqualIgnoreCase(elementTagName, vnodeType) {
|
|
27
|
-
if (elementTagName === vnodeType) return true;
|
|
28
|
-
const upperCommon = upperCommonTagName(vnodeType);
|
|
29
|
-
if (upperCommon !== null && elementTagName === upperCommon) return true;
|
|
30
|
-
return tagNamesEqualIgnoreCase(elementTagName, vnodeType);
|
|
31
|
-
}
|
|
32
|
-
function performBulkPositionalKeyedTextUpdate(parent, keyedVnodes) {
|
|
33
|
-
const total = keyedVnodes.length;
|
|
34
|
-
let reused = 0;
|
|
35
|
-
let updatedKeys = 0;
|
|
36
|
-
const start = now();
|
|
37
|
-
const env = getRuntimeEnv();
|
|
38
|
-
const debugFastPath = env.ASKR_FASTPATH_DEBUG === "1" || env.ASKR_FASTPATH_DEBUG === "true";
|
|
39
|
-
for (let index = 0; index < total; index += 1) {
|
|
40
|
-
const { key, vnode } = keyedVnodes[index];
|
|
41
|
-
const child = parent.children[index];
|
|
42
|
-
if (child && _isDOMElement(vnode) && typeof vnode.type === "string") {
|
|
43
|
-
const vnodeType = vnode.type;
|
|
44
|
-
if (tagsEqualIgnoreCase(child.tagName, vnodeType)) {
|
|
45
|
-
const children = vnode.children || vnode.props?.children;
|
|
46
|
-
if (debugFastPath) logFastPathDebug("positional idx", index, {
|
|
47
|
-
chTag: child.tagName,
|
|
48
|
-
vnodeType,
|
|
49
|
-
chChildNodes: child.childNodes.length,
|
|
50
|
-
childrenType: Array.isArray(children) ? "array" : typeof children
|
|
51
|
-
});
|
|
52
|
-
updateTextContent(child, children, vnode);
|
|
53
|
-
setDataKey(child, key, () => updatedKeys += 1);
|
|
54
|
-
reused += 1;
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (debugFastPath) logFastPathDebug("positional tag mismatch", index, {
|
|
58
|
-
chTag: child.tagName,
|
|
59
|
-
vnodeType
|
|
60
|
-
});
|
|
61
|
-
} else if (debugFastPath) logFastPathDebug("positional missing or invalid", index, { ch: !!child });
|
|
62
|
-
replaceNodeAtPosition(parent, index, vnode);
|
|
63
|
-
}
|
|
64
|
-
const elapsed = now() - start;
|
|
65
|
-
updateKeyedElementsMap(parent, keyedVnodes);
|
|
66
|
-
const stats = {
|
|
67
|
-
n: total,
|
|
68
|
-
reused,
|
|
69
|
-
updatedKeys,
|
|
70
|
-
t: elapsed
|
|
71
|
-
};
|
|
72
|
-
recordFastPathStats(stats, "bulkKeyedPositionalHits");
|
|
73
|
-
return stats;
|
|
74
|
-
}
|
|
75
|
-
function updateTextContent(el, children, vnode) {
|
|
76
|
-
if (typeof children === "string" || typeof children === "number") {
|
|
77
|
-
setTextNodeData(el, String(children));
|
|
78
|
-
if (vnode.props && hasNonTrivialProps(vnode.props)) updateElementFromVnode(el, vnode, false);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (Array.isArray(children) && children.length === 1 && (typeof children[0] === "string" || typeof children[0] === "number")) {
|
|
82
|
-
setTextNodeData(el, String(children[0]));
|
|
83
|
-
if (vnode.props && hasNonTrivialProps(vnode.props)) updateElementFromVnode(el, vnode, false);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (!tryUpdateTwoChildTextPattern(el, vnode)) updateElementFromVnode(el, vnode);
|
|
87
|
-
}
|
|
88
|
-
function tryUpdateTwoChildTextPattern(parentEl, vnode) {
|
|
89
|
-
const vnodeChildren = vnode.props?.children ?? vnode.children;
|
|
90
|
-
if (!Array.isArray(vnodeChildren) || vnodeChildren.length !== 2) return false;
|
|
91
|
-
const firstChild = vnodeChildren[0];
|
|
92
|
-
const secondChild = vnodeChildren[1];
|
|
93
|
-
if (!_isDOMElement(firstChild) || !_isDOMElement(secondChild)) return false;
|
|
94
|
-
if (typeof firstChild.type !== "string" || typeof secondChild.type !== "string") return false;
|
|
95
|
-
const firstElement = parentEl.children[0];
|
|
96
|
-
const secondElement = parentEl.children[1];
|
|
97
|
-
if (!firstElement || !secondElement) return false;
|
|
98
|
-
if (parentEl.children.length !== 2 || parentEl.childNodes.length !== 2) return false;
|
|
99
|
-
if (!tagsEqualIgnoreCase(firstElement.tagName, firstChild.type)) return false;
|
|
100
|
-
if (!tagsEqualIgnoreCase(secondElement.tagName, secondChild.type)) return false;
|
|
101
|
-
const firstText = firstChild.children || firstChild.props?.children;
|
|
102
|
-
const secondText = secondChild.children || secondChild.props?.children;
|
|
103
|
-
if (typeof firstText === "string" || typeof firstText === "number") setTextNodeData(firstElement, String(firstText));
|
|
104
|
-
else if (Array.isArray(firstText) && firstText.length === 1 && (typeof firstText[0] === "string" || typeof firstText[0] === "number")) setTextNodeData(firstElement, String(firstText[0]));
|
|
105
|
-
else return false;
|
|
106
|
-
if (typeof secondText === "string" || typeof secondText === "number") setTextNodeData(secondElement, String(secondText));
|
|
107
|
-
else if (Array.isArray(secondText) && secondText.length === 1 && (typeof secondText[0] === "string" || typeof secondText[0] === "number")) setTextNodeData(secondElement, String(secondText[0]));
|
|
108
|
-
else return false;
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
function setTextNodeData(el, text) {
|
|
112
|
-
if (el.childNodes.length === 1 && el.firstChild?.nodeType === 3) {
|
|
113
|
-
const textNode = el.firstChild;
|
|
114
|
-
if (textNode.data !== text) textNode.data = text;
|
|
115
|
-
} else el.textContent = text;
|
|
116
|
-
}
|
|
117
|
-
function setDataKey(el, key, onSet) {
|
|
118
|
-
try {
|
|
119
|
-
const next = String(key);
|
|
120
|
-
if (el.getAttribute("data-key") === next) return;
|
|
121
|
-
el.setAttribute("data-key", next);
|
|
122
|
-
onSet();
|
|
123
|
-
} catch {}
|
|
124
|
-
}
|
|
125
|
-
function replaceNodeAtPosition(parent, index, vnode) {
|
|
126
|
-
const dom = createDOMNode(vnode);
|
|
127
|
-
if (dom) {
|
|
128
|
-
const existing = parent.children[index];
|
|
129
|
-
if (existing) {
|
|
130
|
-
teardownNodeSubtree(existing);
|
|
131
|
-
parent.replaceChild(dom, existing);
|
|
132
|
-
} else parent.appendChild(dom);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
function updateKeyedElementsMap(parent, keyedVnodes) {
|
|
136
|
-
try {
|
|
137
|
-
const existing = keyedElements.get(parent);
|
|
138
|
-
const newKeyMap = existing ? (existing.clear(), existing) : /* @__PURE__ */ new Map();
|
|
139
|
-
for (let index = 0; index < keyedVnodes.length; index += 1) {
|
|
140
|
-
const key = keyedVnodes[index].key;
|
|
141
|
-
const child = parent.children[index];
|
|
142
|
-
if (child) newKeyMap.set(key, child);
|
|
143
|
-
}
|
|
144
|
-
keyedElements.set(parent, newKeyMap);
|
|
145
|
-
} catch {}
|
|
146
|
-
}
|
|
147
12
|
function performBulkTextReplace(parent, newChildren) {
|
|
148
13
|
const start = now();
|
|
149
14
|
const existing = Array.from(parent.childNodes);
|
|
@@ -291,5 +156,3 @@ function recordBulkDiag(data) {
|
|
|
291
156
|
}
|
|
292
157
|
//#endregion
|
|
293
158
|
export { isBulkTextFastPathEligible, performBulkPositionalKeyedTextUpdate, performBulkTextReplace };
|
|
294
|
-
|
|
295
|
-
//# sourceMappingURL=children.js.map
|
package/dist/renderer/cleanup.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { logger } from "../
|
|
1
|
+
import { logger } from "../common/logger.js";
|
|
2
2
|
import { incDevCounter } from "../runtime/dev-namespace.js";
|
|
3
3
|
import { cleanupComponent } from "../runtime/component-cleanup.js";
|
|
4
|
-
import "../runtime/
|
|
4
|
+
import { registerLifecycleTransaction } from "../runtime/lifecycle-batch.js";
|
|
5
5
|
import { clearDelegatedHandlersForElement, removeDelegatedListener } from "../runtime/events.js";
|
|
6
|
+
import "../runtime/index.js";
|
|
6
7
|
//#region src/renderer/cleanup.ts
|
|
7
8
|
const elementRefs = /* @__PURE__ */ new WeakMap();
|
|
9
|
+
const refOwners = /* @__PURE__ */ new Map();
|
|
8
10
|
function applyRefValue(ref, value) {
|
|
9
11
|
const resolvedRef = ref;
|
|
10
12
|
if (!resolvedRef) return;
|
|
@@ -15,26 +17,47 @@ function applyRefValue(ref, value) {
|
|
|
15
17
|
if (Object.isExtensible(resolvedRef)) resolvedRef.current = value;
|
|
16
18
|
}
|
|
17
19
|
function updateElementRef(element, ref) {
|
|
20
|
+
if (registerLifecycleTransaction({}, () => updateElementRefImmediately(element, ref), () => void 0)) return;
|
|
21
|
+
updateElementRefImmediately(element, ref);
|
|
22
|
+
}
|
|
23
|
+
function updateElementRefImmediately(element, ref) {
|
|
18
24
|
const previousRef = elementRefs.get(element);
|
|
19
25
|
if (previousRef === ref) return;
|
|
20
26
|
if (previousRef) applyRefValue(previousRef, null);
|
|
21
27
|
if (ref) {
|
|
28
|
+
const previousOwner = refOwners.get(ref);
|
|
29
|
+
if (typeof ref === "function" && previousOwner && previousOwner !== element) {
|
|
30
|
+
elementRefs.set(element, ref);
|
|
31
|
+
refOwners.set(ref, element);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
22
34
|
applyRefValue(ref, element);
|
|
23
35
|
elementRefs.set(element, ref);
|
|
36
|
+
refOwners.set(ref, element);
|
|
24
37
|
} else elementRefs.delete(element);
|
|
25
38
|
}
|
|
26
39
|
function removeElementRef(element) {
|
|
27
40
|
const ref = elementRefs.get(element);
|
|
28
41
|
if (!ref) return;
|
|
42
|
+
if (typeof ref !== "function" && refOwners.get(ref) !== element) {
|
|
43
|
+
elementRefs.delete(element);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
29
46
|
applyRefValue(ref, null);
|
|
47
|
+
const nextOwner = refOwners.get(ref);
|
|
48
|
+
if (typeof ref === "function" && nextOwner && nextOwner !== element) applyRefValue(ref, nextOwner);
|
|
30
49
|
elementRefs.delete(element);
|
|
50
|
+
if (refOwners.get(ref) === element) refOwners.delete(ref);
|
|
31
51
|
}
|
|
32
52
|
function cleanupSingleInstance(node, errors, strict) {
|
|
53
|
+
const instanceList = node.__ASKR_INSTANCES;
|
|
54
|
+
const primaryInstance = node.__ASKR_INSTANCE;
|
|
55
|
+
if (!instanceList && !primaryInstance) return;
|
|
33
56
|
const instances = /* @__PURE__ */ new Set();
|
|
34
|
-
if (Array.isArray(
|
|
35
|
-
for (const instance of
|
|
57
|
+
if (Array.isArray(instanceList)) {
|
|
58
|
+
for (const instance of instanceList) if (instance) instances.add(instance);
|
|
36
59
|
}
|
|
37
|
-
if (
|
|
60
|
+
if (primaryInstance) instances.add(primaryInstance);
|
|
38
61
|
for (const instance of instances) try {
|
|
39
62
|
cleanupComponent(instance);
|
|
40
63
|
} catch (err) {
|
|
@@ -172,14 +195,50 @@ function teardownNodeSubtree(node, opts) {
|
|
|
172
195
|
}
|
|
173
196
|
const REACTIVE_CHILDREN_KEY = "__askr_reactive_children__";
|
|
174
197
|
const elementReactivePropsCleanup = /* @__PURE__ */ new WeakMap();
|
|
198
|
+
function getElementReactivePropsCleanupMap(element, create = false) {
|
|
199
|
+
const store = elementReactivePropsCleanup.get(element);
|
|
200
|
+
if (store instanceof Map) return store;
|
|
201
|
+
if (store) {
|
|
202
|
+
const map = /* @__PURE__ */ new Map([[store._bindingKey, store]]);
|
|
203
|
+
elementReactivePropsCleanup.set(element, map);
|
|
204
|
+
return map;
|
|
205
|
+
}
|
|
206
|
+
if (!create) return;
|
|
207
|
+
const map = /* @__PURE__ */ new Map();
|
|
208
|
+
elementReactivePropsCleanup.set(element, map);
|
|
209
|
+
return map;
|
|
210
|
+
}
|
|
211
|
+
function setDirectElementReactivePropCleanup(element, bindingKey, entry) {
|
|
212
|
+
if (!elementReactivePropsCleanup.get(element)) {
|
|
213
|
+
entry._bindingKey = bindingKey;
|
|
214
|
+
elementReactivePropsCleanup.set(element, entry);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
getElementReactivePropsCleanupMap(element, true).set(bindingKey, entry);
|
|
218
|
+
}
|
|
219
|
+
/** @internal Publish the first reactive binding on a newly created element. */
|
|
220
|
+
function setFreshElementReactivePropCleanup(element, bindingKey, entry) {
|
|
221
|
+
entry._bindingKey = bindingKey;
|
|
222
|
+
elementReactivePropsCleanup.set(element, entry);
|
|
223
|
+
}
|
|
224
|
+
function getElementReactivePropCleanupSize(element) {
|
|
225
|
+
const store = elementReactivePropsCleanup.get(element);
|
|
226
|
+
return store instanceof Map ? store.size : store ? 1 : 0;
|
|
227
|
+
}
|
|
228
|
+
function forEachElementReactivePropCleanup(element, visit) {
|
|
229
|
+
const store = elementReactivePropsCleanup.get(element);
|
|
230
|
+
if (store instanceof Map) for (const entry of store.values()) visit(entry);
|
|
231
|
+
else if (store) visit(store);
|
|
232
|
+
}
|
|
175
233
|
function removeElementReactiveProps(element) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
234
|
+
if (elementReactivePropsCleanup.has(element)) {
|
|
235
|
+
forEachElementReactivePropCleanup(element, (entry) => {
|
|
236
|
+
try {
|
|
237
|
+
entry.cleanup();
|
|
238
|
+
} catch (err) {
|
|
239
|
+
logger.warn("[Askr] reactive prop cleanup failed:", err);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
183
242
|
elementReactivePropsCleanup.delete(element);
|
|
184
243
|
}
|
|
185
244
|
}
|
|
@@ -205,6 +264,4 @@ function removeAllListeners(root) {
|
|
|
205
264
|
});
|
|
206
265
|
}
|
|
207
266
|
//#endregion
|
|
208
|
-
export { REACTIVE_CHILDREN_KEY, cleanupInstanceIfPresent, cleanupInstancesUnder, elementListeners, elementReactivePropsCleanup, elementRefs, removeAllListeners, removeElementListeners, removeElementReactiveProps, removeElementRef, teardownNodeSubtree, updateElementRef };
|
|
209
|
-
|
|
210
|
-
//# sourceMappingURL=cleanup.js.map
|
|
267
|
+
export { REACTIVE_CHILDREN_KEY, cleanupInstanceIfPresent, cleanupInstancesUnder, elementListeners, elementReactivePropsCleanup, elementRefs, forEachElementReactivePropCleanup, getElementReactivePropCleanupSize, getElementReactivePropsCleanupMap, removeAllListeners, removeElementListeners, removeElementReactiveProps, removeElementRef, setDirectElementReactivePropCleanup, setFreshElementReactivePropCleanup, teardownNodeSubtree, updateElementRef };
|