@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
package/dist/common/ssr.d.ts
CHANGED
|
@@ -38,5 +38,4 @@ type RenderContext = {
|
|
|
38
38
|
seed: number;
|
|
39
39
|
};
|
|
40
40
|
//#endregion
|
|
41
|
-
export { DocumentRenderArgs, DocumentRenderContext, DocumentRenderRoute, DocumentRenderer, SSRContext, SSRData };
|
|
42
|
-
//# sourceMappingURL=ssr.d.ts.map
|
|
41
|
+
export { DocumentRenderArgs, DocumentRenderContext, DocumentRenderRoute, DocumentRenderer, SSRContext, SSRData };
|
package/dist/common/ssr.js
CHANGED
package/dist/common/vnode.d.ts
CHANGED
|
@@ -18,5 +18,4 @@ type RenderableChild = VNode | JSXElement | readonly RenderableChild[];
|
|
|
18
18
|
declare const __FOR_BOUNDARY__: symbol;
|
|
19
19
|
declare function _isDOMElement(node: unknown): node is DOMElement;
|
|
20
20
|
//#endregion
|
|
21
|
-
export { DOMElement, RenderableChild, VNode };
|
|
22
|
-
//# sourceMappingURL=vnode.d.ts.map
|
|
21
|
+
export { DOMElement, RenderableChild, VNode };
|
package/dist/common/vnode.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import { Props } from "../common/props.js";
|
|
2
1
|
import { JSXElement } from "../common/jsx.js";
|
|
3
2
|
import { ComponentInstance } from "../runtime/component-internal.js";
|
|
4
|
-
import {
|
|
3
|
+
import { ErrorBoundaryFallbackRender, ErrorBoundaryProps } from "../common/error-boundary.js";
|
|
5
4
|
|
|
6
5
|
//#region src/components/error-boundary.d.ts
|
|
7
|
-
type ErrorBoundaryContent = VNode | readonly VNode[];
|
|
8
|
-
type ErrorBoundaryFallbackValue = ErrorBoundaryContent | Node;
|
|
9
|
-
type ErrorBoundaryFallbackRender = (error: unknown, reset: () => void) => ErrorBoundaryFallbackValue;
|
|
10
|
-
interface ErrorBoundaryProps extends Props {
|
|
11
|
-
children?: ErrorBoundaryContent;
|
|
12
|
-
fallback?: ErrorBoundaryFallbackValue | ErrorBoundaryFallbackRender;
|
|
13
|
-
onError?: (error: unknown) => void;
|
|
14
|
-
resetKey?: unknown;
|
|
15
|
-
}
|
|
16
6
|
type ErrorBoundaryState = NonNullable<ComponentInstance['errorBoundaryState']>;
|
|
17
7
|
type ErrorBoundaryVNode = JSXElement & {
|
|
18
8
|
__instance?: ComponentInstance;
|
|
@@ -20,9 +10,5 @@ type ErrorBoundaryVNode = JSXElement & {
|
|
|
20
10
|
declare function ErrorBoundary(props: ErrorBoundaryProps): JSXElement;
|
|
21
11
|
declare function isErrorBoundaryVNode(value: unknown): value is ErrorBoundaryVNode;
|
|
22
12
|
declare function resolveErrorBoundaryState(vnode: ErrorBoundaryVNode): ErrorBoundaryState | null;
|
|
23
|
-
declare function resolveErrorBoundaryFallback(fallback: ErrorBoundaryProps['fallback'], error: unknown, reset: () => void): ErrorBoundaryFallbackValue;
|
|
24
|
-
declare function createBoundaryReset(instance: ComponentInstance): () => void;
|
|
25
|
-
declare function reportBoundaryError(instance: ComponentInstance, error: unknown, onError?: (error: unknown) => void): void;
|
|
26
13
|
//#endregion
|
|
27
|
-
export { ErrorBoundary, ErrorBoundaryFallbackRender, ErrorBoundaryProps };
|
|
28
|
-
//# sourceMappingURL=error-boundary.d.ts.map
|
|
14
|
+
export { ErrorBoundary, type ErrorBoundaryFallbackRender, type ErrorBoundaryProps };
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import { __ERROR_BOUNDARY__ } from "../common/vnode.js";
|
|
2
|
-
import { isDevelopmentEnvironment } from "../common/env.js";
|
|
3
|
-
import { logger } from "../dev/logger.js";
|
|
4
2
|
import { ELEMENT_TYPE } from "../common/jsx.js";
|
|
5
3
|
import { getCurrentComponentInstance } from "../runtime/component-scope.js";
|
|
6
|
-
import "../runtime/
|
|
4
|
+
import "../runtime/index.js";
|
|
7
5
|
//#region src/components/error-boundary.tsx
|
|
8
|
-
function getBoundaryMessage(error) {
|
|
9
|
-
if (error instanceof Error) return error.message || error.name || "Unknown error";
|
|
10
|
-
if (typeof error === "string") return error;
|
|
11
|
-
try {
|
|
12
|
-
return JSON.stringify(error);
|
|
13
|
-
} catch {
|
|
14
|
-
return String(error);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
6
|
function ensureBoundaryState(instance, resetKey) {
|
|
18
7
|
const boundaryState = instance.errorBoundaryState ?? (instance.errorBoundaryState = {
|
|
19
8
|
error: null,
|
|
@@ -48,68 +37,5 @@ function ErrorBoundary(props) {
|
|
|
48
37
|
ensureBoundaryState(instance, props.resetKey);
|
|
49
38
|
return createBoundaryVNode(instance, props);
|
|
50
39
|
}
|
|
51
|
-
function resolveErrorBoundaryFallback(fallback, error, reset) {
|
|
52
|
-
if (typeof fallback === "function") return fallback(error, reset);
|
|
53
|
-
if (fallback !== void 0) return fallback;
|
|
54
|
-
const message = getBoundaryMessage(error);
|
|
55
|
-
const wrapper = document.createElement("div");
|
|
56
|
-
wrapper.setAttribute("role", "alert");
|
|
57
|
-
wrapper.setAttribute("data-askr-error-boundary", "true");
|
|
58
|
-
wrapper.style.boxSizing = "border-box";
|
|
59
|
-
wrapper.style.padding = "1rem";
|
|
60
|
-
wrapper.style.border = "1px solid currentColor";
|
|
61
|
-
wrapper.style.borderRadius = "0.75rem";
|
|
62
|
-
wrapper.style.display = "grid";
|
|
63
|
-
wrapper.style.gap = "0.75rem";
|
|
64
|
-
wrapper.style.maxWidth = "100%";
|
|
65
|
-
const title = document.createElement("strong");
|
|
66
|
-
title.textContent = "Something went wrong while rendering this view.";
|
|
67
|
-
const summary = document.createElement("p");
|
|
68
|
-
summary.textContent = "The app recovered into a visible fallback so the error is not hidden in the console.";
|
|
69
|
-
summary.style.margin = "0";
|
|
70
|
-
const details = document.createElement("details");
|
|
71
|
-
details.open = isDevelopmentEnvironment();
|
|
72
|
-
const detailsSummary = document.createElement("summary");
|
|
73
|
-
detailsSummary.textContent = "Error details";
|
|
74
|
-
const pre = document.createElement("pre");
|
|
75
|
-
pre.textContent = message;
|
|
76
|
-
pre.style.margin = "0";
|
|
77
|
-
pre.style.whiteSpace = "pre-wrap";
|
|
78
|
-
pre.style.wordBreak = "break-word";
|
|
79
|
-
const button = document.createElement("button");
|
|
80
|
-
button.type = "button";
|
|
81
|
-
button.textContent = "Try again";
|
|
82
|
-
button.addEventListener("click", () => reset());
|
|
83
|
-
details.append(detailsSummary, pre);
|
|
84
|
-
wrapper.append(title, summary, details, button);
|
|
85
|
-
return wrapper;
|
|
86
|
-
}
|
|
87
|
-
function createBoundaryReset(instance) {
|
|
88
|
-
return () => {
|
|
89
|
-
const boundaryState = instance.errorBoundaryState;
|
|
90
|
-
if (!boundaryState) return;
|
|
91
|
-
boundaryState.error = null;
|
|
92
|
-
boundaryState.notified = false;
|
|
93
|
-
queueMicrotask(() => {
|
|
94
|
-
instance._enqueueRun?.();
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function reportBoundaryError(instance, error, onError) {
|
|
99
|
-
const boundaryState = instance.errorBoundaryState;
|
|
100
|
-
if (boundaryState && Object.is(boundaryState.error, error) && boundaryState.notified) return;
|
|
101
|
-
if (boundaryState) {
|
|
102
|
-
boundaryState.error = error;
|
|
103
|
-
boundaryState.notified = true;
|
|
104
|
-
}
|
|
105
|
-
try {
|
|
106
|
-
onError?.(error);
|
|
107
|
-
} catch (hookError) {
|
|
108
|
-
logger.error("[Askr] ErrorBoundary onError handler threw:", hookError);
|
|
109
|
-
}
|
|
110
|
-
logger.error("[Askr] ErrorBoundary caught render error:", error);
|
|
111
|
-
}
|
|
112
40
|
//#endregion
|
|
113
|
-
export { ErrorBoundary
|
|
114
|
-
|
|
115
|
-
//# sourceMappingURL=error-boundary.js.map
|
|
41
|
+
export { ErrorBoundary };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ErrorBoundaryFallbackRender, ErrorBoundaryProps } from "../common/error-boundary.js";
|
|
2
|
+
import { ErrorBoundary } from "./error-boundary.js";
|
|
2
3
|
export { ErrorBoundary, type ErrorBoundaryFallbackRender, type ErrorBoundaryProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Props } from "../common/props.js";
|
|
2
2
|
import { JSXElement } from "../common/jsx.js";
|
|
3
3
|
import { RenderableChild } from "../common/vnode.js";
|
|
4
|
+
|
|
4
5
|
//#region src/components/link.d.ts
|
|
5
6
|
type LinkProps = Omit<Props, 'children' | 'href' | 'class' | 'rel' | 'target' | 'aria-current' | 'aria-label'> & {
|
|
6
7
|
href: string;
|
|
@@ -64,5 +65,4 @@ declare function Link({
|
|
|
64
65
|
...rest
|
|
65
66
|
}: LinkProps): JSXElement;
|
|
66
67
|
//#endregion
|
|
67
|
-
export { Link, LinkProps };
|
|
68
|
-
//# sourceMappingURL=link.d.ts.map
|
|
68
|
+
export { Link, LinkProps };
|
package/dist/components/link.js
CHANGED
|
@@ -3,7 +3,9 @@ import { jsx } from "../jsx-runtime.js";
|
|
|
3
3
|
import "../jsx-runtime2.js";
|
|
4
4
|
import { navigate } from "../router/navigate.js";
|
|
5
5
|
import { mergeProps } from "../foundations/utilities/merge-props.js";
|
|
6
|
+
import "../foundations/utilities/index.js";
|
|
6
7
|
import { applyInteractionPolicy } from "../foundations/interactions/interaction-policy.js";
|
|
8
|
+
import "../foundations/interactions/index.js";
|
|
7
9
|
//#region src/components/link.tsx
|
|
8
10
|
/**
|
|
9
11
|
* Link component for client-side navigation
|
|
@@ -70,5 +72,3 @@ function Link({ href, class: className, children, rel, target, "aria-current": a
|
|
|
70
72
|
}
|
|
71
73
|
//#endregion
|
|
72
74
|
export { Link };
|
|
73
|
-
|
|
74
|
-
//# sourceMappingURL=link.js.map
|
package/dist/control/case.d.ts
CHANGED
|
@@ -15,5 +15,4 @@ type CaseProps = {
|
|
|
15
15
|
declare function Match(_props: MatchProps): null;
|
|
16
16
|
declare const Case: (props: CaseProps) => JSXElement;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { Case, CaseProps, Match, MatchProps };
|
|
19
|
-
//# sourceMappingURL=case.d.ts.map
|
|
18
|
+
export { Case, CaseProps, Match, MatchProps };
|
package/dist/control/case.js
CHANGED
|
@@ -2,6 +2,7 @@ import { __CONTROL_BOUNDARY__, markEagerControlPrimitive } from "../common/contr
|
|
|
2
2
|
import { isDevelopmentEnvironment } from "../common/env.js";
|
|
3
3
|
import { createCaseState } from "../runtime/control.js";
|
|
4
4
|
import { state } from "../runtime/state.js";
|
|
5
|
+
import "../runtime/index.js";
|
|
5
6
|
import { normalizeBoundaryChild } from "./shared.js";
|
|
6
7
|
//#region src/control/case.ts
|
|
7
8
|
function flattenChildren(children) {
|
|
@@ -65,5 +66,3 @@ function CasePrimitive(props) {
|
|
|
65
66
|
const Case = markEagerControlPrimitive(CasePrimitive);
|
|
66
67
|
//#endregion
|
|
67
68
|
export { Case, Match };
|
|
68
|
-
|
|
69
|
-
//# sourceMappingURL=case.js.map
|
package/dist/control/for.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSXElement } from "../common/jsx.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ForEachSource } from "../runtime/for-types.js";
|
|
3
3
|
import { VNode } from "../common/vnode.js";
|
|
4
|
+
import { BoundaryChild } from "./shared.js";
|
|
4
5
|
|
|
5
6
|
//#region src/control/for.d.ts
|
|
6
|
-
type ForEachSource<T> = T[] | (() => T[]);
|
|
7
7
|
type ForBaseProps<T> = {
|
|
8
8
|
each: ForEachSource<T>;
|
|
9
9
|
fallback?: BoundaryChild;
|
|
@@ -20,5 +20,4 @@ type IndexedForProps<T> = ForBaseProps<T> & {
|
|
|
20
20
|
type ForProps<T, K extends string | number = string | number> = KeyedForProps<T, K> | IndexedForProps<T>;
|
|
21
21
|
declare const For: <T, K extends string | number = string | number>(props: ForProps<T, K>) => JSXElement;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { For,
|
|
24
|
-
//# sourceMappingURL=for.d.ts.map
|
|
23
|
+
export { For, ForProps };
|
package/dist/control/for.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __CONTROL_BOUNDARY__, markEagerControlPrimitive } from "../common/control.js";
|
|
2
|
-
import { useForState } from "../runtime/for-internal.js";
|
|
3
|
-
import "../runtime/for.js";
|
|
4
2
|
import { createFineGrainedEffect } from "../runtime/effect.js";
|
|
3
|
+
import { useForState } from "../runtime/for-internal.js";
|
|
4
|
+
import "../runtime/index.js";
|
|
5
5
|
import { normalizeBoundaryChild } from "./shared.js";
|
|
6
6
|
//#region src/control/for.ts
|
|
7
7
|
/**
|
|
@@ -59,5 +59,3 @@ function ForPrimitive(props) {
|
|
|
59
59
|
const For = markEagerControlPrimitive(ForPrimitive);
|
|
60
60
|
//#endregion
|
|
61
61
|
export { For };
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=for.js.map
|
package/dist/control/shared.d.ts
CHANGED
|
@@ -5,5 +5,4 @@ type BoundaryChild = RenderableChild;
|
|
|
5
5
|
declare function normalizeBoundaryChild(value: unknown): VNode | null;
|
|
6
6
|
declare function resolveMaybeAccessor<T>(value: T | (() => T)): T;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { BoundaryChild };
|
|
9
|
-
//# sourceMappingURL=shared.d.ts.map
|
|
8
|
+
export { BoundaryChild };
|
package/dist/control/shared.js
CHANGED
package/dist/control/show.d.ts
CHANGED
package/dist/control/show.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __CONTROL_BOUNDARY__, markEagerControlPrimitive } from "../common/control.js";
|
|
2
2
|
import { createShowState } from "../runtime/control.js";
|
|
3
3
|
import { state } from "../runtime/state.js";
|
|
4
|
+
import "../runtime/index.js";
|
|
4
5
|
import { normalizeBoundaryChild, resolveMaybeAccessor } from "./shared.js";
|
|
5
6
|
//#region src/control/show.ts
|
|
6
7
|
function createTruthyRenderer(props) {
|
|
@@ -29,5 +30,3 @@ function ShowPrimitive(props) {
|
|
|
29
30
|
const Show = markEagerControlPrimitive(ShowPrimitive);
|
|
30
31
|
//#endregion
|
|
31
32
|
export { Show };
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=show.js.map
|
|
@@ -24,5 +24,4 @@ declare function ensureQueryCleanup(runtimeState: DataRuntimeState, instance: Co
|
|
|
24
24
|
declare function ensureMutationCleanup(runtimeState: DataRuntimeState, instance: ComponentInstance): void;
|
|
25
25
|
declare function invalidateQueriesForRuntime(runtimeState: DataRuntimeState, prefix: string, markPendingWrite: boolean): void;
|
|
26
26
|
//#endregion
|
|
27
|
-
export { DataRuntimeState, QuerySlot, createDataRuntime, getDefaultDataRuntime };
|
|
28
|
-
//# sourceMappingURL=data-runtime.d.ts.map
|
|
27
|
+
export { DataRuntimeState, QuerySlot, createDataRuntime, getDefaultDataRuntime };
|
|
@@ -69,7 +69,7 @@ function getMutationSlotStore(runtimeState, instance) {
|
|
|
69
69
|
function ensureQueryCleanup(runtimeState, instance) {
|
|
70
70
|
if (runtimeState.queryCleanupRegistered.has(instance)) return;
|
|
71
71
|
runtimeState.queryCleanupRegistered.add(instance);
|
|
72
|
-
instance.cleanupFns.push(() => {
|
|
72
|
+
(instance.cleanupFns ??= []).push(() => {
|
|
73
73
|
const slots = runtimeState.querySlotsByInstance.get(instance);
|
|
74
74
|
if (!slots) {
|
|
75
75
|
runtimeState.queryCleanupRegistered.delete(instance);
|
|
@@ -84,7 +84,7 @@ function ensureQueryCleanup(runtimeState, instance) {
|
|
|
84
84
|
function ensureMutationCleanup(runtimeState, instance) {
|
|
85
85
|
if (runtimeState.mutationCleanupRegistered.has(instance)) return;
|
|
86
86
|
runtimeState.mutationCleanupRegistered.add(instance);
|
|
87
|
-
instance.cleanupFns.push(() => {
|
|
87
|
+
(instance.cleanupFns ??= []).push(() => {
|
|
88
88
|
const slots = runtimeState.mutationSlotsByInstance.get(instance);
|
|
89
89
|
if (!slots) {
|
|
90
90
|
runtimeState.mutationCleanupRegistered.delete(instance);
|
|
@@ -105,10 +105,8 @@ function invalidateQueriesForRuntime(runtimeState, prefix, markPendingWrite) {
|
|
|
105
105
|
for (const [key, query] of cache) {
|
|
106
106
|
if (!key.startsWith(prefix)) continue;
|
|
107
107
|
if (markPendingWrite) query.markPendingWrite();
|
|
108
|
-
query.
|
|
108
|
+
query.invalidate();
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
112
|
export { createDataRuntime, ensureMutationCleanup, ensureQueryCleanup, getDefaultDataRuntime, getMutationSlotStore, getQuerySlotStore, invalidateQueriesForRuntime, resolveDataRuntimeState };
|
|
113
|
-
|
|
114
|
-
//# sourceMappingURL=data-runtime.js.map
|
|
@@ -5,5 +5,4 @@ declare function invalidate(prefix: string, options?: InvalidateOptions): void;
|
|
|
5
5
|
declare function queryScope(namespace: string): QueryScope;
|
|
6
6
|
declare function invalidateOnInterval(prefix: string, options: InvalidateOnIntervalOptions): void;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { invalidate, invalidateOnInterval, queryScope };
|
|
9
|
-
//# sourceMappingURL=invalidation.d.ts.map
|
|
8
|
+
export { invalidate, invalidateOnInterval, queryScope };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { invalidateQueriesForRuntime, resolveDataRuntimeState } from "./data-runtime.js";
|
|
2
1
|
import { documentVisible, routeActive, timer, windowFocused } from "../runtime/lifecycle-operations.js";
|
|
3
|
-
import "../runtime/
|
|
2
|
+
import "../runtime/index.js";
|
|
3
|
+
import { invalidateQueriesForRuntime, resolveDataRuntimeState } from "./data-runtime.js";
|
|
4
4
|
import { createQueryScope } from "./query-key.js";
|
|
5
5
|
//#region src/data/invalidation.ts
|
|
6
6
|
function invalidate(prefix, options) {
|
|
@@ -23,5 +23,3 @@ function invalidateOnInterval(prefix, options) {
|
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
export { invalidate, invalidateOnInterval, queryScope };
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=invalidation.js.map
|
|
@@ -24,5 +24,4 @@ declare class MutationCell<TInput, TResult> {
|
|
|
24
24
|
}
|
|
25
25
|
declare function createMutation<TInput, TResult>(options: MutationOptions<TInput, TResult>): Mutation<TInput, TResult>;
|
|
26
26
|
//#endregion
|
|
27
|
-
export { MutationCell, createMutation };
|
|
28
|
-
//# sourceMappingURL=mutation-cell.d.ts.map
|
|
27
|
+
export { MutationCell, createMutation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { recordReadableRead } from "../runtime/readable.js";
|
|
2
2
|
import { claimHookIndex, getCurrentComponentInstance } from "../runtime/component-scope.js";
|
|
3
|
-
import "../runtime/
|
|
3
|
+
import "../runtime/index.js";
|
|
4
4
|
import { ensureMutationCleanup, getMutationSlotStore, invalidateQueriesForRuntime, resolveDataRuntimeState } from "./data-runtime.js";
|
|
5
5
|
import { createReadableSource, isAbortError, normalizeAsyncDataError, notifySource } from "./shared.js";
|
|
6
6
|
//#region src/data/mutation-cell.ts
|
|
@@ -48,6 +48,9 @@ var MutationCell = class {
|
|
|
48
48
|
notifySource(this.source);
|
|
49
49
|
}
|
|
50
50
|
async execute(input) {
|
|
51
|
+
const action = this.action;
|
|
52
|
+
const affects = this.affects;
|
|
53
|
+
const afterSuccess = this.afterSuccess;
|
|
51
54
|
this.generation += 1;
|
|
52
55
|
const generation = this.generation;
|
|
53
56
|
this.controller?.abort();
|
|
@@ -60,7 +63,7 @@ var MutationCell = class {
|
|
|
60
63
|
});
|
|
61
64
|
let result;
|
|
62
65
|
try {
|
|
63
|
-
result = await
|
|
66
|
+
result = await action(input, { signal: controller.signal });
|
|
64
67
|
} catch (error) {
|
|
65
68
|
if (this.generation !== generation || this.controller !== controller) throw error;
|
|
66
69
|
if (isAbortError(error, controller.signal)) {
|
|
@@ -82,8 +85,8 @@ var MutationCell = class {
|
|
|
82
85
|
error: null,
|
|
83
86
|
result
|
|
84
87
|
});
|
|
85
|
-
if (
|
|
86
|
-
const prefixes =
|
|
88
|
+
if (afterSuccess === "invalidate") {
|
|
89
|
+
const prefixes = affects?.(input, result) ?? [];
|
|
87
90
|
for (const prefix of new Set(prefixes)) invalidateQueriesForRuntime(this.runtimeState, prefix, true);
|
|
88
91
|
}
|
|
89
92
|
return result;
|
|
@@ -128,5 +131,3 @@ function createMutation(options) {
|
|
|
128
131
|
}
|
|
129
132
|
//#endregion
|
|
130
133
|
export { MutationCell, createMutation };
|
|
131
|
-
|
|
132
|
-
//# sourceMappingURL=mutation-cell.js.map
|
|
@@ -12,6 +12,7 @@ declare class QueryCell<T> {
|
|
|
12
12
|
private startQueued;
|
|
13
13
|
private pendingRefresh;
|
|
14
14
|
private pendingRefreshResolve;
|
|
15
|
+
private pendingRefreshToken;
|
|
15
16
|
private reconcileAttemptCount;
|
|
16
17
|
private destroyed;
|
|
17
18
|
private ownerCount;
|
|
@@ -33,6 +34,7 @@ declare class QueryCell<T> {
|
|
|
33
34
|
get staleReason(): QueryState<T>['staleReason'];
|
|
34
35
|
ensureStarted(): void;
|
|
35
36
|
refresh(): Promise<void>;
|
|
37
|
+
invalidate(): void;
|
|
36
38
|
markPendingWrite(): void;
|
|
37
39
|
private queueStart;
|
|
38
40
|
private finishPendingRefresh;
|
|
@@ -42,5 +44,4 @@ declare class QueryCell<T> {
|
|
|
42
44
|
}
|
|
43
45
|
declare function createQuery<T extends {}>(options: QueryOptions<T>): Query<T>;
|
|
44
46
|
//#endregion
|
|
45
|
-
export { QueryCell, createQuery };
|
|
46
|
-
//# sourceMappingURL=query-cell.d.ts.map
|
|
47
|
+
export { QueryCell, createQuery };
|
package/dist/data/query-cell.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { logger } from "../
|
|
1
|
+
import { logger } from "../common/logger.js";
|
|
2
2
|
import { enqueueRuntimeTask } from "../runtime/access.js";
|
|
3
3
|
import { recordReadableRead } from "../runtime/readable.js";
|
|
4
4
|
import { claimHookIndex, getCurrentComponentInstance } from "../runtime/component-scope.js";
|
|
5
|
-
import "../runtime/
|
|
5
|
+
import "../runtime/index.js";
|
|
6
6
|
import { ensureQueryCleanup, getQuerySlotStore, resolveDataRuntimeState } from "./data-runtime.js";
|
|
7
7
|
import { createReadableSource, isAbortError, normalizeAsyncDataError, notifySource } from "./shared.js";
|
|
8
8
|
//#region src/data/query-cell.ts
|
|
@@ -16,6 +16,7 @@ var QueryCell = class {
|
|
|
16
16
|
this.startQueued = false;
|
|
17
17
|
this.pendingRefresh = null;
|
|
18
18
|
this.pendingRefreshResolve = null;
|
|
19
|
+
this.pendingRefreshToken = 0;
|
|
19
20
|
this.reconcileAttemptCount = 0;
|
|
20
21
|
this.destroyed = false;
|
|
21
22
|
this.ownerCount = 0;
|
|
@@ -117,6 +118,14 @@ var QueryCell = class {
|
|
|
117
118
|
this.queueStart("manual");
|
|
118
119
|
return this.pendingRefresh ?? Promise.resolve();
|
|
119
120
|
}
|
|
121
|
+
invalidate() {
|
|
122
|
+
if (this.destroyed) return;
|
|
123
|
+
if (this.pendingRefresh) {
|
|
124
|
+
this.controller?.abort();
|
|
125
|
+
this.finishPendingRefresh(this.pendingRefreshToken);
|
|
126
|
+
}
|
|
127
|
+
this.queueStart("invalidate");
|
|
128
|
+
}
|
|
120
129
|
markPendingWrite() {
|
|
121
130
|
if (this.destroyed) return;
|
|
122
131
|
if (this.state.data === null) return;
|
|
@@ -132,21 +141,23 @@ var QueryCell = class {
|
|
|
132
141
|
queueStart(reason) {
|
|
133
142
|
if (this.destroyed) return;
|
|
134
143
|
this.startQueued = true;
|
|
144
|
+
const token = ++this.pendingRefreshToken;
|
|
135
145
|
this.pendingRefresh = new Promise((resolve) => {
|
|
136
146
|
this.pendingRefreshResolve = resolve;
|
|
137
147
|
enqueueRuntimeTask(() => {
|
|
138
148
|
this.startQueued = false;
|
|
139
149
|
if (this.destroyed) {
|
|
140
|
-
this.finishPendingRefresh();
|
|
150
|
+
this.finishPendingRefresh(token);
|
|
141
151
|
return;
|
|
142
152
|
}
|
|
143
153
|
this.start(reason).finally(() => {
|
|
144
|
-
this.finishPendingRefresh();
|
|
154
|
+
this.finishPendingRefresh(token);
|
|
145
155
|
});
|
|
146
156
|
});
|
|
147
157
|
});
|
|
148
158
|
}
|
|
149
|
-
finishPendingRefresh() {
|
|
159
|
+
finishPendingRefresh(token = this.pendingRefreshToken) {
|
|
160
|
+
if (token !== this.pendingRefreshToken) return;
|
|
150
161
|
const resolve = this.pendingRefreshResolve;
|
|
151
162
|
this.pendingRefresh = null;
|
|
152
163
|
this.pendingRefreshResolve = null;
|
|
@@ -210,7 +221,21 @@ var QueryCell = class {
|
|
|
210
221
|
return;
|
|
211
222
|
}
|
|
212
223
|
if (this.destroyed || this.generation !== generation || this.controller !== controller) return;
|
|
213
|
-
|
|
224
|
+
let isConsistent;
|
|
225
|
+
try {
|
|
226
|
+
isConsistent = this.options.isConsistent?.(nextData) ?? true;
|
|
227
|
+
} catch (error) {
|
|
228
|
+
this.setState({
|
|
229
|
+
loading: false,
|
|
230
|
+
refreshing: false,
|
|
231
|
+
stale: true,
|
|
232
|
+
consistency: "stale",
|
|
233
|
+
error: normalizeAsyncDataError(error, "Query consistency check failed"),
|
|
234
|
+
staleReason: "error"
|
|
235
|
+
});
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
if (!isConsistent) {
|
|
214
239
|
this.setState({
|
|
215
240
|
data: nextData,
|
|
216
241
|
loading: false,
|
|
@@ -219,7 +244,18 @@ var QueryCell = class {
|
|
|
219
244
|
consistency: "stale",
|
|
220
245
|
staleReason: "inconsistent"
|
|
221
246
|
});
|
|
222
|
-
|
|
247
|
+
try {
|
|
248
|
+
await this.reconcile(nextData);
|
|
249
|
+
} catch (error) {
|
|
250
|
+
if (this.generation === generation && this.controller === controller) this.setState({
|
|
251
|
+
loading: false,
|
|
252
|
+
refreshing: false,
|
|
253
|
+
stale: true,
|
|
254
|
+
consistency: "stale",
|
|
255
|
+
error: normalizeAsyncDataError(error, "Query reconciliation failed"),
|
|
256
|
+
staleReason: "error"
|
|
257
|
+
});
|
|
258
|
+
}
|
|
223
259
|
return;
|
|
224
260
|
}
|
|
225
261
|
this.reconcileAttemptCount = 0;
|
|
@@ -234,7 +270,7 @@ var QueryCell = class {
|
|
|
234
270
|
});
|
|
235
271
|
}
|
|
236
272
|
async reconcile(data) {
|
|
237
|
-
if (!(this.options.reconcile?.(data, { key: this.options.key }) ?? false) || this.destroyed) return;
|
|
273
|
+
if (!await (this.options.reconcile?.(data, { key: this.options.key }) ?? false) || this.destroyed) return;
|
|
238
274
|
this.reconcileAttemptCount += 1;
|
|
239
275
|
if (this.reconcileAttemptCount > RECONCILE_MAX_ATTEMPTS) {
|
|
240
276
|
this.setState({
|
|
@@ -246,7 +282,7 @@ var QueryCell = class {
|
|
|
246
282
|
}
|
|
247
283
|
await new Promise((resolve) => setTimeout(resolve, RECONCILE_RETRY_DELAY_MS));
|
|
248
284
|
if (this.destroyed || this.state.consistency === "fresh") return;
|
|
249
|
-
|
|
285
|
+
this.invalidate();
|
|
250
286
|
}
|
|
251
287
|
};
|
|
252
288
|
function createQuery(options) {
|
|
@@ -286,5 +322,3 @@ function createQuery(options) {
|
|
|
286
322
|
}
|
|
287
323
|
//#endregion
|
|
288
324
|
export { QueryCell, createQuery };
|
|
289
|
-
|
|
290
|
-
//# sourceMappingURL=query-cell.js.map
|
package/dist/data/query-key.js
CHANGED
package/dist/data/shared.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { markReactivePropsDirtySource, markReadableDerivedSubscribersDirty, notifyReadableReaders } from "../runtime/readable.js";
|
|
2
|
+
import "../runtime/index.js";
|
|
2
3
|
//#region src/data/shared.ts
|
|
3
4
|
function createReadableSource() {
|
|
4
5
|
return (() => void 0);
|
|
@@ -12,9 +13,8 @@ function isAbortError(error, signal) {
|
|
|
12
13
|
return signal.aborted || error instanceof Error && error.name === "AbortError" || typeof DOMException !== "undefined" && error instanceof DOMException && error.name === "AbortError";
|
|
13
14
|
}
|
|
14
15
|
function normalizeAsyncDataError(error, fallbackMessage) {
|
|
15
|
-
|
|
16
|
+
if (error instanceof Error) return error;
|
|
17
|
+
return new Error(error == null ? fallbackMessage : String(error));
|
|
16
18
|
}
|
|
17
19
|
//#endregion
|
|
18
20
|
export { createReadableSource, isAbortError, normalizeAsyncDataError, notifySource };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=shared.js.map
|
package/dist/data/types.d.ts
CHANGED
|
@@ -157,5 +157,4 @@ type QueryState<T> = {
|
|
|
157
157
|
};
|
|
158
158
|
type QueryDefinitionField = 'fetch' | 'isConsistent' | 'reconcile';
|
|
159
159
|
//#endregion
|
|
160
|
-
export { DataRuntime, DataRuntimeOptions, InvalidateOnIntervalOptions, InvalidateOptions, Mutation, MutationOptions, Query, QueryConsistency, QueryKeyPart, QueryOptions, QueryScope, QueryStaleReason, QueryState };
|
|
161
|
-
//# sourceMappingURL=types.d.ts.map
|
|
160
|
+
export { DataRuntime, DataRuntimeOptions, InvalidateOnIntervalOptions, InvalidateOptions, Mutation, MutationOptions, Query, QueryConsistency, QueryKeyPart, QueryOptions, QueryScope, QueryStaleReason, QueryState };
|
|
@@ -49,5 +49,4 @@ declare function IconBase({
|
|
|
49
49
|
...rest
|
|
50
50
|
}: IconProps): JSXElement;
|
|
51
51
|
//#endregion
|
|
52
|
-
export { IconBase, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle };
|
|
53
|
-
//# sourceMappingURL=icon.d.ts.map
|
|
52
|
+
export { IconBase, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle };
|
|
@@ -84,5 +84,3 @@ function IconBase({ size = 20, strokeWidth = 2, color = "currentColor", title, c
|
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
86
|
export { IconBase, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle };
|
|
87
|
-
|
|
88
|
-
//# sourceMappingURL=icon.js.map
|
|
@@ -18,5 +18,4 @@ type IconProps = Omit<Props, 'children' | 'class' | 'color' | 'height' | 'ref' |
|
|
|
18
18
|
ref?: Ref<SVGSVGElement>;
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
|
-
export { IconOwnProps, IconProps, IconSizeToken, IconStyleObject };
|
|
22
|
-
//# sourceMappingURL=icon.types.d.ts.map
|
|
21
|
+
export { IconOwnProps, IconProps, IconSizeToken, IconStyleObject };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXElement } from "../common/jsx.js";
|
|
2
|
+
import { DefaultPortal, Portal, PortalProps, definePortal } from "../runtime/portal.js";
|
|
2
3
|
import { LayoutComponent, layout } from "./structures/layout.js";
|
|
3
4
|
import { Slot, SlotProps } from "./structures/slot.js";
|
|
4
5
|
import { Presence, PresenceProps } from "./structures/presence.js";
|
|
5
|
-
import { DefaultPortal, Portal, PortalProps, definePortal } from "./structures/portal.js";
|
|
6
6
|
export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultPortal, Portal, definePortal } from "
|
|
1
|
+
import { DefaultPortal, Portal, definePortal } from "../runtime/portal.js";
|
|
2
2
|
import { layout } from "./structures/layout.js";
|
|
3
3
|
import { Slot } from "./structures/slot.js";
|
|
4
4
|
import { Presence } from "./structures/presence.js";
|