@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.
- package/dist/{access-Dpfoi4cA.js → access-DSkccuEI.js} +5 -2
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +3 -3
- package/dist/{activity-dKH6nlpj.js → activity-DodHdC0L.js} +7 -5
- package/dist/{activity-CF2_JvJs.d.ts → activity-DxUcygE5.d.ts} +1 -1
- package/dist/benchmark.d.ts +1 -1
- package/dist/benchmark.js +8 -8
- package/dist/boot/index.d.ts +3 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-D3zVVWuN.js → boot-D71bjP4r.js} +27 -21
- package/dist/{cleanup-c837KVij.js → cleanup-DAAhJjx5.js} +8 -5
- package/dist/{component-cleanup-BUfUleGZ.js → component-cleanup-CJCfu5ed.js} +3 -3
- package/dist/{component-internal-C4uwwUaK.js → component-internal-DlAkCgBE.js} +5 -5
- package/dist/{component-scope-DzJEbYGE.js → component-scope-4I3yEMkb.js} +13 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-CsGs2bLS.d.ts → control-CdzY49Q2.d.ts} +1 -1
- package/dist/{control-CON10J1p.js → control-Dv540XtV.js} +4 -4
- package/dist/{csp-nonce-DH0TrDij.js → csp-nonce-ByMbWv8s.js} +1 -1
- package/dist/data/index.d.ts +1 -2
- package/dist/data/index.js +3 -3
- package/dist/{data-Bh_3OETq.js → data-DcikEH9N.js} +12 -12
- package/dist/{data-runtime-wbooGyu7.js → data-runtime-oIdQWnPW.js} +1 -1
- package/dist/{deferred-D6nZaIPs.js → deferred-B6CafO5u.js} +5 -5
- package/dist/{effect-lnxQIpJG.js → effect-BdZcHblj.js} +73 -14
- package/dist/{fastlane-CrfB3QG0.js → fastlane-B2s24fWt.js} +22 -3
- package/dist/{for-internal-Bsm0B8GZ.js → for-internal-T1C7jd7x.js} +6 -6
- package/dist/foundations/icon/index.d.ts +1 -2
- package/dist/foundations/index.d.ts +2 -2
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/state/index.js +1 -1
- package/dist/foundations/structures/index.d.ts +2 -2
- package/dist/foundations/structures/index.js +1 -1
- package/dist/fx/index.js +2 -2
- package/dist/{types-iAmDSV6o.d.ts → index-2bk8nldG.d.ts} +63 -1
- package/dist/index-DA3g8lm8.d.ts +955 -0
- package/dist/{index-Cf2ANwPL.d.ts → index-oswRaMn6.d.ts} +2 -3
- package/dist/index.d.ts +4 -7
- package/dist/index.js +31 -16
- package/dist/jsx-dev-runtime.d.ts +2 -3
- package/dist/jsx-runtime-C_0v1pMN.d.ts +2 -0
- package/dist/{jsx-runtime-LHh5tcTe.d.ts → jsx-runtime-Cfb2umb4.d.ts} +2 -3
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/{lifecycle-batch-Dfpid9-A.js → lifecycle-batch-Cyfd07rf.js} +2 -2
- package/dist/{lifecycle-operations-CMK1AN2C.js → lifecycle-operations-CQ8fsc94.js} +2 -2
- package/dist/{manifest-fBb2ynKL.js → manifest-Dv0bO6kg.js} +1 -1
- package/dist/{navigate-CnQMXze1.js → navigate-BbWj-QU-.js} +12 -10
- package/dist/{navigate-BO7M2iUG.d.ts → navigate-CZHPEUC4.d.ts} +1 -1
- package/dist/{query-registry-B4LpVtlT.js → query-registry-qm13pEdK.js} +1 -1
- package/dist/{readable-B5NtV7V0.js → readable-B99wh5Z_.js} +9 -6
- package/dist/{renderer-y2DL627q.js → renderer-C6jz9nIN.js} +234 -188
- package/dist/{resolution-C9A31xQi.js → resolution-B21kmOkp.js} +5 -5
- package/dist/{resource-operation-whZDJAYv.js → resource-operation-CaAttQqz.js} +5 -5
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +6 -6
- package/dist/{route-matching-xlgdQXg_.js → route-matching-Bo6UqG-5.js} +13 -4
- package/dist/router/index.d.ts +4 -6
- package/dist/router/index.js +7 -7
- package/dist/{selector-BLNkRZ2i.js → selector-BLWwI55m.js} +22 -5
- package/dist/ssg/index.d.ts +1 -2
- package/dist/ssg/index.js +6 -6
- package/dist/ssr/index.d.ts +3 -5
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-DNJUPmMq.js → ssr-CaZfvQWn.js} +11 -11
- package/dist/{state-DCjONcHK.js → state-XPZYUzHL.js} +5 -5
- package/dist/{structures-m-cphWI-.js → structures-DKjkAmM5.js} +5 -5
- package/dist/testing/index.d.ts +2 -3
- package/dist/testing/index.js +6 -6
- package/dist/{jsx-BYXe_Nnk.d.ts → types-BA9FJtfR.d.ts} +16 -0
- package/dist/{verify-hydration-D8938Fw2.js → verify-hydration-CcF-HJil.js} +1 -1
- package/package.json +1 -1
- package/dist/control-D-FIa-n-.d.ts +0 -451
- package/dist/index-BU17hud9.d.ts +0 -52
- package/dist/index-CPlPDbEY.d.ts +0 -64
- package/dist/index-Izwp_ESC.d.ts +0 -458
- package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
- package/dist/types-CsPtBGWb.d.ts +0 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as enqueueRuntimeLane } from "./access-
|
|
2
|
-
import { m as withFineGrainedReadTracking } from "./readable-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
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
|
-
|
|
171
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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-
|
|
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 {
|
|
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 {
|
|
3
|
-
import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-
|
|
4
|
-
import { h as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent, v as rebaseVNodeTreeWithContextFrame } from "./component-internal-
|
|
5
|
-
import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-
|
|
6
|
-
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-
|
|
7
|
-
import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-
|
|
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 "../../
|
|
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 "../
|
|
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-
|
|
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-
|
|
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 {
|
|
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,3 +1,3 @@
|
|
|
1
|
-
import { r as JSXElement } from "../../
|
|
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-
|
|
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-
|
|
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 {
|
|
2
|
-
import { f as getCurrentComponentInstance } from "../component-scope-
|
|
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
|
-
|
|
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 };
|