@askrjs/askr 0.0.65 → 0.0.67
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/{authoring-CXMPffwN.js → authoring-uaJ556aG.js} +2 -2
- package/dist/benchmark.d.ts +1 -0
- package/dist/benchmark.js +7 -7
- package/dist/boot/index.d.ts +7 -6
- package/dist/boot/index.js +1 -1
- package/dist/{boot-OnYuVVfg.js → boot-DjTa12LD.js} +15 -13
- package/dist/{cleanup-B6KovDZZ.js → cleanup-B0kFA4Fv.js} +3 -2
- package/dist/component-cleanup-1ZFoLLHt.js +141 -0
- package/dist/{component-internal-CbALfPGD.js → component-internal-CPjM4n8M.js} +23 -3
- package/dist/components/index.d.ts +1 -2
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-B5xu8v4m.d.ts → control-BjYBlytA.d.ts} +0 -1
- package/dist/{control-KVP6LMEQ.js → control-CA45Yvvu.js} +3 -3
- package/dist/{control-CMzFPMjr.d.ts → control-DO-iBEtV.d.ts} +0 -1
- package/dist/{csp-nonce-C-8E85El.js → csp-nonce-HGZ0vbqT.js} +1 -1
- package/dist/data/index.js +1 -1
- package/dist/{data-DvYo_dHd.js → data-DHt_zO1G.js} +2 -2
- package/dist/{deferred-B71c2eio.js → deferred-zHtUheIQ.js} +29 -27
- package/dist/{effect-D_4zf_wy.js → effect-CFUzIpqX.js} +1 -1
- package/dist/fastlane-BTcFCMnm.js +147 -0
- package/dist/{for-internal-B2rBq6yB.js → for-internal-BtK9Htl0.js} +4 -3
- package/dist/foundations/icon/index.d.ts +3 -21
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/index.d.ts +31 -26
- package/dist/foundations/state/index.d.ts +1 -2
- package/dist/foundations/state/index.js +1 -1
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/foundations/structures/index.js +1 -1
- package/dist/fx/index.d.ts +0 -1
- package/dist/{index-NKPpdRh9.d.ts → index-BFnTM1a8.d.ts} +2 -1
- package/dist/{index-Bjm0__Rr.d.ts → index-DSClfSoC.d.ts} +3 -7
- package/dist/{index-Byqjltu2.d.ts → index-Dh6ZF9yW.d.ts} +1 -2
- package/dist/{index-PgRn5wmg.d.ts → index-DjusBb1I.d.ts} +45 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -8
- package/dist/jsx-dev-runtime.d.ts +2 -1
- package/dist/jsx-runtime-X2SX2y8V.d.ts +2 -0
- package/dist/{jsx-runtime-iTU73uwP.d.ts → jsx-runtime-aYZ8zb4q.d.ts} +2 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/{component-lifecycle-DEMPihoZ.js → lifecycle-batch-COgl8jMS.js} +3 -160
- package/dist/{lifecycle-operations-Dj5lK1K7.js → lifecycle-operations-SlPEK68H.js} +1 -1
- package/dist/{navigate-DTZ2SM8_.js → navigate-CJySBpA9.js} +12 -56
- package/dist/navigate-CV-RDqYP.d.ts +20 -0
- package/dist/{portal-D2tPWNrC.js → portal-D7TC986A.js} +3 -2
- package/dist/{fastlane-C8PYPotF.js → readable-BYSoWJSv.js} +2 -146
- package/dist/{renderer-aUD-acDe.js → renderer-Dwkk68c5.js} +25 -12
- package/dist/{resource-operation-Dz2Nxi1q.js → resource-operation-BJiLoLYZ.js} +3 -3
- package/dist/resources/index.d.ts +0 -1
- package/dist/resources/index.js +2 -2
- package/dist/{route-matching-C93To416.js → route-matching-DLBWDeXX.js} +2 -4
- package/dist/router/index.d.ts +21 -16
- package/dist/router/index.js +45 -3
- package/dist/{router-eRoaj11J.d.ts → router-C0XQA62W.d.ts} +8 -5
- package/dist/{selector-pApF_lGd.js → selector-DueeR6Oz.js} +1 -1
- package/dist/ssg/index.d.ts +22 -11
- package/dist/ssg/index.js +3 -3
- package/dist/ssr/index.d.ts +6 -5
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-C0hzqhY8.js → ssr-vE-KUgDV.js} +13 -21
- package/dist/{state-Cc5HumQ0.js → state-CVuQVjvK.js} +2 -1
- package/dist/testing/index.d.ts +1 -2
- package/dist/testing/index.js +2 -2
- package/dist/types-DEhT-Nrv.d.ts +63 -0
- package/dist/{verify-hydration-BdKE9Hi8.js → verify-hydration-ChyEiBAn.js} +1 -1
- package/package.json +1 -1
- package/dist/jsx-runtime-BVVgDSdq.d.ts +0 -1
- package/dist/navigate-BVDCzOuB.d.ts +0 -34
- package/dist/types-4k3RFEaC.d.ts +0 -19
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { b as isDevelopmentEnvironment, l as runRuntimeWithSyncProgress, o as getRuntimeRenderer, u as setRuntimeBulkCommitProbe } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { n as Fragment } from "./jsx-CUpRxrLH.js";
|
|
3
|
+
import { i as finalizeReadableSubscriptions } from "./readable-BYSoWJSv.js";
|
|
4
|
+
//#region src/runtime/dev-namespace.ts
|
|
5
|
+
/**
|
|
6
|
+
* Set a value in the dev namespace (no-op in production).
|
|
7
|
+
*/
|
|
8
|
+
const setDevValue = () => {};
|
|
9
|
+
/**
|
|
10
|
+
* Increment a counter in the dev namespace (no-op in production).
|
|
11
|
+
* Safely handles non-number values by resetting to 1.
|
|
12
|
+
*/
|
|
13
|
+
const incDevCounter = () => {};
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/runtime/fastlane.ts
|
|
16
|
+
let _bulkCommitActive = false;
|
|
17
|
+
let _appliedParents = null;
|
|
18
|
+
function enterBulkCommit() {
|
|
19
|
+
_bulkCommitActive = true;
|
|
20
|
+
_appliedParents = /* @__PURE__ */ new WeakSet();
|
|
21
|
+
}
|
|
22
|
+
function exitBulkCommit() {
|
|
23
|
+
_bulkCommitActive = false;
|
|
24
|
+
_appliedParents = null;
|
|
25
|
+
}
|
|
26
|
+
function isBulkCommitActive() {
|
|
27
|
+
return _bulkCommitActive;
|
|
28
|
+
}
|
|
29
|
+
function markFastPathApplied(parent) {
|
|
30
|
+
if (!_appliedParents) return;
|
|
31
|
+
try {
|
|
32
|
+
_appliedParents.add(parent);
|
|
33
|
+
} catch (e) {}
|
|
34
|
+
}
|
|
35
|
+
function finalizeReadSubscriptions(instance) {
|
|
36
|
+
finalizeReadableSubscriptions(instance);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Attempt to execute a runtime fast-lane for a single component's synchronous
|
|
40
|
+
* render result. Returns true if the fast-lane was used and commit was done.
|
|
41
|
+
*
|
|
42
|
+
* Preconditions (checked conservatively):
|
|
43
|
+
* - The render result is an intrinsic element root with keyed children
|
|
44
|
+
* - The renderer's fast-path heuristics indicate to use the fast-path
|
|
45
|
+
* - No mount operations are pending on the component instance
|
|
46
|
+
* - No child vnodes are component functions (avoid async/component mounts)
|
|
47
|
+
*/
|
|
48
|
+
function unwrapFragmentForFastPath(vnode) {
|
|
49
|
+
if (!vnode || typeof vnode !== "object" || !("type" in vnode)) return vnode;
|
|
50
|
+
const v = vnode;
|
|
51
|
+
if (typeof v.type === "symbol" && (v.type === Fragment || String(v.type) === "Symbol(askr.fragment)")) {
|
|
52
|
+
const children = v.props?.children ?? v.children;
|
|
53
|
+
if (Array.isArray(children) && children.length > 0) {
|
|
54
|
+
for (const child of children) if (child && typeof child === "object" && "type" in child) {
|
|
55
|
+
if (typeof child.type === "string") return child;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return vnode;
|
|
60
|
+
}
|
|
61
|
+
function classifyUpdate(instance, result) {
|
|
62
|
+
const unwrappedResult = unwrapFragmentForFastPath(result);
|
|
63
|
+
if (!unwrappedResult || typeof unwrappedResult !== "object" || !("type" in unwrappedResult)) return {
|
|
64
|
+
useFastPath: false,
|
|
65
|
+
reason: "not-vnode"
|
|
66
|
+
};
|
|
67
|
+
const vnode = unwrappedResult;
|
|
68
|
+
if (vnode == null || typeof vnode.type !== "string") return {
|
|
69
|
+
useFastPath: false,
|
|
70
|
+
reason: "not-intrinsic"
|
|
71
|
+
};
|
|
72
|
+
const parent = instance.target;
|
|
73
|
+
if (!parent) return {
|
|
74
|
+
useFastPath: false,
|
|
75
|
+
reason: "no-root"
|
|
76
|
+
};
|
|
77
|
+
const firstChild = parent.children[0];
|
|
78
|
+
if (!firstChild) return {
|
|
79
|
+
useFastPath: false,
|
|
80
|
+
reason: "no-first-child"
|
|
81
|
+
};
|
|
82
|
+
if (firstChild.tagName.toLowerCase() !== String(vnode.type).toLowerCase()) return {
|
|
83
|
+
useFastPath: false,
|
|
84
|
+
reason: "root-tag-mismatch"
|
|
85
|
+
};
|
|
86
|
+
const children = vnode.props?.children ?? vnode.children;
|
|
87
|
+
if (!Array.isArray(children)) return {
|
|
88
|
+
useFastPath: false,
|
|
89
|
+
reason: "no-children-array"
|
|
90
|
+
};
|
|
91
|
+
for (const c of children) if (typeof c === "object" && c !== null && "type" in c && typeof c.type === "function") return {
|
|
92
|
+
useFastPath: false,
|
|
93
|
+
reason: "component-child-present"
|
|
94
|
+
};
|
|
95
|
+
if ((instance.mountOperations?.length ?? 0) > 0) return {
|
|
96
|
+
useFastPath: false,
|
|
97
|
+
reason: "pending-mounts"
|
|
98
|
+
};
|
|
99
|
+
if ((instance.commitOperations?.length ?? 0) > 0) return {
|
|
100
|
+
useFastPath: false,
|
|
101
|
+
reason: "pending-lifecycle-commits"
|
|
102
|
+
};
|
|
103
|
+
const renderer = getRuntimeRenderer();
|
|
104
|
+
try {
|
|
105
|
+
renderer.populateKeyMapForElement(firstChild);
|
|
106
|
+
} catch {}
|
|
107
|
+
const oldKeyMap = renderer.getKeyMapForElement(firstChild);
|
|
108
|
+
const decision = renderer.isKeyedReorderFastPathEligible(firstChild, children, oldKeyMap);
|
|
109
|
+
if (!decision.useFastPath || decision.totalKeyed < 128) return {
|
|
110
|
+
...decision,
|
|
111
|
+
useFastPath: false,
|
|
112
|
+
reason: "renderer-declined"
|
|
113
|
+
};
|
|
114
|
+
return {
|
|
115
|
+
...decision,
|
|
116
|
+
useFastPath: true
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function commitReorderOnly(instance, result) {
|
|
120
|
+
const renderer = getRuntimeRenderer();
|
|
121
|
+
enterBulkCommit();
|
|
122
|
+
try {
|
|
123
|
+
runRuntimeWithSyncProgress(() => {
|
|
124
|
+
renderer.evaluate(result, instance.target);
|
|
125
|
+
try {
|
|
126
|
+
finalizeReadSubscriptions(instance);
|
|
127
|
+
} catch (e) {
|
|
128
|
+
if (isDevelopmentEnvironment()) throw e;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
return true;
|
|
132
|
+
} finally {
|
|
133
|
+
exitBulkCommit();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function tryRuntimeFastLaneSync(instance, result) {
|
|
137
|
+
if (!classifyUpdate(instance, result).useFastPath) return false;
|
|
138
|
+
try {
|
|
139
|
+
return commitReorderOnly(instance, result);
|
|
140
|
+
} catch (err) {
|
|
141
|
+
if (isDevelopmentEnvironment()) throw err;
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
setRuntimeBulkCommitProbe(isBulkCommitActive);
|
|
146
|
+
//#endregion
|
|
147
|
+
export { setDevValue as a, incDevCounter as i, markFastPathApplied as n, tryRuntimeFastLaneSync as r, isBulkCommitActive as t };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
|
|
2
2
|
import { b as isDevelopmentEnvironment, o as getRuntimeRenderer, v as logger } from "./access-ePqdQqkV.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { n as createComponentInstance, s as renderScopedComponent } from "./component-internal-CPjM4n8M.js";
|
|
4
|
+
import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BYSoWJSv.js";
|
|
5
5
|
import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
6
|
-
import {
|
|
6
|
+
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-1ZFoLLHt.js";
|
|
7
|
+
import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-COgl8jMS.js";
|
|
7
8
|
//#region src/runtime/child-scope.ts
|
|
8
9
|
const EMPTY_CHILD_SCOPE_PROPS = {};
|
|
9
10
|
const childScopesByInstance = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as JSXElement, s as Props } from "../../jsx-Dvr2SGRG.js";
|
|
2
|
+
import "../../types-DEhT-Nrv.js";
|
|
2
3
|
import { t as Ref } from "../../compose-ref-Cizq72-x.js";
|
|
3
|
-
|
|
4
4
|
//#region src/foundations/icon/icon.types.d.ts
|
|
5
5
|
type IconSizeToken = 'sm' | 'md' | 'lg' | 'xl';
|
|
6
6
|
type IconStyleObject = Record<string, unknown>;
|
|
@@ -25,14 +25,7 @@ declare function resolveIconSizeVariable(size: number | string): string;
|
|
|
25
25
|
declare function resolveIconStrokeWidthVariable(strokeWidth: number, sizeToken: IconSizeToken | undefined): string;
|
|
26
26
|
declare function serializeIconStyle(style: string | IconStyleObject | undefined): string;
|
|
27
27
|
declare function joinIconStyle(...styles: Array<string | undefined>): string | undefined;
|
|
28
|
-
declare function getIconContractProps({
|
|
29
|
-
size,
|
|
30
|
-
strokeWidth,
|
|
31
|
-
color,
|
|
32
|
-
title,
|
|
33
|
-
style,
|
|
34
|
-
iconName
|
|
35
|
-
}: Pick<IconProps, 'color' | 'iconName' | 'size' | 'strokeWidth' | 'style' | 'title'>): {
|
|
28
|
+
declare function getIconContractProps({ size, strokeWidth, color, title, style, iconName }: Pick<IconProps, 'color' | 'iconName' | 'size' | 'strokeWidth' | 'style' | 'title'>): {
|
|
36
29
|
sizeToken: IconSizeToken | undefined;
|
|
37
30
|
decorative: string | undefined;
|
|
38
31
|
iconStyle: string | undefined;
|
|
@@ -53,17 +46,6 @@ declare function getIconContractProps({
|
|
|
53
46
|
'data-color': string | undefined;
|
|
54
47
|
};
|
|
55
48
|
};
|
|
56
|
-
declare function IconBase({
|
|
57
|
-
size,
|
|
58
|
-
strokeWidth,
|
|
59
|
-
color,
|
|
60
|
-
title,
|
|
61
|
-
class: className,
|
|
62
|
-
style,
|
|
63
|
-
iconName,
|
|
64
|
-
children,
|
|
65
|
-
ref,
|
|
66
|
-
...rest
|
|
67
|
-
}: IconProps): JSXElement;
|
|
49
|
+
declare function IconBase({ size, strokeWidth, color, title, class: className, style, iconName, children, ref, ...rest }: IconProps): JSXElement;
|
|
68
50
|
//#endregion
|
|
69
51
|
export { IconBase, type IconOwnProps, type IconProps, type IconSizeToken, type IconStyleObject, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../jsx-Dvr2SGRG.js";
|
|
2
|
-
import { _ as definePortal, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, l as PresenceProps, m as DefaultPortal, p as layout, u as Slot } from "../index-
|
|
2
|
+
import { _ as definePortal, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, l as PresenceProps, m as DefaultPortal, p as layout, u as Slot } from "../index-DjusBb1I.js";
|
|
3
3
|
export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-
|
|
1
|
+
import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-D7TC986A.js";
|
|
2
2
|
import { a as layout, i as Slot, r as Presence } from "../structures-DUB3HchX.js";
|
|
3
3
|
export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { t as Ref } from "../../compose-ref-Cizq72-x.js";
|
|
2
2
|
import { d as KeyboardLikeEvent, f as PointerLikeEvent, l as DefaultPreventable, p as PropagationStoppable } from "../../index-BnU0NPwM.js";
|
|
3
|
-
|
|
4
3
|
//#region src/foundations/interactions/pressable.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* pressable
|
|
@@ -52,11 +51,7 @@ interface PressableResult {
|
|
|
52
51
|
onKeyUp?: (e: KeyboardLikeEvent) => void;
|
|
53
52
|
'aria-disabled'?: 'true';
|
|
54
53
|
}
|
|
55
|
-
declare function pressable({
|
|
56
|
-
disabled,
|
|
57
|
-
onPress,
|
|
58
|
-
isNativeButton
|
|
59
|
-
}: PressableOptions): PressableResult;
|
|
54
|
+
declare function pressable({ disabled, onPress, isNativeButton }: PressableOptions): PressableResult;
|
|
60
55
|
//#endregion
|
|
61
56
|
//#region src/foundations/interactions/dismissable.d.ts
|
|
62
57
|
/**
|
|
@@ -117,11 +112,7 @@ interface DismissableOptions {
|
|
|
117
112
|
*/
|
|
118
113
|
onDismiss?: (trigger: 'escape' | 'outside') => void;
|
|
119
114
|
}
|
|
120
|
-
declare function dismissable({
|
|
121
|
-
node,
|
|
122
|
-
disabled,
|
|
123
|
-
onDismiss
|
|
124
|
-
}: DismissableOptions): {
|
|
115
|
+
declare function dismissable({ node, disabled, onDismiss }: DismissableOptions): {
|
|
125
116
|
onKeyDown: (e: KeyboardLikeEvent) => void;
|
|
126
117
|
onPointerDownCapture: (e: PointerLikeEvent) => void;
|
|
127
118
|
};
|
|
@@ -141,10 +132,7 @@ interface FocusableResult {
|
|
|
141
132
|
tabIndex?: number;
|
|
142
133
|
'aria-disabled'?: 'true';
|
|
143
134
|
}
|
|
144
|
-
declare function focusable({
|
|
145
|
-
disabled,
|
|
146
|
-
tabIndex
|
|
147
|
-
}: FocusableOptions): FocusableResult;
|
|
135
|
+
declare function focusable({ disabled, tabIndex }: FocusableOptions): FocusableResult;
|
|
148
136
|
//#endregion
|
|
149
137
|
//#region src/foundations/interactions/hoverable.d.ts
|
|
150
138
|
/**
|
|
@@ -162,11 +150,7 @@ interface HoverableResult {
|
|
|
162
150
|
onPointerEnter?: (e: HoverEvent) => void;
|
|
163
151
|
onPointerLeave?: (e: HoverEvent) => void;
|
|
164
152
|
}
|
|
165
|
-
declare function hoverable({
|
|
166
|
-
disabled,
|
|
167
|
-
onEnter,
|
|
168
|
-
onLeave
|
|
169
|
-
}: HoverableOptions): HoverableResult;
|
|
153
|
+
declare function hoverable({ disabled, onEnter, onLeave }: HoverableOptions): HoverableResult;
|
|
170
154
|
//#endregion
|
|
171
155
|
//#region src/foundations/interactions/roving-focus.d.ts
|
|
172
156
|
type Orientation = 'horizontal' | 'vertical' | 'both';
|
|
@@ -215,6 +199,32 @@ interface RovingFocusResult {
|
|
|
215
199
|
};
|
|
216
200
|
}
|
|
217
201
|
declare function rovingFocus(options: RovingFocusOptions): RovingFocusResult;
|
|
202
|
+
/**
|
|
203
|
+
* USAGE EXAMPLE:
|
|
204
|
+
*
|
|
205
|
+
* function Menu() {
|
|
206
|
+
* const [focusIndex, setFocusIndex] = state(0);
|
|
207
|
+
* const items = ['File', 'Edit', 'View'];
|
|
208
|
+
*
|
|
209
|
+
* const navigation = rovingFocus({
|
|
210
|
+
* currentIndex: focusIndex(),
|
|
211
|
+
* itemCount: items.length,
|
|
212
|
+
* orientation: 'horizontal',
|
|
213
|
+
* loop: true,
|
|
214
|
+
* onNavigate: setFocusIndex,
|
|
215
|
+
* });
|
|
216
|
+
*
|
|
217
|
+
* return (
|
|
218
|
+
* <div {...navigation.container}>
|
|
219
|
+
* {items.map((label, index) => (
|
|
220
|
+
* <button {...navigation.item(index)}>
|
|
221
|
+
* {label}
|
|
222
|
+
* </button>
|
|
223
|
+
* ))}
|
|
224
|
+
* </div>
|
|
225
|
+
* );
|
|
226
|
+
* }
|
|
227
|
+
*/
|
|
218
228
|
//#endregion
|
|
219
229
|
//#region src/foundations/interactions/interaction-policy.d.ts
|
|
220
230
|
interface InteractionPolicyInput {
|
|
@@ -231,12 +241,7 @@ interface InteractionPolicyInput {
|
|
|
231
241
|
* THE interaction policy. Components MUST use this, NEVER implement
|
|
232
242
|
* interaction logic directly.
|
|
233
243
|
*/
|
|
234
|
-
declare function applyInteractionPolicy({
|
|
235
|
-
isNative,
|
|
236
|
-
disabled,
|
|
237
|
-
onPress,
|
|
238
|
-
ref
|
|
239
|
-
}: InteractionPolicyInput): {
|
|
244
|
+
declare function applyInteractionPolicy({ isNative, disabled, onPress, ref }: InteractionPolicyInput): {
|
|
240
245
|
disabled: true | undefined;
|
|
241
246
|
onClick: (e: Event) => void;
|
|
242
247
|
ref: Ref<unknown>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { m as State } from "../../control-
|
|
2
|
-
|
|
1
|
+
import { m as State } from "../../control-DO-iBEtV.js";
|
|
3
2
|
//#region src/foundations/state/controllable.d.ts
|
|
4
3
|
declare function isControlled<T>(value: T | undefined): value is T;
|
|
5
4
|
declare function resolveControllable<T>(value: T | undefined, defaultValue: T): {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../../jsx-Dvr2SGRG.js";
|
|
2
|
-
import { _ as definePortal, a as Collection, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, i as createLayer, l as PresenceProps, m as DefaultPortal, n as LayerManager, o as CollectionItem, p as layout, r as LayerOptions, s as createCollection, t as Layer, u as Slot } from "../../index-
|
|
2
|
+
import { _ as definePortal, a as Collection, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, i as createLayer, l as PresenceProps, m as DefaultPortal, n as LayerManager, o as CollectionItem, p as layout, r as LayerOptions, s as createCollection, t as Layer, u as Slot } from "../../index-DjusBb1I.js";
|
|
3
3
|
export { type Collection, type CollectionItem, DefaultPortal, type JSXElement, type Layer, type LayerManager, type LayerOptions, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, createCollection, createLayer, definePortal, layout };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-
|
|
1
|
+
import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-D7TC986A.js";
|
|
2
2
|
import { a as layout, i as Slot, n as createCollection, r as Presence, t as createLayer } from "../../structures-DUB3HchX.js";
|
|
3
3
|
export { DefaultPortal, Portal, Presence, Slot, createCollection, createLayer, definePortal, layout };
|
package/dist/fx/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { i as Scope, n as ReadableSource, r as ComponentInstance } from "./control-
|
|
1
|
+
import { i as Scope, n as ReadableSource, r as ComponentInstance } from "./control-DO-iBEtV.js";
|
|
2
2
|
import { t as Scheduler } from "./scheduler-CmLO4Dfm.js";
|
|
3
|
+
import "./jsx-runtime-X2SX2y8V.js";
|
|
3
4
|
//#region src/runtime/runtime.d.ts
|
|
4
5
|
interface RuntimeKeyedReorderDecision {
|
|
5
6
|
useFastPath: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as RenderableChild, g as StateTuple } from "./control-
|
|
1
|
+
import { c as RenderableChild, g as StateTuple } from "./control-DO-iBEtV.js";
|
|
2
2
|
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
|
+
import "./index-BFnTM1a8.js";
|
|
3
4
|
import { ObjectSchema } from "@askrjs/schema";
|
|
4
|
-
|
|
5
5
|
//#region src/actions/index.d.ts
|
|
6
6
|
interface ActionDescriptor<TInput extends Record<string, unknown> = Record<string, unknown>> {
|
|
7
7
|
readonly id: string;
|
|
@@ -14,11 +14,7 @@ declare function defineAction<TInput extends Record<string, unknown>>(options: {
|
|
|
14
14
|
readonly invalidates?: readonly string[];
|
|
15
15
|
}): ActionDescriptor<TInput>;
|
|
16
16
|
/** A native form bound to a declared action; it is not a synthetic event API. */
|
|
17
|
-
declare function ActionForm<TInput extends Record<string, unknown>>({
|
|
18
|
-
action,
|
|
19
|
-
children,
|
|
20
|
-
...props
|
|
21
|
-
}: {
|
|
17
|
+
declare function ActionForm<TInput extends Record<string, unknown>>({ action, children, ...props }: {
|
|
22
18
|
readonly action: ActionDescriptor<TInput>;
|
|
23
19
|
readonly children?: RenderableChild;
|
|
24
20
|
readonly [key: string]: unknown;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { c as RenderableChild, l as VNode, t as ForEachSource } from "./control-
|
|
1
|
+
import { c as RenderableChild, l as VNode, t as ForEachSource } from "./control-DO-iBEtV.js";
|
|
2
2
|
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
|
-
|
|
4
3
|
//#region src/control/shared.d.ts
|
|
5
4
|
type BoundaryChild = RenderableChild;
|
|
6
5
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { c as RenderableChild } from "./control-
|
|
1
|
+
import { c as RenderableChild } from "./control-DO-iBEtV.js";
|
|
2
2
|
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
|
+
import "./types-DEhT-Nrv.js";
|
|
3
4
|
//#region src/runtime/portal.d.ts
|
|
4
5
|
interface Portal<T extends RenderableChild = RenderableChild> {
|
|
5
6
|
(): unknown;
|
|
@@ -102,10 +103,7 @@ interface PresenceProps {
|
|
|
102
103
|
* children are removed immediately. Animation must be layered above
|
|
103
104
|
* this primitive.
|
|
104
105
|
*/
|
|
105
|
-
declare function Presence({
|
|
106
|
-
present,
|
|
107
|
-
children
|
|
108
|
-
}: PresenceProps): JSXElement | null;
|
|
106
|
+
declare function Presence({ present, children }: PresenceProps): JSXElement | null;
|
|
109
107
|
//#endregion
|
|
110
108
|
//#region src/foundations/structures/collection.d.ts
|
|
111
109
|
/**
|
|
@@ -156,6 +154,24 @@ interface Collection<TNode, TMetadata = unknown> {
|
|
|
156
154
|
size(): number;
|
|
157
155
|
}
|
|
158
156
|
declare function createCollection<TNode, TMetadata = unknown>(): Collection<TNode, TMetadata>;
|
|
157
|
+
/**
|
|
158
|
+
* USAGE EXAMPLE:
|
|
159
|
+
*
|
|
160
|
+
* // Create a collection for menu items
|
|
161
|
+
* const menuItems = createCollection<HTMLElement, { disabled: boolean }>();
|
|
162
|
+
*
|
|
163
|
+
* // Register items
|
|
164
|
+
* const unregister1 = menuItems.register(element1, { disabled: false });
|
|
165
|
+
* const unregister2 = menuItems.register(element2, { disabled: true });
|
|
166
|
+
*
|
|
167
|
+
* // Query items
|
|
168
|
+
* const allItems = menuItems.items();
|
|
169
|
+
* const enabledItems = allItems.filter(item => !item.metadata.disabled);
|
|
170
|
+
*
|
|
171
|
+
* // Cleanup
|
|
172
|
+
* unregister1();
|
|
173
|
+
* unregister2();
|
|
174
|
+
*/
|
|
159
175
|
//#endregion
|
|
160
176
|
//#region src/foundations/structures/layer.d.ts
|
|
161
177
|
/**
|
|
@@ -235,5 +251,29 @@ interface LayerManager {
|
|
|
235
251
|
handleOutsidePointer(e: PointerEvent): void;
|
|
236
252
|
}
|
|
237
253
|
declare function createLayer(): LayerManager;
|
|
254
|
+
/**
|
|
255
|
+
* USAGE EXAMPLE:
|
|
256
|
+
*
|
|
257
|
+
* const layerManager = createLayer();
|
|
258
|
+
*
|
|
259
|
+
* function Modal({ onClose }) {
|
|
260
|
+
* const modalRef = ref<HTMLDivElement>();
|
|
261
|
+
*
|
|
262
|
+
* const layer = layerManager.register({
|
|
263
|
+
* node: modalRef.current,
|
|
264
|
+
* onEscape: onClose,
|
|
265
|
+
* onOutsidePointer: onClose,
|
|
266
|
+
* });
|
|
267
|
+
*
|
|
268
|
+
* onUnmount(() => layer.unregister());
|
|
269
|
+
*
|
|
270
|
+
* return (
|
|
271
|
+
* <div ref={modalRef}>
|
|
272
|
+
* <h1>Modal</h1>
|
|
273
|
+
* {layer.isTop() && <p>I am on top!</p>}
|
|
274
|
+
* </div>
|
|
275
|
+
* );
|
|
276
|
+
* }
|
|
277
|
+
*/
|
|
238
278
|
//#endregion
|
|
239
279
|
export { definePortal as _, Collection as a, Presence as c, SlotProps as d, LayoutComponent as f, PortalProps as g, Portal as h, createLayer as i, PresenceProps as l, DefaultPortal as m, LayerManager as n, CollectionItem as o, layout as p, LayerOptions as r, createCollection as s, Layer as t, Slot as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as state, a as defineScope, g as StateTuple, h as StateSetter, i as Scope, m as State, o as readScope } from "./control-
|
|
1
|
+
import { _ as state, a as defineScope, g as StateTuple, h as StateSetter, i as Scope, m as State, o as readScope } from "./control-DO-iBEtV.js";
|
|
2
2
|
import { s as Props, t as Fragment } from "./jsx-Dvr2SGRG.js";
|
|
3
3
|
import { t as getSignal } from "./component-scope-CvPba6O6.js";
|
|
4
|
-
import { a as Derived, c as AskrRuntimeOptions, d as createRuntime, f as getDefaultRuntime, i as selector, l as RuntimeKeyedReorderDecision, n as cspNonce, o as derive, r as Selector, s as AskrRuntime, t as CspNonceScope, u as RuntimeRendererHost } from "./index-
|
|
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-
|
|
6
|
-
import { i as jsxs, n as jsx } from "./jsx-runtime-
|
|
4
|
+
import { a as Derived, c as AskrRuntimeOptions, d as createRuntime, f as getDefaultRuntime, i as selector, l as RuntimeKeyedReorderDecision, n as cspNonce, o as derive, r as Selector, s as AskrRuntime, t as CspNonceScope, u as RuntimeRendererHost } from "./index-BFnTM1a8.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-Dh6ZF9yW.js";
|
|
6
|
+
import { i as jsxs, n as jsx } from "./jsx-runtime-aYZ8zb4q.js";
|
|
7
7
|
import { A as ServerQueryHandler, D as QueryPrefetchContext, T as QueryDefinition, a as defineServerQueries, c as prefetchQuery, g as createQuery, i as defineQuery, l as serveQuery, o as dehydrateDataRuntime, s as hydrateDataRuntime, v as DataRuntime } from "./index-Bki2rqcr.js";
|
|
8
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 RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, createQuery, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, selector, serveQuery, state };
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-ePqdQqkV.js";
|
|
2
|
-
import { f as notifyReadableReaders, g as withDerivedReadTracking, h as syncDerivedDependencySubscriptions, l as markReactivePropsDirtySource, o as clearDerivedDependencySubscriptions, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
3
2
|
import { n as Fragment } from "./jsx-CUpRxrLH.js";
|
|
4
|
-
import {
|
|
3
|
+
import { h as readScope, u as defineScope } from "./component-internal-CPjM4n8M.js";
|
|
4
|
+
import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BYSoWJSv.js";
|
|
5
5
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
|
-
import { t as installRendererBridge } from "./renderer-
|
|
8
|
-
import { t as state } from "./state-
|
|
9
|
-
import { t as selector } from "./selector-
|
|
7
|
+
import { t as installRendererBridge } from "./renderer-Dwkk68c5.js";
|
|
8
|
+
import { t as state } from "./state-CVuQVjvK.js";
|
|
9
|
+
import { t as selector } from "./selector-DueeR6Oz.js";
|
|
10
10
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
11
|
-
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
12
|
-
import { i as For, n as Match, r as Show, t as Case } from "./control-
|
|
13
|
-
import { t as createQuery } from "./data-
|
|
11
|
+
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-HGZ0vbqT.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-CA45Yvvu.js";
|
|
13
|
+
import { t as createQuery } from "./data-DHt_zO1G.js";
|
|
14
14
|
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-CQIT4mXr.js";
|
|
15
15
|
//#region src/runtime/derive.ts
|
|
16
16
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
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-Dvr2SGRG.js";
|
|
2
|
-
import { t as EagerControlPrimitive } from "./control-
|
|
2
|
+
import { t as EagerControlPrimitive } from "./control-BjYBlytA.js";
|
|
3
|
+
import "./types-DEhT-Nrv.js";
|
|
3
4
|
//#region src/jsx/jsx-dev-runtime.d.ts
|
|
4
5
|
declare namespace JSX {
|
|
5
6
|
interface Element extends JSXElement {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./jsx-Dvr2SGRG.js";
|
|
2
|
-
import { t as EagerControlPrimitive } from "./control-
|
|
2
|
+
import { t as EagerControlPrimitive } from "./control-BjYBlytA.js";
|
|
3
|
+
import "./types-DEhT-Nrv.js";
|
|
3
4
|
//#region src/jsx/jsx-runtime.d.ts
|
|
4
5
|
declare namespace JSX {
|
|
5
6
|
interface Element extends JSXElement {
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./jsx-Dvr2SGRG.js";
|
|
2
|
-
import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-
|
|
2
|
+
import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-aYZ8zb4q.js";
|
|
3
3
|
export { Fragment, JSX, type JSXComponent, type JSXElement, type JSXElementType, jsx, jsxDEV, jsxs };
|