@askrjs/askr 0.0.90 → 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 (81) 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 +4 -4
  4. package/dist/{activity-CQKEAORw.js → activity-DodHdC0L.js} +8 -6
  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-D5GZU_g4.js → boot-D71bjP4r.js} +28 -22
  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-BmZC1kDn.js → data-DcikEH9N.js} +13 -13
  25. package/dist/{data-runtime-SC6zzAwh.js → data-runtime-oIdQWnPW.js} +2 -2
  26. package/dist/{deferred-Bh-nZhZF.js → deferred-B6CafO5u.js} +6 -6
  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 +32 -17
  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-D1P9uTlz.js → manifest-Dv0bO6kg.js} +1 -1
  50. package/dist/{navigate-DIOaNAcS.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-IACQeDqi.js → query-registry-qm13pEdK.js} +1 -1
  53. package/dist/{readable-B5NtV7V0.js → readable-B99wh5Z_.js} +9 -6
  54. package/dist/{render-context-D0Hoj9dW.js → render-context-B7ohlh6t.js} +17 -1
  55. package/dist/{renderer-y2DL627q.js → renderer-C6jz9nIN.js} +234 -188
  56. package/dist/{resolution-D3UO6aKA.js → resolution-B21kmOkp.js} +6 -6
  57. package/dist/{resource-operation-CYDU3XzS.js → resource-operation-CaAttQqz.js} +6 -6
  58. package/dist/resources/index.d.ts +2 -2
  59. package/dist/resources/index.js +6 -6
  60. package/dist/{route-matching-DqULzZtC.js → route-matching-Bo6UqG-5.js} +14 -5
  61. package/dist/router/index.d.ts +4 -6
  62. package/dist/router/index.js +7 -7
  63. package/dist/{selector-BLNkRZ2i.js → selector-BLWwI55m.js} +22 -5
  64. package/dist/ssg/index.d.ts +1 -2
  65. package/dist/ssg/index.js +6 -6
  66. package/dist/ssr/index.d.ts +3 -5
  67. package/dist/ssr/index.js +2 -2
  68. package/dist/{ssr-VdXmmJqx.js → ssr-CaZfvQWn.js} +14 -13
  69. package/dist/{state-DCjONcHK.js → state-XPZYUzHL.js} +5 -5
  70. package/dist/{structures--NKfTh3j.js → structures-DKjkAmM5.js} +6 -6
  71. package/dist/testing/index.d.ts +2 -3
  72. package/dist/testing/index.js +6 -6
  73. package/dist/{jsx-BYXe_Nnk.d.ts → types-BA9FJtfR.d.ts} +16 -0
  74. package/dist/{verify-hydration-wRofFN5b.js → verify-hydration-CcF-HJil.js} +4 -3
  75. package/package.json +1 -1
  76. package/dist/control-D-FIa-n-.d.ts +0 -451
  77. package/dist/index-BU17hud9.d.ts +0 -52
  78. package/dist/index-CPlPDbEY.d.ts +0 -64
  79. package/dist/index-Izwp_ESC.d.ts +0 -458
  80. package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
  81. package/dist/types-CsPtBGWb.d.ts +0 -16
@@ -1,5 +1,5 @@
1
- import { t as enqueueRuntimeLane } from "./access-Dpfoi4cA.js";
2
- import { m as withFineGrainedReadTracking } from "./readable-B5NtV7V0.js";
1
+ import { t as enqueueRuntimeLane } from "./access-DSkccuEI.js";
2
+ import { m as withFineGrainedReadTracking } from "./readable-B99wh5Z_.js";
3
3
  //#region src/runtime/effect.ts
4
4
  const SOURCE_EFFECTS = Symbol("askr.source-effects");
5
5
  const effectSources = /* @__PURE__ */ new WeakMap();
