@askrjs/askr 0.0.51 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bench/components/benchmark-row.d.ts +2 -2
- package/dist/bench/components/benchmark-row.js +0 -2
- package/dist/bench/components/benchmark-table.js +0 -2
- package/dist/benchmark.d.ts +1 -2
- package/dist/benchmark.js +2 -4
- package/dist/bin/askr-ssg.d.ts +1 -2
- package/dist/bin/askr-ssg.js +21 -6
- package/dist/boot/hydration.js +10 -11
- package/dist/boot/index.d.ts +1 -2
- package/dist/boot/index.js +20 -11
- package/dist/boot/root-lifecycle.d.ts +6 -3
- package/dist/boot/root-lifecycle.js +14 -10
- package/dist/boot/route-startup.js +13 -4
- package/dist/boot/types.d.ts +1 -2
- package/dist/common/attr-names.js +0 -2
- package/dist/common/component.d.ts +1 -2
- package/dist/common/control.d.ts +1 -2
- package/dist/common/control.js +0 -2
- package/dist/common/dom-range.d.ts +13 -0
- package/dist/common/env.js +1 -7
- package/dist/common/error-boundary.d.ts +1 -2
- package/dist/common/invariant.js +0 -2
- package/dist/common/jsx.d.ts +1 -2
- package/dist/common/jsx.js +0 -2
- package/dist/common/logger.js +0 -2
- package/dist/common/promise.js +0 -2
- package/dist/common/props.d.ts +1 -2
- package/dist/common/render-context.js +0 -2
- package/dist/common/route-activity.js +0 -2
- package/dist/common/router-internal.js +0 -2
- package/dist/common/router.d.ts +1 -2
- package/dist/common/ssr-errors.d.ts +1 -2
- package/dist/common/ssr-errors.js +0 -2
- package/dist/common/ssr.d.ts +1 -2
- package/dist/common/ssr.js +0 -2
- package/dist/common/vnode.d.ts +1 -2
- package/dist/common/vnode.js +0 -2
- package/dist/components/error-boundary.d.ts +1 -2
- package/dist/components/error-boundary.js +0 -2
- package/dist/components/link.d.ts +2 -2
- package/dist/components/link.js +0 -2
- package/dist/control/case.d.ts +1 -2
- package/dist/control/case.js +0 -2
- package/dist/control/for.d.ts +1 -2
- package/dist/control/for.js +0 -2
- package/dist/control/shared.d.ts +1 -2
- package/dist/control/shared.js +0 -2
- package/dist/control/show.d.ts +1 -2
- package/dist/control/show.js +0 -2
- package/dist/data/data-runtime.d.ts +1 -2
- package/dist/data/data-runtime.js +3 -5
- package/dist/data/invalidation-listeners.js +0 -2
- package/dist/data/invalidation.d.ts +1 -2
- package/dist/data/invalidation.js +0 -2
- package/dist/data/mutation-cell.d.ts +1 -2
- package/dist/data/mutation-cell.js +6 -5
- package/dist/data/query-cell.d.ts +3 -2
- package/dist/data/query-cell.js +43 -9
- package/dist/data/query-key.js +0 -2
- package/dist/data/shared.js +2 -3
- package/dist/data/types.d.ts +1 -2
- package/dist/foundations/icon/icon.d.ts +1 -2
- package/dist/foundations/icon/icon.js +0 -2
- package/dist/foundations/icon/icon.types.d.ts +1 -2
- package/dist/foundations/interactions/dismissable.d.ts +1 -2
- package/dist/foundations/interactions/dismissable.js +0 -2
- package/dist/foundations/interactions/focusable.d.ts +1 -2
- package/dist/foundations/interactions/focusable.js +0 -2
- package/dist/foundations/interactions/hoverable.d.ts +1 -2
- package/dist/foundations/interactions/hoverable.js +0 -2
- package/dist/foundations/interactions/interaction-policy.d.ts +1 -2
- package/dist/foundations/interactions/interaction-policy.js +0 -2
- package/dist/foundations/interactions/pressable.d.ts +1 -2
- package/dist/foundations/interactions/pressable.js +0 -2
- package/dist/foundations/interactions/roving-focus.d.ts +1 -2
- package/dist/foundations/interactions/roving-focus.js +0 -2
- package/dist/foundations/state/controllable.d.ts +1 -2
- package/dist/foundations/state/controllable.js +0 -2
- package/dist/foundations/structures/collection.d.ts +1 -2
- package/dist/foundations/structures/collection.js +0 -2
- package/dist/foundations/structures/layer.d.ts +1 -2
- package/dist/foundations/structures/layer.js +0 -2
- package/dist/foundations/structures/layout.d.ts +1 -2
- package/dist/foundations/structures/layout.js +0 -2
- package/dist/foundations/structures/presence.d.ts +1 -2
- package/dist/foundations/structures/presence.js +0 -2
- package/dist/foundations/structures/slot.d.ts +1 -2
- package/dist/foundations/structures/slot.js +0 -2
- package/dist/foundations/utilities/aria.d.ts +1 -2
- package/dist/foundations/utilities/aria.js +0 -2
- package/dist/foundations/utilities/compose-handlers.d.ts +1 -2
- package/dist/foundations/utilities/compose-handlers.js +0 -2
- package/dist/foundations/utilities/compose-ref.d.ts +1 -2
- package/dist/foundations/utilities/compose-ref.js +0 -2
- package/dist/foundations/utilities/event-types.d.ts +1 -2
- package/dist/foundations/utilities/merge-props.d.ts +1 -2
- package/dist/foundations/utilities/merge-props.js +0 -2
- package/dist/foundations/utilities/use-id.d.ts +1 -2
- package/dist/foundations/utilities/use-id.js +0 -2
- package/dist/fx/fx.d.ts +1 -2
- package/dist/fx/fx.js +0 -2
- package/dist/fx/noop.js +0 -2
- package/dist/fx/timing.d.ts +1 -2
- package/dist/fx/timing.js +0 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -2
- package/dist/jsx/types.d.ts +1 -2
- package/dist/jsx/utils.d.ts +1 -2
- package/dist/jsx/utils.js +0 -2
- package/dist/jsx-dev-runtime.d.ts +16 -2
- package/dist/jsx-dev-runtime.js +3 -12
- package/dist/jsx-runtime.d.ts +16 -2
- package/dist/jsx-runtime.js +15 -24
- package/dist/jsx-runtime2.d.ts +1 -1
- package/dist/renderer/attributes.js +28 -6
- package/dist/renderer/boundaries.js +48 -172
- package/dist/renderer/boundary-materialization.js +72 -0
- package/dist/renderer/boundary-range-adoption.js +76 -0
- package/dist/renderer/boundary-range-sync.js +101 -0
- package/dist/renderer/boundary-state.js +50 -0
- package/dist/renderer/child-shape.js +0 -2
- package/dist/renderer/children-fastpath.js +3 -3
- package/dist/renderer/children.js +0 -2
- package/dist/renderer/cleanup.js +70 -13
- package/dist/renderer/component-host-cleanup.js +123 -48
- package/dist/renderer/component-host-instances.js +59 -8
- package/dist/renderer/component-host-replacement.js +105 -0
- package/dist/renderer/component-host-results.js +138 -0
- package/dist/renderer/component-host.js +94 -169
- package/dist/renderer/dom-host.js +0 -2
- package/dist/renderer/dom-internal.js +110 -53
- package/dist/renderer/dom-range.js +161 -0
- package/dist/renderer/dom.js +5 -4
- package/dist/renderer/element-children.js +112 -32
- package/dist/renderer/error-boundary-dom.js +19 -11
- package/dist/renderer/evaluate-dom-range.js +3 -4
- package/dist/renderer/evaluate-reconcile.js +12 -37
- package/dist/renderer/evaluate.js +14 -3
- package/dist/renderer/fastpath.js +4 -12
- package/dist/renderer/for-commit-dom-map.js +6 -18
- package/dist/renderer/for-commit-removal.js +7 -16
- package/dist/renderer/for-commit-reorder.js +0 -2
- package/dist/renderer/for-commit.js +172 -44
- package/dist/renderer/hydration-boundaries.js +60 -0
- package/dist/renderer/hydration-listener-transaction.js +49 -0
- package/dist/renderer/index.js +8 -7
- package/dist/renderer/intrinsic-blueprint-analysis.js +202 -0
- package/dist/renderer/intrinsic-blueprint-bindings.js +152 -0
- package/dist/renderer/intrinsic-blueprint-materialization.js +100 -0
- package/dist/renderer/intrinsic-blueprint.js +30 -0
- package/dist/renderer/intrinsic-hydration-adoption.js +66 -0
- package/dist/renderer/keyed-children.js +3 -9
- package/dist/renderer/keyed.js +10 -10
- package/dist/renderer/namespaces.js +0 -2
- package/dist/renderer/prop-bindings.js +56 -21
- package/dist/renderer/reactive-child-dom.js +10 -4
- package/dist/renderer/reactive-child-sources.js +0 -2
- package/dist/renderer/reactive-children.js +29 -20
- package/dist/renderer/reconcile-commit.js +0 -2
- package/dist/renderer/reconcile-fastpaths.js +4 -11
- package/dist/renderer/reconcile-resolution.js +31 -55
- package/dist/renderer/reconcile.js +0 -2
- package/dist/renderer/retained-element-rollback.js +159 -148
- package/dist/renderer/stable-patch.js +3 -4
- package/dist/renderer/static-reuse.js +0 -2
- package/dist/renderer/utils.js +18 -9
- package/dist/router/access.js +0 -2
- package/dist/router/activity.d.ts +1 -2
- package/dist/router/activity.js +0 -2
- package/dist/router/authoring.d.ts +1 -2
- package/dist/router/authoring.js +0 -2
- package/dist/router/internal-types.d.ts +1 -2
- package/dist/router/lazy.d.ts +1 -2
- package/dist/router/lazy.js +0 -2
- package/dist/router/manifest.d.ts +1 -2
- package/dist/router/manifest.js +0 -2
- package/dist/router/match.js +0 -2
- package/dist/router/navigate.d.ts +1 -2
- package/dist/router/navigate.js +4 -7
- package/dist/router/navigation-registry.d.ts +1 -2
- package/dist/router/navigation-registry.js +0 -2
- package/dist/router/navigation-scroll.d.ts +1 -2
- package/dist/router/navigation-scroll.js +0 -2
- package/dist/router/navigation-targets.d.ts +3 -4
- package/dist/router/navigation-targets.js +419 -40
- package/dist/router/policy.d.ts +1 -2
- package/dist/router/policy.js +0 -2
- package/dist/router/rendering.d.ts +1 -2
- package/dist/router/rendering.js +4 -3
- package/dist/router/resolution.d.ts +1 -2
- package/dist/router/resolution.js +0 -2
- package/dist/router/route-context.js +0 -2
- package/dist/router/route-matching.d.ts +1 -2
- package/dist/router/route-matching.js +0 -2
- package/dist/router/route-query.d.ts +1 -2
- package/dist/router/route-query.js +1 -3
- package/dist/router/store.d.ts +1 -2
- package/dist/router/store.js +0 -2
- package/dist/runtime/access.d.ts +1 -2
- package/dist/runtime/access.js +0 -2
- package/dist/runtime/child-scope.d.ts +21 -2
- package/dist/runtime/child-scope.js +101 -54
- package/dist/runtime/component-cleanup.d.ts +1 -2
- package/dist/runtime/component-cleanup.js +2 -4
- package/dist/runtime/component-commit.js +25 -23
- package/dist/runtime/component-facade.js +5 -3
- package/dist/runtime/component-internal.d.ts +11 -6
- package/dist/runtime/component-internal.js +63 -45
- package/dist/runtime/component-lifecycle.d.ts +2 -41
- package/dist/runtime/component-lifecycle.js +6 -149
- package/dist/runtime/component-scope.d.ts +3 -4
- package/dist/runtime/component-scope.js +27 -8
- package/dist/runtime/component.js +4 -3
- package/dist/runtime/context.d.ts +5 -2
- package/dist/runtime/context.js +29 -3
- package/dist/runtime/control.d.ts +22 -3
- package/dist/runtime/control.js +168 -55
- package/dist/runtime/derive.d.ts +1 -2
- package/dist/runtime/derive.js +0 -2
- package/dist/runtime/dev-namespace.d.ts +5 -6
- package/dist/runtime/dev-namespace.js +32 -25
- package/dist/runtime/effect.d.ts +8 -5
- package/dist/runtime/effect.js +158 -75
- package/dist/runtime/error-boundary.d.ts +1 -2
- package/dist/runtime/error-boundary.js +0 -2
- package/dist/runtime/events.d.ts +3 -3
- package/dist/runtime/events.js +66 -69
- package/dist/runtime/execution-model.d.ts +1 -2
- package/dist/runtime/execution-model.js +0 -2
- package/dist/runtime/fastlane.d.ts +1 -2
- package/dist/runtime/fastlane.js +0 -2
- package/dist/runtime/for-bench.d.ts +1 -2
- package/dist/runtime/for-bench.js +9 -167
- package/dist/runtime/for-internal.d.ts +68 -5
- package/dist/runtime/for-internal.js +201 -14
- package/dist/runtime/for-reconcile.d.ts +1 -2
- package/dist/runtime/for-reconcile.js +76 -23
- package/dist/runtime/for-scopes.d.ts +5 -5
- package/dist/runtime/for-scopes.js +168 -48
- package/dist/runtime/for-signals.d.ts +13 -4
- package/dist/runtime/for-signals.js +155 -81
- package/dist/runtime/for-types.d.ts +1 -2
- package/dist/runtime/for.d.ts +2 -2
- package/dist/runtime/for.js +3 -3
- package/dist/runtime/index.d.ts +5 -5
- package/dist/runtime/index.js +12 -10
- package/dist/runtime/lifecycle-batch.d.ts +59 -0
- package/dist/runtime/lifecycle-batch.js +178 -0
- package/dist/runtime/lifecycle-operation-settlement.d.ts +5 -0
- package/dist/runtime/lifecycle-operation-settlement.js +51 -0
- package/dist/runtime/lifecycle-operations.d.ts +1 -2
- package/dist/runtime/lifecycle-operations.js +5 -6
- package/dist/runtime/perf-metrics.d.ts +8 -7
- package/dist/runtime/perf-metrics.js +4 -68
- package/dist/runtime/portal.d.ts +1 -2
- package/dist/runtime/portal.js +103 -11
- package/dist/runtime/readable.d.ts +9 -4
- package/dist/runtime/readable.js +41 -17
- package/dist/runtime/resource-cell.js +2 -4
- package/dist/runtime/resource-operation.d.ts +1 -2
- package/dist/runtime/resource-operation.js +37 -34
- package/dist/runtime/runtime.d.ts +1 -2
- package/dist/runtime/runtime.js +0 -2
- package/dist/runtime/scheduler.d.ts +1 -2
- package/dist/runtime/scheduler.js +8 -11
- package/dist/runtime/selector-store.js +0 -2
- package/dist/runtime/selector.d.ts +1 -2
- package/dist/runtime/selector.js +3 -11
- package/dist/runtime/snapshot-source.d.ts +1 -2
- package/dist/runtime/snapshot-source.js +0 -2
- package/dist/runtime/state.d.ts +1 -2
- package/dist/runtime/state.js +1 -3
- package/dist/ssg/batch-render.js +0 -2
- package/dist/ssg/create-static-gen.d.ts +4 -2
- package/dist/ssg/create-static-gen.js +65 -14
- package/dist/ssg/generate-metadata.js +0 -2
- package/dist/ssg/generation-plan.js +0 -2
- package/dist/ssg/incremental-manifest.js +1 -3
- package/dist/ssg/resolve-ssg-data.js +0 -2
- package/dist/ssg/route-utils.js +0 -2
- package/dist/ssg/static-routes.js +0 -2
- package/dist/ssg/types.d.ts +2 -3
- package/dist/ssg/write-static-files.js +16 -12
- package/dist/ssr/attrs.js +0 -2
- package/dist/ssr/boundaries.js +16 -5
- package/dist/ssr/component-runtime.js +1 -27
- package/dist/ssr/context.d.ts +1 -2
- package/dist/ssr/context.js +0 -2
- package/dist/ssr/errors.d.ts +1 -2
- package/dist/ssr/errors.js +0 -2
- package/dist/ssr/escape.js +0 -2
- package/dist/ssr/hydration-data.js +0 -2
- package/dist/ssr/hydration-verify.d.ts +1 -2
- package/dist/ssr/hydration-verify.js +34 -7
- package/dist/ssr/index-internal.d.ts +1 -2
- package/dist/ssr/index-internal.js +0 -2
- package/dist/ssr/render-keys.js +0 -2
- package/dist/ssr/render-resolved.d.ts +1 -2
- package/dist/ssr/render-resolved.js +0 -2
- package/dist/ssr/render-sync.d.ts +1 -2
- package/dist/ssr/render-sync.js +27 -19
- package/dist/ssr/route-policy-resolution.js +0 -2
- package/dist/ssr/route-render.d.ts +1 -2
- package/dist/ssr/route-render.js +0 -2
- package/dist/ssr/sink.d.ts +1 -2
- package/dist/ssr/sink.js +0 -2
- package/dist/ssr/types.d.ts +1 -2
- package/dist/ssr/verify-hydration.js +0 -2
- package/dist/testing/index.d.ts +1 -2
- package/dist/testing/index.js +0 -2
- package/package.json +57 -44
- package/dist/bench/components/benchmark-row.d.ts.map +0 -1
- package/dist/bench/components/benchmark-row.js.map +0 -1
- package/dist/bench/components/benchmark-table.js.map +0 -1
- package/dist/benchmark.d.ts.map +0 -1
- package/dist/benchmark.js.map +0 -1
- package/dist/bin/askr-ssg.d.ts.map +0 -1
- package/dist/bin/askr-ssg.js.map +0 -1
- package/dist/boot/hydration.js.map +0 -1
- package/dist/boot/index.d.ts.map +0 -1
- package/dist/boot/index.js.map +0 -1
- package/dist/boot/root-lifecycle.d.ts.map +0 -1
- package/dist/boot/root-lifecycle.js.map +0 -1
- package/dist/boot/route-startup.js.map +0 -1
- package/dist/boot/types.d.ts.map +0 -1
- package/dist/common/attr-names.js.map +0 -1
- package/dist/common/component.d.ts.map +0 -1
- package/dist/common/control.d.ts.map +0 -1
- package/dist/common/control.js.map +0 -1
- package/dist/common/env.js.map +0 -1
- package/dist/common/error-boundary.d.ts.map +0 -1
- package/dist/common/invariant.js.map +0 -1
- package/dist/common/jsx.d.ts.map +0 -1
- package/dist/common/jsx.js.map +0 -1
- package/dist/common/logger.js.map +0 -1
- package/dist/common/promise.js.map +0 -1
- package/dist/common/props.d.ts.map +0 -1
- package/dist/common/render-context.js.map +0 -1
- package/dist/common/route-activity.js.map +0 -1
- package/dist/common/router-internal.js.map +0 -1
- package/dist/common/router.d.ts.map +0 -1
- package/dist/common/ssr-errors.d.ts.map +0 -1
- package/dist/common/ssr-errors.js.map +0 -1
- package/dist/common/ssr.d.ts.map +0 -1
- package/dist/common/ssr.js.map +0 -1
- package/dist/common/vnode.d.ts.map +0 -1
- package/dist/common/vnode.js.map +0 -1
- package/dist/components/error-boundary.d.ts.map +0 -1
- package/dist/components/error-boundary.js.map +0 -1
- package/dist/components/link.d.ts.map +0 -1
- package/dist/components/link.js.map +0 -1
- package/dist/control/case.d.ts.map +0 -1
- package/dist/control/case.js.map +0 -1
- package/dist/control/for.d.ts.map +0 -1
- package/dist/control/for.js.map +0 -1
- package/dist/control/shared.d.ts.map +0 -1
- package/dist/control/shared.js.map +0 -1
- package/dist/control/show.d.ts.map +0 -1
- package/dist/control/show.js.map +0 -1
- package/dist/data/data-runtime.d.ts.map +0 -1
- package/dist/data/data-runtime.js.map +0 -1
- package/dist/data/invalidation-listeners.js.map +0 -1
- package/dist/data/invalidation.d.ts.map +0 -1
- package/dist/data/invalidation.js.map +0 -1
- package/dist/data/mutation-cell.d.ts.map +0 -1
- package/dist/data/mutation-cell.js.map +0 -1
- package/dist/data/query-cell.d.ts.map +0 -1
- package/dist/data/query-cell.js.map +0 -1
- package/dist/data/query-key.js.map +0 -1
- package/dist/data/shared.js.map +0 -1
- package/dist/data/types.d.ts.map +0 -1
- package/dist/foundations/icon/icon.d.ts.map +0 -1
- package/dist/foundations/icon/icon.js.map +0 -1
- package/dist/foundations/icon/icon.types.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.d.ts.map +0 -1
- package/dist/foundations/interactions/dismissable.js.map +0 -1
- package/dist/foundations/interactions/focusable.d.ts.map +0 -1
- package/dist/foundations/interactions/focusable.js.map +0 -1
- package/dist/foundations/interactions/hoverable.d.ts.map +0 -1
- package/dist/foundations/interactions/hoverable.js.map +0 -1
- package/dist/foundations/interactions/interaction-policy.d.ts.map +0 -1
- package/dist/foundations/interactions/interaction-policy.js.map +0 -1
- package/dist/foundations/interactions/pressable.d.ts.map +0 -1
- package/dist/foundations/interactions/pressable.js.map +0 -1
- package/dist/foundations/interactions/roving-focus.d.ts.map +0 -1
- package/dist/foundations/interactions/roving-focus.js.map +0 -1
- package/dist/foundations/state/controllable.d.ts.map +0 -1
- package/dist/foundations/state/controllable.js.map +0 -1
- package/dist/foundations/structures/collection.d.ts.map +0 -1
- package/dist/foundations/structures/collection.js.map +0 -1
- package/dist/foundations/structures/layer.d.ts.map +0 -1
- package/dist/foundations/structures/layer.js.map +0 -1
- package/dist/foundations/structures/layout.d.ts.map +0 -1
- package/dist/foundations/structures/layout.js.map +0 -1
- package/dist/foundations/structures/presence.d.ts.map +0 -1
- package/dist/foundations/structures/presence.js.map +0 -1
- package/dist/foundations/structures/slot.d.ts.map +0 -1
- package/dist/foundations/structures/slot.js.map +0 -1
- package/dist/foundations/utilities/aria.d.ts.map +0 -1
- package/dist/foundations/utilities/aria.js.map +0 -1
- package/dist/foundations/utilities/compose-handlers.d.ts.map +0 -1
- package/dist/foundations/utilities/compose-handlers.js.map +0 -1
- package/dist/foundations/utilities/compose-ref.d.ts.map +0 -1
- package/dist/foundations/utilities/compose-ref.js.map +0 -1
- package/dist/foundations/utilities/event-types.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.d.ts.map +0 -1
- package/dist/foundations/utilities/merge-props.js.map +0 -1
- package/dist/foundations/utilities/use-id.d.ts.map +0 -1
- package/dist/foundations/utilities/use-id.js.map +0 -1
- package/dist/fx/fx.d.ts.map +0 -1
- package/dist/fx/fx.js.map +0 -1
- package/dist/fx/noop.js.map +0 -1
- package/dist/fx/timing.d.ts.map +0 -1
- package/dist/fx/timing.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/jsx/types.d.ts.map +0 -1
- package/dist/jsx/utils.d.ts.map +0 -1
- package/dist/jsx/utils.js.map +0 -1
- package/dist/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx-runtime.js.map +0 -1
- package/dist/renderer/attributes.js.map +0 -1
- package/dist/renderer/boundaries.js.map +0 -1
- package/dist/renderer/child-shape.js.map +0 -1
- package/dist/renderer/children-fastpath.js.map +0 -1
- package/dist/renderer/children.js.map +0 -1
- package/dist/renderer/cleanup.js.map +0 -1
- package/dist/renderer/component-host-cleanup.js.map +0 -1
- package/dist/renderer/component-host-instances.js.map +0 -1
- package/dist/renderer/component-host.js.map +0 -1
- package/dist/renderer/dom-host.js.map +0 -1
- package/dist/renderer/dom-internal.js.map +0 -1
- package/dist/renderer/element-children.js.map +0 -1
- package/dist/renderer/error-boundary-dom.js.map +0 -1
- package/dist/renderer/evaluate-dom-range.js.map +0 -1
- package/dist/renderer/evaluate-reconcile.js.map +0 -1
- package/dist/renderer/evaluate.js.map +0 -1
- package/dist/renderer/fastpath.js.map +0 -1
- package/dist/renderer/for-commit-dom-map.js.map +0 -1
- package/dist/renderer/for-commit-removal.js.map +0 -1
- package/dist/renderer/for-commit-reorder.js.map +0 -1
- package/dist/renderer/for-commit.js.map +0 -1
- package/dist/renderer/index.js.map +0 -1
- package/dist/renderer/keyed-children.js.map +0 -1
- package/dist/renderer/keyed.js.map +0 -1
- package/dist/renderer/namespaces.js.map +0 -1
- package/dist/renderer/prop-bindings.js.map +0 -1
- package/dist/renderer/reactive-child-dom.js.map +0 -1
- package/dist/renderer/reactive-child-sources.js.map +0 -1
- package/dist/renderer/reactive-children.js.map +0 -1
- package/dist/renderer/reconcile-commit.js.map +0 -1
- package/dist/renderer/reconcile-fastpaths.js.map +0 -1
- package/dist/renderer/reconcile-resolution.js.map +0 -1
- package/dist/renderer/reconcile.js.map +0 -1
- package/dist/renderer/retained-element-rollback.js.map +0 -1
- package/dist/renderer/stable-patch.js.map +0 -1
- package/dist/renderer/static-reuse.js.map +0 -1
- package/dist/renderer/utils.js.map +0 -1
- package/dist/router/access.js.map +0 -1
- package/dist/router/activity.d.ts.map +0 -1
- package/dist/router/activity.js.map +0 -1
- package/dist/router/authoring.d.ts.map +0 -1
- package/dist/router/authoring.js.map +0 -1
- package/dist/router/internal-types.d.ts.map +0 -1
- package/dist/router/lazy.d.ts.map +0 -1
- package/dist/router/lazy.js.map +0 -1
- package/dist/router/manifest.d.ts.map +0 -1
- package/dist/router/manifest.js.map +0 -1
- package/dist/router/match.js.map +0 -1
- package/dist/router/navigate.d.ts.map +0 -1
- package/dist/router/navigate.js.map +0 -1
- package/dist/router/navigation-registry.d.ts.map +0 -1
- package/dist/router/navigation-registry.js.map +0 -1
- package/dist/router/navigation-scroll.d.ts.map +0 -1
- package/dist/router/navigation-scroll.js.map +0 -1
- package/dist/router/navigation-targets.d.ts.map +0 -1
- package/dist/router/navigation-targets.js.map +0 -1
- package/dist/router/policy.d.ts.map +0 -1
- package/dist/router/policy.js.map +0 -1
- package/dist/router/rendering.d.ts.map +0 -1
- package/dist/router/rendering.js.map +0 -1
- package/dist/router/resolution.d.ts.map +0 -1
- package/dist/router/resolution.js.map +0 -1
- package/dist/router/route-context.js.map +0 -1
- package/dist/router/route-matching.d.ts.map +0 -1
- package/dist/router/route-matching.js.map +0 -1
- package/dist/router/route-query.d.ts.map +0 -1
- package/dist/router/route-query.js.map +0 -1
- package/dist/router/store.d.ts.map +0 -1
- package/dist/router/store.js.map +0 -1
- package/dist/runtime/access.d.ts.map +0 -1
- package/dist/runtime/access.js.map +0 -1
- package/dist/runtime/child-scope.d.ts.map +0 -1
- package/dist/runtime/child-scope.js.map +0 -1
- package/dist/runtime/component-cleanup.d.ts.map +0 -1
- package/dist/runtime/component-cleanup.js.map +0 -1
- package/dist/runtime/component-commit.js.map +0 -1
- package/dist/runtime/component-internal.d.ts.map +0 -1
- package/dist/runtime/component-internal.js.map +0 -1
- package/dist/runtime/component-lifecycle.d.ts.map +0 -1
- package/dist/runtime/component-lifecycle.js.map +0 -1
- package/dist/runtime/component-scope.d.ts.map +0 -1
- package/dist/runtime/component-scope.js.map +0 -1
- package/dist/runtime/context.d.ts.map +0 -1
- package/dist/runtime/context.js.map +0 -1
- package/dist/runtime/control.d.ts.map +0 -1
- package/dist/runtime/control.js.map +0 -1
- package/dist/runtime/derive.d.ts.map +0 -1
- package/dist/runtime/derive.js.map +0 -1
- package/dist/runtime/dev-namespace.d.ts.map +0 -1
- package/dist/runtime/dev-namespace.js.map +0 -1
- package/dist/runtime/effect.d.ts.map +0 -1
- package/dist/runtime/effect.js.map +0 -1
- package/dist/runtime/error-boundary.d.ts.map +0 -1
- package/dist/runtime/error-boundary.js.map +0 -1
- package/dist/runtime/events.d.ts.map +0 -1
- package/dist/runtime/events.js.map +0 -1
- package/dist/runtime/execution-model.d.ts.map +0 -1
- package/dist/runtime/execution-model.js.map +0 -1
- package/dist/runtime/fastlane.d.ts.map +0 -1
- package/dist/runtime/fastlane.js.map +0 -1
- package/dist/runtime/for-bench.d.ts.map +0 -1
- package/dist/runtime/for-bench.js.map +0 -1
- package/dist/runtime/for-internal.d.ts.map +0 -1
- package/dist/runtime/for-internal.js.map +0 -1
- package/dist/runtime/for-reconcile.d.ts.map +0 -1
- package/dist/runtime/for-reconcile.js.map +0 -1
- package/dist/runtime/for-scopes.d.ts.map +0 -1
- package/dist/runtime/for-scopes.js.map +0 -1
- package/dist/runtime/for-signals.d.ts.map +0 -1
- package/dist/runtime/for-signals.js.map +0 -1
- package/dist/runtime/for-types.d.ts.map +0 -1
- package/dist/runtime/lifecycle-operations.d.ts.map +0 -1
- package/dist/runtime/lifecycle-operations.js.map +0 -1
- package/dist/runtime/perf-metrics.d.ts.map +0 -1
- package/dist/runtime/perf-metrics.js.map +0 -1
- package/dist/runtime/portal.d.ts.map +0 -1
- package/dist/runtime/portal.js.map +0 -1
- package/dist/runtime/readable.d.ts.map +0 -1
- package/dist/runtime/readable.js.map +0 -1
- package/dist/runtime/resource-cell.js.map +0 -1
- package/dist/runtime/resource-operation.d.ts.map +0 -1
- package/dist/runtime/resource-operation.js.map +0 -1
- package/dist/runtime/runtime.d.ts.map +0 -1
- package/dist/runtime/runtime.js.map +0 -1
- package/dist/runtime/scheduler.d.ts.map +0 -1
- package/dist/runtime/scheduler.js.map +0 -1
- package/dist/runtime/selector-store.js.map +0 -1
- package/dist/runtime/selector.d.ts.map +0 -1
- package/dist/runtime/selector.js.map +0 -1
- package/dist/runtime/snapshot-source.d.ts.map +0 -1
- package/dist/runtime/snapshot-source.js.map +0 -1
- package/dist/runtime/state.d.ts.map +0 -1
- package/dist/runtime/state.js.map +0 -1
- package/dist/ssg/batch-render.js.map +0 -1
- package/dist/ssg/create-static-gen.d.ts.map +0 -1
- package/dist/ssg/create-static-gen.js.map +0 -1
- package/dist/ssg/generate-metadata.js.map +0 -1
- package/dist/ssg/generation-plan.js.map +0 -1
- package/dist/ssg/incremental-manifest.js.map +0 -1
- package/dist/ssg/resolve-ssg-data.js.map +0 -1
- package/dist/ssg/route-utils.js.map +0 -1
- package/dist/ssg/static-routes.js.map +0 -1
- package/dist/ssg/types.d.ts.map +0 -1
- package/dist/ssg/write-static-files.js.map +0 -1
- package/dist/ssr/attrs.js.map +0 -1
- package/dist/ssr/boundaries.js.map +0 -1
- package/dist/ssr/component-runtime.js.map +0 -1
- package/dist/ssr/context.d.ts.map +0 -1
- package/dist/ssr/context.js.map +0 -1
- package/dist/ssr/errors.d.ts.map +0 -1
- package/dist/ssr/errors.js.map +0 -1
- package/dist/ssr/escape.js.map +0 -1
- package/dist/ssr/hydration-data.js.map +0 -1
- package/dist/ssr/hydration-verify.d.ts.map +0 -1
- package/dist/ssr/hydration-verify.js.map +0 -1
- package/dist/ssr/index-internal.d.ts.map +0 -1
- package/dist/ssr/index-internal.js.map +0 -1
- package/dist/ssr/render-keys.js.map +0 -1
- package/dist/ssr/render-resolved.d.ts.map +0 -1
- package/dist/ssr/render-resolved.js.map +0 -1
- package/dist/ssr/render-sync.d.ts.map +0 -1
- package/dist/ssr/render-sync.js.map +0 -1
- package/dist/ssr/route-policy-resolution.js.map +0 -1
- package/dist/ssr/route-render.d.ts.map +0 -1
- package/dist/ssr/route-render.js.map +0 -1
- package/dist/ssr/sink.d.ts.map +0 -1
- package/dist/ssr/sink.js.map +0 -1
- package/dist/ssr/types.d.ts.map +0 -1
- package/dist/ssr/verify-hydration.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
|
@@ -38,5 +38,4 @@ declare function createRuntime(options?: AskrRuntimeOptions): AskrRuntime;
|
|
|
38
38
|
declare function getDefaultRuntime(): AskrRuntime;
|
|
39
39
|
declare function configureRuntimeRenderer(renderer: RuntimeRendererHost, runtime?: AskrRuntime): void;
|
|
40
40
|
//#endregion
|
|
41
|
-
export { AskrRuntime, AskrRuntimeOptions, RuntimeKeyedReorderDecision, RuntimeRendererHost, createRuntime, getDefaultRuntime };
|
|
42
|
-
//# sourceMappingURL=runtime.d.ts.map
|
|
41
|
+
export { AskrRuntime, AskrRuntimeOptions, RuntimeKeyedReorderDecision, RuntimeRendererHost, createRuntime, getDefaultRuntime };
|
package/dist/runtime/runtime.js
CHANGED
|
@@ -64,5 +64,4 @@ declare const globalScheduler: Scheduler;
|
|
|
64
64
|
declare function isSchedulerExecuting(): boolean;
|
|
65
65
|
declare function scheduleEventHandler(handler: EventListener): EventListener;
|
|
66
66
|
//#endregion
|
|
67
|
-
export { Scheduler, SchedulerBulkCommitProbe, SchedulerLane, scheduleEventHandler };
|
|
68
|
-
//# sourceMappingURL=scheduler.d.ts.map
|
|
67
|
+
export { Scheduler, SchedulerBulkCommitProbe, SchedulerLane, scheduleEventHandler };
|
|
@@ -123,11 +123,11 @@ var Scheduler = class {
|
|
|
123
123
|
}
|
|
124
124
|
this.running = true;
|
|
125
125
|
this.depth = 0;
|
|
126
|
-
|
|
126
|
+
const failures = [];
|
|
127
127
|
let executedTaskCount = 0;
|
|
128
128
|
const executionsByTask = isDevelopmentEnvironment() ? /* @__PURE__ */ new Map() : null;
|
|
129
129
|
try {
|
|
130
|
-
while (
|
|
130
|
+
while (true) {
|
|
131
131
|
let didRunTask = false;
|
|
132
132
|
for (const lane of SCHEDULER_LANES) {
|
|
133
133
|
const laneQueue = this.lanes[lane];
|
|
@@ -143,18 +143,16 @@ var Scheduler = class {
|
|
|
143
143
|
try {
|
|
144
144
|
this.executionDepth++;
|
|
145
145
|
task();
|
|
146
|
-
|
|
146
|
+
} catch (err) {
|
|
147
|
+
failures.push(err);
|
|
148
|
+
} finally {
|
|
149
|
+
if (this.executionDepth > 0) this.executionDepth--;
|
|
147
150
|
executedTaskCount++;
|
|
148
151
|
executedInLane++;
|
|
149
152
|
didRunTask = true;
|
|
150
|
-
} catch (err) {
|
|
151
|
-
if (this.executionDepth > 0) this.executionDepth--;
|
|
152
|
-
fatal = err;
|
|
153
|
-
break;
|
|
154
153
|
}
|
|
155
154
|
}
|
|
156
155
|
if (executedInLane > 0) this.taskCount = Math.max(0, this.taskCount - executedInLane);
|
|
157
|
-
if (fatal !== null) break;
|
|
158
156
|
}
|
|
159
157
|
if (!didRunTask) break;
|
|
160
158
|
}
|
|
@@ -170,7 +168,8 @@ var Scheduler = class {
|
|
|
170
168
|
this.resolveWaiters();
|
|
171
169
|
recordSchedulerFlushTaskCount(executedTaskCount);
|
|
172
170
|
}
|
|
173
|
-
if (
|
|
171
|
+
if (failures.length === 1) throw failures[0];
|
|
172
|
+
if (failures.length > 1) throw new AggregateError(failures, "Scheduler task failures");
|
|
174
173
|
}
|
|
175
174
|
runWithSyncProgress(fn) {
|
|
176
175
|
const prev = this.allowSyncProgress;
|
|
@@ -315,5 +314,3 @@ function scheduleEventHandler(handler) {
|
|
|
315
314
|
}
|
|
316
315
|
//#endregion
|
|
317
316
|
export { Scheduler, globalScheduler, scheduleEventHandler };
|
|
318
|
-
|
|
319
|
-
//# sourceMappingURL=scheduler.js.map
|
package/dist/runtime/selector.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./perf-metrics.js";
|
|
2
2
|
import { clearDerivedDependencySubscriptions, markReactivePropsDirtySource, markReadableDerivedSubscribersDirty, markReadableUsage, notifyReadableReaders, recordReadableRead, syncDerivedDependencySubscriptions, withDerivedReadTracking } from "./readable.js";
|
|
3
3
|
import { claimHookIndex, getCurrentInstance } from "./component-scope.js";
|
|
4
4
|
import "./component.js";
|
|
5
5
|
import { markDirtySelectorRecord, takeDirtySelectorRecords } from "./selector-store.js";
|
|
6
|
-
//#region src/runtime/selector.ts
|
|
7
6
|
const selectorCells = /* @__PURE__ */ new WeakMap();
|
|
8
7
|
const selectorRecords = /* @__PURE__ */ new WeakMap();
|
|
9
8
|
function getSelectorStore(instance) {
|
|
@@ -31,9 +30,7 @@ function isDefaultSelectorEquals(equals) {
|
|
|
31
30
|
return equals === Object.is;
|
|
32
31
|
}
|
|
33
32
|
function createCandidateSource(candidate) {
|
|
34
|
-
|
|
35
|
-
source._candidate = candidate;
|
|
36
|
-
return source;
|
|
33
|
+
return { _candidate: candidate };
|
|
37
34
|
}
|
|
38
35
|
function getCandidateSource(lane, candidate) {
|
|
39
36
|
if (isObjectCandidate(candidate)) {
|
|
@@ -121,7 +118,6 @@ function createSelectorLane(record, equals) {
|
|
|
121
118
|
return lane;
|
|
122
119
|
}
|
|
123
120
|
function notifySelectorSource(source) {
|
|
124
|
-
incrementPerfMetric("selectorInvalidations");
|
|
125
121
|
markReadableDerivedSubscribersDirty(source);
|
|
126
122
|
markReactivePropsDirtySource(source);
|
|
127
123
|
notifyReadableReaders(source);
|
|
@@ -205,12 +201,10 @@ function ensureSelectorHookBinding(hook) {
|
|
|
205
201
|
function createSelectorHook(instance, hookIndex, source, equals) {
|
|
206
202
|
const hook = function selectorPredicate(candidate) {
|
|
207
203
|
const selectorHook = hook;
|
|
208
|
-
const record = ensureSelectorHookBinding(selectorHook);
|
|
204
|
+
const record = selectorHook._record ?? ensureSelectorHookBinding(selectorHook);
|
|
209
205
|
const lane = selectorHook._lane;
|
|
210
206
|
if (!lane) throw new Error("selector() binding could not be established.");
|
|
211
207
|
recordReadableRead(getCandidateSource(lane, candidate));
|
|
212
|
-
const perfMetricsStore = getPerfMetricsStore();
|
|
213
|
-
if (perfMetricsStore) perfMetricsStore.selectorCandidateReads += 1;
|
|
214
208
|
const current = record._dirty || !record._hasValue ? recomputeSelectorSourceRecord(record, record._scheduled) : record._value;
|
|
215
209
|
return lane._equals(current, candidate);
|
|
216
210
|
};
|
|
@@ -255,5 +249,3 @@ function selector(source, equals = Object.is) {
|
|
|
255
249
|
}
|
|
256
250
|
//#endregion
|
|
257
251
|
export { selector };
|
|
258
|
-
|
|
259
|
-
//# sourceMappingURL=selector.js.map
|
|
@@ -6,5 +6,4 @@ type SnapshotSourceBrand = {
|
|
|
6
6
|
declare function brandSnapshotSource<T extends object>(value: T): T & SnapshotSourceBrand;
|
|
7
7
|
declare function isSnapshotSource(value: unknown): value is SnapshotSourceBrand;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { SNAPSHOT_SOURCE_BRAND, SnapshotSourceBrand };
|
|
10
|
-
//# sourceMappingURL=snapshot-source.d.ts.map
|
|
9
|
+
export { SNAPSHOT_SOURCE_BRAND, SnapshotSourceBrand };
|
package/dist/runtime/state.d.ts
CHANGED
|
@@ -51,5 +51,4 @@ type StateTuple<T> = [get: State<T>, set: StateSetter<T>] & State<T>;
|
|
|
51
51
|
*/
|
|
52
52
|
declare function state<T>(initialValue: T): StateTuple<T>;
|
|
53
53
|
//#endregion
|
|
54
|
-
export { State, StateSetter, StateTuple, state };
|
|
55
|
-
//# sourceMappingURL=state.d.ts.map
|
|
54
|
+
export { State, StateSetter, StateTuple, state };
|
package/dist/runtime/state.js
CHANGED
|
@@ -45,7 +45,7 @@ function state(initialValue) {
|
|
|
45
45
|
const instance = getCurrentInstance();
|
|
46
46
|
if (!instance) throw new Error("state() can only be called during component render execution. Move state() calls to the top level of your component function.");
|
|
47
47
|
const index = claimHookIndex(instance, "state");
|
|
48
|
-
const stateValues = instance.stateValues;
|
|
48
|
+
const stateValues = instance.stateValues ??= [];
|
|
49
49
|
if (stateValues[index]) {
|
|
50
50
|
const existing = stateValues[index];
|
|
51
51
|
if (existing._owner !== instance) throw new Error(`State ownership violation: state() called at index ${index} is owned by a different component instance. State ownership is positional and immutable.`);
|
|
@@ -92,5 +92,3 @@ function createStateCell(initialValue, instance) {
|
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
94
|
export { state };
|
|
95
|
-
|
|
96
|
-
//# sourceMappingURL=state.js.map
|
package/dist/ssg/batch-render.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RouteRegistry } from "../common/router.js";
|
|
2
2
|
import { RouteConfig, SSGGenerateOptions, SSGOptions, SSGResult } from "./types.js";
|
|
3
|
+
import * as fs from "node:fs/promises";
|
|
3
4
|
|
|
4
5
|
//#region src/ssg/create-static-gen.d.ts
|
|
5
6
|
type AnyRouteConfig = RouteConfig<string>;
|
|
@@ -15,6 +16,8 @@ type StaticGenRouteSource<TRoutes extends readonly AnyRouteConfig[]> = {
|
|
|
15
16
|
registry: RouteRegistry;
|
|
16
17
|
routes?: never;
|
|
17
18
|
};
|
|
19
|
+
type OutputDirectoryFileOperations = Pick<typeof fs, 'rename' | 'rm'>;
|
|
20
|
+
declare function replaceOutputDirectory(stagingDir: string, outputDir: string, fileOperations?: OutputDirectoryFileOperations): Promise<void>;
|
|
18
21
|
/**
|
|
19
22
|
* Create a Static Site Generator
|
|
20
23
|
*
|
|
@@ -60,5 +63,4 @@ declare function createStaticGen<const TRoutes extends readonly AnyRouteConfig[]
|
|
|
60
63
|
getResult(): SSGResult | null;
|
|
61
64
|
};
|
|
62
65
|
//#endregion
|
|
63
|
-
export { createStaticGen };
|
|
64
|
-
//# sourceMappingURL=create-static-gen.d.ts.map
|
|
66
|
+
export { createStaticGen };
|
|
@@ -8,6 +8,9 @@ import { generateSSGResult, resultToMetadata, writeMetadata } from "./generate-m
|
|
|
8
8
|
import { getExistingOutputFileSize, hashHtml, outputFileExists, readIncrementalManifest, writeIncrementalManifest } from "./incremental-manifest.js";
|
|
9
9
|
import { collectRemovedRouteResults, dedupeStrings, getRoutesToRender, selectRouteForGeneration } from "./generation-plan.js";
|
|
10
10
|
import { normalizeStaticRoutes, splitStaticRoutes } from "./static-routes.js";
|
|
11
|
+
import * as fs from "node:fs/promises";
|
|
12
|
+
import * as pathModule from "node:path";
|
|
13
|
+
import * as os from "node:os";
|
|
11
14
|
//#region src/ssg/create-static-gen.ts
|
|
12
15
|
function resolveParallelism(requested) {
|
|
13
16
|
if (requested !== "auto") return Math.max(1, requested ?? 1);
|
|
@@ -15,7 +18,46 @@ function resolveParallelism(requested) {
|
|
|
15
18
|
const envWorkers = Number(maybeNavigator.process?.env?.ASKR_SSG_WORKERS ?? maybeNavigator.process?.env?.NUMBER_OF_PROCESSORS ?? maybeNavigator.process?.env?.UV_THREADPOOL_SIZE);
|
|
16
19
|
if (Number.isFinite(envWorkers) && envWorkers > 0) return Math.max(1, Math.trunc(envWorkers));
|
|
17
20
|
if (typeof maybeNavigator.navigator?.hardwareConcurrency === "number") return Math.max(1, maybeNavigator.navigator.hardwareConcurrency);
|
|
18
|
-
|
|
21
|
+
const availableParallelism = os.availableParallelism;
|
|
22
|
+
return Math.max(1, availableParallelism?.() ?? os.cpus().length ?? 1);
|
|
23
|
+
}
|
|
24
|
+
async function createStagingDirectory(outputDir) {
|
|
25
|
+
const parent = pathModule.dirname(outputDir);
|
|
26
|
+
const base = pathModule.basename(outputDir);
|
|
27
|
+
await fs.mkdir(parent, { recursive: true });
|
|
28
|
+
return fs.mkdtemp(pathModule.join(parent, `.${base}.askr-staging-`));
|
|
29
|
+
}
|
|
30
|
+
async function replaceOutputDirectory(stagingDir, outputDir, fileOperations = fs) {
|
|
31
|
+
const parent = pathModule.dirname(outputDir);
|
|
32
|
+
const backupDir = pathModule.join(parent, `.${pathModule.basename(outputDir)}.askr-backup-${Date.now()}`);
|
|
33
|
+
let backedUp = false;
|
|
34
|
+
try {
|
|
35
|
+
try {
|
|
36
|
+
await fileOperations.rename(outputDir, backupDir);
|
|
37
|
+
backedUp = true;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
if (error.code !== "ENOENT") throw error;
|
|
40
|
+
}
|
|
41
|
+
await fileOperations.rename(stagingDir, outputDir);
|
|
42
|
+
await fileOperations.rm(backupDir, {
|
|
43
|
+
recursive: true,
|
|
44
|
+
force: true
|
|
45
|
+
});
|
|
46
|
+
} catch (error) {
|
|
47
|
+
if (backedUp) {
|
|
48
|
+
await fileOperations.rm(outputDir, {
|
|
49
|
+
recursive: true,
|
|
50
|
+
force: true
|
|
51
|
+
});
|
|
52
|
+
await fileOperations.rename(backupDir, outputDir);
|
|
53
|
+
}
|
|
54
|
+
throw error;
|
|
55
|
+
} finally {
|
|
56
|
+
await fileOperations.rm(stagingDir, {
|
|
57
|
+
recursive: true,
|
|
58
|
+
force: true
|
|
59
|
+
});
|
|
60
|
+
}
|
|
19
61
|
}
|
|
20
62
|
/**
|
|
21
63
|
* Create a Static Site Generator
|
|
@@ -153,22 +195,33 @@ function createStaticGen(options) {
|
|
|
153
195
|
if (routeResult) routeResults.push(routeResult);
|
|
154
196
|
}
|
|
155
197
|
routeResults.push(...removedResults);
|
|
156
|
-
const writeStartTime = performance.now();
|
|
157
|
-
await writeStaticFiles(routeResults, options.outputDir, { concurrency: resolvedConcurrency });
|
|
158
|
-
addPerfDuration("ssgWriteTimeMs", performance.now() - writeStartTime);
|
|
159
198
|
result = generateSSGResult(routeResults, {
|
|
160
199
|
mode: effectiveMode,
|
|
161
200
|
cacheHits,
|
|
162
201
|
invalidatedKeys: changedKeys,
|
|
163
202
|
invalidatedRoutes: changedRoutes
|
|
164
203
|
});
|
|
165
|
-
|
|
166
|
-
await
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
204
|
+
if (effectiveMode === "full" && result.failed > 0) return result;
|
|
205
|
+
const targetOutputDir = effectiveMode === "full" ? await createStagingDirectory(options.outputDir) : options.outputDir;
|
|
206
|
+
try {
|
|
207
|
+
const writeStartTime = performance.now();
|
|
208
|
+
await writeStaticFiles(routeResults, targetOutputDir, { concurrency: resolvedConcurrency });
|
|
209
|
+
addPerfDuration("ssgWriteTimeMs", performance.now() - writeStartTime);
|
|
210
|
+
await writeMetadata(resultToMetadata(result), targetOutputDir);
|
|
211
|
+
await writeIncrementalManifest({
|
|
212
|
+
schemaVersion: 1,
|
|
213
|
+
seed,
|
|
214
|
+
mode: effectiveMode,
|
|
215
|
+
routes: nextManifestRoutes
|
|
216
|
+
}, targetOutputDir);
|
|
217
|
+
if (effectiveMode === "full") await replaceOutputDirectory(targetOutputDir, options.outputDir);
|
|
218
|
+
} catch (error) {
|
|
219
|
+
if (effectiveMode === "full") await fs.rm(targetOutputDir, {
|
|
220
|
+
recursive: true,
|
|
221
|
+
force: true
|
|
222
|
+
});
|
|
223
|
+
throw error;
|
|
224
|
+
}
|
|
172
225
|
return result;
|
|
173
226
|
},
|
|
174
227
|
/**
|
|
@@ -194,6 +247,4 @@ function createStaticGen(options) {
|
|
|
194
247
|
};
|
|
195
248
|
}
|
|
196
249
|
//#endregion
|
|
197
|
-
export { createStaticGen };
|
|
198
|
-
|
|
199
|
-
//# sourceMappingURL=create-static-gen.js.map
|
|
250
|
+
export { createStaticGen, replaceOutputDirectory };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fsPromises from "node:fs/promises";
|
|
2
|
-
import * as fs from "node:fs";
|
|
3
2
|
import * as pathModule from "node:path";
|
|
3
|
+
import * as fs from "node:fs";
|
|
4
4
|
const MANIFEST_DIR = ".askr";
|
|
5
5
|
const MANIFEST_FILE = "ssg-manifest.json";
|
|
6
6
|
function hashHtml(html) {
|
|
@@ -52,5 +52,3 @@ function outputFileExists(outputDir, filePath) {
|
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
54
|
export { getExistingOutputFileSize, getIncrementalManifestPath, hashHtml, outputFileExists, readIncrementalManifest, writeIncrementalManifest };
|
|
55
|
-
|
|
56
|
-
//# sourceMappingURL=incremental-manifest.js.map
|
package/dist/ssg/route-utils.js
CHANGED
package/dist/ssg/types.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ interface SSGBaseOptions {
|
|
|
62
62
|
dataOverrides?: Record<string, unknown>;
|
|
63
63
|
/** Optional document wrapper for full HTML output */
|
|
64
64
|
document?: DocumentRenderer;
|
|
65
|
-
/** Optional concurrency limit for rendering (default:
|
|
65
|
+
/** Optional concurrency limit for rendering (default: 1) */
|
|
66
66
|
concurrency?: number;
|
|
67
67
|
/** Preferred render parallelism. `'auto'` resolves from the host machine. */
|
|
68
68
|
parallelism?: number | 'auto';
|
|
@@ -185,5 +185,4 @@ interface DiscoveredResources {
|
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
//#endregion
|
|
188
|
-
export { DiscoveredResources, RouteConfig, RouteRenderReason, RouteRenderResult, RouteRenderStatus, SSGGenerateOptions, SSGMetadata, SSGMode, SSGOptions, SSGResult };
|
|
189
|
-
//# sourceMappingURL=types.d.ts.map
|
|
188
|
+
export { DiscoveredResources, RouteConfig, RouteRenderReason, RouteRenderResult, RouteRenderStatus, SSGGenerateOptions, SSGMetadata, SSGMode, SSGOptions, SSGResult };
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { __CONTROL_BOUNDARY__ } from "../common/control.js";
|
|
2
2
|
import { ELEMENT_TYPE } from "../common/jsx.js";
|
|
3
3
|
import { evaluateCaseState, evaluateShowState } from "../runtime/control.js";
|
|
4
|
-
import { evaluateForState } from "../runtime/for-internal.js";
|
|
4
|
+
import { commitForStateTransaction, evaluateForState, rollbackForStateTransaction } from "../runtime/for-internal.js";
|
|
5
5
|
import "../runtime/index.js";
|
|
6
6
|
import "../jsx/index.js";
|
|
7
7
|
//#region src/ssr/boundaries.ts
|
|
@@ -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 };
|
|
@@ -7,30 +7,8 @@ import { DefaultPortal, disposeDefaultPortalScope } from "../runtime/portal.js";
|
|
|
7
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;
|
|
@@ -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
|
+
};
|