@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,247 +0,0 @@
|
|
|
1
|
-
import { _isDOMElement } from "../common/vnode.js";
|
|
2
|
-
import "./types.js";
|
|
3
|
-
import { getCurrentContextFrame, getVNodeContextFrame, markVNodeTreeWithContextFrame, withContext } from "../runtime/context.js";
|
|
4
|
-
import { getCurrentInstance } from "../runtime/component-scope.js";
|
|
5
|
-
import { cleanupComponent } from "../runtime/component-cleanup.js";
|
|
6
|
-
import { isPromiseLike } from "../common/promise.js";
|
|
7
|
-
import { captureInlineRenderSnapshot, createComponentInstance, mountInstanceInline, renderComponentInline, warnUnusedStateReads } from "../runtime/component-internal.js";
|
|
8
|
-
import "../runtime/index.js";
|
|
9
|
-
import { tagNamesEqualIgnoreCase } from "./utils.js";
|
|
10
|
-
import { materializeKey } from "./attributes.js";
|
|
11
|
-
import { normalizeComponentChildren } from "./child-shape.js";
|
|
12
|
-
import { cleanupDetachedComponentHost, pruneComponentHostInstances } from "./component-host-cleanup.js";
|
|
13
|
-
import { getRendererDOMHost } from "./dom-host.js";
|
|
14
|
-
import { findHostInstanceByType, getVNodeComponentInstance, inheritComponentCleanupStrict, inheritComponentKey, isRouteRootComponentVNode, nextComponentInstanceId, setVNodeComponentInstance } from "./component-host-instances.js";
|
|
15
|
-
//#region src/renderer/component-host.ts
|
|
16
|
-
function materializeComponentResultNode(childInstance, result, parentNamespace) {
|
|
17
|
-
const dom = getRendererDOMHost().createDOMNode(result, parentNamespace);
|
|
18
|
-
if (dom instanceof Element) {
|
|
19
|
-
mountInstanceInline(childInstance, dom);
|
|
20
|
-
return dom;
|
|
21
|
-
}
|
|
22
|
-
if (!dom) {
|
|
23
|
-
const placeholder = document.createComment("");
|
|
24
|
-
try {
|
|
25
|
-
placeholder.__ASKR_INSTANCE = childInstance;
|
|
26
|
-
} catch {}
|
|
27
|
-
childInstance._placeholder = placeholder;
|
|
28
|
-
mountInstanceInline(childInstance, null);
|
|
29
|
-
return placeholder;
|
|
30
|
-
}
|
|
31
|
-
const host = document.createElement("div");
|
|
32
|
-
host.appendChild(dom);
|
|
33
|
-
host.__ASKR_WRAPPER_HOST = true;
|
|
34
|
-
mountInstanceInline(childInstance, host);
|
|
35
|
-
return host;
|
|
36
|
-
}
|
|
37
|
-
function resolveNestedComponentResult(result, snapshot, parentInstance) {
|
|
38
|
-
let currentResult = result;
|
|
39
|
-
let activeSnapshot = snapshot;
|
|
40
|
-
let depth = 0;
|
|
41
|
-
while (_isDOMElement(currentResult) && typeof currentResult.type === "function" && depth < 16) {
|
|
42
|
-
const nestedSnapshot = getVNodeContextFrame(currentResult) ?? activeSnapshot;
|
|
43
|
-
const nestedInstance = createComponentInstance(nextComponentInstanceId(), currentResult.type, currentResult.props ?? {}, null);
|
|
44
|
-
nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);
|
|
45
|
-
nestedInstance.parentInstance = parentInstance;
|
|
46
|
-
nestedInstance.portalScope = parentInstance?.portalScope ?? nestedInstance.portalScope;
|
|
47
|
-
inheritComponentCleanupStrict(nestedInstance);
|
|
48
|
-
if (nestedSnapshot) nestedInstance.ownerFrame = nestedSnapshot;
|
|
49
|
-
const nextResult = withContext(nestedSnapshot ?? null, () => renderComponentInline(nestedInstance));
|
|
50
|
-
cleanupComponent(nestedInstance);
|
|
51
|
-
if (isPromiseLike(nextResult)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
52
|
-
activeSnapshot = nestedSnapshot ?? null;
|
|
53
|
-
currentResult = nextResult;
|
|
54
|
-
depth += 1;
|
|
55
|
-
}
|
|
56
|
-
return currentResult;
|
|
57
|
-
}
|
|
58
|
-
function resolveHostNestedComponentResult(host, retainedInstance, result, snapshot, retainedHostInstances) {
|
|
59
|
-
let currentResult = result;
|
|
60
|
-
let activeSnapshot = snapshot;
|
|
61
|
-
let depth = 0;
|
|
62
|
-
const retainedInstances = /* @__PURE__ */ new Set([retainedInstance]);
|
|
63
|
-
if (retainedHostInstances) for (const instance of retainedHostInstances) retainedInstances.add(instance);
|
|
64
|
-
const createdInstances = [];
|
|
65
|
-
while (_isDOMElement(currentResult) && typeof currentResult.type === "function" && depth < 16) {
|
|
66
|
-
const nestedSnapshot = getVNodeContextFrame(currentResult) ?? activeSnapshot;
|
|
67
|
-
let nestedInstance = findHostInstanceByType(host, currentResult.type);
|
|
68
|
-
const hadNestedInstance = !!nestedInstance;
|
|
69
|
-
if (!nestedInstance) {
|
|
70
|
-
nestedInstance = createComponentInstance(nextComponentInstanceId(), currentResult.type, currentResult.props ?? {}, null);
|
|
71
|
-
createdInstances.push(nestedInstance);
|
|
72
|
-
}
|
|
73
|
-
if (hadNestedInstance) captureInlineRenderSnapshot(nestedInstance);
|
|
74
|
-
setVNodeComponentInstance(currentResult, nestedInstance);
|
|
75
|
-
nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);
|
|
76
|
-
nestedInstance.parentInstance = retainedInstance;
|
|
77
|
-
nestedInstance.portalScope = retainedInstance.portalScope ?? nestedInstance.portalScope;
|
|
78
|
-
inheritComponentCleanupStrict(nestedInstance);
|
|
79
|
-
nestedInstance.props = (currentResult.props ?? {}) || {};
|
|
80
|
-
if (nestedSnapshot) nestedInstance.ownerFrame = nestedSnapshot;
|
|
81
|
-
const nextResult = withContext(nestedSnapshot ?? null, () => renderComponentInline(nestedInstance));
|
|
82
|
-
if (isPromiseLike(nextResult)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
83
|
-
retainedInstances.add(nestedInstance);
|
|
84
|
-
warnUnusedStateReads(nestedInstance);
|
|
85
|
-
activeSnapshot = nestedSnapshot ?? null;
|
|
86
|
-
currentResult = markVNodeTreeWithContextFrame(nextResult, activeSnapshot);
|
|
87
|
-
depth += 1;
|
|
88
|
-
}
|
|
89
|
-
const previousInstances = host.__ASKR_INSTANCES ?? [];
|
|
90
|
-
for (const instance of previousInstances) if (!retainedInstances.has(instance)) cleanupComponent(instance);
|
|
91
|
-
const nextHostInstances = previousInstances.filter((instance) => retainedInstances.has(instance));
|
|
92
|
-
for (const instance of retainedInstances) if (instance.target === host && !nextHostInstances.includes(instance)) nextHostInstances.push(instance);
|
|
93
|
-
host.__ASKR_INSTANCES = nextHostInstances;
|
|
94
|
-
host.__ASKR_INSTANCE = host.__ASKR_INSTANCES[0] ?? retainedInstance;
|
|
95
|
-
for (const instance of createdInstances) mountInstanceInline(instance, host);
|
|
96
|
-
return currentResult;
|
|
97
|
-
}
|
|
98
|
-
function resolveWrapperHostResult(host, result, snapshot) {
|
|
99
|
-
let currentResult = result;
|
|
100
|
-
let activeSnapshot = snapshot;
|
|
101
|
-
let depth = 0;
|
|
102
|
-
while (_isDOMElement(currentResult) && typeof currentResult.type === "function" && depth < 16) {
|
|
103
|
-
const nestedSnapshot = getVNodeContextFrame(currentResult) ?? activeSnapshot;
|
|
104
|
-
const nestedInstance = findHostInstanceByType(host, currentResult.type);
|
|
105
|
-
if (!nestedInstance) break;
|
|
106
|
-
captureInlineRenderSnapshot(nestedInstance);
|
|
107
|
-
nestedInstance.props = (currentResult.props ?? {}) || {};
|
|
108
|
-
nestedInstance.parentInstance = getCurrentInstance();
|
|
109
|
-
nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);
|
|
110
|
-
nestedInstance.portalScope = getCurrentInstance()?.portalScope ?? nestedInstance.portalScope;
|
|
111
|
-
inheritComponentCleanupStrict(nestedInstance);
|
|
112
|
-
if (nestedSnapshot) nestedInstance.ownerFrame = nestedSnapshot;
|
|
113
|
-
const nextResult = withContext(nestedSnapshot ?? null, () => renderComponentInline(nestedInstance));
|
|
114
|
-
if (isPromiseLike(nextResult)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
115
|
-
warnUnusedStateReads(nestedInstance);
|
|
116
|
-
activeSnapshot = nestedSnapshot ?? null;
|
|
117
|
-
currentResult = nextResult;
|
|
118
|
-
depth += 1;
|
|
119
|
-
}
|
|
120
|
-
return markVNodeTreeWithContextFrame(currentResult, activeSnapshot);
|
|
121
|
-
}
|
|
122
|
-
function syncComponentElement(currentDom, node, type, props, parentNamespace, forceChildrenUpdate = false, retainedHostInstances) {
|
|
123
|
-
const existingHost = currentDom instanceof Element ? currentDom : null;
|
|
124
|
-
const existingInstance = existingHost ? findHostInstanceByType(existingHost, type) : null;
|
|
125
|
-
if (!existingHost) return null;
|
|
126
|
-
const domHost = getRendererDOMHost();
|
|
127
|
-
if (!existingInstance || existingInstance.fn !== type) {
|
|
128
|
-
const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame() || null;
|
|
129
|
-
const hydrationInstance = createComponentInstance(nextComponentInstanceId(), type, props || {}, existingHost);
|
|
130
|
-
hydrationInstance.isRoot = isRouteRootComponentVNode(node);
|
|
131
|
-
hydrationInstance.portalScope = getCurrentInstance()?.portalScope ?? hydrationInstance.portalScope;
|
|
132
|
-
inheritComponentCleanupStrict(hydrationInstance);
|
|
133
|
-
setVNodeComponentInstance(node, hydrationInstance);
|
|
134
|
-
if (snapshot) hydrationInstance.ownerFrame = snapshot;
|
|
135
|
-
const result = withContext(snapshot, () => renderComponentInline(hydrationInstance));
|
|
136
|
-
if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
137
|
-
const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
|
|
138
|
-
if (scopedResult && typeof scopedResult === "object" && "type" in scopedResult && typeof scopedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, scopedResult.type)) {
|
|
139
|
-
pruneComponentHostInstances(existingHost, retainedHostInstances ? [hydrationInstance, ...retainedHostInstances] : [hydrationInstance]);
|
|
140
|
-
withContext(snapshot, () => {
|
|
141
|
-
domHost.updateElementFromVnode(existingHost, inheritComponentKey(scopedResult, node), true, forceChildrenUpdate || hydrationInstance.mounted === false);
|
|
142
|
-
materializeKey(existingHost, node, props);
|
|
143
|
-
});
|
|
144
|
-
mountInstanceInline(hydrationInstance, existingHost);
|
|
145
|
-
itemInstanceHydrationComplete(existingHost);
|
|
146
|
-
warnUnusedStateReads(hydrationInstance);
|
|
147
|
-
return existingHost;
|
|
148
|
-
}
|
|
149
|
-
const resolvedResult = resolveHostNestedComponentResult(existingHost, hydrationInstance, scopedResult, snapshot ?? null, retainedHostInstances);
|
|
150
|
-
if (_isDOMElement(resolvedResult) && typeof resolvedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, resolvedResult.type)) {
|
|
151
|
-
withContext(snapshot, () => {
|
|
152
|
-
domHost.updateElementFromVnode(existingHost, inheritComponentKey(resolvedResult, node), true, forceChildrenUpdate || hydrationInstance.mounted === false);
|
|
153
|
-
materializeKey(existingHost, node, props);
|
|
154
|
-
});
|
|
155
|
-
mountInstanceInline(hydrationInstance, existingHost);
|
|
156
|
-
itemInstanceHydrationComplete(existingHost);
|
|
157
|
-
warnUnusedStateReads(hydrationInstance);
|
|
158
|
-
return existingHost;
|
|
159
|
-
}
|
|
160
|
-
const nextDom = materializeComponentResultNode(hydrationInstance, scopedResult, parentNamespace);
|
|
161
|
-
if (nextDom instanceof Element) materializeKey(nextDom, node, props);
|
|
162
|
-
if (nextDom !== existingHost && existingHost.parentNode) {
|
|
163
|
-
existingHost.parentNode.replaceChild(nextDom, existingHost);
|
|
164
|
-
cleanupDetachedComponentHost(existingHost, hydrationInstance);
|
|
165
|
-
}
|
|
166
|
-
warnUnusedStateReads(hydrationInstance);
|
|
167
|
-
return nextDom;
|
|
168
|
-
}
|
|
169
|
-
const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame() || existingInstance.ownerFrame || null;
|
|
170
|
-
captureInlineRenderSnapshot(existingInstance);
|
|
171
|
-
existingInstance.props = props || {};
|
|
172
|
-
existingInstance.isRoot = isRouteRootComponentVNode(node);
|
|
173
|
-
existingInstance.portalScope = getCurrentInstance()?.portalScope ?? existingInstance.portalScope;
|
|
174
|
-
inheritComponentCleanupStrict(existingInstance);
|
|
175
|
-
if (snapshot) existingInstance.ownerFrame = snapshot;
|
|
176
|
-
const result = withContext(snapshot, () => renderComponentInline(existingInstance));
|
|
177
|
-
if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
178
|
-
const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
|
|
179
|
-
if (existingHost.__ASKR_WRAPPER_HOST) {
|
|
180
|
-
const wrapperResult = resolveWrapperHostResult(existingHost, scopedResult, snapshot ?? null);
|
|
181
|
-
domHost.updateElementChildren(existingHost, normalizeComponentChildren(wrapperResult));
|
|
182
|
-
warnUnusedStateReads(existingInstance);
|
|
183
|
-
return existingHost;
|
|
184
|
-
}
|
|
185
|
-
if (scopedResult && typeof scopedResult === "object" && "type" in scopedResult && typeof scopedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, scopedResult.type)) {
|
|
186
|
-
pruneComponentHostInstances(existingHost, retainedHostInstances ? [existingInstance, ...retainedHostInstances] : [existingInstance]);
|
|
187
|
-
withContext(snapshot, () => {
|
|
188
|
-
domHost.updateElementFromVnode(existingHost, inheritComponentKey(scopedResult, node), true, forceChildrenUpdate || existingInstance.mounted === false);
|
|
189
|
-
materializeKey(existingHost, node, props);
|
|
190
|
-
});
|
|
191
|
-
warnUnusedStateReads(existingInstance);
|
|
192
|
-
return existingHost;
|
|
193
|
-
}
|
|
194
|
-
const resolvedResult = resolveHostNestedComponentResult(existingHost, existingInstance, scopedResult, snapshot ?? null, retainedHostInstances);
|
|
195
|
-
if (_isDOMElement(resolvedResult) && typeof resolvedResult.type === "string" && tagNamesEqualIgnoreCase(existingHost.tagName, resolvedResult.type)) {
|
|
196
|
-
withContext(snapshot, () => {
|
|
197
|
-
domHost.updateElementFromVnode(existingHost, inheritComponentKey(resolvedResult, node), true, forceChildrenUpdate || existingInstance.mounted === false);
|
|
198
|
-
materializeKey(existingHost, node, props);
|
|
199
|
-
});
|
|
200
|
-
warnUnusedStateReads(existingInstance);
|
|
201
|
-
return existingHost;
|
|
202
|
-
}
|
|
203
|
-
const nextDom = materializeComponentResultNode(existingInstance, scopedResult, parentNamespace);
|
|
204
|
-
if (nextDom instanceof Element) materializeKey(nextDom, node, props);
|
|
205
|
-
if (nextDom !== existingHost && existingHost.parentNode) {
|
|
206
|
-
existingHost.parentNode.replaceChild(nextDom, existingHost);
|
|
207
|
-
cleanupDetachedComponentHost(existingHost, existingInstance);
|
|
208
|
-
}
|
|
209
|
-
warnUnusedStateReads(existingInstance);
|
|
210
|
-
return nextDom;
|
|
211
|
-
}
|
|
212
|
-
function itemInstanceHydrationComplete(host) {
|
|
213
|
-
const instance = host.__ASKR_INSTANCE;
|
|
214
|
-
if (instance) {
|
|
215
|
-
const scope = instance.scope;
|
|
216
|
-
if (scope) scope.hydrationPending = false;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
function createComponentElement(node, type, props, parentNamespace) {
|
|
220
|
-
const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame();
|
|
221
|
-
const componentFn = type;
|
|
222
|
-
if (componentFn.constructor.name === "AsyncFunction") throw new Error("Async components are not supported. Use resource() for async work.");
|
|
223
|
-
let childInstance = getVNodeComponentInstance(node);
|
|
224
|
-
const hadChildInstance = !!childInstance;
|
|
225
|
-
if (!childInstance) {
|
|
226
|
-
childInstance = createComponentInstance(nextComponentInstanceId(), componentFn, props || {}, null);
|
|
227
|
-
setVNodeComponentInstance(node, childInstance);
|
|
228
|
-
}
|
|
229
|
-
if (hadChildInstance) captureInlineRenderSnapshot(childInstance);
|
|
230
|
-
childInstance.portalScope = getCurrentInstance()?.portalScope ?? childInstance.portalScope;
|
|
231
|
-
childInstance.parentInstance = getCurrentInstance();
|
|
232
|
-
childInstance.props = props || {};
|
|
233
|
-
childInstance.isRoot = isRouteRootComponentVNode(node);
|
|
234
|
-
inheritComponentCleanupStrict(childInstance);
|
|
235
|
-
if (snapshot) childInstance.ownerFrame = snapshot;
|
|
236
|
-
const result = withContext(snapshot, () => renderComponentInline(childInstance));
|
|
237
|
-
if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
238
|
-
const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
|
|
239
|
-
const dom = withContext(snapshot, () => materializeComponentResultNode(childInstance, scopedResult, parentNamespace));
|
|
240
|
-
warnUnusedStateReads(childInstance);
|
|
241
|
-
if (dom instanceof Element) materializeKey(dom, node, props);
|
|
242
|
-
return dom;
|
|
243
|
-
}
|
|
244
|
-
//#endregion
|
|
245
|
-
export { createComponentElement, findHostInstanceByType, inheritComponentCleanupStrict, inheritComponentKey, isRouteRootComponentVNode, resolveNestedComponentResult, syncComponentElement };
|
|
246
|
-
|
|
247
|
-
//# sourceMappingURL=component-host.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-host.js","names":[],"sources":["../../src/renderer/component-host.ts"],"sourcesContent":["import { isPromiseLike } from '../common/promise';\nimport type { Props } from '../common/props';\nimport {\n captureInlineRenderSnapshot,\n cleanupComponent,\n createComponentInstance,\n getCurrentInstance,\n mountInstanceInline,\n renderComponentInline,\n warnUnusedStateReads,\n type ComponentFunction,\n type ComponentInstance,\n} from '../runtime';\nimport {\n getCurrentContextFrame,\n getVNodeContextFrame,\n markVNodeTreeWithContextFrame,\n withContext,\n type ContextFrame,\n} from '../runtime';\nimport { materializeKey } from './attributes';\nimport { normalizeComponentChildren } from './child-shape';\nimport {\n cleanupDetachedComponentHost,\n pruneComponentHostInstances,\n} from './component-host-cleanup';\nimport {\n getRendererDOMHost,\n type ElementWithContext,\n type InstanceHostElement,\n} from './dom-host';\nimport {\n findHostInstanceByType,\n getVNodeComponentInstance,\n inheritComponentCleanupStrict,\n inheritComponentKey,\n isRouteRootComponentVNode,\n nextComponentInstanceId,\n setVNodeComponentInstance,\n} from './component-host-instances';\nimport {\n _isDOMElement,\n type DOMElement,\n type JSXComponent,\n type VNode,\n} from './types';\nimport { tagNamesEqualIgnoreCase } from './utils';\nexport {\n findHostInstanceByType,\n inheritComponentCleanupStrict,\n inheritComponentKey,\n isRouteRootComponentVNode,\n nextComponentInstanceId,\n} from './component-host-instances';\nfunction materializeComponentResultNode(\n childInstance: ComponentInstance,\n result: unknown,\n parentNamespace?: string\n): Node {\n const dom = getRendererDOMHost().createDOMNode(result, parentNamespace);\n\n if (dom instanceof Element) {\n mountInstanceInline(childInstance, dom);\n return dom;\n }\n\n if (!dom) {\n const placeholder = document.createComment('');\n try {\n (\n placeholder as Comment & { __ASKR_INSTANCE?: ComponentInstance }\n ).__ASKR_INSTANCE = childInstance;\n } catch {\n // Ignore placeholder metadata failures.\n }\n childInstance._placeholder = placeholder;\n mountInstanceInline(childInstance, null);\n return placeholder;\n }\n\n const host = document.createElement('div') as InstanceHostElement;\n host.appendChild(dom);\n host.__ASKR_WRAPPER_HOST = true;\n mountInstanceInline(childInstance, host);\n return host;\n}\n\nexport function resolveNestedComponentResult(\n result: unknown,\n snapshot: ContextFrame | null,\n parentInstance: ComponentInstance | null\n): VNode {\n let currentResult = result as VNode;\n let activeSnapshot = snapshot;\n let depth = 0;\n\n while (\n _isDOMElement(currentResult) &&\n typeof currentResult.type === 'function' &&\n depth < 16\n ) {\n const nestedSnapshot =\n getVNodeContextFrame(currentResult) ?? activeSnapshot;\n const nestedInstance = createComponentInstance(\n nextComponentInstanceId(),\n currentResult.type as ComponentFunction,\n ((currentResult as DOMElement).props ?? {}) as Props,\n null\n );\n nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);\n nestedInstance.parentInstance = parentInstance;\n nestedInstance.portalScope =\n parentInstance?.portalScope ?? nestedInstance.portalScope;\n inheritComponentCleanupStrict(nestedInstance);\n\n if (nestedSnapshot) {\n nestedInstance.ownerFrame = nestedSnapshot;\n }\n\n const nextResult = withContext(nestedSnapshot ?? null, () =>\n renderComponentInline(nestedInstance)\n );\n cleanupComponent(nestedInstance);\n\n if (isPromiseLike(nextResult)) {\n throw new Error(\n 'Async components are not supported. Components must return synchronously.'\n );\n }\n\n activeSnapshot = nestedSnapshot ?? null;\n currentResult = nextResult as VNode;\n depth += 1;\n }\n\n return currentResult;\n}\n\nfunction resolveHostNestedComponentResult(\n host: InstanceHostElement,\n retainedInstance: ComponentInstance,\n result: unknown,\n snapshot: ContextFrame | null,\n retainedHostInstances?: Iterable<ComponentInstance>\n): VNode {\n let currentResult = result as VNode;\n let activeSnapshot = snapshot;\n let depth = 0;\n const retainedInstances = new Set<ComponentInstance>([retainedInstance]);\n if (retainedHostInstances) {\n for (const instance of retainedHostInstances) {\n retainedInstances.add(instance);\n }\n }\n const createdInstances: ComponentInstance[] = [];\n\n while (\n _isDOMElement(currentResult) &&\n typeof currentResult.type === 'function' &&\n depth < 16\n ) {\n const nestedSnapshot =\n getVNodeContextFrame(currentResult) ?? activeSnapshot;\n let nestedInstance = findHostInstanceByType(\n host,\n currentResult.type as ComponentFunction\n );\n const hadNestedInstance = !!nestedInstance;\n\n if (!nestedInstance) {\n nestedInstance = createComponentInstance(\n nextComponentInstanceId(),\n currentResult.type as ComponentFunction,\n ((currentResult as DOMElement).props ?? {}) as Props,\n null\n );\n createdInstances.push(nestedInstance);\n }\n\n if (hadNestedInstance) {\n captureInlineRenderSnapshot(nestedInstance);\n }\n\n setVNodeComponentInstance(currentResult, nestedInstance);\n nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);\n nestedInstance.parentInstance = retainedInstance;\n nestedInstance.portalScope =\n retainedInstance.portalScope ?? nestedInstance.portalScope;\n inheritComponentCleanupStrict(nestedInstance);\n nestedInstance.props =\n (((currentResult as DOMElement).props ?? {}) as Props) || {};\n\n if (nestedSnapshot) {\n nestedInstance.ownerFrame = nestedSnapshot;\n }\n\n const nextResult = withContext(nestedSnapshot ?? null, () =>\n renderComponentInline(nestedInstance)\n );\n\n if (isPromiseLike(nextResult)) {\n throw new Error(\n 'Async components are not supported. Components must return synchronously.'\n );\n }\n\n retainedInstances.add(nestedInstance);\n warnUnusedStateReads(nestedInstance);\n activeSnapshot = nestedSnapshot ?? null;\n currentResult = markVNodeTreeWithContextFrame(\n nextResult,\n activeSnapshot\n ) as VNode;\n depth += 1;\n }\n\n const previousInstances = host.__ASKR_INSTANCES ?? [];\n for (const instance of previousInstances) {\n if (!retainedInstances.has(instance)) {\n cleanupComponent(instance);\n }\n }\n\n const nextHostInstances = previousInstances.filter((instance) =>\n retainedInstances.has(instance)\n );\n for (const instance of retainedInstances) {\n if (instance.target === host && !nextHostInstances.includes(instance)) {\n nextHostInstances.push(instance);\n }\n }\n\n host.__ASKR_INSTANCES = nextHostInstances;\n host.__ASKR_INSTANCE = host.__ASKR_INSTANCES[0] ?? retainedInstance;\n\n for (const instance of createdInstances) {\n mountInstanceInline(instance, host);\n }\n\n return currentResult;\n}\n\nfunction resolveWrapperHostResult(\n host: InstanceHostElement,\n result: unknown,\n snapshot: ContextFrame | null\n): unknown {\n let currentResult = result;\n let activeSnapshot = snapshot;\n let depth = 0;\n\n while (\n _isDOMElement(currentResult) &&\n typeof currentResult.type === 'function' &&\n depth < 16\n ) {\n const nestedSnapshot =\n getVNodeContextFrame(currentResult) ?? activeSnapshot;\n const nestedInstance = findHostInstanceByType(\n host,\n currentResult.type as ComponentFunction\n );\n\n if (!nestedInstance) {\n break;\n }\n\n captureInlineRenderSnapshot(nestedInstance);\n\n nestedInstance.props =\n (((currentResult as DOMElement).props ?? {}) as Props) || {};\n nestedInstance.parentInstance = getCurrentInstance();\n nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);\n nestedInstance.portalScope =\n getCurrentInstance()?.portalScope ?? nestedInstance.portalScope;\n inheritComponentCleanupStrict(nestedInstance);\n\n if (nestedSnapshot) {\n nestedInstance.ownerFrame = nestedSnapshot;\n }\n\n const nextResult = withContext(nestedSnapshot ?? null, () =>\n renderComponentInline(nestedInstance)\n );\n\n if (isPromiseLike(nextResult)) {\n throw new Error(\n 'Async components are not supported. Components must return synchronously.'\n );\n }\n\n warnUnusedStateReads(nestedInstance);\n activeSnapshot = nestedSnapshot ?? null;\n currentResult = nextResult;\n depth += 1;\n }\n\n return markVNodeTreeWithContextFrame(currentResult, activeSnapshot);\n}\n\nexport function syncComponentElement(\n currentDom: Node | null,\n node: ElementWithContext,\n type: ComponentFunction,\n props: Record<string, unknown>,\n parentNamespace?: string,\n forceChildrenUpdate = false,\n retainedHostInstances?: Iterable<ComponentInstance>\n): Node | null {\n const existingHost =\n currentDom instanceof Element ? (currentDom as InstanceHostElement) : null;\n const existingInstance = existingHost\n ? findHostInstanceByType(existingHost, type)\n : null;\n if (!existingHost) {\n return null;\n }\n\n const domHost = getRendererDOMHost();\n\n if (!existingInstance || existingInstance.fn !== type) {\n const snapshot =\n getVNodeContextFrame(node) || getCurrentContextFrame() || null;\n const hydrationInstance = createComponentInstance(\n nextComponentInstanceId(),\n type,\n props || {},\n existingHost\n );\n hydrationInstance.isRoot = isRouteRootComponentVNode(node);\n hydrationInstance.portalScope =\n getCurrentInstance()?.portalScope ?? hydrationInstance.portalScope;\n inheritComponentCleanupStrict(hydrationInstance);\n\n setVNodeComponentInstance(node, hydrationInstance);\n\n if (snapshot) {\n hydrationInstance.ownerFrame = snapshot;\n }\n\n const result = withContext(snapshot, () =>\n renderComponentInline(hydrationInstance)\n );\n if (isPromiseLike(result)) {\n throw new Error(\n 'Async components are not supported. Components must return synchronously.'\n );\n }\n\n const scopedResult = markVNodeTreeWithContextFrame(\n result,\n snapshot ?? null\n );\n\n if (\n scopedResult &&\n typeof scopedResult === 'object' &&\n 'type' in (scopedResult as DOMElement) &&\n typeof (scopedResult as DOMElement).type === 'string' &&\n tagNamesEqualIgnoreCase(\n existingHost.tagName,\n (scopedResult as DOMElement).type as string\n )\n ) {\n pruneComponentHostInstances(\n existingHost,\n retainedHostInstances\n ? [hydrationInstance, ...retainedHostInstances]\n : [hydrationInstance]\n );\n withContext(snapshot, () => {\n domHost.updateElementFromVnode(\n existingHost,\n inheritComponentKey(scopedResult as DOMElement, node),\n true,\n forceChildrenUpdate || hydrationInstance.mounted === false\n );\n materializeKey(existingHost, node, props);\n });\n mountInstanceInline(hydrationInstance, existingHost);\n itemInstanceHydrationComplete(existingHost);\n warnUnusedStateReads(hydrationInstance);\n return existingHost;\n }\n\n const resolvedResult = resolveHostNestedComponentResult(\n existingHost,\n hydrationInstance,\n scopedResult,\n snapshot ?? null,\n retainedHostInstances\n );\n if (\n _isDOMElement(resolvedResult) &&\n typeof resolvedResult.type === 'string' &&\n tagNamesEqualIgnoreCase(existingHost.tagName, resolvedResult.type)\n ) {\n withContext(snapshot, () => {\n domHost.updateElementFromVnode(\n existingHost,\n inheritComponentKey(resolvedResult, node),\n true,\n forceChildrenUpdate || hydrationInstance.mounted === false\n );\n materializeKey(existingHost, node, props);\n });\n mountInstanceInline(hydrationInstance, existingHost);\n itemInstanceHydrationComplete(existingHost);\n warnUnusedStateReads(hydrationInstance);\n return existingHost;\n }\n\n const nextDom = materializeComponentResultNode(\n hydrationInstance,\n scopedResult,\n parentNamespace\n );\n\n if (nextDom instanceof Element) {\n materializeKey(nextDom, node, props);\n }\n\n if (nextDom !== existingHost && existingHost.parentNode) {\n existingHost.parentNode.replaceChild(nextDom, existingHost);\n cleanupDetachedComponentHost(existingHost, hydrationInstance);\n }\n\n warnUnusedStateReads(hydrationInstance);\n return nextDom;\n }\n\n const snapshot =\n getVNodeContextFrame(node) ||\n getCurrentContextFrame() ||\n existingInstance.ownerFrame ||\n null;\n captureInlineRenderSnapshot(existingInstance);\n existingInstance.props = props || {};\n existingInstance.isRoot = isRouteRootComponentVNode(node);\n existingInstance.portalScope =\n getCurrentInstance()?.portalScope ?? existingInstance.portalScope;\n inheritComponentCleanupStrict(existingInstance);\n\n if (snapshot) {\n existingInstance.ownerFrame = snapshot;\n }\n\n const result = withContext(snapshot, () =>\n renderComponentInline(existingInstance)\n );\n if (isPromiseLike(result)) {\n throw new Error(\n 'Async components are not supported. Components must return synchronously.'\n );\n }\n const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);\n\n if (existingHost.__ASKR_WRAPPER_HOST) {\n const wrapperResult = resolveWrapperHostResult(\n existingHost,\n scopedResult,\n snapshot ?? null\n );\n domHost.updateElementChildren(\n existingHost,\n normalizeComponentChildren(wrapperResult) as VNode[]\n );\n warnUnusedStateReads(existingInstance);\n return existingHost;\n }\n\n if (\n scopedResult &&\n typeof scopedResult === 'object' &&\n 'type' in (scopedResult as DOMElement) &&\n typeof (scopedResult as DOMElement).type === 'string' &&\n tagNamesEqualIgnoreCase(\n existingHost.tagName,\n (scopedResult as DOMElement).type as string\n )\n ) {\n pruneComponentHostInstances(\n existingHost,\n retainedHostInstances\n ? [existingInstance, ...retainedHostInstances]\n : [existingInstance]\n );\n withContext(snapshot, () => {\n domHost.updateElementFromVnode(\n existingHost,\n inheritComponentKey(scopedResult as DOMElement, node),\n true,\n forceChildrenUpdate || existingInstance.mounted === false\n );\n materializeKey(existingHost, node, props);\n });\n warnUnusedStateReads(existingInstance);\n return existingHost;\n }\n\n const resolvedResult = resolveHostNestedComponentResult(\n existingHost,\n existingInstance,\n scopedResult,\n snapshot ?? null,\n retainedHostInstances\n );\n if (\n _isDOMElement(resolvedResult) &&\n typeof resolvedResult.type === 'string' &&\n tagNamesEqualIgnoreCase(existingHost.tagName, resolvedResult.type)\n ) {\n withContext(snapshot, () => {\n domHost.updateElementFromVnode(\n existingHost,\n inheritComponentKey(resolvedResult, node),\n true,\n forceChildrenUpdate || existingInstance.mounted === false\n );\n materializeKey(existingHost, node, props);\n });\n warnUnusedStateReads(existingInstance);\n return existingHost;\n }\n\n const nextDom = materializeComponentResultNode(\n existingInstance,\n scopedResult,\n parentNamespace\n );\n\n if (nextDom instanceof Element) {\n materializeKey(nextDom, node, props);\n }\n\n if (nextDom !== existingHost && existingHost.parentNode) {\n existingHost.parentNode.replaceChild(nextDom, existingHost);\n cleanupDetachedComponentHost(existingHost, existingInstance);\n }\n\n warnUnusedStateReads(existingInstance);\n return nextDom;\n}\n\nfunction itemInstanceHydrationComplete(host: InstanceHostElement): void {\n const instance = host.__ASKR_INSTANCE;\n if (instance) {\n const scope = (\n instance as unknown as { scope?: { hydrationPending?: boolean } }\n ).scope;\n if (scope) {\n scope.hydrationPending = false;\n }\n }\n}\n\nexport function createComponentElement(\n node: ElementWithContext,\n type: JSXComponent,\n props: Record<string, unknown>,\n parentNamespace?: string\n): Node {\n const frame = getVNodeContextFrame(node);\n const snapshot = frame || getCurrentContextFrame();\n\n const componentFn = type as unknown as (props: Props) => unknown;\n const isAsync = componentFn.constructor.name === 'AsyncFunction';\n\n if (isAsync) {\n throw new Error(\n 'Async components are not supported. Use resource() for async work.'\n );\n }\n\n let childInstance = getVNodeComponentInstance(node);\n const hadChildInstance = !!childInstance;\n if (!childInstance) {\n childInstance = createComponentInstance(\n nextComponentInstanceId(),\n componentFn as ComponentFunction,\n props || {},\n null\n );\n setVNodeComponentInstance(node, childInstance);\n }\n\n if (hadChildInstance) {\n captureInlineRenderSnapshot(childInstance);\n }\n\n childInstance.portalScope =\n getCurrentInstance()?.portalScope ?? childInstance.portalScope;\n childInstance.parentInstance = getCurrentInstance();\n childInstance.props = props || {};\n childInstance.isRoot = isRouteRootComponentVNode(node);\n inheritComponentCleanupStrict(childInstance);\n\n if (snapshot) {\n childInstance.ownerFrame = snapshot;\n }\n\n const result = withContext(snapshot, () =>\n renderComponentInline(childInstance)\n );\n\n if (isPromiseLike(result)) {\n throw new Error(\n 'Async components are not supported. Components must return synchronously.'\n );\n }\n\n const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);\n\n const dom = withContext(snapshot, () =>\n materializeComponentResultNode(childInstance, scopedResult, parentNamespace)\n );\n\n warnUnusedStateReads(childInstance);\n\n if (dom instanceof Element) {\n materializeKey(dom, node, props);\n }\n return dom;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsDA,SAAS,+BACP,eACA,QACA,iBACM;CACN,MAAM,MAAM,mBAAmB,CAAC,CAAC,cAAc,QAAQ,eAAe;CAEtE,IAAI,eAAe,SAAS;EAC1B,oBAAoB,eAAe,GAAG;EACtC,OAAO;CACT;CAEA,IAAI,CAAC,KAAK;EACR,MAAM,cAAc,SAAS,cAAc,EAAE;EAC7C,IAAI;GACF,YAEE,kBAAkB;EACtB,QAAQ,CAER;EACA,cAAc,eAAe;EAC7B,oBAAoB,eAAe,IAAI;EACvC,OAAO;CACT;CAEA,MAAM,OAAO,SAAS,cAAc,KAAK;CACzC,KAAK,YAAY,GAAG;CACpB,KAAK,sBAAsB;CAC3B,oBAAoB,eAAe,IAAI;CACvC,OAAO;AACT;AAEA,SAAgB,6BACd,QACA,UACA,gBACO;CACP,IAAI,gBAAgB;CACpB,IAAI,iBAAiB;CACrB,IAAI,QAAQ;CAEZ,OACE,cAAc,aAAa,KAC3B,OAAO,cAAc,SAAS,cAC9B,QAAQ,IACR;EACA,MAAM,iBACJ,qBAAqB,aAAa,KAAK;EACzC,MAAM,iBAAiB,wBACrB,wBAAwB,GACxB,cAAc,MACZ,cAA6B,SAAS,CAAC,GACzC,IACF;EACA,eAAe,SAAS,0BAA0B,aAAa;EAC/D,eAAe,iBAAiB;EAChC,eAAe,cACb,gBAAgB,eAAe,e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mB,CAAC,CAAC;CAC3B,IAAI,CAAC,eAAe;EAClB,gBAAgB,wBACd,wBAAwB,GACxB,aACA,SAAS,CAAC,GACV,IACF;EACA,0BAA0B,MAAM,aAAa;CAC/C;CAEA,IAAI,kBACF,4BAA4B,aAAa;CAG3C,cAAc,cACZ,mBAAmB,CAAC,EAAE,eAAe,cAAc;CACrD,cAAc,iBAAiB,mBAAmB;CAClD,cAAc,QAAQ,SAAS,CAAC;CAChC,cAAc,SAAS,0BAA0B,IAAI;CACrD,8BAA8B,aAAa;CAE3C,IAAI,UACF,cAAc,aAAa;CAG7B,MAAM,SAAS,YAAY,gBACzB,sBAAsB,aAAa,CACrC;CAEA,IAAI,cAAc,MAAM,GACtB,MAAM,IAAI,MACR,2EACF;CAGF,MAAM,eAAe,8BAA8B,QAAQ,YAAY,IAAI;CAE3E,MAAM,MAAM,YAAY,gBACtB,+BAA+B,eAAe,cAAc,eAAe,CAC7E;CAEA,qBAAqB,aAAa;CAElC,IAAI,eAAe,SACjB,eAAe,KAAK,MAAM,KAAK;CAEjC,OAAO;AACT"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/renderer/dom-host.ts
|
|
2
|
-
let rendererDOMHost = null;
|
|
3
|
-
function configureRendererDOMHost(host) {
|
|
4
|
-
rendererDOMHost = host;
|
|
5
|
-
}
|
|
6
|
-
function getRendererDOMHost() {
|
|
7
|
-
if (!rendererDOMHost) throw new Error("[askr] Renderer DOM host is not configured.");
|
|
8
|
-
return rendererDOMHost;
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { configureRendererDOMHost, getRendererDOMHost };
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=dom-host.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom-host.js","names":[],"sources":["../../src/renderer/dom-host.ts"],"sourcesContent":["import type { ComponentFunction, ComponentInstance } from '../runtime';\nimport type { ContextFrame } from '../runtime';\nimport type { DOMElement, VNode } from './types';\n\nexport type ElementWithContext = DOMElement & {\n [key: symbol]: ContextFrame | boolean | undefined;\n __instance?: ComponentInstance;\n};\n\nexport type InstanceHostElement = Element & {\n __ASKR_INSTANCE?: ComponentInstance;\n __ASKR_INSTANCES?: ComponentInstance[];\n __ASKR_WRAPPER_HOST?: boolean;\n};\n\nexport interface RendererDOMHost {\n createDOMNode(node: unknown, parentNamespace?: string): Node | null;\n syncComponentElement(\n currentDom: Node | null,\n node: ElementWithContext,\n type: ComponentFunction,\n props: Record<string, unknown>,\n parentNamespace?: string,\n forceChildrenUpdate?: boolean,\n retainedHostInstances?: Iterable<ComponentInstance>\n ): Node | null;\n updateElementFromVnode(\n el: Element,\n vnode: VNode,\n updateChildren?: boolean,\n forceChildrenUpdate?: boolean\n ): void;\n updateElementChildren(\n el: Element,\n children: VNode | VNode[] | undefined,\n forceUpdate?: boolean\n ): void;\n tryPatchStableForDirtyItem(scope: { dom?: Node; vnode?: VNode }): boolean;\n}\n\nlet rendererDOMHost: RendererDOMHost | null = null;\n\nexport function configureRendererDOMHost(host: RendererDOMHost): void {\n rendererDOMHost = host;\n}\n\nexport function getRendererDOMHost(): RendererDOMHost {\n if (!rendererDOMHost) {\n throw new Error('[askr] Renderer DOM host is not configured.');\n }\n return rendererDOMHost;\n}\n"],"mappings":";AAwCA,IAAI,kBAA0C;AAE9C,SAAgB,yBAAyB,MAA6B;CACpE,kBAAkB;AACpB;AAEA,SAAgB,qBAAsC;CACpD,IAAI,CAAC,iBACH,MAAM,IAAI,MAAM,6CAA6C;CAE/D,OAAO;AACT"}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { __ERROR_BOUNDARY__, __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 { isBenchMetricScopeActive, recordBenchCounter } from "../runtime/for-bench.js";
|
|
7
|
-
import "../runtime/index.js";
|
|
8
|
-
import { removeAllListeners, removeElementReactiveProps, teardownNodeSubtree, updateElementRef } from "./cleanup.js";
|
|
9
|
-
import "./env.js";
|
|
10
|
-
import "../jsx-runtime.js";
|
|
11
|
-
import { applyStaticScalarPropsToElement, hasMatchingStaticProps, materializeKey } from "./attributes.js";
|
|
12
|
-
import { createElementForNamespace, resolveChildNamespace } from "./namespaces.js";
|
|
13
|
-
import { configureBoundaryDOMHost, createForBoundary, getControlBoundaryState, getDirectControlBoundaryVNode, registerControlBoundaryCommitOwner } from "./boundaries.js";
|
|
14
|
-
import { performBulkPositionalKeyedTextUpdate } from "./children-fastpath.js";
|
|
15
|
-
import { isBulkTextFastPathEligible, performBulkTextReplace } from "./children.js";
|
|
16
|
-
import { maybeWarnMissingKeys, tryGetStaticCreateFastPathShape } from "./child-shape.js";
|
|
17
|
-
import { configureRendererDOMHost } from "./dom-host.js";
|
|
18
|
-
import { createComponentElement, syncComponentElement } from "./component-host.js";
|
|
19
|
-
import { syncReactiveScalarChild } from "./reactive-children.js";
|
|
20
|
-
import { canReuseStaticSubtree, setStaticChildSlotsCacheEnabled } from "./static-reuse.js";
|
|
21
|
-
import { rendererReactiveChildDOMHost, updateElementChildren, updateUnkeyedChildren } from "./element-children.js";
|
|
22
|
-
import { createErrorBoundaryElement } from "./error-boundary-dom.js";
|
|
23
|
-
import { applyPropsToElement, hasTrackedElementPropBindings, markReactivePropsDirtySource, syncElementPropBindings } from "./prop-bindings.js";
|
|
24
|
-
import { runRetainedElementUpdate } from "./retained-element-rollback.js";
|
|
25
|
-
import { tryPatchStableForDirtyItem } from "./stable-patch.js";
|
|
26
|
-
//#region src/renderer/dom-internal.ts
|
|
27
|
-
const IS_DOM_AVAILABLE = typeof document !== "undefined";
|
|
28
|
-
function getHydrationSkipBoundary(el) {
|
|
29
|
-
return el.closest("[data-skip-hydrate=\"true\"]");
|
|
30
|
-
}
|
|
31
|
-
function isHydrationSkipped(el) {
|
|
32
|
-
return getHydrationSkipBoundary(el) !== null;
|
|
33
|
-
}
|
|
34
|
-
function clearHydrationDeferredSubtree(el) {
|
|
35
|
-
const boundary = getHydrationSkipBoundary(el);
|
|
36
|
-
if (!boundary) return;
|
|
37
|
-
if (boundary === el) {
|
|
38
|
-
removeAllListeners(el);
|
|
39
|
-
removeElementReactiveProps(el);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function createDOMNode(node, parentNamespace) {
|
|
43
|
-
if (!IS_DOM_AVAILABLE) {
|
|
44
|
-
if (getRuntimeEnv().NODE_ENV !== "production") try {
|
|
45
|
-
logger.warn("[Askr] createDOMNode called in non-DOM environment");
|
|
46
|
-
} catch {}
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
if (typeof node === "string") {
|
|
50
|
-
if (isBenchMetricScopeActive("coldCreate")) recordBenchCounter("domNodesCreated");
|
|
51
|
-
return document.createTextNode(node);
|
|
52
|
-
}
|
|
53
|
-
if (typeof node === "number") {
|
|
54
|
-
if (isBenchMetricScopeActive("coldCreate")) recordBenchCounter("domNodesCreated");
|
|
55
|
-
return document.createTextNode(String(node));
|
|
56
|
-
}
|
|
57
|
-
if (!node) return null;
|
|
58
|
-
if (Array.isArray(node)) {
|
|
59
|
-
maybeWarnMissingKeys(node);
|
|
60
|
-
const fragment = document.createDocumentFragment();
|
|
61
|
-
for (const child of node) {
|
|
62
|
-
const dom = createDOMNode(child, parentNamespace);
|
|
63
|
-
if (dom) fragment.appendChild(dom);
|
|
64
|
-
}
|
|
65
|
-
return fragment;
|
|
66
|
-
}
|
|
67
|
-
if (typeof node === "object" && node !== null && "type" in node) {
|
|
68
|
-
const type = node.type;
|
|
69
|
-
const props = node.props || {};
|
|
70
|
-
if (typeof type === "string") return createIntrinsicElement(node, type, props, parentNamespace);
|
|
71
|
-
if (typeof type === "function") return createComponentElement(node, type, props, parentNamespace);
|
|
72
|
-
if (type === __FOR_BOUNDARY__) return createForBoundary(node, props, parentNamespace);
|
|
73
|
-
if (type === __ERROR_BOUNDARY__) return createErrorBoundaryElement(node, props, parentNamespace);
|
|
74
|
-
if (typeof type === "symbol" && (type === Fragment || String(type) === "Symbol(Fragment)")) return createFragmentElement(node, props, parentNamespace);
|
|
75
|
-
}
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
function createIntrinsicElement(node, type, props, parentNamespace) {
|
|
79
|
-
const children = props.children ?? node.children;
|
|
80
|
-
const elementNamespace = resolveChildNamespace(type, parentNamespace);
|
|
81
|
-
const el = createElementForNamespace(type, parentNamespace);
|
|
82
|
-
if (isBenchMetricScopeActive("coldCreate")) recordBenchCounter("domNodesCreated");
|
|
83
|
-
materializeKey(el, node, props);
|
|
84
|
-
const staticCreateFastPath = tryGetStaticCreateFastPathShape(props, children);
|
|
85
|
-
if (staticCreateFastPath) {
|
|
86
|
-
applyStaticScalarPropsToElement(el, props, type);
|
|
87
|
-
if (staticCreateFastPath.textContent !== null) {
|
|
88
|
-
el.textContent = staticCreateFastPath.textContent;
|
|
89
|
-
if (isBenchMetricScopeActive("coldCreate")) recordBenchCounter("domNodesCreated");
|
|
90
|
-
}
|
|
91
|
-
return el;
|
|
92
|
-
}
|
|
93
|
-
applyPropsToElement(el, props, type, isHydrationSkipped);
|
|
94
|
-
if (children !== null && children !== void 0) {
|
|
95
|
-
const controlBoundaryVNode = getDirectControlBoundaryVNode(children);
|
|
96
|
-
if (controlBoundaryVNode) {
|
|
97
|
-
const controlState = getControlBoundaryState(controlBoundaryVNode);
|
|
98
|
-
if (!controlState) throw new Error("[createIntrinsicElement] Control boundary missing internal state");
|
|
99
|
-
registerControlBoundaryCommitOwner(el, controlState);
|
|
100
|
-
}
|
|
101
|
-
if (syncReactiveScalarChild(el, children, rendererReactiveChildDOMHost)) return el;
|
|
102
|
-
if (Array.isArray(children)) {
|
|
103
|
-
maybeWarnMissingKeys(children);
|
|
104
|
-
if (children.length > 1) {
|
|
105
|
-
const childFrag = document.createDocumentFragment();
|
|
106
|
-
for (const child of children) {
|
|
107
|
-
const dom = createDOMNode(child, elementNamespace);
|
|
108
|
-
if (dom) childFrag.appendChild(dom);
|
|
109
|
-
}
|
|
110
|
-
el.appendChild(childFrag);
|
|
111
|
-
} else if (children.length === 1) {
|
|
112
|
-
const dom = createDOMNode(children[0], elementNamespace);
|
|
113
|
-
if (dom) el.appendChild(dom);
|
|
114
|
-
}
|
|
115
|
-
} else {
|
|
116
|
-
const dom = createDOMNode(children, elementNamespace);
|
|
117
|
-
if (dom) el.appendChild(dom);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return el;
|
|
121
|
-
}
|
|
122
|
-
function createFragmentElement(node, props, parentNamespace) {
|
|
123
|
-
const fragment = document.createDocumentFragment();
|
|
124
|
-
const children = props.children ?? node.children;
|
|
125
|
-
if (children) if (Array.isArray(children)) {
|
|
126
|
-
maybeWarnMissingKeys(children);
|
|
127
|
-
for (const child of children) {
|
|
128
|
-
const dom = createDOMNode(child, parentNamespace);
|
|
129
|
-
if (dom) fragment.appendChild(dom);
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
const dom = createDOMNode(children, parentNamespace);
|
|
133
|
-
if (dom) fragment.appendChild(dom);
|
|
134
|
-
}
|
|
135
|
-
return fragment;
|
|
136
|
-
}
|
|
137
|
-
function updateElementFromVnode(el, vnode, updateChildren = true, forceChildrenUpdate = false) {
|
|
138
|
-
runRetainedElementUpdate(el, teardownNodeSubtree, () => {
|
|
139
|
-
applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpdate);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
function applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpdate) {
|
|
143
|
-
if (!_isDOMElement(vnode)) return;
|
|
144
|
-
const props = vnode.props || {};
|
|
145
|
-
const domVNode = vnode;
|
|
146
|
-
if (isHydrationSkipped(el)) {
|
|
147
|
-
clearHydrationDeferredSubtree(el);
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
materializeKey(el, vnode, props);
|
|
151
|
-
updateElementRef(el, props.ref);
|
|
152
|
-
if (!hasTrackedElementPropBindings(el)) {
|
|
153
|
-
if (!forceChildrenUpdate && hasMatchingStaticProps(el, props, vnode.type)) {
|
|
154
|
-
if (updateChildren) {
|
|
155
|
-
const children = props.children ?? vnode.children;
|
|
156
|
-
if (!forceChildrenUpdate && canReuseStaticSubtree(el, domVNode)) return;
|
|
157
|
-
updateElementChildren(el, children, forceChildrenUpdate);
|
|
158
|
-
}
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
const usesReactiveChildren = syncReactiveScalarChild(el, props.children ?? domVNode.children, rendererReactiveChildDOMHost);
|
|
163
|
-
syncElementPropBindings(el, domVNode, props, usesReactiveChildren);
|
|
164
|
-
if (updateChildren) {
|
|
165
|
-
const children = props.children ?? vnode.children;
|
|
166
|
-
if (usesReactiveChildren) return;
|
|
167
|
-
updateElementChildren(el, children, forceChildrenUpdate);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
configureRendererDOMHost({
|
|
171
|
-
createDOMNode,
|
|
172
|
-
syncComponentElement,
|
|
173
|
-
updateElementFromVnode,
|
|
174
|
-
updateElementChildren,
|
|
175
|
-
tryPatchStableForDirtyItem
|
|
176
|
-
});
|
|
177
|
-
configureBoundaryDOMHost({
|
|
178
|
-
createDOMNode,
|
|
179
|
-
syncComponentElement,
|
|
180
|
-
updateElementFromVnode,
|
|
181
|
-
tryPatchStableForDirtyItem
|
|
182
|
-
});
|
|
183
|
-
//#endregion
|
|
184
|
-
export { IS_DOM_AVAILABLE, createDOMNode, isBulkTextFastPathEligible, markReactivePropsDirtySource, performBulkPositionalKeyedTextUpdate, performBulkTextReplace, setStaticChildSlotsCacheEnabled, syncComponentElement, tryPatchStableForDirtyItem, updateElementChildren, updateElementFromVnode, updateUnkeyedChildren };
|
|
185
|
-
|
|
186
|
-
//# sourceMappingURL=dom-internal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom-internal.js","names":[],"sources":["../../src/renderer/dom-internal.ts"],"sourcesContent":["import { logger } from '../common/logger';\nimport { Fragment } from '../jsx/jsx-runtime';\nimport { isBenchMetricScopeActive, recordBenchCounter } from '../runtime';\nimport { __ERROR_BOUNDARY__, __FOR_BOUNDARY__ } from '../common/vnode';\nimport {\n applyStaticScalarPropsToElement,\n hasMatchingStaticProps,\n materializeKey,\n} from './attributes';\nimport {\n configureBoundaryDOMHost,\n createForBoundary,\n getControlBoundaryState,\n getDirectControlBoundaryVNode,\n registerControlBoundaryCommitOwner,\n} from './boundaries';\nimport {\n isBulkTextFastPathEligible,\n performBulkPositionalKeyedTextUpdate,\n performBulkTextReplace,\n} from './children';\nimport {\n maybeWarnMissingKeys,\n tryGetStaticCreateFastPathShape,\n} from './child-shape';\nimport {\n removeAllListeners,\n removeElementReactiveProps,\n teardownNodeSubtree,\n updateElementRef,\n} from './cleanup';\nimport { createComponentElement, syncComponentElement } from './component-host';\nimport { configureRendererDOMHost, type ElementWithContext } from './dom-host';\nimport {\n rendererReactiveChildDOMHost,\n updateElementChildren,\n updateUnkeyedChildren,\n} from './element-children';\nimport {\n createErrorBoundaryElement,\n type ErrorBoundaryVNode,\n} from './error-boundary-dom';\nimport { getRuntimeEnv } from './env';\nimport { createElementForNamespace, resolveChildNamespace } from './namespaces';\nimport {\n applyPropsToElement,\n hasTrackedElementPropBindings,\n syncElementPropBindings,\n} from './prop-bindings';\nimport { syncReactiveScalarChild } from './reactive-children';\nimport { runRetainedElementUpdate } from './retained-element-rollback';\nimport { canReuseStaticSubtree } from './static-reuse';\nimport { tryPatchStableForDirtyItem } from './stable-patch';\nimport {\n _isDOMElement,\n type DOMElement,\n type JSXComponent,\n type VNode,\n} from './types';\n\nexport { createForBoundary, commitForBoundaryChildren } from './boundaries';\nexport { markReactivePropsDirtySource } from './prop-bindings';\nexport { setStaticChildSlotsCacheEnabled } from './static-reuse';\nexport {\n isBulkTextFastPathEligible,\n performBulkPositionalKeyedTextUpdate,\n performBulkTextReplace,\n};\nexport {\n syncComponentElement,\n updateElementChildren,\n updateUnkeyedChildren,\n tryPatchStableForDirtyItem,\n};\n\nexport const IS_DOM_AVAILABLE = typeof document !== 'undefined';\n\nfunction getHydrationSkipBoundary(el: Element): Element | null {\n return el.closest('[data-skip-hydrate=\"true\"]');\n}\n\nfunction isHydrationSkipped(el: Element): boolean {\n return getHydrationSkipBoundary(el) !== null;\n}\n\nfunction clearHydrationDeferredSubtree(el: Element): void {\n const boundary = getHydrationSkipBoundary(el);\n if (!boundary) return;\n if (boundary === el) {\n removeAllListeners(el);\n removeElementReactiveProps(el);\n }\n}\n\nexport function createDOMNode(\n node: unknown,\n parentNamespace?: string\n): Node | null {\n if (!IS_DOM_AVAILABLE) {\n if (getRuntimeEnv().NODE_ENV !== 'production') {\n try {\n logger.warn('[Askr] createDOMNode called in non-DOM environment');\n } catch {\n // ignore\n }\n }\n return null;\n }\n\n if (typeof node === 'string') {\n if (isBenchMetricScopeActive('coldCreate')) {\n recordBenchCounter('domNodesCreated');\n }\n return document.createTextNode(node);\n }\n if (typeof node === 'number') {\n if (isBenchMetricScopeActive('coldCreate')) {\n recordBenchCounter('domNodesCreated');\n }\n return document.createTextNode(String(node));\n }\n\n if (!node) {\n return null;\n }\n\n if (Array.isArray(node)) {\n maybeWarnMissingKeys(node);\n const fragment = document.createDocumentFragment();\n for (const child of node) {\n const dom = createDOMNode(child, parentNamespace);\n if (dom) fragment.appendChild(dom);\n }\n return fragment;\n }\n\n if (typeof node === 'object' && node !== null && 'type' in node) {\n const type = (node as DOMElement).type;\n const props = ((node as DOMElement).props || {}) as Record<string, unknown>;\n\n if (typeof type === 'string') {\n return createIntrinsicElement(\n node as DOMElement,\n type,\n props,\n parentNamespace\n );\n }\n\n if (typeof type === 'function') {\n return createComponentElement(\n node as ElementWithContext,\n type as JSXComponent,\n props,\n parentNamespace\n );\n }\n\n if (type === __FOR_BOUNDARY__) {\n return createForBoundary(node as DOMElement, props, parentNamespace);\n }\n\n if (type === __ERROR_BOUNDARY__) {\n return createErrorBoundaryElement(\n node as ErrorBoundaryVNode,\n props,\n parentNamespace\n );\n }\n\n if (\n typeof type === 'symbol' &&\n (type === Fragment || String(type) === 'Symbol(Fragment)')\n ) {\n return createFragmentElement(node as DOMElement, props, parentNamespace);\n }\n }\n\n return null;\n}\n\nfunction createIntrinsicElement(\n node: DOMElement,\n type: string,\n props: Record<string, unknown>,\n parentNamespace?: string\n): Element {\n const children = props.children ?? node.children;\n const elementNamespace = resolveChildNamespace(type, parentNamespace);\n const el = createElementForNamespace(type, parentNamespace);\n\n if (isBenchMetricScopeActive('coldCreate')) {\n recordBenchCounter('domNodesCreated');\n }\n\n materializeKey(el, node, props);\n\n const staticCreateFastPath = tryGetStaticCreateFastPathShape(props, children);\n\n if (staticCreateFastPath) {\n applyStaticScalarPropsToElement(el, props, type);\n if (staticCreateFastPath.textContent !== null) {\n el.textContent = staticCreateFastPath.textContent;\n if (isBenchMetricScopeActive('coldCreate')) {\n recordBenchCounter('domNodesCreated');\n }\n }\n return el;\n }\n\n applyPropsToElement(el, props, type, isHydrationSkipped);\n\n if (children !== null && children !== undefined) {\n const controlBoundaryVNode = getDirectControlBoundaryVNode(children);\n if (controlBoundaryVNode) {\n const controlState = getControlBoundaryState(controlBoundaryVNode);\n if (!controlState) {\n throw new Error(\n '[createIntrinsicElement] Control boundary missing internal state'\n );\n }\n registerControlBoundaryCommitOwner(el, controlState);\n }\n\n if (syncReactiveScalarChild(el, children, rendererReactiveChildDOMHost)) {\n return el;\n }\n\n if (Array.isArray(children)) {\n maybeWarnMissingKeys(children);\n if (children.length > 1) {\n const childFrag = document.createDocumentFragment();\n for (const child of children) {\n const dom = createDOMNode(child, elementNamespace);\n if (dom) childFrag.appendChild(dom);\n }\n el.appendChild(childFrag);\n } else if (children.length === 1) {\n const dom = createDOMNode(children[0], elementNamespace);\n if (dom) el.appendChild(dom);\n }\n } else {\n const dom = createDOMNode(children, elementNamespace);\n if (dom) el.appendChild(dom);\n }\n }\n return el;\n}\n\nfunction createFragmentElement(\n node: DOMElement,\n props: Record<string, unknown>,\n parentNamespace?: string\n): DocumentFragment {\n const fragment = document.createDocumentFragment();\n const children = props.children ?? node.children;\n if (children) {\n if (Array.isArray(children)) {\n maybeWarnMissingKeys(children);\n for (const child of children) {\n const dom = createDOMNode(child, parentNamespace);\n if (dom) fragment.appendChild(dom);\n }\n } else {\n const dom = createDOMNode(children, parentNamespace);\n if (dom) fragment.appendChild(dom);\n }\n }\n return fragment;\n}\n\nexport function updateElementFromVnode(\n el: Element,\n vnode: VNode,\n updateChildren = true,\n forceChildrenUpdate = false\n): void {\n runRetainedElementUpdate(el, teardownNodeSubtree, () => {\n applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpdate);\n });\n}\n\nfunction applyElementUpdateFromVnode(\n el: Element,\n vnode: VNode,\n updateChildren: boolean,\n forceChildrenUpdate: boolean\n): void {\n if (!_isDOMElement(vnode)) {\n return;\n }\n\n const props = (vnode.props || {}) as Record<string, unknown>;\n const domVNode = vnode as DOMElement;\n\n if (isHydrationSkipped(el)) {\n clearHydrationDeferredSubtree(el);\n return;\n }\n\n materializeKey(el, vnode, props);\n updateElementRef(el, props.ref);\n\n if (!hasTrackedElementPropBindings(el)) {\n if (\n !forceChildrenUpdate &&\n hasMatchingStaticProps(el, props, vnode.type as string)\n ) {\n if (updateChildren) {\n const children =\n (props.children as VNode | VNode[] | undefined) ?? vnode.children;\n if (!forceChildrenUpdate && canReuseStaticSubtree(el, domVNode)) {\n return;\n }\n updateElementChildren(el, children, forceChildrenUpdate);\n }\n return;\n }\n }\n\n const nextChildren = props.children ?? domVNode.children;\n const usesReactiveChildren = syncReactiveScalarChild(\n el,\n nextChildren,\n rendererReactiveChildDOMHost\n );\n syncElementPropBindings(el, domVNode, props, usesReactiveChildren);\n\n if (updateChildren) {\n const children =\n (props.children as VNode | VNode[] | undefined) ?? vnode.children;\n if (usesReactiveChildren) {\n return;\n }\n updateElementChildren(el, children, forceChildrenUpdate);\n }\n}\n\nconfigureRendererDOMHost({\n createDOMNode,\n syncComponentElement,\n updateElementFromVnode,\n updateElementChildren,\n tryPatchStableForDirtyItem,\n});\n\nconfigureBoundaryDOMHost({\n createDOMNode,\n syncComponentElement,\n updateElementFromVnode,\n tryPatchStableForDirtyItem,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,MAAa,mBAAmB,OAAO,aAAa;AAEpD,SAAS,yBAAyB,IAA6B;CAC7D,OAAO,GAAG,QAAQ,8BAA4B;AAChD;AAEA,SAAS,mBAAmB,IAAsB;CAChD,OAAO,yBAAyB,EAAE,MAAM;AAC1C;AAEA,SAAS,8BAA8B,IAAmB;CACxD,MAAM,WAAW,yBAAyB,EAAE;CAC5C,IAAI,CAAC,UAAU;CACf,IAAI,aAAa,IAAI;EACnB,mBAAmB,EAAE;EACrB,2BAA2B,EAAE;CAC/B;AACF;AAEA,SAAgB,cACd,MACA,iBACa;CACb,IAAI,CAAC,kBAAkB;EACrB,IAAI,cAAc,CAAC,CAAC,aAAa,cAC/B,IAAI;GACF,OAAO,KAAK,oDAAoD;EAClE,QAAQ,CAER;EAEF,OAAO;CACT;CAEA,IAAI,OAAO,SAAS,UAAU;EAC5B,IAAI,yBAAyB,YAAY,GACvC,mBAAmB,iBAAiB;EAEtC,OAAO,SAAS,eAAe,IAAI;CACrC;CACA,IAAI,OAAO,SAAS,UAAU;EAC5B,IAAI,yBAAyB,YAAY,GACvC,mBAAmB,iBAAiB;EAEtC,OAAO,SAAS,eAAe,OAAO,IAAI,CAAC;CAC7C;CAEA,IAAI,CAAC,MACH,OAAO;CAGT,IAAI,MAAM,QAAQ,IAAI,GAAG;EACvB,qBAAqB,IAAI;EACzB,MAAM,WAAW,SAAS,uBAAuB;EACjD,KAAK,MAAM,SAAS,MAAM;GACxB,MAAM,MAAM,cAAc,OAAO,eAAe;GAChD,I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AEjB,IAAI,mBAAmB,EAAE,GAAG;EAC1B,8BAA8B,EAAE;EAChC;CACF;CAEA,eAAe,IAAI,OAAO,KAAK;CAC/B,iBAAiB,IAAI,MAAM,GAAG;CAE9B,IAAI,CAAC,8BAA8B,EAAE,GACnC;MACE,CAAC,uBACD,uBAAuB,IAAI,OAAO,MAAM,IAAc,GACtD;GACA,IAAI,gBAAgB;IAClB,MAAM,WACH,MAAM,YAA4C,MAAM;IAC3D,IAAI,CAAC,uBAAuB,sBAAsB,IAAI,QAAQ,GAC5D;IAEF,sBAAsB,IAAI,UAAU,mBAAmB;GACzD;GACA;EACF;;CAIF,MAAM,uBAAuB,wBAC3B,IAFmB,MAAM,YAAY,SAAS,UAI9C,4BACF;CACA,wBAAwB,IAAI,UAAU,OAAO,oBAAoB;CAEjE,IAAI,gBAAgB;EAClB,MAAM,WACH,MAAM,YAA4C,MAAM;EAC3D,IAAI,sBACF;EAEF,sBAAsB,IAAI,UAAU,mBAAmB;CACzD;AACF;AAEA,yBAAyB;CACvB;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,yBAAyB;CACvB;CACA;CACA;CACA;AACF,CAAC"}
|
package/dist/renderer/dom.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./boundaries.js";
|
|
2
|
-
import { performBulkPositionalKeyedTextUpdate } from "./children-fastpath.js";
|
|
3
|
-
import { isBulkTextFastPathEligible, performBulkTextReplace } from "./children.js";
|
|
4
|
-
import { syncComponentElement } from "./component-host.js";
|
|
5
|
-
import { setStaticChildSlotsCacheEnabled } from "./static-reuse.js";
|
|
6
|
-
import { updateElementChildren, updateUnkeyedChildren } from "./element-children.js";
|
|
7
|
-
import { markReactivePropsDirtySource } from "./prop-bindings.js";
|
|
8
|
-
import { tryPatchStableForDirtyItem } from "./stable-patch.js";
|
|
9
|
-
import { IS_DOM_AVAILABLE, createDOMNode, updateElementFromVnode } from "./dom-internal.js";
|
|
10
|
-
export { IS_DOM_AVAILABLE, createDOMNode, isBulkTextFastPathEligible, markReactivePropsDirtySource, performBulkPositionalKeyedTextUpdate, performBulkTextReplace, setStaticChildSlotsCacheEnabled, syncComponentElement, tryPatchStableForDirtyItem, updateElementChildren, updateElementFromVnode, updateUnkeyedChildren };
|