@askrjs/askr 0.0.87 → 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-DNYL__cW.d.ts → activity-CF2_JvJs.d.ts} +1 -1
- package/dist/{activity-BnkhdIXm.js → activity-CQKEAORw.js} +5 -3
- package/dist/benchmark.d.ts +1 -1
- package/dist/benchmark.js +6 -6
- package/dist/boot/index.d.ts +6 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-Bd-j_BL5.js → boot-CrbszDjZ.js} +26 -15
- package/dist/{component-internal-uVCJAre6.js → component-internal-C4uwwUaK.js} +31 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-BF3geQKh.js → control-CON10J1p.js} +1 -1
- package/dist/{control-BjYBlytA.d.ts → control-CsGs2bLS.d.ts} +1 -1
- package/dist/{control-DhUZU4_V.d.ts → control-D-FIa-n-.d.ts} +3 -1
- 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-_DaSfpsr.js → deferred-Bh-nZhZF.js} +5 -4
- package/dist/{for-internal-Dxf3iZ9E.js → for-internal-Bsm0B8GZ.js} +9 -5
- package/dist/foundations/icon/index.d.ts +2 -2
- package/dist/foundations/icon/index.js +3 -2
- package/dist/foundations/index.d.ts +2 -2
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/index.js +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/structures/index.d.ts +2 -2
- package/dist/foundations/structures/index.js +1 -1
- package/dist/{index-r-nt13FE.d.ts → index-BU17hud9.d.ts} +2 -2
- package/dist/index-CPlPDbEY.d.ts +64 -0
- package/dist/{index-DflhL1h8.d.ts → index-Cf2ANwPL.d.ts} +3 -3
- package/dist/{index-BvNkcegT.d.ts → index-Izwp_ESC.d.ts} +20 -5
- package/dist/index.d.ts +8 -7
- package/dist/index.js +8 -8
- package/dist/{interactions-DgGQyUQv.js → interactions-CWkNEq_C.js} +2 -1
- package/dist/{jsx-Dvr2SGRG.d.ts → jsx-BYXe_Nnk.d.ts} +18 -0
- package/dist/jsx-dev-runtime.d.ts +3 -3
- package/dist/jsx-runtime-BqhMEuT4.d.ts +2 -0
- package/dist/{jsx-runtime-Cr1jspx9.d.ts → jsx-runtime-LHh5tcTe.d.ts} +3 -3
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/{lifecycle-operations-DTO93Hrl.js → lifecycle-operations-CMK1AN2C.js} +1 -1
- package/dist/{navigate-B_fcLDAG.d.ts → navigate-BO7M2iUG.d.ts} +1 -1
- package/dist/{navigate-DSATWfHh.js → navigate-DIOaNAcS.js} +5 -4
- package/dist/{query-registry-p_0kkieE.js → query-registry-IACQeDqi.js} +1 -1
- package/dist/{renderer-BGMaUrVj.js → renderer-y2DL627q.js} +47 -9
- 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 +28 -7
- package/dist/router/index.js +18 -17
- package/dist/{selector-Ck_Pp9av.js → selector-BLNkRZ2i.js} +2 -1
- package/dist/ssg/index.d.ts +2 -2
- package/dist/ssg/index.js +4 -4
- package/dist/ssr/index.d.ts +5 -4
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-q250YlKo.js → ssr-DXGtDJd7.js} +11 -9
- package/dist/{structures-DsOm-clq.js → structures--NKfTh3j.js} +2 -1
- package/dist/testing/index.d.ts +35 -4
- package/dist/testing/index.js +150 -3
- package/dist/{types-C9YcqVpk.d.ts → types-CsPtBGWb.d.ts} +1 -1
- package/dist/{index-SGxMZLAc.d.ts → types-iAmDSV6o.d.ts} +6 -63
- package/dist/{verify-hydration-DkISyZCo.js → verify-hydration-AdrYLDxd.js} +1 -1
- package/package.json +11 -10
- package/dist/jsx-runtime-C-oIHX9X.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as VNode, t as ForEachSource, u as RenderableChild } from "./control-
|
|
2
|
-
import { r as JSXElement } from "./jsx-
|
|
1
|
+
import { d as VNode, t as ForEachSource, u as RenderableChild } from "./control-D-FIa-n-.js";
|
|
2
|
+
import { r as JSXElement } from "./jsx-BYXe_Nnk.js";
|
|
3
3
|
//#region src/control/shared.d.ts
|
|
4
4
|
type BoundaryChild = RenderableChild;
|
|
5
5
|
//#endregion
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { a as Mutation, d as QueryOptions, f as QueryPrefetchContext, h as ServerQueryHandler, i as InvalidateOptions, l as QueryDefinition, n as DataRuntimeOptions, o as MutationOptions, p as QueryScope, r as InvalidateOnIntervalOptions, s as Query, t as DataRuntime } from "./types-iAmDSV6o.js";
|
|
2
|
+
//#region src/common/telemetry.d.ts
|
|
3
|
+
interface TelemetryFields {
|
|
4
|
+
requestId?: string;
|
|
5
|
+
traceId?: string;
|
|
6
|
+
route?: string;
|
|
7
|
+
action?: string;
|
|
8
|
+
operation?: string;
|
|
9
|
+
status?: number;
|
|
10
|
+
durationMs?: number;
|
|
11
|
+
}
|
|
12
|
+
type TelemetrySpan = <T>(fields: TelemetryFields, work: () => T) => T;
|
|
13
|
+
/**
|
|
14
|
+
* Structural subset implemented by `createTelemetry()` from `@askrjs/otel`.
|
|
15
|
+
* Core does not install an OpenTelemetry SDK, backend, or exporter.
|
|
16
|
+
*/
|
|
17
|
+
interface CoreTelemetry {
|
|
18
|
+
routeMatch?: TelemetrySpan;
|
|
19
|
+
loader?: TelemetrySpan;
|
|
20
|
+
queryPrefetch?: TelemetrySpan;
|
|
21
|
+
ssrRender?: TelemetrySpan;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/data/mutation-cell.d.ts
|
|
25
|
+
declare function createMutation<TInput, TResult>(options: MutationOptions<TInput, TResult>): Mutation<TInput, TResult>;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/data/query-cell.d.ts
|
|
28
|
+
declare function createQuery<T extends {}>(options: QueryOptions<T>): Query<T>;
|
|
29
|
+
declare function createQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>, input: TInput, options?: Omit<QueryOptions<TResult>, 'key' | 'fetch'>): Query<TResult>;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/data/data-runtime.d.ts
|
|
32
|
+
declare function createDataRuntime(options?: DataRuntimeOptions): DataRuntime;
|
|
33
|
+
declare function getDefaultDataRuntime(): DataRuntime;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/data/invalidation.d.ts
|
|
36
|
+
declare function invalidate(prefix: string, options?: InvalidateOptions): void;
|
|
37
|
+
declare function queryScope(namespace: string): QueryScope;
|
|
38
|
+
declare function invalidateOnInterval(prefix: string, options: InvalidateOnIntervalOptions): void;
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/data/query-registry.d.ts
|
|
41
|
+
interface ServerQueryRegistry {
|
|
42
|
+
readonly entries: readonly ServerQueryEntry<unknown, {}>[];
|
|
43
|
+
get<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>): ServerQueryHandler<TInput, TResult> | undefined;
|
|
44
|
+
}
|
|
45
|
+
interface ServerQueryEntry<TInput, TResult extends {}> {
|
|
46
|
+
readonly query: QueryDefinition<TInput, TResult>;
|
|
47
|
+
readonly handler: ServerQueryHandler<TInput, TResult>;
|
|
48
|
+
}
|
|
49
|
+
declare function serveQuery<TInput, TResult extends {}>(query: QueryDefinition<TInput, TResult>, handler: ServerQueryHandler<TInput, TResult>): ServerQueryEntry<TInput, TResult>;
|
|
50
|
+
declare function defineServerQueries(...entries: readonly ServerQueryEntry<any, any>[]): ServerQueryRegistry;
|
|
51
|
+
declare function defineQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>): QueryDefinition<TInput, TResult>;
|
|
52
|
+
declare function createQueryPrefetchContext(options?: {
|
|
53
|
+
runtime?: DataRuntime;
|
|
54
|
+
registry?: ServerQueryRegistry;
|
|
55
|
+
request?: Request;
|
|
56
|
+
signal?: AbortSignal;
|
|
57
|
+
mode?: 'ssr' | 'spa';
|
|
58
|
+
telemetry?: CoreTelemetry;
|
|
59
|
+
}): QueryPrefetchContext;
|
|
60
|
+
declare function prefetchQuery<TInput, TResult extends {}>(context: QueryPrefetchContext, query: QueryDefinition<TInput, TResult>, input: TInput): Promise<boolean>;
|
|
61
|
+
declare function dehydrateDataRuntime(runtime: DataRuntime): Record<string, unknown>;
|
|
62
|
+
declare function hydrateDataRuntime(runtime: DataRuntime, data: unknown): void;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { CoreTelemetry as _, defineServerQueries as a, prefetchQuery as c, invalidateOnInterval as d, queryScope as f, createMutation as g, createQuery as h, defineQuery as i, serveQuery as l, getDefaultDataRuntime as m, ServerQueryRegistry as n, dehydrateDataRuntime as o, createDataRuntime as p, createQueryPrefetchContext as r, hydrateDataRuntime as s, ServerQueryEntry as t, invalidate as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as RenderableChild } from "./control-
|
|
2
|
-
import { r as JSXElement } from "./jsx-
|
|
3
|
-
import "./types-
|
|
1
|
+
import { u as RenderableChild } from "./control-D-FIa-n-.js";
|
|
2
|
+
import { r as JSXElement } from "./jsx-BYXe_Nnk.js";
|
|
3
|
+
import "./types-CsPtBGWb.js";
|
|
4
4
|
//#region src/foundations/structures/layout.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Layout helper.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as ComponentInstance, b as StateTuple, i as ReadableSource, n as ChildScope, o as Scope, r as DOMRange, u as RenderableChild } from "./control-
|
|
2
|
-
import { r as JSXElement } from "./jsx-
|
|
1
|
+
import { a as ComponentInstance, b as StateTuple, i as ReadableSource, n as ChildScope, o as Scope, r as DOMRange, u as RenderableChild } from "./control-D-FIa-n-.js";
|
|
2
|
+
import { r as JSXElement } from "./jsx-BYXe_Nnk.js";
|
|
3
|
+
import { f as QueryPrefetchContext } from "./types-iAmDSV6o.js";
|
|
3
4
|
import { t as Scheduler } from "./scheduler-CmLO4Dfm.js";
|
|
4
|
-
import {
|
|
5
|
-
import "./jsx-runtime-
|
|
5
|
+
import { _ as CoreTelemetry } from "./index-CPlPDbEY.js";
|
|
6
|
+
import "./jsx-runtime-BqhMEuT4.js";
|
|
6
7
|
import { AuthContext, AuthRequirement } from "@askrjs/auth";
|
|
7
8
|
import { InferSchema, ObjectSchema } from "@askrjs/schema";
|
|
8
9
|
//#region src/runtime/component-scope.d.ts
|
|
@@ -71,6 +72,20 @@ type SnapshotSource<T> = {
|
|
|
71
72
|
declare function derive<TOut>(fn: () => TOut): Derived<TOut>;
|
|
72
73
|
declare function derive<TIn, TOut>(source: SnapshotSource<TIn> | TIn | (() => TIn), map: (value: TIn) => TOut): Derived<TOut | null>;
|
|
73
74
|
//#endregion
|
|
75
|
+
//#region src/runtime/render-diagnostics.d.ts
|
|
76
|
+
interface RenderDiagnosticsOptions {
|
|
77
|
+
/** Emit one warning per component instance when a render exceeds the threshold. */
|
|
78
|
+
slowRenderWarnings?: boolean;
|
|
79
|
+
/** Slow-render threshold in milliseconds. The default is 5. */
|
|
80
|
+
slowRenderThresholdMs?: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Configure development render diagnostics and return a function that restores
|
|
84
|
+
* the previous configuration. Component counters and timing remain enabled
|
|
85
|
+
* when warning output is disabled.
|
|
86
|
+
*/
|
|
87
|
+
declare function configureRenderDiagnostics(options: RenderDiagnosticsOptions): () => void;
|
|
88
|
+
//#endregion
|
|
74
89
|
//#region src/runtime/selector.d.ts
|
|
75
90
|
interface Selector<T> {
|
|
76
91
|
(candidate: T): boolean;
|
|
@@ -440,4 +455,4 @@ declare function action<TInput extends Record<string, unknown>, TResult = unknow
|
|
|
440
455
|
submit(input: TInput): Promise<TResult>;
|
|
441
456
|
};
|
|
442
457
|
//#endregion
|
|
443
|
-
export { cspNonce as $, RouteHandler as A, RouteQuery as B, Route as C, RouteContext as D, RouteComponent as E, RouteMode as F, RouteRegistryOptions as G, RouteRef as H, RouteOptions as I, RouteRequestResult as J, RouteRenderResult as K, RouteParams as L, RouteMatch as M, RouteMeta as N, RouteDefinition as O, RouteMetaSource as P, CspNonceScope as Q, RoutePathParams as R, ParsedSegment as S, RouteAuthResolver as T, RouteRefSearch as U, RouteRecord as V, RouteRegistry as W, RouteSearchValue as X, RouteSearch as Y, RouteSnapshot as Z, AccessRedirectStatus as _, action as a,
|
|
458
|
+
export { cspNonce as $, RouteHandler as A, RouteQuery as B, Route as C, RouteContext as D, RouteComponent as E, RouteMode as F, RouteRegistryOptions as G, RouteRef as H, RouteOptions as I, RouteRequestResult as J, RouteRenderResult as K, RouteParams as L, RouteMatch as M, RouteMeta as N, RouteDefinition as O, RouteMetaSource as P, CspNonceScope as Q, RoutePathParams as R, ParsedSegment as S, RouteAuthResolver as T, RouteRefSearch as U, RouteRecord as V, RouteRegistry as W, RouteSearchValue as X, RouteSearch as Y, RouteSnapshot as Z, AccessRedirectStatus as _, action as a, derive as at, PageHelperOptions as b, createRef as c, RuntimeKeyedReorderDecision as ct, registerSSRStyle as d, getDefaultRuntime as dt, Selector as et, AccessAllowDecision as f, getSignal as ft, AccessRedirectDecision as g, AccessDenyStatus as h, ActionValidationError as i, Derived as it, RouteManifest as j, RouteDestination as k, DeferredBoundaryRegistration as l, RuntimeRendererHost as lt, AccessDenyDecision as m, ActionForm as n, RenderDiagnosticsOptions as nt, defineAction as o, AskrRuntime as ot, AccessDecision as p, RouteRequestOptions as q, ActionStatus as r, configureRenderDiagnostics as rt, Ref as s, AskrRuntimeOptions as st, ActionDescriptor as t, selector as tt, SSRPortalState as u, createRuntime as ut, GroupHelperOptions as v, RouteAuthOptions as w, PageScopeRecord as x, LayoutScopeRecord as y, RoutePolicy as z };
|
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-
|
|
2
|
-
import { s as Props, t as Fragment } from "./jsx-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
7
|
-
|
|
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
|
+
import { s as Props, t as Fragment } from "./jsx-BYXe_Nnk.js";
|
|
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";
|
|
7
|
+
import { i as jsxs, n as jsx } from "./jsx-runtime-LHh5tcTe.js";
|
|
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
|
-
import { t as selector } from "./selector-
|
|
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-
|
|
10
|
+
import { t as selector } from "./selector-BLNkRZ2i.js";
|
|
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 };
|
|
@@ -260,7 +260,8 @@ function applyInteractionPolicy({ isNative, disabled, onPress, ref }) {
|
|
|
260
260
|
* Policy props MUST take precedence to enforce invariants.
|
|
261
261
|
*/
|
|
262
262
|
function mergeInteractionProps(childProps, policyProps, userProps) {
|
|
263
|
-
const
|
|
263
|
+
const mergedUserChild = userProps ? mergeProps(userProps, childProps) : childProps;
|
|
264
|
+
const out = mergeProps(policyProps, mergedUserChild);
|
|
264
265
|
for (const k in out) {
|
|
265
266
|
if (!k.startsWith("on")) continue;
|
|
266
267
|
const policyHandler = policyProps?.[k];
|
|
@@ -117,10 +117,16 @@ type ForbiddenLayoutOnlyProps = {
|
|
|
117
117
|
htmlFor?: never;
|
|
118
118
|
label?: never;
|
|
119
119
|
method?: never;
|
|
120
|
+
maxLength?: never;
|
|
121
|
+
maxlength?: never;
|
|
122
|
+
minLength?: never;
|
|
123
|
+
minlength?: never;
|
|
120
124
|
multiple?: never;
|
|
121
125
|
name?: never;
|
|
122
126
|
noValidate?: never;
|
|
123
127
|
placeholder?: never;
|
|
128
|
+
readOnly?: never;
|
|
129
|
+
readonly?: never;
|
|
124
130
|
rel?: never;
|
|
125
131
|
required?: never;
|
|
126
132
|
rowSpan?: never;
|
|
@@ -183,8 +189,14 @@ interface InputIntrinsicProps extends IntrinsicProps {
|
|
|
183
189
|
autocomplete?: ReactiveProp<IntrinsicTextValue>;
|
|
184
190
|
checked?: ReactiveProp<IntrinsicBooleanValue>;
|
|
185
191
|
disabled?: ReactiveProp<IntrinsicBooleanValue>;
|
|
192
|
+
maxLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
193
|
+
maxlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
194
|
+
minLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
195
|
+
minlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
186
196
|
name?: ReactiveProp<IntrinsicTextValue>;
|
|
187
197
|
placeholder?: ReactiveProp<IntrinsicTextValue>;
|
|
198
|
+
readOnly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
199
|
+
readonly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
188
200
|
required?: ReactiveProp<IntrinsicBooleanValue>;
|
|
189
201
|
type?: ReactiveProp<IntrinsicTextValue>;
|
|
190
202
|
value?: ReactiveProp<IntrinsicFormValue>;
|
|
@@ -247,8 +259,14 @@ interface TextareaIntrinsicProps extends IntrinsicProps {
|
|
|
247
259
|
autocomplete?: ReactiveProp<IntrinsicTextValue>;
|
|
248
260
|
cols?: ReactiveProp<IntrinsicNumberValue>;
|
|
249
261
|
disabled?: ReactiveProp<IntrinsicBooleanValue>;
|
|
262
|
+
maxLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
263
|
+
maxlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
264
|
+
minLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
265
|
+
minlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
250
266
|
name?: ReactiveProp<IntrinsicTextValue>;
|
|
251
267
|
placeholder?: ReactiveProp<IntrinsicTextValue>;
|
|
268
|
+
readOnly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
269
|
+
readonly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
252
270
|
required?: ReactiveProp<IntrinsicBooleanValue>;
|
|
253
271
|
rows?: ReactiveProp<IntrinsicNumberValue>;
|
|
254
272
|
value?: ReactiveProp<IntrinsicTextValue>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./jsx-
|
|
2
|
-
import { t as EagerControlPrimitive } from "./control-
|
|
3
|
-
import "./types-
|
|
1
|
+
import { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./jsx-BYXe_Nnk.js";
|
|
2
|
+
import { t as EagerControlPrimitive } from "./control-CsGs2bLS.js";
|
|
3
|
+
import "./types-CsPtBGWb.js";
|
|
4
4
|
//#region src/jsx/jsx-dev-runtime.d.ts
|
|
5
5
|
declare namespace JSX {
|
|
6
6
|
type ElementType = string | symbol | ((props: never) => unknown);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./jsx-
|
|
2
|
-
import { t as EagerControlPrimitive } from "./control-
|
|
3
|
-
import "./types-
|
|
1
|
+
import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./jsx-BYXe_Nnk.js";
|
|
2
|
+
import { t as EagerControlPrimitive } from "./control-CsGs2bLS.js";
|
|
3
|
+
import "./types-CsPtBGWb.js";
|
|
4
4
|
//#region src/jsx/jsx-runtime.d.ts
|
|
5
5
|
declare namespace JSX {
|
|
6
6
|
type ElementType = string | symbol | ((props: never) => unknown);
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./jsx-
|
|
2
|
-
import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-
|
|
1
|
+
import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./jsx-BYXe_Nnk.js";
|
|
2
|
+
import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-LHh5tcTe.js";
|
|
3
3
|
export { Fragment, JSX, type JSXComponent, type JSXElement, type JSXElementType, jsx, jsxDEV, jsxs };
|
|
@@ -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) {
|
|
@@ -3479,8 +3479,9 @@ function createReactiveScalarChildCleanupEntry(el, source, host) {
|
|
|
3479
3479
|
}
|
|
3480
3480
|
function setupReactiveChildBoundary(el, childFn, host) {
|
|
3481
3481
|
let currentChildFn = childFn;
|
|
3482
|
+
const parentInstance = getCurrentInstance();
|
|
3482
3483
|
const entry = {
|
|
3483
|
-
scope: createChildScope(
|
|
3484
|
+
scope: createChildScope(parentInstance, `__reactive-child__:${reactiveChildScopeId += 1}`, () => {
|
|
3484
3485
|
syncReactiveChildExpectedNodes(el, commitReactiveChildBoundaryEntryNodes(el, entry, host));
|
|
3485
3486
|
}),
|
|
3486
3487
|
nodes: []
|
|
@@ -4872,9 +4873,7 @@ function commitForStateBoundaryChildrenImpl(parent, forState, childrenVNodes, ru
|
|
|
4872
4873
|
case "SWAP":
|
|
4873
4874
|
commitSwap();
|
|
4874
4875
|
break;
|
|
4875
|
-
default:
|
|
4876
|
-
commitReorder();
|
|
4877
|
-
break;
|
|
4876
|
+
default: commitReorder();
|
|
4878
4877
|
}
|
|
4879
4878
|
if (!removedBoundaryConsumed) removeForBoundaryNodes(parent, forState.lastRemovedNodes, { teardown: false });
|
|
4880
4879
|
syncKeyedMapFromForState(parent, forState, forState.lastCommitStrategy, forState.lastRemovedNodes);
|
|
@@ -5039,6 +5038,44 @@ function unwrapStagingHost(staging, parent, restoreFocus) {
|
|
|
5039
5038
|
function createAttributeFreeStagingHost(parent) {
|
|
5040
5039
|
return parent.ownerDocument.createElementNS(parent.namespaceURI, parent.localName);
|
|
5041
5040
|
}
|
|
5041
|
+
function migrateAdoptedRangeOwners(sourceNode, rangeHost, owners) {
|
|
5042
|
+
const sourceHost = sourceNode;
|
|
5043
|
+
const sourceHadInstanceList = Object.prototype.hasOwnProperty.call(sourceHost, "__ASKR_INSTANCES");
|
|
5044
|
+
const sourceHadPrimaryInstance = Object.prototype.hasOwnProperty.call(sourceHost, "__ASKR_INSTANCE");
|
|
5045
|
+
const sourceInstanceList = sourceHost.__ASKR_INSTANCES?.slice();
|
|
5046
|
+
const sourcePrimaryInstance = sourceHost.__ASKR_INSTANCE;
|
|
5047
|
+
const previousBindings = /* @__PURE__ */ new Map();
|
|
5048
|
+
for (const owner of owners) if (owner.target === sourceNode || owner._placeholder === sourceNode) {
|
|
5049
|
+
previousBindings.set(owner, {
|
|
5050
|
+
target: owner.target,
|
|
5051
|
+
placeholder: owner._placeholder
|
|
5052
|
+
});
|
|
5053
|
+
owner.target = null;
|
|
5054
|
+
owner._placeholder = rangeHost;
|
|
5055
|
+
}
|
|
5056
|
+
const sourceInstances = new Set(sourceHost.__ASKR_INSTANCES ?? []);
|
|
5057
|
+
if (sourcePrimaryInstance) sourceInstances.add(sourcePrimaryInstance);
|
|
5058
|
+
const remainingSourceInstances = Array.from(sourceInstances).filter((owner) => !owners.has(owner));
|
|
5059
|
+
if (remainingSourceInstances.length > 0) {
|
|
5060
|
+
sourceHost.__ASKR_INSTANCES = remainingSourceInstances;
|
|
5061
|
+
sourceHost.__ASKR_INSTANCE = remainingSourceInstances[0];
|
|
5062
|
+
} else {
|
|
5063
|
+
delete sourceHost.__ASKR_INSTANCES;
|
|
5064
|
+
delete sourceHost.__ASKR_INSTANCE;
|
|
5065
|
+
}
|
|
5066
|
+
rangeHost.__ASKR_INSTANCES = Array.from(owners);
|
|
5067
|
+
rangeHost.__ASKR_INSTANCE = rangeHost.__ASKR_INSTANCES[0];
|
|
5068
|
+
return () => {
|
|
5069
|
+
if (sourceHadInstanceList) sourceHost.__ASKR_INSTANCES = sourceInstanceList;
|
|
5070
|
+
else delete sourceHost.__ASKR_INSTANCES;
|
|
5071
|
+
if (sourceHadPrimaryInstance) sourceHost.__ASKR_INSTANCE = sourcePrimaryInstance;
|
|
5072
|
+
else delete sourceHost.__ASKR_INSTANCE;
|
|
5073
|
+
for (const [owner, binding] of previousBindings) {
|
|
5074
|
+
owner.target = binding.target;
|
|
5075
|
+
owner._placeholder = binding.placeholder;
|
|
5076
|
+
}
|
|
5077
|
+
};
|
|
5078
|
+
}
|
|
5042
5079
|
function isAutomaticPortalHost(node) {
|
|
5043
5080
|
const host = node;
|
|
5044
5081
|
const instances = new Set(host.__ASKR_INSTANCES ?? []);
|
|
@@ -5093,12 +5130,12 @@ function adoptHydratedComponentRange(existingHost, instance, result, endExclusiv
|
|
|
5093
5130
|
const host = start;
|
|
5094
5131
|
const owners = new Set(retainedInstances);
|
|
5095
5132
|
owners.add(instance);
|
|
5096
|
-
|
|
5097
|
-
host.__ASKR_INSTANCES = Array.from(owners);
|
|
5133
|
+
const restoreMigratedOwners = migrateAdoptedRangeOwners(existingHost, host, owners);
|
|
5098
5134
|
instance.target = null;
|
|
5099
5135
|
instance._placeholder = start;
|
|
5100
5136
|
mountInstanceInline(instance, null);
|
|
5101
5137
|
const registered = registerLifecycleTransaction({}, () => {}, () => {
|
|
5138
|
+
restoreMigratedOwners();
|
|
5102
5139
|
start.parentNode?.removeChild(start);
|
|
5103
5140
|
end.parentNode?.removeChild(end);
|
|
5104
5141
|
});
|
|
@@ -5106,6 +5143,7 @@ function adoptHydratedComponentRange(existingHost, instance, result, endExclusiv
|
|
|
5106
5143
|
if (!syncComponentFragmentRange(host, instance, result, forceChildrenUpdate)) throw new Error("[askr] Failed to adopt hydrated component range.");
|
|
5107
5144
|
} catch (error) {
|
|
5108
5145
|
if (!registered) {
|
|
5146
|
+
restoreMigratedOwners();
|
|
5109
5147
|
start.remove();
|
|
5110
5148
|
end.remove();
|
|
5111
5149
|
}
|
|
@@ -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-
|
|
2
|
-
import { r as JSXElement, s as Props } from "../jsx-
|
|
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-
|
|
4
|
-
import "../types-
|
|
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-
|
|
1
|
+
import { u as RenderableChild } from "../control-D-FIa-n-.js";
|
|
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-Izwp_ESC.js";
|
|
4
|
+
import "../types-CsPtBGWb.js";
|
|
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 };
|