@askrjs/askr 0.0.94 → 0.0.95
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/CHANGELOG.md +2 -0
- package/README.md +3 -1
- package/dist/actions/index.d.ts +1 -1
- package/dist/{activity-CJIQyo5X.d.ts → activity-D_5x2HXQ.d.ts} +1 -1
- package/dist/{activity-BshyLB3_.js → activity-d4t3CdzK.js} +1 -1
- package/dist/benchmark.js +5 -5
- package/dist/boot/index.d.ts +2 -2
- package/dist/boot/index.js +1 -1
- package/dist/{boot-BsMB_ySP.js → boot-C1wT3Vfs.js} +11 -9
- package/dist/{cleanup-DefafSjG.js → cleanup-D7uN-Z1s.js} +1 -1
- package/dist/{component-cleanup-hrqSikl2.js → component-cleanup-DYG80yhG.js} +2 -0
- package/dist/{component-internal-DOVVMjG7.js → component-internal-D0yE2Ch3.js} +72 -8
- package/dist/components/index.d.ts +5 -2
- package/dist/components/index.js +4 -1
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-DqOzkgc7.js → control-C0klPV7Q.js} +1 -1
- package/dist/{csp-nonce-BBxq1zq4.js → csp-nonce-BVybpV1v.js} +1 -1
- package/dist/data/index.d.ts +1 -1
- package/dist/data/index.js +1 -1
- package/dist/{data-DYqokZzc.js → data-Bm8L6JOm.js} +1 -1
- package/dist/{deferred-BS0Xpstg.js → deferred-p8hyanxJ.js} +2 -2
- package/dist/{for-internal-jrliHZmF.js → for-internal-DkBwTG4S.js} +2 -2
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/foundations/structures/index.js +1 -1
- package/dist/fx/index.d.ts +1 -1
- package/dist/{index-KQ7Vl4-8.d.ts → index-CTIBOqUB.d.ts} +4 -0
- package/dist/{index-C29SEGIv.d.ts → index-S2IqSJib.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/{lifecycle-operations-Qxq6ABrC.js → lifecycle-operations-CBzG5PyB.js} +1 -1
- package/dist/{navigate-CECCMPAr.js → navigate-DChM5m8m.js} +6 -6
- package/dist/{navigate-BL_FIIJ6.d.ts → navigate-eGm4omPj.d.ts} +1 -1
- package/dist/{renderer-CLvq458M.js → renderer-tXX_xj86.js} +5 -32
- package/dist/{resolution-D8PgnTzh.js → resolution-BQyo7qNn.js} +2 -2
- package/dist/{resource-operation-CLQXCn1p.js → resource-operation-B62UQKHV.js} +1 -1
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/router/index.d.ts +3 -3
- package/dist/router/index.js +5 -5
- package/dist/ssg/index.d.ts +1 -1
- package/dist/ssg/index.js +3 -3
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-8_vHDWqV.js → ssr-DYcK20IX.js} +5 -5
- package/dist/{structures-umvVUD-M.js → structures-CPycoyZj.js} +45 -10
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/{verify-hydration-jf8X2V3x.js → verify-hydration-m-wVbYOD.js} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
- fix(runtime): reject recursive `derive()` and `selector()` reads before a
|
|
6
6
|
memoized value can bypass the self-evaluation guard.
|
|
7
|
+
- fix(runtime): route scheduled descendant and portal materialization failures
|
|
8
|
+
to the nearest live `ErrorBoundary` while preserving unbounded propagation.
|
|
7
9
|
|
|
8
10
|
## 0.0.85
|
|
9
11
|
|
package/README.md
CHANGED
|
@@ -92,7 +92,9 @@ Query and mutation helpers live in `@askrjs/askr/data`.
|
|
|
92
92
|
|
|
93
93
|
`ErrorBoundary` is the opt-in boundary primitive for render-time failures. It
|
|
94
94
|
renders a visible fallback in development, still logs the underlying error, and
|
|
95
|
-
can reset when your app state changes.
|
|
95
|
+
can reset when your app state changes. The boundary protects both initial mount
|
|
96
|
+
and scheduled post-mount updates. Portal content follows its logical writer
|
|
97
|
+
boundary and can also recover through a boundary around its host.
|
|
96
98
|
|
|
97
99
|
```ts
|
|
98
100
|
import { ErrorBoundary } from '@askrjs/askr/components';
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-
|
|
1
|
+
import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-CTIBOqUB.js";
|
|
2
2
|
export { ActionDescriptor, ActionForm, ActionStatus, ActionValidationError, action, defineAction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-4I3yEMkb.js";
|
|
2
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
2
|
+
import { a as registerCommitOperation } from "./component-internal-D0yE2Ch3.js";
|
|
3
3
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.js";
|
|
4
4
|
import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
|
|
5
5
|
import { n as syncRouteActivitySnapshot } from "./route-activity-CNJfpwx-.js";
|
package/dist/benchmark.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as flushRuntimeScheduler } from "./access-d_DCdwqn.js";
|
|
2
|
-
import { t as installRendererBridge } from "./renderer-CLvq458M.js";
|
|
3
2
|
import { t as state } from "./state-DmkGM_LN.js";
|
|
4
3
|
import { t as selector } from "./selector-CyK-sDwB.js";
|
|
5
|
-
import {
|
|
4
|
+
import { t as installRendererBridge } from "./renderer-tXX_xj86.js";
|
|
5
|
+
import { i as For } from "./control-C0klPV7Q.js";
|
|
6
6
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
7
|
-
import { t as createIsland } from "./boot-
|
|
7
|
+
import { t as createIsland } from "./boot-C1wT3Vfs.js";
|
|
8
8
|
//#region src/bench/components/benchmark-row.tsx
|
|
9
9
|
function BenchmarkRow({ item, isSelected, onSelect, onRemove }) {
|
|
10
10
|
return /* @__PURE__ */ jsxs("tr", {
|
|
@@ -63,8 +63,8 @@ function BenchmarkTable({ rows, isSelected, onSelect, onRemove }) {
|
|
|
63
63
|
installRendererBridge();
|
|
64
64
|
const benchmarkMetadata = {
|
|
65
65
|
packageName: "@askrjs/askr",
|
|
66
|
-
packageVersion: "0.0.
|
|
67
|
-
buildLabel: "0.0.
|
|
66
|
+
packageVersion: "0.0.95",
|
|
67
|
+
buildLabel: "0.0.95-local"
|
|
68
68
|
};
|
|
69
69
|
function getBenchmarkMetadata() {
|
|
70
70
|
return { ...benchmarkMetadata };
|
package/dist/boot/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { At as RouteRegistry, nn as ComponentFunction, ut as RouteAuthOptions, zt as DataRuntime } from "../index-
|
|
2
|
-
import { a as ScrollRestorationOptions } from "../navigate-
|
|
1
|
+
import { At as RouteRegistry, nn as ComponentFunction, ut as RouteAuthOptions, zt as DataRuntime } from "../index-CTIBOqUB.js";
|
|
2
|
+
import { a as ScrollRestorationOptions } from "../navigate-eGm4omPj.js";
|
|
3
3
|
//#region src/boot/types.d.ts
|
|
4
4
|
/** Configuration for {@link createIsland}: mounts one component onto existing DOM. */
|
|
5
5
|
type IslandConfig = {
|
package/dist/boot/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-
|
|
1
|
+
import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-C1wT3Vfs.js";
|
|
2
2
|
export { cleanupApp, createIsland, createIslands, createSPA, hasApp, hydrateSPA };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { S as isProductionEnvironment, r as flushRuntimeScheduler, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
3
|
-
import { n as createComponentInstance, r as executeComponent } from "./component-internal-
|
|
4
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
3
|
+
import { n as createComponentInstance, r as executeComponent } from "./component-internal-D0yE2Ch3.js";
|
|
4
|
+
import { t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
|
|
5
5
|
import { p as isPromiseLike } from "./lifecycle-batch-BH0fax4F.js";
|
|
6
|
-
import {
|
|
7
|
-
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-DefafSjG.js";
|
|
6
|
+
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-D7uN-Z1s.js";
|
|
8
7
|
import { r as assertExecutionModel, t as _applyManifest } from "./manifest-D6rfj_jC.js";
|
|
9
8
|
import { d as stopHydrationRenderPhase, l as startHydrationRenderPhase, y as pageRenderEnvelope } from "./render-context-B7ohlh6t.js";
|
|
10
|
-
import { r as
|
|
9
|
+
import { a as setStaticChildSlotsCacheEnabled, c as endHydrationDirectListenerMode, d as discardHydrationListenerTransaction, i as registerDeferredHydrationBoundary, l as beginHydrationListenerTransaction, n as activateHydrationBoundary$1, o as withIntrinsicHydrationAdoption, r as clearDeferredHydrationBoundaries, s as beginHydrationDirectListenerMode, t as installRendererBridge, u as commitHydrationListenerTransaction } from "./renderer-tXX_xj86.js";
|
|
10
|
+
import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-BVybpV1v.js";
|
|
11
11
|
import { i as getDefaultDataRuntime } from "./data-runtime-JxoRgrrt.js";
|
|
12
12
|
import { a as hydrateDataRuntime } from "./query-registry-CimB1YeW.js";
|
|
13
13
|
import { I as lockRouteRegistration, P as hasRegisteredRoutes, _ as clearRouteState, m as _setActiveRouteAuthOptions } from "./route-matching-Bo6UqG-5.js";
|
|
14
|
-
import { a as resolveRouteRequest, i as hasRouteRenderData, m as reviveDeferredValue, n as getRouteRenderContext, r as getRouteRenderData } from "./resolution-
|
|
15
|
-
import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-
|
|
16
|
-
import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-
|
|
14
|
+
import { a as resolveRouteRequest, i as hasRouteRenderData, m as reviveDeferredValue, n as getRouteRenderContext, r as getRouteRenderData } from "./resolution-BQyo7qNn.js";
|
|
15
|
+
import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-d4t3CdzK.js";
|
|
16
|
+
import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-DChM5m8m.js";
|
|
17
17
|
import { n as disposeRegisteredDefaultPortalScope, r as getDefaultPortalHost } from "./default-portal-runtime-DvMvWJVp.js";
|
|
18
18
|
import "./ssr-DSHd_Q9K.js";
|
|
19
19
|
//#region src/boot/hydration.ts
|
|
@@ -323,6 +323,8 @@ function mountOrUpdate(rootElement, componentFn, options) {
|
|
|
323
323
|
instance._lastReadSources = void 0;
|
|
324
324
|
instance._placeholder = void 0;
|
|
325
325
|
instance.errorBoundaryState = void 0;
|
|
326
|
+
instance._portalErrorParent = void 0;
|
|
327
|
+
instance._portalErrorParentGeneration = void 0;
|
|
326
328
|
instance.devWarningsEmitted = void 0;
|
|
327
329
|
}
|
|
328
330
|
if (options && typeof options.cleanupStrict === "boolean") instance.cleanupStrict = options.cleanupStrict;
|
|
@@ -610,7 +612,7 @@ async function hydrateSPA(config) {
|
|
|
610
612
|
cspNonce: config.cspNonce
|
|
611
613
|
}));
|
|
612
614
|
if (shouldVerifyHydrationMarkup(config)) {
|
|
613
|
-
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-
|
|
615
|
+
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-m-wVbYOD.js");
|
|
614
616
|
if (!verifyHydrationSyncForUrl({
|
|
615
617
|
root: rootElement,
|
|
616
618
|
url: currentUrl,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as runRuntimeHandlerScope, y as logger } from "./access-d_DCdwqn.js";
|
|
2
2
|
import "./fastlane-DGo7SxBQ.js";
|
|
3
3
|
import { T as withAppRenderRuntime, d as getCurrentAppRenderRuntime } from "./component-scope-4I3yEMkb.js";
|
|
4
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
4
|
+
import { t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
|
|
5
5
|
import { u as registerLifecycleTransaction } from "./lifecycle-batch-BH0fax4F.js";
|
|
6
6
|
//#region src/runtime/events.ts
|
|
7
7
|
/**
|
|
@@ -124,6 +124,8 @@ function cleanupComponent(instance) {
|
|
|
124
124
|
instance.lifecycleSlots = void 0;
|
|
125
125
|
instance.hasPendingUpdate = false;
|
|
126
126
|
instance.notifyUpdate = null;
|
|
127
|
+
instance._portalErrorParent = void 0;
|
|
128
|
+
instance._portalErrorParentGeneration = void 0;
|
|
127
129
|
instance._placeholder = void 0;
|
|
128
130
|
instance.mounted = false;
|
|
129
131
|
if (cleanupErrors && cleanupErrors.length > 0) throw new AggregateError(cleanupErrors, `Cleanup failed for component ${instance.id}`);
|
|
@@ -366,6 +366,57 @@ function commitRenderedComponent$1(instance) {
|
|
|
366
366
|
if (instance.mounted && (instance.commitOperations?.length ?? 0) > 0) commitLifecycleForInstance(instance, false);
|
|
367
367
|
}
|
|
368
368
|
//#endregion
|
|
369
|
+
//#region src/runtime/error-boundary.ts
|
|
370
|
+
function createBoundaryReset(instance) {
|
|
371
|
+
return () => {
|
|
372
|
+
const boundaryState = instance.errorBoundaryState;
|
|
373
|
+
if (!boundaryState) return;
|
|
374
|
+
boundaryState.error = null;
|
|
375
|
+
boundaryState.notified = false;
|
|
376
|
+
queueMicrotask(() => {
|
|
377
|
+
instance._enqueueRun?.();
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
function reportBoundaryError(instance, error, onError) {
|
|
382
|
+
const boundaryState = instance.errorBoundaryState;
|
|
383
|
+
if (boundaryState && Object.is(boundaryState.error, error) && boundaryState.notified) return;
|
|
384
|
+
if (boundaryState) {
|
|
385
|
+
boundaryState.error = error;
|
|
386
|
+
boundaryState.notified = true;
|
|
387
|
+
}
|
|
388
|
+
try {
|
|
389
|
+
onError?.(error);
|
|
390
|
+
} catch (hookError) {
|
|
391
|
+
logger.error("[Askr] ErrorBoundary onError handler threw:", hookError);
|
|
392
|
+
}
|
|
393
|
+
logger.error("[Askr] ErrorBoundary caught render error:", error);
|
|
394
|
+
}
|
|
395
|
+
function getLivePortalErrorParent(instance) {
|
|
396
|
+
const parent = instance._portalErrorParent;
|
|
397
|
+
if (!parent || parent._ownershipGeneration !== instance._portalErrorParentGeneration || parent.notifyUpdate === null) return null;
|
|
398
|
+
return parent;
|
|
399
|
+
}
|
|
400
|
+
function findLiveErrorBoundary(failedInstance) {
|
|
401
|
+
const visited = /* @__PURE__ */ new Set([failedInstance]);
|
|
402
|
+
const visit = (instance) => {
|
|
403
|
+
if (!instance || visited.has(instance)) return null;
|
|
404
|
+
visited.add(instance);
|
|
405
|
+
if (instance.errorBoundaryState && instance.notifyUpdate !== null) return instance;
|
|
406
|
+
return visit(getLivePortalErrorParent(instance)) ?? visit(instance.parentInstance);
|
|
407
|
+
};
|
|
408
|
+
return visit(getLivePortalErrorParent(failedInstance)) ?? visit(failedInstance.parentInstance);
|
|
409
|
+
}
|
|
410
|
+
/** Route a scheduled component failure to its nearest live render boundary. */
|
|
411
|
+
function routeComponentErrorToBoundary(failedInstance, error) {
|
|
412
|
+
const boundary = findLiveErrorBoundary(failedInstance);
|
|
413
|
+
if (!boundary) return false;
|
|
414
|
+
const onError = boundary.props.onError;
|
|
415
|
+
reportBoundaryError(boundary, error, typeof onError === "function" ? onError : void 0);
|
|
416
|
+
boundary._enqueueRun?.();
|
|
417
|
+
return true;
|
|
418
|
+
}
|
|
419
|
+
//#endregion
|
|
369
420
|
//#region src/runtime/component-commit.ts
|
|
370
421
|
function runScheduledComponent(instance, host) {
|
|
371
422
|
const ownershipGeneration = instance._ownershipGeneration;
|
|
@@ -377,21 +428,32 @@ function runScheduledComponent(instance, host) {
|
|
|
377
428
|
result = host.execute(instance);
|
|
378
429
|
} catch (err) {
|
|
379
430
|
discardCommitOperations(instance);
|
|
431
|
+
if (routeComponentErrorToBoundary(instance, err)) return;
|
|
380
432
|
throw err;
|
|
381
433
|
}
|
|
382
|
-
if (isPromiseLike(result))
|
|
434
|
+
if (isPromiseLike(result)) {
|
|
435
|
+
const error = /* @__PURE__ */ new Error("Async components are not supported. Components must be synchronous.");
|
|
436
|
+
discardCommitOperations(instance);
|
|
437
|
+
if (routeComponentErrorToBoundary(instance, error)) return;
|
|
438
|
+
throw error;
|
|
439
|
+
}
|
|
383
440
|
try {
|
|
384
441
|
if (tryRuntimeFastLaneSync(instance, result)) return;
|
|
385
442
|
} catch (err) {
|
|
443
|
+
if (routeComponentErrorToBoundary(instance, err)) return;
|
|
386
444
|
if (isDevelopmentEnvironment()) throw err;
|
|
387
445
|
}
|
|
388
446
|
enqueueRuntimeTask(() => {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
447
|
+
try {
|
|
448
|
+
if (instance._ownershipGeneration !== ownershipGeneration || instance.evaluationGeneration !== evaluationGeneration) return;
|
|
449
|
+
if (!instance.target && instance._placeholder) {
|
|
450
|
+
commitPlaceholderReplacement(instance, result, host);
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
if (instance.target) commitToTarget(instance, result, host);
|
|
454
|
+
} catch (err) {
|
|
455
|
+
if (!routeComponentErrorToBoundary(instance, err)) throw err;
|
|
393
456
|
}
|
|
394
|
-
if (instance.target) commitToTarget(instance, result, host);
|
|
395
457
|
});
|
|
396
458
|
}
|
|
397
459
|
function commitPlaceholderReplacement(instance, result, host) {
|
|
@@ -604,7 +666,9 @@ function createComponentInstance(id, fn, props, target) {
|
|
|
604
666
|
_pendingReadSources: void 0,
|
|
605
667
|
_pendingReadSourceVersions: void 0,
|
|
606
668
|
_lastReadSources: void 0,
|
|
607
|
-
devWarningsEmitted: void 0
|
|
669
|
+
devWarningsEmitted: void 0,
|
|
670
|
+
_portalErrorParent: void 0,
|
|
671
|
+
_portalErrorParentGeneration: void 0
|
|
608
672
|
};
|
|
609
673
|
instance._enqueueRun = enqueueComponentRun;
|
|
610
674
|
return instance;
|
|
@@ -739,4 +803,4 @@ function warnInstanceOnce(instance, key, message) {
|
|
|
739
803
|
logger.warn(message);
|
|
740
804
|
}
|
|
741
805
|
//#endregion
|
|
742
|
-
export {
|
|
806
|
+
export { withContext as S, haveEquivalentContextFrames as _, registerCommitOperation as a, rebaseVNodeTreeWithContextFrame as b, createBoundaryReset as c, configureRenderDiagnostics as d, callWithContext as f, getVNodeContextFrame as g, getExecutionContextFrame as h, mountInstanceInline as i, reportBoundaryError as l, getCurrentContextFrame as m, createComponentInstance as n, renderComponentInline as o, defineScope as p, executeComponent as r, renderScopedComponent as s, captureInlineRenderSnapshot as t, registerCommitOperationForInstance as u, markVNodeTreeWithContextFrame as v, withAsyncResourceContext as x, readScope as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { in as VNode } from "../index-
|
|
1
|
+
import { in as VNode } from "../index-CTIBOqUB.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../types-DkVJhVs9.js";
|
|
3
3
|
//#region src/common/error-boundary.d.ts
|
|
4
4
|
type ErrorBoundaryContent = VNode | readonly VNode[];
|
|
@@ -17,7 +17,10 @@ interface ErrorBoundaryProps extends Props {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/error-boundary.d.ts
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Creates a boundary for descendant mount and post-mount render/commit errors,
|
|
22
|
+
* including content materialized through a portal host.
|
|
23
|
+
*/
|
|
21
24
|
declare function ErrorBoundary(props: ErrorBoundaryProps): JSXElement;
|
|
22
25
|
//#endregion
|
|
23
26
|
export { ErrorBoundary, type ErrorBoundaryFallbackRender, type ErrorBoundaryProps };
|
package/dist/components/index.js
CHANGED
|
@@ -30,7 +30,10 @@ function createBoundaryVNode(instance, props) {
|
|
|
30
30
|
__instance: instance
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Creates a boundary for descendant mount and post-mount render/commit errors,
|
|
35
|
+
* including content materialized through a portal host.
|
|
36
|
+
*/
|
|
34
37
|
function ErrorBoundary(props) {
|
|
35
38
|
const instance = getCurrentComponentInstance();
|
|
36
39
|
if (!instance) throw new Error("[Askr] ErrorBoundary() can only be used during component render execution.");
|
package/dist/control/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as Case, F as ShowProps, I as For, L as ForProps, M as Match, N as MatchProps, P as Show, j as CaseProps } from "../index-
|
|
1
|
+
import { A as Case, F as ShowProps, I as For, L as ForProps, M as Match, N as MatchProps, P as Show, j as CaseProps } from "../index-CTIBOqUB.js";
|
|
2
2
|
export { Case, type CaseProps, For, type ForProps, Match, type MatchProps, Show, type ShowProps };
|
package/dist/control/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as For, n as Match, r as Show, t as Case } from "../control-
|
|
1
|
+
import { i as For, n as Match, r as Show, t as Case } from "../control-C0klPV7Q.js";
|
|
2
2
|
export { Case, For, Match, Show };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as markEagerControlPrimitive, t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
|
|
2
2
|
import { x as isDevelopmentEnvironment } from "./access-d_DCdwqn.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-DRS-qjiN.js";
|
|
4
|
-
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-
|
|
4
|
+
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-DkBwTG4S.js";
|
|
5
5
|
import { t as createFineGrainedEffect } from "./effect-BdvdgMvV.js";
|
|
6
6
|
import { t as state } from "./state-DmkGM_LN.js";
|
|
7
7
|
//#region src/control/shared.ts
|
package/dist/data/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bt as DataRuntimeOptions, Gt as Query, Ht as InvalidateOptions, Jt as QueryKeyPart, Kt as QueryConsistency, Qt as ServerQueryHandler, S as createMutation, Ut as Mutation, Vt as InvalidateOnIntervalOptions, Wt as MutationOptions, Xt as QueryScope, Yt as QueryPrefetchContext, Zt as QueryStaleReason, _ as invalidateOnInterval, b as getDefaultDataRuntime, c as ServerQueryRegistry, d as defineServerQueries, f as dehydrateDataRuntime, g as invalidate, h as serveQuery, l as createQueryPrefetchContext, m as prefetchQuery, p as hydrateDataRuntime, qt as QueryDefinition, s as ServerQueryEntry, u as defineQuery, v as queryScope, x as createQuery, y as createDataRuntime, zt as DataRuntime } from "../index-
|
|
1
|
+
import { Bt as DataRuntimeOptions, Gt as Query, Ht as InvalidateOptions, Jt as QueryKeyPart, Kt as QueryConsistency, Qt as ServerQueryHandler, S as createMutation, Ut as Mutation, Vt as InvalidateOnIntervalOptions, Wt as MutationOptions, Xt as QueryScope, Yt as QueryPrefetchContext, Zt as QueryStaleReason, _ as invalidateOnInterval, b as getDefaultDataRuntime, c as ServerQueryRegistry, d as defineServerQueries, f as dehydrateDataRuntime, g as invalidate, h as serveQuery, l as createQueryPrefetchContext, m as prefetchQuery, p as hydrateDataRuntime, qt as QueryDefinition, s as ServerQueryEntry, u as defineQuery, v as queryScope, x as createQuery, y as createDataRuntime, zt as DataRuntime } from "../index-CTIBOqUB.js";
|
|
2
2
|
export { type DataRuntime, type DataRuntimeOptions, type InvalidateOnIntervalOptions, type InvalidateOptions, type Mutation, type MutationOptions, type Query, type QueryConsistency, type QueryDefinition, type QueryKeyPart, type QueryPrefetchContext, type QueryScope, type QueryStaleReason, type ServerQueryEntry, type ServerQueryHandler, type ServerQueryRegistry, createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
|
package/dist/data/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-JxoRgrrt.js";
|
|
2
|
-
import { c as queryScope, n as createMutation, o as invalidate, s as invalidateOnInterval, t as createQuery } from "../data-
|
|
2
|
+
import { c as queryScope, n as createMutation, o as invalidate, s as invalidateOnInterval, t as createQuery } from "../data-Bm8L6JOm.js";
|
|
3
3
|
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery, t as createQueryPrefetchContext } from "../query-registry-CimB1YeW.js";
|
|
4
4
|
export { createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
|
|
@@ -2,7 +2,7 @@ import { n as enqueueRuntimeTask, y as logger } from "./access-d_DCdwqn.js";
|
|
|
2
2
|
import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-4I3yEMkb.js";
|
|
3
3
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.js";
|
|
4
4
|
import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
|
|
5
|
-
import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-
|
|
5
|
+
import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-CBzG5PyB.js";
|
|
6
6
|
import { a as getMutationSlotStore, c as resolveDataRuntimeState, i as getDefaultDataRuntime, n as ensureMutationCleanup, o as getQuerySlotStore, r as ensureQueryCleanup, s as invalidateQueriesForRuntime } from "./data-runtime-JxoRgrrt.js";
|
|
7
7
|
//#region src/data/query-key.ts
|
|
8
8
|
function serializeQueryKeyNumber(part) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance } from "./component-scope-4I3yEMkb.js";
|
|
2
2
|
import { i as getExecutionModel } from "./manifest-D6rfj_jC.js";
|
|
3
3
|
import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-B7ohlh6t.js";
|
|
4
|
-
import { t as resource } from "./resource-operation-
|
|
4
|
+
import { t as resource } from "./resource-operation-B62UQKHV.js";
|
|
5
5
|
import { A as getDefaultRouteBasePath, C as getCurrentInheritedPolicies, D as getCurrentPathPrefix, E as getCurrentPageScope, F as insertRecordSorted, H as computeRank, L as pushRegistrationScope, N as hasActivePageScope, O as getCurrentScopeKind, S as getCurrentInheritedMeta, T as getCurrentPageChain, U as normalizeRouteSegmentName, W as parseSegments, g as assertRouteRegistrationUnlocked, h as addRouteToStores, w as getCurrentLayoutChain, x as getCurrentInheritedAuthRequirements } from "./route-matching-Bo6UqG-5.js";
|
|
6
|
-
import { _ as createRouteHandler, d as DEFERRED_BOUNDARY, p as isDeferred, s as guardHydratedRouteData } from "./resolution-
|
|
6
|
+
import { _ as createRouteHandler, d as DEFERRED_BOUNDARY, p as isDeferred, s as guardHydratedRouteData } from "./resolution-BQyo7qNn.js";
|
|
7
7
|
import { allOf } from "@askrjs/auth";
|
|
8
8
|
//#region src/router/access.ts
|
|
9
9
|
function compileNodePolicies(node) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
|
|
2
2
|
import { o as getRuntimeRenderer, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
|
|
3
3
|
import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
|
|
4
|
-
import {
|
|
4
|
+
import { _ as haveEquivalentContextFrames, b as rebaseVNodeTreeWithContextFrame, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-D0yE2Ch3.js";
|
|
5
5
|
import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.js";
|
|
6
|
-
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-
|
|
6
|
+
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
|
|
7
7
|
import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-BH0fax4F.js";
|
|
8
8
|
//#region src/runtime/child-scope.ts
|
|
9
9
|
const EMPTY_CHILD_SCOPE_PROPS = {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../types-DkVJhVs9.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-
|
|
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-S2IqSJib.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-CPycoyZj.js";
|
|
2
2
|
export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dn as State } from "../../index-
|
|
1
|
+
import { dn as State } from "../../index-CTIBOqUB.js";
|
|
2
2
|
//#region src/foundations/state/controllable.d.ts
|
|
3
3
|
/** Whether `value` represents controlled mode (not `undefined`). */
|
|
4
4
|
declare function isControlled<T>(value: T | undefined): value is T;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../../types-DkVJhVs9.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-
|
|
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-S2IqSJib.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-CPycoyZj.js";
|
|
2
2
|
export { DefaultPortal, Portal, Presence, Slot, cloneElement, createCollection, createLayer, definePortal, isElement, layout };
|
package/dist/fx/index.d.ts
CHANGED
|
@@ -731,6 +731,10 @@ interface ComponentInstance {
|
|
|
731
731
|
resetKey: unknown;
|
|
732
732
|
notified: boolean;
|
|
733
733
|
};
|
|
734
|
+
/** @internal Logical error ancestry for content materialized by a portal host. */
|
|
735
|
+
_portalErrorParent?: ComponentInstance | null;
|
|
736
|
+
/** @internal Ownership identity paired with `_portalErrorParent`. */
|
|
737
|
+
_portalErrorParentGeneration?: object;
|
|
734
738
|
}
|
|
735
739
|
//#endregion
|
|
736
740
|
//#region src/runtime/component-scope.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as Scope, A as Case, B as RenderDiagnosticsOptions, C as Ref, D as registerSSRStyle, F as ShowProps, G as AskrRuntimeOptions, H as Derived, I as For, J as createRuntime, K as RuntimeKeyedReorderDecision, L as ForProps, M as Match, N as MatchProps, O as CspNonceScope, P as Show, Qt as ServerQueryHandler, R as Selector, U as derive, V as configureRenderDiagnostics, W as AskrRuntime, Y as getDefaultRuntime, Yt as QueryPrefetchContext, Z as getSignal, d as defineServerQueries, dn as State, en as defineScope, f as dehydrateDataRuntime, fn as StateSetter, h as serveQuery, j as CaseProps, k as cspNonce, m as prefetchQuery, mn as state, p as hydrateDataRuntime, pn as StateTuple, q as RuntimeRendererHost, qt as QueryDefinition, tn as readScope, u as defineQuery, w as createRef, x as createQuery, z as selector, zt as DataRuntime } from "./index-
|
|
1
|
+
import { $t as Scope, A as Case, B as RenderDiagnosticsOptions, C as Ref, D as registerSSRStyle, F as ShowProps, G as AskrRuntimeOptions, H as Derived, I as For, J as createRuntime, K as RuntimeKeyedReorderDecision, L as ForProps, M as Match, N as MatchProps, O as CspNonceScope, P as Show, Qt as ServerQueryHandler, R as Selector, U as derive, V as configureRenderDiagnostics, W as AskrRuntime, Y as getDefaultRuntime, Yt as QueryPrefetchContext, Z as getSignal, d as defineServerQueries, dn as State, en as defineScope, f as dehydrateDataRuntime, fn as StateSetter, h as serveQuery, j as CaseProps, k as cspNonce, m as prefetchQuery, mn as state, p as hydrateDataRuntime, pn as StateTuple, q as RuntimeRendererHost, qt as QueryDefinition, tn as readScope, u as defineQuery, w as createRef, x as createQuery, z as selector, zt as DataRuntime } from "./index-CTIBOqUB.js";
|
|
2
2
|
import { s as Props, t as Fragment } from "./types-DkVJhVs9.js";
|
|
3
3
|
import { i as jsxs, n as jsx } from "./jsx-runtime-Cdd6Gkb0.js";
|
|
4
4
|
export { AskrRuntime, type AskrRuntimeOptions, Case, type CaseProps, CspNonceScope, type DataRuntime, type Derived, For, type ForProps, Fragment, Match, type MatchProps, type Props, type QueryDefinition, type QueryPrefetchContext, type Ref, type RenderDiagnosticsOptions, type RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, configureRenderDiagnostics, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { a as getRuntimeFlushVersion, f as AskrRuntime, h as getDefaultRuntime, m as createRuntime, t as enqueueRuntimeLane } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-DRS-qjiN.js";
|
|
4
|
-
import {
|
|
4
|
+
import { d as configureRenderDiagnostics, p as defineScope, y as readScope } from "./component-internal-D0yE2Ch3.js";
|
|
5
5
|
import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
|
-
import { t as installRendererBridge } from "./renderer-CLvq458M.js";
|
|
8
7
|
import { c as registerSSRStyle } from "./render-context-B7ohlh6t.js";
|
|
9
8
|
import { t as state } from "./state-DmkGM_LN.js";
|
|
10
9
|
import { t as selector } from "./selector-CyK-sDwB.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { t as installRendererBridge } from "./renderer-tXX_xj86.js";
|
|
11
|
+
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-BVybpV1v.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-C0klPV7Q.js";
|
|
13
13
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
14
|
-
import { t as createQuery } from "./data-
|
|
14
|
+
import { t as createQuery } from "./data-Bm8L6JOm.js";
|
|
15
15
|
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-CimB1YeW.js";
|
|
16
16
|
//#region src/runtime/derive.ts
|
|
17
17
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-4I3yEMkb.js";
|
|
2
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
2
|
+
import { a as registerCommitOperation } from "./component-internal-D0yE2Ch3.js";
|
|
3
3
|
import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
|
|
4
4
|
//#region src/runtime/lifecycle-operations.ts
|
|
5
5
|
function normalizePredicates(predicates) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { S as isProductionEnvironment, r as flushRuntimeScheduler, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
3
|
-
import { r as executeComponent } from "./component-internal-
|
|
3
|
+
import { r as executeComponent } from "./component-internal-D0yE2Ch3.js";
|
|
4
4
|
import { t as cleanupReadableSubscriptionSources } from "./readable-BsdGWsDE.js";
|
|
5
|
-
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-
|
|
5
|
+
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
|
|
6
6
|
import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-BH0fax4F.js";
|
|
7
|
-
import { _ as teardownNodeSubtree } from "./cleanup-
|
|
8
|
-
import { t as CspNonceScope } from "./csp-nonce-
|
|
7
|
+
import { _ as teardownNodeSubtree } from "./cleanup-D7uN-Z1s.js";
|
|
8
|
+
import { t as CspNonceScope } from "./csp-nonce-BVybpV1v.js";
|
|
9
9
|
import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-Bo6UqG-5.js";
|
|
10
|
-
import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-
|
|
11
|
-
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-
|
|
10
|
+
import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-BQyo7qNn.js";
|
|
11
|
+
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-d4t3CdzK.js";
|
|
12
12
|
import { r as getDefaultPortalHost, t as clearRegisteredDefaultPortalForInstance } from "./default-portal-runtime-DvMvWJVp.js";
|
|
13
13
|
//#region src/router/navigation-registry.ts
|
|
14
14
|
let currentInstance = null;
|
|
@@ -4,42 +4,15 @@ import { b as getRuntimeEnv, i as getDefaultRuntimeInstance, l as runRuntimeHand
|
|
|
4
4
|
import { n as isBulkCommitActive, r as markFastPathApplied } from "./fastlane-DGo7SxBQ.js";
|
|
5
5
|
import { T as withAppRenderRuntime, b as restoreDomCommitScope, c as enterDomCommitScope, d as getCurrentAppRenderRuntime, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
|
|
6
6
|
import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-DRS-qjiN.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
7
|
+
import { S as withContext, c as createBoundaryReset, g as getVNodeContextFrame, i as mountInstanceInline, l as reportBoundaryError, m as getCurrentContextFrame, n as createComponentInstance, o as renderComponentInline, t as captureInlineRenderSnapshot, v as markVNodeTreeWithContextFrame } from "./component-internal-D0yE2Ch3.js";
|
|
8
|
+
import { t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
|
|
9
9
|
import { c as getCurrentLifecycleCommitBatch, l as registerLifecycleRollback, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-BH0fax4F.js";
|
|
10
|
-
import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-
|
|
10
|
+
import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-DkBwTG4S.js";
|
|
11
11
|
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-BdvdgMvV.js";
|
|
12
|
-
import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-
|
|
12
|
+
import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-D7uN-Z1s.js";
|
|
13
13
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
14
|
-
import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-
|
|
14
|
+
import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-BVybpV1v.js";
|
|
15
15
|
import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
|
|
16
|
-
//#region src/runtime/error-boundary.ts
|
|
17
|
-
function createBoundaryReset(instance) {
|
|
18
|
-
return () => {
|
|
19
|
-
const boundaryState = instance.errorBoundaryState;
|
|
20
|
-
if (!boundaryState) return;
|
|
21
|
-
boundaryState.error = null;
|
|
22
|
-
boundaryState.notified = false;
|
|
23
|
-
queueMicrotask(() => {
|
|
24
|
-
instance._enqueueRun?.();
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function reportBoundaryError(instance, error, onError) {
|
|
29
|
-
const boundaryState = instance.errorBoundaryState;
|
|
30
|
-
if (boundaryState && Object.is(boundaryState.error, error) && boundaryState.notified) return;
|
|
31
|
-
if (boundaryState) {
|
|
32
|
-
boundaryState.error = error;
|
|
33
|
-
boundaryState.notified = true;
|
|
34
|
-
}
|
|
35
|
-
try {
|
|
36
|
-
onError?.(error);
|
|
37
|
-
} catch (hookError) {
|
|
38
|
-
logger.error("[Askr] ErrorBoundary onError handler threw:", hookError);
|
|
39
|
-
}
|
|
40
|
-
logger.error("[Askr] ErrorBoundary caught render error:", error);
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
16
|
//#region src/renderer/utils.ts
|
|
44
17
|
/**
|
|
45
18
|
* Shared utilities for the renderer module.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
2
|
-
import {
|
|
2
|
+
import { p as defineScope, y as readScope } from "./component-internal-D0yE2Ch3.js";
|
|
3
3
|
import { p as isPromiseLike } from "./lifecycle-batch-BH0fax4F.js";
|
|
4
4
|
import { S as withPageFramework, b as replacePageRoute, n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
|
|
5
|
-
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
5
|
+
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-BVybpV1v.js";
|
|
6
6
|
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-CimB1YeW.js";
|
|
7
7
|
import { c as removeRouteBasePath, i as getMatchingRouteRecord, l as buildRouteContext, o as addRouteBasePath, s as normalizeRouteBasePath, u as buildRouteContextBase, v as getActiveRouteAuthOptions } from "./route-matching-Bo6UqG-5.js";
|
|
8
8
|
//#region src/router/route-data-loader.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane, y as logger } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { f as getCurrentComponentInstance } from "./component-scope-4I3yEMkb.js";
|
|
3
|
-
import {
|
|
3
|
+
import { m as getCurrentContextFrame, u as registerCommitOperationForInstance, x as withAsyncResourceContext } from "./component-internal-D0yE2Ch3.js";
|
|
4
4
|
import { p as isPromiseLike } from "./lifecycle-batch-BH0fax4F.js";
|
|
5
5
|
import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
6
6
|
import { C as SSRDataMissingError, a as getResourceVerificationSnapshot, i as getNextRenderKey, n as getActiveRenderContext, o as isHydrationVerificationRender, p as throwSSRDataMissing, r as getCurrentRenderData, s as recordResourceVerificationSnapshot } from "./render-context-B7ohlh6t.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as getSignal } from "../index-
|
|
2
|
-
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-
|
|
1
|
+
import { Z as getSignal } from "../index-CTIBOqUB.js";
|
|
2
|
+
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-D_5x2HXQ.js";
|
|
3
3
|
//#region src/runtime/resource-operation.d.ts
|
|
4
4
|
/** Reactive result of a {@link resource}: current value, loading state, and controls. */
|
|
5
5
|
interface ResourceResult<T> {
|
package/dist/resources/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane } from "../access-d_DCdwqn.js";
|
|
2
2
|
import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-4I3yEMkb.js";
|
|
3
|
-
import { a as registerCommitOperation } from "../component-internal-
|
|
4
|
-
import { t as resource } from "../resource-operation-
|
|
5
|
-
import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-
|
|
6
|
-
import { n as onRouteChange } from "../activity-
|
|
3
|
+
import { a as registerCommitOperation } from "../component-internal-D0yE2Ch3.js";
|
|
4
|
+
import { t as resource } from "../resource-operation-B62UQKHV.js";
|
|
5
|
+
import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-CBzG5PyB.js";
|
|
6
|
+
import { n as onRouteChange } from "../activity-d4t3CdzK.js";
|
|
7
7
|
//#region src/runtime/stream-operation.ts
|
|
8
8
|
function toError(value) {
|
|
9
9
|
return value instanceof Error ? value : new Error(String(value));
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as AccessDecision, At as RouteRegistry, Ct as RouteParams, Dt as RouteRecord, Et as RouteQuery, Ft as RouteSearch, It as RouteSearchValue, Lt as RouteSnapshot, Mt as RouteRenderResult, Nt as RouteRequestOptions, Ot as RouteRef, Pt as RouteRequestResult, Q as AccessAllowDecision, St as RouteOptions, Tt as RoutePolicy, _t as RouteManifest, at as LayoutScopeRecord, bt as RouteMetaSource, ct as ParsedSegment, dt as RouteAuthResolver, et as AccessDenyDecision, ft as RouteComponent, gt as RouteHandler, ht as RouteDestination, it as GroupHelperOptions, jt as RouteRegistryOptions, kt as RouteRefSearch, lt as Route, mt as RouteDefinition, nt as AccessRedirectDecision, ot as PageHelperOptions, pt as RouteContext, rn as RenderableChild, rt as AccessRedirectStatus, st as PageScopeRecord, tt as AccessDenyStatus, ut as RouteAuthOptions, vt as RouteMatch, wt as RoutePathParams, xt as RouteMode, yt as RouteMeta } from "../index-
|
|
1
|
+
import { $ as AccessDecision, At as RouteRegistry, Ct as RouteParams, Dt as RouteRecord, Et as RouteQuery, Ft as RouteSearch, It as RouteSearchValue, Lt as RouteSnapshot, Mt as RouteRenderResult, Nt as RouteRequestOptions, Ot as RouteRef, Pt as RouteRequestResult, Q as AccessAllowDecision, St as RouteOptions, Tt as RoutePolicy, _t as RouteManifest, at as LayoutScopeRecord, bt as RouteMetaSource, ct as ParsedSegment, dt as RouteAuthResolver, et as AccessDenyDecision, ft as RouteComponent, gt as RouteHandler, ht as RouteDestination, it as GroupHelperOptions, jt as RouteRegistryOptions, kt as RouteRefSearch, lt as Route, mt as RouteDefinition, nt as AccessRedirectDecision, ot as PageHelperOptions, pt as RouteContext, rn as RenderableChild, rt as AccessRedirectStatus, st as PageScopeRecord, tt as AccessDenyStatus, ut as RouteAuthOptions, vt as RouteMatch, wt as RoutePathParams, xt as RouteMode, yt as RouteMeta } from "../index-CTIBOqUB.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../types-DkVJhVs9.js";
|
|
3
|
-
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-
|
|
4
|
-
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-
|
|
3
|
+
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-eGm4omPj.js";
|
|
4
|
+
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-D_5x2HXQ.js";
|
|
5
5
|
import { AuthContext, AuthContext as AuthContext$1, AuthRequirement, AuthRequirement as AuthRequirement$1 } from "@askrjs/auth";
|
|
6
6
|
import { ObjectSchema } from "@askrjs/schema";
|
|
7
7
|
//#region src/router/route-query.d.ts
|
package/dist/router/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as createRouteRegistry } from "../manifest-D6rfj_jC.js";
|
|
2
|
-
import { a as isSafeHref } from "../csp-nonce-
|
|
2
|
+
import { a as isSafeHref } from "../csp-nonce-BVybpV1v.js";
|
|
3
3
|
import { jsx } from "../jsx-runtime.js";
|
|
4
4
|
import { o as addRouteBasePath, y as getActiveRouteBasePath } from "../route-matching-Bo6UqG-5.js";
|
|
5
|
-
import { a as group, c as route, i as fallback, n as resolveDeferredValues, o as index, r as routeData, s as page, t as Resolve } from "../deferred-
|
|
6
|
-
import { S as RouteDataLoadError, a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred, x as lazyRouteData } from "../resolution-
|
|
7
|
-
import { n as onRouteChange, t as currentRoute } from "../activity-
|
|
8
|
-
import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-
|
|
5
|
+
import { a as group, c as route, i as fallback, n as resolveDeferredValues, o as index, r as routeData, s as page, t as Resolve } from "../deferred-p8hyanxJ.js";
|
|
6
|
+
import { S as RouteDataLoadError, a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred, x as lazyRouteData } from "../resolution-BQyo7qNn.js";
|
|
7
|
+
import { n as onRouteChange, t as currentRoute } from "../activity-d4t3CdzK.js";
|
|
8
|
+
import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-DChM5m8m.js";
|
|
9
9
|
import { o as mergeProps } from "../compose-ref-1Fhs7mbF.js";
|
|
10
10
|
import { t as applyInteractionPolicy } from "../interactions-B4XaFxt1.js";
|
|
11
11
|
//#region src/router/route-query.ts
|
package/dist/ssg/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as RouteRegistry, St as RouteOptions, Tt as RoutePolicy, an as DocumentRenderArgs, gt as RouteHandler, on as DocumentRenderContext, sn as DocumentRenderer, un as SSRStyleRegistrationValidation, wt as RoutePathParams } from "../index-
|
|
1
|
+
import { At as RouteRegistry, St as RouteOptions, Tt as RoutePolicy, an as DocumentRenderArgs, gt as RouteHandler, on as DocumentRenderContext, sn as DocumentRenderer, un as SSRStyleRegistrationValidation, wt as RoutePathParams } from "../index-CTIBOqUB.js";
|
|
2
2
|
import { AuthRequirement } from "@askrjs/auth";
|
|
3
3
|
import "node:fs/promises";
|
|
4
4
|
//#region src/ssg/types.d.ts
|
package/dist/ssg/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../access-d_DCdwqn.js";
|
|
2
2
|
import { n as createRouteRegistry } from "../manifest-D6rfj_jC.js";
|
|
3
3
|
import { o as addRouteBasePath } from "../route-matching-Bo6UqG-5.js";
|
|
4
|
-
import { c as route, n as resolveDeferredValues } from "../deferred-
|
|
5
|
-
import { S as RouteDataLoadError, c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-
|
|
4
|
+
import { c as route, n as resolveDeferredValues } from "../deferred-p8hyanxJ.js";
|
|
5
|
+
import { S as RouteDataLoadError, c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-BQyo7qNn.js";
|
|
6
6
|
import { n as renderDocument } from "../ssr-DSHd_Q9K.js";
|
|
7
|
-
import { n as renderToString } from "../ssr-
|
|
7
|
+
import { n as renderToString } from "../ssr-DYcK20IX.js";
|
|
8
8
|
import * as fs from "node:fs/promises";
|
|
9
9
|
import * as pathModule from "node:path";
|
|
10
10
|
import * as os from "node:os";
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as RouteRegistry, Dt as RouteRecord, E as SSRPortalState, Pt as RouteRequestResult, Rt as CoreTelemetry, T as DeferredBoundaryRegistration, Yt as QueryPrefetchContext, an as DocumentRenderArgs, c as ServerQueryRegistry, cn as SSRData, et as AccessDenyDecision, gt as RouteHandler, ln as SSRStyleRegistration, lt as Route, nt as AccessRedirectDecision, on as DocumentRenderContext, sn as DocumentRenderer, un as SSRStyleRegistrationValidation, ut as RouteAuthOptions, zt as DataRuntime } from "../index-
|
|
1
|
+
import { At as RouteRegistry, Dt as RouteRecord, E as SSRPortalState, Pt as RouteRequestResult, Rt as CoreTelemetry, T as DeferredBoundaryRegistration, Yt as QueryPrefetchContext, an as DocumentRenderArgs, c as ServerQueryRegistry, cn as SSRData, et as AccessDenyDecision, gt as RouteHandler, ln as SSRStyleRegistration, lt as Route, nt as AccessRedirectDecision, on as DocumentRenderContext, sn as DocumentRenderer, un as SSRStyleRegistrationValidation, ut as RouteAuthOptions, zt as DataRuntime } from "../index-CTIBOqUB.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../types-DkVJhVs9.js";
|
|
3
3
|
import { AuthContext } from "@askrjs/auth";
|
|
4
4
|
//#region src/common/page-render-envelope.d.ts
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { C as SSRDataMissingError } from "../render-context-B7ohlh6t.js";
|
|
2
|
-
import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-
|
|
2
|
+
import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-DYcK20IX.js";
|
|
3
3
|
export { SSRDataMissingError, createRenderContext, getRenderContext, renderResolvedToStringSync, renderRouteRequest, renderRouteRequestToString, renderToStream, renderToString, renderToStringSync, resolveRequest, withRenderContext, withRenderContextAsync };
|
|
@@ -3,18 +3,18 @@ import { t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
|
|
|
3
3
|
import { y as logger } from "./access-d_DCdwqn.js";
|
|
4
4
|
import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-4I3yEMkb.js";
|
|
5
5
|
import { i as isFragmentType, n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
6
|
+
import { f as callWithContext, g as getVNodeContextFrame, h as getExecutionContextFrame, n as createComponentInstance, v as markVNodeTreeWithContextFrame } from "./component-internal-D0yE2Ch3.js";
|
|
7
|
+
import { t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
|
|
8
8
|
import { p as isPromiseLike } from "./lifecycle-batch-BH0fax4F.js";
|
|
9
|
-
import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-
|
|
9
|
+
import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-DkBwTG4S.js";
|
|
10
10
|
import { C as SSRDataMissingError, _ as isEmptyPageRenderEnvelope, f as stopRenderPhase$1, h as createPageRenderEnvelope, t as configureRenderContextProvider, u as startRenderPhase$1, v as isPageRenderEnvelope, x as withHydrationRenderUrl } from "./render-context-B7ohlh6t.js";
|
|
11
11
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
12
|
-
import { o as isUnsafeUrlAttribute, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
12
|
+
import { o as isUnsafeUrlAttribute, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-BVybpV1v.js";
|
|
13
13
|
import { n as SSR_PORTAL_HOST, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
|
|
14
14
|
import { t as createDataRuntime } from "./data-runtime-JxoRgrrt.js";
|
|
15
15
|
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-CimB1YeW.js";
|
|
16
16
|
import { a as resolveRouteFromRoutes, c as removeRouteBasePath, s as normalizeRouteBasePath, t as _resolveRouteMatchFromRoutes } from "./route-matching-Bo6UqG-5.js";
|
|
17
|
-
import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-
|
|
17
|
+
import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-BQyo7qNn.js";
|
|
18
18
|
import { n as disposeRegisteredDefaultPortalScope, r as getDefaultPortalHost } from "./default-portal-runtime-DvMvWJVp.js";
|
|
19
19
|
import { n as renderDocument, t as SSR_RENDER_DATA_ATTR } from "./ssr-DSHd_Q9K.js";
|
|
20
20
|
//#region src/ssr/escape.ts
|
|
@@ -2,7 +2,7 @@ import { o as getRuntimeRenderer } from "./access-d_DCdwqn.js";
|
|
|
2
2
|
import { f as getCurrentComponentInstance, m as getCurrentPortalScope } from "./component-scope-4I3yEMkb.js";
|
|
3
3
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
4
4
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.js";
|
|
5
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
5
|
+
import { t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
|
|
6
6
|
import { c as getCurrentLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-BH0fax4F.js";
|
|
7
7
|
import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
|
|
8
8
|
import { i as createSSRPortalHostToken, n as SSR_PORTAL_HOST, r as createSSRPortalAnchorToken, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
|
|
@@ -110,6 +110,16 @@ function Presence({ present, children }) {
|
|
|
110
110
|
//#endregion
|
|
111
111
|
//#region src/runtime/portal.ts
|
|
112
112
|
const DEFAULT_SSR_PORTAL_KEY = {};
|
|
113
|
+
function setPortalErrorParent(host, owner) {
|
|
114
|
+
if (!host) return;
|
|
115
|
+
if (owner && owner.instance._ownershipGeneration === owner.generation && owner.instance.notifyUpdate !== null) {
|
|
116
|
+
host._portalErrorParent = owner.instance;
|
|
117
|
+
host._portalErrorParentGeneration = owner.generation;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
host._portalErrorParent = null;
|
|
121
|
+
host._portalErrorParentGeneration = void 0;
|
|
122
|
+
}
|
|
113
123
|
function getSSRPortalSlot(key) {
|
|
114
124
|
const context = getActiveRenderContext();
|
|
115
125
|
if (context?.mode !== "ssr") return null;
|
|
@@ -160,6 +170,7 @@ function createSSRPortalAnchor() {
|
|
|
160
170
|
}
|
|
161
171
|
function createPortalSlot() {
|
|
162
172
|
let currentValue;
|
|
173
|
+
let currentOwner = null;
|
|
163
174
|
const source = (() => {
|
|
164
175
|
recordReadableRead(source);
|
|
165
176
|
return currentValue;
|
|
@@ -168,12 +179,17 @@ function createPortalSlot() {
|
|
|
168
179
|
read() {
|
|
169
180
|
return source();
|
|
170
181
|
},
|
|
171
|
-
write(value) {
|
|
172
|
-
|
|
182
|
+
write(value, owner) {
|
|
183
|
+
const ownerChanged = currentOwner?.instance !== owner?.instance || currentOwner?.generation !== owner?.generation;
|
|
184
|
+
currentOwner = owner;
|
|
185
|
+
if (Object.is(currentValue, value) && !ownerChanged) return;
|
|
173
186
|
currentValue = value;
|
|
174
187
|
markReadableDerivedSubscribersDirty(source);
|
|
175
188
|
markReactivePropsDirtySource(source);
|
|
176
189
|
notifyReadableReaders(source);
|
|
190
|
+
},
|
|
191
|
+
getOwner() {
|
|
192
|
+
return currentOwner;
|
|
177
193
|
}
|
|
178
194
|
};
|
|
179
195
|
}
|
|
@@ -185,11 +201,17 @@ function definePortal() {
|
|
|
185
201
|
function PortalHost() {
|
|
186
202
|
const serverHost = createSSRPortalHost(ssrPortalKey, false);
|
|
187
203
|
if (serverHost) return serverHost;
|
|
204
|
+
const host = getCurrentComponentInstance();
|
|
205
|
+
if (host?.fn === PortalHost) setPortalErrorParent(host, slot.getOwner());
|
|
188
206
|
return slot.read();
|
|
189
207
|
}
|
|
190
208
|
PortalHost.render = function PortalRender(props) {
|
|
191
209
|
if (writeSSRPortal(ssrPortalKey, props.children)) return null;
|
|
192
|
-
|
|
210
|
+
const owner = getCurrentComponentInstance();
|
|
211
|
+
slot.write(props.children, owner ? {
|
|
212
|
+
instance: owner,
|
|
213
|
+
generation: owner._ownershipGeneration
|
|
214
|
+
} : null);
|
|
193
215
|
return null;
|
|
194
216
|
};
|
|
195
217
|
return PortalHost;
|
|
@@ -232,7 +254,7 @@ function clearTrackedBatchPortalWrite(transaction) {
|
|
|
232
254
|
batch = batch.parent;
|
|
233
255
|
}
|
|
234
256
|
}
|
|
235
|
-
function
|
|
257
|
+
function createPortalStateSource(readCount) {
|
|
236
258
|
let source = (() => {
|
|
237
259
|
recordReadableRead(source);
|
|
238
260
|
return readCount();
|
|
@@ -247,6 +269,14 @@ function notifyExplicitDefaultPortalHostReaders(state) {
|
|
|
247
269
|
markReactivePropsDirtySource(state.explicitHostSource);
|
|
248
270
|
notifyReadableReaders(state.explicitHostSource);
|
|
249
271
|
}
|
|
272
|
+
function setDefaultPortalOwner(state, owner) {
|
|
273
|
+
if (state.owner?.instance === owner?.instance && state.owner?.generation === owner?.generation) return;
|
|
274
|
+
state.owner = owner;
|
|
275
|
+
state.ownerVersion += 1;
|
|
276
|
+
markReadableDerivedSubscribersDirty(state.ownerSource);
|
|
277
|
+
markReactivePropsDirtySource(state.ownerSource);
|
|
278
|
+
notifyReadableReaders(state.ownerSource);
|
|
279
|
+
}
|
|
250
280
|
function createDefaultPortalState() {
|
|
251
281
|
const state = {
|
|
252
282
|
portal: definePortal(),
|
|
@@ -255,9 +285,12 @@ function createDefaultPortalState() {
|
|
|
255
285
|
cleanupOwners: /* @__PURE__ */ new WeakSet(),
|
|
256
286
|
explicitHostOwners: /* @__PURE__ */ new Map(),
|
|
257
287
|
explicitHostCleanupOwners: /* @__PURE__ */ new WeakSet(),
|
|
258
|
-
explicitHostSource: (() => 0)
|
|
288
|
+
explicitHostSource: (() => 0),
|
|
289
|
+
ownerVersion: 0,
|
|
290
|
+
ownerSource: (() => 0)
|
|
259
291
|
};
|
|
260
|
-
state.explicitHostSource =
|
|
292
|
+
state.explicitHostSource = createPortalStateSource(() => state.explicitHostOwners.size);
|
|
293
|
+
state.ownerSource = createPortalStateSource(() => state.ownerVersion);
|
|
261
294
|
return state;
|
|
262
295
|
}
|
|
263
296
|
function disposeDefaultPortalScope(scope) {
|
|
@@ -295,7 +328,7 @@ function detachDefaultPortalHostOutput(state) {
|
|
|
295
328
|
}
|
|
296
329
|
function applyDefaultPortalWrite(state, children, owner) {
|
|
297
330
|
state.portal.render({ children });
|
|
298
|
-
state
|
|
331
|
+
setDefaultPortalOwner(state, owner);
|
|
299
332
|
if (isEmptyPortalValue(children)) detachDefaultPortalHostOutput(state);
|
|
300
333
|
}
|
|
301
334
|
function isStaleDefaultPortalScope(scope) {
|
|
@@ -405,7 +438,7 @@ function applyPendingDefaultPortalValue(scope) {
|
|
|
405
438
|
if (!_hasPendingDefaultPortalValue) return;
|
|
406
439
|
const state = getDefaultPortalState(scope);
|
|
407
440
|
state.portal.render({ children: _pendingDefaultPortalValue });
|
|
408
|
-
state
|
|
441
|
+
setDefaultPortalOwner(state, null);
|
|
409
442
|
_hasPendingDefaultPortalValue = false;
|
|
410
443
|
_pendingDefaultPortalValue = void 0;
|
|
411
444
|
}
|
|
@@ -460,7 +493,7 @@ function clearDefaultPortalForInstance(instance) {
|
|
|
460
493
|
_hasPendingDefaultPortalValue = false;
|
|
461
494
|
_pendingDefaultPortalValue = void 0;
|
|
462
495
|
state.portal.render({ children: void 0 });
|
|
463
|
-
state
|
|
496
|
+
setDefaultPortalOwner(state, null);
|
|
464
497
|
detachDefaultPortalHostOutput(state);
|
|
465
498
|
}
|
|
466
499
|
/**
|
|
@@ -482,6 +515,8 @@ const DefaultPortal = (() => {
|
|
|
482
515
|
if (!(props?.__askrAutoDefaultPortal === true)) registerExplicitDefaultPortalHost(scope, state, owner);
|
|
483
516
|
else if (readExplicitDefaultPortalHosts(state) > 0) return null;
|
|
484
517
|
applyPendingDefaultPortalValue(scope);
|
|
518
|
+
state.ownerSource();
|
|
519
|
+
setPortalErrorParent(owner, state.owner);
|
|
485
520
|
const value = state.portal();
|
|
486
521
|
return value === void 0 ? null : value;
|
|
487
522
|
}
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as RouteRegistry, Gt as Query, Ut as Mutation, Zt as QueryStaleReason, nn as ComponentFunction, ut as RouteAuthOptions, vt as RouteMatch, zt as DataRuntime } from "../index-
|
|
1
|
+
import { At as RouteRegistry, Gt as Query, Ut as Mutation, Zt as QueryStaleReason, nn as ComponentFunction, ut as RouteAuthOptions, vt as RouteMatch, zt as DataRuntime } from "../index-CTIBOqUB.js";
|
|
2
2
|
//#region src/testing/render.d.ts
|
|
3
3
|
/** Options for {@link render} and {@link mount}. */
|
|
4
4
|
interface RenderOptions {
|
package/dist/testing/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as flushRuntimeScheduler } from "../access-d_DCdwqn.js";
|
|
2
2
|
import { u as recordReadableRead } from "../readable-BsdGWsDE.js";
|
|
3
3
|
import { l as addInvalidationListener, t as createDataRuntime } from "../data-runtime-JxoRgrrt.js";
|
|
4
|
-
import { a as notifySource, i as normalizeAsyncDataError, r as createReadableSource } from "../data-
|
|
4
|
+
import { a as notifySource, i as normalizeAsyncDataError, r as createReadableSource } from "../data-Bm8L6JOm.js";
|
|
5
5
|
import { r as computeRouteActivityMatches } from "../route-matching-Bo6UqG-5.js";
|
|
6
|
-
import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-
|
|
6
|
+
import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-C1wT3Vfs.js";
|
|
7
7
|
//#region src/testing/render.ts
|
|
8
8
|
const renderStates = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
const eventConstructorNames = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as getHydrationRenderUrl, m as withHydrationVerificationRender } from "./render-context-B7ohlh6t.js";
|
|
2
2
|
import { t as SSR_RENDER_DATA_ATTR } from "./ssr-DSHd_Q9K.js";
|
|
3
|
-
import { a as renderResolvedToStringSync } from "./ssr-
|
|
3
|
+
import { a as renderResolvedToStringSync } from "./ssr-DYcK20IX.js";
|
|
4
4
|
//#region src/ssr/verify-hydration.ts
|
|
5
5
|
function normalizeHydrationHtml(html) {
|
|
6
6
|
const template = document.createElement("template");
|