@askrjs/askr 0.2.3 → 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.
Files changed (117) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/access-CEA2pOry.js +1046 -0
  3. package/dist/actions/index.d.ts +16 -2
  4. package/dist/actions/index.js +5 -5
  5. package/dist/{activity-ZxJXI9hF.js → activity-oy2YFTFF.js} +22 -16
  6. package/dist/benchmark.js +8 -9
  7. package/dist/boot/index.d.ts +21 -9
  8. package/dist/boot/index.js +1 -1
  9. package/dist/{boot-D4GaLA0d.js → boot-BMBMWUGI.js} +680 -440
  10. package/dist/capabilities-Bbf0mlp9.js +42 -0
  11. package/dist/components/index.d.ts +11 -8
  12. package/dist/components/index.js +1 -1
  13. package/dist/{compose-ref-Bfaf4kUC.js → compose-ref-v0qGlHoN.js} +7 -1
  14. package/dist/control/index.d.ts +20 -2
  15. package/dist/control/index.js +1 -1
  16. package/dist/{control-57x3wa4J.js → control-BR_mrX__.js} +4 -4
  17. package/dist/core.d.ts +163 -0
  18. package/dist/csp-nonce-BfFWcd0w.js +173 -0
  19. package/dist/data/index.d.ts +74 -2
  20. package/dist/data/index.js +3 -3
  21. package/dist/{data-B7XCDeC8.js → data-2edW0jhF.js} +133 -138
  22. package/dist/{data-runtime-7t_Y0iv3.js → data-runtime-CxoY98lX.js} +22 -15
  23. package/dist/{deferred-BELyvMsC.js → deferred-CbgNhf67.js} +5 -5
  24. package/dist/dom-renderer.d.ts +77 -0
  25. package/dist/domains/actions.d.ts +70 -0
  26. package/dist/domains/component.d.ts +119 -0
  27. package/dist/domains/context.d.ts +73 -0
  28. package/dist/domains/control.d.ts +328 -0
  29. package/dist/domains/data.d.ts +461 -0
  30. package/dist/domains/diagnostics.d.ts +21 -0
  31. package/dist/domains/lifecycle.d.ts +112 -0
  32. package/dist/domains/refs.d.ts +18 -0
  33. package/dist/domains/renderer.d.ts +127 -0
  34. package/dist/domains/routing.d.ts +501 -0
  35. package/dist/domains/scheduler.d.ts +79 -0
  36. package/dist/domains/server.d.ts +112 -0
  37. package/dist/domains/state.d.ts +129 -0
  38. package/dist/domains/telemetry.d.ts +29 -0
  39. package/dist/eager-control.d.ts +8 -0
  40. package/dist/{effect-4LwBwV58.js → effect-C3Zsc1k6.js} +14 -41
  41. package/dist/{types-DkVJhVs9.d.ts → elements.d.ts} +84 -42
  42. package/dist/{for-internal-DeoSg_AV.js → for-state-BDykeOJL.js} +623 -511
  43. package/dist/foundations/icon/index.d.ts +67 -16
  44. package/dist/foundations/icon/index.js +1 -1
  45. package/dist/foundations/index.d.ts +26 -3
  46. package/dist/foundations/index.js +1 -1
  47. package/dist/foundations/interactions/index.d.ts +73 -34
  48. package/dist/foundations/interactions/index.js +1 -1
  49. package/dist/foundations/state/index.d.ts +12 -5
  50. package/dist/foundations/state/index.js +1 -1
  51. package/dist/foundations/structures/index.d.ts +44 -3
  52. package/dist/foundations/structures/index.js +1 -1
  53. package/dist/foundations/utilities/index.d.ts +34 -3
  54. package/dist/foundations/utilities/index.js +1 -1
  55. package/dist/fx/index.d.ts +72 -25
  56. package/dist/fx/index.js +8 -8
  57. package/dist/index.d.ts +121 -4
  58. package/dist/index.js +316 -47
  59. package/dist/{component-internal-Dl02WQKS.js → instance-VAFYVJOa.js} +495 -283
  60. package/dist/{interactions-D102JxBR.js → interactions-CTeACdT_.js} +1 -1
  61. package/dist/jsx-dev-runtime.d.ts +51 -11
  62. package/dist/jsx-globals.d.ts +2 -0
  63. package/dist/jsx-runtime-CPJXAOBF.js +43 -0
  64. package/dist/jsx-runtime.d.ts +17 -3
  65. package/dist/jsx-runtime.js +2 -42
  66. package/dist/jsx.d.ts +108 -0
  67. package/dist/{manifest-D6rfj_jC.js → manifest-D1P3UNWV.js} +4 -9
  68. package/dist/{navigate-C46GtScG.js → navigate-prC5V8XV.js} +204 -476
  69. package/dist/{navigate-wel1e6cU.d.ts → navigation.d.ts} +10 -8
  70. package/dist/{readable-CEcteIDE.js → notify-DxxuDPeY.js} +96 -34
  71. package/dist/{query-registry-Bua3cDyb.js → query-registry-LrYpQsDJ.js} +1 -1
  72. package/dist/{compose-ref-DOJHoW5X.d.ts → refs.d.ts} +11 -7
  73. package/dist/{ssr-BaC5qHEw.js → render-resolved-BC0W7_5b.js} +165 -558
  74. package/dist/{renderer-BhXofszH.js → renderer-CT0HeY58.js} +6866 -5715
  75. package/dist/{resolution-t8J0yNaU.js → resolution-3DskUkjG.js} +189 -180
  76. package/dist/{resource-operation-B8q-QRUx.js → resource-18-sFRl9.js} +98 -58
  77. package/dist/resources/index.d.ts +64 -46
  78. package/dist/resources/index.js +215 -9
  79. package/dist/route-activity.d.ts +21 -0
  80. package/dist/{route-matching-Bo6UqG-5.js → route-matching-CUzZ31gT.js} +68 -82
  81. package/dist/router/index.d.ts +378 -79
  82. package/dist/router/index.js +9 -9
  83. package/dist/router-internal-7nuNEHfG.js +36 -0
  84. package/dist/scope-Cq_iYbTR.js +403 -0
  85. package/dist/{selector-C7rIpOnN.js → selector-BSPVkjKP.js} +41 -41
  86. package/dist/{shared-CGrx2AOL.js → shared-kU8yvryp.js} +3 -6
  87. package/dist/{snapshot-source-BB42xgwb.js → snapshot-source-An4iKajG.js} +1 -1
  88. package/dist/ssg/index.d.ts +51 -15
  89. package/dist/ssg/index.js +269 -209
  90. package/dist/ssr/index.d.ts +121 -68
  91. package/dist/ssr/index.js +2 -1
  92. package/dist/ssr-CiNm6Vzl.js +393 -0
  93. package/dist/{ssr-DSHd_Q9K.js → ssr-EPjwJH5R.js} +5 -1
  94. package/dist/{state-BzhOW2TX.js → state-BXJfudq1.js} +10 -15
  95. package/dist/{structures-BwfeO4Iz.js → structures-CjEzfj4h.js} +37 -57
  96. package/dist/{index-r5THqzPN.d.ts → structures.d.ts} +57 -36
  97. package/dist/testing/index.d.ts +125 -24
  98. package/dist/testing/index.js +26 -62
  99. package/dist/timer-C7uqnJVt.js +85 -0
  100. package/dist/{index-B1gu0_m0.d.ts → utilities.d.ts} +24 -13
  101. package/dist/{verify-hydration-_Q6avFp0.js → verify-hydration-ikaxotf7.js} +8 -5
  102. package/package.json +13 -15
  103. package/dist/access-Rr7CMa06.js +0 -507
  104. package/dist/activity-CAJ5eho-.d.ts +0 -14
  105. package/dist/benchmark.d.ts +0 -26
  106. package/dist/cleanup-DsrbV-rr.js +0 -535
  107. package/dist/component-cleanup-DjpwO9WX.js +0 -143
  108. package/dist/component-scope-4I3yEMkb.js +0 -195
  109. package/dist/control-DdFw-Caz.d.ts +0 -8
  110. package/dist/csp-nonce-C9OuML0U.js +0 -72
  111. package/dist/css-BuPaTOfe.js +0 -70
  112. package/dist/fastlane-Buz1Rvlr.js +0 -166
  113. package/dist/index-DSqXWc77.d.ts +0 -1402
  114. package/dist/jsx-runtime-BTzDdBJ_.d.ts +0 -2
  115. package/dist/jsx-runtime-Cdd6Gkb0.d.ts +0 -38
  116. package/dist/lifecycle-batch-Be-CLDjV.js +0 -253
  117. package/dist/lifecycle-operations-C5m03NQc.js +0 -195