@@ -92,15 +92,28 @@ function evaluateAndCommitEffect(effect) {
92
92
  effect._pendingFineGrainedReadSource = null;
93
93
  effect._pendingFineGrainedReadSources = null;
94
94
  try {
95
- const value = withFineGrainedReadTracking(effect, effect.compute);
96
- const pendingAdditionalSources = effect._pendingFineGrainedReadSources;
97
- const hasPendingCollection = isEffectReadSourceCollection(pendingAdditionalSources);
98
- commitEffectResult(effect, value, hasPendingCollection ? pendingAdditionalSources : effect._pendingFineGrainedReadSource, pendingAdditionalSources && !hasPendingCollection ? pendingAdditionalSources : null);
95
+ let value;
96
+ try {
97
+ value = withFineGrainedReadTracking(effect, effect.compute);
98
+ } catch (error) {
99
+ if (!effect.hasValue) {
100
+ const [nextSources, nextSource2] = getPendingEffectSources(effect);
101
+ commitEffectSubscriptions(effect, nextSources, nextSource2);
102
+ }
103
+ throw error;
104
+ }
105
+ const [nextSources, nextSource2] = getPendingEffectSources(effect);
106
+ commitEffectResult(effect, value, nextSources, nextSource2);
99
107
  } finally {
100
108
  effect._pendingFineGrainedReadSource = null;
101
109
  effect._pendingFineGrainedReadSources = null;
102
110
  }
103
111
  }
