@askrjs/askr 0.0.91 → 0.0.94

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/{access-Dpfoi4cA.js → access-d_DCdwqn.js} +8 -2
  3. package/dist/actions/index.d.ts +1 -1
  4. package/dist/actions/index.js +4 -3
  5. package/dist/{activity-dKH6nlpj.js → activity-BshyLB3_.js} +9 -5
  6. package/dist/{activity-CF2_JvJs.d.ts → activity-CJIQyo5X.d.ts} +5 -1
  7. package/dist/benchmark.d.ts +1 -1
  8. package/dist/benchmark.js +8 -8
  9. package/dist/boot/index.d.ts +12 -4
  10. package/dist/boot/index.js +1 -1
  11. package/dist/{boot-D3zVVWuN.js → boot-BsMB_ySP.js} +34 -22
  12. package/dist/{cleanup-c837KVij.js → cleanup-DefafSjG.js} +8 -5
  13. package/dist/{component-cleanup-BUfUleGZ.js → component-cleanup-hrqSikl2.js} +3 -3
  14. package/dist/{component-internal-C4uwwUaK.js → component-internal-DOVVMjG7.js} +8 -6
  15. package/dist/{component-scope-DzJEbYGE.js → component-scope-4I3yEMkb.js} +13 -1
  16. package/dist/components/index.d.ts +7 -2
  17. package/dist/components/index.js +2 -2
  18. package/dist/{compose-ref-Cc_YkUpM.js → compose-ref-1Fhs7mbF.js} +13 -0
  19. package/dist/{compose-ref-Cizq72-x.d.ts → compose-ref-DOJHoW5X.d.ts} +3 -0
  20. package/dist/control/index.d.ts +1 -1
  21. package/dist/control/index.js +1 -1
  22. package/dist/{control-CsGs2bLS.d.ts → control-DdFw-Caz.d.ts} +1 -1
  23. package/dist/{control-CON10J1p.js → control-DqOzkgc7.js} +9 -5
  24. package/dist/{csp-nonce-DH0TrDij.js → csp-nonce-BBxq1zq4.js} +8 -1
  25. package/dist/data/index.d.ts +1 -2
  26. package/dist/data/index.js +3 -3
  27. package/dist/{data-Bh_3OETq.js → data-DYqokZzc.js} +23 -12
  28. package/dist/{data-runtime-wbooGyu7.js → data-runtime-JxoRgrrt.js} +3 -1
  29. package/dist/{deferred-D6nZaIPs.js → deferred-BS0Xpstg.js} +10 -5
  30. package/dist/{effect-lnxQIpJG.js → effect-BdvdgMvV.js} +73 -14
  31. package/dist/{fastlane-CrfB3QG0.js → fastlane-DGo7SxBQ.js} +23 -4
  32. package/dist/{for-internal-Bsm0B8GZ.js → for-internal-jrliHZmF.js} +6 -6
  33. package/dist/foundations/icon/index.d.ts +14 -3
  34. package/dist/foundations/icon/index.js +8 -0
  35. package/dist/foundations/index.d.ts +2 -2
  36. package/dist/foundations/index.js +1 -1
  37. package/dist/foundations/interactions/index.d.ts +18 -2
  38. package/dist/foundations/interactions/index.js +1 -1
  39. package/dist/foundations/state/index.d.ts +8 -1
  40. package/dist/foundations/state/index.js +7 -1
  41. package/dist/foundations/structures/index.d.ts +2 -2
  42. package/dist/foundations/structures/index.js +1 -1
  43. package/dist/foundations/utilities/index.d.ts +2 -2
  44. package/dist/foundations/utilities/index.js +1 -1
  45. package/dist/fx/index.d.ts +10 -1
  46. package/dist/fx/index.js +8 -2
  47. package/dist/{index-Cf2ANwPL.d.ts → index-C29SEGIv.d.ts} +30 -3
  48. package/dist/{index-BnU0NPwM.d.ts → index-CzH-0LcA.d.ts} +18 -0
  49. package/dist/index-KQ7Vl4-8.d.ts +1364 -0
  50. package/dist/index.d.ts +3 -7
  51. package/dist/index.js +34 -18
  52. package/dist/{interactions-CWkNEq_C.js → interactions-B4XaFxt1.js} +6 -1
  53. package/dist/{jsx-C3IECePB.js → jsx-DRS-qjiN.js} +2 -0
  54. package/dist/jsx-dev-runtime.d.ts +2 -3
  55. package/dist/jsx-dev-runtime.js +1 -1
  56. package/dist/jsx-runtime-BTzDdBJ_.d.ts +2 -0
  57. package/dist/{jsx-runtime-LHh5tcTe.d.ts → jsx-runtime-Cdd6Gkb0.d.ts} +4 -3
  58. package/dist/jsx-runtime.d.ts +2 -2
  59. package/dist/jsx-runtime.js +1 -1
  60. package/dist/{lifecycle-batch-Dfpid9-A.js → lifecycle-batch-BH0fax4F.js} +2 -2
  61. package/dist/{lifecycle-operations-CMK1AN2C.js → lifecycle-operations-Qxq6ABrC.js} +7 -2
  62. package/dist/{manifest-fBb2ynKL.js → manifest-D6rfj_jC.js} +5 -1
  63. package/dist/{navigate-BO7M2iUG.d.ts → navigate-BL_FIIJ6.d.ts} +6 -1
  64. package/dist/{navigate-CnQMXze1.js → navigate-CECCMPAr.js} +16 -11
  65. package/dist/{query-registry-B4LpVtlT.js → query-registry-CimB1YeW.js} +11 -1
  66. package/dist/{readable-B5NtV7V0.js → readable-BsdGWsDE.js} +9 -6
  67. package/dist/{renderer-y2DL627q.js → renderer-CLvq458M.js} +235 -189
  68. package/dist/{resolution-C9A31xQi.js → resolution-D8PgnTzh.js} +12 -6
  69. package/dist/{resource-operation-whZDJAYv.js → resource-operation-CLQXCn1p.js} +5 -5
  70. package/dist/resources/index.d.ts +15 -2
  71. package/dist/resources/index.js +7 -6
  72. package/dist/{route-matching-xlgdQXg_.js → route-matching-Bo6UqG-5.js} +13 -4
  73. package/dist/router/index.d.ts +46 -6
  74. package/dist/router/index.js +16 -9
  75. package/dist/{selector-BLNkRZ2i.js → selector-CyK-sDwB.js} +24 -6
  76. package/dist/ssg/index.d.ts +5 -2
  77. package/dist/ssg/index.js +6 -6
  78. package/dist/ssr/index.d.ts +16 -5
  79. package/dist/ssr/index.js +1 -1
  80. package/dist/{ssr-DNJUPmMq.js → ssr-8_vHDWqV.js} +20 -12
  81. package/dist/{state-DCjONcHK.js → state-DmkGM_LN.js} +5 -5
  82. package/dist/{structures-m-cphWI-.js → structures-umvVUD-M.js} +20 -6
  83. package/dist/testing/index.d.ts +31 -3
  84. package/dist/testing/index.js +24 -6
  85. package/dist/{jsx-BYXe_Nnk.d.ts → types-DkVJhVs9.d.ts} +20 -0
  86. package/dist/{verify-hydration-D8938Fw2.js → verify-hydration-jf8X2V3x.js} +1 -1
  87. package/package.json +1 -1
  88. package/dist/control-D-FIa-n-.d.ts +0 -451
  89. package/dist/index-BU17hud9.d.ts +0 -52
  90. package/dist/index-CPlPDbEY.d.ts +0 -64
  91. package/dist/index-Izwp_ESC.d.ts +0 -458
  92. package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
  93. package/dist/scheduler-CmLO4Dfm.d.ts +0 -65
  94. package/dist/types-CsPtBGWb.d.ts +0 -16
  95. package/dist/types-iAmDSV6o.d.ts +0 -179
