@askrjs/askr 0.0.91 → 0.0.92

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 (80) hide show
  1. package/dist/{access-Dpfoi4cA.js → access-DSkccuEI.js} +5 -2
  2. package/dist/actions/index.d.ts +1 -1
  3. package/dist/actions/index.js +3 -3
  4. package/dist/{activity-dKH6nlpj.js → activity-DodHdC0L.js} +7 -5
  5. package/dist/{activity-CF2_JvJs.d.ts → activity-DxUcygE5.d.ts} +1 -1
  6. package/dist/benchmark.d.ts +1 -1
  7. package/dist/benchmark.js +8 -8
  8. package/dist/boot/index.d.ts +3 -4
  9. package/dist/boot/index.js +1 -1
  10. package/dist/{boot-D3zVVWuN.js → boot-D71bjP4r.js} +27 -21
  11. package/dist/{cleanup-c837KVij.js → cleanup-DAAhJjx5.js} +8 -5
  12. package/dist/{component-cleanup-BUfUleGZ.js → component-cleanup-CJCfu5ed.js} +3 -3
  13. package/dist/{component-internal-C4uwwUaK.js → component-internal-DlAkCgBE.js} +5 -5
  14. package/dist/{component-scope-DzJEbYGE.js → component-scope-4I3yEMkb.js} +13 -1
  15. package/dist/components/index.d.ts +2 -2
  16. package/dist/components/index.js +1 -1
  17. package/dist/control/index.d.ts +1 -1
  18. package/dist/control/index.js +1 -1
  19. package/dist/{control-CsGs2bLS.d.ts → control-CdzY49Q2.d.ts} +1 -1
  20. package/dist/{control-CON10J1p.js → control-Dv540XtV.js} +4 -4
  21. package/dist/{csp-nonce-DH0TrDij.js → csp-nonce-ByMbWv8s.js} +1 -1
  22. package/dist/data/index.d.ts +1 -2
  23. package/dist/data/index.js +3 -3
  24. package/dist/{data-Bh_3OETq.js → data-DcikEH9N.js} +12 -12
  25. package/dist/{data-runtime-wbooGyu7.js → data-runtime-oIdQWnPW.js} +1 -1
  26. package/dist/{deferred-D6nZaIPs.js → deferred-B6CafO5u.js} +5 -5
  27. package/dist/{effect-lnxQIpJG.js → effect-BdZcHblj.js} +73 -14
  28. package/dist/{fastlane-CrfB3QG0.js → fastlane-B2s24fWt.js} +22 -3
  29. package/dist/{for-internal-Bsm0B8GZ.js → for-internal-T1C7jd7x.js} +6 -6
  30. package/dist/foundations/icon/index.d.ts +1 -2
  31. package/dist/foundations/index.d.ts +2 -2
  32. package/dist/foundations/index.js +1 -1
  33. package/dist/foundations/state/index.d.ts +1 -1
  34. package/dist/foundations/state/index.js +1 -1
  35. package/dist/foundations/structures/index.d.ts +2 -2
  36. package/dist/foundations/structures/index.js +1 -1
  37. package/dist/fx/index.js +2 -2
  38. package/dist/{types-iAmDSV6o.d.ts → index-2bk8nldG.d.ts} +63 -1
  39. package/dist/index-DA3g8lm8.d.ts +955 -0
  40. package/dist/{index-Cf2ANwPL.d.ts → index-oswRaMn6.d.ts} +2 -3
  41. package/dist/index.d.ts +4 -7
  42. package/dist/index.js +31 -16
  43. package/dist/jsx-dev-runtime.d.ts +2 -3
  44. package/dist/jsx-runtime-C_0v1pMN.d.ts +2 -0
  45. package/dist/{jsx-runtime-LHh5tcTe.d.ts → jsx-runtime-Cfb2umb4.d.ts} +2 -3
  46. package/dist/jsx-runtime.d.ts +2 -2
  47. package/dist/{lifecycle-batch-Dfpid9-A.js → lifecycle-batch-Cyfd07rf.js} +2 -2
  48. package/dist/{lifecycle-operations-CMK1AN2C.js → lifecycle-operations-CQ8fsc94.js} +2 -2
  49. package/dist/{manifest-fBb2ynKL.js → manifest-Dv0bO6kg.js} +1 -1
  50. package/dist/{navigate-CnQMXze1.js → navigate-BbWj-QU-.js} +12 -10
  51. package/dist/{navigate-BO7M2iUG.d.ts → navigate-CZHPEUC4.d.ts} +1 -1
  52. package/dist/{query-registry-B4LpVtlT.js → query-registry-qm13pEdK.js} +1 -1
  53. package/dist/{readable-B5NtV7V0.js → readable-B99wh5Z_.js} +9 -6
  54. package/dist/{renderer-y2DL627q.js → renderer-C6jz9nIN.js} +234 -188
  55. package/dist/{resolution-C9A31xQi.js → resolution-B21kmOkp.js} +5 -5
  56. package/dist/{resource-operation-whZDJAYv.js → resource-operation-CaAttQqz.js} +5 -5
  57. package/dist/resources/index.d.ts +2 -2
  58. package/dist/resources/index.js +6 -6
  59. package/dist/{route-matching-xlgdQXg_.js → route-matching-Bo6UqG-5.js} +13 -4
  60. package/dist/router/index.d.ts +4 -6
  61. package/dist/router/index.js +7 -7
  62. package/dist/{selector-BLNkRZ2i.js → selector-BLWwI55m.js} +22 -5
  63. package/dist/ssg/index.d.ts +1 -2
  64. package/dist/ssg/index.js +6 -6
  65. package/dist/ssr/index.d.ts +3 -5
  66. package/dist/ssr/index.js +1 -1
  67. package/dist/{ssr-DNJUPmMq.js → ssr-CaZfvQWn.js} +11 -11
  68. package/dist/{state-DCjONcHK.js → state-XPZYUzHL.js} +5 -5
  69. package/dist/{structures-m-cphWI-.js → structures-DKjkAmM5.js} +5 -5
  70. package/dist/testing/index.d.ts +2 -3
  71. package/dist/testing/index.js +6 -6
  72. package/dist/{jsx-BYXe_Nnk.d.ts → types-BA9FJtfR.d.ts} +16 -0
  73. package/dist/{verify-hydration-D8938Fw2.js → verify-hydration-CcF-HJil.js} +1 -1
  74. package/package.json +1 -1
  75. package/dist/control-D-FIa-n-.d.ts +0 -451
  76. package/dist/index-BU17hud9.d.ts +0 -52
  77. package/dist/index-CPlPDbEY.d.ts +0 -64
  78. package/dist/index-Izwp_ESC.d.ts +0 -458
  79. package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
  80. package/dist/types-CsPtBGWb.d.ts +0 -16
