@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,4 +1,4 @@
|
|
|
1
|
-
import { logger } from "../
|
|
1
|
+
import { logger } from "../common/logger.js";
|
|
2
2
|
import { withAsyncResourceContext } from "./context.js";
|
|
3
3
|
import { isPromiseLike } from "../common/promise.js";
|
|
4
4
|
import { brandSnapshotSource } from "./snapshot-source.js";
|
|
@@ -59,7 +59,7 @@ var ResourceCell = class {
|
|
|
59
59
|
result = withAsyncResourceContext(this.resourceFrame, () => this.fn({ signal: controller.signal }));
|
|
60
60
|
} catch (err) {
|
|
61
61
|
this.pending = false;
|
|
62
|
-
this.error = err;
|
|
62
|
+
this.error = err instanceof Error ? err : new Error(String(err));
|
|
63
63
|
if (notify) this.notifySubscribers();
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
@@ -84,7 +84,7 @@ var ResourceCell = class {
|
|
|
84
84
|
if (this.controller !== controller) return;
|
|
85
85
|
if (controller.signal.aborted || err instanceof Error && err.name === "AbortError" || typeof DOMException !== "undefined" && err instanceof DOMException && err.name === "AbortError") return;
|
|
86
86
|
this.pending = false;
|
|
87
|
-
this.error = err;
|
|
87
|
+
this.error = err instanceof Error ? err : new Error(String(err));
|
|
88
88
|
try {
|
|
89
89
|
if (this.ownerName) logger.error(`[Askr] Async resource error in ${this.ownerName}:`, err);
|
|
90
90
|
else logger.error("[Askr] Async resource error:", err);
|
|
@@ -110,5 +110,3 @@ var ResourceCell = class {
|
|
|
110
110
|
};
|
|
111
111
|
//#endregion
|
|
112
112
|
export { ResourceCell };
|
|
113
|
-
|
|
114
|
-
//# sourceMappingURL=resource-cell.js.map
|
|
@@ -9,5 +9,4 @@ declare function resource<T, const TDeps extends readonly unknown[]>(fn: (opts:
|
|
|
9
9
|
signal: AbortSignal;
|
|
10
10
|
}) => PromiseLike<T> | T, deps: TDeps): ResourceResult<T>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { ResourceResult, resource };
|
|
13
|
-
//# sourceMappingURL=resource-operation.d.ts.map
|
|
12
|
+
export { ResourceResult, resource };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { enqueueRuntimeLane } from "./access.js";
|
|
2
2
|
import { getCurrentContextFrame } from "./context.js";
|
|
3
3
|
import { getCurrentComponentInstance } from "./component-scope.js";
|
|
4
|
+
import { registerCommitOperationForInstance } from "./component-lifecycle.js";
|
|
4
5
|
import "./component.js";
|
|
5
|
-
import { state } from "./state.js";
|
|
6
6
|
import { brandSnapshotSource } from "./snapshot-source.js";
|
|
7
7
|
import { SSRDataMissingError } from "../common/ssr-errors.js";
|
|
8
8
|
import { getActiveRenderContext, getCurrentRenderData, getNextRenderKey, throwSSRDataMissing } from "../common/render-context.js";
|
|
9
9
|
import { ResourceCell } from "./resource-cell.js";
|
|
10
|
+
import { state } from "./state.js";
|
|
10
11
|
//#region src/runtime/resource-operation.ts
|
|
11
12
|
/**
|
|
12
13
|
* Resource primitive — simple, deterministic async primitive
|
|
@@ -95,27 +96,29 @@ function resource(fn, deps = []) {
|
|
|
95
96
|
}
|
|
96
97
|
} else {
|
|
97
98
|
const scheduledGeneration = cell.generation;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
99
|
+
registerCommitOperationForInstance(inst, () => {
|
|
100
|
+
enqueueRuntimeLane("post", () => {
|
|
101
|
+
if (!inst.notifyUpdate || cell.generation !== scheduledGeneration) return;
|
|
102
|
+
try {
|
|
103
|
+
cell.start(false, false);
|
|
104
|
+
} catch (err) {
|
|
105
|
+
const cur = holder();
|
|
106
|
+
cur.snapshot.value = cell.value;
|
|
107
|
+
cur.snapshot.pending = cell.pending;
|
|
108
|
+
cur.snapshot.error = err ?? null;
|
|
109
|
+
holder.set(cur);
|
|
110
|
+
inst.notifyUpdate?.();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!cell.pending) {
|
|
114
|
+
const cur = holder();
|
|
115
|
+
cur.snapshot.value = cell.value;
|
|
116
|
+
cur.snapshot.pending = cell.pending;
|
|
117
|
+
cur.snapshot.error = cell.error;
|
|
118
|
+
holder.set(cur);
|
|
119
|
+
inst.notifyUpdate?.();
|
|
120
|
+
}
|
|
121
|
+
});
|
|
119
122
|
});
|
|
120
123
|
}
|
|
121
124
|
}
|
|
@@ -139,17 +142,19 @@ function resource(fn, deps = []) {
|
|
|
139
142
|
}
|
|
140
143
|
} else {
|
|
141
144
|
const scheduledGeneration = cell.generation;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
registerCommitOperationForInstance(inst, () => {
|
|
146
|
+
enqueueRuntimeLane("post", () => {
|
|
147
|
+
if (!inst.notifyUpdate || cell.generation !== scheduledGeneration) return;
|
|
148
|
+
cell.start(false, false);
|
|
149
|
+
if (!cell.pending) {
|
|
150
|
+
const cur = holder();
|
|
151
|
+
cur.snapshot.value = cell.value;
|
|
152
|
+
cur.snapshot.pending = cell.pending;
|
|
153
|
+
cur.snapshot.error = cell.error;
|
|
154
|
+
holder.set(cur);
|
|
155
|
+
inst.notifyUpdate?.();
|
|
156
|
+
}
|
|
157
|
+
});
|
|
153
158
|
});
|
|
154
159
|
}
|
|
155
160
|
} catch (err) {
|
|
@@ -166,5 +171,3 @@ function resource(fn, deps = []) {
|
|
|
166
171
|
}
|
|
167
172
|
//#endregion
|
|
168
173
|
export { resource };
|
|
169
|
-
|
|
170
|
-
//# sourceMappingURL=resource-operation.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReadableSource } from "./readable.js";
|
|
2
1
|
import { ComponentInstance } from "./component-internal.js";
|
|
2
|
+
import { ReadableSource } from "./readable.js";
|
|
3
3
|
import { Scheduler } from "./scheduler.js";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/runtime.d.ts
|
|
@@ -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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isDevelopmentEnvironment } from "../common/env.js";
|
|
2
|
-
import { assertSchedulingPrecondition, invariant } from "../
|
|
3
|
-
import { logger } from "../
|
|
2
|
+
import { assertSchedulingPrecondition, invariant } from "../common/invariant.js";
|
|
3
|
+
import { logger } from "../common/logger.js";
|
|
4
4
|
import { recordSchedulerFlushTaskCount } from "./perf-metrics.js";
|
|
5
5
|
//#region src/runtime/scheduler.ts
|
|
6
6
|
/**
|
|
@@ -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
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { enqueueRuntimeLane } from "./access.js";
|
|
2
|
+
//#region src/runtime/selector-store.ts
|
|
3
|
+
const dirtySelectorRecords = /* @__PURE__ */ new Set();
|
|
4
|
+
let hasPendingSelectorFlush = false;
|
|
5
|
+
function markDirtySelectorRecord(record, flush) {
|
|
6
|
+
record._dirty = true;
|
|
7
|
+
if (record._scheduled) return;
|
|
8
|
+
record._scheduled = true;
|
|
9
|
+
dirtySelectorRecords.add(record);
|
|
10
|
+
if (hasPendingSelectorFlush) return;
|
|
11
|
+
hasPendingSelectorFlush = true;
|
|
12
|
+
enqueueRuntimeLane("derived", flush);
|
|
13
|
+
}
|
|
14
|
+
function takeDirtySelectorRecords() {
|
|
15
|
+
hasPendingSelectorFlush = false;
|
|
16
|
+
if (dirtySelectorRecords.size === 0) return [];
|
|
17
|
+
const pending = Array.from(dirtySelectorRecords);
|
|
18
|
+
dirtySelectorRecords.clear();
|
|
19
|
+
return pending;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { markDirtySelectorRecord, takeDirtySelectorRecords };
|
package/dist/runtime/selector.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { enqueueRuntimeLane } from "./access.js";
|
|
1
|
+
import "./perf-metrics.js";
|
|
3
2
|
import { clearDerivedDependencySubscriptions, markReactivePropsDirtySource, markReadableDerivedSubscribersDirty, markReadableUsage, notifyReadableReaders, recordReadableRead, syncDerivedDependencySubscriptions, withDerivedReadTracking } from "./readable.js";
|
|
4
3
|
import { claimHookIndex, getCurrentInstance } from "./component-scope.js";
|
|
5
4
|
import "./component.js";
|
|
6
|
-
|
|
5
|
+
import { markDirtySelectorRecord, takeDirtySelectorRecords } from "./selector-store.js";
|
|
7
6
|
const selectorCells = /* @__PURE__ */ new WeakMap();
|
|
8
7
|
const selectorRecords = /* @__PURE__ */ new WeakMap();
|
|
9
|
-
const dirtySelectorRecords = /* @__PURE__ */ new Set();
|
|
10
|
-
let hasPendingSelectorFlush = false;
|
|
11
8
|
function getSelectorStore(instance) {
|
|
12
9
|
let store = selectorCells.get(instance);
|
|
13
10
|
if (!store) {
|
|
@@ -16,24 +13,11 @@ function getSelectorStore(instance) {
|
|
|
16
13
|
}
|
|
17
14
|
return store;
|
|
18
15
|
}
|
|
19
|
-
function scheduleSelectorFlush() {
|
|
20
|
-
if (hasPendingSelectorFlush) return;
|
|
21
|
-
hasPendingSelectorFlush = true;
|
|
22
|
-
enqueueRuntimeLane("derived", flushDirtySelectorRecords);
|
|
23
|
-
}
|
|
24
16
|
function markSelectorRecordDirty(record) {
|
|
25
|
-
record
|
|
26
|
-
if (record._scheduled) return;
|
|
27
|
-
record._scheduled = true;
|
|
28
|
-
dirtySelectorRecords.add(record);
|
|
29
|
-
scheduleSelectorFlush();
|
|
17
|
+
markDirtySelectorRecord(record, flushDirtySelectorRecords);
|
|
30
18
|
}
|
|
31
19
|
function flushDirtySelectorRecords() {
|
|
32
|
-
|
|
33
|
-
if (dirtySelectorRecords.size === 0) return;
|
|
34
|
-
const pending = Array.from(dirtySelectorRecords);
|
|
35
|
-
dirtySelectorRecords.clear();
|
|
36
|
-
for (const record of pending) {
|
|
20
|
+
for (const record of takeDirtySelectorRecords()) {
|
|
37
21
|
record._scheduled = false;
|
|
38
22
|
if (!record._dirty) continue;
|
|
39
23
|
recomputeSelectorSourceRecord(record, true);
|
|
@@ -46,9 +30,7 @@ function isDefaultSelectorEquals(equals) {
|
|
|
46
30
|
return equals === Object.is;
|
|
47
31
|
}
|
|
48
32
|
function createCandidateSource(candidate) {
|
|
49
|
-
|
|
50
|
-
source._candidate = candidate;
|
|
51
|
-
return source;
|
|
33
|
+
return { _candidate: candidate };
|
|
52
34
|
}
|
|
53
35
|
function getCandidateSource(lane, candidate) {
|
|
54
36
|
if (isObjectCandidate(candidate)) {
|
|
@@ -136,7 +118,6 @@ function createSelectorLane(record, equals) {
|
|
|
136
118
|
return lane;
|
|
137
119
|
}
|
|
138
120
|
function notifySelectorSource(source) {
|
|
139
|
-
incrementPerfMetric("selectorInvalidations");
|
|
140
121
|
markReadableDerivedSubscribersDirty(source);
|
|
141
122
|
markReactivePropsDirtySource(source);
|
|
142
123
|
notifyReadableReaders(source);
|
|
@@ -220,12 +201,10 @@ function ensureSelectorHookBinding(hook) {
|
|
|
220
201
|
function createSelectorHook(instance, hookIndex, source, equals) {
|
|
221
202
|
const hook = function selectorPredicate(candidate) {
|
|
222
203
|
const selectorHook = hook;
|
|
223
|
-
const record = ensureSelectorHookBinding(selectorHook);
|
|
204
|
+
const record = selectorHook._record ?? ensureSelectorHookBinding(selectorHook);
|
|
224
205
|
const lane = selectorHook._lane;
|
|
225
206
|
if (!lane) throw new Error("selector() binding could not be established.");
|
|
226
207
|
recordReadableRead(getCandidateSource(lane, candidate));
|
|
227
|
-
const perfMetricsStore = getPerfMetricsStore();
|
|
228
|
-
if (perfMetricsStore) perfMetricsStore.selectorCandidateReads += 1;
|
|
229
208
|
const current = record._dirty || !record._hasValue ? recomputeSelectorSourceRecord(record, record._scheduled) : record._value;
|
|
230
209
|
return lane._equals(current, candidate);
|
|
231
210
|
};
|
|
@@ -270,5 +249,3 @@ function selector(source, equals = Object.is) {
|
|
|
270
249
|
}
|
|
271
250
|
//#endregion
|
|
272
251
|
export { selector };
|
|
273
|
-
|
|
274
|
-
//# 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 };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addPerfDuration, incrementPerfMetric } from "../runtime/perf-metrics.js";
|
|
2
|
+
import "../runtime/index.js";
|
|
2
3
|
import { resolveRouteDescriptor } from "./route-utils.js";
|
|
3
4
|
import { resolveSsgData, resolveSsgRouteData, validateRoutes } from "./resolve-ssg-data.js";
|
|
4
5
|
import { batchRenderRoutes } from "./batch-render.js";
|
|
@@ -7,6 +8,9 @@ import { generateSSGResult, resultToMetadata, writeMetadata } from "./generate-m
|
|
|
7
8
|
import { getExistingOutputFileSize, hashHtml, outputFileExists, readIncrementalManifest, writeIncrementalManifest } from "./incremental-manifest.js";
|
|
8
9
|
import { collectRemovedRouteResults, dedupeStrings, getRoutesToRender, selectRouteForGeneration } from "./generation-plan.js";
|
|
9
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";
|
|
10
14
|
//#region src/ssg/create-static-gen.ts
|
|
11
15
|
function resolveParallelism(requested) {
|
|
12
16
|
if (requested !== "auto") return Math.max(1, requested ?? 1);
|
|
@@ -14,7 +18,46 @@ function resolveParallelism(requested) {
|
|
|
14
18
|
const envWorkers = Number(maybeNavigator.process?.env?.ASKR_SSG_WORKERS ?? maybeNavigator.process?.env?.NUMBER_OF_PROCESSORS ?? maybeNavigator.process?.env?.UV_THREADPOOL_SIZE);
|
|
15
19
|
if (Number.isFinite(envWorkers) && envWorkers > 0) return Math.max(1, Math.trunc(envWorkers));
|
|
16
20
|
if (typeof maybeNavigator.navigator?.hardwareConcurrency === "number") return Math.max(1, maybeNavigator.navigator.hardwareConcurrency);
|
|
17
|
-
|
|
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
|
+
}
|
|
18
61
|
}
|
|
19
62
|
/**
|
|
20
63
|
* Create a Static Site Generator
|
|
@@ -152,22 +195,33 @@ function createStaticGen(options) {
|
|
|
152
195
|
if (routeResult) routeResults.push(routeResult);
|
|
153
196
|
}
|
|
154
197
|
routeResults.push(...removedResults);
|
|
155
|
-
const writeStartTime = performance.now();
|
|
156
|
-
await writeStaticFiles(routeResults, options.outputDir, { concurrency: resolvedConcurrency });
|
|
157
|
-
addPerfDuration("ssgWriteTimeMs", performance.now() - writeStartTime);
|
|
158
198
|
result = generateSSGResult(routeResults, {
|
|
159
199
|
mode: effectiveMode,
|
|
160
200
|
cacheHits,
|
|
161
201
|
invalidatedKeys: changedKeys,
|
|
162
202
|
invalidatedRoutes: changedRoutes
|
|
163
203
|
});
|
|
164
|
-
|
|
165
|
-
await
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
+
}
|
|
171
225
|
return result;
|
|
172
226
|
},
|
|
173
227
|
/**
|
|
@@ -193,6 +247,4 @@ function createStaticGen(options) {
|
|
|
193
247
|
};
|
|
194
248
|
}
|
|
195
249
|
//#endregion
|
|
196
|
-
export { createStaticGen };
|
|
197
|
-
|
|
198
|
-
//# 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _getBuiltInRoutePolicy } from "../router/policy.js";
|
|
2
|
+
import "../router/route.js";
|
|
2
3
|
import { getOutputFilePath, interpolateRoutePath, resolveRouteDescriptor } from "./route-utils.js";
|
|
3
4
|
import { expandRoutes } from "./resolve-ssg-data.js";
|
|
4
5
|
//#region src/ssg/static-routes.ts
|
|
@@ -97,5 +98,3 @@ function stripRegistryGuestPolicies(policies) {
|
|
|
97
98
|
}
|
|
98
99
|
//#endregion
|
|
99
100
|
export { normalizeStaticRoutes, splitStaticRoutes };
|
|
100
|
-
|
|
101
|
-
//# sourceMappingURL=static-routes.js.map
|
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 };
|