@askrjs/askr 0.0.51 → 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 +2 -4
- 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 +20 -11
- package/dist/boot/root-lifecycle.d.ts +6 -3
- package/dist/boot/root-lifecycle.js +14 -10
- 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 +1 -2
- package/dist/common/invariant.js +0 -2
- package/dist/common/jsx.d.ts +1 -2
- package/dist/common/jsx.js +0 -2
- package/dist/common/logger.js +0 -2
- 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 +1 -2
- package/dist/components/error-boundary.js +0 -2
- package/dist/components/link.d.ts +2 -2
- package/dist/components/link.js +0 -2
- package/dist/control/case.d.ts +1 -2
- package/dist/control/case.js +0 -2
- package/dist/control/for.d.ts +1 -2
- package/dist/control/for.js +0 -2
- 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 +0 -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 +0 -2
- package/dist/data/mutation-cell.d.ts +1 -2
- package/dist/data/mutation-cell.js +6 -5
- package/dist/data/query-cell.d.ts +3 -2
- package/dist/data/query-cell.js +43 -9
- package/dist/data/query-key.js +0 -2
- package/dist/data/shared.js +2 -3
- 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/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 -2
- package/dist/foundations/state/controllable.js +0 -2
- package/dist/foundations/structures/collection.d.ts +1 -2
- package/dist/foundations/structures/collection.js +0 -2
- 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/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 +0 -2
- 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 +1 -1
- package/dist/index.js +0 -2
- 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 +3 -12
- package/dist/jsx-runtime.d.ts +16 -2
- package/dist/jsx-runtime.js +15 -24
- package/dist/jsx-runtime2.d.ts +1 -1
- package/dist/renderer/attributes.js +28 -6
- package/dist/renderer/boundaries.js +48 -172
- 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 +0 -2
- package/dist/renderer/children-fastpath.js +3 -3
- package/dist/renderer/children.js +0 -2
- package/dist/renderer/cleanup.js +70 -13
- package/dist/renderer/component-host-cleanup.js +123 -48
- package/dist/renderer/component-host-instances.js +59 -8
- package/dist/renderer/component-host-replacement.js +105 -0
- package/dist/renderer/component-host-results.js +138 -0
- package/dist/renderer/component-host.js +94 -169
- package/dist/renderer/dom-host.js +0 -2
- package/dist/renderer/dom-internal.js +110 -53
- package/dist/renderer/dom-range.js +161 -0
- package/dist/renderer/dom.js +5 -4
- package/dist/renderer/element-children.js +112 -32
- package/dist/renderer/error-boundary-dom.js +19 -11
- package/dist/renderer/evaluate-dom-range.js +3 -4
- package/dist/renderer/evaluate-reconcile.js +12 -37
- package/dist/renderer/evaluate.js +14 -3
- package/dist/renderer/fastpath.js +4 -12
- package/dist/renderer/for-commit-dom-map.js +6 -18
- package/dist/renderer/for-commit-removal.js +7 -16
- package/dist/renderer/for-commit-reorder.js +0 -2
- package/dist/renderer/for-commit.js +172 -44
- package/dist/renderer/hydration-boundaries.js +60 -0
- package/dist/renderer/hydration-listener-transaction.js +49 -0
- package/dist/renderer/index.js +8 -7
- 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 +56 -21
- package/dist/renderer/reactive-child-dom.js +10 -4
- package/dist/renderer/reactive-child-sources.js +0 -2
- package/dist/renderer/reactive-children.js +29 -20
- package/dist/renderer/reconcile-commit.js +0 -2
- package/dist/renderer/reconcile-fastpaths.js +4 -11
- package/dist/renderer/reconcile-resolution.js +31 -55
- package/dist/renderer/reconcile.js +0 -2
- package/dist/renderer/retained-element-rollback.js +159 -148
- package/dist/renderer/stable-patch.js +3 -4
- package/dist/renderer/static-reuse.js +0 -2
- package/dist/renderer/utils.js +18 -9
- package/dist/router/access.js +0 -2
- package/dist/router/activity.d.ts +1 -2
- package/dist/router/activity.js +0 -2
- package/dist/router/authoring.d.ts +1 -2
- package/dist/router/authoring.js +0 -2
- 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 +4 -7
- package/dist/router/navigation-registry.d.ts +1 -2
- package/dist/router/navigation-registry.js +0 -2
- 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 +419 -40
- 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 +4 -3
- package/dist/router/resolution.d.ts +1 -2
- package/dist/router/resolution.js +0 -2
- package/dist/router/route-context.js +0 -2
- package/dist/router/route-matching.d.ts +1 -2
- package/dist/router/route-matching.js +0 -2
- package/dist/router/route-query.d.ts +1 -2
- package/dist/router/route-query.js +1 -3
- package/dist/router/store.d.ts +1 -2
- package/dist/router/store.js +0 -2
- package/dist/runtime/access.d.ts +1 -2
- 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 +2 -4
- package/dist/runtime/component-commit.js +25 -23
- package/dist/runtime/component-facade.js +5 -3
- package/dist/runtime/component-internal.d.ts +11 -6
- package/dist/runtime/component-internal.js +63 -45
- package/dist/runtime/component-lifecycle.d.ts +2 -41
- package/dist/runtime/component-lifecycle.js +6 -149
- package/dist/runtime/component-scope.d.ts +3 -4
- 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 +5 -6
- 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 +1 -2
- package/dist/runtime/error-boundary.js +0 -2
- package/dist/runtime/events.d.ts +3 -3
- package/dist/runtime/events.js +66 -69
- package/dist/runtime/execution-model.d.ts +1 -2
- package/dist/runtime/execution-model.js +0 -2
- package/dist/runtime/fastlane.d.ts +1 -2
- 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 +68 -5
- 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 +13 -4
- package/dist/runtime/for-signals.js +155 -81
- package/dist/runtime/for-types.d.ts +1 -2
- package/dist/runtime/for.d.ts +2 -2
- package/dist/runtime/for.js +3 -3
- package/dist/runtime/index.d.ts +5 -5
- package/dist/runtime/index.js +12 -10
- 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 +8 -7
- package/dist/runtime/perf-metrics.js +4 -68
- package/dist/runtime/portal.d.ts +1 -2
- package/dist/runtime/portal.js +103 -11
- package/dist/runtime/readable.d.ts +9 -4
- package/dist/runtime/readable.js +41 -17
- package/dist/runtime/resource-cell.js +2 -4
- package/dist/runtime/resource-operation.d.ts +1 -2
- package/dist/runtime/resource-operation.js +37 -34
- package/dist/runtime/runtime.d.ts +1 -2
- package/dist/runtime/runtime.js +0 -2
- package/dist/runtime/scheduler.d.ts +1 -2
- package/dist/runtime/scheduler.js +8 -11
- package/dist/runtime/selector-store.js +0 -2
- package/dist/runtime/selector.d.ts +1 -2
- package/dist/runtime/selector.js +3 -11
- 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 +65 -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 +0 -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 +16 -5
- package/dist/ssr/component-runtime.js +1 -27
- 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 +0 -2
- package/dist/ssr/render-sync.d.ts +1 -2
- package/dist/ssr/render-sync.js +27 -19
- package/dist/ssr/route-policy-resolution.js +0 -2
- package/dist/ssr/route-render.d.ts +1 -2
- package/dist/ssr/route-render.js +0 -2
- 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 +0 -2
- package/package.json +57 -44
- 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/error-boundary.d.ts.map +0 -1
- package/dist/common/invariant.js.map +0 -1
- package/dist/common/jsx.d.ts.map +0 -1
- package/dist/common/jsx.js.map +0 -1
- package/dist/common/logger.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/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/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-fastpath.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-matching.d.ts.map +0 -1
- package/dist/router/route-matching.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.d.ts.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-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.d.ts.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/error-boundary.d.ts.map +0 -1
- package/dist/runtime/error-boundary.js.map +0 -1
- package/dist/runtime/events.d.ts.map +0 -1
- package/dist/runtime/events.js.map +0 -1
- package/dist/runtime/execution-model.d.ts.map +0 -1
- package/dist/runtime/execution-model.js.map +0 -1
- package/dist/runtime/fastlane.d.ts.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/for-types.d.ts.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.d.ts.map +0 -1
- package/dist/runtime/perf-metrics.js.map +0 -1
- package/dist/runtime/portal.d.ts.map +0 -1
- package/dist/runtime/portal.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-store.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
|
@@ -15,11 +15,10 @@ function validateForKeys(forState, newArray) {
|
|
|
15
15
|
if (key === null || key === void 0) failForValidation("[askr] Invalid For key detected. Keys should be stable, non-null, and unique within a For list.");
|
|
16
16
|
if (seen.has(key)) failForValidation(`[askr] Duplicate For key detected: ${String(key)}. Keys should be stable, non-null, and unique within a For list.`);
|
|
17
17
|
seen.add(key);
|
|
18
|
-
const keyString = String(key);
|
|
19
18
|
const keyKind = typeof key;
|
|
20
|
-
const previousKeyKind = forState.devKeyKinds?.get(
|
|
21
|
-
if (previousKeyKind && previousKeyKind !== keyKind) failForValidation(`[askr] For key type changed for ${
|
|
22
|
-
keyKinds.set(
|
|
19
|
+
const previousKeyKind = forState.devKeyKinds?.get(key);
|
|
20
|
+
if (previousKeyKind && previousKeyKind !== keyKind) failForValidation(`[askr] For key type changed for ${String(key)}. Keys must remain consistently typed across renders.`);
|
|
21
|
+
keyKinds.set(key, keyKind);
|
|
23
22
|
}
|
|
24
23
|
forState.devKeyKinds = keyKinds;
|
|
25
24
|
}
|
|
@@ -32,6 +31,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
32
31
|
const oldLen = orderedKeys.length;
|
|
33
32
|
const newLen = newArray.length;
|
|
34
33
|
forState.lastRemovedNodes = [];
|
|
34
|
+
forState.lastRemovedRanges = [];
|
|
35
35
|
if (newLen === 0) {
|
|
36
36
|
if (oldLen > 0) disposeAllItems(forState, forState.fallback ? "teardown" : "none");
|
|
37
37
|
recordBenchFastLane("TRUNCATE");
|
|
@@ -46,20 +46,75 @@ function reconcileForItems(forState, newArray) {
|
|
|
46
46
|
return renderFallbackScope(forState);
|
|
47
47
|
}
|
|
48
48
|
if (forState.fallbackScope) disposeFallbackScope(forState, "none");
|
|
49
|
+
if (newLen === oldLen + 1) {
|
|
50
|
+
let oldIndex = 0;
|
|
51
|
+
let insertedIndex = -1;
|
|
52
|
+
let insertedKey = null;
|
|
53
|
+
for (let newIndex = 0; newIndex < newLen; newIndex++) {
|
|
54
|
+
const item = newArray[newIndex];
|
|
55
|
+
const key = byFn(item, newIndex);
|
|
56
|
+
const expectedKey = orderedKeys[oldIndex];
|
|
57
|
+
if (oldIndex < oldLen && key === expectedKey) {
|
|
58
|
+
const existing = items.get(key);
|
|
59
|
+
if (!existing || existing.item !== item || existing.scope.needsDomUpdate || oldIndex !== newIndex && existing.indexSignal._hasBeenRead) {
|
|
60
|
+
insertedIndex = -2;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
oldIndex++;
|
|
64
|
+
} else if (insertedIndex === -1 && !items.has(key)) {
|
|
65
|
+
insertedIndex = newIndex;
|
|
66
|
+
insertedKey = key;
|
|
67
|
+
} else {
|
|
68
|
+
insertedIndex = -2;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (insertedIndex >= 0 && oldIndex === oldLen && insertedKey !== null) {
|
|
73
|
+
const insertedItem = createItemInstance(insertedKey, newArray[insertedIndex], insertedIndex, forState);
|
|
74
|
+
const resultVNodes = forState.orderedVNodes.slice();
|
|
75
|
+
const resultItems = forState.orderedItems.slice();
|
|
76
|
+
const resultKeys = orderedKeys.slice();
|
|
77
|
+
resultVNodes.splice(insertedIndex, 0, insertedItem.scope.vnode);
|
|
78
|
+
resultItems.splice(insertedIndex, 0, insertedItem);
|
|
79
|
+
resultKeys.splice(insertedIndex, 0, insertedKey);
|
|
80
|
+
items.set(insertedKey, insertedItem);
|
|
81
|
+
recordBenchFastLane("INSERT_ONE");
|
|
82
|
+
recordBenchEvent("itemReused", oldLen);
|
|
83
|
+
forState.lastCommitStrategy = "INSERT_ONE";
|
|
84
|
+
forState.orderedKeys = resultKeys;
|
|
85
|
+
forState.orderedItems = resultItems;
|
|
86
|
+
forState.orderedVNodes = resultVNodes;
|
|
87
|
+
forState.pendingDirtyIndices = null;
|
|
88
|
+
forState.pendingSwapIndices = null;
|
|
89
|
+
forState.pendingMoveOnly = false;
|
|
90
|
+
forState.pendingInsertedIndex = insertedIndex;
|
|
91
|
+
if (BENCH_BUILD_ENABLED) {
|
|
92
|
+
recordBenchTiming("reconcile", performance.now() - reconcileStartMs);
|
|
93
|
+
flushBenchMetrics();
|
|
94
|
+
}
|
|
95
|
+
return resultVNodes;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
49
98
|
if (oldLen < newLen) {
|
|
50
99
|
let canUseAppendPath = true;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
100
|
+
let canSkipCommittedPrefix = true;
|
|
101
|
+
for (let i = 0; i < oldLen; i++) {
|
|
102
|
+
const key = byFn(newArray[i], i);
|
|
103
|
+
if (key !== orderedKeys[i]) {
|
|
104
|
+
canUseAppendPath = false;
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
const existing = forState.orderedItems[i] ?? items.get(key);
|
|
108
|
+
if (!existing || existing.item !== newArray[i] || existing.scope.needsDomUpdate || existing.scope.hydrationPending) canSkipCommittedPrefix = false;
|
|
54
109
|
}
|
|
55
110
|
if (canUseAppendPath) {
|
|
56
|
-
recordBenchFastLane("APPEND");
|
|
111
|
+
if (BENCH_BUILD_ENABLED) recordBenchFastLane("APPEND");
|
|
57
112
|
forState.lastCommitStrategy = "APPEND";
|
|
58
113
|
const resultVNodes = forState.orderedVNodes;
|
|
59
114
|
const resultItems = forState.orderedItems;
|
|
60
115
|
resultVNodes.length = newLen;
|
|
61
116
|
resultItems.length = newLen;
|
|
62
|
-
for (let i = 0; i < oldLen; i++) {
|
|
117
|
+
if (!canSkipCommittedPrefix) for (let i = 0; i < oldLen; i++) {
|
|
63
118
|
const item = newArray[i];
|
|
64
119
|
const key = orderedKeys[i];
|
|
65
120
|
const existing = resultItems[i] ?? items.get(key);
|
|
@@ -67,7 +122,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
67
122
|
resultItems[i] = existing;
|
|
68
123
|
resultVNodes[i] = existing.scope.vnode;
|
|
69
124
|
}
|
|
70
|
-
recordBenchEvent("itemReused", oldLen);
|
|
125
|
+
if (BENCH_BUILD_ENABLED) recordBenchEvent("itemReused", oldLen);
|
|
71
126
|
for (let i = oldLen; i < newLen; i++) {
|
|
72
127
|
const item = newArray[i];
|
|
73
128
|
const key = byFn(item, i);
|
|
@@ -85,6 +140,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
85
140
|
forState.pendingDirtyIndices = null;
|
|
86
141
|
forState.pendingSwapIndices = null;
|
|
87
142
|
forState.pendingMoveOnly = false;
|
|
143
|
+
forState.pendingAppendStart = canSkipCommittedPrefix ? oldLen : 0;
|
|
88
144
|
return resultVNodes;
|
|
89
145
|
}
|
|
90
146
|
}
|
|
@@ -102,7 +158,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
102
158
|
break;
|
|
103
159
|
}
|
|
104
160
|
if (canUseRemoveOnePath) {
|
|
105
|
-
recordBenchFastLane("REMOVE_ONE");
|
|
161
|
+
if (BENCH_BUILD_ENABLED) recordBenchFastLane("REMOVE_ONE");
|
|
106
162
|
forState.lastCommitStrategy = "NO_REORDER";
|
|
107
163
|
const previousOrderedItems = forState.orderedItems.slice();
|
|
108
164
|
const resultVNodes = forState.orderedVNodes;
|
|
@@ -123,7 +179,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
123
179
|
resultItems[i] = existing;
|
|
124
180
|
resultVNodes[i] = existing.scope.vnode;
|
|
125
181
|
}
|
|
126
|
-
recordBenchEvent("itemReused", newLen);
|
|
182
|
+
if (BENCH_BUILD_ENABLED) recordBenchEvent("itemReused", newLen);
|
|
127
183
|
const removedKey = orderedKeys[removedIndex];
|
|
128
184
|
const removedItem = items.get(removedKey);
|
|
129
185
|
if (removedItem) {
|
|
@@ -211,9 +267,8 @@ function reconcileForItems(forState, newArray) {
|
|
|
211
267
|
const item = newArray[i];
|
|
212
268
|
const key = orderedKeys[i];
|
|
213
269
|
const existing = items.get(key);
|
|
214
|
-
|
|
215
|
-
if (
|
|
216
|
-
if (!itemChanged && existing.scope.needsDomUpdate) dirtyIndices.push(i);
|
|
270
|
+
if (existing.item !== item) updateItemInstance(forState, existing, item);
|
|
271
|
+
if (existing.scope.needsDomUpdate) dirtyIndices.push(i);
|
|
217
272
|
resultItems[i] = existing;
|
|
218
273
|
resultVNodes[i] = existing.scope.vnode;
|
|
219
274
|
}
|
|
@@ -274,7 +329,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
274
329
|
const nextOrderedItems = forState.orderedItems.slice();
|
|
275
330
|
nextOrderedItems[firstMismatch] = secondExisting;
|
|
276
331
|
nextOrderedItems[secondMismatch] = firstExisting;
|
|
277
|
-
recordBenchEvent("itemReused");
|
|
332
|
+
if (BENCH_BUILD_ENABLED) recordBenchEvent("itemReused");
|
|
278
333
|
recordBenchEvent("itemReused");
|
|
279
334
|
if (firstExisting.item !== firstItem) updateItemInstance(forState, firstExisting, firstItem);
|
|
280
335
|
if (secondExisting.item !== secondItem) updateItemInstance(forState, secondExisting, secondItem);
|
|
@@ -311,7 +366,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
311
366
|
recordBenchEvent("itemReused");
|
|
312
367
|
}
|
|
313
368
|
if (canUseMoveOnlyPath) {
|
|
314
|
-
recordBenchFastLane("FULL_KEYED");
|
|
369
|
+
if (BENCH_BUILD_ENABLED) recordBenchFastLane("FULL_KEYED");
|
|
315
370
|
forState.lastCommitStrategy = "FULL_KEYED";
|
|
316
371
|
for (let i = 0; i < moveOnlyItems.length; i++) {
|
|
317
372
|
syncForItemIndex(forState, moveOnlyItems[i], i);
|
|
@@ -330,7 +385,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
330
385
|
return moveOnlyVNodes;
|
|
331
386
|
}
|
|
332
387
|
}
|
|
333
|
-
recordBenchFastLane("FULL_KEYED");
|
|
388
|
+
if (BENCH_BUILD_ENABLED) recordBenchFastLane("FULL_KEYED");
|
|
334
389
|
forState.lastCommitStrategy = "FULL_KEYED";
|
|
335
390
|
const toRemove = new Set(orderedKeys);
|
|
336
391
|
const newOrderedKeys = [];
|
|
@@ -340,18 +395,18 @@ function reconcileForItems(forState, newArray) {
|
|
|
340
395
|
for (let i = 0; i < newArray.length; i++) {
|
|
341
396
|
const item = newArray[i];
|
|
342
397
|
const key = byFn(item, i);
|
|
343
|
-
recordBenchEvent("keyLookup");
|
|
398
|
+
if (BENCH_BUILD_ENABLED) recordBenchEvent("keyLookup");
|
|
344
399
|
toRemove.delete(key);
|
|
345
400
|
newOrderedKeys.push(key);
|
|
346
401
|
const existing = items.get(key);
|
|
347
|
-
recordBenchEvent(existing ? "keyHit" : "keyMiss");
|
|
402
|
+
if (BENCH_BUILD_ENABLED) recordBenchEvent(existing ? "keyHit" : "keyMiss");
|
|
348
403
|
if (!existing) {
|
|
349
404
|
const itemInstance = createItemInstance(key, item, i, forState);
|
|
350
405
|
items.set(key, itemInstance);
|
|
351
406
|
newOrderedItems.push(itemInstance);
|
|
352
407
|
resultVNodes.push(itemInstance.scope.vnode);
|
|
353
408
|
} else {
|
|
354
|
-
recordBenchEvent("itemReused");
|
|
409
|
+
if (BENCH_BUILD_ENABLED) recordBenchEvent("itemReused");
|
|
355
410
|
const itemChanged = existing.item !== item;
|
|
356
411
|
const indexChanged = existing.indexSignal.peek() !== i;
|
|
357
412
|
if (itemChanged) {
|
|
@@ -385,5 +440,3 @@ function reconcileForItems(forState, newArray) {
|
|
|
385
440
|
}
|
|
386
441
|
//#endregion
|
|
387
442
|
export { reconcileForItems };
|
|
388
|
-
|
|
389
|
-
//# sourceMappingURL=for-reconcile.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildScope } from "./child-scope.js";
|
|
2
|
-
import { ForIndexSignal,
|
|
2
|
+
import { ForIndexSignal, ReactiveForItemState } from "./for-signals.js";
|
|
3
3
|
import { ForState } from "./for-internal.js";
|
|
4
4
|
import { VNode } from "../common/vnode.js";
|
|
5
5
|
|
|
@@ -8,12 +8,13 @@ interface ForItemInstance<T> {
|
|
|
8
8
|
key: string | number;
|
|
9
9
|
item: T;
|
|
10
10
|
reactiveItem: T;
|
|
11
|
-
|
|
12
|
-
itemPropertySignals: Map<PropertyKey, ForItemPropertySignal> | null;
|
|
11
|
+
reactiveItemState: ReactiveForItemState<T> | null;
|
|
13
12
|
indexSignal: ForIndexSignal;
|
|
14
13
|
scope: ChildScope;
|
|
15
14
|
}
|
|
16
15
|
type RemovedDomCleanupMode = 'none' | 'teardown' | 'full-clear';
|
|
16
|
+
declare function captureForItemTransactionSnapshot<T>(forState: ForState<T>, itemInstance: ForItemInstance<T>): void;
|
|
17
|
+
declare function captureForFallbackTransactionSnapshot<T>(forState: ForState<T>, fallbackScope?: ChildScope | null): void;
|
|
17
18
|
declare function syncForItemIndex<T>(forState: ForState<T>, itemInstance: ForItemInstance<T>, nextIndex: number): boolean;
|
|
18
19
|
declare function disposeItemInstance<T>(forState: ForState<T>, itemInstance: ForItemInstance<T>, domCleanup: RemovedDomCleanupMode): void;
|
|
19
20
|
declare function createItemInstance<T>(key: string | number, item: T, index: number, forState: ForState<T>): ForItemInstance<T>;
|
|
@@ -22,5 +23,4 @@ declare function disposeFallbackScope<T>(forState: ForState<T>, domCleanup: Remo
|
|
|
22
23
|
declare function renderFallbackScope<T>(forState: ForState<T>): VNode[];
|
|
23
24
|
declare function disposeAllItems<T>(forState: ForState<T>, domCleanup: RemovedDomCleanupMode): void;
|
|
24
25
|
//#endregion
|
|
25
|
-
export { ForItemInstance, RemovedDomCleanupMode };
|
|
26
|
-
//# sourceMappingURL=for-scopes.d.ts.map
|
|
26
|
+
export { ForItemInstance, RemovedDomCleanupMode };
|
|
@@ -1,16 +1,96 @@
|
|
|
1
1
|
import { isDevelopmentEnvironment } from "../common/env.js";
|
|
2
2
|
import { getRuntimeRenderer } from "./access.js";
|
|
3
|
-
import { createChildScope, disposeChildScope } from "./child-scope.js";
|
|
4
|
-
import { canProxyForItem, createForIndexSignal,
|
|
5
|
-
import
|
|
6
|
-
//#region src/runtime/for-scopes.ts
|
|
3
|
+
import { captureChildScopeTransactionSnapshot, createChildScope, disposeChildScope } from "./child-scope.js";
|
|
4
|
+
import { canProxyForItem, createForIndexSignal, createReactiveForItem, haveSameOwnKeys, notifyForSignalReaders, readForItemProperty, removeForParentReaders, scopeDirectlyReadsSource, scopeReadsSource, syncForIndexSignal } from "./for-signals.js";
|
|
5
|
+
import "./for-bench.js";
|
|
7
6
|
function enqueueForScopeUpdate(parent) {
|
|
8
7
|
parent?._enqueueRun?.();
|
|
9
8
|
}
|
|
9
|
+
const forStatesByScope = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
function enqueueForBoundaryScopeCommit() {
|
|
11
|
+
const forState = this.blueprintOwner ?? forStatesByScope.get(this);
|
|
12
|
+
if (!forState) return;
|
|
13
|
+
if (forState._enqueueBoundaryCommit) {
|
|
14
|
+
forState._enqueueBoundaryCommit();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
enqueueForScopeUpdate(forState.parentInstance);
|
|
18
|
+
}
|
|
19
|
+
function createForOwnedChildScope(forState, key) {
|
|
20
|
+
return createChildScope(forState.parentInstance, key, enqueueForBoundaryScopeCommit);
|
|
21
|
+
}
|
|
22
|
+
function captureForItemTransactionSnapshot(forState, itemInstance) {
|
|
23
|
+
const transaction = forState._transaction;
|
|
24
|
+
if (!transaction || transaction.itemSnapshots?.has(itemInstance)) return;
|
|
25
|
+
if (transaction.collectionSnapshotMode === "reset-empty" || transaction.items.get(itemInstance.key) !== itemInstance) return;
|
|
26
|
+
const itemSnapshots = transaction.itemSnapshots ??= /* @__PURE__ */ new Map();
|
|
27
|
+
const propertySignals = itemInstance.reactiveItemState?.propertySignals ?? null;
|
|
28
|
+
const itemSignal = itemInstance.reactiveItemState?.itemSignal ?? null;
|
|
29
|
+
const propertySnapshots = propertySignals && propertySignals.size > 0 ? new Map(Array.from(propertySignals, ([property, signal]) => [property, {
|
|
30
|
+
signal,
|
|
31
|
+
value: signal.peek(),
|
|
32
|
+
hasBeenRead: signal._hasBeenRead === true
|
|
33
|
+
}])) : null;
|
|
34
|
+
itemSnapshots.set(itemInstance, {
|
|
35
|
+
item: itemInstance.item,
|
|
36
|
+
itemSignalExists: itemSignal !== null,
|
|
37
|
+
itemSignalValue: itemSignal?.peek(),
|
|
38
|
+
itemSignalHasBeenRead: itemSignal?._hasBeenRead === true,
|
|
39
|
+
indexValue: itemInstance.indexSignal.peek(),
|
|
40
|
+
indexHasBeenRead: itemInstance.indexSignal._hasBeenRead === true,
|
|
41
|
+
propertySignalStore: propertySignals,
|
|
42
|
+
propertySignals: propertySnapshots,
|
|
43
|
+
scope: captureChildScopeTransactionSnapshot(itemInstance.scope)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function captureForFallbackTransactionSnapshot(forState, fallbackScope = forState.fallbackScope) {
|
|
47
|
+
const transaction = forState._transaction;
|
|
48
|
+
if (!transaction || !fallbackScope || transaction.fallbackScope !== fallbackScope || transaction.fallbackScopeSnapshot) return;
|
|
49
|
+
transaction.fallbackScopeSnapshot = captureChildScopeTransactionSnapshot(fallbackScope);
|
|
50
|
+
}
|
|
51
|
+
function stageForSignalEffect(forState, source, notify, skipInstance = null, skipOwnedBy = null) {
|
|
52
|
+
const transaction = forState._transaction;
|
|
53
|
+
if (!transaction) return false;
|
|
54
|
+
const effects = transaction.signalEffects ??= /* @__PURE__ */ new Map();
|
|
55
|
+
const existing = effects.get(source);
|
|
56
|
+
if (existing) {
|
|
57
|
+
existing.notify ||= notify;
|
|
58
|
+
if (existing.skipInstance !== skipInstance) existing.skipInstance = null;
|
|
59
|
+
if (existing.skipOwnedBy !== skipOwnedBy) existing.skipOwnedBy = null;
|
|
60
|
+
} else effects.set(source, {
|
|
61
|
+
parentInstance: forState.parentInstance,
|
|
62
|
+
notify,
|
|
63
|
+
skipInstance,
|
|
64
|
+
skipOwnedBy
|
|
65
|
+
});
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
10
68
|
function syncForItemIndex(forState, itemInstance, nextIndex) {
|
|
11
69
|
const indexSignal = itemInstance.indexSignal;
|
|
12
|
-
|
|
13
|
-
if (
|
|
70
|
+
const previousIndex = indexSignal.peek();
|
|
71
|
+
if (previousIndex === nextIndex) return false;
|
|
72
|
+
if (indexSignal._hasBeenRead !== true) {
|
|
73
|
+
const transaction = forState._transaction;
|
|
74
|
+
if (transaction) {
|
|
75
|
+
const snapshots = transaction.unreadIndexSnapshots ??= /* @__PURE__ */ new Map();
|
|
76
|
+
if (!snapshots.has(indexSignal)) snapshots.set(indexSignal, previousIndex);
|
|
77
|
+
}
|
|
78
|
+
indexSignal.set(nextIndex, false);
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
captureForItemTransactionSnapshot(forState, itemInstance);
|
|
82
|
+
const scopeReadsIndex = scopeReadsSource(itemInstance.scope, indexSignal);
|
|
83
|
+
const scopeDirectlyReadsIndex = scopeDirectlyReadsSource(itemInstance.scope, indexSignal);
|
|
84
|
+
if (forState._transaction) {
|
|
85
|
+
const shouldNotify = indexSignal._hasBeenRead === true;
|
|
86
|
+
indexSignal.set(nextIndex, false);
|
|
87
|
+
stageForSignalEffect(forState, indexSignal, shouldNotify, scopeReadsIndex ? itemInstance.scope.componentInstance : null);
|
|
88
|
+
if (!scopeReadsIndex) return false;
|
|
89
|
+
if (scopeDirectlyReadsIndex) rerenderItemInstance(forState, itemInstance, itemInstance.reactiveItem);
|
|
90
|
+
else itemInstance.scope.markDirty();
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
if (!scopeReadsIndex) {
|
|
14
94
|
syncForIndexSignal(indexSignal, nextIndex);
|
|
15
95
|
return false;
|
|
16
96
|
}
|
|
@@ -19,25 +99,32 @@ function syncForItemIndex(forState, itemInstance, nextIndex) {
|
|
|
19
99
|
rerenderItemInstance(forState, itemInstance, itemInstance.reactiveItem);
|
|
20
100
|
return true;
|
|
21
101
|
}
|
|
22
|
-
function materializeItemVnode(key, vnode) {
|
|
102
|
+
function materializeItemVnode(forState, key, vnode) {
|
|
23
103
|
if (vnode && typeof vnode === "object" && "type" in vnode) {
|
|
24
104
|
const vn = vnode;
|
|
25
105
|
vn.key = key;
|
|
26
|
-
if (typeof vn.type === "string") {
|
|
106
|
+
if (forState.parentInstance?.ssr && typeof vn.type === "string") {
|
|
27
107
|
if (!vn.props) vn.props = {};
|
|
28
108
|
if (vn.props["data-key"] === void 0) vn.props["data-key"] = String(key);
|
|
109
|
+
if (vn.props["data-askr-key-kind"] === void 0) vn.props["data-askr-key-kind"] = typeof key;
|
|
29
110
|
}
|
|
30
111
|
}
|
|
31
112
|
}
|
|
32
113
|
function renderItemScope(forState, scope, item, indexSignal, key) {
|
|
33
|
-
recordBenchEvent("rowFactory");
|
|
34
114
|
const vnode = scope.render(() => forState.renderFn(item, indexSignal));
|
|
35
|
-
materializeItemVnode(key, vnode);
|
|
115
|
+
materializeItemVnode(forState, key, vnode);
|
|
36
116
|
return vnode;
|
|
37
117
|
}
|
|
38
118
|
function disposeItemInstance(forState, itemInstance, domCleanup) {
|
|
39
|
-
recordBenchEvent("itemRemoved");
|
|
40
119
|
const removedDom = itemInstance.scope.dom;
|
|
120
|
+
const removedRange = itemInstance.scope.range;
|
|
121
|
+
const transaction = forState._transaction;
|
|
122
|
+
if (transaction) {
|
|
123
|
+
(transaction.removedScopes ??= []).push(itemInstance.scope);
|
|
124
|
+
if (removedDom) forState.lastRemovedNodes.push(removedDom);
|
|
125
|
+
if (removedRange) forState.lastRemovedRanges.push(removedRange);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
41
128
|
try {
|
|
42
129
|
disposeChildScope(itemInstance.scope);
|
|
43
130
|
} catch (err) {
|
|
@@ -48,27 +135,25 @@ function disposeItemInstance(forState, itemInstance, domCleanup) {
|
|
|
48
135
|
if (domCleanup === "teardown") getRuntimeRenderer().teardownNodeSubtree(removedDom);
|
|
49
136
|
}
|
|
50
137
|
forState.lastRemovedNodes.push(removedDom);
|
|
138
|
+
if (removedRange) forState.lastRemovedRanges.push(removedRange);
|
|
51
139
|
}
|
|
52
140
|
function createItemInstance(key, item, index, forState) {
|
|
53
|
-
recordBenchEvent("itemCreated");
|
|
54
141
|
const indexSignal = createForIndexSignal(index);
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
renderItemScope(forState, scope, reactiveItem, indexSignal, key);
|
|
142
|
+
const reactiveItemState = canProxyForItem(item) ? createReactiveForItem(item) : null;
|
|
143
|
+
const reactiveItem = reactiveItemState?.proxy ?? item;
|
|
144
|
+
const scope = createForOwnedChildScope(forState, key);
|
|
145
|
+
scope.blueprintOwner = forState;
|
|
146
|
+
try {
|
|
147
|
+
renderItemScope(forState, scope, reactiveItem, indexSignal, key);
|
|
148
|
+
} catch (error) {
|
|
149
|
+
disposeChildScope(scope);
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
66
152
|
return {
|
|
67
153
|
key,
|
|
68
154
|
item,
|
|
69
155
|
reactiveItem,
|
|
70
|
-
|
|
71
|
-
itemPropertySignals,
|
|
156
|
+
reactiveItemState,
|
|
72
157
|
indexSignal,
|
|
73
158
|
scope
|
|
74
159
|
};
|
|
@@ -78,16 +163,19 @@ function rerenderItemInstance(forState, itemInstance, item) {
|
|
|
78
163
|
}
|
|
79
164
|
function updateItemInstance(forState, itemInstance, item) {
|
|
80
165
|
if (itemInstance.item === item) return false;
|
|
166
|
+
captureForItemTransactionSnapshot(forState, itemInstance);
|
|
81
167
|
const previousItem = itemInstance.item;
|
|
82
168
|
itemInstance.item = item;
|
|
83
169
|
const scope = itemInstance.scope;
|
|
84
170
|
let scopeReadsChangedSignal = false;
|
|
85
|
-
const
|
|
86
|
-
if (!
|
|
171
|
+
const reactiveItemState = itemInstance.reactiveItemState;
|
|
172
|
+
if (!reactiveItemState) {
|
|
87
173
|
rerenderItemInstance(forState, itemInstance, item);
|
|
88
174
|
return true;
|
|
89
175
|
}
|
|
90
|
-
const
|
|
176
|
+
const itemSignal = reactiveItemState.itemSignal;
|
|
177
|
+
reactiveItemState.currentItem = item;
|
|
178
|
+
const propertySignals = reactiveItemState.propertySignals;
|
|
91
179
|
const changedPropertySignals = [];
|
|
92
180
|
if (propertySignals && propertySignals.size > 0) for (const [prop, propertySignal] of propertySignals) {
|
|
93
181
|
const previousValue = readForItemProperty(previousItem, prop);
|
|
@@ -96,17 +184,35 @@ function updateItemInstance(forState, itemInstance, item) {
|
|
|
96
184
|
if (scopeReadsSource(scope, propertySignal)) scopeReadsChangedSignal = true;
|
|
97
185
|
changedPropertySignals.push([propertySignal, nextValue]);
|
|
98
186
|
}
|
|
99
|
-
if (scopeReadsSource(scope, itemSignal)) scopeReadsChangedSignal = true;
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
187
|
+
if (itemSignal && scopeReadsSource(scope, itemSignal)) scopeReadsChangedSignal = true;
|
|
188
|
+
let coalescedPropertyChanged = false;
|
|
189
|
+
const coalescedProperties = reactiveItemState.coalescedProperties;
|
|
190
|
+
if (coalescedProperties !== null) if (Array.isArray(coalescedProperties)) {
|
|
191
|
+
for (const property of coalescedProperties) if (!Object.is(readForItemProperty(previousItem, property), readForItemProperty(item, property))) {
|
|
192
|
+
coalescedPropertyChanged = true;
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
} else {
|
|
196
|
+
coalescedPropertyChanged = !Object.is(readForItemProperty(previousItem, coalescedProperties), readForItemProperty(item, coalescedProperties));
|
|
197
|
+
const secondProperty = reactiveItemState.coalescedProperty2;
|
|
198
|
+
if (secondProperty !== null && !coalescedPropertyChanged) coalescedPropertyChanged = !Object.is(readForItemProperty(previousItem, secondProperty), readForItemProperty(item, secondProperty));
|
|
199
|
+
}
|
|
200
|
+
const wholeItemChanged = itemSignal?._hasBeenRead === true && (reactiveItemState.wholeItemRead || coalescedPropertyChanged);
|
|
201
|
+
const itemShapeChanged = !wholeItemChanged && changedPropertySignals.length === 0 && !haveSameOwnKeys(previousItem, item);
|
|
202
|
+
const notifyReaders = !scopeReadsChangedSignal && (changedPropertySignals.length > 0 || itemShapeChanged || wholeItemChanged);
|
|
203
|
+
const visibleChange = scopeReadsChangedSignal || changedPropertySignals.length > 0 || itemShapeChanged || wholeItemChanged;
|
|
204
|
+
for (const [propertySignal, nextValue] of changedPropertySignals) if (stageForSignalEffect(forState, propertySignal, notifyReaders, null, itemInstance.scope.componentInstance)) propertySignal.set(nextValue, false);
|
|
205
|
+
else {
|
|
104
206
|
removeForParentReaders(forState.parentInstance, propertySignal);
|
|
105
207
|
propertySignal.set(nextValue, notifyReaders);
|
|
106
208
|
}
|
|
107
|
-
|
|
108
|
-
itemSignal
|
|
109
|
-
|
|
209
|
+
if (itemSignal && stageForSignalEffect(forState, itemSignal, notifyReaders, null, itemInstance.scope.componentInstance)) itemSignal.set(item, false);
|
|
210
|
+
else if (itemSignal) {
|
|
211
|
+
removeForParentReaders(forState.parentInstance, itemSignal);
|
|
212
|
+
itemSignal.set(item, notifyReaders);
|
|
213
|
+
}
|
|
214
|
+
if (scopeReadsChangedSignal) if (itemSignal !== null && scopeDirectlyReadsSource(scope, itemSignal) || changedPropertySignals.some(([propertySignal]) => scopeDirectlyReadsSource(scope, propertySignal))) rerenderItemInstance(forState, itemInstance, itemInstance.reactiveItem);
|
|
215
|
+
else scope.markDirty();
|
|
110
216
|
return visibleChange;
|
|
111
217
|
}
|
|
112
218
|
const FOR_FALLBACK_SCOPE_KEY = "__for-fallback__";
|
|
@@ -114,13 +220,19 @@ function disposeFallbackScope(forState, domCleanup) {
|
|
|
114
220
|
const fallbackScope = forState.fallbackScope;
|
|
115
221
|
if (!fallbackScope) return;
|
|
116
222
|
const removedDom = fallbackScope.dom;
|
|
117
|
-
|
|
223
|
+
const removedRange = fallbackScope.range;
|
|
224
|
+
const transaction = forState._transaction;
|
|
225
|
+
if (transaction) {
|
|
226
|
+
(transaction.removedScopes ??= []).push(fallbackScope);
|
|
227
|
+
if (removedRange) forState.lastRemovedRanges.push(removedRange);
|
|
228
|
+
} else disposeChildScope(fallbackScope);
|
|
118
229
|
forState.fallbackScope = null;
|
|
119
230
|
if (!removedDom) return;
|
|
120
231
|
if (removedDom instanceof Element) {
|
|
121
232
|
if (domCleanup === "teardown") getRuntimeRenderer().teardownNodeSubtree(removedDom);
|
|
122
233
|
}
|
|
123
234
|
forState.lastRemovedNodes.push(removedDom);
|
|
235
|
+
if (removedRange) forState.lastRemovedRanges.push(removedRange);
|
|
124
236
|
}
|
|
125
237
|
function renderFallbackScope(forState) {
|
|
126
238
|
if (forState.fallback == null || forState.fallback === false) {
|
|
@@ -129,21 +241,31 @@ function renderFallbackScope(forState) {
|
|
|
129
241
|
forState.orderedItems = [];
|
|
130
242
|
return [];
|
|
131
243
|
}
|
|
132
|
-
const fallbackScope = forState.fallbackScope ??
|
|
133
|
-
|
|
134
|
-
forState._enqueueBoundaryCommit();
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
enqueueForScopeUpdate(forState.parentInstance);
|
|
138
|
-
});
|
|
244
|
+
const fallbackScope = forState.fallbackScope ?? createForOwnedChildScope(forState, FOR_FALLBACK_SCOPE_KEY);
|
|
245
|
+
if (!forState.fallbackScope) forStatesByScope.set(fallbackScope, forState);
|
|
139
246
|
forState.fallbackScope = fallbackScope;
|
|
140
|
-
|
|
247
|
+
captureForFallbackTransactionSnapshot(forState, fallbackScope);
|
|
248
|
+
const fallbackVNode = forState.fallback;
|
|
249
|
+
const vnode = fallbackScope.render(() => fallbackVNode);
|
|
141
250
|
forState.orderedVNodes = vnode == null || vnode === false ? [] : [vnode];
|
|
142
251
|
forState.orderedItems = [];
|
|
143
252
|
return forState.orderedVNodes;
|
|
144
253
|
}
|
|
145
254
|
function disposeAllItems(forState, domCleanup) {
|
|
146
255
|
const { items, orderedKeys } = forState;
|
|
256
|
+
if (forState._transaction?.collectionSnapshotMode === "preserve-clear") {
|
|
257
|
+
const transaction = forState._transaction;
|
|
258
|
+
transaction.removeAllItems = true;
|
|
259
|
+
for (let index = 0; index < forState.orderedItems.length; index++) {
|
|
260
|
+
const removedDom = forState.orderedItems[index]?.scope.dom;
|
|
261
|
+
if (removedDom) forState.lastRemovedNodes.push(removedDom);
|
|
262
|
+
const range = forState.orderedItems[index]?.scope.range;
|
|
263
|
+
if (range) forState.lastRemovedRanges.push(range);
|
|
264
|
+
}
|
|
265
|
+
forState.items = /* @__PURE__ */ new Map();
|
|
266
|
+
forState.orderedKeys = [];
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
147
269
|
for (let index = 0; index < orderedKeys.length; index += 1) {
|
|
148
270
|
const key = orderedKeys[index];
|
|
149
271
|
const itemInstance = items.get(key);
|
|
@@ -155,6 +277,4 @@ function disposeAllItems(forState, domCleanup) {
|
|
|
155
277
|
forState.orderedKeys = orderedKeys;
|
|
156
278
|
}
|
|
157
279
|
//#endregion
|
|
158
|
-
export { createItemInstance, disposeAllItems, disposeFallbackScope, disposeItemInstance, renderFallbackScope, syncForItemIndex, updateItemInstance };
|
|
159
|
-
|
|
160
|
-
//# sourceMappingURL=for-scopes.js.map
|
|
280
|
+
export { captureForFallbackTransactionSnapshot, captureForItemTransactionSnapshot, createItemInstance, disposeAllItems, disposeFallbackScope, disposeItemInstance, renderFallbackScope, syncForItemIndex, updateItemInstance };
|
|
@@ -15,16 +15,25 @@ type ForIndexSignal = ReadableSource<number> & (() => number) & {
|
|
|
15
15
|
peek(): number;
|
|
16
16
|
set(newValue: number | ((prev: number) => number), notifyReaders?: boolean): void;
|
|
17
17
|
};
|
|
18
|
-
declare function notifyForSignalReaders(source: ReadableSource<unknown>, skipInstance?: ComponentInstance | null): void;
|
|
18
|
+
declare function notifyForSignalReaders(source: ReadableSource<unknown>, skipInstance?: ComponentInstance | null, skipOwnedBy?: ComponentInstance | null): void;
|
|
19
19
|
declare function createForIndexSignal(initialIndex: number): ForIndexSignal;
|
|
20
20
|
declare function syncForIndexSignal(indexSignal: ForIndexSignal, nextIndex: number): boolean;
|
|
21
21
|
declare function createForItemSignal<T>(initialItem: T): ForItemSignal<T>;
|
|
22
22
|
declare function readForItemProperty(item: unknown, prop: PropertyKey): unknown;
|
|
23
23
|
declare function haveSameOwnKeys(previousItem: unknown, nextItem: unknown): boolean;
|
|
24
24
|
declare function scopeReadsSource(scope: ChildScope, source: ReadableSource<unknown>): boolean;
|
|
25
|
+
declare function scopeDirectlyReadsSource(scope: ChildScope, source: ReadableSource<unknown>): boolean;
|
|
25
26
|
declare function removeForParentReaders(parentInstance: ComponentInstance | null, source: ReadableSource<unknown>): void;
|
|
26
27
|
declare function canProxyForItem(item: unknown): item is object;
|
|
27
|
-
|
|
28
|
+
interface ReactiveForItemState<T> {
|
|
29
|
+
currentItem: T;
|
|
30
|
+
itemSignal: ForItemSignal<T> | null;
|
|
31
|
+
propertySignals: Map<PropertyKey, ForItemPropertySignal> | null;
|
|
32
|
+
coalescedProperties: PropertyKey | PropertyKey[] | null;
|
|
33
|
+
coalescedProperty2: PropertyKey | null;
|
|
34
|
+
wholeItemRead: boolean;
|
|
35
|
+
proxy: T;
|
|
36
|
+
}
|
|
37
|
+
declare function createReactiveForItem<T>(item: T): ReactiveForItemState<T>;
|
|
28
38
|
//#endregion
|
|
29
|
-
export { ForIndexSignal, ForItemPropertySignal, ForItemSignal };
|
|
30
|
-
//# sourceMappingURL=for-signals.d.ts.map
|
|
39
|
+
export { ForIndexSignal, ForItemPropertySignal, ForItemSignal, ReactiveForItemState };
|