@askrjs/askr 0.0.88 → 0.0.89
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/actions/index.d.ts +1 -1
- package/dist/actions/index.js +1 -1
- package/dist/{activity-VMb7aJVx.d.ts → activity-CF2_JvJs.d.ts} +1 -1
- package/dist/{activity-C9naVZwy.js → activity-CQKEAORw.js} +3 -2
- package/dist/benchmark.js +5 -5
- package/dist/boot/index.d.ts +6 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-BVHzYQz8.js → boot-CrbszDjZ.js} +24 -14
- package/dist/{component-internal-uVCJAre6.js → component-internal-C4uwwUaK.js} +31 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-DlwTrXBN.js → control-CON10J1p.js} +1 -1
- package/dist/{control-x8iehxf7.d.ts → control-D-FIa-n-.d.ts} +2 -0
- package/dist/{csp-nonce-CUscoNF1.js → csp-nonce-DH0TrDij.js} +1 -1
- package/dist/data/index.d.ts +3 -2
- package/dist/data/index.js +3 -3
- package/dist/{data-CXZ-FOa7.js → data-BmZC1kDn.js} +27 -9
- package/dist/{data-runtime-CnVeSvJz.js → data-runtime-SC6zzAwh.js} +10 -5
- package/dist/{deferred-BCgoep1C.js → deferred-Bh-nZhZF.js} +2 -2
- package/dist/{for-internal-Be7x2TFd.js → for-internal-Bsm0B8GZ.js} +1 -1
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/{index-BYWsbogt.d.ts → index-BU17hud9.d.ts} +1 -1
- package/dist/index-CPlPDbEY.d.ts +64 -0
- package/dist/{index-DODUjRdZ.d.ts → index-Cf2ANwPL.d.ts} +1 -1
- package/dist/{index-yDjeTqs5.d.ts → index-Izwp_ESC.d.ts} +18 -3
- package/dist/index.d.ts +6 -5
- package/dist/index.js +7 -7
- package/dist/{lifecycle-operations-DTO93Hrl.js → lifecycle-operations-CMK1AN2C.js} +1 -1
- package/dist/{navigate-kJ_EW8Y8.d.ts → navigate-BO7M2iUG.d.ts} +1 -1
- package/dist/{navigate-Bz6hh2JB.js → navigate-DIOaNAcS.js} +5 -4
- package/dist/{query-registry-p_0kkieE.js → query-registry-IACQeDqi.js} +1 -1
- package/dist/{renderer-5bjf5dIf.js → renderer-y2DL627q.js} +3 -3
- package/dist/{resolution-BRmiFYvw.js → resolution-D3UO6aKA.js} +40 -4
- package/dist/{resource-operation-B94oj6xT.js → resource-operation-CYDU3XzS.js} +1 -1
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/router/index.d.ts +26 -5
- package/dist/router/index.js +6 -6
- package/dist/ssg/index.d.ts +2 -2
- package/dist/ssg/index.js +4 -4
- package/dist/ssr/index.d.ts +4 -3
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-D3hUAWyQ.js → ssr-DXGtDJd7.js} +6 -6
- package/dist/testing/index.d.ts +35 -4
- package/dist/testing/index.js +150 -3
- package/dist/{index-SGxMZLAc.d.ts → types-iAmDSV6o.d.ts} +6 -63
- package/dist/{verify-hydration-Bd1kGLmH.js → verify-hydration-AdrYLDxd.js} +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { b as StateTuple, c as readScope, o as Scope, s as defineScope, v as State, x as state, y as StateSetter } from "./control-
|
|
1
|
+
import { b as StateTuple, c as readScope, o as Scope, s as defineScope, v as State, x as state, y as StateSetter } from "./control-D-FIa-n-.js";
|
|
2
2
|
import { s as Props, t as Fragment } from "./jsx-BYXe_Nnk.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { f as QueryPrefetchContext, h as ServerQueryHandler, l as QueryDefinition, t as DataRuntime } from "./types-iAmDSV6o.js";
|
|
4
|
+
import { $ as cspNonce, Q as CspNonceScope, at as derive, c as createRef, ct as RuntimeKeyedReorderDecision, d as registerSSRStyle, dt as getDefaultRuntime, et as Selector, ft as getSignal, it as Derived, lt as RuntimeRendererHost, nt as RenderDiagnosticsOptions, ot as AskrRuntime, rt as configureRenderDiagnostics, s as Ref, st as AskrRuntimeOptions, tt as selector, ut as createRuntime } from "./index-Izwp_ESC.js";
|
|
5
|
+
import { a as Show, c as ForProps, i as MatchProps, n as CaseProps, o as ShowProps, r as Match, s as For, t as Case } from "./index-BU17hud9.js";
|
|
6
|
+
import { a as defineServerQueries, c as prefetchQuery, h as createQuery, i as defineQuery, l as serveQuery, o as dehydrateDataRuntime, s as hydrateDataRuntime } from "./index-CPlPDbEY.js";
|
|
6
7
|
import { i as jsxs, n as jsx } from "./jsx-runtime-LHh5tcTe.js";
|
|
7
|
-
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 RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
|
|
8
|
+
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,18 +1,18 @@
|
|
|
1
1
|
import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-Dpfoi4cA.js";
|
|
2
2
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-C3IECePB.js";
|
|
4
|
-
import {
|
|
4
|
+
import { _ as readScope, d as defineScope, l as configureRenderDiagnostics } from "./component-internal-C4uwwUaK.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-B5NtV7V0.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
|
-
import { t as installRendererBridge } from "./renderer-
|
|
7
|
+
import { t as installRendererBridge } from "./renderer-y2DL627q.js";
|
|
8
8
|
import { c as registerSSRStyle } from "./render-context-D0Hoj9dW.js";
|
|
9
9
|
import { t as state } from "./state-DCjONcHK.js";
|
|
10
10
|
import { t as selector } from "./selector-BLNkRZ2i.js";
|
|
11
|
-
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
12
|
-
import { i as For, n as Match, r as Show, t as Case } from "./control-
|
|
11
|
+
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-DH0TrDij.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-CON10J1p.js";
|
|
13
13
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
14
|
-
import { t as createQuery } from "./data-
|
|
15
|
-
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-
|
|
14
|
+
import { t as createQuery } from "./data-BmZC1kDn.js";
|
|
15
|
+
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-IACQeDqi.js";
|
|
16
16
|
//#region src/runtime/derive.ts
|
|
17
17
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
18
18
|
const dirtyDerivedCells = /* @__PURE__ */ new Set();
|
|
@@ -166,4 +166,4 @@ function createRef() {
|
|
|
166
166
|
*/
|
|
167
167
|
installRendererBridge();
|
|
168
168
|
//#endregion
|
|
169
|
-
export { AskrRuntime, Case, CspNonceScope, For, Fragment, Match, Show, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
|
|
169
|
+
export { AskrRuntime, Case, CspNonceScope, For, Fragment, Match, Show, configureRenderDiagnostics, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
2
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
2
|
+
import { a as registerCommitOperation } from "./component-internal-C4uwwUaK.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 { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
3
|
-
import { r as executeComponent } from "./component-internal-
|
|
3
|
+
import { r as executeComponent } from "./component-internal-C4uwwUaK.js";
|
|
4
4
|
import { t as cleanupReadableSubscriptionSources } from "./readable-B5NtV7V0.js";
|
|
5
5
|
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
|
|
6
6
|
import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-Dfpid9-A.js";
|
|
7
7
|
import { _ as teardownNodeSubtree } from "./cleanup-c837KVij.js";
|
|
8
|
-
import { t as CspNonceScope } from "./csp-nonce-
|
|
8
|
+
import { t as CspNonceScope } from "./csp-nonce-DH0TrDij.js";
|
|
9
9
|
import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-DqULzZtC.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-D3UO6aKA.js";
|
|
11
|
+
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-CQKEAORw.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;
|
|
@@ -723,6 +723,7 @@ function updateRouteRuntime(instance, resolved, href) {
|
|
|
723
723
|
const current = instance._appRenderRuntime;
|
|
724
724
|
const runtime = createAppRenderRuntime({
|
|
725
725
|
framework: withoutRouteHydrationMetadata(current?.framework),
|
|
726
|
+
dataRuntime: current?.dataRuntime,
|
|
726
727
|
route: resolved?.kind === "render" ? getRouteRenderData(resolved) : void 0,
|
|
727
728
|
hasRoute: resolved?.kind === "render" && hasRouteRenderData(resolved)
|
|
728
729
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-
|
|
1
|
+
import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-SC6zzAwh.js";
|
|
2
2
|
//#region src/common/telemetry.ts
|
|
3
3
|
function withTelemetry(span, fields, work) {
|
|
4
4
|
return span ? span(fields, work) : work();
|
|
@@ -4,14 +4,14 @@ import { b as isDevelopmentEnvironment, c as runRuntimeHandlerScope, f as config
|
|
|
4
4
|
import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-CrfB3QG0.js";
|
|
5
5
|
import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
6
6
|
import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-C3IECePB.js";
|
|
7
|
-
import {
|
|
7
|
+
import { b as withContext, f as getCurrentContextFrame, g as markVNodeTreeWithContextFrame, i as mountInstanceInline, m as getVNodeContextFrame, n as createComponentInstance, o as renderComponentInline, t as captureInlineRenderSnapshot } from "./component-internal-C4uwwUaK.js";
|
|
8
8
|
import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.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-Dfpid9-A.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-Bsm0B8GZ.js";
|
|
11
11
|
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-lnxQIpJG.js";
|
|
12
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-c837KVij.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-DH0TrDij.js";
|
|
15
15
|
import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
|
|
16
16
|
//#region src/runtime/error-boundary.ts
|
|
17
17
|
function createBoundaryReset(instance) {
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as readScope, d as defineScope } from "./component-internal-C4uwwUaK.js";
|
|
3
3
|
import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
|
|
4
4
|
import { b as withPageFramework, n as getActiveRenderContext, y as replacePageRoute } from "./render-context-D0Hoj9dW.js";
|
|
5
|
-
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
6
|
-
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-
|
|
5
|
+
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-DH0TrDij.js";
|
|
6
|
+
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-IACQeDqi.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-DqULzZtC.js";
|
|
8
|
+
//#region src/router/route-data-loader.ts
|
|
9
|
+
var RouteDataLoadError = class extends Error {
|
|
10
|
+
constructor(route, phase, cause) {
|
|
11
|
+
const detail = cause instanceof Error ? cause.message : String(cause);
|
|
12
|
+
super("[Askr] Route data loader failed for \"" + route + "\" during " + phase + " loading: " + detail);
|
|
13
|
+
this.name = "RouteDataLoadError";
|
|
14
|
+
this.route = route;
|
|
15
|
+
this.phase = phase;
|
|
16
|
+
this.cause = cause;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function isAbortError(error) {
|
|
20
|
+
return typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
|
|
21
|
+
}
|
|
22
|
+
function loadPhase(mode) {
|
|
23
|
+
if (mode === "spa") return "client";
|
|
24
|
+
if (mode === "ssg") return "ssg";
|
|
25
|
+
return "server";
|
|
26
|
+
}
|
|
27
|
+
/** @internal Add route context to failures from lazyRouteData(). */
|
|
28
|
+
function _wrapRouteDataLoadError(error, context) {
|
|
29
|
+
if (error instanceof RouteDataLoadError || isAbortError(error)) throw error;
|
|
30
|
+
throw new RouteDataLoadError(context.href || context.pathname, loadPhase(context.mode), error);
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
8
33
|
//#region src/router/lazy.ts
|
|
9
34
|
const pendingLazy = /* @__PURE__ */ new Set();
|
|
10
35
|
const lazyStates = /* @__PURE__ */ new WeakMap();
|
|
@@ -39,6 +64,17 @@ function lazy(factory) {
|
|
|
39
64
|
lazyStates.set(component, state);
|
|
40
65
|
return component;
|
|
41
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Create a cached route loader backed by a dynamic import. The module is only
|
|
69
|
+
* requested when the owning route matches, unless preload() is called.
|
|
70
|
+
*/
|
|
71
|
+
function lazyRouteData(factory, select) {
|
|
72
|
+
let imported = null;
|
|
73
|
+
const load = () => imported ??= Promise.resolve().then(factory);
|
|
74
|
+
const loader = ((context) => load().then((module) => select ? select(module, context) : module).catch((error) => _wrapRouteDataLoadError(error, context)));
|
|
75
|
+
Object.defineProperty(loader, "preload", { value: () => load().then(() => void 0) });
|
|
76
|
+
return loader;
|
|
77
|
+
}
|
|
42
78
|
function _preloadRouteRecord(record) {
|
|
43
79
|
const imports = [
|
|
44
80
|
record.component,
|
|
@@ -511,4 +547,4 @@ function resolveRouteRequest(target, options) {
|
|
|
511
547
|
});
|
|
512
548
|
}
|
|
513
549
|
//#endregion
|
|
514
|
-
export { createRouteHandler as _, resolveRouteRequest as a, lazy as b, prepareRouteHydrationData as c, DEFERRED_BOUNDARY as d, defer as f, Outlet as g, currentAuth as h, hasRouteRenderData as i, validateRouteHydrationData as l, reviveDeferredValue as m, getRouteRenderContext as n, getRouteHydrationMetadata as o, isDeferred as p, getRouteRenderData as r, guardHydratedRouteData as s, bindResolvedRouteData as t, withoutRouteHydrationMetadata as u, getRenderHandler as v, _preloadRouteHandler as y };
|
|
550
|
+
export { RouteDataLoadError as S, createRouteHandler as _, resolveRouteRequest as a, lazy as b, prepareRouteHydrationData as c, DEFERRED_BOUNDARY as d, defer as f, Outlet as g, currentAuth as h, hasRouteRenderData as i, validateRouteHydrationData as l, reviveDeferredValue as m, getRouteRenderContext as n, getRouteHydrationMetadata as o, isDeferred as p, getRouteRenderData as r, guardHydratedRouteData as s, bindResolvedRouteData as t, withoutRouteHydrationMetadata as u, getRenderHandler as v, lazyRouteData as x, _preloadRouteHandler as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane, v as logger } from "./access-Dpfoi4cA.js";
|
|
2
2
|
import { f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
3
|
-
import { c as registerCommitOperationForInstance,
|
|
3
|
+
import { c as registerCommitOperationForInstance, f as getCurrentContextFrame, y as withAsyncResourceContext } from "./component-internal-C4uwwUaK.js";
|
|
4
4
|
import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
|
|
5
5
|
import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
6
6
|
import { a as getResourceVerificationSnapshot, i as getNextRenderKey, n as getActiveRenderContext, o as isHydrationVerificationRender, p as throwSSRDataMissing, r as getCurrentRenderData, s as recordResourceVerificationSnapshot, x as SSRDataMissingError } from "./render-context-D0Hoj9dW.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-
|
|
1
|
+
import { ft as getSignal } from "../index-Izwp_ESC.js";
|
|
2
|
+
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-CF2_JvJs.js";
|
|
3
3
|
//#region src/runtime/resource-operation.d.ts
|
|
4
4
|
interface ResourceResult<T> {
|
|
5
5
|
value: T | null;
|
package/dist/resources/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane } from "../access-Dpfoi4cA.js";
|
|
2
2
|
import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-DzJEbYGE.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-C4uwwUaK.js";
|
|
4
|
+
import { t as resource } from "../resource-operation-CYDU3XzS.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-CMK1AN2C.js";
|
|
6
|
+
import { n as onRouteChange } from "../activity-CQKEAORw.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,9 +1,9 @@
|
|
|
1
|
-
import { u as RenderableChild } from "../control-
|
|
1
|
+
import { u as RenderableChild } from "../control-D-FIa-n-.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../jsx-BYXe_Nnk.js";
|
|
3
|
-
import { A as RouteHandler, B as RouteQuery, C as Route, D as RouteContext, E as RouteComponent, F as RouteMode, G as RouteRegistryOptions, H as RouteRef, I as RouteOptions, J as RouteRequestResult, K as RouteRenderResult, L as RouteParams, M as RouteMatch, N as RouteMeta, O as RouteDefinition, P as RouteMetaSource, R as RoutePathParams, S as ParsedSegment, T as RouteAuthResolver, U as RouteRefSearch, V as RouteRecord, W as RouteRegistry, X as RouteSearchValue, Y as RouteSearch, Z as RouteSnapshot, _ as AccessRedirectStatus, b as PageHelperOptions, f as AccessAllowDecision, g as AccessRedirectDecision, h as AccessDenyStatus, j as RouteManifest, k as RouteDestination, m as AccessDenyDecision, p as AccessDecision, q as RouteRequestOptions, v as GroupHelperOptions, w as RouteAuthOptions, x as PageScopeRecord, y as LayoutScopeRecord, z as RoutePolicy } from "../index-
|
|
3
|
+
import { A as RouteHandler, B as RouteQuery, C as Route, D as RouteContext, E as RouteComponent, F as RouteMode, G as RouteRegistryOptions, H as RouteRef, I as RouteOptions, J as RouteRequestResult, K as RouteRenderResult, L as RouteParams, M as RouteMatch, N as RouteMeta, O as RouteDefinition, P as RouteMetaSource, R as RoutePathParams, S as ParsedSegment, T as RouteAuthResolver, U as RouteRefSearch, V as RouteRecord, W as RouteRegistry, X as RouteSearchValue, Y as RouteSearch, Z as RouteSnapshot, _ as AccessRedirectStatus, b as PageHelperOptions, f as AccessAllowDecision, g as AccessRedirectDecision, h as AccessDenyStatus, j as RouteManifest, k as RouteDestination, m as AccessDenyDecision, p as AccessDecision, q as RouteRequestOptions, v as GroupHelperOptions, w as RouteAuthOptions, x as PageScopeRecord, y as LayoutScopeRecord, z as RoutePolicy } from "../index-Izwp_ESC.js";
|
|
4
4
|
import "../types-CsPtBGWb.js";
|
|
5
|
-
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-
|
|
6
|
-
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-
|
|
5
|
+
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-BO7M2iUG.js";
|
|
6
|
+
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-CF2_JvJs.js";
|
|
7
7
|
import { AuthContext, AuthContext as AuthContext$1, AuthRequirement, AuthRequirement as AuthRequirement$1 } from "@askrjs/auth";
|
|
8
8
|
import { ObjectSchema } from "@askrjs/schema";
|
|
9
9
|
//#region src/router/route-query.d.ts
|
|
@@ -54,13 +54,34 @@ declare function createRouteRegistry(definition: RouteDefinition, options?: Rout
|
|
|
54
54
|
type LazyRouteComponent<TComponent extends AnyRouteComponent> = TComponent & {
|
|
55
55
|
preload(): Promise<void>;
|
|
56
56
|
};
|
|
57
|
+
type LazyRouteDataLoader<TModule, TData = TModule> = ((context: RouteContext & {
|
|
58
|
+
request?: Request;
|
|
59
|
+
}) => Promise<TData>) & {
|
|
60
|
+
preload(): Promise<void>;
|
|
61
|
+
};
|
|
57
62
|
declare function lazy<TComponent extends AnyRouteComponent>(factory: () => Promise<{
|
|
58
63
|
default: TComponent;
|
|
59
64
|
} | TComponent>): LazyRouteComponent<TComponent>;
|
|
65
|
+
/**
|
|
66
|
+
* Create a cached route loader backed by a dynamic import. The module is only
|
|
67
|
+
* requested when the owning route matches, unless preload() is called.
|
|
68
|
+
*/
|
|
69
|
+
declare function lazyRouteData<TModule, TData = TModule>(factory: () => PromiseLike<TModule>, select?: (module: TModule, context: RouteContext & {
|
|
70
|
+
request?: Request;
|
|
71
|
+
}) => TData | PromiseLike<TData>): LazyRouteDataLoader<TModule, TData>;
|
|
60
72
|
//#endregion
|
|
61
73
|
//#region src/router/rendering.d.ts
|
|
62
74
|
declare function Outlet(): JSXElement;
|
|
63
75
|
//#endregion
|
|
76
|
+
//#region src/router/route-data-loader.d.ts
|
|
77
|
+
type RouteDataLoadPhase = 'client' | 'server' | 'ssg';
|
|
78
|
+
declare class RouteDataLoadError extends Error {
|
|
79
|
+
readonly route: string;
|
|
80
|
+
readonly phase: RouteDataLoadPhase;
|
|
81
|
+
readonly cause: unknown;
|
|
82
|
+
constructor(route: string, phase: RouteDataLoadPhase, cause: unknown);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
64
85
|
//#region src/router/policy.d.ts
|
|
65
86
|
declare function allow(): AccessAllowDecision;
|
|
66
87
|
declare function redirect(to: string, init?: {
|
|
@@ -169,4 +190,4 @@ type LinkProps = LinkBaseProps & ({
|
|
|
169
190
|
*/
|
|
170
191
|
declare function Link({ href: suppliedHref, to, class: className, children, rel, target, 'aria-current': ariaCurrent, 'aria-label': ariaLabel, onPress, onClick, ...rest }: LinkProps): JSXElement;
|
|
171
192
|
//#endregion
|
|
172
|
-
export { type AccessDecision, type AccessDenyDecision, type AccessRedirectDecision, type AuthContext, type AuthRequirement, type Deferred, type DeferredState, type GroupHelperOptions, type HistoryScrollBehavior, type LayoutScopeRecord, type LazyRouteComponent, Link, type LinkProps, type NavigateOptions, type NavigationScrollBehavior, Outlet, type PageHelperOptions, type PageScopeRecord, type ParsedSegment, Resolve, type ResolveProps, type Route, type RouteAuthOptions, type RouteAuthResolver, type RouteChangeCleanup, type RouteChangeOptions, type RouteComponent, type RouteContext, type RouteDefinition, type RouteDestination, type RouteHandler, type RouteManifest, type RouteMatch, type RouteMeta, type RouteMetaSource, type RouteMode, type RouteOptions, type RouteParams, type RoutePathParams, type RoutePolicy, type RouteQuery, type RouteQueryParamInput, type RouteQueryParamValue, type RouteQueryUpdater, type RouteQueryUpdates, type RouteRecord, type RouteRef, type RouteRegistry, type RouteRegistryOptions, type RouteRenderResult, type RouteRequestOptions, type RouteRequestResult, type RouteSearch, type RouteSearchValue, type RouteSnapshot, type ScrollRestorationOptions, type UpdateRouteQueryOptions, allow, createRouteRegistry, currentAuth, currentRoute, defer, deny, fallback, forbidden, group, index, isDeferred, lazy, navigate, notFound, onRouteChange, page, reconcileRouteMeta, redirect, resolveDeferredValues, resolveRouteMeta, resolveRouteRequest, route, routeData, serializeRouteMeta, to$1 as to, unauthorized, updateRouteQuery };
|
|
193
|
+
export { type AccessDecision, type AccessDenyDecision, type AccessRedirectDecision, type AuthContext, type AuthRequirement, type Deferred, type DeferredState, type GroupHelperOptions, type HistoryScrollBehavior, type LayoutScopeRecord, type LazyRouteComponent, type LazyRouteDataLoader, Link, type LinkProps, type NavigateOptions, type NavigationScrollBehavior, Outlet, type PageHelperOptions, type PageScopeRecord, type ParsedSegment, Resolve, type ResolveProps, type Route, type RouteAuthOptions, type RouteAuthResolver, type RouteChangeCleanup, type RouteChangeOptions, type RouteComponent, type RouteContext, RouteDataLoadError, type RouteDataLoadPhase, type RouteDefinition, type RouteDestination, type RouteHandler, type RouteManifest, type RouteMatch, type RouteMeta, type RouteMetaSource, type RouteMode, type RouteOptions, type RouteParams, type RoutePathParams, type RoutePolicy, type RouteQuery, type RouteQueryParamInput, type RouteQueryParamValue, type RouteQueryUpdater, type RouteQueryUpdates, type RouteRecord, type RouteRef, type RouteRegistry, type RouteRegistryOptions, type RouteRenderResult, type RouteRequestOptions, type RouteRequestResult, type RouteSearch, type RouteSearchValue, type RouteSnapshot, type ScrollRestorationOptions, type UpdateRouteQueryOptions, allow, createRouteRegistry, currentAuth, currentRoute, defer, deny, fallback, forbidden, group, index, isDeferred, lazy, lazyRouteData, navigate, notFound, onRouteChange, page, reconcileRouteMeta, redirect, resolveDeferredValues, resolveRouteMeta, resolveRouteRequest, route, routeData, serializeRouteMeta, to$1 as to, unauthorized, updateRouteQuery };
|
package/dist/router/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
|
|
2
|
-
import { a as isSafeHref } from "../csp-nonce-
|
|
2
|
+
import { a as isSafeHref } from "../csp-nonce-DH0TrDij.js";
|
|
3
3
|
import { jsx } from "../jsx-runtime.js";
|
|
4
4
|
import { o as addRouteBasePath, y as getActiveRouteBasePath } from "../route-matching-DqULzZtC.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 { a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred } 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-Bh-nZhZF.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-D3UO6aKA.js";
|
|
7
|
+
import { n as onRouteChange, t as currentRoute } from "../activity-CQKEAORw.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-DIOaNAcS.js";
|
|
9
9
|
import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
|
|
10
10
|
import { t as applyInteractionPolicy } from "../interactions-CWkNEq_C.js";
|
|
11
11
|
//#region src/router/route-query.ts
|
|
@@ -208,4 +208,4 @@ function Link({ href: suppliedHref, to, class: className, children, rel, target,
|
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
//#endregion
|
|
211
|
-
export { Link, Outlet, Resolve, allow, createRouteRegistry, currentAuth, currentRoute, defer, deny, fallback, forbidden, group, index, isDeferred, lazy, navigate, notFound, onRouteChange, page, reconcileRouteMeta, redirect, resolveDeferredValues, resolveRouteMeta, resolveRouteRequest, route, routeData, serializeRouteMeta, to, unauthorized, updateRouteQuery };
|
|
211
|
+
export { Link, Outlet, Resolve, RouteDataLoadError, allow, createRouteRegistry, currentAuth, currentRoute, defer, deny, fallback, forbidden, group, index, isDeferred, lazy, lazyRouteData, navigate, notFound, onRouteChange, page, reconcileRouteMeta, redirect, resolveDeferredValues, resolveRouteMeta, resolveRouteRequest, route, routeData, serializeRouteMeta, to, unauthorized, updateRouteQuery };
|
package/dist/ssg/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, m as DocumentRenderer, p as DocumentRenderContext } from "../control-
|
|
2
|
-
import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-
|
|
1
|
+
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, m as DocumentRenderer, p as DocumentRenderContext } from "../control-D-FIa-n-.js";
|
|
2
|
+
import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-Izwp_ESC.js";
|
|
3
3
|
import { AuthRequirement } from "@askrjs/auth";
|
|
4
4
|
import "node:fs/promises";
|
|
5
5
|
//#region src/ssg/types.d.ts
|
package/dist/ssg/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../access-Dpfoi4cA.js";
|
|
2
2
|
import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
|
|
3
3
|
import { o as addRouteBasePath } from "../route-matching-DqULzZtC.js";
|
|
4
|
-
import { c as route, n as resolveDeferredValues } from "../deferred-
|
|
5
|
-
import { c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-
|
|
4
|
+
import { c as route, n as resolveDeferredValues } from "../deferred-Bh-nZhZF.js";
|
|
5
|
+
import { S as RouteDataLoadError, c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-D3UO6aKA.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-DXGtDJd7.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";
|
|
@@ -255,7 +255,7 @@ async function batchRenderRoutes(routes, options = {}) {
|
|
|
255
255
|
reason: "full",
|
|
256
256
|
written: false,
|
|
257
257
|
error: error instanceof Error ? error.message : String(error),
|
|
258
|
-
errorCause: error,
|
|
258
|
+
errorCause: phase === "load" && error instanceof RouteDataLoadError ? error.cause : error,
|
|
259
259
|
errorContext: {
|
|
260
260
|
route: url,
|
|
261
261
|
phase
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, g as SSRStyleRegistration, h as SSRData, m as DocumentRenderer, p as DocumentRenderContext } from "../control-
|
|
1
|
+
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, g as SSRStyleRegistration, h as SSRData, m as DocumentRenderer, p as DocumentRenderContext } from "../control-D-FIa-n-.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../jsx-BYXe_Nnk.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { f as QueryPrefetchContext, t as DataRuntime } from "../types-iAmDSV6o.js";
|
|
4
|
+
import { A as RouteHandler, C as Route, J as RouteRequestResult, V as RouteRecord, W as RouteRegistry, g as AccessRedirectDecision, l as DeferredBoundaryRegistration, m as AccessDenyDecision, u as SSRPortalState, w as RouteAuthOptions } from "../index-Izwp_ESC.js";
|
|
5
|
+
import { _ as CoreTelemetry, n as ServerQueryRegistry } from "../index-CPlPDbEY.js";
|
|
5
6
|
import { AuthContext } from "@askrjs/auth";
|
|
6
7
|
//#region src/common/page-render-envelope.d.ts
|
|
7
8
|
declare const PAGE_RENDER_ENVELOPE_VERSION: 1;
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { x as SSRDataMissingError } from "../render-context-D0Hoj9dW.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-DXGtDJd7.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 { v as logger } from "./access-Dpfoi4cA.js";
|
|
4
4
|
import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
5
5
|
import { i as isFragmentType, n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
6
|
-
import {
|
|
6
|
+
import { g as markVNodeTreeWithContextFrame, m as getVNodeContextFrame, n as createComponentInstance, p as getExecutionContextFrame, u as callWithContext } from "./component-internal-C4uwwUaK.js";
|
|
7
7
|
import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
|
|
8
8
|
import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.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-Bsm0B8GZ.js";
|
|
10
10
|
import { _ as isPageRenderEnvelope, f as stopRenderPhase$1, g as isEmptyPageRenderEnvelope, h as createPageRenderEnvelope, t as configureRenderContextProvider, u as startRenderPhase$1, x as SSRDataMissingError } from "./render-context-D0Hoj9dW.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-DH0TrDij.js";
|
|
13
13
|
import { n as SSR_PORTAL_HOST, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
|
|
14
|
-
import { t as createDataRuntime } from "./data-runtime-
|
|
15
|
-
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-
|
|
14
|
+
import { t as createDataRuntime } from "./data-runtime-SC6zzAwh.js";
|
|
15
|
+
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-IACQeDqi.js";
|
|
16
16
|
import { a as resolveRouteFromRoutes, c as removeRouteBasePath, s as normalizeRouteBasePath, t as _resolveRouteMatchFromRoutes } from "./route-matching-DqULzZtC.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-D3UO6aKA.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
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as ComponentFunction } from "../control-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { l as ComponentFunction } from "../control-D-FIa-n-.js";
|
|
2
|
+
import { a as Mutation, m as QueryStaleReason, s as Query, t as DataRuntime } from "../types-iAmDSV6o.js";
|
|
3
|
+
import { M as RouteMatch, W as RouteRegistry, w as RouteAuthOptions } from "../index-Izwp_ESC.js";
|
|
4
4
|
//#region src/testing/render.d.ts
|
|
5
5
|
interface RenderOptions {
|
|
6
6
|
/**
|
|
@@ -16,6 +16,7 @@ interface RouteRenderOptions extends RenderOptions {
|
|
|
16
16
|
/** Initial path, query, and hash for the routed render. */
|
|
17
17
|
url?: string;
|
|
18
18
|
auth?: RouteAuthOptions;
|
|
19
|
+
dataRuntime?: DataRuntime;
|
|
19
20
|
}
|
|
20
21
|
type DispatchEventInit = EventInit | UIEventInit | FocusEventInit | MouseEventInit | WheelEventInit | KeyboardEventInit | InputEventInit | CompositionEventInit | PointerEventInit | TouchEventInit | DragEventInit;
|
|
21
22
|
interface RenderResult {
|
|
@@ -48,6 +49,36 @@ interface QueryTestRegistry {
|
|
|
48
49
|
}
|
|
49
50
|
/** Create a keyed query fixture registry for a test render runtime. */
|
|
50
51
|
declare function createQueryTestRegistry(): QueryTestRegistry;
|
|
52
|
+
interface MutationTestRegistry {
|
|
53
|
+
readonly runtime: DataRuntime;
|
|
54
|
+
set<TInput, TResult>(key: string, mutation: Mutation<TInput, TResult>): void;
|
|
55
|
+
delete(key: string): void;
|
|
56
|
+
clear(): void;
|
|
57
|
+
}
|
|
58
|
+
/** Create a keyed mutation fixture registry for a test render runtime. */
|
|
59
|
+
declare function createMutationTestRegistry(): MutationTestRegistry;
|
|
60
|
+
type MutationFixtureInitial<TResult> = {
|
|
61
|
+
pending?: boolean;
|
|
62
|
+
error?: {} | null;
|
|
63
|
+
result?: TResult;
|
|
64
|
+
};
|
|
65
|
+
type MutationFixture<TInput, TResult> = Mutation<TInput, TResult> & {
|
|
66
|
+
/** Inputs received by the fixture's execute method. */
|
|
67
|
+
readonly inputs: readonly TInput[];
|
|
68
|
+
/** Move the fixture to pending without starting application work. */
|
|
69
|
+
setPending(): void;
|
|
70
|
+
/** Resolve the current fixture execution and expose its result. */
|
|
71
|
+
succeed(result: TResult): void;
|
|
72
|
+
/** Reject the current fixture execution and expose its error. */
|
|
73
|
+
fail(error: {}): void;
|
|
74
|
+
};
|
|
75
|
+
declare function createMutationFixture<TInput = unknown, TResult = unknown>(initial?: MutationFixtureInitial<TResult>): MutationFixture<TInput, TResult>;
|
|
76
|
+
declare const mutationState: typeof createMutationFixture & {
|
|
77
|
+
idle<TInput = unknown, TResult = unknown>(): MutationFixture<TInput, TResult>;
|
|
78
|
+
pending<TInput = unknown, TResult = unknown>(): MutationFixture<TInput, TResult>;
|
|
79
|
+
success<TInput = unknown, TResult = unknown>(result: TResult): MutationFixture<TInput, TResult>;
|
|
80
|
+
error<TInput = unknown, TResult = unknown>(error: {}): MutationFixture<TInput, TResult>;
|
|
81
|
+
};
|
|
51
82
|
type MockRefresh = () => void | Promise<void>;
|
|
52
83
|
interface MockQueryOptions {
|
|
53
84
|
refresh?: MockRefresh;
|
|
@@ -94,4 +125,4 @@ declare function createInvalidationRecorder(): InvalidationRecorder;
|
|
|
94
125
|
declare function matchRoute(path: string, options: MatchRouteOptions): RouteMatch | null;
|
|
95
126
|
declare function getRouteWarnings(options: MatchRouteOptions): RoutePatternWarning[];
|
|
96
127
|
//#endregion
|
|
97
|
-
export { InvalidationRecord, InvalidationRecorder, MockQueryOptions, MockRefresh, QueryTestRegistry, type RenderOptions, type RenderResult, RoutePatternWarning, type RouteRenderOptions, cleanup, click, createInvalidationRecorder, createQueryTestRegistry, dispatch, flush, getRouteWarnings, matchRoute, mockQuery, mount, queryState, render, renderRoute, submit, type };
|
|
128
|
+
export { InvalidationRecord, InvalidationRecorder, MockQueryOptions, MockRefresh, MutationFixture, MutationFixtureInitial, MutationTestRegistry, QueryTestRegistry, type RenderOptions, type RenderResult, RoutePatternWarning, type RouteRenderOptions, cleanup, click, createInvalidationRecorder, createMutationTestRegistry, createQueryTestRegistry, dispatch, flush, getRouteWarnings, matchRoute, mockQuery, mount, mutationState, queryState, render, renderRoute, submit, type };
|