@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
@@ -0,0 +1,1364 @@
1
+ import { i as JSXElementType, r as JSXElement, s as Props } from "./types-DkVJhVs9.js";
2
+ import "./jsx-runtime-BTzDdBJ_.js";
3
+ import { AuthContext, AuthRequirement } from "@askrjs/auth";
4
+ import { InferSchema, ObjectSchema } from "@askrjs/schema";
5
+ //#region src/runtime/state.d.ts
6
+ /**
7
+ * State value holder - callable to read, has set method to update
8
+ * @example
9
+ * const count = state(0);
10
+ * count(); // read: 0
11
+ * count.set(1); // write: triggers re-render
12
+ */
13
+ interface State<T> extends ReadableSource<T> {
14
+ (): T;
15
+ set(...args: StateSetterArgs<T>): void;
16
+ [Symbol.iterator](): IterableIterator<StateTuple<T>[number]>;
17
+ }
18
+ type StateUpdater<T> = (prev: T) => T;
19
+ type StateSetterArgs<T> = [Extract<T, (...args: any[]) => unknown>] extends [never] ? [value: T] | [updater: StateUpdater<T>] : [updater: StateUpdater<T>];
20
+ /**
21
+ * Public setter type for state cells.
22
+ */
23
+ type StateSetter<T> = (...args: StateSetterArgs<T>) => void;
24
+ /**
25
+ * Tuple-first state handle returned by `state()`.
26
+ */
27
+ type StateTuple<T> = [get: State<T>, set: StateSetter<T>] & State<T>;
28
+ /**
29
+ * Creates a local state value for a component
30
+ * Optimized for:
31
+ * - O(1) read performance
32
+ * - Minimal allocation per state
33
+ * - Fast scheduler integration
34
+ *
35
+ * IMPORTANT: state() must be called during component render execution.
36
+ * It captures the current component instance from context.
37
+ * Calling outside a component function will throw an error.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * // ✅ Correct: called during render
42
+ * export function Counter() {
43
+ * const [count, setCount] = state(0);
44
+ * return { type: 'button', children: [count()] };
45
+ * }
46
+ *
47
+ * // ❌ Wrong: called outside component
48
+ * const count = state(0);
49
+ * export function BadComponent() {
50
+ * return { type: 'div' };
51
+ * }
52
+ * ```
53
+ */
54
+ declare function state<T>(initialValue: T): StateTuple<T>;
55
+ //#endregion
56
+ //#region src/common/ssr.d.ts
57
+ /**
58
+ * Common call contracts: SSR types
59
+ */
60
+ /** Arbitrary serializable data attached to an SSR render pass (e.g. loader output). */
61
+ type SSRData = Record<string, unknown>;
62
+ /** Styles produced while rendering a request, kept with that request's SSR context. */
63
+ interface SSRStyleRegistration {
64
+ id: string;
65
+ cssText: string;
66
+ }
67
+ interface DocumentRenderRoute {
68
+ path: string;
69
+ namespace?: string;
70
+ }
71
+ /** Request/render metadata passed to a {@link DocumentRenderer}. */
72
+ interface DocumentRenderContext {
73
+ mode: 'ssr' | 'ssg';
74
+ url: string;
75
+ pathname: string;
76
+ search: string;
77
+ hash: string;
78
+ params: Record<string, string>;
79
+ data?: SSRData;
80
+ seed: number;
81
+ route: DocumentRenderRoute;
82
+ cspNonce?: string;
83
+ styles?: readonly SSRStyleRegistration[];
84
+ }
85
+ /** Arguments passed to a {@link DocumentRenderer}: the rendered app HTML and its context. */
86
+ interface DocumentRenderArgs {
87
+ appHtml: string;
88
+ context: DocumentRenderContext;
89
+ }
90
+ /** Wraps rendered app HTML in a full document (`<html>`, `<head>`, etc.) for SSR/SSG output. */
91
+ type DocumentRenderer = (args: DocumentRenderArgs) => string;
92
+ /** How to react when SSR styles were registered but not included in the rendered document. */
93
+ type SSRStyleRegistrationValidation = 'warn' | 'error' | 'off';
94
+ /** Full context for sink-based streaming SSR */
95
+ type SSRContext = {
96
+ url: string;
97
+ seed: number;
98
+ data?: SSRData;
99
+ params?: Record<string, string>;
100
+ signal?: AbortSignal;
101
+ };
102
+ //#endregion
103
+ //#region src/common/vnode.d.ts
104
+ interface DOMElement {
105
+ type: JSXElementType;
106
+ props?: Props;
107
+ children?: VNode[];
108
+ key?: string | number | null;
109
+ [Symbol.iterator]?: never;
110
+ _controlState?: ControlBoundaryState;
111
+ }
112
+ type VNode = DOMElement | string | number | boolean | null | undefined;
113
+ type RenderableChild = VNode | JSXElement | readonly RenderableChild[];
114
+ //#endregion
115
+ //#region src/common/component.d.ts
116
+ type ComponentContext = {
117
+ signal: AbortSignal;
118
+ ssr?: SSRContext;
119
+ };
120
+ type ComponentFunction = (props: Props, context?: ComponentContext) => JSXElement | VNode;
121
+ //#endregion
122
+ //#region src/runtime/context.d.ts
123
+ type ContextKey = symbol;
124
+ type Renderable = RenderableChild;
125
+ type ContextScopeChildren = Renderable | (() => Renderable);
126
+ /** A lexical scope created by {@link defineScope}; render it as a provider component, read it with {@link readScope}. */
127
+ interface Scope<T> {
128
+ (props: {
129
+ value: T;
130
+ children?: ContextScopeChildren;
131
+ }): JSXElement;
132
+ readonly key: ContextKey;
133
+ readonly defaultValue: T;
134
+ }
135
+ interface ContextFrame {
136
+ parent: ContextFrame | null;
137
+ values: Map<ContextKey, unknown> | null;
138
+ }
139
+ /** Create a new lexical {@link Scope} with `defaultValue`, readable via {@link readScope}. */
140
+ declare function defineScope<T>(defaultValue: T): Scope<T>;
141
+ /** Read the current value of a {@link Scope} during component render or an async resource. */
142
+ declare function readScope<T>(context: Scope<T>): T;
143
+ //#endregion
144
+ //#region src/runtime/component-cleanup.d.ts
145
+ type OwnedChildScope = {
146
+ key: string | number;
147
+ dispose(): void;
148
+ };
149
+ //#endregion
150
+ //#region src/data/types.d.ts
151
+ /** Freshness classification for a {@link Query}'s current data. */
152
+ type QueryConsistency = 'fresh' | 'stale' | 'refreshing' | 'pending-write';
153
+ /** Why a {@link Query} is stale. */
154
+ type QueryStaleReason = 'aborted' | 'error' | 'inconsistent';
155
+ /** Isolated cache/state container backing queries and mutations, e.g. one per test or request. */
156
+ interface DataRuntime {
157
+ readonly queryCache: Map<string, unknown>;
158
+ readonly queryData: Map<string, unknown>;
159
+ /** Test-only query overrides keyed by the canonical query key. */
160
+ readonly queryTestOverrides: Map<string, unknown>;
161
+ /** Test-only mutation overrides keyed by the canonical mutation key. */
162
+ readonly mutationTestOverrides: Map<string, unknown>;
163
+ }
164
+ /** Options for {@link createDataRuntime}. */
165
+ interface DataRuntimeOptions {
166
+ queryCache?: Map<string, unknown>;
167
+ queryData?: Map<string, unknown>;
168
+ queryTestOverrides?: Map<string, unknown>;
169
+ mutationTestOverrides?: Map<string, unknown>;
170
+ }
171
+ /** Reusable query definition for {@link defineQuery}: key, fetcher, and freshness checks. */
172
+ interface QueryDefinition<TInput, TResult extends {}> {
173
+ readonly key: (input: TInput) => string;
174
+ readonly fetch: (context: TInput & {
175
+ signal: AbortSignal;
176
+ }) => Promise<TResult>;
177
+ readonly isConsistent?: (data: TResult) => boolean;
178
+ readonly reconcile?: (data: TResult, context: {
179
+ key: string;
180
+ }) => Promise<boolean> | boolean;
181
+ }
182
+ /** Context passed to server prefetch callbacks, exposing a scoped `prefetch` helper. */
183
+ interface QueryPrefetchContext {
184
+ readonly runtime: DataRuntime;
185
+ readonly request?: Request;
186
+ readonly signal: AbortSignal;
187
+ readonly mode: 'ssr' | 'spa';
188
+ prefetch<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>, input: TInput): Promise<boolean>;
189
+ }
190
+ /** Server-side handler that resolves a {@link QueryDefinition}'s data for `serveQuery`. */
191
+ type ServerQueryHandler<TInput, TResult extends {}> = (context: {
192
+ input: TInput;
193
+ request?: Request;
194
+ signal: AbortSignal;
195
+ }) => Promise<TResult> | TResult;
196
+ /** Options for {@link invalidate} and {@link QueryScope.invalidate}. */
197
+ interface InvalidateOptions {
198
+ markPendingWrite?: boolean;
199
+ runtime?: DataRuntime;
200
+ }
201
+ /** Options for {@link invalidateOnInterval}. */
202
+ interface InvalidateOnIntervalOptions extends InvalidateOptions {
203
+ intervalMs: number;
204
+ activeOn?: string | readonly string[];
205
+ visibleOnly?: boolean;
206
+ focusedOnly?: boolean;
207
+ }
208
+ /** A JSON-serializable value usable as part of a query key or invalidation prefix. */
209
+ type QueryKeyPart = string | number | boolean | null | undefined | readonly QueryKeyPart[] | {
210
+ readonly [key: string]: QueryKeyPart;
211
+ };
212
+ /** Namespaced key-building and invalidation helper returned by {@link queryScope}. */
213
+ interface QueryScope {
214
+ key(...parts: QueryKeyPart[]): string;
215
+ prefix(...parts: QueryKeyPart[]): string;
216
+ invalidate(parts: readonly QueryKeyPart[], options?: InvalidateOptions): void;
217
+ }
218
+ type QueryControls = {
219
+ refresh(): Promise<void>;
220
+ };
221
+ type QueryLoading = {
222
+ data: null;
223
+ error: null;
224
+ loading: true;
225
+ refreshing: false;
226
+ stale: false;
227
+ consistency: 'fresh';
228
+ staleReason: null;
229
+ };
230
+ type QueryFresh<T> = {
231
+ data: T;
232
+ error: null;
233
+ loading: false;
234
+ refreshing: false;
235
+ stale: false;
236
+ consistency: 'fresh';
237
+ staleReason: null;
238
+ };
239
+ type QueryRefreshing<T> = {
240
+ data: T;
241
+ error: null;
242
+ loading: false;
243
+ refreshing: true;
244
+ stale: true;
245
+ consistency: 'refreshing';
246
+ staleReason: null;
247
+ };
248
+ type QueryPendingWrite<T> = {
249
+ data: T;
250
+ error: null;
251
+ loading: false;
252
+ refreshing: true;
253
+ stale: true;
254
+ consistency: 'pending-write';
255
+ staleReason: null;
256
+ };
257
+ type QueryStaleValue<T> = {
258
+ data: T;
259
+ error: null;
260
+ loading: false;
261
+ refreshing: false;
262
+ stale: true;
263
+ consistency: 'stale';
264
+ staleReason: 'aborted' | 'inconsistent';
265
+ };
266
+ type QueryStaleErrorWithValue<T> = {
267
+ data: T;
268
+ error: {};
269
+ loading: false;
270
+ refreshing: false;
271
+ stale: true;
272
+ consistency: 'stale';
273
+ staleReason: 'error';
274
+ };
275
+ type QueryStaleError = {
276
+ data: null;
277
+ error: {};
278
+ loading: false;
279
+ refreshing: false;
280
+ stale: true;
281
+ consistency: 'stale';
282
+ staleReason: 'error';
283
+ };
284
+ /** Reactive read state for a query cell: data, loading/refresh flags, and freshness. */
285
+ type Query<T extends {}> = QueryControls & (QueryLoading | QueryFresh<T> | QueryRefreshing<T> | QueryPendingWrite<T> | QueryStaleValue<T> | QueryStaleErrorWithValue<T> | QueryStaleError);
286
+ type MutationControls<TInput, TResult> = {
287
+ execute(input: TInput): Promise<TResult>;
288
+ abort(): void;
289
+ reset(): void;
290
+ };
291
+ type MutationIdle = {
292
+ status: 'idle';
293
+ pending: false;
294
+ error: null;
295
+ result: null;
296
+ };
297
+ type MutationPending = {
298
+ status: 'pending';
299
+ pending: true;
300
+ error: null;
301
+ result: null;
302
+ };
303
+ type MutationSuccess<TResult> = {
304
+ status: 'success';
305
+ pending: false;
306
+ error: null;
307
+ result: TResult;
308
+ };
309
+ type MutationError = {
310
+ status: 'error';
311
+ pending: false;
312
+ error: {};
313
+ result: null;
314
+ };
315
+ /** Reactive state for a mutation cell: status, error/result, and execute/abort/reset controls. */
316
+ type Mutation<TInput, TResult> = MutationControls<TInput, TResult> & (MutationIdle | MutationPending | MutationSuccess<TResult> | MutationError);
317
+ type QueryOptions<T> = {
318
+ key: string;
319
+ fetch: (ctx: {
320
+ signal: AbortSignal;
321
+ }) => Promise<T>;
322
+ isConsistent?: (data: T) => boolean;
323
+ reconcile?: (data: T, ctx: {
324
+ key: string;
325
+ }) => Promise<boolean> | boolean;
326
+ runtime?: DataRuntime;
327
+ initialData?: T;
328
+ skipInitialFetch?: boolean;
329
+ };
330
+ /** Options for {@link createMutation}. */
331
+ type MutationOptions<TInput, TResult> = {
332
+ /** Stable identity used by runtime-scoped mutation test overrides. */
333
+ key?: string;
334
+ action: (input: TInput, ctx: {
335
+ signal: AbortSignal;
336
+ }) => Promise<TResult>;
337
+ affects?: (input: TInput, result: TResult) => string[];
338
+ afterSuccess?: 'invalidate';
339
+ runtime?: DataRuntime;
340
+ };
341
+ //#endregion
342
+ //#region src/common/telemetry.d.ts
343
+ interface TelemetryFields {
344
+ requestId?: string;
345
+ traceId?: string;
346
+ route?: string;
347
+ action?: string;
348
+ operation?: string;
349
+ status?: number;
350
+ durationMs?: number;
351
+ }
352
+ type TelemetrySpan = <T>(fields: TelemetryFields, work: () => T) => T;
353
+ /**
354
+ * Structural subset implemented by `createTelemetry()` from `@askrjs/otel`.
355
+ * Core does not install an OpenTelemetry SDK, backend, or exporter.
356
+ */
357
+ interface CoreTelemetry {
358
+ routeMatch?: TelemetrySpan;
359
+ loader?: TelemetrySpan;
360
+ queryPrefetch?: TelemetrySpan;
361
+ ssrRender?: TelemetrySpan;
362
+ }
363
+ //#endregion
364
+ //#region src/common/router.d.ts
365
+ /**
366
+ * Common call contracts: Router types
367
+ */
368
+ /** Path parameters captured for a matched route, keyed by parameter name. */
369
+ type RouteParams = Record<string, string>;
370
+ type StripRoutePathSuffix<Path extends string> = Path extends `${infer Base}?${string}` ? StripRoutePathSuffix<Base> : Path extends `${infer Base}#${string}` ? StripRoutePathSuffix<Base> : Path;
371
+ type TrimRoutePathSlashes<Path extends string> = Path extends `/${infer Rest}` ? TrimRoutePathSlashes<Rest> : Path extends `${infer Rest}/` ? TrimRoutePathSlashes<Rest> : Path;
372
+ type TrimRoutePathWhitespace<Path extends string> = Path extends `${' ' | '\n' | '\t' | '\r'}${infer Rest}` ? TrimRoutePathWhitespace<Rest> : Path extends `${infer Rest}${' ' | '\n' | '\t' | '\r'}` ? TrimRoutePathWhitespace<Rest> : Path;
373
+ type ExtractRouteSegmentParam<Segment extends string> = Segment extends `{${infer Param}}` ? TrimRoutePathWhitespace<Param> extends `*${infer SplatParam}` ? TrimRoutePathWhitespace<SplatParam> extends '' ? never : TrimRoutePathWhitespace<SplatParam> extends '*' ? never : TrimRoutePathWhitespace<SplatParam> : TrimRoutePathWhitespace<Param> extends '' ? never : TrimRoutePathWhitespace<Param> : Segment extends '*' ? '*' : never;
374
+ type ExtractRoutePathParamNames<Path extends string> = TrimRoutePathSlashes<StripRoutePathSuffix<Path>> extends `${infer Segment}/${infer Rest}` ? ExtractRouteSegmentParam<Segment> | ExtractRoutePathParamNames<Rest> : ExtractRouteSegmentParam<TrimRoutePathSlashes<StripRoutePathSuffix<Path>>>;
375
+ /** Statically infers the param record shape from a route path string literal, e.g. `/posts/{id}`. */
376
+ type RoutePathParams<Path extends string> = [ExtractRoutePathParamNames<Path>] extends [never] ? Record<never, string> : { [Key in ExtractRoutePathParamNames<Path>]: string; };
377
+ /**
378
+ * A route page component: a regular component that receives route params as
379
+ * props derived from the URL pattern.
380
+ *
381
+ * Components may accept no params at all — zero-argument components are still
382
+ * assignable.
383
+ */
384
+ type RouteComponent<TParams extends RouteParams = RouteParams> = (props: TParams) => RenderableChild;
385
+ /** The rendering mode a route is currently being evaluated under. */
386
+ type RouteMode = 'spa' | 'ssr' | 'ssg';
387
+ type AccessRedirectStatus = 301 | 302 | 303 | 307 | 308;
388
+ type AccessDenyStatus = 401 | 403 | 404;
389
+ interface AccessAllowDecision {
390
+ kind: 'allow';
391
+ }
392
+ /** Policy decision produced by {@link redirect}: sends the visitor to another URL. */
393
+ interface AccessRedirectDecision {
394
+ kind: 'redirect';
395
+ to: string;
396
+ status?: AccessRedirectStatus;
397
+ replace?: boolean;
398
+ }
399
+ /** Policy decision produced by {@link deny}/{@link unauthorized}/{@link forbidden}/{@link notFound}. */
400
+ interface AccessDenyDecision {
401
+ kind: 'deny';
402
+ status: AccessDenyStatus;
403
+ }
404
+ /** Outcome of a {@link RoutePolicy} evaluation: allow, redirect, or deny. */
405
+ type AccessDecision = AccessAllowDecision | AccessRedirectDecision | AccessDenyDecision;
406
+ /** Context passed to route policies, auth resolvers, and loaders. */
407
+ interface RouteContext<TParams extends RouteParams = RouteParams> {
408
+ mode: RouteMode;
409
+ params: TParams;
410
+ pathname: string;
411
+ search: string;
412
+ hash: string;
413
+ href: string;
414
+ auth: AuthContext;
415
+ signal: AbortSignal;
416
+ }
417
+ /** A route access-control check, evaluated against {@link RouteContext} to produce an {@link AccessDecision}. */
418
+ type RoutePolicy = (context: RouteContext) => AccessDecision | PromiseLike<AccessDecision>;
419
+ /** Resolves the {@link AuthContext} for a route request. */
420
+ type RouteAuthResolver = (context: Omit<RouteContext, 'auth'>) => AuthContext | PromiseLike<AuthContext>;
421
+ /** Auth configuration shared across a route registry or a single route. */
422
+ interface RouteAuthOptions {
423
+ resolve: RouteAuthResolver;
424
+ loginPath?: string | ((context: RouteContext) => string | PromiseLike<string>);
425
+ authenticatedRedirectTo?: string | ((context: RouteContext) => string | PromiseLike<string>);
426
+ }
427
+ interface CommonAccessOptions {
428
+ auth?: AuthRequirement;
429
+ policies?: readonly RoutePolicy[];
430
+ }
431
+ /** A route's metadata, or a function computing it from the resolved context. */
432
+ type RouteMetaSource<TParams extends RouteParams = RouteParams> = RouteMeta | ((context: RouteContext<TParams>) => RouteMeta | PromiseLike<RouteMeta>);
433
+ /**
434
+ * Options for `route()` declarations.
435
+ *
436
+ * - `loader`: server data loader called before render, result passed as SSR data
437
+ * - `entries`: SSG entry generator — returns one param map per static page
438
+ * - `title`: page title hint used by SSG and document-meta integrations
439
+ * - `namespace`: MFE namespace key for grouped route management
440
+ */
441
+ interface RouteOptions<TParams extends RouteParams = RouteParams, TSearchSchema extends ObjectSchema<RouteSearch> | undefined = ObjectSchema<RouteSearch> | undefined, TLoaderData = unknown, TDehydratedData = TLoaderData> extends CommonAccessOptions {
442
+ loader?: (context: RouteContext<TParams> & {
443
+ request?: Request;
444
+ }) => TLoaderData | PromiseLike<TLoaderData>;
445
+ /**
446
+ * Select the loader data transported to the browser for initial hydration.
447
+ *
448
+ * Server rendering still receives the complete loader value. The selector
449
+ * must be synchronous; client navigations rerun the loader and receive its
450
+ * complete result.
451
+ */
452
+ dehydrate?: (data: TLoaderData, context: RouteContext<TParams> & {
453
+ request?: Request;
454
+ }) => TDehydratedData extends PromiseLike<unknown> ? never : TDehydratedData;
455
+ preload?: (context: RouteContext<TParams> & {
456
+ request?: Request;
457
+ data: QueryPrefetchContext;
458
+ }) => unknown;
459
+ entries?: () => Array<TParams> | Promise<Array<TParams>>;
460
+ /** Optional invalidation keys used by incremental SSG generation. */
461
+ invalidationKeys?: readonly string[];
462
+ title?: string;
463
+ namespace?: string;
464
+ search?: TSearchSchema;
465
+ meta?: RouteMetaSource<TParams>;
466
+ actions?: readonly ActionDescriptor[];
467
+ }
468
+ interface RouteMeta {
469
+ title?: string;
470
+ description?: string;
471
+ canonical?: string;
472
+ robots?: string;
473
+ openGraph?: Record<string, string>;
474
+ links?: readonly {
475
+ rel: string;
476
+ href: string;
477
+ [key: string]: string;
478
+ }[];
479
+ jsonLd?: unknown | readonly unknown[];
480
+ html?: {
481
+ lang?: string;
482
+ dir?: 'ltr' | 'rtl' | 'auto';
483
+ };
484
+ }
485
+ /** A stable, typed reference returned by route() for destination construction. */
486
+ type RouteSearchValue = string | number | boolean | null | undefined | readonly (string | number | boolean | null)[];
487
+ /** A route's query-string parameters, keyed by name. */
488
+ type RouteSearch = Record<string, RouteSearchValue>;
489
+ /** Stable, typed reference to a route returned by `route()`, used to build destinations. */
490
+ interface RouteRef<TParams extends RouteParams = RouteParams, TSearch = RouteSearch> {
491
+ readonly path: string;
492
+ /** @internal Executable schema retained for destination validation. */
493
+ readonly searchSchema?: ObjectSchema<TSearch & RouteSearch>;
494
+ /** @internal Public mount point captured by createRouteRegistry(). */
495
+ readonly basePath?: string;
496
+ readonly __params?: TParams;
497
+ readonly __search?: TSearch;
498
+ }
499
+ type RouteRefSearch<TSchema extends ObjectSchema<RouteSearch> | undefined> = TSchema extends ObjectSchema<RouteSearch> ? InferSchema<TSchema> : RouteSearch;
500
+ /** A resolved navigation target with a computed `href`, produced by {@link to}. */
501
+ interface RouteDestination {
502
+ readonly href: string;
503
+ }
504
+ /** Options accepted by the `page()` route-declaration helper. */
505
+ interface PageHelperOptions extends CommonAccessOptions {
506
+ preload?: (context: RouteContext & {
507
+ request?: Request;
508
+ data: QueryPrefetchContext;
509
+ }) => unknown;
510
+ meta?: RouteMetaSource;
511
+ }
512
+ /**
513
+ * A single parsed segment from a route path.
514
+ *
515
+ * - `static`: a literal path segment, e.g. `"users"` in `/users/{id}`
516
+ * - `param`: a `{name}` capture group — `value` holds the param name
517
+ * - `wildcard`: a bare `*` segment that captures exactly one segment
518
+ * - `splat`: a `{*name}` capture group that captures the remaining path
519
+ * - `catchall`: the `/*` catch-all that matches any depth
520
+ */
521
+ interface ParsedSegment {
522
+ kind: 'static' | 'param' | 'wildcard' | 'splat' | 'catchall';
523
+ /** For static/wildcard/catchall: the literal text; for param: the param name. */
524
+ value: string;
525
+ }
526
+ /** Resolved layout component as stored in a route record's layout chain. */
527
+ interface LayoutScopeRecord {
528
+ component: (props: {
529
+ children?: RenderableChild;
530
+ }) => RenderableChild;
531
+ }
532
+ /** Resolved page host component as stored in a route record's page chain. */
533
+ interface PageScopeRecord {
534
+ component: RouteComponent;
535
+ }
536
+ /** Options for {@link createRouteRegistry}. */
537
+ interface RouteRegistryOptions {
538
+ auth?: RouteAuthOptions;
539
+ /** Public pathname prefix for applications mounted below the origin root. */
540
+ basePath?: string;
541
+ }
542
+ /** A callback that declares routes via `route()`/`page()`/`group()`, passed to {@link createRouteRegistry}. */
543
+ type RouteDefinition = () => void;
544
+ /** Options for resolving a route request (used internally by `createSPA`/`hydrateSPA`/SSR). */
545
+ interface RouteRequestOptions {
546
+ /** Explicit route source shared by the application renderers. */
547
+ registry: RouteRegistry;
548
+ mode?: RouteMode;
549
+ /** @internal Hydration adopts server loader data instead of rerunning it. */
550
+ load?: boolean;
551
+ auth?: RouteAuthOptions;
552
+ authContext?: AuthContext;
553
+ signal?: AbortSignal;
554
+ request?: Request;
555
+ telemetry?: CoreTelemetry;
556
+ }
557
+ /** A resolved route request that should render `handler` with `params`. */
558
+ interface RouteRenderResult<TParams extends RouteParams = RouteParams> {
559
+ kind: 'render';
560
+ handler: RouteHandler<TParams>;
561
+ params: TParams;
562
+ record?: RouteRecord;
563
+ }
564
+ /** Outcome of resolving a route request: render, redirect, deny, or no match. */
565
+ type RouteRequestResult<TParams extends RouteParams = RouteParams> = RouteRenderResult<TParams> | AccessRedirectDecision | AccessDenyDecision | null;
566
+ /** Options accepted by the `group()` route-declaration helper. */
567
+ interface GroupHelperOptions extends CommonAccessOptions {
568
+ layout?: (props: {
569
+ children?: RenderableChild;
570
+ }) => RenderableChild;
571
+ meta?: RouteMetaSource;
572
+ }
573
+ /**
574
+ * A fully normalized route record produced by `route(path, Component, options?)`.
575
+ *
576
+ * This is the canonical representation shared by:
577
+ * - SPA matching and navigation
578
+ * - SSR request resolution
579
+ * - SSG manifest expansion
580
+ */
581
+ interface RouteRecord {
582
+ /** Canonical normalized absolute path, e.g. `/posts/{slug}` */
583
+ path: string;
584
+ /** The page component to render when this route is active */
585
+ component: RouteComponent;
586
+ /** Pre-parsed segment list for fast matching and typed param extraction */
587
+ segments: ParsedSegment[];
588
+ /** Pre-computed specificity rank (higher = more specific) */
589
+ rank: number;
590
+ /** Layout chain from outermost to innermost, applied automatically on render */
591
+ layoutChain: LayoutScopeRecord[];
592
+ /** Page chain from outermost to innermost, composed through Outlet before layouts apply */
593
+ pageChain: PageScopeRecord[];
594
+ /** Route metadata: loader, entries, policies, title, namespace */
595
+ options: RouteOptions;
596
+ /** Metadata sources ordered from outermost group/page to the route leaf. */
597
+ metaChain?: readonly RouteMetaSource[];
598
+ /** True when this is the `/*` catch-all fallback route */
599
+ isFallback: boolean;
600
+ /**
601
+ * Runtime-ready handler with layout composition baked in.
602
+ * Compatible with the low-level `RouteHandler` signature so that navigation
603
+ * and SSR rendering do not need to know about layout chains.
604
+ */
605
+ handler: RouteHandler;
606
+ }
607
+ /**
608
+ * The normalized route manifest produced by registered route definitions.
609
+ * declarations. Pass it to `createSPA`, `hydrateSPA`, or `renderToString`
610
+ * instead of assembling plain `Route[]` arrays.
611
+ *
612
+ * ```ts
613
+ * import { createRouteRegistry } from '@askrjs/askr/router';
614
+ * const registry = createRouteRegistry(() => { ... });
615
+ * await createSPA({ root: '#app', registry });
616
+ * ```
617
+ */
618
+ interface RouteManifest {
619
+ records: RouteRecord[];
620
+ auth?: RouteAuthOptions;
621
+ /** Normalized public pathname prefix. Empty and root mounts omit it. */
622
+ basePath?: string;
623
+ }
624
+ declare const routeRegistryBrand: unique symbol;
625
+ /** A function rendering a matched route's page content, with layouts already composed. */
626
+ interface RouteHandler<TParams extends RouteParams = RouteParams> {
627
+ (params: TParams, context?: {
628
+ signal: AbortSignal;
629
+ }): RenderableChild;
630
+ }
631
+ /** A single path-to-handler binding as seen by low-level navigation code. */
632
+ interface Route<TParams extends RouteParams = RouteParams> {
633
+ path: string;
634
+ handler: RouteHandler<TParams>;
635
+ namespace?: string;
636
+ }
637
+ /** Opaque handle produced by {@link createRouteRegistry}, required by `createSPA`/`hydrateSPA`. */
638
+ interface RouteRegistry {
639
+ /** Internal brand: registries must come from createRouteRegistry(). */
640
+ readonly [routeRegistryBrand]: true;
641
+ manifest: RouteManifest;
642
+ routes: readonly Route[];
643
+ }
644
+ /** A single matched route, as reported by {@link currentRoute} and activity predicates. */
645
+ interface RouteMatch<TParams extends RouteParams = RouteParams> {
646
+ path: string;
647
+ params: Readonly<TParams>;
648
+ name?: string;
649
+ namespace?: string;
650
+ }
651
+ /** Read-only accessor for the current route's query-string parameters. */
652
+ interface RouteQuery {
653
+ get(key: string): string | null;
654
+ getAll(key: string): string[];
655
+ has(key: string): boolean;
656
+ toJSON(): Record<string, string | string[]>;
657
+ }
658
+ /** Full description of the currently active route, returned by {@link currentRoute}. */
659
+ interface RouteSnapshot<TParams extends RouteParams = RouteParams> {
660
+ path: string;
661
+ params: Readonly<TParams>;
662
+ query: Readonly<RouteQuery>;
663
+ hash: string | null;
664
+ name?: string;
665
+ namespace?: string;
666
+ matches: readonly RouteMatch<TParams>[];
667
+ }
668
+ //#endregion
669
+ //#region src/common/app-render-runtime.d.ts
670
+ interface AppRenderRuntime {
671
+ framework: Readonly<Record<string, unknown>>;
672
+ route: unknown;
673
+ hasRoute: boolean;
674
+ dataRuntime?: DataRuntime;
675
+ routeRegistry?: RouteRegistry;
676
+ routeAuth?: RouteAuthOptions;
677
+ }
678
+ //#endregion
679
+ //#region src/runtime/component-internal.d.ts
680
+ interface ComponentInstance {
681
+ id: string;
682
+ fn: ComponentFunction;
683
+ props: Props;
684
+ target: Element | null;
685
+ parentInstance: ComponentInstance | null;
686
+ portalScope: object | null;
687
+ mounted: boolean;
688
+ abortController: AbortController | null;
689
+ ssr?: boolean;
690
+ cleanupStrict?: boolean;
691
+ /** @internal Private resource-ownership identity for the active mount. */
692
+ _ownershipGeneration: object;
693
+ stateValues?: State<unknown>[];
694
+ evaluationGeneration: number;
695
+ notifyUpdate: (() => void) | null;
696
+ _pendingFlushTask?: () => void;
697
+ _pendingRunTask?: () => void;
698
+ _enqueueRun?: () => void;
699
+ stateIndexCheck: number;
700
+ expectedStateIndices?: number[];
701
+ firstRenderComplete: boolean;
702
+ mountOperations?: Array<() => void | (() => void) | PromiseLike<void | (() => void)>>;
703
+ commitOperations?: Array<() => void | (() => void) | PromiseLike<void | (() => void)>>;
704
+ cleanupFns?: Array<() => void>;
705
+ lifecycleSlots?: unknown[];
706
+ lifecycleGeneration: number;
707
+ hasPendingUpdate: boolean;
708
+ ownerFrame: ContextFrame | null;
709
+ isRoot?: boolean;
710
+ _rootComponentFn?: ComponentFunction;
711
+ /** @internal Browser-owned hydration and route state for this app root. */
712
+ _appRenderRuntime?: AppRenderRuntime;
713
+ /** @internal CSP nonce retained across browser route navigation. */
714
+ _cspNonce?: string;
715
+ _vnodeOwner?: object;
716
+ _vnodeParent?: ComponentInstance | null;
717
+ _vnodeParentGeneration?: object;
718
+ _vnodeKey?: string | number;
719
+ _vnodePosition?: number;
720
+ _wrapperDepth?: number;
721
+ _currentRenderToken?: number;
722
+ lastRenderToken?: number;
723
+ _pendingReadSources?: Set<ReadableSource<unknown>>;
724
+ _pendingReadSourceVersions?: Map<ReadableSource<unknown>, number>;
725
+ _lastReadSources?: Set<ReadableSource<unknown>>;
726
+ devWarningsEmitted?: Set<string>;
727
+ _placeholder?: Comment;
728
+ _ownedChildScopes?: Set<OwnedChildScope>;
729
+ errorBoundaryState?: {
730
+ error: unknown | null;
731
+ resetKey: unknown;
732
+ notified: boolean;
733
+ };
734
+ }
735
+ //#endregion
736
+ //#region src/runtime/component-scope.d.ts
737
+ /**
738
+ * Get the abort signal for the current component.
739
+ *
740
+ * The signal is guaranteed to be aborted when:
741
+ * - Component unmounts
742
+ * - Navigation occurs (different route)
743
+ * - Parent is destroyed
744
+ */
745
+ declare function getSignal(): AbortSignal;
746
+ //#endregion
747
+ //#region src/runtime/readable.d.ts
748
+ interface DerivedSubscriber {
749
+ _markDirty(): void;
750
+ _pendingDependencySources?: Set<ReadableSource<unknown>>;
751
+ }
752
+ interface ReadableSource<T = unknown> {
753
+ (): T;
754
+ _hasBeenRead?: boolean;
755
+ _hasEverBeenRead?: boolean;
756
+ _readers?: Map<ComponentInstance, {
757
+ token: number;
758
+ generation: object;
759
+ }>;
760
+ _derivedSubscribers?: Set<DerivedSubscriber>;
761
+ _version?: number;
762
+ }
763
+ //#endregion
764
+ //#region src/runtime/scheduler.d.ts
765
+ /**
766
+ * Serialized update scheduler — safer design (no inline execution, explicit flush)
767
+ *
768
+ * Key ideas:
769
+ * - Never execute a task inline from `enqueue`.
770
+ * - `flush()` is explicit and non-reentrant.
771
+ * - `runWithSyncProgress()` allows enqueues temporarily but does not run tasks
772
+ * inline; it runs `fn` and then does an explicit `flush()`.
773
+ * - `waitForFlush()` is race-free with a monotonic `flushVersion`.
774
+ */
775
+ type Task = () => void;
776
+ type SchedulerLane = 'derived' | 'component' | 'reactive' | 'post';
777
+ type SchedulerBulkCommitProbe = () => boolean;
778
+ declare class Scheduler {
779
+ private bulkCommitProbe;
780
+ private lanes;
781
+ private running;
782
+ private inHandler;
783
+ private depth;
784
+ private executionDepth;
785
+ private flushVersion;
786
+ private kickScheduled;
787
+ private allowSyncProgress;
788
+ private waiters;
789
+ private taskCount;
790
+ setBulkCommitProbe(probe: SchedulerBulkCommitProbe): void;
791
+ private isBulkCommitActive;
792
+ private hasPendingTasks;
793
+ private getPendingTaskCount;
794
+ private compactLane;
795
+ private scheduleFlushKick;
796
+ enqueue(task: Task): void;
797
+ enqueueInLane(lane: SchedulerLane, task: Task): void;
798
+ flush(): void;
799
+ runWithSyncProgress<T>(fn: () => T): T;
800
+ waitForFlush(targetVersion?: number, timeoutMs?: number): Promise<void>;
801
+ getState(): {
802
+ queueLength: number;
803
+ running: boolean;
804
+ depth: number;
805
+ executionDepth: number;
806
+ taskCount: number;
807
+ flushVersion: number;
808
+ laneQueues: {
809
+ derived: number;
810
+ component: number;
811
+ reactive: number;
812
+ post: number;
813
+ };
814
+ inHandler: boolean;
815
+ allowSyncProgress: boolean;
816
+ };
817
+ getFlushVersion(): number;
818
+ flushIfQueued(): void;
819
+ runInHandlerScope<T>(fn: () => T, flushMode?: 'defer' | 'sync'): T;
820
+ setInHandler(v: boolean): void;
821
+ isInHandler(): boolean;
822
+ isExecuting(): boolean;
823
+ clearPendingSyncTasks(): number;
824
+ private resolveWaiters;
825
+ }
826
+ declare function scheduleEventHandler(handler: EventListener): EventListener;
827
+ //#endregion
828
+ //#region src/common/dom-range.d.ts
829
+ /**
830
+ * Internal DOM range shape shared by runtime ownership records and the
831
+ * renderer. A singleton range uses the node itself for both anchors; a
832
+ * multi-node or empty range uses deterministic comment anchors.
833
+ */
834
+ interface DOMRange {
835
+ start: Node;
836
+ end: Node;
837
+ single: boolean;
838
+ }
839
+ //#endregion
840
+ //#region src/runtime/child-scope.d.ts
841
+ interface ChildScope {
842
+ key: string | number;
843
+ componentInstance: ComponentInstance;
844
+ previousVnode: VNode | undefined;
845
+ vnode: VNode | undefined;
846
+ dom?: Node;
847
+ /** @internal Fast singleton node plus an anchor-backed multi-node range. */
848
+ range?: DOMRange;
849
+ needsDomUpdate: boolean;
850
+ hydrationPending: boolean;
851
+ /** @internal Stable owner for validated intrinsic blueprints in list items. */
852
+ blueprintOwner?: object;
853
+ render(renderFn: () => VNode): VNode;
854
+ markDirty(): void;
855
+ dispose(): void;
856
+ }
857
+ interface ChildScopeOwnership {
858
+ add(scope: ChildScope): void;
859
+ delete(scope: ChildScope): void;
860
+ bulkDispose(run: () => void): void;
861
+ }
862
+ /** @internal Snapshot used to restore a child scope after a failed commit. */
863
+ interface ChildScopeTransactionSnapshot {
864
+ previousVnode: VNode | undefined;
865
+ vnode: VNode | undefined;
866
+ dom: Node | undefined;
867
+ range: DOMRange | undefined;
868
+ domTextData: string | undefined;
869
+ needsDomUpdate: boolean;
870
+ hydrationPending: boolean;
871
+ renderFn: (() => VNode) | undefined;
872
+ renderedOwnerFrame: ContextFrame | null;
873
+ }
874
+ //#endregion
875
+ //#region src/runtime/runtime.d.ts
876
+ /** Diagnostic breakdown of a keyed-list reorder decision, returned by {@link RuntimeRendererHost.isKeyedReorderFastPathEligible}. */
877
+ interface RuntimeKeyedReorderDecision {
878
+ useFastPath: boolean;
879
+ totalKeyed: number;
880
+ totalChildren: number;
881
+ currentKeyCount: number;
882
+ moveCount: number;
883
+ lisLen: number;
884
+ hasPropChanges: boolean;
885
+ isWholeKeyedList: boolean;
886
+ }
887
+ /** The renderer implementation an {@link AskrRuntime} delegates DOM evaluation and cleanup to. */
888
+ interface RuntimeRendererHost {
889
+ evaluate(node: unknown, target: Element | null, context?: object, retainedOwner?: ComponentInstance): void;
890
+ cleanupInstancesUnder(node: Node): void;
891
+ replaceComponentRange(instance: ComponentInstance, result: unknown, host: Element | Comment): Node | null;
892
+ resolveChildScopeRange?(scope: ChildScope): DOMRange | null;
893
+ teardownNodeSubtree(root: Node): void;
894
+ populateKeyMapForElement(parent: Element): void;
895
+ getKeyMapForElement(parent: Element): Map<string | number, Element> | undefined;
896
+ isKeyedReorderFastPathEligible(parent: Element, children: unknown[], oldKeyMap: Map<string | number, Element> | undefined): RuntimeKeyedReorderDecision;
897
+ markReactivePropsDirtySource(source: ReadableSource<unknown>): void;
898
+ }
899
+ /** Options for {@link createRuntime}. */
900
+ interface AskrRuntimeOptions {
901
+ scheduler?: Scheduler;
902
+ renderer?: RuntimeRendererHost;
903
+ }
904
+ /** A scheduler + renderer host pairing; owns scheduling and renderer wiring for an app instance. */
905
+ declare class AskrRuntime {
906
+ readonly scheduler: Scheduler;
907
+ private rendererHost;
908
+ constructor(options?: AskrRuntimeOptions);
909
+ get renderer(): RuntimeRendererHost;
910
+ configureRenderer(renderer: RuntimeRendererHost): void;
911
+ }
912
+ /** Create a new {@link AskrRuntime} instance with its own scheduler/renderer wiring. */
913
+ declare function createRuntime(options?: AskrRuntimeOptions): AskrRuntime;
914
+ /** Get the process-wide default {@link AskrRuntime}. */
915
+ declare function getDefaultRuntime(): AskrRuntime;
916
+ //#endregion
917
+ //#region src/runtime/for-signals.d.ts
918
+ type ForItemSignal<T> = ReadableSource<T> & (() => T) & {
919
+ peek(): T;
920
+ set(newValue: T, notifyReaders?: boolean): void;
921
+ };
922
+ type ForItemPropertySignal = ReadableSource<unknown> & (() => unknown) & {
923
+ peek(): unknown;
924
+ set(newValue: unknown, notifyReaders?: boolean): void;
925
+ };
926
+ type ForIndexSignal = ReadableSource<number> & (() => number) & {
927
+ peek(): number;
928
+ set(newValue: number | ((prev: number) => number), notifyReaders?: boolean): void;
929
+ };
930
+ interface ReactiveForItemState<T> {
931
+ currentItem: T;
932
+ itemSignal: ForItemSignal<T> | null;
933
+ propertySignals: Map<PropertyKey, ForItemPropertySignal> | null;
934
+ coalescedProperties: PropertyKey | PropertyKey[] | null;
935
+ coalescedProperty2: PropertyKey | null;
936
+ wholeItemRead: boolean;
937
+ proxy: T;
938
+ }
939
+ //#endregion
940
+ //#region src/runtime/for-scopes.d.ts
941
+ interface ForItemInstance<T> {
942
+ key: string | number;
943
+ item: T;
944
+ reactiveItem: T;
945
+ reactiveItemState: ReactiveForItemState<T> | null;
946
+ indexSignal: ForIndexSignal;
947
+ scope: ChildScope;
948
+ }
949
+ //#endregion
950
+ //#region src/runtime/effect.d.ts
951
+ interface FineGrainedEffectHandle<T> {
952
+ cleanup(): void;
953
+ updateCompute(nextCompute: () => T): void;
954
+ flush(): void;
955
+ }
956
+ //#endregion
957
+ //#region src/runtime/for-types.d.ts
958
+ type ForEachSource<T> = readonly T[] | (() => readonly T[]);
959
+ type ForKeySelector<T> = (item: T, index: number) => string | number;
960
+ type ForRenderItem<T> = (item: T, index: () => number) => VNode;
961
+ //#endregion
962
+ //#region src/runtime/for-internal.d.ts
963
+ type ForCommitStrategy = 'APPEND' | 'INSERT_ONE' | 'REMOVE_ONE' | 'TRUNCATE' | 'NO_REORDER' | 'SWAP' | 'FULL_KEYED';
964
+ interface ForState<T> {
965
+ kind: 'for';
966
+ _contextFrame: ContextFrame | null;
967
+ _contextFrameChanged: boolean;
968
+ currentItems: readonly T[];
969
+ _committedItems: readonly T[];
970
+ eachSource: ForEachSource<T>;
971
+ fallback: VNode | null;
972
+ fallbackScope: ChildScope | null;
973
+ items: Map<string | number, ForItemInstance<T>>;
974
+ orderedKeys: Array<string | number>;
975
+ orderedItems: ForItemInstance<T>[];
976
+ orderedVNodes: VNode[];
977
+ byFn: ForKeySelector<T>;
978
+ renderFn: ForRenderItem<T>;
979
+ parentInstance: ComponentInstance | null;
980
+ lastCommitStrategy: ForCommitStrategy;
981
+ lastRemovedNodes: Node[];
982
+ lastRemovedRanges: DOMRange[];
983
+ pendingDirtyIndices: number[] | null;
984
+ pendingSwapIndices: [number, number] | null;
985
+ pendingMoveOnly: boolean;
986
+ pendingInsertedIndex: number | null;
987
+ pendingRemovedKey: string | number | null;
988
+ pendingAppendStart: number | null;
989
+ _hasResolvedItemDom: boolean;
990
+ _needsSourceReconcile: boolean;
991
+ _sourceEffect: FineGrainedEffectHandle<readonly T[]> | null;
992
+ _suspendSourceCommit: boolean;
993
+ _enqueueBoundaryCommit?: (() => void) | null;
994
+ _hasPendingBoundaryCommit?: boolean;
995
+ devKeyKinds?: Map<string | number, 'number' | 'string'>;
996
+ _transaction?: ForTransaction<T> | null;
997
+ _scopeOwnership: ChildScopeOwnership;
998
+ }
999
+ interface ForItemTransactionSnapshot<T> {
1000
+ item: T;
1001
+ itemSignalExists: boolean;
1002
+ itemSignalValue: T | undefined;
1003
+ itemSignalHasBeenRead: boolean;
1004
+ indexValue: number;
1005
+ indexHasBeenRead: boolean;
1006
+ propertySignalStore: Map<PropertyKey, ForItemPropertySignal> | null;
1007
+ propertySignals: Map<PropertyKey, {
1008
+ signal: ForItemPropertySignal;
1009
+ value: unknown;
1010
+ hasBeenRead: boolean;
1011
+ }> | null;
1012
+ scope: ChildScopeTransactionSnapshot;
1013
+ }
1014
+ interface ForTransaction<T> {
1015
+ collectionSnapshotMode: 'copy' | 'reset-empty' | 'preserve-clear' | 'reuse';
1016
+ currentItems: readonly T[];
1017
+ items: Map<string | number, ForItemInstance<T>>;
1018
+ orderedKeys: Array<string | number>;
1019
+ orderedItems: ForItemInstance<T>[];
1020
+ orderedVNodes: VNode[];
1021
+ fallbackScope: ChildScope | null;
1022
+ lastCommitStrategy: ForCommitStrategy;
1023
+ lastRemovedNodes: Node[];
1024
+ lastRemovedRanges: DOMRange[];
1025
+ pendingDirtyIndices: number[] | null;
1026
+ pendingSwapIndices: [number, number] | null;
1027
+ pendingMoveOnly: boolean;
1028
+ pendingInsertedIndex: number | null;
1029
+ pendingRemovedKey: string | number | null;
1030
+ pendingAppendStart: number | null;
1031
+ hasResolvedItemDom: boolean;
1032
+ needsSourceReconcile: boolean;
1033
+ devKeyKinds?: Map<string | number, 'number' | 'string'>;
1034
+ itemSnapshots: Map<ForItemInstance<T>, ForItemTransactionSnapshot<T>> | null;
1035
+ unreadIndexSnapshots: Map<ForIndexSignal, number> | null;
1036
+ fallbackScopeSnapshot: ChildScopeTransactionSnapshot | null;
1037
+ removedScopes: ChildScope[] | null;
1038
+ removedScopeNodes: Node[] | null;
1039
+ removeAllItems: boolean;
1040
+ signalEffects: Map<ReadableSource<unknown>, {
1041
+ parentInstance: ComponentInstance | null;
1042
+ notify: boolean;
1043
+ skipInstance: ComponentInstance | null;
1044
+ skipOwnedBy: ComponentInstance | null;
1045
+ }> | null;
1046
+ shouldClearDomUpdateState: boolean;
1047
+ }
1048
+ //#endregion
1049
+ //#region src/runtime/control.d.ts
1050
+ interface MatchBranch {
1051
+ key: string | number;
1052
+ render: () => VNode;
1053
+ when: unknown;
1054
+ }
1055
+ interface BranchControlStateBase {
1056
+ _contextFrame: ContextFrame | null;
1057
+ activeKey: string | number | null;
1058
+ activeScope: ChildScope | null;
1059
+ activeVNodes: VNode[];
1060
+ lastRemovedNodes: Node[];
1061
+ lastRemovedRanges: DOMRange[];
1062
+ parentInstance: ComponentInstance | null;
1063
+ _enqueueBoundaryCommit?: (() => void) | null;
1064
+ _hasPendingBoundaryCommit?: boolean;
1065
+ _transaction?: ControlTransaction | null;
1066
+ }
1067
+ interface ShowState extends BranchControlStateBase {
1068
+ kind: 'show';
1069
+ fallbackScope: ChildScope | null;
1070
+ renderFallback: (() => VNode) | null;
1071
+ renderTruthy: ((value: unknown) => VNode) | (() => VNode);
1072
+ selectedValue: unknown;
1073
+ truthyScope: ChildScope | null;
1074
+ }
1075
+ interface CaseState extends BranchControlStateBase {
1076
+ kind: 'case';
1077
+ fallback: (() => VNode) | null;
1078
+ matches: MatchBranch[];
1079
+ }
1080
+ type ControlBoundaryState = ForState<unknown> | ShowState | CaseState;
1081
+ type BranchStateSnapshot = {
1082
+ activeKey: string | number | null;
1083
+ activeScope: ChildScope | null;
1084
+ activeVNodes: VNode[];
1085
+ lastRemovedNodes: Node[];
1086
+ lastRemovedRanges: DOMRange[];
1087
+ scopeSnapshots: Map<ChildScope, ChildScopeTransactionSnapshot>;
1088
+ fallbackScope?: ChildScope | null;
1089
+ truthyScope?: ChildScope | null;
1090
+ };
1091
+ interface ControlTransaction {
1092
+ state: ShowState | CaseState;
1093
+ snapshot: BranchStateSnapshot;
1094
+ removedScopes: ChildScope[];
1095
+ shouldClearDomUpdateState: boolean;
1096
+ registered: boolean;
1097
+ }
1098
+ //#endregion
1099
+ //#region src/runtime/snapshot-source.d.ts
1100
+ declare const SNAPSHOT_SOURCE_BRAND: unique symbol;
1101
+ type SnapshotSourceBrand = {
1102
+ readonly [SNAPSHOT_SOURCE_BRAND]: true;
1103
+ };
1104
+ //#endregion
1105
+ //#region src/runtime/derive.d.ts
1106
+ /** A reactive derived value produced by {@link derive}; call it to read the current result. */
1107
+ interface Derived<T> extends ReadableSource<T> {
1108
+ (): T;
1109
+ }
1110
+ type SnapshotSource<T> = {
1111
+ value: T | null;
1112
+ pending?: boolean;
1113
+ error?: Error | null;
1114
+ } & SnapshotSourceBrand;
1115
+ /** Creates a render-scoped derived value; must be called during component render. */
1116
+ declare function derive<TOut>(fn: () => TOut): Derived<TOut>;
1117
+ declare function derive<TIn, TOut>(source: SnapshotSource<TIn> | TIn | (() => TIn), map: (value: TIn) => TOut): Derived<TOut | null>;
1118
+ //#endregion
1119
+ //#region src/runtime/render-diagnostics.d.ts
1120
+ interface RenderDiagnosticsOptions {
1121
+ /** Emit one warning per component instance when a render exceeds the threshold. */
1122
+ slowRenderWarnings?: boolean;
1123
+ /** Slow-render threshold in milliseconds. The default is 5. */
1124
+ slowRenderThresholdMs?: number;
1125
+ }
1126
+ /**
1127
+ * Configure development render diagnostics and return a function that restores
1128
+ * the previous configuration. Component counters and timing remain enabled
1129
+ * when warning output is disabled.
1130
+ */
1131
+ declare function configureRenderDiagnostics(options: RenderDiagnosticsOptions): () => void;
1132
+ //#endregion
1133
+ //#region src/runtime/selector.d.ts
1134
+ /** A fine-grained reactive membership check produced by {@link selector}. */
1135
+ interface Selector<T> {
1136
+ (candidate: T): boolean;
1137
+ }
1138
+ type SelectorEquals<T> = {
1139
+ bivarianceHack(a: T, b: T): boolean;
1140
+ }['bivarianceHack'];
1141
+ /**
1142
+ * Creates a render-scoped predicate for keyed membership in reactive list rows.
1143
+ *
1144
+ * Use this when a `<For>` child needs to compare each stable item with a
1145
+ * changing selected value. Unlike a plain closure capture, the predicate
1146
+ * subscribes the affected rows and updates them without rebuilding the list.
1147
+ * Must be called during component render.
1148
+ */
1149
+ declare function selector<T>(source: () => T, equals?: SelectorEquals<T>): Selector<T>;
1150
+ //#endregion
1151
+ //#region src/control/shared.d.ts
1152
+ type BoundaryChild = RenderableChild;
1153
+ //#endregion
1154
+ //#region src/control/for.d.ts
1155
+ type ForBaseProps<T> = {
1156
+ each: ForEachSource<T>;
1157
+ fallback?: BoundaryChild;
1158
+ /**
1159
+ * Row renderer. Parent reactive reads must use `selector()` or thunk props;
1160
+ * closure-captured values are snapshotted when the row is created or
1161
+ * reconciled; changing the parent source does not rerun an existing row.
1162
+ */
1163
+ children: (item: T, index: () => number) => VNode;
1164
+ };
1165
+ type KeyedForProps<T, K extends string | number> = ForBaseProps<T> & {
1166
+ by: (item: T, index: number) => K;
1167
+ byIndex?: never;
1168
+ };
1169
+ type IndexedForProps<T> = ForBaseProps<T> & {
1170
+ by?: never;
1171
+ byIndex: true;
1172
+ };
1173
+ /** Props for {@link For}. */
1174
+ type ForProps<T, K extends string | number = string | number> = KeyedForProps<T, K> | IndexedForProps<T>;
1175
+ /** Render a keyed or indexed list, reconciling items by key instead of position. */
1176
+ declare const For: <T, K extends string | number = string | number>(props: ForProps<T, K>) => JSXElement;
1177
+ //#endregion
1178
+ //#region src/control/show.d.ts
1179
+ type ShowSource<T> = T | (() => T);
1180
+ type Truthy<T> = T extends false | '' | 0 | 0n | null | undefined ? never : T;
1181
+ /** Props for {@link Show}. */
1182
+ type ShowProps<T> = {
1183
+ when: ShowSource<T>;
1184
+ fallback?: BoundaryChild;
1185
+ children: BoundaryChild | ((value: Truthy<T>) => BoundaryChild);
1186
+ };
1187
+ /** Conditionally render children based on `when`, narrowing truthy values for the render function form. */
1188
+ declare const Show: <T>(props: ShowProps<T>) => JSXElement;
1189
+ //#endregion
1190
+ //#region src/control/case.d.ts
1191
+ type MatchChild = BoundaryChild | (() => BoundaryChild);
1192
+ /** Props for {@link Match}, valid only as a direct child of {@link Case}. */
1193
+ type MatchProps = {
1194
+ key?: string | number | null;
1195
+ when: unknown;
1196
+ children: MatchChild;
1197
+ };
1198
+ /** Props for {@link Case}. */
1199
+ type CaseProps = {
1200
+ fallback?: BoundaryChild;
1201
+ children?: unknown;
1202
+ };
1203
+ /** Declares one branch of a {@link Case}; only valid as its direct child. */
1204
+ declare function Match(_props: MatchProps): null;
1205
+ /** Render the first matching {@link Match} child (by `when`), or `fallback` if none match. */
1206
+ declare const Case: (props: CaseProps) => JSXElement;
1207
+ //#endregion
1208
+ //#region src/csp-nonce.d.ts
1209
+ /** Lexical scope carrying the CSP nonce for the current render, if any. */
1210
+ declare const CspNonceScope: Scope<string | undefined>;
1211
+ /**
1212
+ * Read the CSP nonce for the current render from {@link CspNonceScope}.
1213
+ *
1214
+ * @returns The active nonce, or `undefined` when called outside of a
1215
+ * component render or when no nonce was configured.
1216
+ */
1217
+ declare function cspNonce(): string | undefined;
1218
+ //#endregion
1219
+ //#region src/common/render-context.d.ts
1220
+ interface DeferredBoundaryRegistration {
1221
+ id: string;
1222
+ promise: Promise<unknown>;
1223
+ fulfilled(value: unknown): RenderableChild;
1224
+ rejected(error: unknown): RenderableChild;
1225
+ }
1226
+ interface SSRPortalHostRegistration {
1227
+ token: string;
1228
+ automatic: boolean;
1229
+ }
1230
+ interface SSRPortalSlot {
1231
+ hasValue: boolean;
1232
+ value: RenderableChild | undefined;
1233
+ hosts: SSRPortalHostRegistration[];
1234
+ }
1235
+ interface SSRPortalState {
1236
+ slots: Map<object, SSRPortalSlot>;
1237
+ nextHostId: number;
1238
+ }
1239
+ /** Register request-local CSS produced during SSR without importing the SSR renderer in clients. */
1240
+ declare function registerSSRStyle(id: string, cssText: string): void;
1241
+ //#endregion
1242
+ //#region src/ref.d.ts
1243
+ /**
1244
+ * Creates a stable holder for an intrinsic element ref.
1245
+ *
1246
+ * The renderer mutates `current` during commit and clears it during cleanup.
1247
+ * Updating the holder never schedules a render.
1248
+ */
1249
+ interface Ref<T extends Element = Element> {
1250
+ current: T | null;
1251
+ }
1252
+ /** Create a new, empty {@link Ref} holder. */
1253
+ declare function createRef<T extends Element = Element>(): Ref<T>;
1254
+ //#endregion
1255
+ //#region src/data/mutation-cell.d.ts
1256
+ /**
1257
+ * Create a reactive {@link Mutation} cell bound to the current component,
1258
+ * running `options.action` on `execute()` and optionally invalidating
1259
+ * affected query prefixes on success.
1260
+ */
1261
+ declare function createMutation<TInput, TResult>(options: MutationOptions<TInput, TResult>): Mutation<TInput, TResult>;
1262
+ //#endregion
1263
+ //#region src/data/query-cell.d.ts
1264
+ /**
1265
+ * Create a reactive {@link Query} cell bound to the current component, either
1266
+ * from inline `options` (key + fetch) or a reusable {@link QueryDefinition}
1267
+ * plus its input.
1268
+ */
1269
+ declare function createQuery<T extends {}>(options: QueryOptions<T>): Query<T>;
1270
+ declare function createQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>, input: TInput, options?: Omit<QueryOptions<TResult>, 'key' | 'fetch'>): Query<TResult>;
1271
+ //#endregion
1272
+ //#region src/data/data-runtime.d.ts
1273
+ /** Create a new, isolated {@link DataRuntime} with its own query/mutation caches. */
1274
+ declare function createDataRuntime(options?: DataRuntimeOptions): DataRuntime;
1275
+ /** Get the process-wide default {@link DataRuntime} used when none is provided explicitly. */
1276
+ declare function getDefaultDataRuntime(): DataRuntime;
1277
+ //#endregion
1278
+ //#region src/data/invalidation.d.ts
1279
+ /** Mark all cached queries whose key starts with `prefix` as stale, triggering a refresh. */
1280
+ declare function invalidate(prefix: string, options?: InvalidateOptions): void;
1281
+ /** Create a {@link QueryScope} that namespaces keys and invalidations under `namespace`. */
1282
+ declare function queryScope(namespace: string): QueryScope;
1283
+ /**
1284
+ * Periodically invalidate queries matching `prefix` on a fixed interval,
1285
+ * optionally gated by active route, document visibility, or window focus.
1286
+ */
1287
+ declare function invalidateOnInterval(prefix: string, options: InvalidateOnIntervalOptions): void;
1288
+ //#endregion
1289
+ //#region src/data/query-registry.d.ts
1290
+ /** Lookup table of server handlers keyed by their {@link QueryDefinition}, built by {@link defineServerQueries}. */
1291
+ interface ServerQueryRegistry {
1292
+ readonly entries: readonly ServerQueryEntry<unknown, {}>[];
1293
+ get<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>): ServerQueryHandler<TInput, TResult> | undefined;
1294
+ }
1295
+ /** A query paired with the server handler that resolves it, produced by {@link serveQuery}. */
1296
+ interface ServerQueryEntry<TInput, TResult extends {}> {
1297
+ readonly query: QueryDefinition<TInput, TResult>;
1298
+ readonly handler: ServerQueryHandler<TInput, TResult>;
1299
+ }
1300
+ /** Pair a {@link QueryDefinition} with the server-side handler that resolves it. */
1301
+ declare function serveQuery<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>, handler: ServerQueryHandler<TInput, TResult>): ServerQueryEntry<TInput, TResult>;
1302
+ /** Build a {@link ServerQueryRegistry} from one or more {@link serveQuery} entries. */
1303
+ declare function defineServerQueries(...entries: readonly ServerQueryEntry<any, any>[]): ServerQueryRegistry;
1304
+ /** Freeze and return a reusable {@link QueryDefinition}. */
1305
+ declare function defineQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>): QueryDefinition<TInput, TResult>;
1306
+ /**
1307
+ * Create a {@link QueryPrefetchContext} for prefetching query data ahead of
1308
+ * render, e.g. during SSR route resolution.
1309
+ */
1310
+ declare function createQueryPrefetchContext(options?: {
1311
+ runtime?: DataRuntime;
1312
+ registry?: ServerQueryRegistry;
1313
+ request?: Request;
1314
+ signal?: AbortSignal;
1315
+ mode?: 'ssr' | 'spa';
1316
+ telemetry?: CoreTelemetry;
1317
+ }): QueryPrefetchContext;
1318
+ /** Prefetch `query` with `input` into a {@link QueryPrefetchContext}'s runtime. */
1319
+ declare function prefetchQuery<TInput, TResult extends {}>(context: QueryPrefetchContext, query: QueryDefinition<TInput, TResult>, input: TInput): Promise<boolean>;
1320
+ /** Extract a runtime's cached query data into a JSON-serializable snapshot, dropping non-serializable values. */
1321
+ declare function dehydrateDataRuntime(runtime: DataRuntime): Record<string, unknown>;
1322
+ /** Load a {@link dehydrateDataRuntime} snapshot back into a runtime's query cache. */
1323
+ declare function hydrateDataRuntime(runtime: DataRuntime, data: unknown): void;
1324
+ //#endregion
1325
+ //#region src/actions/index.d.ts
1326
+ /** A declared server action, built by {@link defineAction}, bound to a form via {@link ActionForm}. */
1327
+ interface ActionDescriptor<TInput extends Record<string, unknown> = Record<string, unknown>> {
1328
+ readonly id: string;
1329
+ readonly input: ObjectSchema<TInput>;
1330
+ readonly invalidates: readonly string[];
1331
+ }
1332
+ /** Declare a server action with a stable id, input schema, and query prefixes to invalidate on success. */
1333
+ declare function defineAction<TInput extends Record<string, unknown>>(options: {
1334
+ readonly id: string;
1335
+ readonly input: ObjectSchema<TInput>;
1336
+ readonly invalidates?: readonly string[];
1337
+ }): ActionDescriptor<TInput>;
1338
+ /** A native form bound to a declared action; it is not a synthetic event API. */
1339
+ declare function ActionForm<TInput extends Record<string, unknown>>({ action, children, ...props }: {
1340
+ readonly action: ActionDescriptor<TInput>;
1341
+ readonly children?: RenderableChild;
1342
+ readonly [key: string]: unknown;
1343
+ }): JSXElement;
1344
+ /** Server-replayed validation failure for an {@link ActionForm} submission. */
1345
+ interface ActionValidationError {
1346
+ readonly kind: 'invalid';
1347
+ readonly action: string;
1348
+ readonly values: Readonly<Record<string, unknown>>;
1349
+ readonly issues: readonly unknown[];
1350
+ readonly fieldErrors: Readonly<Record<string, readonly string[]>>;
1351
+ }
1352
+ /** Pending/result/error status for an action, as reported by the `action()` hook. */
1353
+ interface ActionStatus<TResult = unknown> {
1354
+ readonly pending: boolean;
1355
+ readonly result?: TResult;
1356
+ readonly error?: unknown;
1357
+ }
1358
+ /** Returns a command handle, rather than a hook. */
1359
+ declare function action<TInput extends Record<string, unknown>, TResult = unknown>(descriptor: ActionDescriptor<TInput>): {
1360
+ state: StateTuple<ActionStatus<TResult>>;
1361
+ submit(input: TInput): Promise<TResult>;
1362
+ };
1363
+ //#endregion
1364
+ export { AccessDecision as $, Scope as $t, Case as A, RouteRegistry as At, RenderDiagnosticsOptions as B, DataRuntimeOptions as Bt, Ref as C, RouteParams as Ct, registerSSRStyle as D, RouteRecord as Dt, SSRPortalState as E, RouteQuery as Et, ShowProps as F, RouteSearch as Ft, AskrRuntimeOptions as G, Query as Gt, Derived as H, InvalidateOptions as Ht, For as I, RouteSearchValue as It, createRuntime as J, QueryKeyPart as Jt, RuntimeKeyedReorderDecision as K, QueryConsistency as Kt, ForProps as L, RouteSnapshot as Lt, Match as M, RouteRenderResult as Mt, MatchProps as N, RouteRequestOptions as Nt, CspNonceScope as O, RouteRef as Ot, Show as P, RouteRequestResult as Pt, AccessAllowDecision as Q, ServerQueryHandler as Qt, Selector as R, CoreTelemetry as Rt, createMutation as S, RouteOptions as St, DeferredBoundaryRegistration as T, RoutePolicy as Tt, derive as U, Mutation as Ut, configureRenderDiagnostics as V, InvalidateOnIntervalOptions as Vt, AskrRuntime as W, MutationOptions as Wt, scheduleEventHandler as X, QueryScope as Xt, getDefaultRuntime as Y, QueryPrefetchContext as Yt, getSignal as Z, QueryStaleReason as Zt, invalidateOnInterval as _, RouteManifest as _t, action as a, DocumentRenderArgs as an, LayoutScopeRecord as at, getDefaultDataRuntime as b, RouteMetaSource as bt, ServerQueryRegistry as c, SSRData as cn, ParsedSegment as ct, defineServerQueries as d, State as dn, RouteAuthResolver as dt, defineScope as en, AccessDenyDecision as et, dehydrateDataRuntime as f, StateSetter as fn, RouteComponent as ft, invalidate as g, RouteHandler as gt, serveQuery as h, RouteDestination as ht, ActionValidationError as i, VNode as in, GroupHelperOptions as it, CaseProps as j, RouteRegistryOptions as jt, cspNonce as k, RouteRefSearch as kt, createQueryPrefetchContext as l, SSRStyleRegistration as ln, Route as lt, prefetchQuery as m, state as mn, RouteDefinition as mt, ActionForm as n, ComponentFunction as nn, AccessRedirectDecision as nt, defineAction as o, DocumentRenderContext as on, PageHelperOptions as ot, hydrateDataRuntime as p, StateTuple as pn, RouteContext as pt, RuntimeRendererHost as q, QueryDefinition as qt, ActionStatus as r, RenderableChild as rn, AccessRedirectStatus as rt, ServerQueryEntry as s, DocumentRenderer as sn, PageScopeRecord as st, ActionDescriptor as t, readScope as tn, AccessDenyStatus as tt, defineQuery as u, SSRStyleRegistrationValidation as un, RouteAuthOptions as ut, queryScope as v, RouteMatch as vt, createRef as w, RoutePathParams as wt, createQuery as x, RouteMode as xt, createDataRuntime as y, RouteMeta as yt, selector as z, DataRuntime as zt };