@askrjs/askr 0.0.99 → 0.2.1
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/README.md +3 -2
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +1 -1
- package/dist/{activity-d4t3CdzK.js → activity-B2Yy7Wz9.js} +2 -2
- package/dist/{activity-D_5x2HXQ.d.ts → activity-DOmzl9Yu.d.ts} +1 -1
- package/dist/benchmark.js +7 -7
- package/dist/boot/index.d.ts +2 -2
- package/dist/boot/index.js +1 -1
- package/dist/{boot-DE-JutXH.js → boot-DVwjHCNh.js} +275 -95
- package/dist/{cleanup-D7uN-Z1s.js → cleanup-DPtpXtA4.js} +3 -3
- package/dist/{component-cleanup-DYG80yhG.js → component-cleanup-DPe8claJ.js} +1 -1
- package/dist/{component-internal-D0yE2Ch3.js → component-internal-xW_OnTmC.js} +3 -3
- package/dist/components/index.d.ts +1 -1
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-C0klPV7Q.js → control-BLVTE1gO.js} +3 -3
- package/dist/{csp-nonce-BVybpV1v.js → csp-nonce-CCnMtOW-.js} +1 -1
- package/dist/data/index.d.ts +1 -1
- package/dist/data/index.js +1 -1
- package/dist/{data-CnQwUS76.js → data-CAXqJzoS.js} +2 -2
- package/dist/{deferred-BVkZ5T2P.js → deferred-BRw0gbn5.js} +2 -2
- package/dist/{effect-BdvdgMvV.js → effect-BQP5o0Kx.js} +1 -1
- package/dist/{fastlane-DGo7SxBQ.js → fastlane-DUxiFV9S.js} +1 -1
- package/dist/{for-internal-DkBwTG4S.js → for-internal-DKcYl3nl.js} +4 -4
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/index.d.ts +8 -1
- package/dist/foundations/interactions/index.js +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- 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 +1 -1
- package/dist/fx/index.js +12 -11
- package/dist/{index-CTIBOqUB.d.ts → index-B1p8bHZE.d.ts} +1 -0
- package/dist/{index-S2IqSJib.d.ts → index-zEdpHD86.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/{interactions-B4XaFxt1.js → interactions-B-7vkBgx.js} +3 -2
- package/dist/{lifecycle-batch-BH0fax4F.js → lifecycle-batch-BYECQw8T.js} +1 -1
- package/dist/{lifecycle-operations-CBzG5PyB.js → lifecycle-operations-DJk_5MrD.js} +1 -1
- package/dist/{navigate-eGm4omPj.d.ts → navigate-DUcj-nLs.d.ts} +1 -1
- package/dist/{navigate-Cix_Q9ym.js → navigate-DvJvo--6.js} +8 -8
- package/dist/{readable-BsdGWsDE.js → readable-D-JIKCg2.js} +2 -0
- package/dist/{renderer-tXX_xj86.js → renderer-RjZ8LHbt.js} +120 -12
- package/dist/{resolution-ZsIFeQoB.js → resolution-dVYwYXrI.js} +3 -3
- package/dist/{resource-operation-B62UQKHV.js → resource-operation-4qFIM02d.js} +3 -3
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/router/index.d.ts +3 -3
- package/dist/router/index.js +6 -6
- package/dist/{selector-CyK-sDwB.js → selector-NQiYHwZC.js} +1 -1
- package/dist/ssg/index.d.ts +1 -1
- package/dist/ssg/index.js +3 -3
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-BrdV2jMy.js → ssr-F87AcFMt.js} +6 -6
- package/dist/{state-DmkGM_LN.js → state-Ks-sWTQi.js} +2 -2
- package/dist/{structures-CPycoyZj.js → structures-C-wmHCi6.js} +3 -3
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +3 -3
- package/dist/{verify-hydration-Bo5_tpen.js → verify-hydration-CThsx0pq.js} +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane } from "./access-d_DCdwqn.js";
|
|
2
|
-
import { m as withFineGrainedReadTracking } from "./readable-
|
|
2
|
+
import { m as withFineGrainedReadTracking } from "./readable-D-JIKCg2.js";
|
|
3
3
|
//#region src/runtime/effect.ts
|
|
4
4
|
const SOURCE_EFFECTS = Symbol("askr.source-effects");
|
|
5
5
|
const effectSources = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as setRuntimeBulkCommitProbe, o as getRuntimeRenderer, u as runRuntimeWithSyncProgress, x as isDevelopmentEnvironment } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { i as isFragmentType } from "./jsx-DRS-qjiN.js";
|
|
3
|
-
import { i as finalizeReadableSubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty } from "./readable-
|
|
3
|
+
import { i as finalizeReadableSubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty } from "./readable-D-JIKCg2.js";
|
|
4
4
|
//#region src/runtime/dev-namespace.ts
|
|
5
5
|
/**
|
|
6
6
|
* Set a value in the dev namespace (no-op in production).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
|
|
2
2
|
import { o as getRuntimeRenderer, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
|
|
3
3
|
import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
|
|
4
|
-
import { _ as haveEquivalentContextFrames, b as rebaseVNodeTreeWithContextFrame, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-
|
|
5
|
-
import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-
|
|
6
|
-
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-
|
|
7
|
-
import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-
|
|
4
|
+
import { _ as haveEquivalentContextFrames, b as rebaseVNodeTreeWithContextFrame, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-xW_OnTmC.js";
|
|
5
|
+
import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-D-JIKCg2.js";
|
|
6
|
+
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-DPe8claJ.js";
|
|
7
|
+
import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-BYECQw8T.js";
|
|
8
8
|
//#region src/runtime/child-scope.ts
|
|
9
9
|
const EMPTY_CHILD_SCOPE_PROPS = {};
|
|
10
10
|
const childScopesByInstance = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../types-DkVJhVs9.js";
|
|
2
|
-
import { c as DefaultPortal, d as definePortal, f as Presence, h as SlotProps, l as Portal, m as Slot, p as PresenceProps, u as PortalProps, v as LayoutComponent, y as layout } from "../index-
|
|
2
|
+
import { c as DefaultPortal, d as definePortal, f as Presence, h as SlotProps, l as Portal, m as Slot, p as PresenceProps, u as PortalProps, v as LayoutComponent, y as layout } from "../index-zEdpHD86.js";
|
|
3
3
|
export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as definePortal, c as layout, i as Portal, o as Presence, r as DefaultPortal, s as Slot } from "../structures-
|
|
1
|
+
import { a as definePortal, c as layout, i as Portal, o as Presence, r as DefaultPortal, s as Slot } from "../structures-C-wmHCi6.js";
|
|
2
2
|
export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
|
|
@@ -73,6 +73,7 @@ declare function pressable({ disabled, onPress, isNativeButton }: PressableOptio
|
|
|
73
73
|
* - Returns standard event handler props (onKeyDown, onPointerDownCapture)
|
|
74
74
|
* - Composable via mergeProps with other foundations
|
|
75
75
|
* - Caller provides the protected node reference for outside detection
|
|
76
|
+
* - Portaled descendants are registered explicitly as additional inside nodes
|
|
76
77
|
* - Returned capture props must be attached to a surface that can observe both
|
|
77
78
|
* the protected subtree and the outside interaction path (for example, an
|
|
78
79
|
* overlay or wrapper around the protected node)
|
|
@@ -87,6 +88,7 @@ declare function pressable({ disabled, onPress, isNativeButton }: PressableOptio
|
|
|
87
88
|
* USAGE:
|
|
88
89
|
* const props = dismissable({
|
|
89
90
|
* node: elementRef,
|
|
91
|
+
* additionalInsideNodes: [dropdownPortalRef],
|
|
90
92
|
* disabled: false,
|
|
91
93
|
* onDismiss: () => close()
|
|
92
94
|
* });
|
|
@@ -107,6 +109,11 @@ interface DismissableOptions {
|
|
|
107
109
|
* returned capture props to a surface that encloses this node.
|
|
108
110
|
*/
|
|
109
111
|
node?: Node | null;
|
|
112
|
+
/**
|
|
113
|
+
* Additional roots that are logically inside the protected surface even
|
|
114
|
+
* when a portal places them outside `node` in the DOM tree.
|
|
115
|
+
*/
|
|
116
|
+
additionalInsideNodes?: readonly (Node | null | undefined)[];
|
|
110
117
|
/**
|
|
111
118
|
* Whether dismiss is disabled
|
|
112
119
|
*/
|
|
@@ -117,7 +124,7 @@ interface DismissableOptions {
|
|
|
117
124
|
onDismiss?: (trigger: 'escape' | 'outside') => void;
|
|
118
125
|
}
|
|
119
126
|
/** Produce keydown/outside-click props that invoke `onDismiss` on Escape or an outside click. */
|
|
120
|
-
declare function dismissable({ node, disabled, onDismiss }: DismissableOptions): {
|
|
127
|
+
declare function dismissable({ node, additionalInsideNodes, disabled, onDismiss }: DismissableOptions): {
|
|
121
128
|
onKeyDown: (e: KeyboardLikeEvent) => void;
|
|
122
129
|
onPointerDownCapture: (e: PointerLikeEvent) => void;
|
|
123
130
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as focusable, i as hoverable, n as mergeInteractionProps, o as dismissable, r as rovingFocus, s as pressable, t as applyInteractionPolicy } from "../../interactions-
|
|
1
|
+
import { a as focusable, i as hoverable, n as mergeInteractionProps, o as dismissable, r as rovingFocus, s as pressable, t as applyInteractionPolicy } from "../../interactions-B-7vkBgx.js";
|
|
2
2
|
export { applyInteractionPolicy, dismissable, focusable, hoverable, mergeInteractionProps, pressable, rovingFocus };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dn as State } from "../../index-
|
|
1
|
+
import { dn as State } from "../../index-B1p8bHZE.js";
|
|
2
2
|
//#region src/foundations/state/controllable.d.ts
|
|
3
3
|
/** Whether `value` represents controlled mode (not `undefined`). */
|
|
4
4
|
declare function isControlled<T>(value: T | undefined): value is T;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../../types-DkVJhVs9.js";
|
|
2
|
-
import { _ as isElement, a as Collection, c as DefaultPortal, d as definePortal, f as Presence, g as cloneElement, h as SlotProps, i as createLayer, l as Portal, m as Slot, n as LayerManager, o as CollectionItem, p as PresenceProps, r as LayerOptions, s as createCollection, t as Layer, u as PortalProps, v as LayoutComponent, y as layout } from "../../index-
|
|
2
|
+
import { _ as isElement, a as Collection, c as DefaultPortal, d as definePortal, f as Presence, g as cloneElement, h as SlotProps, i as createLayer, l as Portal, m as Slot, n as LayerManager, o as CollectionItem, p as PresenceProps, r as LayerOptions, s as createCollection, t as Layer, u as PortalProps, v as LayoutComponent, y as layout } from "../../index-zEdpHD86.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, cloneElement, createCollection, createLayer, definePortal, isElement, layout };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as definePortal, c as layout, i as Portal, l as cloneElement, n as createCollection, o as Presence, r as DefaultPortal, s as Slot, t as createLayer, u as isElement } from "../../structures-
|
|
1
|
+
import { a as definePortal, c as layout, i as Portal, l as cloneElement, n as createCollection, o as Presence, r as DefaultPortal, s as Slot, t as createLayer, u as isElement } from "../../structures-C-wmHCi6.js";
|
|
2
2
|
export { DefaultPortal, Portal, Presence, Slot, cloneElement, createCollection, createLayer, definePortal, isElement, layout };
|
package/dist/fx/index.d.ts
CHANGED
package/dist/fx/index.js
CHANGED
|
@@ -24,20 +24,20 @@ function debounce(fn, ms, options) {
|
|
|
24
24
|
const { leading = false, trailing = true } = options || {};
|
|
25
25
|
let lastArgs = null;
|
|
26
26
|
let lastThis = null;
|
|
27
|
-
let
|
|
27
|
+
let trailingPending = false;
|
|
28
28
|
const debounced = function(...args) {
|
|
29
|
-
const
|
|
29
|
+
const windowActive = timeoutId !== null;
|
|
30
30
|
lastArgs = args;
|
|
31
31
|
lastThis = this;
|
|
32
32
|
if (timeoutId !== null) clearTimeout(timeoutId);
|
|
33
|
-
if (leading &&
|
|
33
|
+
if (leading && !windowActive) {
|
|
34
34
|
callable.apply(this, args);
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
callable.apply(lastThis, lastArgs);
|
|
35
|
+
trailingPending = false;
|
|
36
|
+
} else if (trailing) trailingPending = true;
|
|
37
|
+
timeoutId = setTimeout(() => {
|
|
38
|
+
if (trailingPending) callable.apply(lastThis, lastArgs);
|
|
39
39
|
timeoutId = null;
|
|
40
|
-
|
|
40
|
+
trailingPending = false;
|
|
41
41
|
}, ms);
|
|
42
42
|
};
|
|
43
43
|
debounced.cancel = () => {
|
|
@@ -45,6 +45,7 @@ function debounce(fn, ms, options) {
|
|
|
45
45
|
clearTimeout(timeoutId);
|
|
46
46
|
timeoutId = null;
|
|
47
47
|
}
|
|
48
|
+
trailingPending = false;
|
|
48
49
|
};
|
|
49
50
|
return debounced;
|
|
50
51
|
}
|
|
@@ -121,13 +122,13 @@ function once(fn) {
|
|
|
121
122
|
const callable = fn;
|
|
122
123
|
let called = false;
|
|
123
124
|
let result;
|
|
124
|
-
return (
|
|
125
|
+
return function(...args) {
|
|
125
126
|
if (!called) {
|
|
126
127
|
called = true;
|
|
127
|
-
result = callable(
|
|
128
|
+
result = callable.apply(this, args);
|
|
128
129
|
}
|
|
129
130
|
return result;
|
|
130
|
-
}
|
|
131
|
+
};
|
|
131
132
|
}
|
|
132
133
|
/**
|
|
133
134
|
* Defer — schedule on microtask queue
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as Scope, A as Case, B as RenderDiagnosticsOptions, C as Ref, D as registerSSRStyle, F as ShowProps, G as AskrRuntimeOptions, H as Derived, I as For, J as createRuntime, K as RuntimeKeyedReorderDecision, L as ForProps, M as Match, N as MatchProps, O as CspNonceScope, P as Show, Qt as ServerQueryHandler, R as Selector, U as derive, V as configureRenderDiagnostics, W as AskrRuntime, Y as getDefaultRuntime, Yt as QueryPrefetchContext, Z as getSignal, d as defineServerQueries, dn as State, en as defineScope, f as dehydrateDataRuntime, fn as StateSetter, h as serveQuery, j as CaseProps, k as cspNonce, m as prefetchQuery, mn as state, p as hydrateDataRuntime, pn as StateTuple, q as RuntimeRendererHost, qt as QueryDefinition, tn as readScope, u as defineQuery, w as createRef, x as createQuery, z as selector, zt as DataRuntime } from "./index-
|
|
1
|
+
import { $t as Scope, A as Case, B as RenderDiagnosticsOptions, C as Ref, D as registerSSRStyle, F as ShowProps, G as AskrRuntimeOptions, H as Derived, I as For, J as createRuntime, K as RuntimeKeyedReorderDecision, L as ForProps, M as Match, N as MatchProps, O as CspNonceScope, P as Show, Qt as ServerQueryHandler, R as Selector, U as derive, V as configureRenderDiagnostics, W as AskrRuntime, Y as getDefaultRuntime, Yt as QueryPrefetchContext, Z as getSignal, d as defineServerQueries, dn as State, en as defineScope, f as dehydrateDataRuntime, fn as StateSetter, h as serveQuery, j as CaseProps, k as cspNonce, m as prefetchQuery, mn as state, p as hydrateDataRuntime, pn as StateTuple, q as RuntimeRendererHost, qt as QueryDefinition, tn as readScope, u as defineQuery, w as createRef, x as createQuery, z as selector, zt as DataRuntime } from "./index-B1p8bHZE.js";
|
|
2
2
|
import { s as Props, t as Fragment } from "./types-DkVJhVs9.js";
|
|
3
3
|
import { i as jsxs, n as jsx } from "./jsx-runtime-Cdd6Gkb0.js";
|
|
4
4
|
export { AskrRuntime, type AskrRuntimeOptions, Case, type CaseProps, CspNonceScope, type DataRuntime, type Derived, For, type ForProps, Fragment, Match, type MatchProps, type Props, type QueryDefinition, type QueryPrefetchContext, type Ref, type RenderDiagnosticsOptions, type RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, configureRenderDiagnostics, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { a as getRuntimeFlushVersion, f as AskrRuntime, h as getDefaultRuntime, m as createRuntime, t as enqueueRuntimeLane } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-DRS-qjiN.js";
|
|
4
|
-
import { d as configureRenderDiagnostics, p as defineScope, y as readScope } from "./component-internal-
|
|
5
|
-
import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-
|
|
4
|
+
import { d as configureRenderDiagnostics, p as defineScope, y as readScope } from "./component-internal-xW_OnTmC.js";
|
|
5
|
+
import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-D-JIKCg2.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
7
|
import { c as registerSSRStyle } from "./render-context-B7ohlh6t.js";
|
|
8
|
-
import { t as state } from "./state-
|
|
9
|
-
import { t as selector } from "./selector-
|
|
10
|
-
import { t as installRendererBridge } from "./renderer-
|
|
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-
|
|
8
|
+
import { t as state } from "./state-Ks-sWTQi.js";
|
|
9
|
+
import { t as selector } from "./selector-NQiYHwZC.js";
|
|
10
|
+
import { t as installRendererBridge } from "./renderer-RjZ8LHbt.js";
|
|
11
|
+
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-CCnMtOW-.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-BLVTE1gO.js";
|
|
13
13
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
14
|
-
import { t as createQuery } from "./data-
|
|
14
|
+
import { t as createQuery } from "./data-CAXqJzoS.js";
|
|
15
15
|
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-Bua3cDyb.js";
|
|
16
16
|
//#region src/runtime/derive.ts
|
|
17
17
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
@@ -49,7 +49,7 @@ function pressable({ disabled, onPress, isNativeButton = false }) {
|
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/foundations/interactions/dismissable.ts
|
|
51
51
|
/** Produce keydown/outside-click props that invoke `onDismiss` on Escape or an outside click. */
|
|
52
|
-
function dismissable({ node, disabled, onDismiss }) {
|
|
52
|
+
function dismissable({ node, additionalInsideNodes, disabled, onDismiss }) {
|
|
53
53
|
function handleKeyDown(e) {
|
|
54
54
|
if (disabled) return;
|
|
55
55
|
if (e.key === "Escape") {
|
|
@@ -63,7 +63,8 @@ function dismissable({ node, disabled, onDismiss }) {
|
|
|
63
63
|
const target = e.target;
|
|
64
64
|
if (!(target instanceof Node)) return;
|
|
65
65
|
if (!node) return;
|
|
66
|
-
|
|
66
|
+
const insideAdditionalNode = additionalInsideNodes?.some((insideNode) => insideNode?.contains(target));
|
|
67
|
+
if (!node.contains(target) && !insideAdditionalNode) onDismiss?.("outside");
|
|
67
68
|
}
|
|
68
69
|
return {
|
|
69
70
|
onKeyDown: handleKeyDown,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { y as logger } from "./access-d_DCdwqn.js";
|
|
2
|
-
import { a as finalizeReadableSubscriptionsFromSnapshot } from "./readable-
|
|
2
|
+
import { a as finalizeReadableSubscriptionsFromSnapshot } from "./readable-D-JIKCg2.js";
|
|
3
3
|
//#region src/common/promise.ts
|
|
4
4
|
function isPromiseLike(value) {
|
|
5
5
|
return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-4I3yEMkb.js";
|
|
2
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
2
|
+
import { a as registerCommitOperation } from "./component-internal-xW_OnTmC.js";
|
|
3
3
|
import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
|
|
4
4
|
//#region src/runtime/lifecycle-operations.ts
|
|
5
5
|
function normalizePredicates(predicates) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { S as isProductionEnvironment, r as flushRuntimeScheduler, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
3
|
-
import { r as executeComponent } from "./component-internal-
|
|
4
|
-
import { t as cleanupReadableSubscriptionSources } from "./readable-
|
|
5
|
-
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-
|
|
6
|
-
import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-
|
|
7
|
-
import { _ as teardownNodeSubtree } from "./cleanup-
|
|
8
|
-
import { t as CspNonceScope } from "./csp-nonce-
|
|
3
|
+
import { r as executeComponent } from "./component-internal-xW_OnTmC.js";
|
|
4
|
+
import { t as cleanupReadableSubscriptionSources } from "./readable-D-JIKCg2.js";
|
|
5
|
+
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-DPe8claJ.js";
|
|
6
|
+
import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-BYECQw8T.js";
|
|
7
|
+
import { _ as teardownNodeSubtree } from "./cleanup-DPtpXtA4.js";
|
|
8
|
+
import { t as CspNonceScope } from "./csp-nonce-CCnMtOW-.js";
|
|
9
9
|
import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-Bo6UqG-5.js";
|
|
10
|
-
import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-
|
|
11
|
-
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-
|
|
10
|
+
import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-dVYwYXrI.js";
|
|
11
|
+
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-B2Yy7Wz9.js";
|
|
12
12
|
import { r as getDefaultPortalHost, t as clearRegisteredDefaultPortalForInstance } from "./default-portal-runtime-DvMvWJVp.js";
|
|
13
13
|
//#region src/router/navigation-registry.ts
|
|
14
14
|
let currentInstance = null;
|
|
@@ -6,6 +6,7 @@ function markReadableUsage(source) {
|
|
|
6
6
|
if (source && typeof source === "function" && ("_hasBeenRead" in source || "_readers" in source)) {
|
|
7
7
|
const readable = source;
|
|
8
8
|
readable._hasBeenRead = true;
|
|
9
|
+
if (readable._unusedStateDiagnosticEligible === true) readable._hasEverBeenRead = true;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
let currentDerivedSubscriber = null;
|
|
@@ -25,6 +26,7 @@ function scheduleReadableInstanceUpdate(instance) {
|
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
function recordReadableRead(source) {
|
|
29
|
+
if (source._unusedStateDiagnosticEligible === true) source._hasEverBeenRead = true;
|
|
28
30
|
if (currentFineGrainedReadCollector) {
|
|
29
31
|
const first = currentFineGrainedReadCollector._pendingFineGrainedReadSource;
|
|
30
32
|
if (!first) currentFineGrainedReadCollector._pendingFineGrainedReadSource = source;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { n as hasTransparentComponentResult, t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
|
|
2
2
|
import { n as _isDOMElement, t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
|
|
3
3
|
import { b as getRuntimeEnv, i as getDefaultRuntimeInstance, l as runRuntimeHandlerScope, n as enqueueRuntimeTask, p as configureRuntimeRenderer, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
|
|
4
|
-
import { n as isBulkCommitActive, r as markFastPathApplied } from "./fastlane-
|
|
4
|
+
import { n as isBulkCommitActive, r as markFastPathApplied } from "./fastlane-DUxiFV9S.js";
|
|
5
5
|
import { T as withAppRenderRuntime, b as restoreDomCommitScope, c as enterDomCommitScope, d as getCurrentAppRenderRuntime, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
|
|
6
6
|
import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-DRS-qjiN.js";
|
|
7
|
-
import { S as withContext, c as createBoundaryReset, g as getVNodeContextFrame, i as mountInstanceInline, l as reportBoundaryError, m as getCurrentContextFrame, n as createComponentInstance, o as renderComponentInline, t as captureInlineRenderSnapshot, v as markVNodeTreeWithContextFrame } from "./component-internal-
|
|
8
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
9
|
-
import { c as getCurrentLifecycleCommitBatch, l as registerLifecycleRollback, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-
|
|
10
|
-
import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-
|
|
11
|
-
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-
|
|
12
|
-
import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-
|
|
7
|
+
import { S as withContext, c as createBoundaryReset, g as getVNodeContextFrame, i as mountInstanceInline, l as reportBoundaryError, m as getCurrentContextFrame, n as createComponentInstance, o as renderComponentInline, t as captureInlineRenderSnapshot, v as markVNodeTreeWithContextFrame } from "./component-internal-xW_OnTmC.js";
|
|
8
|
+
import { t as cleanupComponent } from "./component-cleanup-DPe8claJ.js";
|
|
9
|
+
import { c as getCurrentLifecycleCommitBatch, l as registerLifecycleRollback, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-BYECQw8T.js";
|
|
10
|
+
import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-DKcYl3nl.js";
|
|
11
|
+
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-BQP5o0Kx.js";
|
|
12
|
+
import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-DPtpXtA4.js";
|
|
13
13
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
14
|
-
import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-
|
|
14
|
+
import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-CCnMtOW-.js";
|
|
15
15
|
import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
|
|
16
16
|
//#region src/renderer/utils.ts
|
|
17
17
|
/**
|
|
@@ -5918,6 +5918,9 @@ function materializeComponentResultNode(childInstance, result, parentNamespace)
|
|
|
5918
5918
|
} finally {
|
|
5919
5919
|
restoreDomCommitScope(previousInstance);
|
|
5920
5920
|
}
|
|
5921
|
+
return materializeResolvedComponentResultNode(childInstance, result, dom);
|
|
5922
|
+
}
|
|
5923
|
+
function materializeResolvedComponentResultNode(childInstance, result, dom) {
|
|
5921
5924
|
if (dom instanceof Element) {
|
|
5922
5925
|
mountInstanceInline(childInstance, dom);
|
|
5923
5926
|
return dom;
|
|
@@ -5961,6 +5964,20 @@ function materializeComponentResultNode(childInstance, result, parentNamespace)
|
|
|
5961
5964
|
return materialized.fragment ?? host;
|
|
5962
5965
|
}
|
|
5963
5966
|
//#endregion
|
|
5967
|
+
//#region src/renderer/component-chain-depth.ts
|
|
5968
|
+
const MAX_COMPONENT_CHAIN_DEPTH = 1e5;
|
|
5969
|
+
const COMPONENT_CHAIN_ERROR_CONTEXT = 8;
|
|
5970
|
+
function assertComponentChainDepth(depth, instance) {
|
|
5971
|
+
if (depth < MAX_COMPONENT_CHAIN_DEPTH) return;
|
|
5972
|
+
const names = [];
|
|
5973
|
+
let current = instance;
|
|
5974
|
+
while (current && names.length < COMPONENT_CHAIN_ERROR_CONTEXT) {
|
|
5975
|
+
names.push(current.fn.name || "<anonymous>");
|
|
5976
|
+
current = current.parentInstance;
|
|
5977
|
+
}
|
|
5978
|
+
throw new Error(`[Askr] Component chain exceeded ${MAX_COMPONENT_CHAIN_DEPTH.toLocaleString("en-US")} wrappers. This usually means component output recurses without terminating. Recent chain: ${names.reverse().join(" -> ")}`);
|
|
5979
|
+
}
|
|
5980
|
+
//#endregion
|
|
5964
5981
|
//#region src/renderer/component-host-nested-results.ts
|
|
5965
5982
|
function getNestedComponentVNode(result) {
|
|
5966
5983
|
if (_isDOMElement(result) && typeof result.type === "function") return result;
|
|
@@ -5972,8 +5989,10 @@ function getNestedComponentVNode(result) {
|
|
|
5972
5989
|
function resolveNestedComponentResult(result, snapshot, parentInstance) {
|
|
5973
5990
|
let currentResult = result;
|
|
5974
5991
|
let activeSnapshot = snapshot;
|
|
5992
|
+
let diagnosticParent = parentInstance;
|
|
5975
5993
|
let depth = 0;
|
|
5976
|
-
while (_isDOMElement(currentResult) && typeof currentResult.type === "function"
|
|
5994
|
+
while (_isDOMElement(currentResult) && typeof currentResult.type === "function") {
|
|
5995
|
+
assertComponentChainDepth(depth, diagnosticParent);
|
|
5977
5996
|
const nestedSnapshot = getVNodeContextFrame(currentResult) ?? activeSnapshot;
|
|
5978
5997
|
const nestedInstance = createComponentInstance(nextComponentInstanceId(), currentResult.type, currentResult.props ?? {}, null);
|
|
5979
5998
|
nestedInstance.isRoot = isRouteRootComponentVNode(currentResult);
|
|
@@ -5990,6 +6009,7 @@ function resolveNestedComponentResult(result, snapshot, parentInstance) {
|
|
|
5990
6009
|
throw error;
|
|
5991
6010
|
}
|
|
5992
6011
|
cleanupComponent(nestedInstance);
|
|
6012
|
+
diagnosticParent = nestedInstance;
|
|
5993
6013
|
activeSnapshot = nestedSnapshot ?? null;
|
|
5994
6014
|
currentResult = nextResult;
|
|
5995
6015
|
depth += 1;
|
|
@@ -6005,7 +6025,8 @@ function resolveHostNestedComponentResult(host, retainedInstance, result, snapsh
|
|
|
6005
6025
|
const createdVNodeOwners = [];
|
|
6006
6026
|
try {
|
|
6007
6027
|
let nestedVNode = getNestedComponentVNode(currentResult);
|
|
6008
|
-
while (nestedVNode
|
|
6028
|
+
while (nestedVNode) {
|
|
6029
|
+
assertComponentChainDepth(depth, activeParent);
|
|
6009
6030
|
const nestedSnapshot = getVNodeContextFrame(nestedVNode) ?? activeSnapshot;
|
|
6010
6031
|
let nestedInstance = findHostInstanceByType(host, nestedVNode.type, nestedVNode, activeParent, depth);
|
|
6011
6032
|
const hadNestedInstance = !!nestedInstance;
|
|
@@ -6063,7 +6084,8 @@ function resolveWrapperHostResult(host, retainedInstance, result, snapshot, reta
|
|
|
6063
6084
|
let activeParent = retainedInstance;
|
|
6064
6085
|
let depth = 0;
|
|
6065
6086
|
let nestedVNode = getNestedComponentVNode(currentResult);
|
|
6066
|
-
while (nestedVNode
|
|
6087
|
+
while (nestedVNode) {
|
|
6088
|
+
assertComponentChainDepth(depth, activeParent);
|
|
6067
6089
|
const nestedSnapshot = getVNodeContextFrame(nestedVNode) ?? activeSnapshot;
|
|
6068
6090
|
const nestedInstance = findHostInstanceByType(host, nestedVNode.type, nestedVNode, activeParent, depth);
|
|
6069
6091
|
if (!nestedInstance) break;
|
|
@@ -6090,6 +6112,81 @@ function resolveWrapperHostResult(host, retainedInstance, result, snapshot, reta
|
|
|
6090
6112
|
};
|
|
6091
6113
|
}
|
|
6092
6114
|
//#endregion
|
|
6115
|
+
//#region src/renderer/component-host-fresh-chain.ts
|
|
6116
|
+
function getFreshNestedComponentVNode(result) {
|
|
6117
|
+
if (_isDOMElement(result) && typeof result.type === "function") return result;
|
|
6118
|
+
if (!Array.isArray(result) && !isFragmentVNode(result)) return null;
|
|
6119
|
+
const children = normalizeComponentChildren(result);
|
|
6120
|
+
const child = children.length === 1 ? children[0] : void 0;
|
|
6121
|
+
return _isDOMElement(child) && typeof child.type === "function" ? child : null;
|
|
6122
|
+
}
|
|
6123
|
+
function prepareFreshNestedComponentResultDom(result, dom) {
|
|
6124
|
+
if (!Array.isArray(result) && !isFragmentVNode(result)) return dom;
|
|
6125
|
+
const fragment = document.createDocumentFragment();
|
|
6126
|
+
fragment.appendChild(dom);
|
|
6127
|
+
return fragment;
|
|
6128
|
+
}
|
|
6129
|
+
function rollbackFreshNestedComponentResolution(resolution) {
|
|
6130
|
+
for (let index = resolution.vnodeOwners.length - 1; index >= 0; index -= 1) {
|
|
6131
|
+
const owner = resolution.vnodeOwners[index];
|
|
6132
|
+
restoreVNodeComponentInstance(owner.node, owner.previous);
|
|
6133
|
+
}
|
|
6134
|
+
cleanupProvisionalComponentInstances(resolution.createdInstances);
|
|
6135
|
+
}
|
|
6136
|
+
function resolveFreshNestedComponentResult(result, snapshot, parentInstance) {
|
|
6137
|
+
let currentResult = result;
|
|
6138
|
+
let activeSnapshot = snapshot;
|
|
6139
|
+
let activeParent = parentInstance;
|
|
6140
|
+
let depth = 0;
|
|
6141
|
+
const resolution = {
|
|
6142
|
+
entries: [],
|
|
6143
|
+
createdInstances: [],
|
|
6144
|
+
vnodeOwners: []
|
|
6145
|
+
};
|
|
6146
|
+
try {
|
|
6147
|
+
let nestedVNode = getFreshNestedComponentVNode(currentResult);
|
|
6148
|
+
while (nestedVNode) {
|
|
6149
|
+
assertComponentChainDepth(depth, activeParent);
|
|
6150
|
+
const nestedSnapshot = getVNodeContextFrame(nestedVNode) ?? activeSnapshot;
|
|
6151
|
+
const componentFn = nestedVNode.type;
|
|
6152
|
+
const previous = getVNodeComponentInstance(nestedVNode);
|
|
6153
|
+
let nestedInstance = previous && hasComponentOwnershipIdentity(previous, componentFn, nestedVNode, activeParent, 0) ? previous : void 0;
|
|
6154
|
+
if (!nestedInstance) {
|
|
6155
|
+
nestedInstance = createComponentInstance(nextComponentInstanceId(), componentFn, nestedVNode.props ?? {}, null);
|
|
6156
|
+
resolution.vnodeOwners.push({
|
|
6157
|
+
node: nestedVNode,
|
|
6158
|
+
previous
|
|
6159
|
+
});
|
|
6160
|
+
registerVNodeComponentInstanceRollback(nestedVNode, previous, nestedInstance);
|
|
6161
|
+
setVNodeComponentInstance(nestedVNode, nestedInstance);
|
|
6162
|
+
resolution.createdInstances.push(nestedInstance);
|
|
6163
|
+
} else captureInlineRenderSnapshot(nestedInstance);
|
|
6164
|
+
setComponentOwnershipIdentity(nestedInstance, nestedVNode, activeParent, 0);
|
|
6165
|
+
nestedInstance.isRoot = isRouteRootComponentVNode(nestedVNode);
|
|
6166
|
+
nestedInstance.parentInstance = activeParent;
|
|
6167
|
+
nestedInstance.portalScope = activeParent.portalScope ?? nestedInstance.portalScope;
|
|
6168
|
+
nestedInstance.cleanupStrict = activeParent.cleanupStrict;
|
|
6169
|
+
nestedInstance.props = (nestedVNode.props ?? {}) || {};
|
|
6170
|
+
if (nestedSnapshot) nestedInstance.ownerFrame = nestedSnapshot;
|
|
6171
|
+
const nextResult = withContext(nestedSnapshot ?? null, () => renderComponentInline(nestedInstance));
|
|
6172
|
+
if (isPromiseLike(nextResult)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
6173
|
+
activeParent = nestedInstance;
|
|
6174
|
+
activeSnapshot = nestedSnapshot ?? null;
|
|
6175
|
+
currentResult = markVNodeTreeWithContextFrame(nextResult, activeSnapshot);
|
|
6176
|
+
resolution.entries.push({
|
|
6177
|
+
instance: nestedInstance,
|
|
6178
|
+
result: currentResult
|
|
6179
|
+
});
|
|
6180
|
+
depth += 1;
|
|
6181
|
+
nestedVNode = getFreshNestedComponentVNode(currentResult);
|
|
6182
|
+
}
|
|
6183
|
+
return resolution;
|
|
6184
|
+
} catch (error) {
|
|
6185
|
+
rollbackFreshNestedComponentResolution(resolution);
|
|
6186
|
+
throw error;
|
|
6187
|
+
}
|
|
6188
|
+
}
|
|
6189
|
+
//#endregion
|
|
6093
6190
|
//#region src/renderer/component-host-creation.ts
|
|
6094
6191
|
function createComponentElement(node, type, props, parentNamespace) {
|
|
6095
6192
|
const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame();
|
|
@@ -6099,6 +6196,7 @@ function createComponentElement(node, type, props, parentNamespace) {
|
|
|
6099
6196
|
const currentParent = getCurrentInstance();
|
|
6100
6197
|
let childInstance = previousVNodeInstance && hasComponentOwnershipIdentity(previousVNodeInstance, componentFn, node, currentParent, 0) ? previousVNodeInstance : void 0;
|
|
6101
6198
|
const hadChildInstance = !!childInstance;
|
|
6199
|
+
let nestedResolution = null;
|
|
6102
6200
|
if (!childInstance) {
|
|
6103
6201
|
childInstance = createComponentInstance(nextComponentInstanceId(), componentFn, props || {}, null);
|
|
6104
6202
|
registerVNodeComponentInstanceRollback(node, previousVNodeInstance, childInstance);
|
|
@@ -6116,10 +6214,20 @@ function createComponentElement(node, type, props, parentNamespace) {
|
|
|
6116
6214
|
const result = snapshot ? withContext(snapshot, () => renderComponentInline(childInstance)) : renderComponentInline(childInstance);
|
|
6117
6215
|
if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
6118
6216
|
const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
|
|
6119
|
-
|
|
6217
|
+
nestedResolution = resolveFreshNestedComponentResult(scopedResult, snapshot ?? null, childInstance);
|
|
6218
|
+
const deepestEntry = nestedResolution.entries[nestedResolution.entries.length - 1];
|
|
6219
|
+
let dom = snapshot ? withContext(snapshot, () => materializeComponentResultNode(deepestEntry?.instance ?? childInstance, deepestEntry?.result ?? scopedResult, parentNamespace)) : materializeComponentResultNode(deepestEntry?.instance ?? childInstance, deepestEntry?.result ?? scopedResult, parentNamespace);
|
|
6220
|
+
if (deepestEntry) {
|
|
6221
|
+
for (let index = nestedResolution.entries.length - 2; index >= 0; index -= 1) {
|
|
6222
|
+
const entry = nestedResolution.entries[index];
|
|
6223
|
+
dom = materializeResolvedComponentResultNode(entry.instance, entry.result, prepareFreshNestedComponentResultDom(entry.result, dom));
|
|
6224
|
+
}
|
|
6225
|
+
dom = materializeResolvedComponentResultNode(childInstance, scopedResult, prepareFreshNestedComponentResultDom(scopedResult, dom));
|
|
6226
|
+
}
|
|
6120
6227
|
if (dom instanceof Element) materializeFreshKey(dom, node, props);
|
|
6121
6228
|
return dom;
|
|
6122
6229
|
} catch (error) {
|
|
6230
|
+
if (nestedResolution) rollbackFreshNestedComponentResolution(nestedResolution);
|
|
6123
6231
|
if (!hadChildInstance) {
|
|
6124
6232
|
restoreVNodeComponentInstance(node, previousVNodeInstance);
|
|
6125
6233
|
cleanupProvisionalComponentInstance(childInstance);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-DRS-qjiN.js";
|
|
2
|
-
import { p as defineScope, y as readScope } from "./component-internal-
|
|
3
|
-
import { p as isPromiseLike } from "./lifecycle-batch-
|
|
2
|
+
import { p as defineScope, y as readScope } from "./component-internal-xW_OnTmC.js";
|
|
3
|
+
import { p as isPromiseLike } from "./lifecycle-batch-BYECQw8T.js";
|
|
4
4
|
import { S as withPageFramework, b as replacePageRoute, n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
|
|
5
|
-
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
5
|
+
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-CCnMtOW-.js";
|
|
6
6
|
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-Bua3cDyb.js";
|
|
7
7
|
import { c as removeRouteBasePath, i as getMatchingRouteRecord, l as buildRouteContext, o as addRouteBasePath, s as normalizeRouteBasePath, u as buildRouteContextBase, v as getActiveRouteAuthOptions } from "./route-matching-Bo6UqG-5.js";
|
|
8
8
|
//#region src/router/route-data-loader.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane, y as logger } from "./access-d_DCdwqn.js";
|
|
2
2
|
import { f as getCurrentComponentInstance } from "./component-scope-4I3yEMkb.js";
|
|
3
|
-
import { m as getCurrentContextFrame, u as registerCommitOperationForInstance, x as withAsyncResourceContext } from "./component-internal-
|
|
4
|
-
import { p as isPromiseLike } from "./lifecycle-batch-
|
|
3
|
+
import { m as getCurrentContextFrame, u as registerCommitOperationForInstance, x as withAsyncResourceContext } from "./component-internal-xW_OnTmC.js";
|
|
4
|
+
import { p as isPromiseLike } from "./lifecycle-batch-BYECQw8T.js";
|
|
5
5
|
import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
6
6
|
import { C as SSRDataMissingError, a as getResourceVerificationSnapshot, i as getNextRenderKey, n as getActiveRenderContext, o as isHydrationVerificationRender, p as throwSSRDataMissing, r as getCurrentRenderData, s as recordResourceVerificationSnapshot } from "./render-context-B7ohlh6t.js";
|
|
7
|
-
import { t as state } from "./state-
|
|
7
|
+
import { t as state } from "./state-Ks-sWTQi.js";
|
|
8
8
|
//#region src/runtime/resource-cell.ts
|
|
9
9
|
/**
|
|
10
10
|
* Pure, component-agnostic ResourceCell state machine.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as getSignal } from "../index-
|
|
2
|
-
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-
|
|
1
|
+
import { Z as getSignal } from "../index-B1p8bHZE.js";
|
|
2
|
+
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-DOmzl9Yu.js";
|
|
3
3
|
//#region src/runtime/resource-operation.d.ts
|
|
4
4
|
/** Reactive result of a {@link resource}: current value, loading state, and controls. */
|
|
5
5
|
interface ResourceResult<T> {
|
package/dist/resources/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane } from "../access-d_DCdwqn.js";
|
|
2
2
|
import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-4I3yEMkb.js";
|
|
3
|
-
import { a as registerCommitOperation } from "../component-internal-
|
|
4
|
-
import { t as resource } from "../resource-operation-
|
|
5
|
-
import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-
|
|
6
|
-
import { n as onRouteChange } from "../activity-
|
|
3
|
+
import { a as registerCommitOperation } from "../component-internal-xW_OnTmC.js";
|
|
4
|
+
import { t as resource } from "../resource-operation-4qFIM02d.js";
|
|
5
|
+
import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-DJk_5MrD.js";
|
|
6
|
+
import { n as onRouteChange } from "../activity-B2Yy7Wz9.js";
|
|
7
7
|
//#region src/runtime/stream-operation.ts
|
|
8
8
|
function toError(value) {
|
|
9
9
|
return value instanceof Error ? value : new Error(String(value));
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as AccessDecision, At as RouteRegistry, Ct as RouteParams, Dt as RouteRecord, Et as RouteQuery, Ft as RouteSearch, It as RouteSearchValue, Lt as RouteSnapshot, Mt as RouteRenderResult, Nt as RouteRequestOptions, Ot as RouteRef, Pt as RouteRequestResult, Q as AccessAllowDecision, St as RouteOptions, Tt as RoutePolicy, _t as RouteManifest, at as LayoutScopeRecord, bt as RouteMetaSource, ct as ParsedSegment, dt as RouteAuthResolver, et as AccessDenyDecision, ft as RouteComponent, gt as RouteHandler, ht as RouteDestination, it as GroupHelperOptions, jt as RouteRegistryOptions, kt as RouteRefSearch, lt as Route, mt as RouteDefinition, nt as AccessRedirectDecision, ot as PageHelperOptions, pt as RouteContext, rn as RenderableChild, rt as AccessRedirectStatus, st as PageScopeRecord, tt as AccessDenyStatus, ut as RouteAuthOptions, vt as RouteMatch, wt as RoutePathParams, xt as RouteMode, yt as RouteMeta } from "../index-
|
|
1
|
+
import { $ as AccessDecision, At as RouteRegistry, Ct as RouteParams, Dt as RouteRecord, Et as RouteQuery, Ft as RouteSearch, It as RouteSearchValue, Lt as RouteSnapshot, Mt as RouteRenderResult, Nt as RouteRequestOptions, Ot as RouteRef, Pt as RouteRequestResult, Q as AccessAllowDecision, St as RouteOptions, Tt as RoutePolicy, _t as RouteManifest, at as LayoutScopeRecord, bt as RouteMetaSource, ct as ParsedSegment, dt as RouteAuthResolver, et as AccessDenyDecision, ft as RouteComponent, gt as RouteHandler, ht as RouteDestination, it as GroupHelperOptions, jt as RouteRegistryOptions, kt as RouteRefSearch, lt as Route, mt as RouteDefinition, nt as AccessRedirectDecision, ot as PageHelperOptions, pt as RouteContext, rn as RenderableChild, rt as AccessRedirectStatus, st as PageScopeRecord, tt as AccessDenyStatus, ut as RouteAuthOptions, vt as RouteMatch, wt as RoutePathParams, xt as RouteMode, yt as RouteMeta } from "../index-B1p8bHZE.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../types-DkVJhVs9.js";
|
|
3
|
-
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-
|
|
4
|
-
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-
|
|
3
|
+
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-DUcj-nLs.js";
|
|
4
|
+
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-DOmzl9Yu.js";
|
|
5
5
|
import { AuthContext, AuthContext as AuthContext$1, AuthRequirement, AuthRequirement as AuthRequirement$1 } from "@askrjs/auth";
|
|
6
6
|
import { ObjectSchema } from "@askrjs/schema";
|
|
7
7
|
//#region src/router/route-query.d.ts
|