@@ -1,4 +1,4 @@
1
- import { t as composeRefs } from "./compose-ref-Bfaf4kUC.js";
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 { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./types-DkVJhVs9.js";
2
- import { t as EagerControlPrimitive } from "./control-DdFw-Caz.js";
3
- //#region src/jsx/jsx-dev-runtime.d.ts
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]: IntrinsicFallbackProps | KnownIntrinsicElementProps[keyof KnownIntrinsicElementProps];
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(type: EagerControlPrimitive, props: Props | null, key?: string | number, isStaticChildren?: boolean): unknown;
21
- declare function jsxDEV<TTag extends keyof KnownIntrinsicElementProps>(type: TTag, props: KnownIntrinsicElementProps[TTag] | null, key?: string | number, isStaticChildren?: boolean): JSXElement;
22
- declare function jsxDEV<TTag extends string>(type: Exclude<TTag, keyof KnownIntrinsicElementProps>, props: IntrinsicFallbackProps | null, key?: string | number, isStaticChildren?: boolean): JSXElement;
23
- declare function jsxDEV<TProps extends object>(type: (props: TProps) => unknown, props: TProps | null, key?: string | number, isStaticChildren?: boolean): JSXElement;
24
- declare function jsxDEV(type: symbol, props: Props | null, key?: string | number, isStaticChildren?: boolean): JSXElement;
25
- //#endregion
26
- export { Fragment, JSX, type JSXComponent, type JSXElement, type JSXElementType, jsxDEV };
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,2 @@
1
+ import './elements.js';
2
+ import './jsx.js';
@@ -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 };
@@ -1,3 +1,17 @@
1
- import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./types-DkVJhVs9.js";
2
- import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-Cdd6Gkb0.js";
3
- export { Fragment, JSX, type JSXComponent, type JSXElement, type JSXElementType, jsx, jsxDEV, jsxs };
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
+ };
@@ -1,43 +1,3 @@
1
- import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
2
- import { n as Fragment, 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
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 getDefaultRouteBasePath, B as setDefaultRouteBasePath, F as insertRecordSorted, M as getRouteRecords, R as restoreRouteState, V as snapshotRouteState, _ as clearRouteState, h as addRouteToStores, j as getRouteList, k as getDefaultRouteAuthOptions, s as normalizeRouteBasePath, z as setDefaultRouteAuthOptions } from "./route-matching-Bo6UqG-5.js";
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
- const previous = snapshotRouteState();
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
- } finally {
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 };