@askrjs/askr 0.3.0 → 0.4.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 +874 -0
- package/README.md +61 -29
- package/capabilities.json +19 -9
- package/dist/actions/index.js +56 -12
- package/dist/benchmark.js +10 -15
- package/dist/boot/index.d.ts +3 -2
- package/dist/boot/index.js +1 -1
- package/dist/boot-DaoTYoCw.js +3989 -0
- package/dist/browser-activity-CB8e-V4f.js +220 -0
- package/dist/components/index.d.ts +8 -1
- package/dist/components/index.js +1 -43
- package/dist/{aria-hKjThHcp.js → compose-ref-DWzdbxsD.js} +41 -4
- package/dist/control/index.d.ts +2 -0
- package/dist/control/index.js +1 -1
- package/dist/control-nfpT2fbK.js +209 -0
- package/dist/core.d.ts +5 -9
- package/dist/csp-nonce-DwGw1A6Q.js +35 -0
- package/dist/data/index.js +3 -3
- package/dist/{data-2edW0jhF.js → data-BCwClJiF.js} +283 -94
- package/dist/data-runtime-C1bFAlba.js +242 -0
- package/dist/{deferred-CbgNhf67.js → deferred-bEEHHvic.js} +42 -20
- package/dist/domains/actions.d.ts +8 -3
- package/dist/domains/component.d.ts +1 -107
- package/dist/domains/context.d.ts +0 -15
- package/dist/domains/control.d.ts +36 -249
- package/dist/domains/data.d.ts +31 -13
- package/dist/domains/diagnostics.d.ts +1 -2
- package/dist/domains/lifecycle.d.ts +2 -5
- package/dist/domains/refs.d.ts +0 -2
- package/dist/domains/routing.d.ts +43 -8
- package/dist/domains/scheduler.d.ts +1 -76
- package/dist/domains/server.d.ts +5 -2
- package/dist/domains/state.d.ts +2 -5
- package/dist/domains/telemetry.d.ts +0 -2
- package/dist/elements.d.ts +214 -51
- package/dist/error-boundary-Bpwofwps.js +293 -0
- package/dist/foundations/icon/index.d.ts +0 -58
- package/dist/foundations/icon/index.js +2 -2
- package/dist/foundations/index.js +2 -1
- package/dist/foundations/interactions/index.js +1 -1
- package/dist/foundations/state/index.d.ts +3 -3
- package/dist/foundations/state/index.js +5 -3
- package/dist/foundations/structures/index.js +2 -1
- package/dist/foundations/utilities/index.d.ts +2 -0
- package/dist/foundations/utilities/index.js +1 -2
- package/dist/fx/index.d.ts +31 -58
- package/dist/fx/index.js +313 -195
- package/dist/hooks-BimKStr4.js +202 -0
- package/dist/index.d.ts +11 -74
- package/dist/index.js +8 -447
- package/dist/instance-BAnfmXOR.js +988 -0
- package/dist/{interactions-CTeACdT_.js → interactions-D2BoREb-.js} +3 -2
- package/dist/jsx-dev-runtime.d.ts +41 -18
- package/dist/jsx-dev-runtime.js +1 -6
- package/dist/{jsx-runtime-CPJXAOBF.js → jsx-runtime-C4idqHY0.js} +18 -7
- package/dist/jsx-runtime.js +1 -1
- package/dist/jsx.d.ts +61 -37
- package/dist/{manifest-D1P3UNWV.js → manifest-CW9gyNBY.js} +3 -3
- package/dist/{navigate-prC5V8XV.js → navigate-CP_0Zy5U.js} +454 -87
- package/dist/navigation.d.ts +12 -3
- package/dist/peer-types.d.ts +8 -0
- package/dist/portal-DuOKfnLa.js +349 -0
- package/dist/promise-Dz8iIHAm.js +16 -0
- package/dist/query-registry-WMCN0BJL.js +320 -0
- package/dist/readable-DFWOsTac.js +21 -0
- package/dist/{render-context-B7ohlh6t.js → render-context-DGHnEveC.js} +27 -11
- package/dist/render-sync-IC5lMFpq.js +1240 -0
- package/dist/resolution-Cx82-xjW.js +1244 -0
- package/dist/resource-CLjB7RBQ.js +377 -0
- package/dist/resources/index.d.ts +21 -11
- package/dist/resources/index.js +45 -244
- package/dist/router/index.d.ts +14 -5
- package/dist/router/index.js +22 -53
- package/dist/scope-CwpVSHVf.js +55 -0
- package/dist/{shared-kU8yvryp.js → shared-O2ZnmYAf.js} +1 -7
- package/dist/{snapshot-source-An4iKajG.js → snapshot-Cjx4N988.js} +6 -1
- package/dist/ssg/index.d.ts +1 -2
- package/dist/ssg/index.js +5 -13
- package/dist/ssr/index.d.ts +26 -28
- package/dist/ssr/index.js +4 -4
- package/dist/{ssr-CiNm6Vzl.js → ssr-BJ8ug7zH.js} +133 -122
- package/dist/ssr-DoV-vJ-5.js +229 -0
- package/dist/state-DWO1KzkX.js +232 -0
- package/dist/structures-D4dDMqHX.js +231 -0
- package/dist/testing/index.d.ts +8 -4
- package/dist/testing/index.js +29 -34
- package/dist/url-CnbfpX0K.js +185 -0
- package/dist/utilities.d.ts +48 -2
- package/dist/verify-hydration-DpVaDnqz.js +152 -0
- package/package.json +19 -9
- package/dist/access-CEA2pOry.js +0 -1046
- package/dist/activity-oy2YFTFF.js +0 -201
- package/dist/boot-BMBMWUGI.js +0 -1084
- package/dist/capabilities-Bbf0mlp9.js +0 -42
- package/dist/compose-ref-v0qGlHoN.js +0 -26
- package/dist/control-BR_mrX__.js +0 -173
- package/dist/control-C-ApnFs1.js +0 -20
- package/dist/csp-nonce-BfFWcd0w.js +0 -173
- package/dist/data-runtime-CxoY98lX.js +0 -149
- package/dist/default-portal-runtime-DvMvWJVp.js +0 -20
- package/dist/dom-renderer.d.ts +0 -77
- package/dist/domains/renderer.d.ts +0 -127
- package/dist/eager-control.d.ts +0 -8
- package/dist/effect-C3Zsc1k6.js +0 -292
- package/dist/for-state-BDykeOJL.js +0 -1753
- package/dist/instance-VAFYVJOa.js +0 -1027
- package/dist/notify-DxxuDPeY.js +0 -266
- package/dist/portal-w3oQ6oQU.js +0 -29
- package/dist/query-registry-LrYpQsDJ.js +0 -83
- package/dist/render-resolved-BC0W7_5b.js +0 -1123
- package/dist/renderer-CT0HeY58.js +0 -8623
- package/dist/resolution-3DskUkjG.js +0 -577
- package/dist/resource-18-sFRl9.js +0 -344
- package/dist/route-matching-CUzZ31gT.js +0 -551
- package/dist/router-internal-7nuNEHfG.js +0 -36
- package/dist/scope-Cq_iYbTR.js +0 -403
- package/dist/selector-BSPVkjKP.js +0 -311
- package/dist/ssr-EPjwJH5R.js +0 -29
- package/dist/state-BXJfudq1.js +0 -91
- package/dist/structures-CjEzfj4h.js +0 -654
- package/dist/timer-C7uqnJVt.js +0 -85
- package/dist/verify-hydration-ikaxotf7.js +0 -27
- package/dist/vnode-D24p6IW2.js +0 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as composeRefs } from "./compose-ref-
|
|
2
|
-
import { a as composeHandlers, i as mergeProps, t as ariaDisabled } from "./aria-hKjThHcp.js";
|
|
1
|
+
import { o as mergeProps, r as ariaDisabled, s as composeHandlers, t as composeRefs } from "./compose-ref-DWzdbxsD.js";
|
|
3
2
|
//#region src/foundations/interactions/pressable.ts
|
|
4
3
|
/** Produce click/keyboard props implementing 'press' semantics for an element. */
|
|
5
4
|
function pressable({ disabled, onPress, isNativeButton = false }) {
|
|
@@ -270,11 +269,13 @@ function applyInteractionPolicy({ isNative, disabled, onPress, ref }) {
|
|
|
270
269
|
*
|
|
271
270
|
* Event handlers are composed (policy first).
|
|
272
271
|
* Refs are always composed.
|
|
272
|
+
* `disabled` is owned by the policy when it sets the key (even to undefined).
|
|
273
273
|
* Policy props MUST take precedence to enforce invariants.
|
|
274
274
|
*/
|
|
275
275
|
function mergeInteractionProps(childProps, policyProps, userProps) {
|
|
276
276
|
const mergedUserChild = userProps ? mergeProps(userProps, childProps) : childProps;
|
|
277
277
|
const out = mergeProps(policyProps, mergedUserChild);
|
|
278
|
+
if (Object.prototype.hasOwnProperty.call(policyProps, "disabled")) out.disabled = policyProps.disabled;
|
|
278
279
|
for (const k in out) {
|
|
279
280
|
if (!k.startsWith("on")) continue;
|
|
280
281
|
const policyHandler = policyProps?.[k];
|
|
@@ -1,46 +1,69 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IntrinsicFallbackProps,
|
|
3
|
+
IntrinsicElementForTag,
|
|
4
|
+
IntrinsicRef,
|
|
3
5
|
JSXElementType,
|
|
4
6
|
JSXComponent,
|
|
5
7
|
KnownIntrinsicElementProps,
|
|
6
8
|
JSXElement,
|
|
9
|
+
MathMLExtraTag,
|
|
7
10
|
Props,
|
|
8
11
|
Fragment,
|
|
9
12
|
} from './elements.js';
|
|
10
|
-
import { EagerControlPrimitive } from './eager-control.js';
|
|
11
13
|
declare namespace JSX {
|
|
12
14
|
type ElementType = string | symbol | ((props: never) => unknown);
|
|
13
15
|
interface Element extends JSXElement {
|
|
14
16
|
readonly __askrJsxElementBrand?: never;
|
|
15
17
|
}
|
|
16
18
|
interface KnownIntrinsicElements extends KnownIntrinsicElementProps {}
|
|
17
|
-
interface IntrinsicElements
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
| KnownIntrinsicElementProps[keyof KnownIntrinsicElementProps];
|
|
21
|
-
}
|
|
22
|
-
interface ElementAttributesProperty {
|
|
23
|
-
props: Props;
|
|
19
|
+
interface IntrinsicElements
|
|
20
|
+
extends KnownIntrinsicElements, OtherIntrinsicElements {
|
|
21
|
+
[elem: `${string}-${string}`]: IntrinsicFallbackProps;
|
|
24
22
|
}
|
|
23
|
+
type OtherIntrinsicElements = {
|
|
24
|
+
[
|
|
25
|
+
Tag in Exclude<
|
|
26
|
+
| keyof HTMLElementTagNameMap
|
|
27
|
+
| keyof SVGElementTagNameMap
|
|
28
|
+
| Exclude<keyof MathMLElementTagNameMap, `${string}-${string}`>
|
|
29
|
+
| MathMLExtraTag,
|
|
30
|
+
keyof KnownIntrinsicElementProps
|
|
31
|
+
>
|
|
32
|
+
]: OtherIntrinsicProps<Tag>;
|
|
33
|
+
};
|
|
25
34
|
interface ElementChildrenAttribute {
|
|
26
35
|
children: unknown;
|
|
27
36
|
}
|
|
37
|
+
|
|
38
|
+
/** Attributes every element accepts, including function components. */
|
|
39
|
+
interface IntrinsicAttributes {
|
|
40
|
+
key?: string | number;
|
|
41
|
+
}
|
|
28
42
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
type OtherIntrinsicProps<Tag extends string> = Omit<
|
|
44
|
+
IntrinsicFallbackProps,
|
|
45
|
+
'ref'
|
|
46
|
+
> & { ref?: IntrinsicRef<IntrinsicElementForTag<Tag>> };
|
|
47
|
+
|
|
48
|
+
type OtherIntrinsicTag =
|
|
49
|
+
| Exclude<
|
|
50
|
+
| keyof HTMLElementTagNameMap
|
|
51
|
+
| keyof SVGElementTagNameMap
|
|
52
|
+
| Exclude<keyof MathMLElementTagNameMap, `${string}-${string}`>
|
|
53
|
+
| MathMLExtraTag,
|
|
54
|
+
keyof KnownIntrinsicElementProps
|
|
55
|
+
>
|
|
56
|
+
| `${string}-${string}`;
|
|
57
|
+
|
|
35
58
|
declare function jsxDEV<TTag extends keyof KnownIntrinsicElementProps>(
|
|
36
59
|
type: TTag,
|
|
37
|
-
props: KnownIntrinsicElementProps[TTag] | null,
|
|
60
|
+
props: KnownIntrinsicElementProps[NoInfer<TTag>] | null,
|
|
38
61
|
key?: string | number,
|
|
39
62
|
isStaticChildren?: boolean
|
|
40
63
|
): JSXElement;
|
|
41
|
-
declare function jsxDEV<TTag extends
|
|
42
|
-
type:
|
|
43
|
-
props:
|
|
64
|
+
declare function jsxDEV<TTag extends OtherIntrinsicTag>(
|
|
65
|
+
type: TTag,
|
|
66
|
+
props: OtherIntrinsicProps<TTag> | null,
|
|
44
67
|
key?: string | number,
|
|
45
68
|
isStaticChildren?: boolean
|
|
46
69
|
): JSXElement;
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
|
|
2
1
|
import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
3
2
|
//#region src/jsx/jsx-dev-runtime.ts
|
|
4
|
-
function annotatePropsUsage(props) {
|
|
5
|
-
return props ?? {};
|
|
6
|
-
}
|
|
7
3
|
function markStaticChildren(props) {
|
|
8
4
|
if (Array.isArray(props.children)) Object.defineProperty(props.children, STATIC_CHILDREN, {
|
|
9
5
|
value: true,
|
|
@@ -12,9 +8,8 @@ function markStaticChildren(props) {
|
|
|
12
8
|
return props;
|
|
13
9
|
}
|
|
14
10
|
function jsxDEV(type, props, key, isStaticChildren = false) {
|
|
15
|
-
const normalizedProps =
|
|
11
|
+
const normalizedProps = props ?? {};
|
|
16
12
|
const preparedProps = isStaticChildren ? markStaticChildren(normalizedProps) : normalizedProps;
|
|
17
|
-
if (isEagerControlPrimitive(type)) return type(preparedProps);
|
|
18
13
|
return {
|
|
19
14
|
$$typeof: ELEMENT_TYPE,
|
|
20
15
|
type,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
|
|
2
1
|
import { r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
3
2
|
//#region src/jsx/jsx-runtime.ts
|
|
4
3
|
function markStaticChildren(props) {
|
|
@@ -10,7 +9,6 @@ function markStaticChildren(props) {
|
|
|
10
9
|
function jsxDEV(type, props, key, isStaticChildren = false) {
|
|
11
10
|
const normalizedProps = props ?? {};
|
|
12
11
|
if (isStaticChildren) markStaticChildren(normalizedProps);
|
|
13
|
-
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
14
12
|
return {
|
|
15
13
|
$$typeof: ELEMENT_TYPE,
|
|
16
14
|
type,
|
|
@@ -19,19 +17,32 @@ function jsxDEV(type, props, key, isStaticChildren = false) {
|
|
|
19
17
|
};
|
|
20
18
|
}
|
|
21
19
|
function jsx(type, props, key) {
|
|
22
|
-
const normalizedProps = props ?? {};
|
|
23
|
-
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
24
20
|
return {
|
|
25
21
|
$$typeof: ELEMENT_TYPE,
|
|
26
22
|
type,
|
|
27
|
-
props:
|
|
23
|
+
props: props ?? {},
|
|
28
24
|
key: key ?? null
|
|
29
25
|
};
|
|
30
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Classic element factory. The automatic JSX transform falls back to it for a
|
|
29
|
+
* `key` written after a spread (`<Row {...props} key={id} />`). The key and
|
|
30
|
+
* the development-only `__self`/`__source` props are taken out of `props`,
|
|
31
|
+
* and child arguments become `props.children`.
|
|
32
|
+
*/
|
|
33
|
+
function createElement(type, props, ...children) {
|
|
34
|
+
const { key, __self, __source, ...rest } = props ?? {};
|
|
35
|
+
const elementKey = key ?? void 0;
|
|
36
|
+
if (children.length > 1) {
|
|
37
|
+
rest.children = children;
|
|
38
|
+
return jsxs(type, rest, elementKey);
|
|
39
|
+
}
|
|
40
|
+
if (children.length === 1) rest.children = children[0];
|
|
41
|
+
return jsx(type, rest, elementKey);
|
|
42
|
+
}
|
|
31
43
|
function jsxs(type, props, key) {
|
|
32
44
|
const normalizedProps = props ?? {};
|
|
33
45
|
markStaticChildren(normalizedProps);
|
|
34
|
-
if (typeof type === "function" && isEagerControlPrimitive(type)) return type(normalizedProps);
|
|
35
46
|
return {
|
|
36
47
|
$$typeof: ELEMENT_TYPE,
|
|
37
48
|
type,
|
|
@@ -40,4 +51,4 @@ function jsxs(type, props, key) {
|
|
|
40
51
|
};
|
|
41
52
|
}
|
|
42
53
|
//#endregion
|
|
43
|
-
export {
|
|
54
|
+
export { jsxs as i, jsx as n, jsxDEV as r, createElement as t };
|
package/dist/jsx-runtime.js
CHANGED
package/dist/jsx.d.ts
CHANGED
|
@@ -1,43 +1,66 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IntrinsicFallbackProps,
|
|
3
|
+
IntrinsicElementForTag,
|
|
4
|
+
IntrinsicRef,
|
|
3
5
|
KnownIntrinsicElementProps,
|
|
6
|
+
MathMLExtraTag,
|
|
4
7
|
JSXElement,
|
|
5
8
|
Props,
|
|
6
9
|
} from './elements.js';
|
|
7
|
-
import { EagerControlPrimitive } from './eager-control.js';
|
|
8
10
|
declare namespace JSX {
|
|
9
11
|
type ElementType = string | symbol | ((props: never) => unknown);
|
|
10
12
|
interface Element extends JSXElement {
|
|
11
13
|
readonly __askrJsxElementBrand?: never;
|
|
12
14
|
}
|
|
13
15
|
interface KnownIntrinsicElements extends KnownIntrinsicElementProps {}
|
|
14
|
-
interface IntrinsicElements
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
| KnownIntrinsicElementProps[keyof KnownIntrinsicElementProps];
|
|
18
|
-
}
|
|
19
|
-
interface ElementAttributesProperty {
|
|
20
|
-
props: Props;
|
|
16
|
+
interface IntrinsicElements
|
|
17
|
+
extends KnownIntrinsicElements, OtherIntrinsicElements {
|
|
18
|
+
[elem: `${string}-${string}`]: IntrinsicFallbackProps;
|
|
21
19
|
}
|
|
20
|
+
type OtherIntrinsicElements = {
|
|
21
|
+
[
|
|
22
|
+
Tag in Exclude<
|
|
23
|
+
| keyof HTMLElementTagNameMap
|
|
24
|
+
| keyof SVGElementTagNameMap
|
|
25
|
+
| Exclude<keyof MathMLElementTagNameMap, `${string}-${string}`>
|
|
26
|
+
| MathMLExtraTag,
|
|
27
|
+
keyof KnownIntrinsicElementProps
|
|
28
|
+
>
|
|
29
|
+
]: OtherIntrinsicProps<Tag>;
|
|
30
|
+
};
|
|
22
31
|
interface ElementChildrenAttribute {
|
|
23
32
|
children: unknown;
|
|
24
33
|
}
|
|
34
|
+
|
|
35
|
+
/** Attributes every element accepts, including function components. */
|
|
36
|
+
interface IntrinsicAttributes {
|
|
37
|
+
key?: string | number;
|
|
38
|
+
}
|
|
25
39
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
type OtherIntrinsicProps<Tag extends string> = Omit<
|
|
41
|
+
IntrinsicFallbackProps,
|
|
42
|
+
'ref'
|
|
43
|
+
> & { ref?: IntrinsicRef<IntrinsicElementForTag<Tag>> };
|
|
44
|
+
|
|
45
|
+
type OtherIntrinsicTag =
|
|
46
|
+
| Exclude<
|
|
47
|
+
| keyof HTMLElementTagNameMap
|
|
48
|
+
| keyof SVGElementTagNameMap
|
|
49
|
+
| Exclude<keyof MathMLElementTagNameMap, `${string}-${string}`>
|
|
50
|
+
| MathMLExtraTag,
|
|
51
|
+
keyof KnownIntrinsicElementProps
|
|
52
|
+
>
|
|
53
|
+
| `${string}-${string}`;
|
|
54
|
+
|
|
32
55
|
declare function jsxDEV<TTag extends keyof KnownIntrinsicElementProps>(
|
|
33
56
|
type: TTag,
|
|
34
|
-
props: KnownIntrinsicElementProps[TTag] | null,
|
|
57
|
+
props: KnownIntrinsicElementProps[NoInfer<TTag>] | null,
|
|
35
58
|
key?: string | number,
|
|
36
59
|
isStaticChildren?: boolean
|
|
37
60
|
): JSXElement;
|
|
38
|
-
declare function jsxDEV<TTag extends
|
|
39
|
-
type:
|
|
40
|
-
props:
|
|
61
|
+
declare function jsxDEV<TTag extends OtherIntrinsicTag>(
|
|
62
|
+
type: TTag,
|
|
63
|
+
props: OtherIntrinsicProps<TTag> | null,
|
|
41
64
|
key?: string | number,
|
|
42
65
|
isStaticChildren?: boolean
|
|
43
66
|
): JSXElement;
|
|
@@ -54,19 +77,14 @@ declare function jsxDEV(
|
|
|
54
77
|
isStaticChildren?: boolean
|
|
55
78
|
): JSXElement;
|
|
56
79
|
/** 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
80
|
declare function jsx<TTag extends keyof KnownIntrinsicElementProps>(
|
|
63
81
|
type: TTag,
|
|
64
|
-
props: KnownIntrinsicElementProps[TTag] | null,
|
|
82
|
+
props: KnownIntrinsicElementProps[NoInfer<TTag>] | null,
|
|
65
83
|
key?: string | number
|
|
66
84
|
): JSXElement;
|
|
67
|
-
declare function jsx<TTag extends
|
|
68
|
-
type:
|
|
69
|
-
props:
|
|
85
|
+
declare function jsx<TTag extends OtherIntrinsicTag>(
|
|
86
|
+
type: TTag,
|
|
87
|
+
props: OtherIntrinsicProps<TTag> | null,
|
|
70
88
|
key?: string | number
|
|
71
89
|
): JSXElement;
|
|
72
90
|
declare function jsx<TProps extends object>(
|
|
@@ -80,19 +98,14 @@ declare function jsx(
|
|
|
80
98
|
key?: string | number
|
|
81
99
|
): JSXElement;
|
|
82
100
|
/** 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
101
|
declare function jsxs<TTag extends keyof KnownIntrinsicElementProps>(
|
|
89
102
|
type: TTag,
|
|
90
|
-
props: KnownIntrinsicElementProps[TTag] | null,
|
|
103
|
+
props: KnownIntrinsicElementProps[NoInfer<TTag>] | null,
|
|
91
104
|
key?: string | number
|
|
92
105
|
): JSXElement;
|
|
93
|
-
declare function jsxs<TTag extends
|
|
94
|
-
type:
|
|
95
|
-
props:
|
|
106
|
+
declare function jsxs<TTag extends OtherIntrinsicTag>(
|
|
107
|
+
type: TTag,
|
|
108
|
+
props: OtherIntrinsicProps<TTag> | null,
|
|
96
109
|
key?: string | number
|
|
97
110
|
): JSXElement;
|
|
98
111
|
declare function jsxs<TProps extends object>(
|
|
@@ -105,4 +118,15 @@ declare function jsxs(
|
|
|
105
118
|
props: Props | null,
|
|
106
119
|
key?: string | number
|
|
107
120
|
): JSXElement;
|
|
108
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Classic element factory. The automatic JSX transform falls back to it for a
|
|
123
|
+
* `key` written after a spread (`<Row {...props} key={id} />`). The key and
|
|
124
|
+
* the development-only `__self`/`__source` props are taken out of `props`,
|
|
125
|
+
* and child arguments become `props.children`.
|
|
126
|
+
*/
|
|
127
|
+
declare function createElement(
|
|
128
|
+
type: string | symbol | ((props: never) => unknown),
|
|
129
|
+
props: Record<string, unknown> | null,
|
|
130
|
+
...children: unknown[]
|
|
131
|
+
): JSXElement;
|
|
132
|
+
export { createElement, jsxs, jsx, jsxDEV, JSX };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/
|
|
1
|
+
import { $ as withRouteTable, G as getRouteRecords, H as getDefaultRouteAuthOptions, J as insertRecordSorted, O as addRouteToStores, Q as setDefaultRouteBasePath, S as normalizeRouteBasePath, U as getDefaultRouteBasePath, W as getRouteList, Z as setDefaultRouteAuthOptions, j as createRouteTable } from "./resolution-Cx82-xjW.js";
|
|
2
|
+
//#region src/common/execution-model.ts
|
|
3
3
|
const EXECUTION_MODEL_KEY = Symbol.for("__ASKR_EXECUTION_MODEL__");
|
|
4
4
|
function getExecutionModel() {
|
|
5
5
|
return globalThis[EXECUTION_MODEL_KEY];
|
|
@@ -7,7 +7,7 @@ function getExecutionModel() {
|
|
|
7
7
|
function assertExecutionModel(model) {
|
|
8
8
|
const g = globalThis;
|
|
9
9
|
const cur = g[EXECUTION_MODEL_KEY];
|
|
10
|
-
if (cur && cur !== model) throw new Error(`[Askr] mixing execution models is not allowed (current: ${cur}, attempted: ${model}). Choose exactly one: createSPA
|
|
10
|
+
if (cur && cur !== model) throw new Error(`[Askr] mixing execution models is not allowed (current: ${cur}, attempted: ${model}). Choose exactly one: createSPA/hydrateSPA or createIslands.`);
|
|
11
11
|
if (!cur) g[EXECUTION_MODEL_KEY] = model;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|