@askrjs/askr 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/access-CEA2pOry.js +1046 -0
- package/dist/actions/index.d.ts +16 -2
- package/dist/actions/index.js +5 -5
- package/dist/{activity-FirwPXA_.js → activity-oy2YFTFF.js} +10 -16
- package/dist/benchmark.js +8 -9
- package/dist/boot/index.d.ts +19 -9
- package/dist/boot/index.js +1 -1
- package/dist/{boot-tWyF6121.js → boot-BMBMWUGI.js} +680 -441
- package/dist/capabilities-Bbf0mlp9.js +42 -0
- package/dist/components/index.d.ts +11 -8
- package/dist/components/index.js +1 -1
- package/dist/{compose-ref-Bfaf4kUC.js → compose-ref-v0qGlHoN.js} +7 -1
- package/dist/control/index.d.ts +20 -2
- package/dist/control/index.js +1 -1
- package/dist/{control-C-wSaq9V.js → control-BR_mrX__.js} +4 -4
- package/dist/core.d.ts +163 -0
- package/dist/csp-nonce-BfFWcd0w.js +173 -0
- package/dist/data/index.d.ts +74 -2
- package/dist/data/index.js +3 -3
- package/dist/{data-ghKopAbp.js → data-2edW0jhF.js} +108 -122
- package/dist/{data-runtime-7t_Y0iv3.js → data-runtime-CxoY98lX.js} +22 -15
- package/dist/{deferred-CxjWCkIn.js → deferred-CbgNhf67.js} +5 -5
- package/dist/dom-renderer.d.ts +77 -0
- package/dist/domains/actions.d.ts +70 -0
- package/dist/domains/component.d.ts +119 -0
- package/dist/domains/context.d.ts +73 -0
- package/dist/domains/control.d.ts +328 -0
- package/dist/domains/data.d.ts +461 -0
- package/dist/domains/diagnostics.d.ts +21 -0
- package/dist/domains/lifecycle.d.ts +112 -0
- package/dist/domains/refs.d.ts +18 -0
- package/dist/domains/renderer.d.ts +127 -0
- package/dist/domains/routing.d.ts +501 -0
- package/dist/domains/scheduler.d.ts +79 -0
- package/dist/domains/server.d.ts +112 -0
- package/dist/domains/state.d.ts +129 -0
- package/dist/domains/telemetry.d.ts +29 -0
- package/dist/eager-control.d.ts +8 -0
- package/dist/{effect-CNwstBBD.js → effect-C3Zsc1k6.js} +14 -41
- package/dist/{types-DWVrKn9N.d.ts → elements.d.ts} +79 -42
- package/dist/{for-internal-DyBHfKJA.js → for-state-BDykeOJL.js} +598 -494
- package/dist/foundations/icon/index.d.ts +67 -16
- package/dist/foundations/icon/index.js +1 -1
- package/dist/foundations/index.d.ts +26 -3
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/index.d.ts +73 -34
- package/dist/foundations/interactions/index.js +1 -1
- package/dist/foundations/state/index.d.ts +12 -5
- package/dist/foundations/state/index.js +1 -1
- package/dist/foundations/structures/index.d.ts +44 -3
- package/dist/foundations/structures/index.js +1 -1
- package/dist/foundations/utilities/index.d.ts +34 -3
- package/dist/foundations/utilities/index.js +1 -1
- package/dist/fx/index.d.ts +72 -25
- package/dist/fx/index.js +8 -8
- package/dist/index.d.ts +121 -4
- package/dist/index.js +316 -47
- package/dist/{component-internal-C4hKKQBF.js → instance-VAFYVJOa.js} +495 -283
- package/dist/{interactions-D102JxBR.js → interactions-CTeACdT_.js} +1 -1
- package/dist/jsx-dev-runtime.d.ts +51 -11
- package/dist/jsx-globals.d.ts +2 -0
- package/dist/jsx-runtime-CPJXAOBF.js +43 -0
- package/dist/jsx-runtime.d.ts +17 -3
- package/dist/jsx-runtime.js +2 -42
- package/dist/jsx.d.ts +108 -0
- package/dist/{manifest-D6rfj_jC.js → manifest-D1P3UNWV.js} +4 -9
- package/dist/{navigate-ZZu1IV0B.js → navigate-prC5V8XV.js} +125 -472
- package/dist/{navigate-F4sHgWbw.d.ts → navigation.d.ts} +8 -8
- package/dist/{readable-Di1fzSwm.js → notify-DxxuDPeY.js} +96 -34
- package/dist/{query-registry-Bua3cDyb.js → query-registry-LrYpQsDJ.js} +1 -1
- package/dist/{compose-ref-DOJHoW5X.d.ts → refs.d.ts} +11 -7
- package/dist/{ssr-Doog-AfJ.js → render-resolved-BC0W7_5b.js} +165 -558
- package/dist/{renderer-Cl23O0hV.js → renderer-CT0HeY58.js} +6825 -5692
- package/dist/{resolution-ClD-K7Lz.js → resolution-3DskUkjG.js} +189 -180
- package/dist/{resource-operation-Vz1S5h2k.js → resource-18-sFRl9.js} +98 -58
- package/dist/resources/index.d.ts +64 -12
- package/dist/resources/index.js +214 -8
- package/dist/route-activity.d.ts +21 -0
- package/dist/{route-matching-Bo6UqG-5.js → route-matching-CUzZ31gT.js} +68 -82
- package/dist/router/index.d.ts +378 -79
- package/dist/router/index.js +9 -9
- package/dist/router-internal-7nuNEHfG.js +36 -0
- package/dist/scope-Cq_iYbTR.js +403 -0
- package/dist/{selector-CsKuomw0.js → selector-BSPVkjKP.js} +26 -27
- package/dist/{shared-CYBH3F8I.js → shared-kU8yvryp.js} +3 -6
- package/dist/{snapshot-source-BB42xgwb.js → snapshot-source-An4iKajG.js} +1 -1
- package/dist/ssg/index.d.ts +51 -15
- package/dist/ssg/index.js +269 -209
- package/dist/ssr/index.d.ts +121 -68
- package/dist/ssr/index.js +2 -1
- package/dist/ssr-CiNm6Vzl.js +393 -0
- package/dist/{ssr-DSHd_Q9K.js → ssr-EPjwJH5R.js} +5 -1
- package/dist/{state-BGJgYSyQ.js → state-BXJfudq1.js} +10 -15
- package/dist/{structures-DFyK5AdQ.js → structures-CjEzfj4h.js} +37 -57
- package/dist/{index-CTpMmzgN.d.ts → structures.d.ts} +57 -36
- package/dist/testing/index.d.ts +123 -24
- package/dist/testing/index.js +24 -61
- package/dist/timer-C7uqnJVt.js +85 -0
- package/dist/{index-B1gu0_m0.d.ts → utilities.d.ts} +24 -13
- package/dist/{verify-hydration-BZPJ_kYa.js → verify-hydration-ikaxotf7.js} +8 -5
- package/package.json +12 -14
- package/dist/access-BucjYZcX.js +0 -509
- package/dist/activity-DooIuxQO.d.ts +0 -14
- package/dist/benchmark.d.ts +0 -26
- package/dist/cleanup-TXSsApEl.js +0 -535
- package/dist/component-cleanup-jdbgjkT1.js +0 -143
- package/dist/component-scope-4I3yEMkb.js +0 -195
- package/dist/control-Cxag1yqV.d.ts +0 -8
- package/dist/csp-nonce-9NFUb7hJ.js +0 -72
- package/dist/css-BuPaTOfe.js +0 -70
- package/dist/fastlane-BKZduiBQ.js +0 -166
- package/dist/index-Dgjbo2gU.d.ts +0 -1456
- package/dist/jsx-runtime-Cg7GqY1S.d.ts +0 -2
- package/dist/jsx-runtime-gVIaTPw0.d.ts +0 -38
- package/dist/lifecycle-batch-63aXFf2S.js +0 -253
- package/dist/lifecycle-operations-Q0k3EFnG.js +0 -287
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as composeRefs } from "./compose-ref-
|
|
1
|
+
import { t as composeRefs } from "./compose-ref-v0qGlHoN.js";
|
|
2
2
|
import { a as composeHandlers, i as mergeProps, t as ariaDisabled } from "./aria-hKjThHcp.js";
|
|
3
3
|
//#region src/foundations/interactions/pressable.ts
|
|
4
4
|
/** Produce click/keyboard props implementing 'press' semantics for an element. */
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
IntrinsicFallbackProps,
|
|
3
|
+
JSXElementType,
|
|
4
|
+
JSXComponent,
|
|
5
|
+
KnownIntrinsicElementProps,
|
|
6
|
+
JSXElement,
|
|
7
|
+
Props,
|
|
8
|
+
Fragment,
|
|
9
|
+
} from './elements.js';
|
|
10
|
+
import { EagerControlPrimitive } from './eager-control.js';
|
|
4
11
|
declare namespace JSX {
|
|
5
12
|
type ElementType = string | symbol | ((props: never) => unknown);
|
|
6
13
|
interface Element extends JSXElement {
|
|
@@ -8,7 +15,9 @@ declare namespace JSX {
|
|
|
8
15
|
}
|
|
9
16
|
interface KnownIntrinsicElements extends KnownIntrinsicElementProps {}
|
|
10
17
|
interface IntrinsicElements extends KnownIntrinsicElements {
|
|
11
|
-
[elem: string]:
|
|
18
|
+
[elem: string]:
|
|
19
|
+
| IntrinsicFallbackProps
|
|
20
|
+
| KnownIntrinsicElementProps[keyof KnownIntrinsicElementProps];
|
|
12
21
|
}
|
|
13
22
|
interface ElementAttributesProperty {
|
|
14
23
|
props: Props;
|
|
@@ -17,10 +26,41 @@ declare namespace JSX {
|
|
|
17
26
|
children: unknown;
|
|
18
27
|
}
|
|
19
28
|
}
|
|
20
|
-
declare function jsxDEV(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
declare function jsxDEV(
|
|
30
|
+
type: EagerControlPrimitive,
|
|
31
|
+
props: Props | null,
|
|
32
|
+
key?: string | number,
|
|
33
|
+
isStaticChildren?: boolean
|
|
34
|
+
): unknown;
|
|
35
|
+
declare function jsxDEV<TTag extends keyof KnownIntrinsicElementProps>(
|
|
36
|
+
type: TTag,
|
|
37
|
+
props: KnownIntrinsicElementProps[TTag] | null,
|
|
38
|
+
key?: string | number,
|
|
39
|
+
isStaticChildren?: boolean
|
|
40
|
+
): JSXElement;
|
|
41
|
+
declare function jsxDEV<TTag extends string>(
|
|
42
|
+
type: Exclude<TTag, keyof KnownIntrinsicElementProps>,
|
|
43
|
+
props: IntrinsicFallbackProps | null,
|
|
44
|
+
key?: string | number,
|
|
45
|
+
isStaticChildren?: boolean
|
|
46
|
+
): JSXElement;
|
|
47
|
+
declare function jsxDEV<TProps extends object>(
|
|
48
|
+
type: (props: TProps) => unknown,
|
|
49
|
+
props: TProps | null,
|
|
50
|
+
key?: string | number,
|
|
51
|
+
isStaticChildren?: boolean
|
|
52
|
+
): JSXElement;
|
|
53
|
+
declare function jsxDEV(
|
|
54
|
+
type: symbol,
|
|
55
|
+
props: Props | null,
|
|
56
|
+
key?: string | number,
|
|
57
|
+
isStaticChildren?: boolean
|
|
58
|
+
): JSXElement;
|
|
59
|
+
export {
|
|
60
|
+
Fragment,
|
|
61
|
+
JSX,
|
|
62
|
+
type JSXComponent,
|
|
63
|
+
type JSXElement,
|
|
64
|
+
type JSXElementType,
|
|
65
|
+
jsxDEV,
|
|
66
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
|
|
2
|
+
import { r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
3
|
+
//#region src/jsx/jsx-runtime.ts
|
|
4
|
+
function markStaticChildren(props) {
|
|
5
|
+
if (Array.isArray(props.children)) Object.defineProperty(props.children, STATIC_CHILDREN, {
|
|
6
|
+
value: true,
|
|
7
|
+
configurable: true
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function jsxDEV(type, props, key, isStaticChildren = false) {
|
|
11
|
+
const normalizedProps = props ?? {};
|
|
12
|
+
if (isStaticChildren) markStaticChildren(normalizedProps);
|
|
13
|
+
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
14
|
+
return {
|
|
15
|
+
$$typeof: ELEMENT_TYPE,
|
|
16
|
+
type,
|
|
17
|
+
props: normalizedProps,
|
|
18
|
+
key: key ?? null
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function jsx(type, props, key) {
|
|
22
|
+
const normalizedProps = props ?? {};
|
|
23
|
+
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
24
|
+
return {
|
|
25
|
+
$$typeof: ELEMENT_TYPE,
|
|
26
|
+
type,
|
|
27
|
+
props: normalizedProps,
|
|
28
|
+
key: key ?? null
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function jsxs(type, props, key) {
|
|
32
|
+
const normalizedProps = props ?? {};
|
|
33
|
+
markStaticChildren(normalizedProps);
|
|
34
|
+
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
35
|
+
return {
|
|
36
|
+
$$typeof: ELEMENT_TYPE,
|
|
37
|
+
type,
|
|
38
|
+
props: normalizedProps,
|
|
39
|
+
key: key ?? null
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { jsxDEV as n, jsxs as r, jsx as t };
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
JSXElementType,
|
|
3
|
+
JSXComponent,
|
|
4
|
+
JSXElement,
|
|
5
|
+
Fragment,
|
|
6
|
+
} from './elements.js';
|
|
7
|
+
import { jsxs, jsx, jsxDEV, JSX } from './jsx.js';
|
|
8
|
+
export {
|
|
9
|
+
Fragment,
|
|
10
|
+
JSX,
|
|
11
|
+
type JSXComponent,
|
|
12
|
+
type JSXElement,
|
|
13
|
+
type JSXElementType,
|
|
14
|
+
jsx,
|
|
15
|
+
jsxDEV,
|
|
16
|
+
jsxs,
|
|
17
|
+
};
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,43 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
//#region src/jsx/jsx-runtime.ts
|
|
4
|
-
function markStaticChildren(props) {
|
|
5
|
-
if (Array.isArray(props.children)) Object.defineProperty(props.children, STATIC_CHILDREN, {
|
|
6
|
-
value: true,
|
|
7
|
-
configurable: true
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function jsxDEV(type, props, key, isStaticChildren = false) {
|
|
11
|
-
const normalizedProps = props ?? {};
|
|
12
|
-
if (isStaticChildren) markStaticChildren(normalizedProps);
|
|
13
|
-
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
14
|
-
return {
|
|
15
|
-
$$typeof: ELEMENT_TYPE,
|
|
16
|
-
type,
|
|
17
|
-
props: normalizedProps,
|
|
18
|
-
key: key ?? null
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function jsx(type, props, key) {
|
|
22
|
-
const normalizedProps = props ?? {};
|
|
23
|
-
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
24
|
-
return {
|
|
25
|
-
$$typeof: ELEMENT_TYPE,
|
|
26
|
-
type,
|
|
27
|
-
props: normalizedProps,
|
|
28
|
-
key: key ?? null
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function jsxs(type, props, key) {
|
|
32
|
-
const normalizedProps = props ?? {};
|
|
33
|
-
markStaticChildren(normalizedProps);
|
|
34
|
-
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
35
|
-
return {
|
|
36
|
-
$$typeof: ELEMENT_TYPE,
|
|
37
|
-
type,
|
|
38
|
-
props: normalizedProps,
|
|
39
|
-
key: key ?? null
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
1
|
+
import { n as Fragment } from "./jsx-DRS-qjiN.js";
|
|
2
|
+
import { n as jsxDEV, r as jsxs, t as jsx } from "./jsx-runtime-CPJXAOBF.js";
|
|
43
3
|
export { Fragment, jsx, jsxDEV, jsxs };
|
package/dist/jsx.d.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IntrinsicFallbackProps,
|
|
3
|
+
KnownIntrinsicElementProps,
|
|
4
|
+
JSXElement,
|
|
5
|
+
Props,
|
|
6
|
+
} from './elements.js';
|
|
7
|
+
import { EagerControlPrimitive } from './eager-control.js';
|
|
8
|
+
declare namespace JSX {
|
|
9
|
+
type ElementType = string | symbol | ((props: never) => unknown);
|
|
10
|
+
interface Element extends JSXElement {
|
|
11
|
+
readonly __askrJsxElementBrand?: never;
|
|
12
|
+
}
|
|
13
|
+
interface KnownIntrinsicElements extends KnownIntrinsicElementProps {}
|
|
14
|
+
interface IntrinsicElements extends KnownIntrinsicElements {
|
|
15
|
+
[elem: string]:
|
|
16
|
+
| IntrinsicFallbackProps
|
|
17
|
+
| KnownIntrinsicElementProps[keyof KnownIntrinsicElementProps];
|
|
18
|
+
}
|
|
19
|
+
interface ElementAttributesProperty {
|
|
20
|
+
props: Props;
|
|
21
|
+
}
|
|
22
|
+
interface ElementChildrenAttribute {
|
|
23
|
+
children: unknown;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
declare function jsxDEV(
|
|
27
|
+
type: EagerControlPrimitive,
|
|
28
|
+
props: Props | null,
|
|
29
|
+
key?: string | number,
|
|
30
|
+
isStaticChildren?: boolean
|
|
31
|
+
): unknown;
|
|
32
|
+
declare function jsxDEV<TTag extends keyof KnownIntrinsicElementProps>(
|
|
33
|
+
type: TTag,
|
|
34
|
+
props: KnownIntrinsicElementProps[TTag] | null,
|
|
35
|
+
key?: string | number,
|
|
36
|
+
isStaticChildren?: boolean
|
|
37
|
+
): JSXElement;
|
|
38
|
+
declare function jsxDEV<TTag extends string>(
|
|
39
|
+
type: Exclude<TTag, keyof KnownIntrinsicElementProps>,
|
|
40
|
+
props: IntrinsicFallbackProps | null,
|
|
41
|
+
key?: string | number,
|
|
42
|
+
isStaticChildren?: boolean
|
|
43
|
+
): JSXElement;
|
|
44
|
+
declare function jsxDEV<TProps extends object>(
|
|
45
|
+
type: (props: TProps) => unknown,
|
|
46
|
+
props: TProps | null,
|
|
47
|
+
key?: string | number,
|
|
48
|
+
isStaticChildren?: boolean
|
|
49
|
+
): JSXElement;
|
|
50
|
+
declare function jsxDEV(
|
|
51
|
+
type: symbol,
|
|
52
|
+
props: Props | null,
|
|
53
|
+
key?: string | number,
|
|
54
|
+
isStaticChildren?: boolean
|
|
55
|
+
): JSXElement;
|
|
56
|
+
/** JSX factory for elements with a single or no child, used by the `jsxImportSource` transform. */
|
|
57
|
+
declare function jsx(
|
|
58
|
+
type: EagerControlPrimitive,
|
|
59
|
+
props: Props | null,
|
|
60
|
+
key?: string | number
|
|
61
|
+
): unknown;
|
|
62
|
+
declare function jsx<TTag extends keyof KnownIntrinsicElementProps>(
|
|
63
|
+
type: TTag,
|
|
64
|
+
props: KnownIntrinsicElementProps[TTag] | null,
|
|
65
|
+
key?: string | number
|
|
66
|
+
): JSXElement;
|
|
67
|
+
declare function jsx<TTag extends string>(
|
|
68
|
+
type: Exclude<TTag, keyof KnownIntrinsicElementProps>,
|
|
69
|
+
props: IntrinsicFallbackProps | null,
|
|
70
|
+
key?: string | number
|
|
71
|
+
): JSXElement;
|
|
72
|
+
declare function jsx<TProps extends object>(
|
|
73
|
+
type: (props: TProps) => unknown,
|
|
74
|
+
props: TProps | null,
|
|
75
|
+
key?: string | number
|
|
76
|
+
): JSXElement;
|
|
77
|
+
declare function jsx(
|
|
78
|
+
type: symbol,
|
|
79
|
+
props: Props | null,
|
|
80
|
+
key?: string | number
|
|
81
|
+
): JSXElement;
|
|
82
|
+
/** JSX factory for elements with multiple static children, used by the `jsxImportSource` transform. */
|
|
83
|
+
declare function jsxs(
|
|
84
|
+
type: EagerControlPrimitive,
|
|
85
|
+
props: Props | null,
|
|
86
|
+
key?: string | number
|
|
87
|
+
): unknown;
|
|
88
|
+
declare function jsxs<TTag extends keyof KnownIntrinsicElementProps>(
|
|
89
|
+
type: TTag,
|
|
90
|
+
props: KnownIntrinsicElementProps[TTag] | null,
|
|
91
|
+
key?: string | number
|
|
92
|
+
): JSXElement;
|
|
93
|
+
declare function jsxs<TTag extends string>(
|
|
94
|
+
type: Exclude<TTag, keyof KnownIntrinsicElementProps>,
|
|
95
|
+
props: IntrinsicFallbackProps | null,
|
|
96
|
+
key?: string | number
|
|
97
|
+
): JSXElement;
|
|
98
|
+
declare function jsxs<TProps extends object>(
|
|
99
|
+
type: (props: TProps) => unknown,
|
|
100
|
+
props: TProps | null,
|
|
101
|
+
key?: string | number
|
|
102
|
+
): JSXElement;
|
|
103
|
+
declare function jsxs(
|
|
104
|
+
type: symbol,
|
|
105
|
+
props: Props | null,
|
|
106
|
+
key?: string | number
|
|
107
|
+
): JSXElement;
|
|
108
|
+
export { jsxs, jsx, jsxDEV, JSX };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as getDefaultRouteAuthOptions, B as setDefaultRouteBasePath, I as insertRecordSorted, M as getRouteList, N as getRouteRecords, V as withRouteTable, h as addRouteToStores, j as getDefaultRouteBasePath, s as normalizeRouteBasePath, v as createRouteTable, z as setDefaultRouteAuthOptions } from "./route-matching-CUzZ31gT.js";
|
|
2
2
|
//#region src/runtime/execution-model.ts
|
|
3
3
|
const EXECUTION_MODEL_KEY = Symbol.for("__ASKR_EXECUTION_MODEL__");
|
|
4
4
|
function getExecutionModel() {
|
|
@@ -38,20 +38,15 @@ function _applyManifest(manifest) {
|
|
|
38
38
|
* and build a {@link RouteRegistry} to pass to `createSPA`/`hydrateSPA`.
|
|
39
39
|
*/
|
|
40
40
|
function createRouteRegistry(definition, options = {}) {
|
|
41
|
-
|
|
42
|
-
clearRouteState();
|
|
43
|
-
try {
|
|
41
|
+
return withRouteTable(createRouteTable(), () => {
|
|
44
42
|
setDefaultRouteAuthOptions(options.auth);
|
|
45
43
|
setDefaultRouteBasePath(normalizeRouteBasePath(options.basePath));
|
|
46
44
|
definition();
|
|
47
|
-
const manifest = createRouteManifest();
|
|
48
45
|
return Object.freeze({
|
|
49
|
-
manifest,
|
|
46
|
+
manifest: createRouteManifest(),
|
|
50
47
|
routes: getRouteList()
|
|
51
48
|
});
|
|
52
|
-
}
|
|
53
|
-
restoreRouteState(previous);
|
|
54
|
-
}
|
|
49
|
+
});
|
|
55
50
|
}
|
|
56
51
|
//#endregion
|
|
57
52
|
export { getExecutionModel as i, createRouteRegistry as n, assertExecutionModel as r, _applyManifest as t };
|