112
+ function getPendingEffectSources(effect) {
113
+ const pendingAdditionalSources = effect._pendingFineGrainedReadSources;
114
+ const hasPendingCollection = isEffectReadSourceCollection(pendingAdditionalSources);
115
+ return [hasPendingCollection ? pendingAdditionalSources : effect._pendingFineGrainedReadSource, pendingAdditionalSources && !hasPendingCollection ? pendingAdditionalSources : null];
116
+ }
104
117
  function commitEffectSubscriptions(effect, nextSources, nextSource2) {
105
118
  const previousSources = effect.readSources;
106
119
  const previousSource2 = effect.readSource2;
@@ -144,17 +157,26 @@ function commitEffectSubscriptions(effect, nextSources, nextSource2) {
144
157
  }
145
158
  function commitEffectResult(effect, value, nextSources, nextSource2) {
146
159
  const previousValue = effect.lastValue;
147
- if (!effect.hasValue || !effect.equals(previousValue, value)) effect.commit(value, effect.hasValue ? previousValue : void 0);
160
+ const shouldCommit = !effect.hasValue || !effect.equals(previousValue, value);
148
161
  commitEffectSubscriptions(effect, nextSources, nextSource2);
162
+ if (shouldCommit) effect.commit(value, effect.hasValue ? previousValue : void 0);
149
163
  effect.lastValue = value;
150
164
  effect.hasValue = true;
151
165
  }
166
+ function handleEffectError(effect, error) {
167
+ if (effect.onError) {
168
+ effect.onError(error);
169
+ return;
170
+ }
171
+ throw error;
172
+ }
152
173
  function flushLaneEffects(lane) {
153
174
  hasPendingLaneFlush[lane] = false;
154
175
  const effects = dirtyEffectsByLane[lane];
155
176
  if (effects.size === 0) return;
156
177
  const pending = effects.values();
157
178
  const effectRuns = /* @__PURE__ */ new Map();
179
+ let failures = null;
158
180
  let next = pending.next();
159
181
  while (!next.done) {
160
182
  const effect = next.value;
@@ -167,18 +189,27 @@ function flushLaneEffects(lane) {
167
189
  effectRuns.set(effect, runCount);
168
190
  if (runCount > MAX_EFFECT_RUNS_PER_FLUSH) {
169
191
  const error = /* @__PURE__ */ new Error(`[Askr] fine-grained effect exceeded ${MAX_EFFECT_RUNS_PER_FLUSH} runs in one flush. Likely reactive cycle.`);
170
- if (effect.onError) effect.onError(error);
171
- else throw error;
192
+ try {
193
+ handleEffectError(effect, error);
194
+ } catch (unhandledError) {
195
+ (failures ??= []).push(unhandledError);
196
+ }
172
197
  next = pending.next();
173
198
  continue;
174
199
  }
175
200
  try {
176
201
  evaluateAndCommitEffect(effect);
177
202
  } catch (error) {
178
- effect.onError?.(error);
203
+ try {
204
+ handleEffectError(effect, error);
205
+ } catch (unhandledError) {
206
+ (failures ??= []).push(unhandledError);
207
+ }
179
208
  }
180
209
  next = pending.next();
181
210
  }
211
+ if (failures?.length === 1) throw failures[0];
212
+ if (failures && failures.length > 1) throw new AggregateError(failures, "Fine-grained effect failures");
182
213
  }
183
214
  function scheduleLaneFlush(lane) {
184
215
  if (hasPendingLaneFlush[lane]) return;
@@ -189,7 +220,11 @@ function unscheduleEffect(effect) {
189
220
  dirtyEffectsByLane[effect.lane].delete(effect);
190
221
  }
191
222
  function recomputeEffectNow(effect) {
192
- evaluateAndCommitEffect(effect);
223
+ try {
224
+ evaluateAndCommitEffect(effect);
225
+ } catch (error) {
226
+ handleEffectError(effect, error);
227
+ }
193
228
  }
194
229
  function markFineGrainedEffectsDirtySource(source) {
195
230
  const registered = getRegisteredEffects(source);
@@ -235,9 +270,23 @@ var FineGrainedEffectImpl = class {
235
270
  }
236
271
  updateCompute(nextCompute) {
237
272
  if (!this.isActive) return;
273
+ const previousCompute = this.compute;
274
+ const previousReadSources = this.readSources;
275
+ const previousReadSource2 = this.readSource2;
276
+ const previousHasValue = this.hasValue;
277
+ const previousLastValue = this.lastValue;
238
278
  this.compute = nextCompute;
239
279
  unscheduleEffect(this);
240
- recomputeEffectNow(this);
280
+ try {
281
+ recomputeEffectNow(this);
282
+ } catch (error) {
283
+ this.compute = previousCompute;
284
+ unscheduleEffect(this);
285
+ commitEffectSubscriptions(this, previousReadSources, previousReadSource2);
286
+ this.hasValue = previousHasValue;
287
+ this.lastValue = previousLastValue;
288
+ throw error;
289
+ }
241
290
  }
242
291
  flush() {
243
292
  if (!this.isActive) return;
@@ -247,13 +296,23 @@ var FineGrainedEffectImpl = class {
247
296
  };
248
297
  function createFineGrainedEffect(options) {
249
298
  const effect = new FineGrainedEffectImpl(options.lane, options.compute, options.commit, options.equals ?? Object.is, options.onError, options._owner);
250
- recomputeEffectNow(effect);
299
+ try {
300
+ recomputeEffectNow(effect);
301
+ } catch (error) {
302
+ effect.cleanup();
303
+ throw error;
304
+ }
251
305
  return effect;
252
306
  }
253
307
  /** @internal Allocation-sensitive variant for shared renderer callbacks. */
254
308
  function createOwnedFineGrainedEffect(lane, compute, commit, equals, onError, owner) {
255
309
  const effect = new FineGrainedEffectImpl(lane, compute, commit, equals, onError, owner);
256
- recomputeEffectNow(effect);
310
+ try {
311
+ recomputeEffectNow(effect);
312
+ } catch (error) {
313
+ effect.cleanup();
314
+ throw error;
315
+ }
257
316
  return effect;
258
317
  }
259
318
  //#endregion
@@ -1,6 +1,6 @@
1
- import { b as isDevelopmentEnvironment, l as runRuntimeWithSyncProgress, o as getRuntimeRenderer, u as setRuntimeBulkCommitProbe } from "./access-Dpfoi4cA.js";
1
+ import { d as setRuntimeBulkCommitProbe, o as getRuntimeRenderer, u as runRuntimeWithSyncProgress, x as isDevelopmentEnvironment } from "./access-DSkccuEI.js";
2
2
  import { i as isFragmentType } from "./jsx-C3IECePB.js";
3
- import { i as finalizeReadableSubscriptions } from "./readable-B5NtV7V0.js";
3
+ import { i as finalizeReadableSubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty } from "./readable-B99wh5Z_.js";
4
4
  //#region src/runtime/dev-namespace.ts
5
5
  /**
6
6
  * Set a value in the dev namespace (no-op in production).
@@ -14,18 +14,37 @@ const incDevCounter = () => {};
14
14
  //#endregion
15
15
  //#region src/runtime/fastlane.ts
16
16
  let _bulkCommitActive = false;
17
+ let _bulkCommitDepth = 0;
17
18
  let _appliedParents = null;
19
+ let _deferredReadableSources = null;
18
20
  function enterBulkCommit() {
21
+ _bulkCommitDepth += 1;
22
+ if (_bulkCommitDepth > 1) return;
19
23
  _bulkCommitActive = true;
20
24
  _appliedParents = /* @__PURE__ */ new WeakSet();
25
+ _deferredReadableSources = /* @__PURE__ */ new Set();
21
26
  }
22
27
  function exitBulkCommit() {
28
+ if (_bulkCommitDepth === 0) return;
29
+ _bulkCommitDepth -= 1;
30
+ if (_bulkCommitDepth > 0) return;
23
31
  _bulkCommitActive = false;
32
+ const deferredReadableSources = _deferredReadableSources;
24
33
  _appliedParents = null;
34
+ _deferredReadableSources = null;
35
+ if (!deferredReadableSources) return;
36
+ for (const source of deferredReadableSources) {
37
+ markReadableDerivedSubscribersDirty(source);
38
+ markReactivePropsDirtySource(source);
39
+ notifyReadableReaders(source);
40
+ }
25
41
  }
26
42
  function isBulkCommitActive() {
27
43
  return _bulkCommitActive;
28
44
  }
45
+ function deferBulkCommitReadableNotification(source) {
46
+ _deferredReadableSources?.add(source);
47
+ }
29
48
  function markFastPathApplied(parent) {
30
49
  if (!_appliedParents) return;
31
50
  try {
@@ -144,4 +163,4 @@ function tryRuntimeFastLaneSync(instance, result) {
144
163
  }
145
164
  setRuntimeBulkCommitProbe(isBulkCommitActive);
146
165
  //#endregion
147
- export { setDevValue as a, incDevCounter as i, markFastPathApplied as n, tryRuntimeFastLaneSync as r, isBulkCommitActive as t };
166
+ export { incDevCounter as a, tryRuntimeFastLaneSync as i, isBulkCommitActive as n, setDevValue as o, markFastPathApplied as r, deferBulkCommitReadableNotification as t };
@@ -1,10 +1,10 @@
1
1
  import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
2
- import { b as isDevelopmentEnvironment, o as getRuntimeRenderer, v as logger } from "./access-Dpfoi4cA.js";
3
- import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
4
- import { h as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent, v as rebaseVNodeTreeWithContextFrame } from "./component-internal-C4uwwUaK.js";
5
- import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
6
- import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
7
- import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-Dfpid9-A.js";
2
+ import { o as getRuntimeRenderer, x as isDevelopmentEnvironment, y as logger } from "./access-DSkccuEI.js";
3
+ import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
4
+ import { h as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent, v as rebaseVNodeTreeWithContextFrame } from "./component-internal-DlAkCgBE.js";
5
+ import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B99wh5Z_.js";
6
+ import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-CJCfu5ed.js";
7
+ import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-Cyfd07rf.js";
8
8
  //#region src/runtime/child-scope.ts
9
9
  const EMPTY_CHILD_SCOPE_PROPS = {};
10
10
  const childScopesByInstance = /* @__PURE__ */ new WeakMap();
@@ -1,5 +1,4 @@
1
- import { r as JSXElement, s as Props } from "../../jsx-BYXe_Nnk.js";
2
- import "../../types-CsPtBGWb.js";
1
+ import { r as JSXElement, s as Props } from "../../types-BA9FJtfR.js";
3
2
  import { t as Ref } from "../../compose-ref-Cizq72-x.js";
4
3
  //#region src/foundations/icon/icon.types.d.ts
5
4
  type IconSizeToken = 'sm' | 'md' | 'lg' | 'xl';
@@ -1,3 +1,3 @@
1
- import { r as JSXElement } from "../jsx-BYXe_Nnk.js";
2
- import { c as DefaultPortal, d as definePortal, f as Presence, h as SlotProps, l as Portal, m as Slot, p as PresenceProps, u as PortalProps, v as LayoutComponent, y as layout } from "../index-Cf2ANwPL.js";
1
+ import { r as JSXElement } from "../types-BA9FJtfR.js";
2
+ import { c as DefaultPortal, d as definePortal, f as Presence, h as SlotProps, l as Portal, m as Slot, p as PresenceProps, u as PortalProps, v as LayoutComponent, y as layout } from "../index-oswRaMn6.js";
3
3
  export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
@@ -1,2 +1,2 @@
1
- import { a as definePortal, c as layout, i as Portal, o as Presence, r as DefaultPortal, s as Slot } from "../structures--NKfTh3j.js";
1
+ import { a as definePortal, c as layout, i as Portal, o as Presence, r as DefaultPortal, s as Slot } from "../structures-DKjkAmM5.js";
2
2
  export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
@@ -1,4 +1,4 @@
1
- import { v as State } from "../../control-D-FIa-n-.js";
1
+ import { Nt as State } from "../../index-DA3g8lm8.js";
2
2
  //#region src/foundations/state/controllable.d.ts
3
3
  declare function isControlled<T>(value: T | undefined): value is T;
4
4
  declare function resolveControllable<T>(value: T | undefined, defaultValue: T): {
@@ -1,4 +1,4 @@
1
- import { t as state } from "../../state-DCjONcHK.js";
1
+ import { t as state } from "../../state-XPZYUzHL.js";
2
2
  //#region src/foundations/state/controllable.ts
3
3
  /**
4
4
  * controllable
@@ -1,3 +1,3 @@
1
- import { r as JSXElement } from "../../jsx-BYXe_Nnk.js";
2
- import { _ as isElement, a as Collection, c as DefaultPortal, d as definePortal, f as Presence, g as cloneElement, h as SlotProps, i as createLayer, l as Portal, m as Slot, n as LayerManager, o as CollectionItem, p as PresenceProps, r as LayerOptions, s as createCollection, t as Layer, u as PortalProps, v as LayoutComponent, y as layout } from "../../index-Cf2ANwPL.js";
1
+ import { r as JSXElement } from "../../types-BA9FJtfR.js";
2
+ import { _ as isElement, a as Collection, c as DefaultPortal, d as definePortal, f as Presence, g as cloneElement, h as SlotProps, i as createLayer, l as Portal, m as Slot, n as LayerManager, o as CollectionItem, p as PresenceProps, r as LayerOptions, s as createCollection, t as Layer, u as PortalProps, v as LayoutComponent, y as layout } from "../../index-oswRaMn6.js";
3
3
  export { type Collection, type CollectionItem, DefaultPortal, type JSXElement, type Layer, type LayerManager, type LayerOptions, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, cloneElement, createCollection, createLayer, definePortal, isElement, layout };
@@ -1,2 +1,2 @@
1
- import { a as definePortal, c as layout, i as Portal, l as cloneElement, n as createCollection, o as Presence, r as DefaultPortal, s as Slot, t as createLayer, u as isElement } from "../../structures--NKfTh3j.js";
1
+ import { a as definePortal, c as layout, i as Portal, l as cloneElement, n as createCollection, o as Presence, r as DefaultPortal, s as Slot, t as createLayer, u as isElement } from "../../structures-DKjkAmM5.js";
2
2
  export { DefaultPortal, Portal, Presence, Slot, cloneElement, createCollection, createLayer, definePortal, isElement, layout };
package/dist/fx/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { h as scheduleEventHandler, n as enqueueRuntimeTask, v as logger } from "../access-Dpfoi4cA.js";
2
- import { f as getCurrentComponentInstance } from "../component-scope-DzJEbYGE.js";
1
+ import { g as scheduleEventHandler, n as enqueueRuntimeTask, y as logger } from "../access-DSkccuEI.js";
2
+ import { f as getCurrentComponentInstance } from "../component-scope-4I3yEMkb.js";
3
3
  //#region src/fx/timing.ts
4
4
  /**
5
5
  * Debounce — delay execution, coalesce rapid calls
@@ -176,4 +176,66 @@ type MutationOptions<TInput, TResult> = {
176
176
  runtime?: DataRuntime;
177
177
  };
178
178
  //#endregion
179
- export { Mutation as a, QueryConsistency as c, QueryOptions as d, QueryPrefetchContext as f, ServerQueryHandler as h, InvalidateOptions as i, QueryDefinition as l, QueryStaleReason as m, DataRuntimeOptions as n, MutationOptions as o, QueryScope as p, InvalidateOnIntervalOptions as r, Query as s, DataRuntime as t, QueryKeyPart as u };
179
+ //#region src/common/telemetry.d.ts
180
+ interface TelemetryFields {
181
+ requestId?: string;
182
+ traceId?: string;
183
+ route?: string;
184
+ action?: string;
185
+ operation?: string;
186
+ status?: number;
187
+ durationMs?: number;
188
+ }
189
+ type TelemetrySpan = <T>(fields: TelemetryFields, work: () => T) => T;
190
+ /**
191
+ * Structural subset implemented by `createTelemetry()` from `@askrjs/otel`.
192
+ * Core does not install an OpenTelemetry SDK, backend, or exporter.
193
+ */
194
+ interface CoreTelemetry {
195
+ routeMatch?: TelemetrySpan;
196
+ loader?: TelemetrySpan;
197
+ queryPrefetch?: TelemetrySpan;
198
+ ssrRender?: TelemetrySpan;
199
+ }
200
+ //#endregion
201
+ //#region src/data/mutation-cell.d.ts
202
+ declare function createMutation<TInput, TResult>(options: MutationOptions<TInput, TResult>): Mutation<TInput, TResult>;
203
+ //#endregion
204
+ //#region src/data/query-cell.d.ts
205
+ declare function createQuery<T extends {}>(options: QueryOptions<T>): Query<T>;
206
+ declare function createQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>, input: TInput, options?: Omit<QueryOptions<TResult>, 'key' | 'fetch'>): Query<TResult>;
207
+ //#endregion
208
+ //#region src/data/data-runtime.d.ts
209
+ declare function createDataRuntime(options?: DataRuntimeOptions): DataRuntime;
210
+ declare function getDefaultDataRuntime(): DataRuntime;
211
+ //#endregion
212
+ //#region src/data/invalidation.d.ts
213
+ declare function invalidate(prefix: string, options?: InvalidateOptions): void;
214
+ declare function queryScope(namespace: string): QueryScope;
215
+ declare function invalidateOnInterval(prefix: string, options: InvalidateOnIntervalOptions): void;
216
+ //#endregion
217
+ //#region src/data/query-registry.d.ts
218
+ interface ServerQueryRegistry {
219
+ readonly entries: readonly ServerQueryEntry<unknown, {}>[];
220
+ get<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>): ServerQueryHandler<TInput, TResult> | undefined;
221
+ }
222
+ interface ServerQueryEntry<TInput, TResult extends {}> {
223
+ readonly query: QueryDefinition<TInput, TResult>;
224
+ readonly handler: ServerQueryHandler<TInput, TResult>;
225
+ }
226
+ declare function serveQuery<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>, handler: ServerQueryHandler<TInput, TResult>): ServerQueryEntry<TInput, TResult>;
227
+ declare function defineServerQueries(...entries: readonly ServerQueryEntry<any, any>[]): ServerQueryRegistry;
228
+ declare function defineQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>): QueryDefinition<TInput, TResult>;
229
+ declare function createQueryPrefetchContext(options?: {
230
+ runtime?: DataRuntime;
231
+ registry?: ServerQueryRegistry;
232
+ request?: Request;
233
+ signal?: AbortSignal;
234
+ mode?: 'ssr' | 'spa';
235
+ telemetry?: CoreTelemetry;
236
+ }): QueryPrefetchContext;
237
+ declare function prefetchQuery<TInput, TResult extends {}>(context: QueryPrefetchContext, query: QueryDefinition<TInput, TResult>, input: TInput): Promise<boolean>;
238
+ declare function dehydrateDataRuntime(runtime: DataRuntime): Record<string, unknown>;
239
+ declare function hydrateDataRuntime(runtime: DataRuntime, data: unknown): void;
240
+ //#endregion
241
+ export { QueryStaleReason as A, MutationOptions as C, QueryKeyPart as D, QueryDefinition as E, QueryPrefetchContext as O, Mutation as S, QueryConsistency as T, CoreTelemetry as _, defineServerQueries as a, InvalidateOnIntervalOptions as b, prefetchQuery as c, invalidateOnInterval as d, queryScope as f, createMutation as g, createQuery as h, defineQuery as i, ServerQueryHandler as j, QueryScope as k, 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, DataRuntime as v, Query as w, InvalidateOptions as x, DataRuntimeOptions as y };