@askrjs/askr 0.0.74 → 0.0.75
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/{activity-D_JusbUh.js → activity-386uXmPJ.js} +2 -2
- package/dist/{activity-CaeDxh-g.d.ts → activity-DaqZEUPh.d.ts} +1 -1
- package/dist/{authoring-BuaA6z32.js → authoring-ycOVkX1-.js} +2 -2
- package/dist/benchmark.js +5 -5
- package/dist/boot/index.d.ts +3 -3
- package/dist/boot/index.js +1 -1
- package/dist/{boot-odrCNAW7.js → boot-eaBrci4W.js} +8 -8
- package/dist/{component-internal-CVJXftU8.js → component-internal-iJ7HAcpc.js} +79 -1
- 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-6ostFHp6.js → control-ByyOdVdr.js} +1 -1
- package/dist/{control-DO-iBEtV.d.ts → control-Uvq1GU4K.d.ts} +9 -5
- package/dist/{csp-nonce-BOMTshFI.js → csp-nonce-BLkoekFX.js} +1 -1
- package/dist/data/index.js +1 -1
- package/dist/{data-arZuagGA.js → data-E7oXei9c.js} +1 -1
- package/dist/{deferred-CY6G6VbE.js → deferred-iBBHEN5Z.js} +3 -3
- package/dist/{for-internal-yoY-ySBA.js → for-internal-tNicxJY3.js} +46 -7
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/{index-BHQmliBq.d.ts → index-CDACZEF2.d.ts} +1 -1
- package/dist/{index-5TeJ46BR.d.ts → index-CbRdEUPB.d.ts} +1 -1
- package/dist/{index-UmwPZ8ZN.d.ts → index-acX2RLxD.d.ts} +1 -1
- package/dist/{index-DSyleBRD.d.ts → index-vo_FDR-B.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/{lifecycle-operations-D53WevVq.js → lifecycle-operations-D2wzCYYh.js} +1 -1
- package/dist/{navigate-B09UPQbu.js → navigate-BwCpLrSM.js} +5 -5
- package/dist/{navigate-CPpT8BpL.d.ts → navigate-DlaVqF4n.d.ts} +1 -1
- package/dist/{renderer-DQQAeAgA.js → renderer-GFETYwZ6.js} +76 -51
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/{route-matching-BEyY9EcO.js → route-matching-Dmb_MKUb.js} +1 -1
- package/dist/router/index.d.ts +4 -4
- package/dist/router/index.js +5 -5
- package/dist/{router-wmx6Uher.d.ts → router-Dd-LoJmM.d.ts} +2 -2
- package/dist/ssg/index.d.ts +2 -2
- package/dist/ssg/index.js +3 -3
- package/dist/ssr/index.d.ts +2 -2
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-JMvxyMj6.js → ssr-CtumC_es.js} +12 -8
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +2 -2
- package/dist/{verify-hydration-wpmxVOyw.js → verify-hydration-GMsdoOUX.js} +1 -1
- package/package.json +1 -1
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-
|
|
1
|
+
import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-vo_FDR-B.js";
|
|
2
2
|
export { ActionDescriptor, ActionForm, ActionStatus, ActionValidationError, action, defineAction };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
1
|
+
import { a as registerCommitOperation } from "./component-internal-iJ7HAcpc.js";
|
|
2
2
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
3
3
|
import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
4
4
|
import { n as getActiveRenderContext } from "./render-context-Clw3rFiO.js";
|
|
5
|
-
import { c as deepFreeze, g as getActiveRoutes, l as makeQuery, n as computeMatchesFromRoutes, u as parseLocation } from "./route-matching-
|
|
5
|
+
import { c as deepFreeze, g as getActiveRoutes, l as makeQuery, n as computeMatchesFromRoutes, u as parseLocation } from "./route-matching-Dmb_MKUb.js";
|
|
6
6
|
import { n as syncRouteActivitySnapshot } from "./route-activity-CNJfpwx-.js";
|
|
7
7
|
//#region src/common/app-render-runtime.ts
|
|
8
8
|
const stagedRouteLocations = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
2
|
-
import { E as getExecutionModel, x as createRouteHandler } from "./deferred-
|
|
3
|
-
import { A as insertRecordSorted, C as getCurrentPathPrefix, I as computeRank, L as normalizeRouteSegmentName, M as pushRegistrationScope, O as hasActivePageScope, R as parseSegments, S as getCurrentPageScope, _ as getCurrentInheritedAuthRequirements, b as getCurrentLayoutChain, f as addRouteToStores, p as assertRouteRegistrationUnlocked, v as getCurrentInheritedMeta, w as getCurrentScopeKind, x as getCurrentPageChain, y as getCurrentInheritedPolicies } from "./route-matching-
|
|
2
|
+
import { E as getExecutionModel, x as createRouteHandler } from "./deferred-iBBHEN5Z.js";
|
|
3
|
+
import { A as insertRecordSorted, C as getCurrentPathPrefix, I as computeRank, L as normalizeRouteSegmentName, M as pushRegistrationScope, O as hasActivePageScope, R as parseSegments, S as getCurrentPageScope, _ as getCurrentInheritedAuthRequirements, b as getCurrentLayoutChain, f as addRouteToStores, p as assertRouteRegistrationUnlocked, v as getCurrentInheritedMeta, w as getCurrentScopeKind, x as getCurrentPageChain, y as getCurrentInheritedPolicies } from "./route-matching-Dmb_MKUb.js";
|
|
4
4
|
import { allOf } from "@askrjs/auth";
|
|
5
5
|
//#region src/router/access.ts
|
|
6
6
|
function compileNodePolicies(node) {
|
package/dist/benchmark.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as flushRuntimeScheduler } from "./access-ePqdQqkV.js";
|
|
2
|
-
import { t as installRendererBridge } from "./renderer-
|
|
2
|
+
import { t as installRendererBridge } from "./renderer-GFETYwZ6.js";
|
|
3
3
|
import { t as state } from "./state-rjmMPExl.js";
|
|
4
4
|
import { t as selector } from "./selector-BzPPLXny.js";
|
|
5
5
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
6
|
-
import { i as For } from "./control-
|
|
7
|
-
import { t as createIsland } from "./boot-
|
|
6
|
+
import { i as For } from "./control-ByyOdVdr.js";
|
|
7
|
+
import { t as createIsland } from "./boot-eaBrci4W.js";
|
|
8
8
|
//#region src/bench/components/benchmark-row.tsx
|
|
9
9
|
function BenchmarkRow({ item, isSelected, onSelect, onRemove }) {
|
|
10
10
|
return /* @__PURE__ */ jsxs("tr", {
|
|
@@ -63,8 +63,8 @@ function BenchmarkTable({ rows, isSelected, onSelect, onRemove }) {
|
|
|
63
63
|
installRendererBridge();
|
|
64
64
|
const benchmarkMetadata = {
|
|
65
65
|
packageName: "@askrjs/askr",
|
|
66
|
-
packageVersion: "0.0.
|
|
67
|
-
buildLabel: "0.0.
|
|
66
|
+
packageVersion: "0.0.75",
|
|
67
|
+
buildLabel: "0.0.75-local"
|
|
68
68
|
};
|
|
69
69
|
function getBenchmarkMetadata() {
|
|
70
70
|
return { ...benchmarkMetadata };
|
package/dist/boot/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as ComponentFunction } from "../control-
|
|
1
|
+
import { s as ComponentFunction } from "../control-Uvq1GU4K.js";
|
|
2
2
|
import { v as DataRuntime } from "../index-Bki2rqcr.js";
|
|
3
|
-
import { N as RouteRegistry, p as RouteAuthOptions } from "../router-
|
|
4
|
-
import { a as ScrollRestorationOptions } from "../navigate-
|
|
3
|
+
import { N as RouteRegistry, p as RouteAuthOptions } from "../router-Dd-LoJmM.js";
|
|
4
|
+
import { a as ScrollRestorationOptions } from "../navigate-DlaVqF4n.js";
|
|
5
5
|
//#region src/boot/types.d.ts
|
|
6
6
|
type IslandConfig = {
|
|
7
7
|
root: Element | string;
|
package/dist/boot/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-
|
|
1
|
+
import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-eaBrci4W.js";
|
|
2
2
|
export { cleanupApp, createIsland, createIslands, createSPA, hasApp, hydrateSPA };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
3
|
-
import { n as createComponentInstance, r as executeComponent } from "./component-internal-
|
|
3
|
+
import { n as createComponentInstance, r as executeComponent } from "./component-internal-iJ7HAcpc.js";
|
|
4
4
|
import { t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
5
5
|
import { p as isPromiseLike } from "./lifecycle-batch-CwHCDseR.js";
|
|
6
|
-
import { a as withIntrinsicHydrationAdoption, c as beginHydrationListenerTransaction, d as setStaticChildSlotsCacheEnabled, i as registerDeferredHydrationBoundary, l as commitHydrationListenerTransaction, n as activateHydrationBoundary$1, o as beginHydrationDirectListenerMode, r as clearDeferredHydrationBoundaries, s as endHydrationDirectListenerMode, t as installRendererBridge, u as discardHydrationListenerTransaction } from "./renderer-
|
|
6
|
+
import { a as withIntrinsicHydrationAdoption, c as beginHydrationListenerTransaction, d as setStaticChildSlotsCacheEnabled, i as registerDeferredHydrationBoundary, l as commitHydrationListenerTransaction, n as activateHydrationBoundary$1, o as beginHydrationDirectListenerMode, r as clearDeferredHydrationBoundaries, s as endHydrationDirectListenerMode, t as installRendererBridge, u as discardHydrationListenerTransaction } from "./renderer-GFETYwZ6.js";
|
|
7
7
|
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-e4Rn287s.js";
|
|
8
|
-
import { T as assertExecutionModel, c as _applyManifest, d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, o as reviveDeferredValue, p as hasRouteRenderData, v as pageRenderEnvelope } from "./deferred-
|
|
8
|
+
import { T as assertExecutionModel, c as _applyManifest, d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, o as reviveDeferredValue, p as hasRouteRenderData, v as pageRenderEnvelope } from "./deferred-iBBHEN5Z.js";
|
|
9
9
|
import { a as startHydrationRenderPhase, s as stopHydrationRenderPhase } from "./render-context-Clw3rFiO.js";
|
|
10
|
-
import { d as _setActiveRouteAuthOptions, j as lockRouteRegistration, k as hasRegisteredRoutes, m as clearRouteState } from "./route-matching-
|
|
10
|
+
import { d as _setActiveRouteAuthOptions, j as lockRouteRegistration, k as hasRegisteredRoutes, m as clearRouteState } from "./route-matching-Dmb_MKUb.js";
|
|
11
11
|
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-EKmTCMKp.js";
|
|
12
|
-
import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
12
|
+
import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-BLkoekFX.js";
|
|
13
13
|
import { i as getDefaultDataRuntime } from "./data-runtime-rpV6-3XW.js";
|
|
14
14
|
import { a as hydrateDataRuntime } from "./query-registry-Bu_cuMch.js";
|
|
15
|
-
import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-
|
|
16
|
-
import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-
|
|
15
|
+
import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-386uXmPJ.js";
|
|
16
|
+
import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-BwCpLrSM.js";
|
|
17
17
|
import "./ssr-CbQO5xd3.js";
|
|
18
18
|
//#region src/boot/hydration.ts
|
|
19
19
|
const DEFERRED_PAYLOAD = "__askr_deferred__";
|
|
@@ -585,7 +585,7 @@ async function hydrateSPA(config) {
|
|
|
585
585
|
cspNonce: config.cspNonce
|
|
586
586
|
}));
|
|
587
587
|
if (shouldVerifyHydrationMarkup(config)) {
|
|
588
|
-
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-
|
|
588
|
+
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-GMsdoOUX.js");
|
|
589
589
|
if (!verifyHydrationSyncForUrl({
|
|
590
590
|
root: rootElement,
|
|
591
591
|
url: currentUrl,
|
|
@@ -6,6 +6,26 @@ import { i as finalizeReadableSubscriptions } from "./readable-B3VIOfd7.js";
|
|
|
6
6
|
import { C as restoreRenderScopedComponent, S as restoreInlineRenderTracking, _ as getSignalForInstance, b as restoreDomCommitScope, c as enterDomCommitScope, f as getCurrentComponentInstance, l as enterRenderScopedComponent, m as getCurrentPortalScope, n as captureInlineComponentScope, o as clearRenderTracking, p as getCurrentInstance, r as captureInlineRenderTracking, s as enterComponentExecutionScope, t as beginRenderTracking, u as exitComponentExecutionScope, v as resetRenderState, x as restoreInlineComponentScope } from "./component-scope-DzJEbYGE.js";
|
|
7
7
|
import { a as enqueueLifecycleCommitForInstance, d as discardCommitOperations, f as executeCommittedLifecycleOperations, n as captureInlineRenderSnapshot$1, o as finalizeInlineReadSubscriptions, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-CwHCDseR.js";
|
|
8
8
|
//#region src/runtime/context.ts
|
|
9
|
+
/** @internal Compare immutable context snapshots by provider identity and value. */
|
|
10
|
+
function haveEquivalentContextFrames(left, right) {
|
|
11
|
+
let leftFrame = left;
|
|
12
|
+
let rightFrame = right;
|
|
13
|
+
while (true) {
|
|
14
|
+
while (leftFrame && !leftFrame.values?.size) leftFrame = leftFrame.parent;
|
|
15
|
+
while (rightFrame && !rightFrame.values?.size) rightFrame = rightFrame.parent;
|
|
16
|
+
if (leftFrame === rightFrame) return true;
|
|
17
|
+
if (!leftFrame || !rightFrame) return false;
|
|
18
|
+
const leftValues = leftFrame.values;
|
|
19
|
+
const rightValues = rightFrame.values;
|
|
20
|
+
if (leftValues?.size !== rightValues?.size) return false;
|
|
21
|
+
if (leftValues) {
|
|
22
|
+
if (!rightValues) return false;
|
|
23
|
+
for (const [key, value] of leftValues) if (!rightValues.has(key) || !Object.is(rightValues.get(key), value)) return false;
|
|
24
|
+
}
|
|
25
|
+
leftFrame = leftFrame.parent;
|
|
26
|
+
rightFrame = rightFrame.parent;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
9
29
|
const ROOT_EXECUTION_FRAME = {
|
|
10
30
|
parent: null,
|
|
11
31
|
values: null
|
|
@@ -81,6 +101,64 @@ function markVNodeTreeWithContextFrame(node, frame, overwrite = false) {
|
|
|
81
101
|
}
|
|
82
102
|
return node;
|
|
83
103
|
}
|
|
104
|
+
function isContextFrameDescendantOf(frame, ancestor) {
|
|
105
|
+
let current = frame;
|
|
106
|
+
while (current) {
|
|
107
|
+
if (current === ancestor) return true;
|
|
108
|
+
current = current.parent;
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
function rebaseContextFrame(frame, previousOwnerFrame, ownerFrame) {
|
|
113
|
+
if (isContextFrameDescendantOf(frame, ownerFrame)) return frame;
|
|
114
|
+
if (!previousOwnerFrame || !isContextFrameDescendantOf(frame, previousOwnerFrame)) return ownerFrame;
|
|
115
|
+
const nestedFrames = [];
|
|
116
|
+
let current = frame;
|
|
117
|
+
while (current && current !== previousOwnerFrame) {
|
|
118
|
+
nestedFrames.push(current);
|
|
119
|
+
current = current.parent;
|
|
120
|
+
}
|
|
121
|
+
let rebasedFrame = ownerFrame;
|
|
122
|
+
for (let index = nestedFrames.length - 1; index >= 0; index -= 1) {
|
|
123
|
+
const nestedFrame = nestedFrames[index];
|
|
124
|
+
rebasedFrame = {
|
|
125
|
+
parent: rebasedFrame,
|
|
126
|
+
values: nestedFrame.values ? new Map(nestedFrame.values) : null
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return rebasedFrame;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Stamp a child-scope result with its current owner while retaining frames
|
|
133
|
+
* introduced by providers nested beneath that owner. Frames from an unrelated
|
|
134
|
+
* or previous owner are rebased so reused vnodes cannot keep stale context.
|
|
135
|
+
*/
|
|
136
|
+
function rebaseVNodeTreeWithContextFrame(node, ownerFrame, previousOwnerFrame = null) {
|
|
137
|
+
if (!ownerFrame) return node;
|
|
138
|
+
if (Array.isArray(node)) {
|
|
139
|
+
for (const child of node) rebaseVNodeTreeWithContextFrame(child, ownerFrame, previousOwnerFrame);
|
|
140
|
+
return node;
|
|
141
|
+
}
|
|
142
|
+
if (typeof node !== "object" || node === null) return node;
|
|
143
|
+
const existingFrame = getVNodeContextFrame(node);
|
|
144
|
+
const inheritedFrame = existingFrame ? rebaseContextFrame(existingFrame, previousOwnerFrame, ownerFrame) : ownerFrame;
|
|
145
|
+
markVNodeWithContextFrame(node, inheritedFrame, true);
|
|
146
|
+
const inheritedPreviousFrame = existingFrame ?? previousOwnerFrame;
|
|
147
|
+
const objectNode = node;
|
|
148
|
+
const props = typeof objectNode.props === "object" && objectNode.props !== null ? objectNode.props : null;
|
|
149
|
+
const children = props?.children ?? objectNode.children;
|
|
150
|
+
if (Array.isArray(children)) for (const child of children) rebaseVNodeTreeWithContextFrame(child, inheritedFrame, inheritedPreviousFrame);
|
|
151
|
+
else if (children) rebaseVNodeTreeWithContextFrame(children, inheritedFrame, inheritedPreviousFrame);
|
|
152
|
+
if (props) {
|
|
153
|
+
for (const key in props) if (key !== "children") {
|
|
154
|
+
const value = props[key];
|
|
155
|
+
if (Array.isArray(value)) {
|
|
156
|
+
for (const item of value) if (isVNodeLike(item)) rebaseVNodeTreeWithContextFrame(item, inheritedFrame, inheritedPreviousFrame);
|
|
157
|
+
} else if (isVNodeLike(value)) rebaseVNodeTreeWithContextFrame(value, inheritedFrame, inheritedPreviousFrame);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return node;
|
|
161
|
+
}
|
|
84
162
|
let currentContextFrame = null;
|
|
85
163
|
let currentAsyncResourceFrame = null;
|
|
86
164
|
/**
|
|
@@ -615,4 +693,4 @@ function warnInstanceOnce(instance, key, message) {
|
|
|
615
693
|
logger.warn(message);
|
|
616
694
|
}
|
|
617
695
|
//#endregion
|
|
618
|
-
export {
|
|
696
|
+
export { rebaseVNodeTreeWithContextFrame as _, registerCommitOperation as a, registerCommitOperationForInstance as c, getCurrentContextFrame as d, getExecutionContextFrame as f, readScope as g, markVNodeTreeWithContextFrame as h, mountInstanceInline as i, callWithContext as l, haveEquivalentContextFrames as m, createComponentInstance as n, renderComponentInline as o, getVNodeContextFrame as p, executeComponent as r, renderScopedComponent as s, captureInlineRenderSnapshot as t, defineScope as u, withAsyncResourceContext as v, withContext as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as VNode } from "../control-
|
|
1
|
+
import { l as VNode } from "../control-Uvq1GU4K.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../jsx-Dvr2SGRG.js";
|
|
3
3
|
//#region src/common/error-boundary.d.ts
|
|
4
4
|
type ErrorBoundaryContent = VNode | readonly VNode[];
|
package/dist/control/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-acX2RLxD.js";
|
|
2
2
|
export { Case, type CaseProps, For, type ForProps, Match, type MatchProps, Show, type ShowProps };
|
package/dist/control/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as For, n as Match, r as Show, t as Case } from "../control-
|
|
1
|
+
import { i as For, n as Match, r as Show, t as Case } from "../control-ByyOdVdr.js";
|
|
2
2
|
export { Case, For, Match, Show };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as markEagerControlPrimitive, t as __CONTROL_BOUNDARY__ } from "./control-DhFRTIoE.js";
|
|
2
2
|
import { b as isDevelopmentEnvironment } from "./access-ePqdQqkV.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-CUpRxrLH.js";
|
|
4
|
-
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-
|
|
4
|
+
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-tNicxJY3.js";
|
|
5
5
|
import { t as createFineGrainedEffect } from "./effect-2IIWvUjG.js";
|
|
6
6
|
import { t as state } from "./state-rjmMPExl.js";
|
|
7
7
|
//#region src/control/shared.ts
|
|
@@ -254,6 +254,7 @@ interface ChildScopeTransactionSnapshot {
|
|
|
254
254
|
needsDomUpdate: boolean;
|
|
255
255
|
hydrationPending: boolean;
|
|
256
256
|
renderFn: (() => VNode) | undefined;
|
|
257
|
+
renderedOwnerFrame: ContextFrame | null;
|
|
257
258
|
}
|
|
258
259
|
//#endregion
|
|
259
260
|
//#region src/runtime/for-signals.d.ts
|
|
@@ -297,7 +298,7 @@ interface FineGrainedEffectHandle<T> {
|
|
|
297
298
|
}
|
|
298
299
|
//#endregion
|
|
299
300
|
//#region src/runtime/for-types.d.ts
|
|
300
|
-
type ForEachSource<T> = T[] | (() => T[]);
|
|
301
|
+
type ForEachSource<T> = readonly T[] | (() => readonly T[]);
|
|
301
302
|
type ForKeySelector<T> = (item: T, index: number) => string | number;
|
|
302
303
|
type ForRenderItem<T> = (item: T, index: () => number) => VNode;
|
|
303
304
|
//#endregion
|
|
@@ -305,8 +306,10 @@ type ForRenderItem<T> = (item: T, index: () => number) => VNode;
|
|
|
305
306
|
type ForCommitStrategy = 'APPEND' | 'INSERT_ONE' | 'REMOVE_ONE' | 'TRUNCATE' | 'NO_REORDER' | 'SWAP' | 'FULL_KEYED';
|
|
306
307
|
interface ForState<T> {
|
|
307
308
|
kind: 'for';
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
_contextFrame: ContextFrame | null;
|
|
310
|
+
_contextFrameChanged: boolean;
|
|
311
|
+
currentItems: readonly T[];
|
|
312
|
+
_committedItems: readonly T[];
|
|
310
313
|
eachSource: ForEachSource<T>;
|
|
311
314
|
fallback: VNode | null;
|
|
312
315
|
fallbackScope: ChildScope | null;
|
|
@@ -328,7 +331,7 @@ interface ForState<T> {
|
|
|
328
331
|
pendingAppendStart: number | null;
|
|
329
332
|
_hasResolvedItemDom: boolean;
|
|
330
333
|
_needsSourceReconcile: boolean;
|
|
331
|
-
_sourceEffect: FineGrainedEffectHandle<T[]> | null;
|
|
334
|
+
_sourceEffect: FineGrainedEffectHandle<readonly T[]> | null;
|
|
332
335
|
_suspendSourceCommit: boolean;
|
|
333
336
|
_enqueueBoundaryCommit?: (() => void) | null;
|
|
334
337
|
_hasPendingBoundaryCommit?: boolean;
|
|
@@ -353,7 +356,7 @@ interface ForItemTransactionSnapshot<T> {
|
|
|
353
356
|
}
|
|
354
357
|
interface ForTransaction<T> {
|
|
355
358
|
collectionSnapshotMode: 'copy' | 'reset-empty' | 'preserve-clear' | 'reuse';
|
|
356
|
-
currentItems: T[];
|
|
359
|
+
currentItems: readonly T[];
|
|
357
360
|
items: Map<string | number, ForItemInstance<T>>;
|
|
358
361
|
orderedKeys: Array<string | number>;
|
|
359
362
|
orderedItems: ForItemInstance<T>[];
|
|
@@ -393,6 +396,7 @@ interface MatchBranch {
|
|
|
393
396
|
when: unknown;
|
|
394
397
|
}
|
|
395
398
|
interface BranchControlStateBase {
|
|
399
|
+
_contextFrame: ContextFrame | null;
|
|
396
400
|
activeKey: string | number | null;
|
|
397
401
|
activeScope: ChildScope | null;
|
|
398
402
|
activeVNodes: VNode[];
|
package/dist/data/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-rpV6-3XW.js";
|
|
2
|
-
import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-
|
|
2
|
+
import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-E7oXei9c.js";
|
|
3
3
|
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery, t as createQueryPrefetchContext } from "../query-registry-Bu_cuMch.js";
|
|
4
4
|
export { createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
|
|
@@ -2,7 +2,7 @@ import { n as enqueueRuntimeTask, v as logger } from "./access-ePqdQqkV.js";
|
|
|
2
2
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
3
3
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
4
4
|
import { n as getActiveRenderContext } from "./render-context-Clw3rFiO.js";
|
|
5
|
-
import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-
|
|
5
|
+
import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-D2wzCYYh.js";
|
|
6
6
|
import { a as getMutationSlotStore, c as resolveDataRuntimeState, i as getDefaultDataRuntime, n as ensureMutationCleanup, o as getQuerySlotStore, r as ensureQueryCleanup, s as invalidateQueriesForRuntime } from "./data-runtime-rpV6-3XW.js";
|
|
7
7
|
//#region src/data/query-key.ts
|
|
8
8
|
function serializeQueryKeyNumber(part) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
2
|
-
import {
|
|
2
|
+
import { g as readScope, u as defineScope } from "./component-internal-iJ7HAcpc.js";
|
|
3
3
|
import { d as getCurrentAppRenderRuntime } from "./component-scope-DzJEbYGE.js";
|
|
4
4
|
import { p as isPromiseLike } from "./lifecycle-batch-CwHCDseR.js";
|
|
5
5
|
import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-Clw3rFiO.js";
|
|
6
|
-
import { A as insertRecordSorted, D as getRouteRecords, E as getRouteList, F as snapshotRouteState, N as restoreRouteState, P as setDefaultRouteAuthOptions, T as getDefaultRouteAuthOptions, f as addRouteToStores, h as getActiveRouteAuthOptions, i as getMatchingRouteRecord, m as clearRouteState, o as buildRouteContext, s as buildRouteContextBase, z as resource } from "./route-matching-
|
|
7
|
-
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
6
|
+
import { A as insertRecordSorted, D as getRouteRecords, E as getRouteList, F as snapshotRouteState, N as restoreRouteState, P as setDefaultRouteAuthOptions, T as getDefaultRouteAuthOptions, f as addRouteToStores, h as getActiveRouteAuthOptions, i as getMatchingRouteRecord, m as clearRouteState, o as buildRouteContext, s as buildRouteContextBase, z as resource } from "./route-matching-Dmb_MKUb.js";
|
|
7
|
+
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-BLkoekFX.js";
|
|
8
8
|
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-Bu_cuMch.js";
|
|
9
9
|
//#region src/runtime/execution-model.ts
|
|
10
10
|
const EXECUTION_MODEL_KEY = Symbol.for("__ASKR_EXECUTION_MODEL__");
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { n as createComponentInstance, s as renderScopedComponent } from "./component-internal-
|
|
3
|
+
import { _ as rebaseVNodeTreeWithContextFrame, m as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-iJ7HAcpc.js";
|
|
4
4
|
import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
5
5
|
import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
6
6
|
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
@@ -35,6 +35,7 @@ var ChildScopeImpl = class {
|
|
|
35
35
|
this.blueprintOwner = void 0;
|
|
36
36
|
this._renderFn = void 0;
|
|
37
37
|
this._disposed = false;
|
|
38
|
+
this._renderedOwnerFrame = null;
|
|
38
39
|
this.key = key;
|
|
39
40
|
this._parent = parent;
|
|
40
41
|
this._onDirty = onDirty;
|
|
@@ -84,10 +85,11 @@ function renderScope(scope) {
|
|
|
84
85
|
const { componentInstance } = scope;
|
|
85
86
|
const previousVNode = scope.vnode;
|
|
86
87
|
try {
|
|
87
|
-
const nextVNode = renderScopedComponent(componentInstance, scope._startStateIndex, scope._renderFn);
|
|
88
|
+
const nextVNode = rebaseVNodeTreeWithContextFrame(renderScopedComponent(componentInstance, scope._startStateIndex, scope._renderFn), componentInstance.ownerFrame, scope._renderedOwnerFrame);
|
|
88
89
|
if (previousVNode && nextVNode && _isDOMElement(previousVNode) && _isDOMElement(nextVNode) && typeof previousVNode.type === "function" && previousVNode.type === nextVNode.type && "__instance" in previousVNode && !("__instance" in nextVNode)) nextVNode.__instance = previousVNode.__instance;
|
|
89
90
|
scope.previousVnode = previousVNode;
|
|
90
91
|
scope.vnode = nextVNode;
|
|
92
|
+
scope._renderedOwnerFrame = componentInstance.ownerFrame;
|
|
91
93
|
scope.markDirty();
|
|
92
94
|
if ((componentInstance._pendingReadSources?.size ?? 0) > 0) ensureChildScopeFlushTask(scope);
|
|
93
95
|
finalizeInlineReadSubscriptions(componentInstance, componentInstance._currentRenderToken, componentInstance._pendingReadSources, componentInstance._pendingReadSourceVersions);
|
|
@@ -112,7 +114,8 @@ function captureChildScopeTransactionSnapshot(scope) {
|
|
|
112
114
|
domTextData: scope.dom?.nodeType === 3 ? scope.dom.data : void 0,
|
|
113
115
|
needsDomUpdate: scope.needsDomUpdate,
|
|
114
116
|
hydrationPending: scope.hydrationPending,
|
|
115
|
-
renderFn: mutableScope._renderFn
|
|
117
|
+
renderFn: mutableScope._renderFn,
|
|
118
|
+
renderedOwnerFrame: mutableScope._renderedOwnerFrame
|
|
116
119
|
};
|
|
117
120
|
}
|
|
118
121
|
/** @internal */
|
|
@@ -126,6 +129,7 @@ function restoreChildScopeTransactionSnapshot(scope, snapshot) {
|
|
|
126
129
|
scope.needsDomUpdate = snapshot.needsDomUpdate;
|
|
127
130
|
scope.hydrationPending = snapshot.hydrationPending;
|
|
128
131
|
mutableScope._renderFn = snapshot.renderFn;
|
|
132
|
+
mutableScope._renderedOwnerFrame = snapshot.renderedOwnerFrame;
|
|
129
133
|
}
|
|
130
134
|
function disposeChildScope(scope) {
|
|
131
135
|
scope.dispose();
|
|
@@ -135,6 +139,24 @@ function createChildScope(parent, key, onDirty, ownership) {
|
|
|
135
139
|
}
|
|
136
140
|
//#endregion
|
|
137
141
|
//#region src/runtime/control.ts
|
|
142
|
+
function setScopeContextFrame(scope, frame) {
|
|
143
|
+
if (scope) scope.componentInstance.ownerFrame = frame;
|
|
144
|
+
}
|
|
145
|
+
function setControlBoundaryContextFrame(controlState, frame) {
|
|
146
|
+
const previousFrame = controlState._contextFrame;
|
|
147
|
+
controlState._contextFrame = frame;
|
|
148
|
+
if (controlState.kind === "for") {
|
|
149
|
+
controlState._contextFrameChanged ||= previousFrame !== null && !haveEquivalentContextFrames(previousFrame, frame);
|
|
150
|
+
setScopeContextFrame(controlState.fallbackScope, frame);
|
|
151
|
+
for (const item of controlState.items.values()) setScopeContextFrame(item.scope, frame);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
setScopeContextFrame(controlState.activeScope, frame);
|
|
155
|
+
if (controlState.kind === "show") {
|
|
156
|
+
setScopeContextFrame(controlState.truthyScope, frame);
|
|
157
|
+
setScopeContextFrame(controlState.fallbackScope, frame);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
138
160
|
const SHOW_TRUTHY_KEY = "__show-truthy__";
|
|
139
161
|
const SHOW_FALLBACK_KEY = "__show-fallback__";
|
|
140
162
|
const CASE_FALLBACK_KEY = "__case-fallback__";
|
|
@@ -228,17 +250,20 @@ function finishImmediateControlTransaction(state, transaction) {
|
|
|
228
250
|
if (state._transaction === transaction && !transaction.registered) commitControlTransaction(state, transaction);
|
|
229
251
|
}
|
|
230
252
|
function createBranchScope(state, key) {
|
|
231
|
-
|
|
253
|
+
const scope = createChildScope(state.parentInstance, key, () => {
|
|
232
254
|
if (state._enqueueBoundaryCommit) {
|
|
233
255
|
state._enqueueBoundaryCommit();
|
|
234
256
|
return;
|
|
235
257
|
}
|
|
236
258
|
state.parentInstance?._enqueueRun?.();
|
|
237
259
|
});
|
|
260
|
+
if (state._contextFrame) scope.componentInstance.ownerFrame = state._contextFrame;
|
|
261
|
+
return scope;
|
|
238
262
|
}
|
|
239
263
|
function createShowState(value, renderTruthy, renderFallback) {
|
|
240
264
|
return {
|
|
241
265
|
kind: "show",
|
|
266
|
+
_contextFrame: null,
|
|
242
267
|
activeKey: null,
|
|
243
268
|
activeScope: null,
|
|
244
269
|
activeVNodes: [],
|
|
@@ -313,6 +338,7 @@ function clearShowDomUpdateState(state) {
|
|
|
313
338
|
function createCaseState(matches, fallback) {
|
|
314
339
|
return {
|
|
315
340
|
kind: "case",
|
|
341
|
+
_contextFrame: null,
|
|
316
342
|
activeKey: null,
|
|
317
343
|
activeScope: null,
|
|
318
344
|
activeVNodes: [],
|
|
@@ -607,7 +633,9 @@ function enqueueForBoundaryScopeCommit() {
|
|
|
607
633
|
enqueueForScopeUpdate(forState.parentInstance);
|
|
608
634
|
}
|
|
609
635
|
function createForOwnedChildScope(forState, key) {
|
|
610
|
-
|
|
636
|
+
const scope = createChildScope(forState.parentInstance, key, enqueueForBoundaryScopeCommit, forState._scopeOwnership);
|
|
637
|
+
if (forState._contextFrame) scope.componentInstance.ownerFrame = forState._contextFrame;
|
|
638
|
+
return scope;
|
|
611
639
|
}
|
|
612
640
|
function captureForItemTransactionSnapshot(forState, itemInstance) {
|
|
613
641
|
const transaction = forState._transaction;
|
|
@@ -750,6 +778,12 @@ function createItemInstance(key, item, index, forState) {
|
|
|
750
778
|
function rerenderItemInstance(forState, itemInstance, item) {
|
|
751
779
|
renderItemScope(forState, itemInstance.scope, item, itemInstance.indexSignal, itemInstance.key);
|
|
752
780
|
}
|
|
781
|
+
function refreshForContextScopes(forState) {
|
|
782
|
+
for (const itemInstance of forState.items.values()) {
|
|
783
|
+
captureForItemTransactionSnapshot(forState, itemInstance);
|
|
784
|
+
rerenderItemInstance(forState, itemInstance, itemInstance.reactiveItem);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
753
787
|
function updateItemInstance(forState, itemInstance, item) {
|
|
754
788
|
if (itemInstance.item === item) return false;
|
|
755
789
|
captureForItemTransactionSnapshot(forState, itemInstance);
|
|
@@ -1289,6 +1323,8 @@ function createForState(eachSource, byFn, renderFn, fallback) {
|
|
|
1289
1323
|
});
|
|
1290
1324
|
return {
|
|
1291
1325
|
kind: "for",
|
|
1326
|
+
_contextFrame: null,
|
|
1327
|
+
_contextFrameChanged: false,
|
|
1292
1328
|
currentItems: [],
|
|
1293
1329
|
_committedItems: [],
|
|
1294
1330
|
eachSource,
|
|
@@ -1349,7 +1385,10 @@ function evaluateForState(forState) {
|
|
|
1349
1385
|
beginForStateTransaction(forState);
|
|
1350
1386
|
forState._needsSourceReconcile = false;
|
|
1351
1387
|
try {
|
|
1352
|
-
|
|
1388
|
+
if (forState._contextFrameChanged) refreshForContextScopes(forState);
|
|
1389
|
+
const result = reconcileForItems(forState, forState.currentItems);
|
|
1390
|
+
forState._contextFrameChanged = false;
|
|
1391
|
+
return result;
|
|
1353
1392
|
} catch (error) {
|
|
1354
1393
|
rollbackForStateTransaction(forState);
|
|
1355
1394
|
throw error;
|
|
@@ -1561,4 +1600,4 @@ function clearForDomUpdateState(forState) {
|
|
|
1561
1600
|
forState._hasResolvedItemDom = forState.orderedKeys.length > 0;
|
|
1562
1601
|
}
|
|
1563
1602
|
//#endregion
|
|
1564
|
-
export {
|
|
1603
|
+
export { setControlBoundaryContextFrame as _, registerForStateTransaction as a, rerenderChildScope as b, captureForFallbackTransactionSnapshot as c, clearCaseDomUpdateState as d, clearShowDomUpdateState as f, evaluateShowState as g, evaluateCaseState as h, evaluateForState as i, captureForItemTransactionSnapshot as l, createShowState as m, clearForDomUpdateState as n, rollbackForStateTransaction as o, createCaseState as p, commitForStateTransaction as r, useForState as s, beginForStateTransaction as t, recordBenchEvent as u, createChildScope as v, disposeChildScope as y };
|
|
@@ -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-CbRdEUPB.js";
|
|
3
3
|
export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as State } from "../../control-
|
|
1
|
+
import { m as State } from "../../control-Uvq1GU4K.js";
|
|
2
2
|
//#region src/foundations/state/controllable.d.ts
|
|
3
3
|
declare function isControlled<T>(value: T | undefined): value is T;
|
|
4
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-CbRdEUPB.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,4 +1,4 @@
|
|
|
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-Uvq1GU4K.js";
|
|
2
2
|
import { t as Scheduler } from "./scheduler-CmLO4Dfm.js";
|
|
3
3
|
import "./jsx-runtime-C-oIHX9X.js";
|
|
4
4
|
//#region src/runtime/component-scope.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
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-Uvq1GU4K.js";
|
|
2
2
|
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
3
|
//#region src/control/shared.d.ts
|
|
4
4
|
type BoundaryChild = RenderableChild;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as RenderableChild, g as StateTuple } from "./control-
|
|
1
|
+
import { c as RenderableChild, g as StateTuple } from "./control-Uvq1GU4K.js";
|
|
2
2
|
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
|
-
import "./index-
|
|
3
|
+
import "./index-CDACZEF2.js";
|
|
4
4
|
import { ObjectSchema } from "@askrjs/schema";
|
|
5
5
|
//#region src/actions/index.d.ts
|
|
6
6
|
interface ActionDescriptor<TInput extends Record<string, unknown> = Record<string, unknown>> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-Uvq1GU4K.js";
|
|
2
2
|
import { s as Props, t as Fragment } from "./jsx-Dvr2SGRG.js";
|
|
3
|
-
import { a as Selector, c as derive, d as RuntimeKeyedReorderDecision, f as RuntimeRendererHost, h as getSignal, i as cspNonce, l as AskrRuntime, m as getDefaultRuntime, n as createRef, o as selector, p as createRuntime, r as CspNonceScope, s as Derived, t as Ref, u as AskrRuntimeOptions } from "./index-
|
|
4
|
-
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-
|
|
3
|
+
import { a as Selector, c as derive, d as RuntimeKeyedReorderDecision, f as RuntimeRendererHost, h as getSignal, i as cspNonce, l as AskrRuntime, m as getDefaultRuntime, n as createRef, o as selector, p as createRuntime, r as CspNonceScope, s as Derived, t as Ref, u as AskrRuntimeOptions } from "./index-CDACZEF2.js";
|
|
4
|
+
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-acX2RLxD.js";
|
|
5
5
|
import { i as jsxs, n as jsx } from "./jsx-runtime-Cr1jspx9.js";
|
|
6
6
|
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";
|
|
7
7
|
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 RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, createQuery, createRef, 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
2
|
import { n as Fragment } from "./jsx-CUpRxrLH.js";
|
|
3
|
-
import {
|
|
3
|
+
import { g as readScope, u as defineScope } from "./component-internal-iJ7HAcpc.js";
|
|
4
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-B3VIOfd7.js";
|
|
5
5
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
|
-
import { t as installRendererBridge } from "./renderer-
|
|
7
|
+
import { t as installRendererBridge } from "./renderer-GFETYwZ6.js";
|
|
8
8
|
import { t as state } from "./state-rjmMPExl.js";
|
|
9
9
|
import { t as selector } from "./selector-BzPPLXny.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-BLkoekFX.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-ByyOdVdr.js";
|
|
13
|
+
import { t as createQuery } from "./data-E7oXei9c.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-Bu_cuMch.js";
|
|
15
15
|
//#region src/runtime/derive.ts
|
|
16
16
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
1
|
+
import { a as registerCommitOperation } from "./component-internal-iJ7HAcpc.js";
|
|
2
2
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
3
3
|
import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
|
|
4
4
|
//#region src/runtime/lifecycle-operations.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
3
|
-
import { r as executeComponent } from "./component-internal-
|
|
3
|
+
import { r as executeComponent } from "./component-internal-iJ7HAcpc.js";
|
|
4
4
|
import { t as cleanupReadableSubscriptionSources } from "./readable-B3VIOfd7.js";
|
|
5
5
|
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
6
6
|
import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-CwHCDseR.js";
|
|
7
7
|
import { _ as teardownNodeSubtree } from "./cleanup-e4Rn287s.js";
|
|
8
|
-
import { d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, p as hasRouteRenderData } from "./deferred-
|
|
9
|
-
import { j as lockRouteRegistration, r as computeRouteActivityMatches } from "./route-matching-
|
|
8
|
+
import { d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, p as hasRouteRenderData } from "./deferred-iBBHEN5Z.js";
|
|
9
|
+
import { j as lockRouteRegistration, r as computeRouteActivityMatches } from "./route-matching-Dmb_MKUb.js";
|
|
10
10
|
import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-EKmTCMKp.js";
|
|
11
|
-
import { t as CspNonceScope } from "./csp-nonce-
|
|
12
|
-
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-
|
|
11
|
+
import { t as CspNonceScope } from "./csp-nonce-BLkoekFX.js";
|
|
12
|
+
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-386uXmPJ.js";
|
|
13
13
|
//#region src/router/navigation-registry.ts
|
|
14
14
|
let currentInstance = null;
|
|
15
15
|
let currentPathname = "/";
|
|
@@ -3,15 +3,15 @@ import { n as _isDOMElement, t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js
|
|
|
3
3
|
import { b as isDevelopmentEnvironment, c as runRuntimeHandlerScope, f as configureRuntimeRenderer, i as getDefaultRuntimeInstance, n as enqueueRuntimeTask, v as logger, y as getRuntimeEnv } from "./access-ePqdQqkV.js";
|
|
4
4
|
import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-BbexfvHo.js";
|
|
5
5
|
import { n as Fragment, r as STATIC_CHILDREN } from "./jsx-CUpRxrLH.js";
|
|
6
|
-
import {
|
|
6
|
+
import { d as getCurrentContextFrame, h as markVNodeTreeWithContextFrame, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as getVNodeContextFrame, t as captureInlineRenderSnapshot, y as withContext } from "./component-internal-iJ7HAcpc.js";
|
|
7
7
|
import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
8
8
|
import { t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
9
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-CwHCDseR.js";
|
|
10
|
-
import { _ as
|
|
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-tNicxJY3.js";
|
|
11
11
|
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-2IIWvUjG.js";
|
|
12
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-e4Rn287s.js";
|
|
13
13
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
14
|
-
import { a as isSafeHref, i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
14
|
+
import { a as isSafeHref, i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-BLkoekFX.js";
|
|
15
15
|
//#region src/runtime/error-boundary.ts
|
|
16
16
|
function createBoundaryReset(instance) {
|
|
17
17
|
return () => {
|
|
@@ -1054,6 +1054,24 @@ function findRangeEnd(start) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
return null;
|
|
1056
1056
|
}
|
|
1057
|
+
function findRangeAtNode(node) {
|
|
1058
|
+
const owner = getRangeOwner(node);
|
|
1059
|
+
if (owner) return getOwnedRange(owner) ?? null;
|
|
1060
|
+
for (let current = node; current; current = current.previousSibling) {
|
|
1061
|
+
if (!isRangeStart(current)) continue;
|
|
1062
|
+
const end = findRangeEnd(current);
|
|
1063
|
+
if (end && rangeContains({
|
|
1064
|
+
start: current,
|
|
1065
|
+
end,
|
|
1066
|
+
single: false
|
|
1067
|
+
}, node)) return {
|
|
1068
|
+
start: current,
|
|
1069
|
+
end,
|
|
1070
|
+
single: false
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
return null;
|
|
1074
|
+
}
|
|
1057
1075
|
//#endregion
|
|
1058
1076
|
//#region src/renderer/namespaces.ts
|
|
1059
1077
|
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
@@ -1537,6 +1555,53 @@ function getRendererDOMHost() {
|
|
|
1537
1555
|
return rendererDOMHost;
|
|
1538
1556
|
}
|
|
1539
1557
|
//#endregion
|
|
1558
|
+
//#region src/renderer/boundary-state.ts
|
|
1559
|
+
function evaluateControlBoundaryState(controlState) {
|
|
1560
|
+
if (controlState.kind === "for") return evaluateForState(controlState);
|
|
1561
|
+
if (controlState.kind === "show") return evaluateShowState(controlState);
|
|
1562
|
+
return evaluateCaseState(controlState);
|
|
1563
|
+
}
|
|
1564
|
+
function clearControlBoundaryDomUpdateState(controlState) {
|
|
1565
|
+
if (controlState.kind === "for") {
|
|
1566
|
+
clearForDomUpdateState(controlState);
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
if (controlState.kind === "show") {
|
|
1570
|
+
clearShowDomUpdateState(controlState);
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1573
|
+
clearCaseDomUpdateState(controlState);
|
|
1574
|
+
}
|
|
1575
|
+
function getControlBoundaryState(node) {
|
|
1576
|
+
const controlState = node._controlState ?? null;
|
|
1577
|
+
const frame = getVNodeContextFrame(node);
|
|
1578
|
+
if (controlState && frame) setControlBoundaryContextFrame(controlState, frame);
|
|
1579
|
+
return controlState;
|
|
1580
|
+
}
|
|
1581
|
+
function getDirectControlBoundaryVNode(children) {
|
|
1582
|
+
if (!Array.isArray(children) && _isDOMElement(children) && children.type === __CONTROL_BOUNDARY__) return children;
|
|
1583
|
+
if (Array.isArray(children) && children.length === 1 && _isDOMElement(children[0]) && children[0].type === __CONTROL_BOUNDARY__) return children[0];
|
|
1584
|
+
return null;
|
|
1585
|
+
}
|
|
1586
|
+
function getControlBoundaryCommitChildren(controlState) {
|
|
1587
|
+
if (controlState.kind === "for" && controlState._needsSourceReconcile) return evaluateForState(controlState);
|
|
1588
|
+
if (controlState.kind !== "for") {
|
|
1589
|
+
const activeVNode = controlState.activeScope?.vnode;
|
|
1590
|
+
return activeVNode == null || activeVNode === false ? [] : [activeVNode];
|
|
1591
|
+
}
|
|
1592
|
+
if (controlState.orderedKeys.length === 0) {
|
|
1593
|
+
const fallbackVNode = controlState.fallbackScope?.vnode;
|
|
1594
|
+
return fallbackVNode == null || fallbackVNode === false ? [] : [fallbackVNode];
|
|
1595
|
+
}
|
|
1596
|
+
const childrenVNodes = [];
|
|
1597
|
+
for (let index = 0; index < controlState.orderedKeys.length; index += 1) {
|
|
1598
|
+
const itemKey = controlState.orderedKeys[index];
|
|
1599
|
+
const itemInstance = controlState.items.get(itemKey);
|
|
1600
|
+
childrenVNodes.push(itemInstance?.scope.vnode ?? null);
|
|
1601
|
+
}
|
|
1602
|
+
return childrenVNodes;
|
|
1603
|
+
}
|
|
1604
|
+
//#endregion
|
|
1540
1605
|
//#region src/renderer/reconcile-resolution.ts
|
|
1541
1606
|
function createOldElResolver(parent, oldKeyMap, usedOldEls) {
|
|
1542
1607
|
return (k) => {
|
|
@@ -1657,7 +1722,7 @@ function isControlBoundaryVNode$1(child) {
|
|
|
1657
1722
|
}
|
|
1658
1723
|
function prepareControlBoundaryResolution(child) {
|
|
1659
1724
|
if (!isControlBoundaryVNode$1(child)) return null;
|
|
1660
|
-
const controlState = child
|
|
1725
|
+
const controlState = getControlBoundaryState(child);
|
|
1661
1726
|
if (!controlState) return null;
|
|
1662
1727
|
if (controlState.kind === "for") {
|
|
1663
1728
|
const childrenVNodes = evaluateControlBoundaryChildren(controlState);
|
|
@@ -1739,7 +1804,11 @@ function performFullReconciliation(parent, newChildren, oldKeyMap) {
|
|
|
1739
1804
|
for (let i = 0; i < newChildren.length; i++) {
|
|
1740
1805
|
const child = newChildren[i];
|
|
1741
1806
|
const node = reconcileSingleChild(child, i, parent, resolveOldElOnce, resolveUnkeyedOnce, usedOldEls, newKeyMap);
|
|
1742
|
-
if (node)
|
|
1807
|
+
if (node) {
|
|
1808
|
+
const range = findRangeAtNode(node);
|
|
1809
|
+
if (range && !range.single && range.start === node) finalNodes.push(range.start, ...getRangeNodes(range), range.end);
|
|
1810
|
+
else finalNodes.push(node);
|
|
1811
|
+
}
|
|
1743
1812
|
}
|
|
1744
1813
|
if (typeof document === "undefined") return newKeyMap;
|
|
1745
1814
|
commitReconciliation(parent, finalNodes);
|
|
@@ -3703,9 +3772,9 @@ function reconcileUnkeyed(parent, children) {
|
|
|
3703
3772
|
keyedElements.delete(parent);
|
|
3704
3773
|
}
|
|
3705
3774
|
function updateForBoundaryChildren(element, forVnode) {
|
|
3706
|
-
const controlState = forVnode
|
|
3775
|
+
const controlState = getControlBoundaryState(forVnode);
|
|
3707
3776
|
if (!controlState) return;
|
|
3708
|
-
commitForBoundaryChildren(element, controlState,
|
|
3777
|
+
commitForBoundaryChildren(element, controlState, evaluateControlBoundaryState(controlState));
|
|
3709
3778
|
}
|
|
3710
3779
|
function updateElementChildren(element, vnodeChildren, cleanupRangeNode) {
|
|
3711
3780
|
const domHost = getRendererDOMHost();
|
|
@@ -4489,50 +4558,6 @@ function syncControlBoundaryInMixedParent(parent, controlState, childrenVNodes,
|
|
|
4489
4558
|
return nextRange ? [nextRange] : [];
|
|
4490
4559
|
}
|
|
4491
4560
|
//#endregion
|
|
4492
|
-
//#region src/renderer/boundary-state.ts
|
|
4493
|
-
function evaluateControlBoundaryState(controlState) {
|
|
4494
|
-
if (controlState.kind === "for") return evaluateForState(controlState);
|
|
4495
|
-
if (controlState.kind === "show") return evaluateShowState(controlState);
|
|
4496
|
-
return evaluateCaseState(controlState);
|
|
4497
|
-
}
|
|
4498
|
-
function clearControlBoundaryDomUpdateState(controlState) {
|
|
4499
|
-
if (controlState.kind === "for") {
|
|
4500
|
-
clearForDomUpdateState(controlState);
|
|
4501
|
-
return;
|
|
4502
|
-
}
|
|
4503
|
-
if (controlState.kind === "show") {
|
|
4504
|
-
clearShowDomUpdateState(controlState);
|
|
4505
|
-
return;
|
|
4506
|
-
}
|
|
4507
|
-
clearCaseDomUpdateState(controlState);
|
|
4508
|
-
}
|
|
4509
|
-
function getControlBoundaryState(node) {
|
|
4510
|
-
return node._controlState ?? null;
|
|
4511
|
-
}
|
|
4512
|
-
function getDirectControlBoundaryVNode(children) {
|
|
4513
|
-
if (!Array.isArray(children) && _isDOMElement(children) && children.type === __CONTROL_BOUNDARY__) return children;
|
|
4514
|
-
if (Array.isArray(children) && children.length === 1 && _isDOMElement(children[0]) && children[0].type === __CONTROL_BOUNDARY__) return children[0];
|
|
4515
|
-
return null;
|
|
4516
|
-
}
|
|
4517
|
-
function getControlBoundaryCommitChildren(controlState) {
|
|
4518
|
-
if (controlState.kind === "for" && controlState._needsSourceReconcile) return evaluateForState(controlState);
|
|
4519
|
-
if (controlState.kind !== "for") {
|
|
4520
|
-
const activeVNode = controlState.activeScope?.vnode;
|
|
4521
|
-
return activeVNode == null || activeVNode === false ? [] : [activeVNode];
|
|
4522
|
-
}
|
|
4523
|
-
if (controlState.orderedKeys.length === 0) {
|
|
4524
|
-
const fallbackVNode = controlState.fallbackScope?.vnode;
|
|
4525
|
-
return fallbackVNode == null || fallbackVNode === false ? [] : [fallbackVNode];
|
|
4526
|
-
}
|
|
4527
|
-
const childrenVNodes = [];
|
|
4528
|
-
for (let index = 0; index < controlState.orderedKeys.length; index += 1) {
|
|
4529
|
-
const itemKey = controlState.orderedKeys[index];
|
|
4530
|
-
const itemInstance = controlState.items.get(itemKey);
|
|
4531
|
-
childrenVNodes.push(itemInstance?.scope.vnode ?? null);
|
|
4532
|
-
}
|
|
4533
|
-
return childrenVNodes;
|
|
4534
|
-
}
|
|
4535
|
-
//#endregion
|
|
4536
4561
|
//#region src/renderer/boundary-commit-owner.ts
|
|
4537
4562
|
let commitBoundaryChildren = null;
|
|
4538
4563
|
const controlBoundaryOwners = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as getSignal } from "../index-
|
|
2
|
-
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-
|
|
1
|
+
import { h as getSignal } from "../index-CDACZEF2.js";
|
|
2
|
+
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-DaqZEUPh.js";
|
|
3
3
|
//#region src/runtime/resource-operation.d.ts
|
|
4
4
|
interface ResourceResult<T> {
|
|
5
5
|
value: T | null;
|
package/dist/resources/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane } from "../access-ePqdQqkV.js";
|
|
2
|
-
import { a as registerCommitOperation } from "../component-internal-
|
|
2
|
+
import { a as registerCommitOperation } from "../component-internal-iJ7HAcpc.js";
|
|
3
3
|
import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-DzJEbYGE.js";
|
|
4
|
-
import { z as resource } from "../route-matching-
|
|
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-
|
|
4
|
+
import { z as resource } from "../route-matching-Dmb_MKUb.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-D2wzCYYh.js";
|
|
6
|
+
import { n as onRouteChange } from "../activity-386uXmPJ.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));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane, v as logger } from "./access-ePqdQqkV.js";
|
|
2
|
-
import { c as registerCommitOperationForInstance, d as getCurrentContextFrame,
|
|
2
|
+
import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-iJ7HAcpc.js";
|
|
3
3
|
import { f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
4
4
|
import { p as isPromiseLike } from "./lifecycle-batch-CwHCDseR.js";
|
|
5
5
|
import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as RenderableChild } from "../control-
|
|
1
|
+
import { c as RenderableChild } from "../control-Uvq1GU4K.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../jsx-Dvr2SGRG.js";
|
|
3
3
|
import "../types-C9YcqVpk.js";
|
|
4
|
-
import { A as RouteRecord, B as RouteSnapshot, C as RouteMetaSource, D as RoutePathParams, E as RouteParams, F as RouteRenderResult, I as RouteRequestOptions, L as RouteRequestResult, M as RouteRefSearch, N as RouteRegistry, O as RoutePolicy, P as RouteRegistryOptions, R as RouteSearch, S as RouteMeta, T as RouteOptions, _ as RouteDefinition, a as AccessRedirectDecision, b as RouteManifest, c as LayoutScopeRecord, d as ParsedSegment, f as Route, g as RouteContext, h as RouteComponent, i as AccessDenyStatus, j as RouteRef, k as RouteQuery, l as PageHelperOptions, m as RouteAuthResolver, n as AccessDecision, o as AccessRedirectStatus, p as RouteAuthOptions, r as AccessDenyDecision, s as GroupHelperOptions, t as AccessAllowDecision, u as PageScopeRecord, v as RouteDestination, w as RouteMode, x as RouteMatch, y as RouteHandler, z as RouteSearchValue } from "../router-
|
|
5
|
-
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-
|
|
6
|
-
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-
|
|
4
|
+
import { A as RouteRecord, B as RouteSnapshot, C as RouteMetaSource, D as RoutePathParams, E as RouteParams, F as RouteRenderResult, I as RouteRequestOptions, L as RouteRequestResult, M as RouteRefSearch, N as RouteRegistry, O as RoutePolicy, P as RouteRegistryOptions, R as RouteSearch, S as RouteMeta, T as RouteOptions, _ as RouteDefinition, a as AccessRedirectDecision, b as RouteManifest, c as LayoutScopeRecord, d as ParsedSegment, f as Route, g as RouteContext, h as RouteComponent, i as AccessDenyStatus, j as RouteRef, k as RouteQuery, l as PageHelperOptions, m as RouteAuthResolver, n as AccessDecision, o as AccessRedirectStatus, p as RouteAuthOptions, r as AccessDenyDecision, s as GroupHelperOptions, t as AccessAllowDecision, u as PageScopeRecord, v as RouteDestination, w as RouteMode, x as RouteMatch, y as RouteHandler, z as RouteSearchValue } from "../router-Dd-LoJmM.js";
|
|
5
|
+
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-DlaVqF4n.js";
|
|
6
|
+
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-DaqZEUPh.js";
|
|
7
7
|
import { AuthContext, AuthContext as AuthContext$1, AuthRequirement, AuthRequirement as AuthRequirement$1 } from "@askrjs/auth";
|
|
8
8
|
import { ObjectSchema } from "@askrjs/schema";
|
|
9
9
|
//#region src/router/route-query.d.ts
|
package/dist/router/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as resolveDeferredValues, b as Outlet, i as isDeferred, l as createRouteRegistry, m as resolveRouteRequest, n as Resolve, r as defer, s as routeData, w as lazy, y as currentAuth } from "../deferred-
|
|
1
|
+
import { a as resolveDeferredValues, b as Outlet, i as isDeferred, l as createRouteRegistry, m as resolveRouteRequest, n as Resolve, r as defer, s as routeData, w as lazy, y as currentAuth } from "../deferred-iBBHEN5Z.js";
|
|
2
2
|
import { jsx } from "../jsx-runtime.js";
|
|
3
|
-
import { a as isSafeHref } from "../csp-nonce-
|
|
4
|
-
import { a as route, i as page, n as group, r as index, t as fallback } from "../authoring-
|
|
5
|
-
import { n as onRouteChange, t as currentRoute } from "../activity-
|
|
6
|
-
import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-
|
|
3
|
+
import { a as isSafeHref } from "../csp-nonce-BLkoekFX.js";
|
|
4
|
+
import { a as route, i as page, n as group, r as index, t as fallback } from "../authoring-ycOVkX1-.js";
|
|
5
|
+
import { n as onRouteChange, t as currentRoute } from "../activity-386uXmPJ.js";
|
|
6
|
+
import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-BwCpLrSM.js";
|
|
7
7
|
import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
|
|
8
8
|
import { t as applyInteractionPolicy } from "../interactions-w7gQN4ha.js";
|
|
9
9
|
//#region src/router/route-query.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as RenderableChild } from "./control-
|
|
1
|
+
import { c as RenderableChild } from "./control-Uvq1GU4K.js";
|
|
2
2
|
import { D as QueryPrefetchContext, u as CoreTelemetry } from "./index-Bki2rqcr.js";
|
|
3
|
-
import { t as ActionDescriptor } from "./index-
|
|
3
|
+
import { t as ActionDescriptor } from "./index-vo_FDR-B.js";
|
|
4
4
|
import { AuthContext, AuthRequirement } from "@askrjs/auth";
|
|
5
5
|
import { InferSchema, ObjectSchema } from "@askrjs/schema";
|
|
6
6
|
//#region src/common/router.d.ts
|
package/dist/ssg/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as DocumentRenderContext, f as DocumentRenderer, u as DocumentRenderArgs } from "../control-
|
|
2
|
-
import { D as RoutePathParams, N as RouteRegistry, O as RoutePolicy, T as RouteOptions, y as RouteHandler } from "../router-
|
|
1
|
+
import { d as DocumentRenderContext, f as DocumentRenderer, u as DocumentRenderArgs } from "../control-Uvq1GU4K.js";
|
|
2
|
+
import { D as RoutePathParams, N as RouteRegistry, O as RoutePolicy, T as RouteOptions, y as RouteHandler } from "../router-Dd-LoJmM.js";
|
|
3
3
|
import { AuthRequirement } from "@askrjs/auth";
|
|
4
4
|
import "node:fs/promises";
|
|
5
5
|
//#region src/ssg/types.d.ts
|
package/dist/ssg/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../access-ePqdQqkV.js";
|
|
2
|
-
import { C as _preloadRouteHandler, S as getRenderHandler, a as resolveDeferredValues, l as createRouteRegistry, u as bindResolvedRouteData } from "../deferred-
|
|
3
|
-
import { a as route } from "../authoring-
|
|
2
|
+
import { C as _preloadRouteHandler, S as getRenderHandler, a as resolveDeferredValues, l as createRouteRegistry, u as bindResolvedRouteData } from "../deferred-iBBHEN5Z.js";
|
|
3
|
+
import { a as route } from "../authoring-ycOVkX1-.js";
|
|
4
4
|
import { n as renderDocument } from "../ssr-CbQO5xd3.js";
|
|
5
|
-
import { n as renderToString } from "../ssr-
|
|
5
|
+
import { n as renderToString } from "../ssr-CtumC_es.js";
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
7
7
|
import * as pathModule from "node:path";
|
|
8
8
|
import * as os from "node:os";
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as RenderableChild, d as DocumentRenderContext, f as DocumentRenderer, p as SSRData, u as DocumentRenderArgs } from "../control-
|
|
1
|
+
import { c as RenderableChild, d as DocumentRenderContext, f as DocumentRenderer, p as SSRData, u as DocumentRenderArgs } from "../control-Uvq1GU4K.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../jsx-Dvr2SGRG.js";
|
|
3
3
|
import { D as QueryPrefetchContext, n as ServerQueryRegistry, u as CoreTelemetry, v as DataRuntime } from "../index-Bki2rqcr.js";
|
|
4
|
-
import { A as RouteRecord, L as RouteRequestResult, N as RouteRegistry, a as AccessRedirectDecision, f as Route, p as RouteAuthOptions, r as AccessDenyDecision, y as RouteHandler } from "../router-
|
|
4
|
+
import { A as RouteRecord, L as RouteRequestResult, N as RouteRegistry, a as AccessRedirectDecision, f as Route, p as RouteAuthOptions, r as AccessDenyDecision, y as RouteHandler } from "../router-Dd-LoJmM.js";
|
|
5
5
|
import { AuthContext } from "@askrjs/auth";
|
|
6
6
|
//#region src/common/page-render-envelope.d.ts
|
|
7
7
|
declare const PAGE_RENDER_ENVELOPE_VERSION: 1;
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { u as SSRDataMissingError } from "../render-context-Clw3rFiO.js";
|
|
2
|
-
import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-
|
|
2
|
+
import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-CtumC_es.js";
|
|
3
3
|
export { SSRDataMissingError, createRenderContext, getRenderContext, renderResolvedToStringSync, renderRouteRequest, renderRouteRequestToString, renderToStream, renderToString, renderToStringSync, resolveRequest, withRenderContext, withRenderContextAsync };
|
|
@@ -2,20 +2,20 @@ import { t as __CONTROL_BOUNDARY__ } from "./control-DhFRTIoE.js";
|
|
|
2
2
|
import { t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
|
|
3
3
|
import { v as logger } from "./access-ePqdQqkV.js";
|
|
4
4
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
5
|
-
import { f as getExecutionContextFrame,
|
|
5
|
+
import { f as getExecutionContextFrame, h as markVNodeTreeWithContextFrame, l as callWithContext, n as createComponentInstance, p as getVNodeContextFrame } from "./component-internal-iJ7HAcpc.js";
|
|
6
6
|
import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
7
7
|
import { t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
8
8
|
import { p as isPromiseLike } from "./lifecycle-batch-CwHCDseR.js";
|
|
9
|
-
import { g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-
|
|
10
|
-
import { _ as isPageRenderEnvelope, g as isEmptyPageRenderEnvelope, h as createPageRenderEnvelope, i as isDeferred, l as createRouteRegistry, m as resolveRouteRequest, t as DEFERRED_BOUNDARY } from "./deferred-
|
|
9
|
+
import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-tNicxJY3.js";
|
|
10
|
+
import { _ as isPageRenderEnvelope, g as isEmptyPageRenderEnvelope, h as createPageRenderEnvelope, i as isDeferred, l as createRouteRegistry, m as resolveRouteRequest, t as DEFERRED_BOUNDARY } from "./deferred-iBBHEN5Z.js";
|
|
11
11
|
import { c as stopRenderPhase$1, o as startRenderPhase$1, t as configureRenderContextProvider, u as SSRDataMissingError } from "./render-context-Clw3rFiO.js";
|
|
12
|
-
import { a as resolveRouteFromRoutes, t as _resolveRouteMatchFromRoutes } from "./route-matching-
|
|
12
|
+
import { a as resolveRouteFromRoutes, t as _resolveRouteMatchFromRoutes } from "./route-matching-Dmb_MKUb.js";
|
|
13
13
|
import { a as disposeDefaultPortalScope, o as SSR_PORTAL_HOST, t as DefaultPortal } from "./portal-EKmTCMKp.js";
|
|
14
14
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
15
|
-
import { a as isSafeHref, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
15
|
+
import { a as isSafeHref, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-BLkoekFX.js";
|
|
16
16
|
import { t as createDataRuntime } from "./data-runtime-rpV6-3XW.js";
|
|
17
17
|
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-Bu_cuMch.js";
|
|
18
|
-
import { a as route } from "./authoring-
|
|
18
|
+
import { a as route } from "./authoring-ycOVkX1-.js";
|
|
19
19
|
import { n as renderDocument, t as SSR_RENDER_DATA_ATTR } from "./ssr-CbQO5xd3.js";
|
|
20
20
|
//#region src/ssr/escape.ts
|
|
21
21
|
/**
|
|
@@ -701,7 +701,11 @@ function resolveErrorBoundaryFallbackNode(fallback, error, reset) {
|
|
|
701
701
|
return typeof fallback === "function" ? fallback(error, reset) : fallback !== void 0 ? fallback : createDefaultErrorBoundaryFallbackVNode(error);
|
|
702
702
|
}
|
|
703
703
|
function getControlBoundaryState(node) {
|
|
704
|
-
|
|
704
|
+
const boundaryNode = node;
|
|
705
|
+
const controlState = boundaryNode._controlState ?? null;
|
|
706
|
+
const frame = getVNodeContextFrame(boundaryNode);
|
|
707
|
+
if (controlState && frame) setControlBoundaryContextFrame(controlState, frame);
|
|
708
|
+
return controlState;
|
|
705
709
|
}
|
|
706
710
|
function evaluateControlBoundaryChildren(node) {
|
|
707
711
|
if (node.type !== __CONTROL_BOUNDARY__) return;
|
|
@@ -880,7 +884,7 @@ function isMultiRangeChild(child) {
|
|
|
880
884
|
return (getRenderableChildren(vnode)?.length ?? 0) !== 1;
|
|
881
885
|
}
|
|
882
886
|
function renderControlChildrenSync(node, ctx) {
|
|
883
|
-
const controlState = node
|
|
887
|
+
const controlState = getControlBoundaryState(node);
|
|
884
888
|
return withControlBoundaryChildren(node, (children) => {
|
|
885
889
|
const values = children ?? [];
|
|
886
890
|
if (controlState?.kind === "for") return values.map((child) => {
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as ComponentFunction } from "../control-
|
|
1
|
+
import { s as ComponentFunction } from "../control-Uvq1GU4K.js";
|
|
2
2
|
import { C as Query, k as QueryStaleReason } from "../index-Bki2rqcr.js";
|
|
3
|
-
import { N as RouteRegistry, p as RouteAuthOptions, x as RouteMatch } from "../router-
|
|
3
|
+
import { N as RouteRegistry, p as RouteAuthOptions, x as RouteMatch } from "../router-Dd-LoJmM.js";
|
|
4
4
|
//#region src/testing/render.d.ts
|
|
5
5
|
interface RenderOptions {
|
|
6
6
|
/**
|
package/dist/testing/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as flushRuntimeScheduler } from "../access-ePqdQqkV.js";
|
|
2
|
-
import { r as computeRouteActivityMatches } from "../route-matching-
|
|
2
|
+
import { r as computeRouteActivityMatches } from "../route-matching-Dmb_MKUb.js";
|
|
3
3
|
import { l as addInvalidationListener } from "../data-runtime-rpV6-3XW.js";
|
|
4
|
-
import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-
|
|
4
|
+
import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-eaBrci4W.js";
|
|
5
5
|
//#region src/testing/render.ts
|
|
6
6
|
const renderStates = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
const eventConstructorNames = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as SSR_RENDER_DATA_ATTR } from "./ssr-CbQO5xd3.js";
|
|
2
|
-
import { a as renderResolvedToStringSync } from "./ssr-
|
|
2
|
+
import { a as renderResolvedToStringSync } from "./ssr-CtumC_es.js";
|
|
3
3
|
//#region src/ssr/verify-hydration.ts
|
|
4
4
|
function normalizeHydrationHtml(html) {
|
|
5
5
|
const template = document.createElement("template");
|