package/dist/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- import { b as StateTuple, c as readScope, o as Scope, s as defineScope, v as State, x as state, y as StateSetter } from "./control-D-FIa-n-.js";
2
- import { s as Props, t as Fragment } from "./jsx-BYXe_Nnk.js";
3
- import { f as QueryPrefetchContext, h as ServerQueryHandler, l as QueryDefinition, t as DataRuntime } from "./types-iAmDSV6o.js";
4
- import { $ as cspNonce, Q as CspNonceScope, at as derive, c as createRef, ct as RuntimeKeyedReorderDecision, d as registerSSRStyle, dt as getDefaultRuntime, et as Selector, ft as getSignal, it as Derived, lt as RuntimeRendererHost, nt as RenderDiagnosticsOptions, ot as AskrRuntime, rt as configureRenderDiagnostics, s as Ref, st as AskrRuntimeOptions, tt as selector, ut as createRuntime } from "./index-Izwp_ESC.js";
5
- import { a as Show, c as ForProps, i as MatchProps, n as CaseProps, o as ShowProps, r as Match, s as For, t as Case } from "./index-BU17hud9.js";
6
- import { a as defineServerQueries, c as prefetchQuery, h as createQuery, i as defineQuery, l as serveQuery, o as dehydrateDataRuntime, s as hydrateDataRuntime } from "./index-CPlPDbEY.js";
7
- import { i as jsxs, n as jsx } from "./jsx-runtime-LHh5tcTe.js";
1
+ import { $t as Scope, A as Case, B as RenderDiagnosticsOptions, C as Ref, D as registerSSRStyle, F as ShowProps, G as AskrRuntimeOptions, H as Derived, I as For, J as createRuntime, K as RuntimeKeyedReorderDecision, L as ForProps, M as Match, N as MatchProps, O as CspNonceScope, P as Show, Qt as ServerQueryHandler, R as Selector, U as derive, V as configureRenderDiagnostics, W as AskrRuntime, Y as getDefaultRuntime, Yt as QueryPrefetchContext, Z as getSignal, d as defineServerQueries, dn as State, en as defineScope, f as dehydrateDataRuntime, fn as StateSetter, h as serveQuery, j as CaseProps, k as cspNonce, m as prefetchQuery, mn as state, p as hydrateDataRuntime, pn as StateTuple, q as RuntimeRendererHost, qt as QueryDefinition, tn as readScope, u as defineQuery, w as createRef, x as createQuery, z as selector, zt as DataRuntime } from "./index-KQ7Vl4-8.js";
2
+ import { s as Props, t as Fragment } from "./types-DkVJhVs9.js";
3
+ import { i as jsxs, n as jsx } from "./jsx-runtime-Cdd6Gkb0.js";
8
4
  export { AskrRuntime, type AskrRuntimeOptions, Case, type CaseProps, CspNonceScope, type DataRuntime, type Derived, For, type ForProps, Fragment, Match, type MatchProps, type Props, type QueryDefinition, type QueryPrefetchContext, type Ref, type RenderDiagnosticsOptions, type RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, configureRenderDiagnostics, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-Dpfoi4cA.js";
2
- import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
3
- import { n as Fragment } from "./jsx-C3IECePB.js";
4
- import { _ as readScope, d as defineScope, l as configureRenderDiagnostics } from "./component-internal-C4uwwUaK.js";
5
- import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
1
+ import { a as getRuntimeFlushVersion, f as AskrRuntime, h as getDefaultRuntime, m as createRuntime, t as enqueueRuntimeLane } from "./access-d_DCdwqn.js";
2
+ import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
3
+ import { n as Fragment } from "./jsx-DRS-qjiN.js";
4
+ import { _ as readScope, d as defineScope, l as configureRenderDiagnostics } from "./component-internal-DOVVMjG7.js";
5
+ import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.js";
6
6
  import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
7
- import { t as installRendererBridge } from "./renderer-y2DL627q.js";
7
+ import { t as installRendererBridge } from "./renderer-CLvq458M.js";
8
8
  import { c as registerSSRStyle } from "./render-context-B7ohlh6t.js";
9
- import { t as state } from "./state-DCjONcHK.js";
10
- import { t as selector } from "./selector-BLNkRZ2i.js";
11
- import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-DH0TrDij.js";
12
- import { i as For, n as Match, r as Show, t as Case } from "./control-CON10J1p.js";
9
+ import { t as state } from "./state-DmkGM_LN.js";
10
+ import { t as selector } from "./selector-CyK-sDwB.js";
11
+ import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-BBxq1zq4.js";
12
+ import { i as For, n as Match, r as Show, t as Case } from "./control-DqOzkgc7.js";
13
13
  import { jsx, jsxs } from "./jsx-runtime.js";
14
- import { t as createQuery } from "./data-Bh_3OETq.js";
15
- import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-B4LpVtlT.js";
14
+ import { t as createQuery } from "./data-DYqokZzc.js";
15
+ import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-CimB1YeW.js";
16
16
  //#region src/runtime/derive.ts
17
17
  const deriveCells = /* @__PURE__ */ new WeakMap();
18
18
  const dirtyDerivedCells = /* @__PURE__ */ new Set();
@@ -40,6 +40,7 @@ function flushDirtyDerivedCells() {
40
40
  hasPendingDerivedFlush = false;
41
41
  if (dirtyDerivedCells.size === 0) return;
42
42
  const pending = dirtyDerivedCells.values();
43
+ let failures = null;
43
44
  let next = pending.next();
44
45
  while (!next.done) {
45
46
  const cell = next.value;
@@ -49,13 +50,19 @@ function flushDirtyDerivedCells() {
49
50
  next = pending.next();
50
51
  continue;
51
52
  }
52
- recomputeDerivedCell(cell, true);
53
+ try {
54
+ recomputeDerivedCell(cell, true);
55
+ } catch (error) {
56
+ (failures ??= []).push(error);
57
+ }
53
58
  next = pending.next();
54
59
  }
60
+ if (failures?.length === 1) throw failures[0];
61
+ if (failures && failures.length > 1) throw new AggregateError(failures, "derive() recompute failures");
55
62
  }
56
63
  function recomputeDerivedCell(cell, notifyDownstream) {
57
- if (!cell._dirty && cell._hasValue) return cell._value;
58
64
  if (cell._evaluating) throw new Error("derive() cannot read itself recursively");
65
+ if (!cell._dirty && cell._hasValue) return cell._value;
59
66
  cell._evaluating = true;
60
67
  cell._dirty = false;
61
68
  cell._pendingDependencySources = /* @__PURE__ */ new Set();
@@ -79,7 +86,7 @@ function recomputeDerivedCell(cell, notifyDownstream) {
79
86
  cell._value = nextValue;
80
87
  cell._lastRecomputeFlushVersion = getRuntimeFlushVersion();
81
88
  if (valueChanged && notifyDownstream) {
82
- markReadableDerivedSubscribersDirty(cell);
89
+ markReadableDerivedSubscribersDirty(cell, true);
83
90
  markReactivePropsDirtySource(cell);
84
91
  notifyReadableReaders(cell);
85
92
  }
@@ -87,8 +94,13 @@ function recomputeDerivedCell(cell, notifyDownstream) {
87
94
  }
88
95
  function createDerivedCell(instance, generation, store, hookIndex, compute) {
89
96
  const cell = function derivedGetter() {
90
- recordReadableRead(cell);
91
- return recomputeDerivedCell(cell, cell._scheduled);
97
+ const derivedCell = cell;
98
+ if (!derivedCell._active) {
99
+ if (!derivedCell._hasValue) throw new Error("[Askr] derive() was disposed before producing a value.");
100
+ return derivedCell._value;
101
+ }
102
+ recordReadableRead(derivedCell);
103
+ return recomputeDerivedCell(derivedCell, derivedCell._scheduled);
92
104
  };
93
105
  cell._owner = instance;
94
106
  cell._hookIndex = hookIndex;
@@ -98,15 +110,18 @@ function createDerivedCell(instance, generation, store, hookIndex, compute) {
98
110
  cell._dirty = true;
99
111
  cell._scheduled = false;
100
112
  cell._evaluating = false;
113
+ cell._active = true;
101
114
  cell._lastRecomputeFlushVersion = -1;
102
115
  cell._sources = /* @__PURE__ */ new Set();
103
116
  cell._markDirty = () => {
104
117
  markDerivedCellDirty(cell);
105
118
  };
106
119
  cell._cleanup = () => {
120
+ if (!cell._active) return;
121
+ cell._active = false;
107
122
  cell._scheduled = false;
108
123
  cell._dirty = false;
109
- cell._hasValue = false;
124
+ cell._pendingDependencySources = void 0;
110
125
  dirtyDerivedCells.delete(cell);
111
126
  clearDerivedDependencySubscriptions(cell, cell._sources);
112
127
  cell._derivedSubscribers?.clear();
@@ -154,6 +169,7 @@ function derive(source, map) {
154
169
  }
155
170
  //#endregion
156
171
  //#region src/ref.ts
172
+ /** Create a new, empty {@link Ref} holder. */
157
173
  function createRef() {
158
174
  return { current: null };
159
175
  }
@@ -1,5 +1,6 @@
1
- import { o as mergeProps, r as ariaDisabled, s as composeHandlers, t as composeRefs } from "./compose-ref-Cc_YkUpM.js";
1
+ import { o as mergeProps, r as ariaDisabled, s as composeHandlers, t as composeRefs } from "./compose-ref-1Fhs7mbF.js";
2
2
  //#region src/foundations/interactions/pressable.ts
3
+ /** Produce click/keyboard props implementing 'press' semantics for an element. */
3
4
  function pressable({ disabled, onPress, isNativeButton = false }) {
4
5
  const props = { onClick: (e) => {
5
6
  if (disabled) {
@@ -47,6 +48,7 @@ function pressable({ disabled, onPress, isNativeButton = false }) {
47
48
  }
48
49
  //#endregion
49
50
  //#region src/foundations/interactions/dismissable.ts
51
+ /** Produce keydown/outside-click props that invoke `onDismiss` on Escape or an outside click. */
50
52
  function dismissable({ node, disabled, onDismiss }) {
51
53
  function handleKeyDown(e) {
52
54
  if (disabled) return;
@@ -76,6 +78,7 @@ function dismissable({ node, disabled, onDismiss }) {
76
78
  * Normalize focus-related props for hosts.
77
79
  * - No DOM manipulation here; returns props that the runtime may attach.
78
80
  */
81
+ /** Normalize `tabIndex`/`aria-disabled` props for a focusable host. */
79
82
  function focusable({ disabled, tabIndex }) {
80
83
  return {
81
84
  tabIndex: disabled ? -1 : tabIndex === void 0 ? 0 : tabIndex,
@@ -84,6 +87,7 @@ function focusable({ disabled, tabIndex }) {
84
87
  }
85
88
  //#endregion
86
89
  //#region src/foundations/interactions/hoverable.ts
90
+ /** Produce pointer enter/leave props that call `onEnter`/`onLeave` unless disabled. */
87
91
  function hoverable({ disabled, onEnter, onLeave }) {
88
92
  return {
89
93
  onPointerEnter: disabled ? void 0 : (e) => {
@@ -96,6 +100,7 @@ function hoverable({ disabled, onEnter, onLeave }) {
96
100
  }
97
101
  //#endregion
98
102
  //#region src/foundations/interactions/roving-focus.ts
103
+ /** Implement arrow-key roving tabindex navigation over a set of items. */
99
104
  function rovingFocus(options) {
100
105
  const { currentIndex, itemCount, orientation = "horizontal", loop = false, onNavigate, isDisabled } = options;
101
106
  const effectiveCurrentIndex = currentIndex >= 0 && currentIndex < itemCount && !isDisabled?.(currentIndex) ? currentIndex : Array.from({ length: itemCount }, (_, index) => index).find((index) => !isDisabled?.(index));
@@ -1,5 +1,7 @@
1
1
  //#region src/common/jsx.ts
2
+ /** Internal marker identifying an object as a JSX element vnode. */
2
3
  const ELEMENT_TYPE = Symbol.for("askr.element");
4
+ /** The element type marker for JSX fragments (`<>...</>`), groups children without a wrapper element. */
3
5
  const Fragment = Symbol.for("askr.fragment");
4
6
  const STATIC_CHILDREN = Symbol.for("askr.static-children");
5
7
  function isFragmentType(type) {
@@ -1,6 +1,5 @@
1
- import { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./jsx-BYXe_Nnk.js";
2
- import { t as EagerControlPrimitive } from "./control-CsGs2bLS.js";
3
- import "./types-CsPtBGWb.js";
1
+ import { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./types-DkVJhVs9.js";
2
+ import { t as EagerControlPrimitive } from "./control-DdFw-Caz.js";
4
3
  //#region src/jsx/jsx-dev-runtime.d.ts
5
4
  declare namespace JSX {
6
5
  type ElementType = string | symbol | ((props: never) => unknown);
@@ -1,5 +1,5 @@
1
1
  import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
2
- import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
2
+ import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
3
3
  //#region src/jsx/jsx-dev-runtime.ts
4
4
  function annotatePropsUsage(props) {
5
5
  return props ?? {};
@@ -0,0 +1,2 @@
1
+ import "./types-DkVJhVs9.js";
2
+ import "./jsx-runtime-Cdd6Gkb0.js";
@@ -1,6 +1,5 @@
1
- import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./jsx-BYXe_Nnk.js";
2
- import { t as EagerControlPrimitive } from "./control-CsGs2bLS.js";
3
- import "./types-CsPtBGWb.js";
1
+ import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./types-DkVJhVs9.js";
2
+ import { t as EagerControlPrimitive } from "./control-DdFw-Caz.js";
4
3
  //#region src/jsx/jsx-runtime.d.ts
5
4
  declare namespace JSX {
6
5
  type ElementType = string | symbol | ((props: never) => unknown);
@@ -23,11 +22,13 @@ declare function jsxDEV<TTag extends keyof KnownIntrinsicElementProps>(type: TTa
23
22
  declare function jsxDEV<TTag extends string>(type: Exclude<TTag, keyof KnownIntrinsicElementProps>, props: IntrinsicFallbackProps | null, key?: string | number, isStaticChildren?: boolean): JSXElement;
24
23
  declare function jsxDEV<TProps extends object>(type: (props: TProps) => unknown, props: TProps | null, key?: string | number, isStaticChildren?: boolean): JSXElement;
25
24
  declare function jsxDEV(type: symbol, props: Props | null, key?: string | number, isStaticChildren?: boolean): JSXElement;
25
+ /** JSX factory for elements with a single or no child, used by the `jsxImportSource` transform. */
26
26
  declare function jsx(type: EagerControlPrimitive, props: Props | null, key?: string | number): unknown;
27
27
  declare function jsx<TTag extends keyof KnownIntrinsicElementProps>(type: TTag, props: KnownIntrinsicElementProps[TTag] | null, key?: string | number): JSXElement;
28
28
  declare function jsx<TTag extends string>(type: Exclude<TTag, keyof KnownIntrinsicElementProps>, props: IntrinsicFallbackProps | null, key?: string | number): JSXElement;
29
29
  declare function jsx<TProps extends object>(type: (props: TProps) => unknown, props: TProps | null, key?: string | number): JSXElement;
30
30
  declare function jsx(type: symbol, props: Props | null, key?: string | number): JSXElement;
31
+ /** JSX factory for elements with multiple static children, used by the `jsxImportSource` transform. */
31
32
  declare function jsxs(type: EagerControlPrimitive, props: Props | null, key?: string | number): unknown;
32
33
  declare function jsxs<TTag extends keyof KnownIntrinsicElementProps>(type: TTag, props: KnownIntrinsicElementProps[TTag] | null, key?: string | number): JSXElement;
33
34
  declare function jsxs<TTag extends string>(type: Exclude<TTag, keyof KnownIntrinsicElementProps>, props: IntrinsicFallbackProps | null, key?: string | number): JSXElement;
@@ -1,3 +1,3 @@
1
- import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./jsx-BYXe_Nnk.js";
2
- import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-LHh5tcTe.js";
1
+ import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./types-DkVJhVs9.js";
2
+ import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-Cdd6Gkb0.js";
3
3
  export { Fragment, JSX, type JSXComponent, type JSXElement, type JSXElementType, jsx, jsxDEV, jsxs };
@@ -1,5 +1,5 @@
1
1
  import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
2
- import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
2
+ import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
3
3
  //#region src/jsx/jsx-runtime.ts
4
4
  function markStaticChildren(props) {
5
5
  if (Array.isArray(props.children)) Object.defineProperty(props.children, STATIC_CHILDREN, {
@@ -1,5 +1,5 @@
1
- import { v as logger } from "./access-Dpfoi4cA.js";
2
- import { a as finalizeReadableSubscriptionsFromSnapshot } from "./readable-B5NtV7V0.js";
1
+ import { y as logger } from "./access-d_DCdwqn.js";
2
+ import { a as finalizeReadableSubscriptionsFromSnapshot } from "./readable-BsdGWsDE.js";
3
3
  //#region src/common/promise.ts
4
4
  function isPromiseLike(value) {
5
5
  return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
@@ -1,5 +1,5 @@
1
- import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
2
- import { a as registerCommitOperation } from "./component-internal-C4uwwUaK.js";
1
+ import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-4I3yEMkb.js";
2
+ import { a as registerCommitOperation } from "./component-internal-DOVVMjG7.js";
3
3
  import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
4
4
  //#region src/runtime/lifecycle-operations.ts
5
5
  function normalizePredicates(predicates) {
@@ -22,12 +22,15 @@ function getLifecycleSlot(instance, index, kind, create) {
22
22
  lifecycleSlots[index] = slot;
23
23
  return slot;
24
24
  }
25
+ /** {@link ActivityPredicate} that is true while the current route matches `pathOrPaths`. */
25
26
  function routeActive(pathOrPaths) {
26
27
  return () => isRouteActivityActive(pathOrPaths);
27
28
  }
29
+ /** {@link ActivityPredicate} that is true while the document is visible. */
28
30
  function documentVisible() {
29
31
  return () => typeof document === "undefined" || document.visibilityState !== "hidden";
30
32
  }
33
+ /** {@link ActivityPredicate} that is true while the window has focus. */
31
34
  function windowFocused() {
32
35
  return () => typeof document === "undefined" || typeof document.hasFocus !== "function" || document.hasFocus();
33
36
  }
@@ -72,6 +75,7 @@ function commitListenerSlot(instance, slot) {
72
75
  });
73
76
  }
74
77
  }
78
+ /** Attach an owned event listener to `target` for the current component's lifetime. */
75
79
  function on(target, event, handler, options) {
76
80
  const instance = getCurrentComponentInstance();
77
81
  if (!instance) return;
@@ -131,6 +135,7 @@ function commitTimerSlot(instance, slot) {
131
135
  });
132
136
  }
133
137
  }
138
+ /** Run `fn` on an owned interval for the current component's lifetime, optionally gated by `options.when`. */
134
139
  function timer(intervalMs, fn, options) {
135
140
  const instance = getCurrentComponentInstance();
136
141
  if (!instance) return;
@@ -1,4 +1,4 @@
1
- import { A as getDefaultRouteBasePath, B as setDefaultRouteBasePath, F as insertRecordSorted, M as getRouteRecords, R as restoreRouteState, V as snapshotRouteState, _ as clearRouteState, h as addRouteToStores, j as getRouteList, k as getDefaultRouteAuthOptions, s as normalizeRouteBasePath, z as setDefaultRouteAuthOptions } from "./route-matching-xlgdQXg_.js";
1
+ import { A as getDefaultRouteBasePath, B as setDefaultRouteBasePath, F as insertRecordSorted, M as getRouteRecords, R as restoreRouteState, V as snapshotRouteState, _ as clearRouteState, h as addRouteToStores, j as getRouteList, k as getDefaultRouteAuthOptions, s as normalizeRouteBasePath, z as setDefaultRouteAuthOptions } from "./route-matching-Bo6UqG-5.js";
2
2
  //#region src/runtime/execution-model.ts
3
3
  const EXECUTION_MODEL_KEY = Symbol.for("__ASKR_EXECUTION_MODEL__");
4
4
  function getExecutionModel() {
@@ -33,6 +33,10 @@ function _applyManifest(manifest) {
33
33
  });
34
34
  }
35
35
  }
36
+ /**
37
+ * Run `definition` to declare routes (via `route`/`page`/`group`/`fallback`)
38
+ * and build a {@link RouteRegistry} to pass to `createSPA`/`hydrateSPA`.
39
+ */
36
40
  function createRouteRegistry(definition, options = {}) {
37
41
  const previous = snapshotRouteState();
38
42
  clearRouteState();
@@ -1,13 +1,17 @@
1
- import "./index-Izwp_ESC.js";
1
+ import "./index-KQ7Vl4-8.js";
2
2
  //#region src/router/navigation-scroll.d.ts
3
+ /** Scroll behavior for programmatic navigations (`navigate()`). */
3
4
  type NavigationScrollBehavior = 'top' | 'preserve';
5
+ /** Scroll behavior for browser back/forward (popstate) navigations. */
4
6
  type HistoryScrollBehavior = 'restore' | 'top' | 'preserve';
7
+ /** Options for {@link configureScrollRestoration}. */
5
8
  type ScrollRestorationOptions = {
6
9
  navigation?: NavigationScrollBehavior;
7
10
  history?: HistoryScrollBehavior;
8
11
  };
9
12
  //#endregion
10
13
  //#region src/router/navigation-targets.d.ts
14
+ /** Options for {@link navigate}. */
11
15
  type NavigateOptions = {
12
16
  history?: 'push' | 'replace';
13
17
  replace?: boolean;
@@ -15,6 +19,7 @@ type NavigateOptions = {
15
19
  };
16
20
  //#endregion
17
21
  //#region src/router/navigate.d.ts
22
+ /** Navigate the client-side router to `path` using the History API. */
18
23
  declare function navigate(path: string, options?: NavigateOptions): void;
19
24
  //#endregion
20
25
  export { ScrollRestorationOptions as a, NavigationScrollBehavior as i, NavigateOptions as n, HistoryScrollBehavior as r, navigate as t };
@@ -1,14 +1,14 @@
1
- import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
2
- import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
3
- import { r as executeComponent } from "./component-internal-C4uwwUaK.js";
4
- import { t as cleanupReadableSubscriptionSources } from "./readable-B5NtV7V0.js";
5
- import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
6
- import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-Dfpid9-A.js";
7
- import { _ as teardownNodeSubtree } from "./cleanup-c837KVij.js";
8
- import { t as CspNonceScope } from "./csp-nonce-DH0TrDij.js";
9
- import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-xlgdQXg_.js";
10
- import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-C9A31xQi.js";
11
- import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-dKH6nlpj.js";
1
+ import { S as isProductionEnvironment, r as flushRuntimeScheduler, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
2
+ import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
3
+ import { r as executeComponent } from "./component-internal-DOVVMjG7.js";
4
+ import { t as cleanupReadableSubscriptionSources } from "./readable-BsdGWsDE.js";
5
+ import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-hrqSikl2.js";
6
+ import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-BH0fax4F.js";
7
+ import { _ as teardownNodeSubtree } from "./cleanup-DefafSjG.js";
8
+ import { t as CspNonceScope } from "./csp-nonce-BBxq1zq4.js";
9
+ import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-Bo6UqG-5.js";
10
+ import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-D8PgnTzh.js";
11
+ import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-BshyLB3_.js";
12
12
  import { r as getDefaultPortalHost, t as clearRegisteredDefaultPortalForInstance } from "./default-portal-runtime-DvMvWJVp.js";
13
13
  //#region src/router/navigation-registry.ts
14
14
  let currentInstance = null;
@@ -240,6 +240,7 @@ function metadataSources(record) {
240
240
  if (record.metaChain) return record.metaChain;
241
241
  return record.options.meta ? [record.options.meta] : [];
242
242
  }
243
+ /** Resolve a route's merged {@link RouteMeta} by running its metadata chain against `context`. */
243
244
  async function resolveRouteMeta(record, context) {
244
245
  let resolved = record.options.title ? { title: record.options.title } : {};
245
246
  for (const source of metadataSources(record)) {
@@ -326,6 +327,7 @@ function serializeJsonLd(value) {
326
327
  const json = JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
327
328
  return `<script${ownedAttribute()} type="application/ld+json">${json}<\/script>`;
328
329
  }
330
+ /** Render a {@link RouteMeta} to the `<title>`/`<meta>`/`<link>`/JSON-LD markup for the document `<head>`. */
329
331
  function serializeRouteMeta(meta) {
330
332
  const output = [];
331
333
  if (meta.title !== void 0) output.push(`<title${ownedAttribute()}>${escapeText(meta.title)}</title>`);
@@ -724,6 +726,8 @@ function updateRouteRuntime(instance, resolved, href) {
724
726
  const runtime = createAppRenderRuntime({
725
727
  framework: withoutRouteHydrationMetadata(current?.framework),
726
728
  dataRuntime: current?.dataRuntime,
729
+ routeRegistry: current?.routeRegistry,
730
+ routeAuth: current?.routeAuth,
727
731
  route: resolved?.kind === "render" ? getRouteRenderData(resolved) : void 0,
728
732
  hasRoute: resolved?.kind === "render" && hasRouteRenderData(resolved)
729
733
  });
@@ -991,6 +995,7 @@ function applyPopStateNavigationTargets(requestId, previousHref, previousState,
991
995
  */
992
996
  let navigationInitialized = false;
993
997
  configureNavigationRegistryHost({ cancelRouteRequests });
998
+ /** Navigate the client-side router to `path` using the History API. */
994
999
  function navigate(path, options = {}) {
995
1000
  if (typeof window === "undefined") return;
996
1001
  const targetPath = addRouteBasePath(path, getActiveRouteBasePath());
@@ -1,16 +1,18 @@
1
- import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-wbooGyu7.js";
1
+ import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-JxoRgrrt.js";
2
2
  //#region src/common/telemetry.ts
3
3
  function withTelemetry(span, fields, work) {
4
4
  return span ? span(fields, work) : work();
5
5
  }
6
6
  //#endregion
7
7
  //#region src/data/query-registry.ts
8
+ /** Pair a {@link QueryDefinition} with the server-side handler that resolves it. */
8
9
  function serveQuery(query, handler) {
9
10
  return Object.freeze({
10
11
  query,
11
12
  handler
12
13
  });
13
14
  }
15
+ /** Build a {@link ServerQueryRegistry} from one or more {@link serveQuery} entries. */
14
16
  function defineServerQueries(...entries) {
15
17
  const frozenEntries = Object.freeze([...entries]);
16
18
  const handlers = new Map(entries.map((entry) => [entry.query, entry.handler]));
@@ -21,9 +23,14 @@ function defineServerQueries(...entries) {
21
23
  }
22
24
  });
23
25
  }
26
+ /** Freeze and return a reusable {@link QueryDefinition}. */
24
27
  function defineQuery(definition) {
25
28
  return Object.freeze({ ...definition });
26
29
  }
30
+ /**
31
+ * Create a {@link QueryPrefetchContext} for prefetching query data ahead of
32
+ * render, e.g. during SSR route resolution.
33
+ */
27
34
  function createQueryPrefetchContext(options = {}) {
28
35
  const runtime = options.runtime ?? (options.mode === "spa" ? getDefaultDataRuntime() : createDataRuntime());
29
36
  const signal = options.signal ?? new AbortController().signal;
@@ -54,9 +61,11 @@ function createQueryPrefetchContext(options = {}) {
54
61
  }
55
62
  };
56
63
  }
64
+ /** Prefetch `query` with `input` into a {@link QueryPrefetchContext}'s runtime. */
57
65
  async function prefetchQuery(context, query, input) {
58
66
  return context.prefetch(query, input);
59
67
  }
68
+ /** Extract a runtime's cached query data into a JSON-serializable snapshot, dropping non-serializable values. */
60
69
  function dehydrateDataRuntime(runtime) {
61
70
  const result = {};
62
71
  for (const [key, value] of runtime.queryData) try {
@@ -65,6 +74,7 @@ function dehydrateDataRuntime(runtime) {
65
74
  } catch {}
66
75
  return result;
67
76
  }
77
+ /** Load a {@link dehydrateDataRuntime} snapshot back into a runtime's query cache. */
68
78
  function hydrateDataRuntime(runtime, data) {
69
79
  if (!data || typeof data !== "object" || Array.isArray(data)) return;
70
80
  for (const [key, value] of Object.entries(data)) runtime.queryData.set(key, value);
@@ -1,5 +1,5 @@
1
- import { n as enqueueRuntimeTask, s as markRuntimeReactivePropsDirtySource } from "./access-Dpfoi4cA.js";
2
- import { p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
1
+ import { c as markRuntimeReactivePropsDirtySource, n as enqueueRuntimeTask, s as isRuntimeSchedulerExecuting } from "./access-d_DCdwqn.js";
2
+ import { p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
3
3
  //#region src/runtime/readable.ts
4
4
  const DEVELOPMENT_BUILD_ENABLED = false;
5
5
  function markReadableUsage(source) {
@@ -95,10 +95,10 @@ function finalizeReadableSubscriptionsFromSnapshot(instance, token, newSet, pend
95
95
  }
96
96
  instance.lastRenderToken = token;
97
97
  if (newSet) for (const source of newSet) {
98
- if (pendingVersions && (!oldSet || oldSet.has(source))) {
98
+ if (pendingVersions) {
99
99
  const sourceVersion = source._version ?? 0;
100
100
  const readVersion = pendingVersions.get(source);
101
- if (readVersion !== void 0 && sourceVersion !== readVersion) needsFollowUpUpdate = true;
101
+ if (readVersion !== void 0 && sourceVersion !== readVersion && (!oldSet || oldSet.has(source) || isRuntimeSchedulerExecuting())) needsFollowUpUpdate = true;
102
102
  }
103
103
  let readers = source._readers;
104
104
  if (!readers) {
@@ -159,10 +159,13 @@ function clearDerivedDependencySubscriptions(subscriber, sources) {
159
159
  for (const source of sources) source._derivedSubscribers?.delete(subscriber);
160
160
  sources.clear();
161
161
  }
162
- function markReadableDerivedSubscribersDirty(source) {
162
+ function markReadableDerivedSubscribersDirty(source, skipCurrentSubscriber = false) {
163
163
  const subscribers = source._derivedSubscribers;
164
164
  if (!subscribers || subscribers.size === 0) return;
165
- for (const subscriber of subscribers) subscriber._markDirty();
165
+ for (const subscriber of subscribers) {
166
+ if (skipCurrentSubscriber && subscriber === currentDerivedSubscriber) continue;
167
+ subscriber._markDirty();
168
+ }
166
169
  }
167
170
  function markReactivePropsDirtySource(source) {
168
171
  try {