@@ -1,451 +0,0 @@
1
- import { i as JSXElementType, r as JSXElement, s as Props } from "./jsx-BYXe_Nnk.js";
2
- import { t as DataRuntime } from "./types-iAmDSV6o.js";
3
- //#region src/runtime/state.d.ts
4
- /**
5
- * State value holder - callable to read, has set method to update
6
- * @example
7
- * const count = state(0);
8
- * count(); // read: 0
9
- * count.set(1); // write: triggers re-render
10
- */
11
- interface State<T> extends ReadableSource<T> {
12
- (): T;
13
- set(...args: StateSetterArgs<T>): void;
14
- [Symbol.iterator](): IterableIterator<StateTuple<T>[number]>;
15
- }
16
- type StateUpdater<T> = (prev: T) => T;
17
- type StateSetterArgs<T> = [Extract<T, (...args: any[]) => unknown>] extends [never] ? [value: T] | [updater: StateUpdater<T>] : [updater: StateUpdater<T>];
18
- /**
19
- * Public setter type for state cells.
20
- */
21
- type StateSetter<T> = (...args: StateSetterArgs<T>) => void;
22
- /**
23
- * Tuple-first state handle returned by `state()`.
24
- */
25
- type StateTuple<T> = [get: State<T>, set: StateSetter<T>] & State<T>;
26
- /**
27
- * Creates a local state value for a component
28
- * Optimized for:
29
- * - O(1) read performance
30
- * - Minimal allocation per state
31
- * - Fast scheduler integration
32
- *
33
- * IMPORTANT: state() must be called during component render execution.
34
- * It captures the current component instance from context.
35
- * Calling outside a component function will throw an error.
36
- *
37
- * @example
38
- * ```ts
39
- * // ✅ Correct: called during render
40
- * export function Counter() {
41
- * const [count, setCount] = state(0);
42
- * return { type: 'button', children: [count()] };
43
- * }
44
- *
45
- * // ❌ Wrong: called outside component
46
- * const count = state(0);
47
- * export function BadComponent() {
48
- * return { type: 'div' };
49
- * }
50
- * ```
51
- */
52
- declare function state<T>(initialValue: T): StateTuple<T>;
53
- //#endregion
54
- //#region src/common/ssr.d.ts
55
- /**
56
- * Common call contracts: SSR types
57
- */
58
- type SSRData = Record<string, unknown>;
59
- /** Styles produced while rendering a request, kept with that request's SSR context. */
60
- interface SSRStyleRegistration {
61
- id: string;
62
- cssText: string;
63
- }
64
- interface DocumentRenderRoute {
65
- path: string;
66
- namespace?: string;
67
- }
68
- interface DocumentRenderContext {
69
- mode: 'ssr' | 'ssg';
70
- url: string;
71
- pathname: string;
72
- search: string;
73
- hash: string;
74
- params: Record<string, string>;
75
- data?: SSRData;
76
- seed: number;
77
- route: DocumentRenderRoute;
78
- cspNonce?: string;
79
- styles?: readonly SSRStyleRegistration[];
80
- }
81
- interface DocumentRenderArgs {
82
- appHtml: string;
83
- context: DocumentRenderContext;
84
- }
85
- type DocumentRenderer = (args: DocumentRenderArgs) => string;
86
- type SSRStyleRegistrationValidation = 'warn' | 'error' | 'off';
87
- /** Full context for sink-based streaming SSR */
88
- type SSRContext = {
89
- url: string;
90
- seed: number;
91
- data?: SSRData;
92
- params?: Record<string, string>;
93
- signal?: AbortSignal;
94
- };
95
- //#endregion
96
- //#region src/common/vnode.d.ts
97
- interface DOMElement {
98
- type: JSXElementType;
99
- props?: Props;
100
- children?: VNode[];
101
- key?: string | number | null;
102
- [Symbol.iterator]?: never;
103
- _controlState?: ControlBoundaryState;
104
- }
105
- type VNode = DOMElement | string | number | boolean | null | undefined;
106
- type RenderableChild = VNode | JSXElement | readonly RenderableChild[];
107
- //#endregion
108
- //#region src/common/component.d.ts
109
- type ComponentContext = {
110
- signal: AbortSignal;
111
- ssr?: SSRContext;
112
- };
113
- type ComponentFunction = (props: Props, context?: ComponentContext) => JSXElement | VNode;
114
- //#endregion
115
- //#region src/runtime/context.d.ts
116
- type ContextKey = symbol;
117
- type Renderable = RenderableChild;
118
- type ContextScopeChildren = Renderable | (() => Renderable);
119
- interface Scope<T> {
120
- (props: {
121
- value: T;
122
- children?: ContextScopeChildren;
123
- }): JSXElement;
124
- readonly key: ContextKey;
125
- readonly defaultValue: T;
126
- }
127
- interface ContextFrame {
128
- parent: ContextFrame | null;
129
- values: Map<ContextKey, unknown> | null;
130
- }
131
- declare function defineScope<T>(defaultValue: T): Scope<T>;
132
- declare function readScope<T>(context: Scope<T>): T;
133
- //#endregion
134
- //#region src/runtime/component-cleanup.d.ts
135
- type OwnedChildScope = {
136
- key: string | number;
137
- dispose(): void;
138
- };
139
- //#endregion
140
- //#region src/common/app-render-runtime.d.ts
141
- interface AppRenderRuntime {
142
- framework: Readonly<Record<string, unknown>>;
143
- route: unknown;
144
- hasRoute: boolean;
145
- dataRuntime?: DataRuntime;
146
- }
147
- //#endregion
148
- //#region src/runtime/component-internal.d.ts
149
- interface ComponentInstance {
150
- id: string;
151
- fn: ComponentFunction;
152
- props: Props;
153
- target: Element | null;
154
- parentInstance: ComponentInstance | null;
155
- portalScope: object | null;
156
- mounted: boolean;
157
- abortController: AbortController | null;
158
- ssr?: boolean;
159
- cleanupStrict?: boolean;
160
- /** @internal Private resource-ownership identity for the active mount. */
161
- _ownershipGeneration: object;
162
- stateValues?: State<unknown>[];
163
- evaluationGeneration: number;
164
- notifyUpdate: (() => void) | null;
165
- _pendingFlushTask?: () => void;
166
- _pendingRunTask?: () => void;
167
- _enqueueRun?: () => void;
168
- stateIndexCheck: number;
169
- expectedStateIndices?: number[];
170
- firstRenderComplete: boolean;
171
- mountOperations?: Array<() => void | (() => void) | PromiseLike<void | (() => void)>>;
172
- commitOperations?: Array<() => void | (() => void) | PromiseLike<void | (() => void)>>;
173
- cleanupFns?: Array<() => void>;
174
- lifecycleSlots?: unknown[];
175
- lifecycleGeneration: number;
176
- hasPendingUpdate: boolean;
177
- ownerFrame: ContextFrame | null;
178
- isRoot?: boolean;
179
- _rootComponentFn?: ComponentFunction;
180
- /** @internal Browser-owned hydration and route state for this app root. */
181
- _appRenderRuntime?: AppRenderRuntime;
182
- /** @internal CSP nonce retained across browser route navigation. */
183
- _cspNonce?: string;
184
- _vnodeOwner?: object;
185
- _vnodeParent?: ComponentInstance | null;
186
- _vnodeParentGeneration?: object;
187
- _vnodeKey?: string | number;
188
- _vnodePosition?: number;
189
- _wrapperDepth?: number;
190
- _currentRenderToken?: number;
191
- lastRenderToken?: number;
192
- _pendingReadSources?: Set<ReadableSource<unknown>>;
193
- _pendingReadSourceVersions?: Map<ReadableSource<unknown>, number>;
194
- _lastReadSources?: Set<ReadableSource<unknown>>;
195
- devWarningsEmitted?: Set<string>;
196
- _placeholder?: Comment;
197
- _ownedChildScopes?: Set<OwnedChildScope>;
198
- errorBoundaryState?: {
199
- error: unknown | null;
200
- resetKey: unknown;
201
- notified: boolean;
202
- };
203
- }
204
- //#endregion
205
- //#region src/runtime/readable.d.ts
206
- interface DerivedSubscriber {
207
- _markDirty(): void;
208
- _pendingDependencySources?: Set<ReadableSource<unknown>>;
209
- }
210
- interface ReadableSource<T = unknown> {
211
- (): T;
212
- _hasBeenRead?: boolean;
213
- _hasEverBeenRead?: boolean;
214
- _readers?: Map<ComponentInstance, {
215
- token: number;
216
- generation: object;
217
- }>;
218
- _derivedSubscribers?: Set<DerivedSubscriber>;
219
- _version?: number;
220
- }
221
- //#endregion
222
- //#region src/common/dom-range.d.ts
223
- /**
224
- * Internal DOM range shape shared by runtime ownership records and the
225
- * renderer. A singleton range uses the node itself for both anchors; a
226
- * multi-node or empty range uses deterministic comment anchors.
227
- */
228
- interface DOMRange {
229
- start: Node;
230
- end: Node;
231
- single: boolean;
232
- }
233
- //#endregion
234
- //#region src/runtime/child-scope.d.ts
235
- interface ChildScope {
236
- key: string | number;
237
- componentInstance: ComponentInstance;
238
- previousVnode: VNode | undefined;
239
- vnode: VNode | undefined;
240
- dom?: Node;
241
- /** @internal Fast singleton node plus an anchor-backed multi-node range. */
242
- range?: DOMRange;
243
- needsDomUpdate: boolean;
244
- hydrationPending: boolean;
245
- /** @internal Stable owner for validated intrinsic blueprints in list items. */
246
- blueprintOwner?: object;
247
- render(renderFn: () => VNode): VNode;
248
- markDirty(): void;
249
- dispose(): void;
250
- }
251
- interface ChildScopeOwnership {
252
- add(scope: ChildScope): void;
253
- delete(scope: ChildScope): void;
254
- bulkDispose(run: () => void): void;
255
- }
256
- /** @internal Snapshot used to restore a child scope after a failed commit. */
257
- interface ChildScopeTransactionSnapshot {
258
- previousVnode: VNode | undefined;
259
- vnode: VNode | undefined;
260
- dom: Node | undefined;
261
- range: DOMRange | undefined;
262
- domTextData: string | undefined;
263
- needsDomUpdate: boolean;
264
- hydrationPending: boolean;
265
- renderFn: (() => VNode) | undefined;
266
- renderedOwnerFrame: ContextFrame | null;
267
- }
268
- //#endregion
269
- //#region src/runtime/for-signals.d.ts
270
- type ForItemSignal<T> = ReadableSource<T> & (() => T) & {
271
- peek(): T;
272
- set(newValue: T, notifyReaders?: boolean): void;
273
- };
274
- type ForItemPropertySignal = ReadableSource<unknown> & (() => unknown) & {
275
- peek(): unknown;
276
- set(newValue: unknown, notifyReaders?: boolean): void;
277
- };
278
- type ForIndexSignal = ReadableSource<number> & (() => number) & {
279
- peek(): number;
280
- set(newValue: number | ((prev: number) => number), notifyReaders?: boolean): void;
281
- };
282
- interface ReactiveForItemState<T> {
283
- currentItem: T;
284
- itemSignal: ForItemSignal<T> | null;
285
- propertySignals: Map<PropertyKey, ForItemPropertySignal> | null;
286
- coalescedProperties: PropertyKey | PropertyKey[] | null;
287
- coalescedProperty2: PropertyKey | null;
288
- wholeItemRead: boolean;
289
- proxy: T;
290
- }
291
- //#endregion
292
- //#region src/runtime/for-scopes.d.ts
293
- interface ForItemInstance<T> {
294
- key: string | number;
295
- item: T;
296
- reactiveItem: T;
297
- reactiveItemState: ReactiveForItemState<T> | null;
298
- indexSignal: ForIndexSignal;
299
- scope: ChildScope;
300
- }
301
- //#endregion
302
- //#region src/runtime/effect.d.ts
303
- interface FineGrainedEffectHandle<T> {
304
- cleanup(): void;
305
- updateCompute(nextCompute: () => T): void;
306
- flush(): void;
307
- }
308
- //#endregion
309
- //#region src/runtime/for-types.d.ts
310
- type ForEachSource<T> = readonly T[] | (() => readonly T[]);
311
- type ForKeySelector<T> = (item: T, index: number) => string | number;
312
- type ForRenderItem<T> = (item: T, index: () => number) => VNode;
313
- //#endregion
314
- //#region src/runtime/for-internal.d.ts
315
- type ForCommitStrategy = 'APPEND' | 'INSERT_ONE' | 'REMOVE_ONE' | 'TRUNCATE' | 'NO_REORDER' | 'SWAP' | 'FULL_KEYED';
316
- interface ForState<T> {
317
- kind: 'for';
318
- _contextFrame: ContextFrame | null;
319
- _contextFrameChanged: boolean;
320
- currentItems: readonly T[];
321
- _committedItems: readonly T[];
322
- eachSource: ForEachSource<T>;
323
- fallback: VNode | null;
324
- fallbackScope: ChildScope | null;
325
- items: Map<string | number, ForItemInstance<T>>;
326
- orderedKeys: Array<string | number>;
327
- orderedItems: ForItemInstance<T>[];
328
- orderedVNodes: VNode[];
329
- byFn: ForKeySelector<T>;
330
- renderFn: ForRenderItem<T>;
331
- parentInstance: ComponentInstance | null;
332
- lastCommitStrategy: ForCommitStrategy;
333
- lastRemovedNodes: Node[];
334
- lastRemovedRanges: DOMRange[];
335
- pendingDirtyIndices: number[] | null;
336
- pendingSwapIndices: [number, number] | null;
337
- pendingMoveOnly: boolean;
338
- pendingInsertedIndex: number | null;
339
- pendingRemovedKey: string | number | null;
340
- pendingAppendStart: number | null;
341
- _hasResolvedItemDom: boolean;
342
- _needsSourceReconcile: boolean;
343
- _sourceEffect: FineGrainedEffectHandle<readonly T[]> | null;
344
- _suspendSourceCommit: boolean;
345
- _enqueueBoundaryCommit?: (() => void) | null;
346
- _hasPendingBoundaryCommit?: boolean;
347
- devKeyKinds?: Map<string | number, 'number' | 'string'>;
348
- _transaction?: ForTransaction<T> | null;
349
- _scopeOwnership: ChildScopeOwnership;
350
- }
351
- interface ForItemTransactionSnapshot<T> {
352
- item: T;
353
- itemSignalExists: boolean;
354
- itemSignalValue: T | undefined;
355
- itemSignalHasBeenRead: boolean;
356
- indexValue: number;
357
- indexHasBeenRead: boolean;
358
- propertySignalStore: Map<PropertyKey, ForItemPropertySignal> | null;
359
- propertySignals: Map<PropertyKey, {
360
- signal: ForItemPropertySignal;
361
- value: unknown;
362
- hasBeenRead: boolean;
363
- }> | null;
364
- scope: ChildScopeTransactionSnapshot;
365
- }
366
- interface ForTransaction<T> {
367
- collectionSnapshotMode: 'copy' | 'reset-empty' | 'preserve-clear' | 'reuse';
368
- currentItems: readonly T[];
369
- items: Map<string | number, ForItemInstance<T>>;
370
- orderedKeys: Array<string | number>;
371
- orderedItems: ForItemInstance<T>[];
372
- orderedVNodes: VNode[];
373
- fallbackScope: ChildScope | null;
374
- lastCommitStrategy: ForCommitStrategy;
375
- lastRemovedNodes: Node[];
376
- lastRemovedRanges: DOMRange[];
377
- pendingDirtyIndices: number[] | null;
378
- pendingSwapIndices: [number, number] | null;
379
- pendingMoveOnly: boolean;
380
- pendingInsertedIndex: number | null;
381
- pendingRemovedKey: string | number | null;
382
- pendingAppendStart: number | null;
383
- hasResolvedItemDom: boolean;
384
- needsSourceReconcile: boolean;
385
- devKeyKinds?: Map<string | number, 'number' | 'string'>;
386
- itemSnapshots: Map<ForItemInstance<T>, ForItemTransactionSnapshot<T>> | null;
387
- unreadIndexSnapshots: Map<ForIndexSignal, number> | null;
388
- fallbackScopeSnapshot: ChildScopeTransactionSnapshot | null;
389
- removedScopes: ChildScope[] | null;
390
- removedScopeNodes: Node[] | null;
391
- removeAllItems: boolean;
392
- signalEffects: Map<ReadableSource<unknown>, {
393
- parentInstance: ComponentInstance | null;
394
- notify: boolean;
395
- skipInstance: ComponentInstance | null;
396
- skipOwnedBy: ComponentInstance | null;
397
- }> | null;
398
- shouldClearDomUpdateState: boolean;
399
- }
400
- //#endregion
401
- //#region src/runtime/control.d.ts
402
- interface MatchBranch {
403
- key: string | number;
404
- render: () => VNode;
405
- when: unknown;
406
- }
407
- interface BranchControlStateBase {
408
- _contextFrame: ContextFrame | null;
409
- activeKey: string | number | null;
410
- activeScope: ChildScope | null;
411
- activeVNodes: VNode[];
412
- lastRemovedNodes: Node[];
413
- lastRemovedRanges: DOMRange[];
414
- parentInstance: ComponentInstance | null;
415
- _enqueueBoundaryCommit?: (() => void) | null;
416
- _hasPendingBoundaryCommit?: boolean;
417
- _transaction?: ControlTransaction | null;
418
- }
419
- interface ShowState extends BranchControlStateBase {
420
- kind: 'show';
421
- fallbackScope: ChildScope | null;
422
- renderFallback: (() => VNode) | null;
423
- renderTruthy: ((value: unknown) => VNode) | (() => VNode);
424
- selectedValue: unknown;
425
- truthyScope: ChildScope | null;
426
- }
427
- interface CaseState extends BranchControlStateBase {
428
- kind: 'case';
429
- fallback: (() => VNode) | null;
430
- matches: MatchBranch[];
431
- }
432
- type ControlBoundaryState = ForState<unknown> | ShowState | CaseState;
433
- type BranchStateSnapshot = {
434
- activeKey: string | number | null;
435
- activeScope: ChildScope | null;
436
- activeVNodes: VNode[];
437
- lastRemovedNodes: Node[];
438
- lastRemovedRanges: DOMRange[];
439
- scopeSnapshots: Map<ChildScope, ChildScopeTransactionSnapshot>;
440
- fallbackScope?: ChildScope | null;
441
- truthyScope?: ChildScope | null;
442
- };
443
- interface ControlTransaction {
444
- state: ShowState | CaseState;
445
- snapshot: BranchStateSnapshot;
446
- removedScopes: ChildScope[];
447
- shouldClearDomUpdateState: boolean;
448
- registered: boolean;
449
- }
450
- //#endregion
451
- export { SSRStyleRegistrationValidation as _, ComponentInstance as a, StateTuple as b, readScope as c, VNode as d, DocumentRenderArgs as f, SSRStyleRegistration as g, SSRData as h, ReadableSource as i, ComponentFunction as l, DocumentRenderer as m, ChildScope as n, Scope as o, DocumentRenderContext as p, DOMRange as r, defineScope as s, ForEachSource as t, RenderableChild as u, State as v, state as x, StateSetter as y };
@@ -1,52 +0,0 @@
1
- import { d as VNode, t as ForEachSource, u as RenderableChild } from "./control-D-FIa-n-.js";
2
- import { r as JSXElement } from "./jsx-BYXe_Nnk.js";
3
- //#region src/control/shared.d.ts
4
- type BoundaryChild = RenderableChild;
5
- //#endregion
6
- //#region src/control/for.d.ts
7
- type ForBaseProps<T> = {
8
- each: ForEachSource<T>;
9
- fallback?: BoundaryChild;
10
- /**
11
- * Row renderer. Parent reactive reads must use `selector()` or thunk props;
12
- * closure-captured values are snapshotted when the row is created or
13
- * reconciled; changing the parent source does not rerun an existing row.
14
- */
15
- children: (item: T, index: () => number) => VNode;
16
- };
17
- type KeyedForProps<T, K extends string | number> = ForBaseProps<T> & {
18
- by: (item: T, index: number) => K;
19
- byIndex?: never;
20
- };
21
- type IndexedForProps<T> = ForBaseProps<T> & {
22
- by?: never;
23
- byIndex: true;
24
- };
25
- type ForProps<T, K extends string | number = string | number> = KeyedForProps<T, K> | IndexedForProps<T>;
26
- declare const For: <T, K extends string | number = string | number>(props: ForProps<T, K>) => JSXElement;
27
- //#endregion
28
- //#region src/control/show.d.ts
29
- type ShowSource<T> = T | (() => T);
30
- type Truthy<T> = T extends false | '' | 0 | 0n | null | undefined ? never : T;
31
- type ShowProps<T> = {
32
- when: ShowSource<T>;
33
- fallback?: BoundaryChild;
34
- children: BoundaryChild | ((value: Truthy<T>) => BoundaryChild);
35
- };
36
- declare const Show: <T>(props: ShowProps<T>) => JSXElement;
37
- //#endregion
38
- //#region src/control/case.d.ts
39
- type MatchChild = BoundaryChild | (() => BoundaryChild);
40
- type MatchProps = {
41
- key?: string | number | null;
42
- when: unknown;
43
- children: MatchChild;
44
- };
45
- type CaseProps = {
46
- fallback?: BoundaryChild;
47
- children?: unknown;
48
- };
49
- declare function Match(_props: MatchProps): null;
50
- declare const Case: (props: CaseProps) => JSXElement;
51
- //#endregion
52
- export { Show as a, ForProps as c, MatchProps as i, CaseProps as n, ShowProps as o, Match as r, For as s, Case as t };
@@ -1,64 +0,0 @@
1
- import { a as Mutation, d as QueryOptions, f as QueryPrefetchContext, h as ServerQueryHandler, i as InvalidateOptions, l as QueryDefinition, n as DataRuntimeOptions, o as MutationOptions, p as QueryScope, r as InvalidateOnIntervalOptions, s as Query, t as DataRuntime } from "./types-iAmDSV6o.js";
2
- //#region src/common/telemetry.d.ts
3
- interface TelemetryFields {
4
- requestId?: string;
5
- traceId?: string;
6
- route?: string;
7
- action?: string;
8
- operation?: string;
9
- status?: number;
10
- durationMs?: number;
11
- }
12
- type TelemetrySpan = <T>(fields: TelemetryFields, work: () => T) => T;
13
- /**
14
- * Structural subset implemented by `createTelemetry()` from `@askrjs/otel`.
15
- * Core does not install an OpenTelemetry SDK, backend, or exporter.
16
- */
17
- interface CoreTelemetry {
18
- routeMatch?: TelemetrySpan;
19
- loader?: TelemetrySpan;
20
- queryPrefetch?: TelemetrySpan;
21
- ssrRender?: TelemetrySpan;
22
- }
23
- //#endregion
24
- //#region src/data/mutation-cell.d.ts
25
- declare function createMutation<TInput, TResult>(options: MutationOptions<TInput, TResult>): Mutation<TInput, TResult>;
26
- //#endregion
27
- //#region src/data/query-cell.d.ts
28
- declare function createQuery<T extends {}>(options: QueryOptions<T>): Query<T>;
29
- declare function createQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>, input: TInput, options?: Omit<QueryOptions<TResult>, 'key' | 'fetch'>): Query<TResult>;
30
- //#endregion
31
- //#region src/data/data-runtime.d.ts
32
- declare function createDataRuntime(options?: DataRuntimeOptions): DataRuntime;
33
- declare function getDefaultDataRuntime(): DataRuntime;
34
- //#endregion
35
- //#region src/data/invalidation.d.ts
36
- declare function invalidate(prefix: string, options?: InvalidateOptions): void;
37
- declare function queryScope(namespace: string): QueryScope;
38
- declare function invalidateOnInterval(prefix: string, options: InvalidateOnIntervalOptions): void;
39
- //#endregion
40
- //#region src/data/query-registry.d.ts
41
- interface ServerQueryRegistry {
42
- readonly entries: readonly ServerQueryEntry<unknown, {}>[];
43
- get<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>): ServerQueryHandler<TInput, TResult> | undefined;
44
- }
45
- interface ServerQueryEntry<TInput, TResult extends {}> {
46
- readonly query: QueryDefinition<TInput, TResult>;
47
- readonly handler: ServerQueryHandler<TInput, TResult>;
48
- }
49
- declare function serveQuery<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>, handler: ServerQueryHandler<TInput, TResult>): ServerQueryEntry<TInput, TResult>;
50
- declare function defineServerQueries(...entries: readonly ServerQueryEntry<any, any>[]): ServerQueryRegistry;
51
- declare function defineQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>): QueryDefinition<TInput, TResult>;
52
- declare function createQueryPrefetchContext(options?: {
53
- runtime?: DataRuntime;
54
- registry?: ServerQueryRegistry;
55
- request?: Request;
56
- signal?: AbortSignal;
57
- mode?: 'ssr' | 'spa';
58
- telemetry?: CoreTelemetry;
59
- }): QueryPrefetchContext;
60
- declare function prefetchQuery<TInput, TResult extends {}>(context: QueryPrefetchContext, query: QueryDefinition<TInput, TResult>, input: TInput): Promise<boolean>;
61
- declare function dehydrateDataRuntime(runtime: DataRuntime): Record<string, unknown>;
62
- declare function hydrateDataRuntime(runtime: DataRuntime, data: unknown): void;
63
- //#endregion
64
- export { CoreTelemetry as _, defineServerQueries as a, prefetchQuery as c, invalidateOnInterval as d, queryScope as f, createMutation as g, createQuery as h, defineQuery as i, serveQuery as l, getDefaultDataRuntime as m, ServerQueryRegistry as n, dehydrateDataRuntime as o, createDataRuntime as p, createQueryPrefetchContext as r, hydrateDataRuntime as s, ServerQueryEntry as t, invalidate as u };