@askrjs/askr 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bench/components/benchmark-row.d.ts +2 -2
- package/dist/bench/components/benchmark-row.js +0 -2
- package/dist/bench/components/benchmark-table.js +0 -2
- package/dist/benchmark.d.ts +1 -2
- package/dist/benchmark.js +5 -6
- package/dist/bin/askr-ssg.d.ts +1 -2
- package/dist/bin/askr-ssg.js +21 -6
- package/dist/boot/hydration.js +10 -11
- package/dist/boot/index.d.ts +1 -2
- package/dist/boot/index.js +21 -11
- package/dist/boot/root-lifecycle.d.ts +6 -3
- package/dist/boot/root-lifecycle.js +18 -14
- package/dist/boot/route-startup.js +13 -4
- package/dist/boot/types.d.ts +1 -2
- package/dist/common/attr-names.js +0 -2
- package/dist/common/component.d.ts +1 -2
- package/dist/common/control.d.ts +1 -2
- package/dist/common/control.js +0 -2
- package/dist/common/dom-range.d.ts +13 -0
- package/dist/common/env.js +1 -7
- package/dist/common/error-boundary.d.ts +15 -0
- package/dist/common/invariant.js +15 -0
- package/dist/common/jsx.d.ts +1 -2
- package/dist/common/jsx.js +0 -2
- package/dist/{dev → common}/logger.js +5 -8
- package/dist/common/promise.js +0 -2
- package/dist/common/props.d.ts +1 -2
- package/dist/common/render-context.js +0 -2
- package/dist/common/route-activity.js +0 -2
- package/dist/common/router-internal.js +0 -2
- package/dist/common/router.d.ts +1 -2
- package/dist/common/ssr-errors.d.ts +1 -2
- package/dist/common/ssr-errors.js +0 -2
- package/dist/common/ssr.d.ts +1 -2
- package/dist/common/ssr.js +0 -2
- package/dist/common/vnode.d.ts +1 -2
- package/dist/common/vnode.js +0 -2
- package/dist/components/error-boundary.d.ts +2 -16
- package/dist/components/error-boundary.js +2 -76
- package/dist/components/index.d.ts +2 -1
- package/dist/components/link.d.ts +2 -2
- package/dist/components/link.js +2 -2
- package/dist/control/case.d.ts +1 -2
- package/dist/control/case.js +1 -2
- package/dist/control/for.d.ts +3 -4
- package/dist/control/for.js +2 -4
- package/dist/control/shared.d.ts +1 -2
- package/dist/control/shared.js +0 -2
- package/dist/control/show.d.ts +1 -2
- package/dist/control/show.js +1 -2
- package/dist/data/data-runtime.d.ts +1 -2
- package/dist/data/data-runtime.js +3 -5
- package/dist/data/invalidation-listeners.js +0 -2
- package/dist/data/invalidation.d.ts +1 -2
- package/dist/data/invalidation.js +2 -4
- package/dist/data/mutation-cell.d.ts +1 -2
- package/dist/data/mutation-cell.js +7 -6
- package/dist/data/query-cell.d.ts +3 -2
- package/dist/data/query-cell.js +45 -11
- package/dist/data/query-key.js +0 -2
- package/dist/data/shared.js +3 -3
- package/dist/data/testing.js +2 -0
- package/dist/data/types.d.ts +1 -2
- package/dist/foundations/icon/icon.d.ts +1 -2
- package/dist/foundations/icon/icon.js +0 -2
- package/dist/foundations/icon/icon.types.d.ts +1 -2
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/dismissable.d.ts +1 -2
- package/dist/foundations/interactions/dismissable.js +0 -2
- package/dist/foundations/interactions/focusable.d.ts +1 -2
- package/dist/foundations/interactions/focusable.js +0 -2
- package/dist/foundations/interactions/hoverable.d.ts +1 -2
- package/dist/foundations/interactions/hoverable.js +0 -2
- package/dist/foundations/interactions/interaction-policy.d.ts +1 -2
- package/dist/foundations/interactions/interaction-policy.js +0 -2
- package/dist/foundations/interactions/pressable.d.ts +1 -2
- package/dist/foundations/interactions/pressable.js +0 -2
- package/dist/foundations/interactions/roving-focus.d.ts +1 -2
- package/dist/foundations/interactions/roving-focus.js +0 -2
- package/dist/foundations/state/controllable.d.ts +1 -3
- package/dist/foundations/state/controllable.js +1 -2
- package/dist/foundations/structures/collection.d.ts +1 -2
- package/dist/foundations/structures/collection.js +0 -2
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/foundations/structures/index.js +2 -1
- package/dist/foundations/structures/layer.d.ts +1 -2
- package/dist/foundations/structures/layer.js +0 -2
- package/dist/foundations/structures/layout.d.ts +1 -2
- package/dist/foundations/structures/layout.js +0 -2
- package/dist/foundations/structures/portal.d.ts +2 -24
- package/dist/foundations/structures/portal.js +3 -187
- package/dist/foundations/structures/presence.d.ts +1 -2
- package/dist/foundations/structures/presence.js +0 -2
- package/dist/foundations/structures/slot.d.ts +1 -2
- package/dist/foundations/structures/slot.js +0 -2
- package/dist/foundations/utilities/aria.d.ts +1 -2
- package/dist/foundations/utilities/aria.js +0 -2
- package/dist/foundations/utilities/compose-handlers.d.ts +1 -2
- package/dist/foundations/utilities/compose-handlers.js +0 -2
- package/dist/foundations/utilities/compose-ref.d.ts +1 -2
- package/dist/foundations/utilities/compose-ref.js +0 -2
- package/dist/foundations/utilities/event-types.d.ts +1 -2
- package/dist/foundations/utilities/merge-props.d.ts +1 -2
- package/dist/foundations/utilities/merge-props.js +0 -2
- package/dist/foundations/utilities/use-id.d.ts +1 -2
- package/dist/foundations/utilities/use-id.js +0 -2
- package/dist/fx/fx.d.ts +1 -2
- package/dist/fx/fx.js +2 -4
- package/dist/fx/index.js +1 -0
- package/dist/fx/noop.js +0 -2
- package/dist/fx/timing.d.ts +1 -2
- package/dist/fx/timing.js +0 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -6
- package/dist/jsx/types.d.ts +1 -2
- package/dist/jsx/utils.d.ts +1 -2
- package/dist/jsx/utils.js +0 -2
- package/dist/jsx-dev-runtime.d.ts +16 -2
- package/dist/jsx-dev-runtime.js +4 -12
- package/dist/jsx-runtime.d.ts +16 -2
- package/dist/jsx-runtime.js +16 -24
- package/dist/jsx-runtime2.d.ts +1 -1
- package/dist/renderer/attributes.js +29 -6
- package/dist/renderer/boundaries.js +50 -174
- package/dist/renderer/boundary-materialization.js +72 -0
- package/dist/renderer/boundary-range-adoption.js +76 -0
- package/dist/renderer/boundary-range-sync.js +101 -0
- package/dist/renderer/boundary-state.js +50 -0
- package/dist/renderer/child-shape.js +2 -4
- package/dist/renderer/children-fastpath.js +149 -0
- package/dist/renderer/children.js +3 -140
- package/dist/renderer/cleanup.js +72 -15
- package/dist/renderer/component-host-cleanup.js +124 -49
- package/dist/renderer/component-host-instances.js +60 -9
- package/dist/renderer/component-host-replacement.js +105 -0
- package/dist/renderer/component-host-results.js +138 -0
- package/dist/renderer/component-host.js +95 -170
- package/dist/renderer/dom-host.js +0 -2
- package/dist/renderer/dom-internal.js +115 -57
- package/dist/renderer/dom-range.js +161 -0
- package/dist/renderer/dom.js +7 -5
- package/dist/renderer/element-children.js +112 -32
- package/dist/renderer/error-boundary-dom.js +70 -13
- package/dist/renderer/evaluate-dom-range.js +3 -4
- package/dist/renderer/evaluate-reconcile.js +18 -42
- package/dist/renderer/evaluate.js +14 -3
- package/dist/renderer/fastpath.js +7 -14
- package/dist/renderer/for-commit-dom-map.js +6 -18
- package/dist/renderer/for-commit-removal.js +8 -17
- package/dist/renderer/for-commit-reorder.js +2 -4
- package/dist/renderer/for-commit.js +173 -45
- package/dist/renderer/hydration-boundaries.js +60 -0
- package/dist/renderer/hydration-listener-transaction.js +49 -0
- package/dist/renderer/index.js +11 -8
- package/dist/renderer/intrinsic-blueprint-analysis.js +202 -0
- package/dist/renderer/intrinsic-blueprint-bindings.js +152 -0
- package/dist/renderer/intrinsic-blueprint-materialization.js +100 -0
- package/dist/renderer/intrinsic-blueprint.js +30 -0
- package/dist/renderer/intrinsic-hydration-adoption.js +66 -0
- package/dist/renderer/keyed-children.js +3 -9
- package/dist/renderer/keyed.js +10 -10
- package/dist/renderer/namespaces.js +0 -2
- package/dist/renderer/prop-bindings.js +59 -24
- package/dist/renderer/reactive-child-dom.js +10 -4
- package/dist/renderer/reactive-child-sources.js +0 -2
- package/dist/renderer/reactive-children.js +33 -24
- package/dist/renderer/reconcile-commit.js +0 -2
- package/dist/renderer/reconcile-fastpaths.js +6 -12
- package/dist/renderer/reconcile-resolution.js +32 -56
- package/dist/renderer/reconcile.js +0 -2
- package/dist/renderer/retained-element-rollback.js +161 -149
- package/dist/renderer/stable-patch.js +5 -7
- package/dist/renderer/static-reuse.js +0 -2
- package/dist/renderer/utils.js +20 -10
- package/dist/resources/index.js +1 -2
- package/dist/router/access.js +0 -2
- package/dist/router/activity.d.ts +1 -2
- package/dist/router/activity.js +20 -24
- package/dist/router/authoring.d.ts +1 -2
- package/dist/router/authoring.js +1 -3
- package/dist/router/index.d.ts +1 -1
- package/dist/router/internal-types.d.ts +1 -2
- package/dist/router/lazy.d.ts +1 -2
- package/dist/router/lazy.js +0 -2
- package/dist/router/manifest.d.ts +1 -2
- package/dist/router/manifest.js +0 -2
- package/dist/router/match.js +0 -2
- package/dist/router/navigate.d.ts +1 -2
- package/dist/router/navigate.js +5 -8
- package/dist/router/navigation-registry.d.ts +1 -2
- package/dist/router/navigation-registry.js +1 -3
- package/dist/router/navigation-scroll.d.ts +1 -2
- package/dist/router/navigation-scroll.js +0 -2
- package/dist/router/navigation-targets.d.ts +3 -4
- package/dist/router/navigation-targets.js +425 -44
- package/dist/router/policy.d.ts +1 -2
- package/dist/router/policy.js +0 -2
- package/dist/router/rendering.d.ts +1 -2
- package/dist/router/rendering.js +5 -3
- package/dist/router/resolution.d.ts +2 -16
- package/dist/router/resolution.js +6 -175
- package/dist/router/route-context.js +0 -2
- package/dist/router/route-matching.d.ts +19 -0
- package/dist/router/route-matching.js +173 -0
- package/dist/router/route-query.d.ts +1 -2
- package/dist/router/route-query.js +1 -3
- package/dist/router/route.js +4 -2
- package/dist/router/store.d.ts +1 -2
- package/dist/router/store.js +0 -2
- package/dist/router/testing.js +4 -0
- package/dist/runtime/access.d.ts +19 -0
- package/dist/runtime/access.js +0 -2
- package/dist/runtime/child-scope.d.ts +21 -2
- package/dist/runtime/child-scope.js +101 -54
- package/dist/runtime/component-cleanup.d.ts +1 -2
- package/dist/runtime/component-cleanup.js +3 -5
- package/dist/runtime/component-commit.js +26 -24
- package/dist/runtime/component-facade.js +5 -3
- package/dist/runtime/component-internal.d.ts +12 -7
- package/dist/runtime/component-internal.js +64 -46
- package/dist/runtime/component-lifecycle.d.ts +2 -41
- package/dist/runtime/component-lifecycle.js +6 -149
- package/dist/runtime/component-scope.d.ts +4 -5
- package/dist/runtime/component-scope.js +27 -8
- package/dist/runtime/component.js +4 -3
- package/dist/runtime/context.d.ts +5 -2
- package/dist/runtime/context.js +29 -3
- package/dist/runtime/control.d.ts +22 -3
- package/dist/runtime/control.js +168 -55
- package/dist/runtime/derive.d.ts +1 -2
- package/dist/runtime/derive.js +0 -2
- package/dist/runtime/dev-namespace.d.ts +30 -0
- package/dist/runtime/dev-namespace.js +32 -25
- package/dist/runtime/effect.d.ts +8 -5
- package/dist/runtime/effect.js +158 -75
- package/dist/runtime/error-boundary.d.ts +4 -0
- package/dist/runtime/error-boundary.js +29 -0
- package/dist/runtime/events.d.ts +58 -0
- package/dist/runtime/events.js +67 -70
- package/dist/runtime/execution-model.d.ts +6 -0
- package/dist/runtime/execution-model.js +0 -2
- package/dist/runtime/fastlane.d.ts +33 -0
- package/dist/runtime/fastlane.js +0 -2
- package/dist/runtime/for-bench.d.ts +1 -2
- package/dist/runtime/for-bench.js +9 -167
- package/dist/runtime/for-internal.d.ts +73 -10
- package/dist/runtime/for-internal.js +201 -14
- package/dist/runtime/for-reconcile.d.ts +1 -2
- package/dist/runtime/for-reconcile.js +76 -23
- package/dist/runtime/for-scopes.d.ts +5 -5
- package/dist/runtime/for-scopes.js +168 -48
- package/dist/runtime/for-signals.d.ts +14 -5
- package/dist/runtime/for-signals.js +157 -83
- package/dist/runtime/for-types.d.ts +8 -0
- package/dist/runtime/for.d.ts +2 -2
- package/dist/runtime/for.js +3 -3
- package/dist/runtime/index.d.ts +24 -0
- package/dist/runtime/index.js +33 -0
- package/dist/runtime/lifecycle-batch.d.ts +59 -0
- package/dist/runtime/lifecycle-batch.js +178 -0
- package/dist/runtime/lifecycle-operation-settlement.d.ts +5 -0
- package/dist/runtime/lifecycle-operation-settlement.js +51 -0
- package/dist/runtime/lifecycle-operations.d.ts +1 -2
- package/dist/runtime/lifecycle-operations.js +5 -6
- package/dist/runtime/perf-metrics.d.ts +27 -0
- package/dist/runtime/perf-metrics.js +4 -68
- package/dist/runtime/portal.d.ts +21 -0
- package/dist/runtime/portal.js +305 -0
- package/dist/runtime/readable.d.ts +9 -4
- package/dist/runtime/readable.js +41 -17
- package/dist/runtime/resource-cell.js +3 -5
- package/dist/runtime/resource-operation.d.ts +1 -2
- package/dist/runtime/resource-operation.js +38 -35
- package/dist/runtime/runtime.d.ts +2 -3
- package/dist/runtime/runtime.js +0 -2
- package/dist/runtime/scheduler.d.ts +1 -2
- package/dist/runtime/scheduler.js +10 -13
- package/dist/runtime/selector-store.js +22 -0
- package/dist/runtime/selector.d.ts +1 -2
- package/dist/runtime/selector.js +6 -29
- package/dist/runtime/snapshot-source.d.ts +1 -2
- package/dist/runtime/snapshot-source.js +0 -2
- package/dist/runtime/state.d.ts +1 -2
- package/dist/runtime/state.js +1 -3
- package/dist/ssg/batch-render.js +0 -2
- package/dist/ssg/create-static-gen.d.ts +4 -2
- package/dist/ssg/create-static-gen.js +66 -14
- package/dist/ssg/generate-metadata.js +0 -2
- package/dist/ssg/generation-plan.js +0 -2
- package/dist/ssg/incremental-manifest.js +1 -3
- package/dist/ssg/resolve-ssg-data.js +0 -2
- package/dist/ssg/route-utils.js +0 -2
- package/dist/ssg/static-routes.js +1 -2
- package/dist/ssg/types.d.ts +2 -3
- package/dist/ssg/write-static-files.js +16 -12
- package/dist/ssr/attrs.js +0 -2
- package/dist/ssr/boundaries.js +17 -6
- package/dist/ssr/component-runtime.js +4 -30
- package/dist/ssr/context.d.ts +1 -2
- package/dist/ssr/context.js +0 -2
- package/dist/ssr/errors.d.ts +1 -2
- package/dist/ssr/errors.js +0 -2
- package/dist/ssr/escape.js +0 -2
- package/dist/ssr/hydration-data.js +0 -2
- package/dist/ssr/hydration-verify.d.ts +1 -2
- package/dist/ssr/hydration-verify.js +34 -7
- package/dist/ssr/index-internal.d.ts +1 -2
- package/dist/ssr/index-internal.js +0 -2
- package/dist/ssr/render-keys.js +0 -2
- package/dist/ssr/render-resolved.d.ts +1 -2
- package/dist/ssr/render-resolved.js +1 -3
- package/dist/ssr/render-sync.d.ts +1 -2
- package/dist/ssr/render-sync.js +28 -20
- package/dist/ssr/route-policy-resolution.js +2 -3
- package/dist/ssr/route-render.d.ts +1 -2
- package/dist/ssr/route-render.js +2 -3
- package/dist/ssr/sink.d.ts +1 -2
- package/dist/ssr/sink.js +0 -2
- package/dist/ssr/types.d.ts +1 -2
- package/dist/ssr/verify-hydration.js +0 -2
- package/dist/testing/index.d.ts +1 -2
- package/dist/testing/index.js +3 -4
- package/package.json +60 -47
- package/dist/bench/components/benchmark-row.d.ts.map +0 -1
- package/dist/bench/components/benchmark-row.js.map +0 -1
- package/dist/bench/components/benchmark-table.js.map +0 -1
- package/dist/benchmark.d.ts.map +0 -1
- package/dist/benchmark.js.map +0 -1
- package/dist/bin/askr-ssg.d.ts.map +0 -1
- package/dist/bin/askr-ssg.js.map +0 -1
- package/dist/boot/hydration.js.map +0 -1
- package/dist/boot/index.d.ts.map +0 -1
- package/dist/boot/index.js.map +0 -1
- package/dist/boot/root-lifecycle.d.ts.map +0 -1
- package/dist/boot/root-lifecycle.js.map +0 -1
- package/dist/boot/route-startup.js.map +0 -1
- package/dist/boot/types.d.ts.map +0 -1
- package/dist/common/attr-names.js.map +0 -1
- package/dist/common/component.d.ts.map +0 -1
- package/dist/common/control.d.ts.map +0 -1
- package/dist/common/control.js.map +0 -1
- package/dist/common/env.js.map +0 -1
- package/dist/common/jsx.d.ts.map +0 -1
- package/dist/common/jsx.js.map +0 -1
- package/dist/common/promise.js.map +0 -1
- package/dist/common/props.d.ts.map +0 -1
- package/dist/common/render-context.js.map +0 -1
- package/dist/common/route-activity.js.map +0 -1
- package/dist/common/router-internal.js.map +0 -1
- package/dist/common/router.d.ts.map +0 -1
- package/dist/common/ssr-errors.d.ts.map +0 -1
- package/dist/common/ssr-errors.js.map +0 -1
- package/dist/common/ssr.d.ts.map +0 -1
- package/dist/common/ssr.js.map +0 -1
- package/dist/common/vnode.d.ts.map +0 -1
- package/dist/common/vnode.js.map +0 -1
- package/dist/components/error-boundary.d.ts.map +0 -1
- package/dist/components/error-boundary.js.map +0 -1
- package/dist/components/link.d.ts.map +0 -1
- package/dist/components/link.js.map +0 -1
- package/dist/control/case.d.ts.map +0 -1
- package/dist/control/case.js.map +0 -1
- package/dist/control/for.d.ts.map +0 -1
- package/dist/control/for.js.map +0 -1
- package/dist/control/shared.d.ts.map +0 -1
- package/dist/control/shared.js.map +0 -1
- package/dist/control/show.d.ts.map +0 -1
- package/dist/control/show.js.map +0 -1
- package/dist/data/data-runtime.d.ts.map +0 -1
- package/dist/data/data-runtime.js.map +0 -1
- package/dist/data/invalidation-listeners.js.map +0 -1
- package/dist/data/invalidation.d.ts.map +0 -1
- package/dist/data/invalidation.js.map +0 -1
- package/dist/data/mutation-cell.d.ts.map +0 -1
- package/dist/data/mutation-cell.js.map +0 -1
- package/dist/data/query-cell.d.ts.map +0 -1
- package/dist/data/query-cell.js.map +0 -1
- package/dist/data/query-key.js.map +0 -1
- package/dist/data/shared.js.map +0 -1
- package/dist/data/types.d.ts.map +0 -1
- package/dist/dev/invariant.js +0 -29
- package/dist/dev/invariant.js.map +0 -1
- package/dist/dev/logger.js.map +0 -1
- package/dist/foundations/icon/icon.d.ts.map +0 -1
- package/dist/foundations/icon/icon.js.map +0 -1
- package/dist/foundations/icon/icon.types.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.js.map +0 -1
- package/dist/foundations/interactions/focusable.d.ts.map +0 -1
- package/dist/foundations/interactions/focusable.js.map +0 -1
- package/dist/foundations/interactions/hoverable.d.ts.map +0 -1
- package/dist/foundations/interactions/hoverable.js.map +0 -1
- package/dist/foundations/interactions/interaction-policy.d.ts.map +0 -1
- package/dist/foundations/interactions/interaction-policy.js.map +0 -1
- package/dist/foundations/interactions/pressable.d.ts.map +0 -1
- package/dist/foundations/interactions/pressable.js.map +0 -1
- package/dist/foundations/interactions/roving-focus.d.ts.map +0 -1
- package/dist/foundations/interactions/roving-focus.js.map +0 -1
- package/dist/foundations/state/controllable.d.ts.map +0 -1
- package/dist/foundations/state/controllable.js.map +0 -1
- package/dist/foundations/structures/collection.d.ts.map +0 -1
- package/dist/foundations/structures/collection.js.map +0 -1
- package/dist/foundations/structures/layer.d.ts.map +0 -1
- package/dist/foundations/structures/layer.js.map +0 -1
- package/dist/foundations/structures/layout.d.ts.map +0 -1
- package/dist/foundations/structures/layout.js.map +0 -1
- package/dist/foundations/structures/portal.d.ts.map +0 -1
- package/dist/foundations/structures/portal.js.map +0 -1
- package/dist/foundations/structures/presence.d.ts.map +0 -1
- package/dist/foundations/structures/presence.js.map +0 -1
- package/dist/foundations/structures/slot.d.ts.map +0 -1
- package/dist/foundations/structures/slot.js.map +0 -1
- package/dist/foundations/utilities/aria.d.ts.map +0 -1
- package/dist/foundations/utilities/aria.js.map +0 -1
- package/dist/foundations/utilities/compose-handlers.d.ts.map +0 -1
- package/dist/foundations/utilities/compose-handlers.js.map +0 -1
- package/dist/foundations/utilities/compose-ref.d.ts.map +0 -1
- package/dist/foundations/utilities/compose-ref.js.map +0 -1
- package/dist/foundations/utilities/event-types.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.js.map +0 -1
- package/dist/foundations/utilities/use-id.d.ts.map +0 -1
- package/dist/foundations/utilities/use-id.js.map +0 -1
- package/dist/fx/fx.d.ts.map +0 -1
- package/dist/fx/fx.js.map +0 -1
- package/dist/fx/noop.js.map +0 -1
- package/dist/fx/timing.d.ts.map +0 -1
- package/dist/fx/timing.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/jsx/types.d.ts.map +0 -1
- package/dist/jsx/utils.d.ts.map +0 -1
- package/dist/jsx/utils.js.map +0 -1
- package/dist/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx-runtime.js.map +0 -1
- package/dist/renderer/attributes.js.map +0 -1
- package/dist/renderer/boundaries.js.map +0 -1
- package/dist/renderer/child-shape.js.map +0 -1
- package/dist/renderer/children.js.map +0 -1
- package/dist/renderer/cleanup.js.map +0 -1
- package/dist/renderer/component-host-cleanup.js.map +0 -1
- package/dist/renderer/component-host-instances.js.map +0 -1
- package/dist/renderer/component-host.js.map +0 -1
- package/dist/renderer/dom-host.js.map +0 -1
- package/dist/renderer/dom-internal.js.map +0 -1
- package/dist/renderer/element-children.js.map +0 -1
- package/dist/renderer/error-boundary-dom.js.map +0 -1
- package/dist/renderer/evaluate-dom-range.js.map +0 -1
- package/dist/renderer/evaluate-reconcile.js.map +0 -1
- package/dist/renderer/evaluate.js.map +0 -1
- package/dist/renderer/fastpath.js.map +0 -1
- package/dist/renderer/for-commit-dom-map.js.map +0 -1
- package/dist/renderer/for-commit-removal.js.map +0 -1
- package/dist/renderer/for-commit-reorder.js.map +0 -1
- package/dist/renderer/for-commit.js.map +0 -1
- package/dist/renderer/index.js.map +0 -1
- package/dist/renderer/keyed-children.js.map +0 -1
- package/dist/renderer/keyed.js.map +0 -1
- package/dist/renderer/namespaces.js.map +0 -1
- package/dist/renderer/prop-bindings.js.map +0 -1
- package/dist/renderer/reactive-child-dom.js.map +0 -1
- package/dist/renderer/reactive-child-sources.js.map +0 -1
- package/dist/renderer/reactive-children.js.map +0 -1
- package/dist/renderer/reconcile-commit.js.map +0 -1
- package/dist/renderer/reconcile-fastpaths.js.map +0 -1
- package/dist/renderer/reconcile-resolution.js.map +0 -1
- package/dist/renderer/reconcile.js.map +0 -1
- package/dist/renderer/retained-element-rollback.js.map +0 -1
- package/dist/renderer/stable-patch.js.map +0 -1
- package/dist/renderer/static-reuse.js.map +0 -1
- package/dist/renderer/utils.js.map +0 -1
- package/dist/router/access.js.map +0 -1
- package/dist/router/activity.d.ts.map +0 -1
- package/dist/router/activity.js.map +0 -1
- package/dist/router/authoring.d.ts.map +0 -1
- package/dist/router/authoring.js.map +0 -1
- package/dist/router/internal-types.d.ts.map +0 -1
- package/dist/router/lazy.d.ts.map +0 -1
- package/dist/router/lazy.js.map +0 -1
- package/dist/router/manifest.d.ts.map +0 -1
- package/dist/router/manifest.js.map +0 -1
- package/dist/router/match.js.map +0 -1
- package/dist/router/navigate.d.ts.map +0 -1
- package/dist/router/navigate.js.map +0 -1
- package/dist/router/navigation-registry.d.ts.map +0 -1
- package/dist/router/navigation-registry.js.map +0 -1
- package/dist/router/navigation-scroll.d.ts.map +0 -1
- package/dist/router/navigation-scroll.js.map +0 -1
- package/dist/router/navigation-targets.d.ts.map +0 -1
- package/dist/router/navigation-targets.js.map +0 -1
- package/dist/router/policy.d.ts.map +0 -1
- package/dist/router/policy.js.map +0 -1
- package/dist/router/rendering.d.ts.map +0 -1
- package/dist/router/rendering.js.map +0 -1
- package/dist/router/resolution.d.ts.map +0 -1
- package/dist/router/resolution.js.map +0 -1
- package/dist/router/route-context.js.map +0 -1
- package/dist/router/route-query.d.ts.map +0 -1
- package/dist/router/route-query.js.map +0 -1
- package/dist/router/store.d.ts.map +0 -1
- package/dist/router/store.js.map +0 -1
- package/dist/runtime/access.js.map +0 -1
- package/dist/runtime/child-scope.d.ts.map +0 -1
- package/dist/runtime/child-scope.js.map +0 -1
- package/dist/runtime/component-cleanup.d.ts.map +0 -1
- package/dist/runtime/component-cleanup.js.map +0 -1
- package/dist/runtime/component-commit.js.map +0 -1
- package/dist/runtime/component-contracts.js +0 -5
- package/dist/runtime/component-internal.d.ts.map +0 -1
- package/dist/runtime/component-internal.js.map +0 -1
- package/dist/runtime/component-lifecycle.d.ts.map +0 -1
- package/dist/runtime/component-lifecycle.js.map +0 -1
- package/dist/runtime/component-scope.d.ts.map +0 -1
- package/dist/runtime/component-scope.js.map +0 -1
- package/dist/runtime/context.d.ts.map +0 -1
- package/dist/runtime/context.js.map +0 -1
- package/dist/runtime/control.d.ts.map +0 -1
- package/dist/runtime/control.js.map +0 -1
- package/dist/runtime/derive.d.ts.map +0 -1
- package/dist/runtime/derive.js.map +0 -1
- package/dist/runtime/dev-namespace.js.map +0 -1
- package/dist/runtime/effect.d.ts.map +0 -1
- package/dist/runtime/effect.js.map +0 -1
- package/dist/runtime/events.js.map +0 -1
- package/dist/runtime/execution-model.js.map +0 -1
- package/dist/runtime/fastlane.js.map +0 -1
- package/dist/runtime/for-bench.d.ts.map +0 -1
- package/dist/runtime/for-bench.js.map +0 -1
- package/dist/runtime/for-internal.d.ts.map +0 -1
- package/dist/runtime/for-internal.js.map +0 -1
- package/dist/runtime/for-reconcile.d.ts.map +0 -1
- package/dist/runtime/for-reconcile.js.map +0 -1
- package/dist/runtime/for-scopes.d.ts.map +0 -1
- package/dist/runtime/for-scopes.js.map +0 -1
- package/dist/runtime/for-signals.d.ts.map +0 -1
- package/dist/runtime/for-signals.js.map +0 -1
- package/dist/runtime/lifecycle-operations.d.ts.map +0 -1
- package/dist/runtime/lifecycle-operations.js.map +0 -1
- package/dist/runtime/perf-metrics.js.map +0 -1
- package/dist/runtime/readable.d.ts.map +0 -1
- package/dist/runtime/readable.js.map +0 -1
- package/dist/runtime/resource-cell.js.map +0 -1
- package/dist/runtime/resource-operation.d.ts.map +0 -1
- package/dist/runtime/resource-operation.js.map +0 -1
- package/dist/runtime/runtime.d.ts.map +0 -1
- package/dist/runtime/runtime.js.map +0 -1
- package/dist/runtime/scheduler.d.ts.map +0 -1
- package/dist/runtime/scheduler.js.map +0 -1
- package/dist/runtime/selector.d.ts.map +0 -1
- package/dist/runtime/selector.js.map +0 -1
- package/dist/runtime/snapshot-source.d.ts.map +0 -1
- package/dist/runtime/snapshot-source.js.map +0 -1
- package/dist/runtime/state.d.ts.map +0 -1
- package/dist/runtime/state.js.map +0 -1
- package/dist/ssg/batch-render.js.map +0 -1
- package/dist/ssg/create-static-gen.d.ts.map +0 -1
- package/dist/ssg/create-static-gen.js.map +0 -1
- package/dist/ssg/generate-metadata.js.map +0 -1
- package/dist/ssg/generation-plan.js.map +0 -1
- package/dist/ssg/incremental-manifest.js.map +0 -1
- package/dist/ssg/resolve-ssg-data.js.map +0 -1
- package/dist/ssg/route-utils.js.map +0 -1
- package/dist/ssg/static-routes.js.map +0 -1
- package/dist/ssg/types.d.ts.map +0 -1
- package/dist/ssg/write-static-files.js.map +0 -1
- package/dist/ssr/attrs.js.map +0 -1
- package/dist/ssr/boundaries.js.map +0 -1
- package/dist/ssr/component-runtime.js.map +0 -1
- package/dist/ssr/context.d.ts.map +0 -1
- package/dist/ssr/context.js.map +0 -1
- package/dist/ssr/errors.d.ts.map +0 -1
- package/dist/ssr/errors.js.map +0 -1
- package/dist/ssr/escape.js.map +0 -1
- package/dist/ssr/hydration-data.js.map +0 -1
- package/dist/ssr/hydration-verify.d.ts.map +0 -1
- package/dist/ssr/hydration-verify.js.map +0 -1
- package/dist/ssr/index-internal.d.ts.map +0 -1
- package/dist/ssr/index-internal.js.map +0 -1
- package/dist/ssr/render-keys.js.map +0 -1
- package/dist/ssr/render-resolved.d.ts.map +0 -1
- package/dist/ssr/render-resolved.js.map +0 -1
- package/dist/ssr/render-sync.d.ts.map +0 -1
- package/dist/ssr/render-sync.js.map +0 -1
- package/dist/ssr/route-policy-resolution.js.map +0 -1
- package/dist/ssr/route-render.d.ts.map +0 -1
- package/dist/ssr/route-render.js.map +0 -1
- package/dist/ssr/sink.d.ts.map +0 -1
- package/dist/ssr/sink.js.map +0 -1
- package/dist/ssr/types.d.ts.map +0 -1
- package/dist/ssr/verify-hydration.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./route-utils.js";
|
|
2
2
|
import * as fs from "node:fs/promises";
|
|
3
|
-
import * as fsSync from "node:fs";
|
|
4
3
|
import * as pathModule from "node:path";
|
|
4
|
+
import * as fsSync from "node:fs";
|
|
5
5
|
//#region src/ssg/write-static-files.ts
|
|
6
6
|
/**
|
|
7
7
|
* File I/O for Static Site Generation
|
|
@@ -13,14 +13,14 @@ import * as pathModule from "node:path";
|
|
|
13
13
|
* Write rendered routes to disk
|
|
14
14
|
* Creates outputDir/{route-path}/index.html structure
|
|
15
15
|
*/
|
|
16
|
-
async function writeStaticFiles(results, outputDir, options = {}) {
|
|
17
|
-
await
|
|
16
|
+
async function writeStaticFiles(results, outputDir, options = {}, fileOperations = fs) {
|
|
17
|
+
await fileOperations.mkdir(outputDir, { recursive: true });
|
|
18
18
|
for (const result of results) {
|
|
19
19
|
if (result.status !== "removed") continue;
|
|
20
20
|
const fullPath = pathModule.join(outputDir, result.filePath);
|
|
21
21
|
if (fsSync.existsSync(fullPath)) {
|
|
22
|
-
await
|
|
23
|
-
await pruneEmptyDirs(pathModule.dirname(fullPath), outputDir);
|
|
22
|
+
await fileOperations.rm(fullPath, { force: true });
|
|
23
|
+
await pruneEmptyDirs(pathModule.dirname(fullPath), outputDir, fileOperations);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
const pendingWrites = [];
|
|
@@ -41,7 +41,7 @@ async function writeStaticFiles(results, outputDir, options = {}) {
|
|
|
41
41
|
directories.push(dir);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
for (const dir of directories) await
|
|
44
|
+
for (const dir of directories) await fileOperations.mkdir(dir, { recursive: true });
|
|
45
45
|
const concurrency = Math.max(1, Math.min(options.concurrency ?? 8, pendingWrites.length || 1));
|
|
46
46
|
let nextIndex = 0;
|
|
47
47
|
const worker = async () => {
|
|
@@ -51,23 +51,27 @@ async function writeStaticFiles(results, outputDir, options = {}) {
|
|
|
51
51
|
if (current >= pendingWrites.length) return;
|
|
52
52
|
const result = pendingWrites[current];
|
|
53
53
|
const fullPath = pathModule.join(outputDir, result.filePath);
|
|
54
|
-
|
|
54
|
+
const tempPath = pathModule.join(pathModule.dirname(fullPath), `.${pathModule.basename(fullPath)}.askr-${process.pid}-${current}.tmp`);
|
|
55
|
+
try {
|
|
56
|
+
await fileOperations.writeFile(tempPath, result.html, "utf8");
|
|
57
|
+
await fileOperations.rename(tempPath, fullPath);
|
|
58
|
+
} finally {
|
|
59
|
+
await fileOperations.rm(tempPath, { force: true });
|
|
60
|
+
}
|
|
55
61
|
}
|
|
56
62
|
};
|
|
57
63
|
await Promise.all(Array.from({ length: concurrency }, () => worker()));
|
|
58
64
|
}
|
|
59
|
-
async function pruneEmptyDirs(startDir, rootDir) {
|
|
65
|
+
async function pruneEmptyDirs(startDir, rootDir, fileOperations) {
|
|
60
66
|
let current = startDir;
|
|
61
67
|
const normalizedRoot = pathModule.resolve(rootDir);
|
|
62
68
|
while (current.startsWith(normalizedRoot)) {
|
|
63
69
|
if (!fsSync.existsSync(current)) break;
|
|
64
|
-
if ((await
|
|
65
|
-
await
|
|
70
|
+
if ((await fileOperations.readdir(current)).length > 0) break;
|
|
71
|
+
await fileOperations.rmdir(current);
|
|
66
72
|
if (pathModule.resolve(current) === normalizedRoot) break;
|
|
67
73
|
current = pathModule.dirname(current);
|
|
68
74
|
}
|
|
69
75
|
}
|
|
70
76
|
//#endregion
|
|
71
77
|
export { writeStaticFiles };
|
|
72
|
-
|
|
73
|
-
//# sourceMappingURL=write-static-files.js.map
|
package/dist/ssr/attrs.js
CHANGED
package/dist/ssr/boundaries.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __CONTROL_BOUNDARY__ } from "../common/control.js";
|
|
2
2
|
import { ELEMENT_TYPE } from "../common/jsx.js";
|
|
3
|
-
import { evaluateForState } from "../runtime/for-internal.js";
|
|
4
|
-
import "../runtime/for.js";
|
|
5
3
|
import { evaluateCaseState, evaluateShowState } from "../runtime/control.js";
|
|
4
|
+
import { commitForStateTransaction, evaluateForState, rollbackForStateTransaction } from "../runtime/for-internal.js";
|
|
5
|
+
import "../runtime/index.js";
|
|
6
6
|
import "../jsx/index.js";
|
|
7
7
|
//#region src/ssr/boundaries.ts
|
|
8
8
|
function normalizeRenderableChildren(value) {
|
|
@@ -68,7 +68,7 @@ function createDefaultErrorBoundaryFallbackVNode(error) {
|
|
|
68
68
|
$$typeof: ELEMENT_TYPE,
|
|
69
69
|
type: "details",
|
|
70
70
|
props: {
|
|
71
|
-
open:
|
|
71
|
+
open: false,
|
|
72
72
|
children: [{
|
|
73
73
|
$$typeof: ELEMENT_TYPE,
|
|
74
74
|
type: "summary",
|
|
@@ -107,7 +107,18 @@ function evaluateControlBoundaryChildren(node) {
|
|
|
107
107
|
if (controlState.kind === "show") return evaluateShowState(controlState);
|
|
108
108
|
return evaluateCaseState(controlState);
|
|
109
109
|
}
|
|
110
|
+
function withControlBoundaryChildren(node, render) {
|
|
111
|
+
const controlState = getControlBoundaryState(node);
|
|
112
|
+
if (!controlState || controlState.kind !== "for") return render(evaluateControlBoundaryChildren(node));
|
|
113
|
+
const children = evaluateForState(controlState);
|
|
114
|
+
try {
|
|
115
|
+
const result = render(children);
|
|
116
|
+
commitForStateTransaction(controlState);
|
|
117
|
+
return result;
|
|
118
|
+
} catch (error) {
|
|
119
|
+
rollbackForStateTransaction(controlState);
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
110
123
|
//#endregion
|
|
111
|
-
export { createErrorBoundaryReset, evaluateControlBoundaryChildren, getControlBoundaryState, getErrorBoundaryState, getRenderableChildren, normalizeRenderableChildren, resetErrorBoundaryState, resolveErrorBoundaryFallbackNode };
|
|
112
|
-
|
|
113
|
-
//# sourceMappingURL=boundaries.js.map
|
|
124
|
+
export { createErrorBoundaryReset, evaluateControlBoundaryChildren, getControlBoundaryState, getErrorBoundaryState, getRenderableChildren, normalizeRenderableChildren, resetErrorBoundaryState, resolveErrorBoundaryFallbackNode, withControlBoundaryChildren };
|
|
@@ -3,34 +3,12 @@ import { getCurrentComponentInstance, setCurrentComponentInstance } from "../run
|
|
|
3
3
|
import { cleanupComponent } from "../runtime/component-cleanup.js";
|
|
4
4
|
import { isPromiseLike } from "../common/promise.js";
|
|
5
5
|
import { createComponentInstance } from "../runtime/component-internal.js";
|
|
6
|
-
import "../runtime/
|
|
7
|
-
import
|
|
6
|
+
import { DefaultPortal, disposeDefaultPortalScope } from "../runtime/portal.js";
|
|
7
|
+
import "../runtime/index.js";
|
|
8
8
|
import "../jsx/index.js";
|
|
9
9
|
import { throwSSRDataMissing } from "./context.js";
|
|
10
|
-
//#region src/ssr/component-runtime.ts
|
|
11
|
-
const __ssrGuardStack = [];
|
|
12
|
-
function pushSSRStrictPurityGuard() {
|
|
13
|
-
__ssrGuardStack.push({
|
|
14
|
-
random: Reflect.get(Math, "random"),
|
|
15
|
-
now: Reflect.get(Date, "now")
|
|
16
|
-
});
|
|
17
|
-
Reflect.set(Math, "random", () => {
|
|
18
|
-
throw new Error("SSR Strict Purity: Math.random is not allowed during synchronous SSR. Use the provided `ssr` context RNG instead.");
|
|
19
|
-
});
|
|
20
|
-
Reflect.set(Date, "now", () => {
|
|
21
|
-
throw new Error("SSR Strict Purity: Date.now is not allowed during synchronous SSR. Pass timestamps explicitly or use deterministic helpers.");
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function popSSRStrictPurityGuard() {
|
|
25
|
-
const prev = __ssrGuardStack.pop();
|
|
26
|
-
if (prev) {
|
|
27
|
-
Reflect.set(Math, "random", prev.random);
|
|
28
|
-
Reflect.set(Date, "now", prev.now);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
10
|
function executeComponentSync(component, props, ctx) {
|
|
32
11
|
try {
|
|
33
|
-
pushSSRStrictPurityGuard();
|
|
34
12
|
const prev = getCurrentComponentInstance();
|
|
35
13
|
const temp = createComponentInstance("ssr-temp", component, props || {}, null);
|
|
36
14
|
temp.ssr = true;
|
|
@@ -66,9 +44,7 @@ function executeComponentSync(component, props, ctx) {
|
|
|
66
44
|
} finally {
|
|
67
45
|
setCurrentComponentInstance(prev);
|
|
68
46
|
}
|
|
69
|
-
} finally {
|
|
70
|
-
popSSRStrictPurityGuard();
|
|
71
|
-
}
|
|
47
|
+
} finally {}
|
|
72
48
|
}
|
|
73
49
|
function disposeSSRTemporaryOwners(ctx) {
|
|
74
50
|
const cleanupFns = ctx.ssrCleanupFns;
|
|
@@ -87,7 +63,7 @@ function wrapWithDefaultPortal(out) {
|
|
|
87
63
|
const portalVNode = {
|
|
88
64
|
$$typeof: ELEMENT_TYPE,
|
|
89
65
|
type: DefaultPortal,
|
|
90
|
-
props: {},
|
|
66
|
+
props: { __askrAutoDefaultPortal: true },
|
|
91
67
|
key: "__default_portal"
|
|
92
68
|
};
|
|
93
69
|
if (out == null) return {
|
|
@@ -107,5 +83,3 @@ function renderSyncComponentRoot(component, props, ctx) {
|
|
|
107
83
|
}
|
|
108
84
|
//#endregion
|
|
109
85
|
export { disposeSSRTemporaryOwners, executeComponentSync, renderSyncComponentRoot };
|
|
110
|
-
|
|
111
|
-
//# sourceMappingURL=component-runtime.js.map
|
package/dist/ssr/context.d.ts
CHANGED
|
@@ -46,5 +46,4 @@ declare function runWithSSRContext<T>(ctx: RenderContext, fn: () => T): T;
|
|
|
46
46
|
*/
|
|
47
47
|
declare function throwSSRDataMissing(): never;
|
|
48
48
|
//#endregion
|
|
49
|
-
export { RenderContext, type SSRData, SSRDataMissingError, getRenderContext, withRenderContext };
|
|
50
|
-
//# sourceMappingURL=context.d.ts.map
|
|
49
|
+
export { RenderContext, type SSRData, SSRDataMissingError, getRenderContext, withRenderContext };
|
package/dist/ssr/context.js
CHANGED
package/dist/ssr/errors.d.ts
CHANGED
package/dist/ssr/errors.js
CHANGED
package/dist/ssr/escape.js
CHANGED
|
@@ -8,5 +8,4 @@ type VerifyState = {
|
|
|
8
8
|
declare function verifyRenderableNode(value: unknown, state: VerifyState, ctx: RenderContext): boolean;
|
|
9
9
|
declare const hydrationVerifier: {
|
|
10
10
|
verifyRenderableNode: typeof verifyRenderableNode;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=hydration-verify.d.ts.map
|
|
11
|
+
};
|
|
@@ -5,9 +5,26 @@ import { getPublicAttributeName } from "../common/attr-names.js";
|
|
|
5
5
|
import "../jsx/index.js";
|
|
6
6
|
import { VOID_ELEMENTS, styleObjToCss } from "./escape.js";
|
|
7
7
|
import { executeComponentSync } from "./component-runtime.js";
|
|
8
|
-
import { createErrorBoundaryReset,
|
|
8
|
+
import { createErrorBoundaryReset, getErrorBoundaryState, getRenderableChildren, normalizeRenderableChildren, resolveErrorBoundaryFallbackNode, withControlBoundaryChildren } from "./boundaries.js";
|
|
9
9
|
import { inheritRenderableKey } from "./render-sync.js";
|
|
10
10
|
//#region src/ssr/hydration-verify.ts
|
|
11
|
+
const RANGE_START = "askr-range-start";
|
|
12
|
+
const RANGE_END = "askr-range-end";
|
|
13
|
+
function isMultiRangeChild(child) {
|
|
14
|
+
if (Array.isArray(child)) return child.length !== 1;
|
|
15
|
+
if (!child || typeof child !== "object" || !("type" in child)) return false;
|
|
16
|
+
const vnode = child;
|
|
17
|
+
return vnode.type === Fragment && (getRenderableChildren(vnode)?.length ?? 0) !== 1;
|
|
18
|
+
}
|
|
19
|
+
function verifyExpectedRangeChild(child, state, ctx) {
|
|
20
|
+
if (!isMultiRangeChild(child)) return verifyExpectedNode(child, state, ctx);
|
|
21
|
+
if (!state.current || state.current.nodeType !== Node.COMMENT_NODE || state.current.data !== RANGE_START) return false;
|
|
22
|
+
state.current = state.current.nextSibling;
|
|
23
|
+
if (!verifyExpectedNode(child, state, ctx)) return false;
|
|
24
|
+
if (!state.current || state.current.nodeType !== Node.COMMENT_NODE || state.current.data !== RANGE_END) return false;
|
|
25
|
+
state.current = state.current.nextSibling;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
11
28
|
function isSSRAttrEventHandler(key) {
|
|
12
29
|
return key.length >= 3 && key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && key.charCodeAt(2) >= 65 && key.charCodeAt(2) <= 90;
|
|
13
30
|
}
|
|
@@ -70,12 +87,24 @@ function verifyExpectedNode(node, state, ctx) {
|
|
|
70
87
|
const { type, props } = vnode;
|
|
71
88
|
if (typeof type === "function") return verifyRenderableNode(inheritRenderableKey(vnode, executeComponentSync(type, props, ctx)), state, ctx);
|
|
72
89
|
if (typeof type === "symbol") {
|
|
73
|
-
if (type === __CONTROL_BOUNDARY__) {
|
|
74
|
-
const children = evaluateControlBoundaryChildren(vnode);
|
|
90
|
+
if (type === __CONTROL_BOUNDARY__) return withControlBoundaryChildren(vnode, (children) => {
|
|
75
91
|
if (!children || children.length === 0) return true;
|
|
76
|
-
|
|
92
|
+
if ((vnode._controlState ?? vnode._forState)?.kind === "for") {
|
|
93
|
+
for (const child of children) if (!verifyExpectedRangeChild(child, state, ctx)) return false;
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
const wrapped = children.length !== 1 || isMultiRangeChild(children[0]);
|
|
97
|
+
if (wrapped) {
|
|
98
|
+
if (!state.current || state.current.nodeType !== Node.COMMENT_NODE || state.current.data !== RANGE_START) return false;
|
|
99
|
+
state.current = state.current.nextSibling;
|
|
100
|
+
}
|
|
101
|
+
for (const child of children) if (!verifyExpectedNode(child, state, ctx)) return false;
|
|
102
|
+
if (wrapped) {
|
|
103
|
+
if (!state.current || state.current.nodeType !== Node.COMMENT_NODE || state.current.data !== RANGE_END) return false;
|
|
104
|
+
state.current = state.current.nextSibling;
|
|
105
|
+
}
|
|
77
106
|
return true;
|
|
78
|
-
}
|
|
107
|
+
});
|
|
79
108
|
if (type === __ERROR_BOUNDARY__) {
|
|
80
109
|
const boundaryState = getErrorBoundaryState(vnode);
|
|
81
110
|
const fallback = props?.fallback;
|
|
@@ -140,5 +169,3 @@ function verifyRenderableNode(value, state, ctx) {
|
|
|
140
169
|
return Array.isArray(value) ? verifyExpectedChildren(normalizeRenderableChildren(value), state, ctx) : verifyExpectedNode(value, state, ctx);
|
|
141
170
|
}
|
|
142
171
|
//#endregion
|
|
143
|
-
|
|
144
|
-
//# sourceMappingURL=hydration-verify.js.map
|
|
@@ -11,5 +11,4 @@ declare function renderToString(component: (props?: Record<string, unknown>) =>
|
|
|
11
11
|
declare function renderToString(opts: RouteRenderOptions): string;
|
|
12
12
|
declare function renderToStream(opts: RouteStreamOptions): void;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { type DocumentRenderArgs, type DocumentRenderContext, type DocumentRenderer, type SSRComponent, SSRDataMissingError, type SSRRoute, type VNode, renderResolvedToStringSync, renderToStream, renderToString, renderToStringSync, resolveRequest };
|
|
15
|
-
//# sourceMappingURL=index-internal.d.ts.map
|
|
14
|
+
export { type DocumentRenderArgs, type DocumentRenderContext, type DocumentRenderer, type SSRComponent, SSRDataMissingError, type SSRRoute, type VNode, renderResolvedToStringSync, renderToStream, renderToString, renderToStringSync, resolveRequest };
|
package/dist/ssr/render-keys.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveRouteFromRoutes } from "../router/
|
|
1
|
+
import { resolveRouteFromRoutes } from "../router/route-matching.js";
|
|
2
2
|
import "../router/route.js";
|
|
3
3
|
import { renderToString } from "./index-internal.js";
|
|
4
4
|
import "./index.js";
|
|
@@ -31,5 +31,3 @@ function renderResolvedToStringSync(opts) {
|
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
33
|
export { renderResolvedToStringSync };
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=render-resolved.js.map
|
|
@@ -17,5 +17,4 @@ declare function renderToStringSync(component: (props?: Record<string, unknown>)
|
|
|
17
17
|
}): string;
|
|
18
18
|
declare function renderSSRRouteAppToSink(input: RouteAppRenderInput): void;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { renderToStringSync };
|
|
21
|
-
//# sourceMappingURL=render-sync.d.ts.map
|
|
20
|
+
export { renderToStringSync };
|
package/dist/ssr/render-sync.js
CHANGED
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
import { __CONTROL_BOUNDARY__ } from "../common/control.js";
|
|
2
2
|
import { __ERROR_BOUNDARY__ } from "../common/vnode.js";
|
|
3
|
-
import { logger } from "../
|
|
3
|
+
import { logger } from "../common/logger.js";
|
|
4
4
|
import { Fragment } from "../common/jsx.js";
|
|
5
5
|
import "../jsx/index.js";
|
|
6
6
|
import { VOID_ELEMENTS, escapeText } from "./escape.js";
|
|
7
7
|
import { createRenderContext, withRenderContext } from "./context.js";
|
|
8
8
|
import { StringSink } from "./sink.js";
|
|
9
9
|
import { disposeSSRTemporaryOwners, executeComponentSync, renderSyncComponentRoot } from "./component-runtime.js";
|
|
10
|
-
import { createErrorBoundaryReset,
|
|
10
|
+
import { createErrorBoundaryReset, getErrorBoundaryState, getRenderableChildren, normalizeRenderableChildren, resolveErrorBoundaryFallbackNode, withControlBoundaryChildren } from "./boundaries.js";
|
|
11
11
|
import { renderAttrs, renderAttrsDirect } from "./attrs.js";
|
|
12
12
|
import { serializeHydrationRenderData } from "./hydration-data.js";
|
|
13
13
|
import { startRenderPhase, stopRenderPhase } from "./render-keys.js";
|
|
14
|
-
|
|
15
|
-
const
|
|
14
|
+
const RANGE_START = "<!--askr-range-start-->";
|
|
15
|
+
const RANGE_END = "<!--askr-range-end-->";
|
|
16
|
+
function isMultiRangeChild(child) {
|
|
17
|
+
if (Array.isArray(child)) return child.length !== 1;
|
|
18
|
+
if (!child || typeof child !== "object" || !("type" in child)) return false;
|
|
19
|
+
const vnode = child;
|
|
20
|
+
if (vnode.type !== Fragment) return false;
|
|
21
|
+
return (getRenderableChildren(vnode)?.length ?? 0) !== 1;
|
|
22
|
+
}
|
|
23
|
+
function renderControlChildrenSync(node, ctx) {
|
|
24
|
+
const controlState = node._controlState ?? node._forState;
|
|
25
|
+
return withControlBoundaryChildren(node, (children) => {
|
|
26
|
+
const values = children ?? [];
|
|
27
|
+
if (controlState?.kind === "for") return values.map((child) => {
|
|
28
|
+
const rendered = renderChildSync(child, ctx);
|
|
29
|
+
return isMultiRangeChild(child) ? `${RANGE_START}${rendered}${RANGE_END}` : rendered;
|
|
30
|
+
}).join("");
|
|
31
|
+
const rendered = renderChildrenSync(values, ctx);
|
|
32
|
+
return values.length === 1 && isMultiRangeChild(values[0]) ? `${RANGE_START}${rendered}${RANGE_END}` : values.length !== 1 ? `${RANGE_START}${rendered}${RANGE_END}` : rendered;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
16
35
|
function inheritRenderableKey(source, result) {
|
|
17
36
|
const inheritedKey = source.key;
|
|
18
37
|
if (inheritedKey === void 0 || inheritedKey === null) return result;
|
|
@@ -22,6 +41,7 @@ function inheritRenderableKey(source, result) {
|
|
|
22
41
|
if (typeof resultVNode.type === "string") {
|
|
23
42
|
if (!resultVNode.props) resultVNode.props = {};
|
|
24
43
|
if (resultVNode.props["data-key"] === void 0) resultVNode.props["data-key"] = String(inheritedKey);
|
|
44
|
+
if (resultVNode.props["data-askr-key-kind"] === void 0) resultVNode.props["data-askr-key-kind"] = typeof inheritedKey;
|
|
25
45
|
}
|
|
26
46
|
return result;
|
|
27
47
|
}
|
|
@@ -99,21 +119,10 @@ function sinkWrite3(sink, a, b, c) {
|
|
|
99
119
|
}
|
|
100
120
|
function renderNodeSync(node, ctx) {
|
|
101
121
|
const { type, props } = node;
|
|
102
|
-
/* istanbul ignore if - dev-only debug */
|
|
103
|
-
if (__SSR_DEBUG) try {
|
|
104
|
-
logger.warn("[SSR] renderNodeSync type:", typeof type, type);
|
|
105
|
-
} catch {}
|
|
106
122
|
if (typeof type === "function") return renderRenderableSync(inheritRenderableKey(node, executeComponentSync(type, props, ctx)), ctx);
|
|
107
123
|
if (typeof type === "symbol") {
|
|
108
|
-
if (type === Fragment)
|
|
109
|
-
|
|
110
|
-
/* istanbul ignore if - dev-only debug */
|
|
111
|
-
if (__SSR_DEBUG) try {
|
|
112
|
-
logger.warn("[SSR] fragment children length:", childrenArr?.length);
|
|
113
|
-
} catch {}
|
|
114
|
-
return renderChildrenSync(childrenArr, ctx);
|
|
115
|
-
}
|
|
116
|
-
if (type === __CONTROL_BOUNDARY__) return renderChildrenSync(evaluateControlBoundaryChildren(node), ctx);
|
|
124
|
+
if (type === Fragment) return renderChildrenSync(getRenderableChildren(node), ctx);
|
|
125
|
+
if (type === __CONTROL_BOUNDARY__) return renderControlChildrenSync(node, ctx);
|
|
117
126
|
if (type === __ERROR_BOUNDARY__) {
|
|
118
127
|
const boundaryState = getErrorBoundaryState(node);
|
|
119
128
|
const fallback = props?.fallback;
|
|
@@ -154,7 +163,8 @@ function renderNodeSyncToSink(node, sink, ctx) {
|
|
|
154
163
|
return;
|
|
155
164
|
}
|
|
156
165
|
if (type === __CONTROL_BOUNDARY__) {
|
|
157
|
-
|
|
166
|
+
const rendered = renderControlChildrenSync(node, ctx);
|
|
167
|
+
sink.write(rendered);
|
|
158
168
|
return;
|
|
159
169
|
}
|
|
160
170
|
if (type === __ERROR_BOUNDARY__) {
|
|
@@ -271,5 +281,3 @@ function renderSSRRouteAppToSink(input) {
|
|
|
271
281
|
}
|
|
272
282
|
//#endregion
|
|
273
283
|
export { inheritRenderableKey, renderRenderableSyncToSink, renderSSRRouteAppToSink, renderToStringSync };
|
|
274
|
-
|
|
275
|
-
//# sourceMappingURL=render-sync.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isPromiseLike } from "../common/promise.js";
|
|
2
|
-
import { _resolveRouteMatchFromRoutes
|
|
2
|
+
import { _resolveRouteMatchFromRoutes } from "../router/route-matching.js";
|
|
3
|
+
import { resolveRouteRequest } from "../router/resolution.js";
|
|
3
4
|
import "../router/route.js";
|
|
4
5
|
import { throwSSRDataMissing } from "./context.js";
|
|
5
6
|
//#region src/ssr/route-policy-resolution.ts
|
|
@@ -73,5 +74,3 @@ function resolvePolicyAwareSSRRoute(opts, routeTable) {
|
|
|
73
74
|
}
|
|
74
75
|
//#endregion
|
|
75
76
|
export { resolvePolicyAwareSSRRoute };
|
|
76
|
-
|
|
77
|
-
//# sourceMappingURL=route-policy-resolution.js.map
|
|
@@ -73,5 +73,4 @@ declare function resolveRequest(opts: {
|
|
|
73
73
|
declare function renderRouteToString(opts: RouteRenderOptions, host: RouteRenderHost): string;
|
|
74
74
|
declare function renderRouteToStream(opts: RouteStreamOptions, host: RouteRenderHost): void;
|
|
75
75
|
//#endregion
|
|
76
|
-
export { RouteAppRenderInput, RouteRenderHost, RouteRenderOptions, RouteStreamOptions, SSRRoute, resolveRequest };
|
|
77
|
-
//# sourceMappingURL=route-render.d.ts.map
|
|
76
|
+
export { RouteAppRenderInput, RouteRenderHost, RouteRenderOptions, RouteStreamOptions, SSRRoute, resolveRequest };
|
package/dist/ssr/route-render.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { resolveRouteFromRoutes
|
|
1
|
+
import { resolveRouteFromRoutes } from "../router/route-matching.js";
|
|
2
|
+
import { resolveRouteRequest } from "../router/resolution.js";
|
|
2
3
|
import "../router/route.js";
|
|
3
4
|
import { renderDocument } from "../common/ssr.js";
|
|
4
5
|
import { createRenderContext } from "./context.js";
|
|
@@ -115,5 +116,3 @@ function renderRouteToStream(opts, host) {
|
|
|
115
116
|
}
|
|
116
117
|
//#endregion
|
|
117
118
|
export { renderRouteToStream, renderRouteToString, resolveRequest };
|
|
118
|
-
|
|
119
|
-
//# sourceMappingURL=route-render.js.map
|
package/dist/ssr/sink.d.ts
CHANGED
package/dist/ssr/sink.js
CHANGED
package/dist/ssr/types.d.ts
CHANGED
|
@@ -19,5 +19,4 @@ type SSRComponent = (props: Props, context?: {
|
|
|
19
19
|
ssr?: RenderContext;
|
|
20
20
|
}) => VNode | JSXElement | string | number | boolean | null | undefined;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { SSRComponent, VNode };
|
|
23
|
-
//# sourceMappingURL=types.d.ts.map
|
|
22
|
+
export { SSRComponent, VNode };
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -48,5 +48,4 @@ declare function createInvalidationRecorder(): InvalidationRecorder;
|
|
|
48
48
|
declare function matchRoute(path: string, options?: MatchRouteOptions): RouteMatch | null;
|
|
49
49
|
declare function getRouteWarnings(options?: MatchRouteOptions): RoutePatternWarning[];
|
|
50
50
|
//#endregion
|
|
51
|
-
export { InvalidationRecord, InvalidationRecorder, MockQueryOptions, MockRefresh, RoutePatternWarning, createInvalidationRecorder, getRouteWarnings, matchRoute, mockQuery, queryState };
|
|
52
|
-
//# sourceMappingURL=index.d.ts.map
|
|
51
|
+
export { InvalidationRecord, InvalidationRecorder, MockQueryOptions, MockRefresh, RoutePatternWarning, createInvalidationRecorder, getRouteWarnings, matchRoute, mockQuery, queryState };
|
package/dist/testing/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { parseSegments } from "../router/match.js";
|
|
2
|
-
import { computeRouteActivityMatches } from "../router/
|
|
3
|
-
import "../router/route.js";
|
|
2
|
+
import { computeRouteActivityMatches } from "../router/route-matching.js";
|
|
4
3
|
import { addInvalidationListener } from "../data/invalidation-listeners.js";
|
|
4
|
+
import "../data/testing.js";
|
|
5
|
+
import "../router/testing.js";
|
|
5
6
|
//#region src/testing/index.ts
|
|
6
7
|
function normalizeRefresh(options) {
|
|
7
8
|
return async () => {
|
|
@@ -169,5 +170,3 @@ function getRouteWarnings(options = {}) {
|
|
|
169
170
|
}
|
|
170
171
|
//#endregion
|
|
171
172
|
export { createInvalidationRecorder, getRouteWarnings, matchRoute, mockQuery, queryState };
|
|
172
|
-
|
|
173
|
-
//# sourceMappingURL=index.js.map
|