@askrjs/askr 0.0.51 → 0.0.53
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/README.md +5 -1
- package/dist/{runtime/scheduler.js → access-Bg4RJNC8.js} +190 -20
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/index.js +103 -0
- package/dist/{common/attr-names.js → attr-names-CjhzmHOn.js} +1 -3
- package/dist/benchmark.d.ts +7 -4
- package/dist/benchmark.js +63 -13
- package/dist/boot/index.d.ts +62 -4
- package/dist/boot/index.js +1 -194
- package/dist/boot-j2KoN6ss.js +647 -0
- package/dist/cleanup-COv77su2.js +487 -0
- package/dist/component-internal-B3z7GXlD.js +614 -0
- package/dist/component-lifecycle-CO4hXlP4.js +357 -0
- package/dist/{runtime/component-scope.js → component-scope-CC3cojX9.js} +35 -9
- package/dist/component-scope-CvPba6O6.d.ts +12 -0
- package/dist/components/index.d.ts +17 -2
- package/dist/components/index.js +39 -1
- package/dist/compose-ref-Cc_YkUpM.js +92 -0
- package/dist/{foundations/utilities/compose-ref.d.ts → compose-ref-Cizq72-x.d.ts} +1 -2
- package/dist/control/index.d.ts +1 -3
- package/dist/control/index.js +1 -3
- package/dist/control-BQvNVfAd.d.ts +436 -0
- package/dist/control-BYyLTFyw.js +165 -0
- package/dist/control-Bf4Wkdvv.d.ts +9 -0
- package/dist/{common/control.js → control-DhFRTIoE.js} +1 -3
- package/dist/data/index.d.ts +2 -6
- package/dist/data/index.js +4 -5
- package/dist/data-DnxnDxD-.js +559 -0
- package/dist/{data/data-runtime.js → data-runtime-SJ1BSUvk.js} +35 -36
- package/dist/deferred-lKE8uR0z.js +386 -0
- package/dist/effect-BwnIvLah.js +260 -0
- package/dist/fastlane-Dw8SOBr9.js +343 -0
- package/dist/for-internal-BKf_Tnv1.js +1563 -0
- package/dist/foundations/icon/index.d.ts +68 -2
- package/dist/foundations/icon/index.js +85 -1
- package/dist/foundations/index.d.ts +2 -5
- package/dist/foundations/index.js +2 -5
- package/dist/foundations/interactions/index.d.ts +264 -6
- package/dist/foundations/interactions/index.js +1 -6
- package/dist/foundations/state/index.d.ts +32 -1
- package/dist/foundations/state/index.js +78 -1
- package/dist/foundations/structures/index.d.ts +2 -7
- package/dist/foundations/structures/index.js +2 -7
- package/dist/foundations/utilities/index.d.ts +2 -6
- package/dist/foundations/utilities/index.js +2 -5
- package/dist/fx/index.d.ts +190 -3
- package/dist/fx/index.js +454 -4
- package/dist/index-31Uoz_NS.d.ts +239 -0
- package/dist/index-Bki2rqcr.d.ts +233 -0
- package/dist/index-BnU0NPwM.d.ts +101 -0
- package/dist/index-D73jgYx1.d.ts +48 -0
- package/dist/{runtime/runtime.d.ts → index-R2JJIbM-.d.ts} +31 -9
- package/dist/index-SJXJkssx.d.ts +44 -0
- package/dist/index.d.ts +8 -13
- package/dist/index.js +150 -17
- package/dist/interactions-w7gQN4ha.js +280 -0
- package/dist/{data/invalidation-listeners.js → invalidation-listeners-Des3AHYs.js} +1 -3
- package/dist/{common/props.d.ts → jsx-CP0gmYwJ.d.ts} +17 -6
- package/dist/{common/jsx.js → jsx-CUpRxrLH.js} +1 -3
- package/dist/jsx-dev-runtime.d.ts +17 -5
- package/dist/jsx-dev-runtime.js +3 -10
- package/dist/jsx-runtime-92bV2hSa.d.ts +34 -0
- package/dist/jsx-runtime-BVVgDSdq.d.ts +1 -0
- package/dist/jsx-runtime.d.ts +3 -22
- package/dist/jsx-runtime.js +17 -20
- package/dist/{runtime/lifecycle-operations.js → lifecycle-operations-D9va7GOU.js} +9 -11
- package/dist/navigate-BVDCzOuB.d.ts +34 -0
- package/dist/navigate-CmPLSXyw.js +1449 -0
- package/dist/{runtime/portal.js → portal-CyU3Ucf2.js} +124 -35
- package/dist/query-registry-CQIT4mXr.js +73 -0
- package/dist/{common/render-context.js → render-context-Clw3rFiO.js} +14 -8
- package/dist/renderer-DzPjeLby.js +6197 -0
- package/dist/resource-operation-CEzfpnDk.js +276 -0
- package/dist/resources/index.d.ts +42 -3
- package/dist/resources/index.js +3 -4
- package/dist/{common/route-activity.js → route-activity-CNJfpwx-.js} +1 -3
- package/dist/route-matching-vJpvLVbX.js +515 -0
- package/dist/router/index.d.ts +166 -14
- package/dist/router/index.js +150 -12
- package/dist/{common/router.d.ts → router-CeYvjj5_.d.ts} +72 -29
- package/dist/{common/router-internal.js → router-internal-BC0w1_xk.js} +1 -3
- package/dist/{runtime/scheduler.d.ts → scheduler-CmLO4Dfm.d.ts} +1 -4
- package/dist/{runtime/selector.js → selector-DafVYzV4.js} +35 -20
- package/dist/{runtime/snapshot-source.js → snapshot-source-BB42xgwb.js} +1 -3
- package/dist/ssg/index.d.ts +252 -4
- package/dist/ssg/index.js +857 -1
- package/dist/ssr/index.d.ts +225 -8
- package/dist/ssr/index.js +3 -6
- package/dist/{common/ssr.js → ssr-CbQO5xd3.js} +1 -3
- package/dist/ssr-D3t80Rc0.js +1413 -0
- package/dist/{runtime/state.js → state-DPl8lffD.js} +4 -8
- package/dist/structures-DUB3HchX.js +221 -0
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing/index.js +2 -7
- package/dist/{jsx/types.d.ts → types-DnQVG4ZY.d.ts} +2 -6
- package/dist/{foundations/utilities/use-id.js → utilities-C_CGX4Dz.js} +1 -3
- package/dist/{ssr/verify-hydration.js → verify-hydration-io9ahUeq.js} +2 -4
- package/dist/{common/vnode.js → vnode-CGMJYPMB.js} +2 -4
- package/package.json +63 -45
- package/dist/bench/components/benchmark-row.d.ts +0 -20
- package/dist/bench/components/benchmark-row.d.ts.map +0 -1
- package/dist/bench/components/benchmark-row.js +0 -42
- package/dist/bench/components/benchmark-row.js.map +0 -1
- package/dist/bench/components/benchmark-table.js +0 -25
- 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 +0 -28
- package/dist/bin/askr-ssg.d.ts.map +0 -1
- package/dist/bin/askr-ssg.js +0 -171
- package/dist/bin/askr-ssg.js.map +0 -1
- package/dist/boot/hydration.js +0 -140
- 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 +0 -15
- package/dist/boot/root-lifecycle.d.ts.map +0 -1
- package/dist/boot/root-lifecycle.js +0 -205
- package/dist/boot/root-lifecycle.js.map +0 -1
- package/dist/boot/route-startup.js +0 -45
- package/dist/boot/route-startup.js.map +0 -1
- package/dist/boot/types.d.ts +0 -62
- package/dist/boot/types.d.ts.map +0 -1
- package/dist/common/attr-names.js.map +0 -1
- package/dist/common/component.d.ts +0 -19
- package/dist/common/component.d.ts.map +0 -1
- package/dist/common/control.d.ts +0 -13
- package/dist/common/control.d.ts.map +0 -1
- package/dist/common/control.js.map +0 -1
- package/dist/common/env.js +0 -47
- package/dist/common/env.js.map +0 -1
- package/dist/common/error-boundary.d.ts +0 -16
- package/dist/common/error-boundary.d.ts.map +0 -1
- package/dist/common/invariant.js +0 -17
- package/dist/common/invariant.js.map +0 -1
- package/dist/common/jsx.d.ts +0 -23
- package/dist/common/jsx.d.ts.map +0 -1
- package/dist/common/jsx.js.map +0 -1
- package/dist/common/logger.js +0 -36
- package/dist/common/logger.js.map +0 -1
- package/dist/common/promise.js +0 -8
- 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 +0 -11
- package/dist/common/ssr-errors.d.ts.map +0 -1
- package/dist/common/ssr-errors.js +0 -16
- package/dist/common/ssr-errors.js.map +0 -1
- package/dist/common/ssr.d.ts +0 -42
- package/dist/common/ssr.d.ts.map +0 -1
- package/dist/common/ssr.js.map +0 -1
- package/dist/common/vnode.d.ts +0 -22
- package/dist/common/vnode.d.ts.map +0 -1
- package/dist/common/vnode.js.map +0 -1
- package/dist/components/error-boundary.d.ts +0 -15
- package/dist/components/error-boundary.d.ts.map +0 -1
- package/dist/components/error-boundary.js +0 -43
- package/dist/components/error-boundary.js.map +0 -1
- package/dist/components/link.d.ts +0 -68
- package/dist/components/link.d.ts.map +0 -1
- package/dist/components/link.js +0 -76
- package/dist/components/link.js.map +0 -1
- package/dist/control/case.d.ts +0 -19
- package/dist/control/case.d.ts.map +0 -1
- package/dist/control/case.js +0 -70
- package/dist/control/case.js.map +0 -1
- package/dist/control/for.d.ts +0 -24
- package/dist/control/for.d.ts.map +0 -1
- package/dist/control/for.js +0 -63
- package/dist/control/for.js.map +0 -1
- package/dist/control/shared.d.ts +0 -9
- package/dist/control/shared.d.ts.map +0 -1
- package/dist/control/shared.js +0 -20
- package/dist/control/shared.js.map +0 -1
- package/dist/control/show.d.ts +0 -15
- package/dist/control/show.d.ts.map +0 -1
- package/dist/control/show.js +0 -34
- package/dist/control/show.js.map +0 -1
- package/dist/data/data-runtime.d.ts +0 -28
- 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 +0 -9
- package/dist/data/invalidation.d.ts.map +0 -1
- package/dist/data/invalidation.js +0 -27
- package/dist/data/invalidation.js.map +0 -1
- package/dist/data/mutation-cell.d.ts +0 -28
- package/dist/data/mutation-cell.d.ts.map +0 -1
- package/dist/data/mutation-cell.js +0 -132
- package/dist/data/mutation-cell.js.map +0 -1
- package/dist/data/query-cell.d.ts +0 -46
- package/dist/data/query-cell.d.ts.map +0 -1
- package/dist/data/query-cell.js +0 -290
- package/dist/data/query-cell.js.map +0 -1
- package/dist/data/query-key.js +0 -42
- package/dist/data/query-key.js.map +0 -1
- package/dist/data/shared.js +0 -21
- package/dist/data/shared.js.map +0 -1
- package/dist/data/testing.js +0 -2
- package/dist/data/types.d.ts +0 -161
- package/dist/data/types.d.ts.map +0 -1
- package/dist/foundations/icon/icon.d.ts +0 -53
- package/dist/foundations/icon/icon.d.ts.map +0 -1
- package/dist/foundations/icon/icon.js +0 -88
- package/dist/foundations/icon/icon.js.map +0 -1
- package/dist/foundations/icon/icon.types.d.ts +0 -22
- package/dist/foundations/icon/icon.types.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.d.ts +0 -72
- package/dist/foundations/interactions/dismissable.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.js +0 -26
- package/dist/foundations/interactions/dismissable.js.map +0 -1
- package/dist/foundations/interactions/focusable.d.ts +0 -22
- package/dist/foundations/interactions/focusable.d.ts.map +0 -1
- package/dist/foundations/interactions/focusable.js +0 -18
- package/dist/foundations/interactions/focusable.js.map +0 -1
- package/dist/foundations/interactions/hoverable.d.ts +0 -26
- package/dist/foundations/interactions/hoverable.d.ts.map +0 -1
- package/dist/foundations/interactions/hoverable.js +0 -15
- package/dist/foundations/interactions/hoverable.js.map +0 -1
- package/dist/foundations/interactions/interaction-policy.d.ts +0 -50
- package/dist/foundations/interactions/interaction-policy.d.ts.map +0 -1
- package/dist/foundations/interactions/interaction-policy.js +0 -122
- package/dist/foundations/interactions/interaction-policy.js.map +0 -1
- package/dist/foundations/interactions/pressable.d.ts +0 -61
- package/dist/foundations/interactions/pressable.d.ts.map +0 -1
- package/dist/foundations/interactions/pressable.js +0 -51
- package/dist/foundations/interactions/pressable.js.map +0 -1
- package/dist/foundations/interactions/roving-focus.d.ts +0 -52
- package/dist/foundations/interactions/roving-focus.d.ts.map +0 -1
- package/dist/foundations/interactions/roving-focus.js +0 -71
- package/dist/foundations/interactions/roving-focus.js.map +0 -1
- package/dist/foundations/state/controllable.d.ts +0 -33
- package/dist/foundations/state/controllable.d.ts.map +0 -1
- package/dist/foundations/state/controllable.js +0 -82
- package/dist/foundations/state/controllable.js.map +0 -1
- package/dist/foundations/structures/collection.d.ts +0 -52
- package/dist/foundations/structures/collection.d.ts.map +0 -1
- package/dist/foundations/structures/collection.js +0 -51
- package/dist/foundations/structures/collection.js.map +0 -1
- package/dist/foundations/structures/layer.d.ts +0 -81
- package/dist/foundations/structures/layer.d.ts.map +0 -1
- package/dist/foundations/structures/layer.js +0 -81
- package/dist/foundations/structures/layer.js.map +0 -1
- package/dist/foundations/structures/layout.d.ts +0 -33
- package/dist/foundations/structures/layout.d.ts.map +0 -1
- package/dist/foundations/structures/layout.js +0 -13
- package/dist/foundations/structures/layout.js.map +0 -1
- package/dist/foundations/structures/portal.d.ts +0 -2
- package/dist/foundations/structures/portal.js +0 -3
- package/dist/foundations/structures/presence.d.ts +0 -37
- package/dist/foundations/structures/presence.d.ts.map +0 -1
- package/dist/foundations/structures/presence.js +0 -39
- package/dist/foundations/structures/presence.js.map +0 -1
- package/dist/foundations/structures/slot.d.ts +0 -35
- package/dist/foundations/structures/slot.d.ts.map +0 -1
- package/dist/foundations/structures/slot.js +0 -41
- package/dist/foundations/structures/slot.js.map +0 -1
- package/dist/foundations/utilities/aria.d.ts +0 -16
- package/dist/foundations/utilities/aria.d.ts.map +0 -1
- package/dist/foundations/utilities/aria.js +0 -17
- package/dist/foundations/utilities/aria.js.map +0 -1
- package/dist/foundations/utilities/compose-handlers.d.ts +0 -37
- package/dist/foundations/utilities/compose-handlers.d.ts.map +0 -1
- package/dist/foundations/utilities/compose-handlers.js +0 -20
- 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 +0 -18
- package/dist/foundations/utilities/compose-ref.js.map +0 -1
- package/dist/foundations/utilities/event-types.d.ts +0 -20
- package/dist/foundations/utilities/event-types.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.d.ts +0 -5
- package/dist/foundations/utilities/merge-props.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.js +0 -49
- package/dist/foundations/utilities/merge-props.js.map +0 -1
- package/dist/foundations/utilities/use-id.d.ts +0 -32
- 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 +0 -33
- package/dist/fx/fx.d.ts.map +0 -1
- package/dist/fx/fx.js +0 -213
- package/dist/fx/fx.js.map +0 -1
- package/dist/fx/noop.js +0 -9
- package/dist/fx/noop.js.map +0 -1
- package/dist/fx/timing.d.ts +0 -159
- package/dist/fx/timing.d.ts.map +0 -1
- package/dist/fx/timing.js +0 -243
- package/dist/fx/timing.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/jsx/index.d.ts +0 -2
- package/dist/jsx/index.js +0 -4
- package/dist/jsx/types.d.ts.map +0 -1
- package/dist/jsx/types.js +0 -2
- package/dist/jsx/utils.d.ts +0 -5
- package/dist/jsx/utils.d.ts.map +0 -1
- package/dist/jsx/utils.js +0 -19
- 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/jsx-runtime2.d.ts +0 -3
- package/dist/jsx-runtime2.js +0 -4
- package/dist/renderer/attributes.js +0 -232
- package/dist/renderer/attributes.js.map +0 -1
- package/dist/renderer/boundaries.js +0 -266
- package/dist/renderer/boundaries.js.map +0 -1
- package/dist/renderer/child-shape.js +0 -85
- package/dist/renderer/child-shape.js.map +0 -1
- package/dist/renderer/children-fastpath.js +0 -149
- package/dist/renderer/children-fastpath.js.map +0 -1
- package/dist/renderer/children.js +0 -160
- package/dist/renderer/children.js.map +0 -1
- package/dist/renderer/cleanup.js +0 -210
- package/dist/renderer/cleanup.js.map +0 -1
- package/dist/renderer/component-host-cleanup.js +0 -68
- package/dist/renderer/component-host-cleanup.js.map +0 -1
- package/dist/renderer/component-host-instances.js +0 -65
- package/dist/renderer/component-host-instances.js.map +0 -1
- package/dist/renderer/component-host.js +0 -247
- package/dist/renderer/component-host.js.map +0 -1
- package/dist/renderer/dom-host.js +0 -13
- package/dist/renderer/dom-host.js.map +0 -1
- package/dist/renderer/dom-internal.js +0 -186
- package/dist/renderer/dom-internal.js.map +0 -1
- package/dist/renderer/dom.js +0 -10
- package/dist/renderer/element-children.js +0 -279
- package/dist/renderer/element-children.js.map +0 -1
- package/dist/renderer/env.js +0 -2
- package/dist/renderer/error-boundary-dom.js +0 -78
- package/dist/renderer/error-boundary-dom.js.map +0 -1
- package/dist/renderer/evaluate-dom-range.js +0 -85
- package/dist/renderer/evaluate-dom-range.js.map +0 -1
- package/dist/renderer/evaluate-reconcile.js +0 -282
- package/dist/renderer/evaluate-reconcile.js.map +0 -1
- package/dist/renderer/evaluate.js +0 -84
- package/dist/renderer/evaluate.js.map +0 -1
- package/dist/renderer/fastpath.js +0 -150
- package/dist/renderer/fastpath.js.map +0 -1
- package/dist/renderer/for-commit-dom-map.js +0 -83
- package/dist/renderer/for-commit-dom-map.js.map +0 -1
- package/dist/renderer/for-commit-removal.js +0 -36
- package/dist/renderer/for-commit-removal.js.map +0 -1
- package/dist/renderer/for-commit-reorder.js +0 -89
- package/dist/renderer/for-commit-reorder.js.map +0 -1
- package/dist/renderer/for-commit.js +0 -314
- package/dist/renderer/for-commit.js.map +0 -1
- package/dist/renderer/index.js +0 -38
- package/dist/renderer/index.js.map +0 -1
- package/dist/renderer/keyed-children.js +0 -32
- package/dist/renderer/keyed-children.js.map +0 -1
- package/dist/renderer/keyed.js +0 -167
- package/dist/renderer/keyed.js.map +0 -1
- package/dist/renderer/namespaces.js +0 -23
- package/dist/renderer/namespaces.js.map +0 -1
- package/dist/renderer/prop-bindings.js +0 -280
- package/dist/renderer/prop-bindings.js.map +0 -1
- package/dist/renderer/reactive-child-dom.js +0 -133
- package/dist/renderer/reactive-child-dom.js.map +0 -1
- package/dist/renderer/reactive-child-sources.js +0 -184
- package/dist/renderer/reactive-child-sources.js.map +0 -1
- package/dist/renderer/reactive-children.js +0 -294
- package/dist/renderer/reactive-children.js.map +0 -1
- package/dist/renderer/reconcile-commit.js +0 -38
- package/dist/renderer/reconcile-commit.js.map +0 -1
- package/dist/renderer/reconcile-fastpaths.js +0 -107
- package/dist/renderer/reconcile-fastpaths.js.map +0 -1
- package/dist/renderer/reconcile-resolution.js +0 -187
- package/dist/renderer/reconcile-resolution.js.map +0 -1
- package/dist/renderer/reconcile.js +0 -39
- package/dist/renderer/reconcile.js.map +0 -1
- package/dist/renderer/retained-element-rollback.js +0 -277
- package/dist/renderer/retained-element-rollback.js.map +0 -1
- package/dist/renderer/stable-patch.js +0 -81
- package/dist/renderer/stable-patch.js.map +0 -1
- package/dist/renderer/static-reuse.js +0 -96
- package/dist/renderer/static-reuse.js.map +0 -1
- package/dist/renderer/types.js +0 -2
- package/dist/renderer/utils.js +0 -256
- package/dist/renderer/utils.js.map +0 -1
- package/dist/router/access.js +0 -36
- package/dist/router/access.js.map +0 -1
- package/dist/router/activity.d.ts +0 -10
- package/dist/router/activity.d.ts.map +0 -1
- package/dist/router/activity.js +0 -87
- package/dist/router/activity.js.map +0 -1
- package/dist/router/authoring.d.ts +0 -22
- package/dist/router/authoring.d.ts.map +0 -1
- package/dist/router/authoring.js +0 -198
- package/dist/router/authoring.js.map +0 -1
- package/dist/router/internal-types.d.ts +0 -31
- package/dist/router/internal-types.d.ts.map +0 -1
- package/dist/router/lazy.d.ts +0 -19
- package/dist/router/lazy.d.ts.map +0 -1
- package/dist/router/lazy.js +0 -52
- package/dist/router/lazy.js.map +0 -1
- package/dist/router/manifest.d.ts +0 -10
- package/dist/router/manifest.d.ts.map +0 -1
- package/dist/router/manifest.js +0 -49
- package/dist/router/manifest.js.map +0 -1
- package/dist/router/match.js +0 -122
- package/dist/router/match.js.map +0 -1
- package/dist/router/navigate.d.ts +0 -11
- package/dist/router/navigate.d.ts.map +0 -1
- package/dist/router/navigate.js +0 -76
- package/dist/router/navigate.js.map +0 -1
- package/dist/router/navigation-registry.d.ts +0 -32
- package/dist/router/navigation-registry.d.ts.map +0 -1
- package/dist/router/navigation-registry.js +0 -105
- package/dist/router/navigation-registry.js.map +0 -1
- package/dist/router/navigation-scroll.d.ts +0 -14
- package/dist/router/navigation-scroll.d.ts.map +0 -1
- package/dist/router/navigation-scroll.js +0 -93
- package/dist/router/navigation-scroll.js.map +0 -1
- package/dist/router/navigation-targets.d.ts +0 -31
- package/dist/router/navigation-targets.d.ts.map +0 -1
- package/dist/router/navigation-targets.js +0 -255
- package/dist/router/navigation-targets.js.map +0 -1
- package/dist/router/policy.d.ts +0 -28
- package/dist/router/policy.d.ts.map +0 -1
- package/dist/router/policy.js +0 -132
- package/dist/router/policy.js.map +0 -1
- package/dist/router/rendering.d.ts +0 -10
- package/dist/router/rendering.d.ts.map +0 -1
- package/dist/router/rendering.js +0 -46
- package/dist/router/rendering.js.map +0 -1
- package/dist/router/resolution.d.ts +0 -4
- package/dist/router/resolution.d.ts.map +0 -1
- package/dist/router/resolution.js +0 -86
- package/dist/router/resolution.js.map +0 -1
- package/dist/router/route-context.js +0 -79
- package/dist/router/route-context.js.map +0 -1
- package/dist/router/route-matching.d.ts +0 -20
- package/dist/router/route-matching.d.ts.map +0 -1
- package/dist/router/route-matching.js +0 -175
- package/dist/router/route-matching.js.map +0 -1
- package/dist/router/route-query.d.ts +0 -17
- package/dist/router/route-query.d.ts.map +0 -1
- package/dist/router/route-query.js +0 -47
- package/dist/router/route-query.js.map +0 -1
- package/dist/router/route.d.ts +0 -8
- package/dist/router/route.js +0 -10
- package/dist/router/store.d.ts +0 -50
- package/dist/router/store.d.ts.map +0 -1
- package/dist/router/store.js +0 -171
- package/dist/router/store.js.map +0 -1
- package/dist/router/testing.js +0 -4
- package/dist/runtime/access.d.ts +0 -20
- package/dist/runtime/access.d.ts.map +0 -1
- package/dist/runtime/access.js +0 -45
- package/dist/runtime/access.js.map +0 -1
- package/dist/runtime/child-scope.d.ts +0 -22
- package/dist/runtime/child-scope.d.ts.map +0 -1
- package/dist/runtime/child-scope.js +0 -87
- package/dist/runtime/child-scope.js.map +0 -1
- package/dist/runtime/component-cleanup.d.ts +0 -16
- package/dist/runtime/component-cleanup.d.ts.map +0 -1
- package/dist/runtime/component-cleanup.js +0 -70
- package/dist/runtime/component-cleanup.js.map +0 -1
- package/dist/runtime/component-commit.js +0 -165
- package/dist/runtime/component-commit.js.map +0 -1
- package/dist/runtime/component-facade.d.ts +0 -5
- package/dist/runtime/component-facade.js +0 -4
- package/dist/runtime/component-internal.d.ts +0 -100
- package/dist/runtime/component-internal.d.ts.map +0 -1
- package/dist/runtime/component-internal.js +0 -219
- package/dist/runtime/component-internal.js.map +0 -1
- package/dist/runtime/component-lifecycle.d.ts +0 -49
- package/dist/runtime/component-lifecycle.d.ts.map +0 -1
- package/dist/runtime/component-lifecycle.js +0 -176
- package/dist/runtime/component-lifecycle.js.map +0 -1
- package/dist/runtime/component-scope.d.ts +0 -55
- package/dist/runtime/component-scope.d.ts.map +0 -1
- package/dist/runtime/component-scope.js.map +0 -1
- package/dist/runtime/component.d.ts +0 -5
- package/dist/runtime/component.js +0 -5
- package/dist/runtime/context.d.ts +0 -69
- package/dist/runtime/context.d.ts.map +0 -1
- package/dist/runtime/context.js +0 -210
- package/dist/runtime/context.js.map +0 -1
- package/dist/runtime/control.d.ts +0 -43
- package/dist/runtime/control.d.ts.map +0 -1
- package/dist/runtime/control.js +0 -126
- package/dist/runtime/control.js.map +0 -1
- package/dist/runtime/derive.d.ts +0 -17
- package/dist/runtime/derive.d.ts.map +0 -1
- package/dist/runtime/derive.js +0 -142
- package/dist/runtime/derive.js.map +0 -1
- package/dist/runtime/dev-namespace.d.ts +0 -31
- package/dist/runtime/dev-namespace.d.ts.map +0 -1
- package/dist/runtime/dev-namespace.js +0 -57
- package/dist/runtime/dev-namespace.js.map +0 -1
- package/dist/runtime/effect.d.ts +0 -32
- package/dist/runtime/effect.d.ts.map +0 -1
- package/dist/runtime/effect.js +0 -177
- package/dist/runtime/effect.js.map +0 -1
- package/dist/runtime/error-boundary.d.ts +0 -5
- package/dist/runtime/error-boundary.d.ts.map +0 -1
- package/dist/runtime/error-boundary.js +0 -31
- package/dist/runtime/error-boundary.js.map +0 -1
- package/dist/runtime/events.d.ts +0 -58
- package/dist/runtime/events.d.ts.map +0 -1
- package/dist/runtime/events.js +0 -204
- package/dist/runtime/events.js.map +0 -1
- package/dist/runtime/execution-model.d.ts +0 -7
- package/dist/runtime/execution-model.d.ts.map +0 -1
- package/dist/runtime/execution-model.js +0 -15
- package/dist/runtime/execution-model.js.map +0 -1
- package/dist/runtime/fastlane.d.ts +0 -34
- package/dist/runtime/fastlane.d.ts.map +0 -1
- package/dist/runtime/fastlane.js +0 -175
- package/dist/runtime/fastlane.js.map +0 -1
- package/dist/runtime/for-bench.d.ts +0 -41
- package/dist/runtime/for-bench.d.ts.map +0 -1
- package/dist/runtime/for-bench.js +0 -171
- package/dist/runtime/for-bench.js.map +0 -1
- package/dist/runtime/for-internal.d.ts +0 -43
- package/dist/runtime/for-internal.d.ts.map +0 -1
- package/dist/runtime/for-internal.js +0 -98
- package/dist/runtime/for-internal.js.map +0 -1
- package/dist/runtime/for-reconcile.d.ts +0 -8
- package/dist/runtime/for-reconcile.d.ts.map +0 -1
- package/dist/runtime/for-reconcile.js +0 -389
- package/dist/runtime/for-reconcile.js.map +0 -1
- package/dist/runtime/for-scopes.d.ts +0 -26
- package/dist/runtime/for-scopes.d.ts.map +0 -1
- package/dist/runtime/for-scopes.js +0 -160
- package/dist/runtime/for-scopes.js.map +0 -1
- package/dist/runtime/for-signals.d.ts +0 -30
- package/dist/runtime/for-signals.d.ts.map +0 -1
- package/dist/runtime/for-signals.js +0 -139
- package/dist/runtime/for-signals.js.map +0 -1
- package/dist/runtime/for-types.d.ts +0 -9
- package/dist/runtime/for-types.d.ts.map +0 -1
- package/dist/runtime/for.d.ts +0 -4
- package/dist/runtime/for.js +0 -5
- package/dist/runtime/index.d.ts +0 -24
- package/dist/runtime/index.js +0 -31
- package/dist/runtime/lifecycle-operations.d.ts +0 -31
- package/dist/runtime/lifecycle-operations.d.ts.map +0 -1
- package/dist/runtime/lifecycle-operations.js.map +0 -1
- package/dist/runtime/operations.d.ts +0 -3
- package/dist/runtime/operations.js +0 -3
- package/dist/runtime/perf-metrics.d.ts +0 -26
- package/dist/runtime/perf-metrics.d.ts.map +0 -1
- package/dist/runtime/perf-metrics.js +0 -70
- package/dist/runtime/perf-metrics.js.map +0 -1
- package/dist/runtime/portal.d.ts +0 -22
- package/dist/runtime/portal.d.ts.map +0 -1
- package/dist/runtime/portal.js.map +0 -1
- package/dist/runtime/readable.d.ts +0 -29
- package/dist/runtime/readable.d.ts.map +0 -1
- package/dist/runtime/readable.js +0 -159
- package/dist/runtime/readable.js.map +0 -1
- package/dist/runtime/resource-cell.js +0 -114
- package/dist/runtime/resource-cell.js.map +0 -1
- package/dist/runtime/resource-operation.d.ts +0 -13
- package/dist/runtime/resource-operation.d.ts.map +0 -1
- package/dist/runtime/resource-operation.js +0 -170
- package/dist/runtime/resource-operation.js.map +0 -1
- package/dist/runtime/runtime.d.ts.map +0 -1
- package/dist/runtime/runtime.js +0 -59
- 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 +0 -24
- package/dist/runtime/selector-store.js.map +0 -1
- package/dist/runtime/selector.d.ts +0 -11
- package/dist/runtime/selector.d.ts.map +0 -1
- package/dist/runtime/selector.js.map +0 -1
- package/dist/runtime/snapshot-source.d.ts +0 -10
- 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 +0 -55
- package/dist/runtime/state.d.ts.map +0 -1
- package/dist/runtime/state.js.map +0 -1
- package/dist/ssg/batch-render.js +0 -103
- package/dist/ssg/batch-render.js.map +0 -1
- package/dist/ssg/create-static-gen.d.ts +0 -64
- package/dist/ssg/create-static-gen.d.ts.map +0 -1
- package/dist/ssg/create-static-gen.js +0 -199
- package/dist/ssg/create-static-gen.js.map +0 -1
- package/dist/ssg/generate-metadata.js +0 -94
- package/dist/ssg/generate-metadata.js.map +0 -1
- package/dist/ssg/generation-plan.js +0 -70
- package/dist/ssg/generation-plan.js.map +0 -1
- package/dist/ssg/incremental-manifest.js +0 -56
- package/dist/ssg/incremental-manifest.js.map +0 -1
- package/dist/ssg/resolve-ssg-data.js +0 -105
- package/dist/ssg/resolve-ssg-data.js.map +0 -1
- package/dist/ssg/route-utils.js +0 -24
- package/dist/ssg/route-utils.js.map +0 -1
- package/dist/ssg/static-routes.js +0 -102
- package/dist/ssg/static-routes.js.map +0 -1
- package/dist/ssg/types.d.ts +0 -189
- package/dist/ssg/types.d.ts.map +0 -1
- package/dist/ssg/write-static-files.js +0 -73
- package/dist/ssg/write-static-files.js.map +0 -1
- package/dist/ssr/attrs.js +0 -94
- package/dist/ssr/attrs.js.map +0 -1
- package/dist/ssr/boundaries.js +0 -113
- package/dist/ssr/boundaries.js.map +0 -1
- package/dist/ssr/component-runtime.js +0 -111
- package/dist/ssr/component-runtime.js.map +0 -1
- package/dist/ssr/context.d.ts +0 -50
- package/dist/ssr/context.d.ts.map +0 -1
- package/dist/ssr/context.js +0 -91
- package/dist/ssr/context.js.map +0 -1
- package/dist/ssr/errors.d.ts +0 -10
- package/dist/ssr/errors.d.ts.map +0 -1
- package/dist/ssr/errors.js +0 -14
- package/dist/ssr/errors.js.map +0 -1
- package/dist/ssr/escape.js +0 -193
- package/dist/ssr/escape.js.map +0 -1
- package/dist/ssr/hydration-data.js +0 -10
- package/dist/ssr/hydration-data.js.map +0 -1
- package/dist/ssr/hydration-verify.d.ts +0 -12
- package/dist/ssr/hydration-verify.d.ts.map +0 -1
- package/dist/ssr/hydration-verify.js +0 -144
- package/dist/ssr/hydration-verify.js.map +0 -1
- package/dist/ssr/index-internal.d.ts +0 -15
- package/dist/ssr/index-internal.d.ts.map +0 -1
- package/dist/ssr/index-internal.js +0 -19
- package/dist/ssr/index-internal.js.map +0 -1
- package/dist/ssr/render-keys.js +0 -16
- package/dist/ssr/render-keys.js.map +0 -1
- package/dist/ssr/render-resolved.d.ts +0 -20
- package/dist/ssr/render-resolved.d.ts.map +0 -1
- package/dist/ssr/render-resolved.js +0 -35
- package/dist/ssr/render-resolved.js.map +0 -1
- package/dist/ssr/render-sync.d.ts +0 -21
- package/dist/ssr/render-sync.d.ts.map +0 -1
- package/dist/ssr/render-sync.js +0 -275
- package/dist/ssr/render-sync.js.map +0 -1
- package/dist/ssr/route-policy-resolution.js +0 -78
- package/dist/ssr/route-policy-resolution.js.map +0 -1
- package/dist/ssr/route-render.d.ts +0 -77
- package/dist/ssr/route-render.d.ts.map +0 -1
- package/dist/ssr/route-render.js +0 -120
- package/dist/ssr/route-render.js.map +0 -1
- package/dist/ssr/sink.d.ts +0 -26
- package/dist/ssr/sink.d.ts.map +0 -1
- package/dist/ssr/sink.js +0 -86
- package/dist/ssr/sink.js.map +0 -1
- package/dist/ssr/types.d.ts +0 -23
- package/dist/ssr/types.d.ts.map +0 -1
- package/dist/ssr/verify-hydration.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { __FOR_BOUNDARY__, _isDOMElement } from "../common/vnode.js";
|
|
2
|
-
import "./types.js";
|
|
3
|
-
import { getRuntimeEnv } from "../common/env.js";
|
|
4
|
-
import { logger } from "../common/logger.js";
|
|
5
|
-
import { Fragment } from "../common/jsx.js";
|
|
6
|
-
import { incDevCounter, setDevValue } from "../runtime/dev-namespace.js";
|
|
7
|
-
import { evaluateCaseState, evaluateShowState } from "../runtime/control.js";
|
|
8
|
-
import { evaluateForState } from "../runtime/for-internal.js";
|
|
9
|
-
import "../runtime/index.js";
|
|
10
|
-
import { elementListeners } from "./cleanup.js";
|
|
11
|
-
import "./env.js";
|
|
12
|
-
import { createWrappedHandler, extractKey, getEventListenerKey, getEventListenerOptions, parseEventProp, setRenderedAttribute, tagNamesEqualIgnoreCase as tagNamesEqualIgnoreCase$1, writeElementClassName } from "./utils.js";
|
|
13
|
-
import { keyedElements } from "./keyed.js";
|
|
14
|
-
import { createElementForNamespace, getParentNamespace } from "./namespaces.js";
|
|
15
|
-
import { commitForBoundaryChildren } from "./boundaries.js";
|
|
16
|
-
import { performBulkPositionalKeyedTextUpdate } from "./children-fastpath.js";
|
|
17
|
-
import { isBulkTextFastPathEligible, performBulkTextReplace } from "./children.js";
|
|
18
|
-
import { getRendererDOMHost } from "./dom-host.js";
|
|
19
|
-
import { reconcileKeyedChildren } from "./reconcile.js";
|
|
20
|
-
import { updateUnkeyedChildren } from "./element-children.js";
|
|
21
|
-
import { runRetainedElementUpdate } from "./retained-element-rollback.js";
|
|
22
|
-
//#region src/renderer/evaluate-reconcile.ts
|
|
23
|
-
function getRetainedHostOwnerChain(host, owner) {
|
|
24
|
-
const instances = host.__ASKR_INSTANCES ?? [];
|
|
25
|
-
const ownerIndex = instances.indexOf(owner);
|
|
26
|
-
return ownerIndex >= 0 ? instances.slice(ownerIndex) : [owner];
|
|
27
|
-
}
|
|
28
|
-
function retainHostOwnerChain(host, owner, retainedInstances) {
|
|
29
|
-
const componentHost = host;
|
|
30
|
-
const nextInstances = [...componentHost.__ASKR_INSTANCES ?? []];
|
|
31
|
-
for (const instance of retainedInstances) if (!nextInstances.includes(instance)) nextInstances.push(instance);
|
|
32
|
-
componentHost.__ASKR_INSTANCES = nextInstances;
|
|
33
|
-
componentHost.__ASKR_INSTANCE = owner;
|
|
34
|
-
}
|
|
35
|
-
function tagNamesEqualIgnoreCase(a, b) {
|
|
36
|
-
return tagNamesEqualIgnoreCase$1(a, b);
|
|
37
|
-
}
|
|
38
|
-
function checkSimpleText(vnodeChildren) {
|
|
39
|
-
if (!Array.isArray(vnodeChildren)) {
|
|
40
|
-
if (typeof vnodeChildren === "string" || typeof vnodeChildren === "number") return {
|
|
41
|
-
isSimple: true,
|
|
42
|
-
text: String(vnodeChildren)
|
|
43
|
-
};
|
|
44
|
-
} else if (vnodeChildren.length === 1) {
|
|
45
|
-
const child = vnodeChildren[0];
|
|
46
|
-
if (typeof child === "string" || typeof child === "number") return {
|
|
47
|
-
isSimple: true,
|
|
48
|
-
text: String(child)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return { isSimple: false };
|
|
52
|
-
}
|
|
53
|
-
function tryUpdateTextInPlace(element, text) {
|
|
54
|
-
if (element.childNodes.length === 1 && element.firstChild?.nodeType === 3) {
|
|
55
|
-
element.firstChild.data = text;
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
function buildKeyMapFromDOM(parent) {
|
|
61
|
-
const keyMap = /* @__PURE__ */ new Map();
|
|
62
|
-
for (let child = parent.firstElementChild; child; child = child.nextElementSibling) {
|
|
63
|
-
const k = child.getAttribute("data-key");
|
|
64
|
-
if (k !== null) {
|
|
65
|
-
keyMap.set(k, child);
|
|
66
|
-
const n = Number(k);
|
|
67
|
-
if (!Number.isNaN(n)) keyMap.set(n, child);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return keyMap;
|
|
71
|
-
}
|
|
72
|
-
function getOrBuildKeyMap(parent) {
|
|
73
|
-
let keyMap = keyedElements.get(parent);
|
|
74
|
-
if (!keyMap) {
|
|
75
|
-
keyMap = buildKeyMapFromDOM(parent);
|
|
76
|
-
if (keyMap.size > 0) keyedElements.set(parent, keyMap);
|
|
77
|
-
}
|
|
78
|
-
return keyMap.size > 0 ? keyMap : void 0;
|
|
79
|
-
}
|
|
80
|
-
function hasKeyedChildren(children) {
|
|
81
|
-
for (let i = 0; i < children.length; i++) if (extractKey(children[i]) !== void 0) return true;
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
function trackBulkTextStats(stats) {
|
|
85
|
-
if (getRuntimeEnv().NODE_ENV !== "production") try {
|
|
86
|
-
setDevValue("__LAST_BULK_TEXT_FASTPATH_STATS", stats);
|
|
87
|
-
incDevCounter("bulkTextHits");
|
|
88
|
-
} catch {}
|
|
89
|
-
}
|
|
90
|
-
function trackBulkTextMiss() {
|
|
91
|
-
if (getRuntimeEnv().NODE_ENV !== "production") try {
|
|
92
|
-
incDevCounter("bulkTextMisses");
|
|
93
|
-
} catch {}
|
|
94
|
-
}
|
|
95
|
-
function reconcileKeyed(parent, children, oldKeyMap) {
|
|
96
|
-
if (getRuntimeEnv().ASKR_FORCE_BULK_POSREUSE === "1") {
|
|
97
|
-
if (tryForcedBulkKeyedPath(parent, children)) return;
|
|
98
|
-
}
|
|
99
|
-
const newKeyMap = reconcileKeyedChildren(parent, children, oldKeyMap);
|
|
100
|
-
keyedElements.set(parent, newKeyMap);
|
|
101
|
-
}
|
|
102
|
-
function tryForcedBulkKeyedPath(parent, children) {
|
|
103
|
-
try {
|
|
104
|
-
const keyedVnodes = [];
|
|
105
|
-
for (const child of children) {
|
|
106
|
-
const key = extractKey(child);
|
|
107
|
-
if (_isDOMElement(child) && key !== void 0) keyedVnodes.push({
|
|
108
|
-
key,
|
|
109
|
-
vnode: child
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
if (keyedVnodes.length === 0 || keyedVnodes.length !== children.length) return false;
|
|
113
|
-
const fastPathEnv = getRuntimeEnv();
|
|
114
|
-
if (fastPathEnv.ASKR_FASTPATH_DEBUG === "1" || fastPathEnv.ASKR_FASTPATH_DEBUG === "true") logger.warn("[Askr][FASTPATH] forced positional bulk keyed reuse (evaluate-level)");
|
|
115
|
-
const stats = performBulkPositionalKeyedTextUpdate(parent, keyedVnodes);
|
|
116
|
-
const statsEnv = getRuntimeEnv();
|
|
117
|
-
if (statsEnv.NODE_ENV !== "production" || statsEnv.ASKR_FASTPATH_DEBUG === "1") try {
|
|
118
|
-
setDevValue("__LAST_FASTPATH_STATS", stats);
|
|
119
|
-
setDevValue("__LAST_FASTPATH_COMMIT_COUNT", 1);
|
|
120
|
-
incDevCounter("bulkKeyedPositionalForced");
|
|
121
|
-
} catch {}
|
|
122
|
-
const newMap = buildKeyMapFromDOM(parent);
|
|
123
|
-
keyedElements.set(parent, newMap);
|
|
124
|
-
return true;
|
|
125
|
-
} catch (err) {
|
|
126
|
-
const fallbackEnv = getRuntimeEnv();
|
|
127
|
-
if (fallbackEnv.ASKR_FASTPATH_DEBUG === "1" || fallbackEnv.ASKR_FASTPATH_DEBUG === "true") logger.warn("[Askr][FASTPATH] forced bulk path failed, falling back", err);
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function reconcileUnkeyed(parent, children) {
|
|
132
|
-
if (isBulkTextFastPathEligible(parent, children)) trackBulkTextStats(performBulkTextReplace(parent, children));
|
|
133
|
-
else {
|
|
134
|
-
trackBulkTextMiss();
|
|
135
|
-
updateUnkeyedChildren(parent, children);
|
|
136
|
-
}
|
|
137
|
-
keyedElements.delete(parent);
|
|
138
|
-
}
|
|
139
|
-
function updateForBoundaryChildren(element, forVnode) {
|
|
140
|
-
const controlState = forVnode._controlState ?? forVnode._forState;
|
|
141
|
-
if (!controlState) return;
|
|
142
|
-
commitForBoundaryChildren(element, controlState, controlState.kind === "for" ? evaluateForState(controlState) : controlState.kind === "show" ? evaluateShowState(controlState) : evaluateCaseState(controlState));
|
|
143
|
-
}
|
|
144
|
-
function updateElementChildren(element, vnodeChildren, cleanupRangeNode) {
|
|
145
|
-
const domHost = getRendererDOMHost();
|
|
146
|
-
if (vnodeChildren === null || vnodeChildren === void 0) {
|
|
147
|
-
for (let n = element.firstChild; n;) {
|
|
148
|
-
const next = n.nextSibling;
|
|
149
|
-
cleanupRangeNode(n);
|
|
150
|
-
n = next;
|
|
151
|
-
}
|
|
152
|
-
element.textContent = "";
|
|
153
|
-
keyedElements.delete(element);
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
if (!Array.isArray(vnodeChildren) && _isDOMElement(vnodeChildren) && vnodeChildren.type === __FOR_BOUNDARY__) {
|
|
157
|
-
updateForBoundaryChildren(element, vnodeChildren);
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (!Array.isArray(vnodeChildren) && isFragment(vnodeChildren)) {
|
|
161
|
-
updateElementChildren(element, getFragmentChildren(vnodeChildren), cleanupRangeNode);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
if (!Array.isArray(vnodeChildren)) {
|
|
165
|
-
for (let n = element.firstChild; n;) {
|
|
166
|
-
const next = n.nextSibling;
|
|
167
|
-
cleanupRangeNode(n);
|
|
168
|
-
n = next;
|
|
169
|
-
}
|
|
170
|
-
element.textContent = "";
|
|
171
|
-
const dom = domHost.createDOMNode(vnodeChildren);
|
|
172
|
-
if (dom) element.appendChild(dom);
|
|
173
|
-
keyedElements.delete(element);
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
if (vnodeChildren.length === 1 && _isDOMElement(vnodeChildren[0]) && vnodeChildren[0].type === __FOR_BOUNDARY__) {
|
|
177
|
-
updateForBoundaryChildren(element, vnodeChildren[0]);
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
if (hasKeyedChildren(vnodeChildren)) {
|
|
181
|
-
const oldKeyMap = getOrBuildKeyMap(element);
|
|
182
|
-
try {
|
|
183
|
-
reconcileKeyed(element, vnodeChildren, oldKeyMap);
|
|
184
|
-
} catch {
|
|
185
|
-
const newKeyMap = reconcileKeyedChildren(element, vnodeChildren, oldKeyMap);
|
|
186
|
-
keyedElements.set(element, newKeyMap);
|
|
187
|
-
}
|
|
188
|
-
} else reconcileUnkeyed(element, vnodeChildren);
|
|
189
|
-
}
|
|
190
|
-
function smartUpdateElement(element, vnode, cleanupRangeNode) {
|
|
191
|
-
const hadVNodeKey = Object.prototype.hasOwnProperty.call(vnode, "key");
|
|
192
|
-
const previousVNodeKey = vnode.key;
|
|
193
|
-
runRetainedElementUpdate(element, cleanupRangeNode, () => applySmartUpdateElement(element, vnode, cleanupRangeNode), () => {
|
|
194
|
-
if (hadVNodeKey) vnode.key = previousVNodeKey;
|
|
195
|
-
else delete vnode.key;
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function applySmartUpdateElement(element, vnode, cleanupRangeNode) {
|
|
199
|
-
const domHost = getRendererDOMHost();
|
|
200
|
-
if (vnode.key == null && element.hasAttribute("data-key")) {
|
|
201
|
-
const existingKey = element.getAttribute("data-key");
|
|
202
|
-
if (existingKey !== null) {
|
|
203
|
-
const numericKey = Number(existingKey);
|
|
204
|
-
vnode.key = Number.isNaN(numericKey) ? existingKey : numericKey;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
let vnodeChildren = vnode.props?.children ?? vnode.children;
|
|
208
|
-
if (vnodeChildren && _isDOMElement(vnodeChildren) && vnodeChildren.type === __FOR_BOUNDARY__) {
|
|
209
|
-
updateElementChildren(element, vnodeChildren, cleanupRangeNode);
|
|
210
|
-
domHost.updateElementFromVnode(element, vnode, false);
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
if (vnodeChildren && !Array.isArray(vnodeChildren)) vnodeChildren = [vnodeChildren];
|
|
214
|
-
const textCheck = checkSimpleText(vnodeChildren);
|
|
215
|
-
if (textCheck.isSimple && tryUpdateTextInPlace(element, textCheck.text)) {} else updateElementChildren(element, vnodeChildren, cleanupRangeNode);
|
|
216
|
-
domHost.updateElementFromVnode(element, vnode, false);
|
|
217
|
-
}
|
|
218
|
-
function processFragmentChildren(target, childArray, cleanupRangeNode) {
|
|
219
|
-
updateElementChildren(target, childArray, cleanupRangeNode);
|
|
220
|
-
}
|
|
221
|
-
function applyPropsToElement(el, props) {
|
|
222
|
-
for (const [key, value] of Object.entries(props)) {
|
|
223
|
-
if (key === "children" || key === "key") continue;
|
|
224
|
-
if (value === void 0 || value === null || value === false) continue;
|
|
225
|
-
if (key === "ref") {
|
|
226
|
-
applyRef(el, value);
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
const eventProp = parseEventProp(key);
|
|
230
|
-
if (eventProp) {
|
|
231
|
-
const { eventName, capture } = eventProp;
|
|
232
|
-
const wrappedHandler = createWrappedHandler(value, true);
|
|
233
|
-
const options = getEventListenerOptions(eventName, capture);
|
|
234
|
-
const listenerKey = getEventListenerKey(eventName, capture);
|
|
235
|
-
if (options !== void 0) el.addEventListener(eventName, wrappedHandler, options);
|
|
236
|
-
else el.addEventListener(eventName, wrappedHandler);
|
|
237
|
-
if (!elementListeners.has(el)) elementListeners.set(el, /* @__PURE__ */ new Map());
|
|
238
|
-
elementListeners.get(el).set(listenerKey, {
|
|
239
|
-
handler: wrappedHandler,
|
|
240
|
-
original: value,
|
|
241
|
-
eventName,
|
|
242
|
-
options
|
|
243
|
-
});
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
if (key === "class" || key === "className") writeElementClassName(el, String(value));
|
|
247
|
-
else if (key === "value" || key === "checked") el[key] = value;
|
|
248
|
-
else setRenderedAttribute(el, key, String(value));
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
function applyRef(el, ref) {
|
|
252
|
-
const r = ref;
|
|
253
|
-
if (!r) return;
|
|
254
|
-
if (typeof r === "function") {
|
|
255
|
-
r(el);
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
try {
|
|
259
|
-
r.current = el;
|
|
260
|
-
} catch {}
|
|
261
|
-
}
|
|
262
|
-
function tryFirstRenderKeyedChildren(target, vnode) {
|
|
263
|
-
const children = vnode.children;
|
|
264
|
-
if (!Array.isArray(children) || !hasKeyedChildren(children)) return false;
|
|
265
|
-
const el = createElementForNamespace(vnode.type, getParentNamespace(target));
|
|
266
|
-
target.appendChild(el);
|
|
267
|
-
applyPropsToElement(el, vnode.props || {});
|
|
268
|
-
const newKeyMap = reconcileKeyedChildren(el, children, void 0);
|
|
269
|
-
keyedElements.set(el, newKeyMap);
|
|
270
|
-
return true;
|
|
271
|
-
}
|
|
272
|
-
function isFragment(vnode) {
|
|
273
|
-
return _isDOMElement(vnode) && typeof vnode.type === "symbol" && (vnode.type === Fragment || String(vnode.type) === "Symbol(askr.fragment)");
|
|
274
|
-
}
|
|
275
|
-
function getFragmentChildren(vnode) {
|
|
276
|
-
const fragmentChildren = vnode.props?.children ?? vnode.children ?? [];
|
|
277
|
-
return Array.isArray(fragmentChildren) ? fragmentChildren : [fragmentChildren];
|
|
278
|
-
}
|
|
279
|
-
//#endregion
|
|
280
|
-
export { getFragmentChildren, getRetainedHostOwnerChain, isFragment, processFragmentChildren, retainHostOwnerChain, smartUpdateElement, tagNamesEqualIgnoreCase, tryFirstRenderKeyedChildren, updateElementChildren, updateForBoundaryChildren };
|
|
281
|
-
|
|
282
|
-
//# sourceMappingURL=evaluate-reconcile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-reconcile.js","names":["sharedTagNamesEqualIgnoreCase"],"sources":["../../src/renderer/evaluate-reconcile.ts"],"sourcesContent":["import { logger } from '../common/logger';\nimport { getRuntimeEnv } from './env';\nimport type { Props } from '../common/props';\nimport type { ComponentInstance } from '../runtime';\nimport { elementListeners } from './cleanup';\nimport { keyedElements } from './keyed';\nimport { createElementForNamespace, getParentNamespace } from './namespaces';\nimport { reconcileKeyedChildren } from './reconcile';\nimport { _isDOMElement, type DOMElement, type VNode } from './types';\nimport { __FOR_BOUNDARY__ } from '../common/vnode';\nimport { evaluateForState } from '../runtime';\nimport {\n evaluateCaseState,\n evaluateShowState,\n type ControlBoundaryState,\n} from '../runtime';\nimport { commitForBoundaryChildren } from './boundaries';\nimport {\n isBulkTextFastPathEligible,\n performBulkPositionalKeyedTextUpdate,\n performBulkTextReplace,\n} from './children';\nimport { getRendererDOMHost } from './dom-host';\nimport { updateUnkeyedChildren } from './element-children';\nimport { setDevValue, incDevCounter } from '../runtime';\nimport { Fragment } from '../common/jsx';\nimport {\n createWrappedHandler,\n extractKey,\n getEventListenerKey,\n getEventListenerOptions,\n parseEventProp,\n setRenderedAttribute,\n tagNamesEqualIgnoreCase as sharedTagNamesEqualIgnoreCase,\n writeElementClassName,\n} from './utils';\nimport { runRetainedElementUpdate } from './retained-element-rollback';\n\ntype ComponentHostElement = Element & {\n __ASKR_INSTANCE?: ComponentInstance;\n __ASKR_INSTANCES?: ComponentInstance[];\n};\n\nexport function getRetainedHostOwnerChain(\n host: ComponentHostElement,\n owner: ComponentInstance\n): ComponentInstance[] {\n const instances = host.__ASKR_INSTANCES ?? [];\n const ownerIndex = instances.indexOf(owner);\n\n return ownerIndex >= 0 ? instances.slice(ownerIndex) : [owner];\n}\n\nexport function retainHostOwnerChain(\n host: Element,\n owner: ComponentInstance,\n retainedInstances: ComponentInstance[]\n): void {\n const componentHost = host as ComponentHostElement;\n const existing = componentHost.__ASKR_INSTANCES ?? [];\n const nextInstances = [...existing];\n\n for (const instance of retainedInstances) {\n if (!nextInstances.includes(instance)) {\n nextInstances.push(instance);\n }\n }\n\n componentHost.__ASKR_INSTANCES = nextInstances;\n componentHost.__ASKR_INSTANCE = owner;\n}\n\ninterface SimpleTextResult {\n isSimple: true;\n text: string;\n}\n\ninterface NotSimpleTextResult {\n isSimple: false;\n text?: undefined;\n}\n\ntype TextCheckResult = SimpleTextResult | NotSimpleTextResult;\n\nexport function tagNamesEqualIgnoreCase(a: string, b: string): boolean {\n return sharedTagNamesEqualIgnoreCase(a, b);\n}\n\nfunction checkSimpleText(vnodeChildren: unknown): TextCheckResult {\n if (!Array.isArray(vnodeChildren)) {\n if (\n typeof vnodeChildren === 'string' ||\n typeof vnodeChildren === 'number'\n ) {\n return { isSimple: true, text: String(vnodeChildren) };\n }\n } else if (vnodeChildren.length === 1) {\n const child = vnodeChildren[0];\n if (typeof child === 'string' || typeof child === 'number') {\n return { isSimple: true, text: String(child) };\n }\n }\n return { isSimple: false };\n}\n\nfunction tryUpdateTextInPlace(element: Element, text: string): boolean {\n if (element.childNodes.length === 1 && element.firstChild?.nodeType === 3) {\n (element.firstChild as Text).data = text;\n return true;\n }\n return false;\n}\n\nfunction buildKeyMapFromDOM(parent: Element): Map<string | number, Element> {\n const keyMap = new Map<string | number, Element>();\n for (\n let child = parent.firstElementChild;\n child;\n child = child.nextElementSibling\n ) {\n const k = child.getAttribute('data-key');\n if (k !== null) {\n keyMap.set(k, child);\n const n = Number(k);\n if (!Number.isNaN(n)) keyMap.set(n, child);\n }\n }\n return keyMap;\n}\n\nfunction getOrBuildKeyMap(\n parent: Element\n): Map<string | number, Element> | undefined {\n let keyMap = keyedElements.get(parent);\n if (!keyMap) {\n keyMap = buildKeyMapFromDOM(parent);\n if (keyMap.size > 0) {\n keyedElements.set(parent, keyMap);\n }\n }\n return keyMap.size > 0 ? keyMap : undefined;\n}\n\nfunction hasKeyedChildren(children: unknown[]): boolean {\n for (let i = 0; i < children.length; i++) {\n if (extractKey(children[i]) !== undefined) return true;\n }\n return false;\n}\n\nfunction trackBulkTextStats(\n stats: ReturnType<typeof performBulkTextReplace>\n): void {\n if (getRuntimeEnv().NODE_ENV !== 'production') {\n try {\n setDevValue('__LAST_BULK_TEXT_FASTPATH_STATS', stats);\n incDevCounter('bulkTextHits');\n } catch {\n // ignore\n }\n }\n}\n\nfunction trackBulkTextMiss(): void {\n if (getRuntimeEnv().NODE_ENV !== 'production') {\n try {\n incDevCounter('bulkTextMisses');\n } catch {\n // ignore\n }\n }\n}\n\nfunction reconcileKeyed(\n parent: Element,\n children: VNode[],\n oldKeyMap: Map<string | number, Element> | undefined\n): void {\n if (getRuntimeEnv().ASKR_FORCE_BULK_POSREUSE === '1') {\n const result = tryForcedBulkKeyedPath(parent, children);\n if (result) return;\n }\n\n const newKeyMap = reconcileKeyedChildren(parent, children, oldKeyMap);\n keyedElements.set(parent, newKeyMap);\n}\n\nfunction tryForcedBulkKeyedPath(parent: Element, children: VNode[]): boolean {\n try {\n const keyedVnodes: Array<{ key: string | number; vnode: VNode }> = [];\n for (const child of children) {\n const key = extractKey(child);\n if (_isDOMElement(child) && key !== undefined) {\n keyedVnodes.push({\n key,\n vnode: child,\n });\n }\n }\n\n if (keyedVnodes.length === 0 || keyedVnodes.length !== children.length) {\n return false;\n }\n\n const fastPathEnv = getRuntimeEnv();\n if (\n fastPathEnv.ASKR_FASTPATH_DEBUG === '1' ||\n fastPathEnv.ASKR_FASTPATH_DEBUG === 'true'\n ) {\n logger.warn(\n '[Askr][FASTPATH] forced positional bulk keyed reuse (evaluate-level)'\n );\n }\n\n const stats = performBulkPositionalKeyedTextUpdate(parent, keyedVnodes);\n\n const statsEnv = getRuntimeEnv();\n if (\n statsEnv.NODE_ENV !== 'production' ||\n statsEnv.ASKR_FASTPATH_DEBUG === '1'\n ) {\n try {\n setDevValue('__LAST_FASTPATH_STATS', stats);\n setDevValue('__LAST_FASTPATH_COMMIT_COUNT', 1);\n incDevCounter('bulkKeyedPositionalForced');\n } catch {\n // ignore\n }\n }\n\n const newMap = buildKeyMapFromDOM(parent);\n keyedElements.set(parent, newMap);\n return true;\n } catch (err) {\n const fallbackEnv = getRuntimeEnv();\n if (\n fallbackEnv.ASKR_FASTPATH_DEBUG === '1' ||\n fallbackEnv.ASKR_FASTPATH_DEBUG === 'true'\n ) {\n logger.warn(\n '[Askr][FASTPATH] forced bulk path failed, falling back',\n err\n );\n }\n return false;\n }\n}\n\nfunction reconcileUnkeyed(parent: Element, children: VNode[]): void {\n if (isBulkTextFastPathEligible(parent, children)) {\n const stats = performBulkTextReplace(parent, children);\n trackBulkTextStats(stats);\n } else {\n trackBulkTextMiss();\n updateUnkeyedChildren(parent, children);\n }\n keyedElements.delete(parent);\n}\n\nexport function updateForBoundaryChildren(\n element: Element,\n forVnode: DOMElement\n): void {\n const controlState =\n forVnode._controlState ??\n (forVnode._forState as ControlBoundaryState | undefined);\n if (!controlState) return;\n\n const childrenVNodes =\n controlState.kind === 'for'\n ? evaluateForState(controlState)\n : controlState.kind === 'show'\n ? evaluateShowState(controlState)\n : evaluateCaseState(controlState);\n commitForBoundaryChildren(element, controlState, childrenVNodes);\n}\n\nexport function updateElementChildren(\n element: Element,\n vnodeChildren: unknown,\n cleanupRangeNode: (node: Node) => void\n): void {\n const domHost = getRendererDOMHost();\n\n if (vnodeChildren === null || vnodeChildren === undefined) {\n for (let n = element.firstChild; n; ) {\n const next = n.nextSibling;\n cleanupRangeNode(n);\n n = next;\n }\n element.textContent = '';\n keyedElements.delete(element);\n return;\n }\n\n if (\n !Array.isArray(vnodeChildren) &&\n _isDOMElement(vnodeChildren) &&\n (vnodeChildren as DOMElement).type === __FOR_BOUNDARY__\n ) {\n updateForBoundaryChildren(element, vnodeChildren as DOMElement);\n return;\n }\n\n if (!Array.isArray(vnodeChildren) && isFragment(vnodeChildren)) {\n updateElementChildren(\n element,\n getFragmentChildren(vnodeChildren),\n cleanupRangeNode\n );\n return;\n }\n\n if (!Array.isArray(vnodeChildren)) {\n for (let n = element.firstChild; n; ) {\n const next = n.nextSibling;\n cleanupRangeNode(n);\n n = next;\n }\n element.textContent = '';\n const dom = domHost.createDOMNode(vnodeChildren);\n if (dom) element.appendChild(dom);\n keyedElements.delete(element);\n return;\n }\n\n if (\n vnodeChildren.length === 1 &&\n _isDOMElement(vnodeChildren[0]) &&\n (vnodeChildren[0] as DOMElement).type === __FOR_BOUNDARY__\n ) {\n updateForBoundaryChildren(element, vnodeChildren[0] as DOMElement);\n return;\n }\n\n if (hasKeyedChildren(vnodeChildren)) {\n const oldKeyMap = getOrBuildKeyMap(element);\n try {\n reconcileKeyed(element, vnodeChildren, oldKeyMap);\n } catch {\n const newKeyMap = reconcileKeyedChildren(\n element,\n vnodeChildren,\n oldKeyMap\n );\n keyedElements.set(element, newKeyMap);\n }\n } else {\n reconcileUnkeyed(element, vnodeChildren);\n }\n}\n\nexport function smartUpdateElement(\n element: Element,\n vnode: DOMElement,\n cleanupRangeNode: (node: Node) => void\n): void {\n const hadVNodeKey = Object.prototype.hasOwnProperty.call(vnode, 'key');\n const previousVNodeKey = vnode.key;\n\n runRetainedElementUpdate(\n element,\n cleanupRangeNode,\n () => applySmartUpdateElement(element, vnode, cleanupRangeNode),\n () => {\n if (hadVNodeKey) vnode.key = previousVNodeKey;\n else delete vnode.key;\n }\n );\n}\n\nfunction applySmartUpdateElement(\n element: Element,\n vnode: DOMElement,\n cleanupRangeNode: (node: Node) => void\n): void {\n const domHost = getRendererDOMHost();\n\n if (vnode.key == null && element.hasAttribute('data-key')) {\n const existingKey = element.getAttribute('data-key');\n if (existingKey !== null) {\n const numericKey = Number(existingKey);\n vnode.key = Number.isNaN(numericKey) ? existingKey : numericKey;\n }\n }\n\n let vnodeChildren = vnode.props?.children ?? vnode.children;\n\n if (\n vnodeChildren &&\n _isDOMElement(vnodeChildren) &&\n (vnodeChildren as DOMElement).type === __FOR_BOUNDARY__\n ) {\n updateElementChildren(element, vnodeChildren, cleanupRangeNode);\n domHost.updateElementFromVnode(element, vnode, false);\n return;\n }\n\n if (vnodeChildren && !Array.isArray(vnodeChildren)) {\n vnodeChildren = [vnodeChildren];\n }\n\n const textCheck = checkSimpleText(vnodeChildren);\n\n if (textCheck.isSimple && tryUpdateTextInPlace(element, textCheck.text)) {\n // Text updated in place.\n } else {\n updateElementChildren(element, vnodeChildren, cleanupRangeNode);\n }\n\n domHost.updateElementFromVnode(element, vnode, false);\n}\n\nexport function processFragmentChildren(\n target: Element,\n childArray: unknown[],\n cleanupRangeNode: (node: Node) => void\n): void {\n updateElementChildren(target, childArray, cleanupRangeNode);\n}\n\nfunction applyPropsToElement(el: Element, props: Props): void {\n for (const [key, value] of Object.entries(props)) {\n if (key === 'children' || key === 'key') continue;\n if (value === undefined || value === null || value === false) continue;\n\n if (key === 'ref') {\n applyRef(el, value);\n continue;\n }\n\n const eventProp = parseEventProp(key);\n if (eventProp) {\n const { eventName, capture } = eventProp;\n const wrappedHandler = createWrappedHandler(value as EventListener, true);\n const options = getEventListenerOptions(eventName, capture);\n const listenerKey = getEventListenerKey(eventName, capture);\n\n if (options !== undefined)\n el.addEventListener(eventName, wrappedHandler, options);\n else el.addEventListener(eventName, wrappedHandler);\n\n if (!elementListeners.has(el)) elementListeners.set(el, new Map());\n elementListeners.get(el)!.set(listenerKey, {\n handler: wrappedHandler,\n original: value as EventListener,\n eventName,\n options,\n });\n continue;\n }\n\n if (key === 'class' || key === 'className') {\n writeElementClassName(el, String(value));\n } else if (key === 'value' || key === 'checked') {\n (el as HTMLElement & Props)[key] = value;\n } else {\n setRenderedAttribute(el, key, String(value));\n }\n }\n}\n\ntype Ref<T> =\n | ((value: T | null) => void)\n | { current: T | null }\n | null\n | undefined;\n\nfunction applyRef<T>(el: T, ref: unknown): void {\n const r = ref as Ref<T>;\n if (!r) return;\n if (typeof r === 'function') {\n r(el);\n return;\n }\n try {\n (r as { current: T | null }).current = el;\n } catch {\n // Ignore write failures.\n }\n}\n\nexport function tryFirstRenderKeyedChildren(\n target: Element,\n vnode: DOMElement\n): boolean {\n const children = vnode.children;\n if (!Array.isArray(children) || !hasKeyedChildren(children)) {\n return false;\n }\n\n const el = createElementForNamespace(\n vnode.type as string,\n getParentNamespace(target)\n );\n target.appendChild(el);\n\n applyPropsToElement(el, vnode.props || {});\n\n const newKeyMap = reconcileKeyedChildren(el, children, undefined);\n keyedElements.set(el, newKeyMap);\n return true;\n}\n\nexport function isFragment(vnode: unknown): vnode is DOMElement {\n return (\n _isDOMElement(vnode) &&\n typeof (vnode as DOMElement).type === 'symbol' &&\n ((vnode as DOMElement).type === Fragment ||\n String((vnode as DOMElement).type) === 'Symbol(askr.fragment)')\n );\n}\n\nexport function getFragmentChildren(vnode: DOMElement): unknown[] {\n const fragmentChildren = vnode.props?.children ?? vnode.children ?? [];\n return Array.isArray(fragmentChildren)\n ? fragmentChildren\n : [fragmentChildren];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,0BACd,MACA,OACqB;CACrB,MAAM,YAAY,KAAK,oBAAoB,CAAC;CAC5C,MAAM,aAAa,UAAU,QAAQ,KAAK;CAE1C,OAAO,cAAc,IAAI,UAAU,MAAM,UAAU,IAAI,CAAC,KAAK;AAC/D;AAEA,SAAgB,qBACd,MACA,OACA,mBACM;CACN,MAAM,gBAAgB;CAEtB,MAAM,gBAAgB,CAAC,GADN,cAAc,oB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AAK,OAAO,KAAK,CAAC;CAE/C;AACF;AAQA,SAAS,SAAY,IAAO,KAAoB;CAC9C,MAAM,IAAI;CACV,IAAI,CAAC,GAAG;CACR,IAAI,OAAO,MAAM,YAAY;EAC3B,EAAE,EAAE;EACJ;CACF;CACA,IAAI;EACF,EAA6B,UAAU;CACzC,QAAQ,CAER;AACF;AAEA,SAAgB,4BACd,QACA,OACS;CACT,MAAM,WAAW,MAAM;CACvB,IAAI,CAAC,MAAM,QAAQ,QAAQ,KAAK,CAAC,iBAAiB,QAAQ,GACxD,OAAO;CAGT,MAAM,KAAK,0BACT,MAAM,MACN,mBAAmB,MAAM,CAC3B;CACA,OAAO,YAAY,EAAE;CAErB,oBAAoB,IAAI,MAAM,SAAS,CAAC,CAAC;CAEzC,MAAM,YAAY,uBAAuB,IAAI,UAAU,MAAS;CAChE,cAAc,IAAI,IAAI,SAAS;CAC/B,OAAO;AACT;AAEA,SAAgB,WAAW,OAAqC;CAC9D,OACE,cAAc,KAAK,KACnB,OAAQ,MAAqB,SAAS,aACpC,MAAqB,SAAS,YAC9B,OAAQ,MAAqB,IAAI,MAAM;AAE7C;AAEA,SAAgB,oBAAoB,OAA8B;CAChE,MAAM,mBAAmB,MAAM,OAAO,YAAY,MAAM,YAAY,CAAC;CACrE,OAAO,MAAM,QAAQ,gBAAgB,IACjC,mBACA,CAAC,gBAAgB;AACvB"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { __FOR_BOUNDARY__, _isDOMElement } from "../common/vnode.js";
|
|
2
|
-
import "./types.js";
|
|
3
|
-
import { getRuntimeEnv } from "../common/env.js";
|
|
4
|
-
import { removeAllListeners } from "./cleanup.js";
|
|
5
|
-
import "./env.js";
|
|
6
|
-
import { syncComponentElement } from "./component-host.js";
|
|
7
|
-
import { createDOMNode } from "./dom-internal.js";
|
|
8
|
-
import "./dom.js";
|
|
9
|
-
import { getFragmentChildren, getRetainedHostOwnerChain, isFragment, processFragmentChildren, retainHostOwnerChain, smartUpdateElement, tagNamesEqualIgnoreCase, tryFirstRenderKeyedChildren, updateElementChildren, updateForBoundaryChildren } from "./evaluate-reconcile.js";
|
|
10
|
-
import { cleanupRangeNode, createDOMRange, hasDOMRange, updateDOMRangeForContext } from "./evaluate-dom-range.js";
|
|
11
|
-
function evaluate(node, target, context, retainedOwner) {
|
|
12
|
-
if (!target) return;
|
|
13
|
-
if (typeof document === "undefined") {
|
|
14
|
-
if (getRuntimeEnv().NODE_ENV !== "production") try {
|
|
15
|
-
console.warn("[Askr] evaluate() called in non-DOM environment; no-op.");
|
|
16
|
-
} catch (e) {}
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (context && hasDOMRange(context)) updateDOMRangeForContext(target, context, node === null || node === void 0 || node === false ? [] : isFragment(node) ? getFragmentChildren(node) : Array.isArray(node) ? node : [node]);
|
|
20
|
-
else if (context) createDOMRange(target, context, node);
|
|
21
|
-
else {
|
|
22
|
-
let vnode = node;
|
|
23
|
-
if (isFragment(vnode)) {
|
|
24
|
-
const childArray = getFragmentChildren(vnode);
|
|
25
|
-
if (childArray.length === 1 && _isDOMElement(childArray[0]) && typeof childArray[0].type === "string") vnode = childArray[0];
|
|
26
|
-
else {
|
|
27
|
-
processFragmentChildren(target, childArray, cleanupRangeNode);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if (_isDOMElement(vnode) && vnode.type === __FOR_BOUNDARY__) {
|
|
32
|
-
updateForBoundaryChildren(target, vnode);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (Array.isArray(vnode)) {
|
|
36
|
-
updateElementChildren(target, vnode, cleanupRangeNode);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const targetWithInstance = target;
|
|
40
|
-
const targetInstance = retainedOwner?.target === target ? retainedOwner : targetWithInstance.__ASKR_INSTANCE;
|
|
41
|
-
if (targetInstance && targetInstance.target === target) {
|
|
42
|
-
const retainedHostInstances = getRetainedHostOwnerChain(targetWithInstance, targetInstance);
|
|
43
|
-
if (_isDOMElement(vnode) && typeof vnode.type === "function") {
|
|
44
|
-
const syncedDom = syncComponentElement(target, vnode, vnode.type, (vnode.props ?? {}) || {}, void 0, false, retainedHostInstances);
|
|
45
|
-
if (syncedDom instanceof Element) {
|
|
46
|
-
retainHostOwnerChain(syncedDom, targetInstance, retainedHostInstances);
|
|
47
|
-
targetInstance.target = syncedDom;
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (_isDOMElement(vnode) && typeof vnode.type === "string" && tagNamesEqualIgnoreCase(target.tagName, vnode.type)) {
|
|
52
|
-
smartUpdateElement(target, vnode, cleanupRangeNode);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const newDom = createDOMNode(vnode);
|
|
56
|
-
if (newDom && target.parentNode) {
|
|
57
|
-
if (newDom instanceof Element) {
|
|
58
|
-
newDom.__ASKR_INSTANCE = targetInstance;
|
|
59
|
-
targetInstance.target = newDom;
|
|
60
|
-
}
|
|
61
|
-
removeAllListeners(target);
|
|
62
|
-
target.parentNode.replaceChild(newDom, target);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const firstChild = target.children[0];
|
|
67
|
-
if (firstChild && _isDOMElement(vnode) && typeof vnode.type === "string" && tagNamesEqualIgnoreCase(firstChild.tagName, vnode.type)) smartUpdateElement(firstChild, vnode, cleanupRangeNode);
|
|
68
|
-
else {
|
|
69
|
-
for (let node = target.firstChild; node;) {
|
|
70
|
-
const next = node.nextSibling;
|
|
71
|
-
cleanupRangeNode(node);
|
|
72
|
-
node = next;
|
|
73
|
-
}
|
|
74
|
-
target.textContent = "";
|
|
75
|
-
if (_isDOMElement(vnode) && typeof vnode.type === "string" && tryFirstRenderKeyedChildren(target, vnode)) return;
|
|
76
|
-
const dom = createDOMNode(vnode);
|
|
77
|
-
if (dom) target.appendChild(dom);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
export { evaluate };
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=evaluate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.js","names":[],"sources":["../../src/renderer/evaluate.ts"],"sourcesContent":["import { getRuntimeEnv } from './env';\nimport type { ComponentFunction, ComponentInstance } from '../runtime';\nimport { removeAllListeners } from './cleanup';\nimport { createDOMNode, syncComponentElement } from './dom';\nimport type { ElementWithContext } from './dom-host';\nimport {\n cleanupRangeNode,\n createDOMRange,\n hasDOMRange,\n updateDOMRangeForContext,\n} from './evaluate-dom-range';\nimport {\n getFragmentChildren,\n getRetainedHostOwnerChain,\n isFragment,\n processFragmentChildren,\n retainHostOwnerChain,\n smartUpdateElement,\n tagNamesEqualIgnoreCase,\n tryFirstRenderKeyedChildren,\n updateElementChildren,\n updateForBoundaryChildren,\n} from './evaluate-reconcile';\nimport { _isDOMElement, type DOMElement } from './types';\nimport { __FOR_BOUNDARY__ } from '../common/vnode';\n\nexport { clearDOMRange } from './evaluate-dom-range';\n\nexport const IS_DOM_AVAILABLE = typeof document !== 'undefined';\n\nexport function evaluate(\n node: unknown,\n target: Element | null,\n context?: object,\n retainedOwner?: ComponentInstance\n): void {\n if (!target) return;\n if (typeof document === 'undefined') {\n if (getRuntimeEnv().NODE_ENV !== 'production') {\n try {\n console.warn('[Askr] evaluate() called in non-DOM environment; no-op.');\n } catch (e) {\n void e;\n }\n }\n return;\n }\n\n if (context && hasDOMRange(context)) {\n const normalizedChildren =\n node === null || node === undefined || node === false\n ? []\n : isFragment(node)\n ? getFragmentChildren(node as DOMElement)\n : Array.isArray(node)\n ? node\n : [node];\n\n updateDOMRangeForContext(target, context, normalizedChildren);\n } else if (context) {\n createDOMRange(target, context, node);\n } else {\n let vnode = node;\n\n if (isFragment(vnode)) {\n const childArray = getFragmentChildren(vnode as DOMElement);\n if (\n childArray.length === 1 &&\n _isDOMElement(childArray[0]) &&\n typeof (childArray[0] as DOMElement).type === 'string'\n ) {\n vnode = childArray[0];\n } else {\n processFragmentChildren(target, childArray, cleanupRangeNode);\n return;\n }\n }\n\n if (\n _isDOMElement(vnode) &&\n (vnode as DOMElement).type === __FOR_BOUNDARY__\n ) {\n updateForBoundaryChildren(target, vnode as DOMElement);\n return;\n }\n\n if (Array.isArray(vnode)) {\n updateElementChildren(target, vnode, cleanupRangeNode);\n return;\n }\n\n const targetWithInstance = target as Element & {\n __ASKR_INSTANCE?: ComponentInstance;\n };\n const targetInstance =\n retainedOwner?.target === target\n ? retainedOwner\n : targetWithInstance.__ASKR_INSTANCE;\n if (targetInstance && targetInstance.target === target) {\n const retainedHostInstances = getRetainedHostOwnerChain(\n targetWithInstance,\n targetInstance\n );\n\n if (_isDOMElement(vnode) && typeof vnode.type === 'function') {\n const syncedDom = syncComponentElement(\n target,\n vnode as unknown as ElementWithContext,\n vnode.type as ComponentFunction,\n (((vnode as DOMElement).props ?? {}) as Record<string, unknown>) ||\n {},\n undefined,\n false,\n retainedHostInstances\n );\n\n if (syncedDom instanceof Element) {\n retainHostOwnerChain(\n syncedDom,\n targetInstance,\n retainedHostInstances\n );\n targetInstance.target = syncedDom;\n return;\n }\n }\n\n if (\n _isDOMElement(vnode) &&\n typeof vnode.type === 'string' &&\n tagNamesEqualIgnoreCase(target.tagName, vnode.type)\n ) {\n smartUpdateElement(target, vnode as DOMElement, cleanupRangeNode);\n return;\n }\n\n const newDom = createDOMNode(vnode);\n if (newDom && target.parentNode) {\n if (newDom instanceof Element) {\n (\n newDom as Element & { __ASKR_INSTANCE?: ComponentInstance }\n ).__ASKR_INSTANCE = targetInstance;\n targetInstance.target = newDom as Element;\n }\n removeAllListeners(target);\n target.parentNode.replaceChild(newDom, target);\n return;\n }\n }\n\n const firstChild = target.children[0] as Element | undefined;\n\n if (\n firstChild &&\n _isDOMElement(vnode) &&\n typeof vnode.type === 'string' &&\n tagNamesEqualIgnoreCase(firstChild.tagName, vnode.type)\n ) {\n smartUpdateElement(firstChild, vnode as DOMElement, cleanupRangeNode);\n } else {\n for (let node = target.firstChild; node; ) {\n const next = node.nextSibling;\n cleanupRangeNode(node);\n node = next;\n }\n target.textContent = '';\n\n if (\n _isDOMElement(vnode) &&\n typeof vnode.type === 'string' &&\n tryFirstRenderKeyedChildren(target, vnode as DOMElement)\n ) {\n return;\n }\n\n const dom = createDOMNode(vnode);\n if (dom) {\n target.appendChild(dom);\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,SACd,MACA,QACA,SACA,eACM;CACN,IAAI,CAAC,QAAQ;CACb,IAAI,OAAO,aAAa,aAAa;EACnC,IAAI,cAAc,CAAC,CAAC,aAAa,cAC/B,IAAI;GACF,QAAQ,KAAK,yDAAyD;EACxE,SAAS,GAAG,CAEZ;EAEF;CACF;CAEA,IAAI,WAAW,YAAY,OAAO,GAUhC,yBAAyB,QAAQ,SAR/B,SAAS,QAAQ,SAAS,UAAa,SAAS,QAC5C,CAAC,IACD,WAAW,IAAI,IACb,oBAAoB,IAAkB,IACtC,MAAM,QAAQ,IAAI,IAChB,OACA,CAAC,IAAI,CAE6C;MACvD,IAAI,SACT,eAAe,QAAQ,SAAS,IAAI;MAC/B;EACL,IAAI,QAAQ;EAEZ,IAAI,WAAW,KAAK,GAAG;GACrB,MAAM,aAAa,oBAAoB,KAAmB;GAC1D,IACE,WAAW,WAAW,KACtB,cAAc,WAAW,EAAE,KAC3B,OAAQ,WAAW,EAAE,CAAgB,SAAS,UAE9C,QAAQ,WAAW;QACd;IACL,wBAAwB,QAAQ,YAAY,gBAAgB;IAC5D;GACF;EACF;EAEA,IACE,cAAc,KAAK,KAClB,MAAqB,SAAS,kBAC/B;GACA,0BAA0B,QAAQ,KAAmB;GACrD;EACF;EAEA,IAAI,MAAM,QAAQ,KAAK,GAAG;GACxB,sBAAsB,QAAQ,OAAO,gBAAgB;GACrD;EACF;EAEA,MAAM,qBAAqB;EAG3B,MAAM,iBACJ,eAAe,WAAW,SACtB,gBACA,mBAAmB;EACzB,IAAI,kBAAkB,eAAe,WAAW,QAAQ;GACtD,MAAM,wBAAwB,0BAC5B,oBACA,cACF;GAEA,IAAI,cAAc,KAAK,KAAK,OAAO,MAAM,SAAS,YAAY;IAC5D,MAAM,YAAY,qBAChB,QACA,OACA,MAAM,OACH,MAAqB,SAAS,CAAC,MAChC,CAAC,GACH,QACA,OACA,qBACF;IAEA,IAAI,qBAAqB,SAAS;KAChC,qBACE,WACA,gBACA,qBACF;KACA,eAAe,SAAS;KACxB;IACF;GACF;GAEA,IACE,cAAc,KAAK,KACnB,OAAO,MAAM,SAAS,YACtB,wBAAwB,OAAO,SAAS,MAAM,IAAI,GAClD;IACA,mBAAmB,QAAQ,OAAqB,gBAAgB;IAChE;GACF;GAEA,MAAM,SAAS,cAAc,KAAK;GAClC,IAAI,UAAU,OAAO,YAAY;IAC/B,IAAI,kBAAkB,SAAS;KAC7B,OAEE,kBAAkB;KACpB,eAAe,SAAS;IAC1B;IACA,mBAAmB,MAAM;IACzB,OAAO,WAAW,aAAa,QAAQ,MAAM;IAC7C;GACF;EACF;EAEA,MAAM,aAAa,OAAO,SAAS;EAEnC,IACE,cACA,cAAc,KAAK,KACnB,OAAO,MAAM,SAAS,YACtB,wBAAwB,WAAW,SAAS,MAAM,IAAI,GAEtD,mBAAmB,YAAY,OAAqB,gBAAgB;OAC/D;GACL,KAAK,IAAI,OAAO,OAAO,YAAY,OAAQ;IACzC,MAAM,OAAO,KAAK;IAClB,iBAAiB,IAAI;IACrB,OAAO;GACT;GACA,OAAO,cAAc;GAErB,IACE,cAAc,KAAK,KACnB,OAAO,MAAM,SAAS,YACtB,4BAA4B,QAAQ,KAAmB,GAEvD;GAGF,MAAM,MAAM,cAAc,KAAK;GAC/B,IAAI,KACF,OAAO,YAAY,GAAG;EAE1B;CACF;AACF"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { getRuntimeEnv } from "../common/env.js";
|
|
2
|
-
import { logger } from "../common/logger.js";
|
|
3
|
-
import { isRuntimeSchedulerExecuting } from "../runtime/access.js";
|
|
4
|
-
import { incDevCounter, setDevValue } from "../runtime/dev-namespace.js";
|
|
5
|
-
import { isBulkCommitActive, markFastPathApplied } from "../runtime/fastlane.js";
|
|
6
|
-
import { recordBenchCounter, recordBenchEvent } from "../runtime/for-bench.js";
|
|
7
|
-
import "../runtime/index.js";
|
|
8
|
-
import { cleanupInstanceIfPresent, removeAllListeners } from "./cleanup.js";
|
|
9
|
-
import "./env.js";
|
|
10
|
-
import { canUseDirectReplaceChildrenSpread } from "./utils.js";
|
|
11
|
-
import { _reconcilerRecordedParents } from "./keyed.js";
|
|
12
|
-
import { createDOMNode, updateElementFromVnode } from "./dom-internal.js";
|
|
13
|
-
import "./dom.js";
|
|
14
|
-
function applyRendererFastPath(parent, keyedVnodes, oldKeyMap) {
|
|
15
|
-
if (typeof document === "undefined") return null;
|
|
16
|
-
const totalKeyed = keyedVnodes.length;
|
|
17
|
-
if (totalKeyed === 0) return null;
|
|
18
|
-
if (!isRuntimeSchedulerExecuting()) logger.warn("[Askr][FASTPATH][DEV] Fast-path reconciliation invoked outside scheduler execution");
|
|
19
|
-
let parentChildrenArr;
|
|
20
|
-
let localOldKeyMap;
|
|
21
|
-
if (totalKeyed <= 20) try {
|
|
22
|
-
parentChildrenArr = Array.from(parent.children, (child) => child);
|
|
23
|
-
} catch (e) {
|
|
24
|
-
parentChildrenArr = void 0;
|
|
25
|
-
}
|
|
26
|
-
else if (!oldKeyMap || oldKeyMap.size === 0) {
|
|
27
|
-
localOldKeyMap = /* @__PURE__ */ new Map();
|
|
28
|
-
try {
|
|
29
|
-
for (let ch = parent.firstElementChild; ch; ch = ch.nextElementSibling) {
|
|
30
|
-
const k = ch.getAttribute("data-key");
|
|
31
|
-
if (k !== null) {
|
|
32
|
-
localOldKeyMap.set(k, ch);
|
|
33
|
-
const n = Number(k);
|
|
34
|
-
if (!Number.isNaN(n)) localOldKeyMap.set(n, ch);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
} catch (e) {
|
|
38
|
-
localOldKeyMap = void 0;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const finalNodes = [];
|
|
42
|
-
let mapLookups = 0;
|
|
43
|
-
let createdNodes = 0;
|
|
44
|
-
let reusedCount = 0;
|
|
45
|
-
for (let i = 0; i < keyedVnodes.length; i++) {
|
|
46
|
-
const { key, vnode } = keyedVnodes[i];
|
|
47
|
-
mapLookups++;
|
|
48
|
-
let el;
|
|
49
|
-
if (totalKeyed <= 20 && parentChildrenArr) {
|
|
50
|
-
const ks = String(key);
|
|
51
|
-
for (let j = 0; j < parentChildrenArr.length; j++) {
|
|
52
|
-
const ch = parentChildrenArr[j];
|
|
53
|
-
const k = ch.getAttribute("data-key");
|
|
54
|
-
if (k !== null && (k === ks || Number(k) === key)) {
|
|
55
|
-
el = ch;
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (!el) el = oldKeyMap?.get(key);
|
|
60
|
-
} else el = localOldKeyMap?.get(key) ?? oldKeyMap?.get(key);
|
|
61
|
-
if (el) {
|
|
62
|
-
updateElementFromVnode(el, vnode);
|
|
63
|
-
finalNodes.push(el);
|
|
64
|
-
reusedCount++;
|
|
65
|
-
} else {
|
|
66
|
-
const newEl = createDOMNode(vnode);
|
|
67
|
-
if (newEl) {
|
|
68
|
-
finalNodes.push(newEl);
|
|
69
|
-
createdNodes++;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
try {
|
|
74
|
-
const tCommitStart = Date.now();
|
|
75
|
-
const fragmentAppendCount = finalNodes.length;
|
|
76
|
-
const useDirectReplace = canUseDirectReplaceChildrenSpread(finalNodes.length);
|
|
77
|
-
const finalNodeSet = useDirectReplace ? new Set(finalNodes) : null;
|
|
78
|
-
const fragment = useDirectReplace ? null : parent.ownerDocument.createDocumentFragment();
|
|
79
|
-
if (fragment) for (let i = 0; i < finalNodes.length; i++) fragment.appendChild(finalNodes[i]);
|
|
80
|
-
try {
|
|
81
|
-
for (let n = parent.firstChild; n;) {
|
|
82
|
-
const next = n.nextSibling;
|
|
83
|
-
if (finalNodeSet?.has(n)) {
|
|
84
|
-
n = next;
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
if (n instanceof Element) removeAllListeners(n);
|
|
88
|
-
cleanupInstanceIfPresent(n);
|
|
89
|
-
n = next;
|
|
90
|
-
}
|
|
91
|
-
} catch (e) {}
|
|
92
|
-
try {
|
|
93
|
-
incDevCounter("__DOM_REPLACE_COUNT");
|
|
94
|
-
setDevValue("__LAST_DOM_REPLACE_STACK_FASTPATH", (/* @__PURE__ */ new Error()).stack);
|
|
95
|
-
} catch (e) {}
|
|
96
|
-
if (useDirectReplace) parent.replaceChildren(...finalNodes);
|
|
97
|
-
else parent.replaceChildren(fragment);
|
|
98
|
-
recordBenchEvent("domMove", reusedCount);
|
|
99
|
-
recordBenchEvent("domInsert", createdNodes);
|
|
100
|
-
recordBenchCounter("replaceChildrenCommits");
|
|
101
|
-
try {
|
|
102
|
-
setDevValue("__LAST_FASTPATH_COMMIT_COUNT", 1);
|
|
103
|
-
} catch (e) {}
|
|
104
|
-
try {
|
|
105
|
-
if (isBulkCommitActive()) markFastPathApplied(parent);
|
|
106
|
-
} catch (e) {}
|
|
107
|
-
const newKeyMap = /* @__PURE__ */ new Map();
|
|
108
|
-
for (let i = 0; i < keyedVnodes.length; i++) {
|
|
109
|
-
const key = keyedVnodes[i].key;
|
|
110
|
-
const node = finalNodes[i];
|
|
111
|
-
if (node instanceof Element) newKeyMap.set(key, node);
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
const stats = {
|
|
115
|
-
n: totalKeyed,
|
|
116
|
-
moves: 0,
|
|
117
|
-
lisLen: 0,
|
|
118
|
-
t_lookup: 0,
|
|
119
|
-
t_fragment: Date.now() - tCommitStart,
|
|
120
|
-
t_commit: 0,
|
|
121
|
-
t_bookkeeping: 0,
|
|
122
|
-
fragmentAppendCount,
|
|
123
|
-
mapLookups,
|
|
124
|
-
createdNodes,
|
|
125
|
-
reusedCount
|
|
126
|
-
};
|
|
127
|
-
if (typeof globalThis !== "undefined") {
|
|
128
|
-
setDevValue("__LAST_FASTPATH_STATS", stats);
|
|
129
|
-
setDevValue("__LAST_FASTPATH_REUSED", reusedCount > 0);
|
|
130
|
-
incDevCounter("fastpathHistoryPush");
|
|
131
|
-
}
|
|
132
|
-
const env = getRuntimeEnv();
|
|
133
|
-
if (env.ASKR_FASTPATH_DEBUG === "1" || env.ASKR_FASTPATH_DEBUG === "true") logger.warn("[Askr][FASTPATH]", JSON.stringify({
|
|
134
|
-
n: totalKeyed,
|
|
135
|
-
createdNodes,
|
|
136
|
-
reusedCount
|
|
137
|
-
}));
|
|
138
|
-
} catch (e) {}
|
|
139
|
-
try {
|
|
140
|
-
_reconcilerRecordedParents.add(parent);
|
|
141
|
-
} catch (e) {}
|
|
142
|
-
return newKeyMap;
|
|
143
|
-
} catch (e) {
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
//#endregion
|
|
148
|
-
export { applyRendererFastPath };
|
|
149
|
-
|
|
150
|
-
//# sourceMappingURL=fastpath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fastpath.js","names":[],"sources":["../../src/renderer/fastpath.ts"],"sourcesContent":["import { createDOMNode, updateElementFromVnode } from './dom';\nimport { _reconcilerRecordedParents } from './keyed';\nimport { logger } from '../common/logger';\nimport { getRuntimeEnv } from './env';\nimport { cleanupInstanceIfPresent, removeAllListeners } from './cleanup';\nimport { recordBenchCounter, recordBenchEvent } from '../runtime';\nimport { setDevValue, incDevCounter } from '../runtime';\nimport { isRuntimeSchedulerExecuting } from '../runtime';\nimport { isBulkCommitActive, markFastPathApplied } from '../runtime';\nimport { canUseDirectReplaceChildrenSpread } from './utils';\nimport type { KeyedVnode } from './keyed-children';\n\nexport const IS_DOM_AVAILABLE = typeof document !== 'undefined';\n\n// Apply the \"renderer\" fast-path: build final node list reusing existing\n// elements by key when possible, then perform a single atomic replaceChildren\n// commit. Returns a new key map when the fast-path is applied, otherwise\n// returns null to indicate the caller should continue with fallback paths.\nexport function applyRendererFastPath(\n parent: Element,\n keyedVnodes: KeyedVnode[],\n oldKeyMap?: Map<string | number, Element>\n): Map<string | number, Element> | null {\n // SSR guard: fast-path is DOM-specific\n if (typeof document === 'undefined') return null;\n\n const totalKeyed = keyedVnodes.length;\n if (totalKeyed === 0) return null;\n\n // Dev invariant: ensure we are executing inside the scheduler/commit flush\n if (!isRuntimeSchedulerExecuting()) {\n logger.warn(\n '[Askr][FASTPATH][DEV] Fast-path reconciliation invoked outside scheduler execution'\n );\n }\n\n // Choose lookup strategy depending on size (linear scan for small lists)\n let parentChildrenArr: Element[] | undefined;\n let localOldKeyMap: Map<string | number, Element> | undefined;\n\n if (totalKeyed <= 20) {\n // Small lists: use array scan (faster than Map overhead for ≤20 items)\n try {\n parentChildrenArr = Array.from(\n parent.children,\n (child) => child as Element\n );\n } catch (e) {\n parentChildrenArr = undefined;\n void e;\n }\n } else if (!oldKeyMap || oldKeyMap.size === 0) {\n // Medium/large lists without existing key map: build from DOM\n localOldKeyMap = new Map<string | number, Element>();\n try {\n for (let ch = parent.firstElementChild; ch; ch = ch.nextElementSibling) {\n const k = ch.getAttribute('data-key');\n if (k !== null) {\n localOldKeyMap.set(k, ch);\n const n = Number(k);\n if (!Number.isNaN(n)) localOldKeyMap.set(n, ch);\n }\n }\n } catch (e) {\n localOldKeyMap = undefined;\n void e;\n }\n }\n // else: reuse oldKeyMap directly (most common case for repeat renders)\n\n const finalNodes: Node[] = [];\n let mapLookups = 0;\n let createdNodes = 0;\n let reusedCount = 0;\n\n for (let i = 0; i < keyedVnodes.length; i++) {\n const { key, vnode } = keyedVnodes[i];\n mapLookups++;\n\n let el: Element | undefined;\n if (totalKeyed <= 20 && parentChildrenArr) {\n const ks = String(key);\n for (let j = 0; j < parentChildrenArr.length; j++) {\n const ch = parentChildrenArr[j];\n const k = ch.getAttribute('data-key');\n if (k !== null && (k === ks || Number(k) === (key as number))) {\n el = ch;\n break;\n }\n }\n if (!el) el = oldKeyMap?.get(key);\n } else {\n el = localOldKeyMap?.get(key as string | number) ?? oldKeyMap?.get(key);\n }\n\n if (el) {\n updateElementFromVnode(el, vnode);\n finalNodes.push(el);\n reusedCount++;\n } else {\n const newEl = createDOMNode(vnode);\n if (newEl) {\n finalNodes.push(newEl);\n createdNodes++;\n }\n }\n }\n\n // Atomic commit\n try {\n const tCommitStart = Date.now();\n const fragmentAppendCount = finalNodes.length;\n const useDirectReplace = canUseDirectReplaceChildrenSpread(\n finalNodes.length\n );\n const finalNodeSet = useDirectReplace ? new Set<Node>(finalNodes) : null;\n const fragment = useDirectReplace\n ? null\n : parent.ownerDocument.createDocumentFragment();\n\n if (fragment) {\n for (let i = 0; i < finalNodes.length; i++) {\n fragment.appendChild(finalNodes[i]);\n }\n }\n\n // Pre-cleanup: remove component instances that will be removed by replaceChildren\n try {\n // Keep reused nodes alive, but clean up anything still attached to the\n // parent that will be removed by replaceChildren.\n for (let n = parent.firstChild; n; ) {\n const next = n.nextSibling;\n if (finalNodeSet?.has(n)) {\n n = next;\n continue;\n }\n if (n instanceof Element) removeAllListeners(n);\n cleanupInstanceIfPresent(n);\n n = next;\n }\n } catch (e) {\n void e;\n }\n\n try {\n incDevCounter('__DOM_REPLACE_COUNT');\n setDevValue('__LAST_DOM_REPLACE_STACK_FASTPATH', new Error().stack);\n } catch (e) {\n void e;\n }\n\n if (useDirectReplace) {\n // Move-only reorder commits already have the final node set, so small\n // lists can write it directly without a fragment round-trip.\n parent.replaceChildren(...finalNodes);\n } else {\n parent.replaceChildren(fragment!);\n }\n recordBenchEvent('domMove', reusedCount);\n recordBenchEvent('domInsert', createdNodes);\n recordBenchCounter('replaceChildrenCommits');\n\n // Record that we performed exactly one DOM commit.\n try {\n setDevValue('__LAST_FASTPATH_COMMIT_COUNT', 1);\n } catch (e) {\n void e;\n }\n\n // If a runtime bulk commit is active, mark this parent as fast-path applied.\n try {\n if (isBulkCommitActive()) markFastPathApplied(parent);\n } catch (e) {\n void e;\n }\n\n // Phase: bookkeeping - populate newKeyMap\n const newKeyMap = new Map<string | number, Element>();\n for (let i = 0; i < keyedVnodes.length; i++) {\n const key = keyedVnodes[i].key;\n const node = finalNodes[i];\n if (node instanceof Element) newKeyMap.set(key, node as Element);\n }\n\n // Dev tracing\n try {\n const stats = {\n n: totalKeyed,\n moves: 0,\n lisLen: 0,\n t_lookup: 0,\n t_fragment: Date.now() - tCommitStart,\n t_commit: 0,\n t_bookkeeping: 0,\n fragmentAppendCount,\n mapLookups,\n createdNodes,\n reusedCount,\n } as const;\n if (typeof globalThis !== 'undefined') {\n setDevValue('__LAST_FASTPATH_STATS', stats);\n setDevValue('__LAST_FASTPATH_REUSED', reusedCount > 0);\n incDevCounter('fastpathHistoryPush');\n }\n const env = getRuntimeEnv();\n if (\n env.ASKR_FASTPATH_DEBUG === '1' ||\n env.ASKR_FASTPATH_DEBUG === 'true'\n ) {\n logger.warn(\n '[Askr][FASTPATH]',\n JSON.stringify({ n: totalKeyed, createdNodes, reusedCount })\n );\n }\n } catch (e) {\n void e;\n }\n\n // Record that reconciler recorded stats for this parent in this pass\n try {\n _reconcilerRecordedParents.add(parent);\n } catch (e) {\n void e;\n }\n\n return newKeyMap;\n } catch (e) {\n void e;\n return null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,SAAgB,sBACd,QACA,aACA,WACsC;CAEtC,IAAI,OAAO,aAAa,aAAa,OAAO;CAE5C,MAAM,aAAa,YAAY;CAC/B,IAAI,eAAe,GAAG,OAAO;CAG7B,IAAI,CAAC,4BAA4B,GAC/B,OAAO,KACL,oFACF;CAIF,IAAI;CACJ,IAAI;CAEJ,IAAI,cAAc,IAEhB,IAAI;EACF,oBAAoB,MAAM,KACxB,OAAO,WACN,UAAU,KACb;CACF,SAAS,GAAG;EACV,o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