@askrjs/askr 0.0.79 → 0.0.81
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.js +15 -8
- package/dist/{activity-DfrtblJA.js → activity-CnSRFO3d.js} +2 -2
- package/dist/{authoring-DE-LH_s-.js → authoring-DbGEgg40.js} +2 -2
- package/dist/benchmark.js +6 -6
- package/dist/boot/index.js +1 -1
- package/dist/{boot-jD3P49ST.js → boot-CrpQQNAt.js} +9 -9
- package/dist/{cleanup-CyY1ROBI.js → cleanup-CEF-cX49.js} +7 -2
- package/dist/{component-internal-BuTG89T8.js → component-internal-DsM75Gl1.js} +8 -0
- package/dist/control/index.js +1 -1
- package/dist/{control-DQIsWvhr.js → control-C0X1zgrM.js} +1 -1
- package/dist/{csp-nonce-BUsz0Em7.js → csp-nonce-DDt0UNdt.js} +1 -1
- package/dist/data/index.js +1 -1
- package/dist/{data-eBdygZ1f.js → data-G0hURNm_.js} +1 -1
- package/dist/{deferred-t79wHqe1.js → deferred-rdHAgyKe.js} +3 -3
- package/dist/{for-internal-BnXrQbgo.js → for-internal-DRbV0h1d.js} +2 -1
- package/dist/foundations/interactions/index.js +1 -1
- package/dist/foundations/state/index.js +2 -1
- package/dist/index.js +11 -8
- package/dist/{interactions-w7gQN4ha.js → interactions-DgGQyUQv.js} +3 -2
- package/dist/{lifecycle-operations-CN0PiLE_.js → lifecycle-operations-BJfxWUJr.js} +1 -1
- package/dist/{navigate-ype2B_M8.js → navigate-Crvd5gUG.js} +18 -11
- package/dist/{renderer-CDw8ltTw.js → renderer-BU9TOqrA.js} +13 -12
- package/dist/resources/index.js +4 -4
- package/dist/{route-matching-jqwlQJ5g.js → route-matching-BUwz4kfl.js} +1 -1
- package/dist/router/index.js +9 -7
- package/dist/{selector-BzPPLXny.js → selector-DVwvof1M.js} +12 -2
- package/dist/ssg/index.js +3 -3
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-Dcmi1bZi.js → ssr-C_Ql5_Kg.js} +6 -6
- package/dist/testing/index.js +2 -2
- package/dist/{verify-hydration-Dfx-ZhbX.js → verify-hydration-CNLXUcuR.js} +1 -1
- package/package.json +1 -1
package/dist/actions/index.js
CHANGED
|
@@ -71,10 +71,15 @@ function action(descriptor) {
|
|
|
71
71
|
const runtime = resolveDataRuntimeState();
|
|
72
72
|
const value = state(initialStatus(descriptor.id));
|
|
73
73
|
const setValue = value.set;
|
|
74
|
+
let submissionGeneration = 0;
|
|
74
75
|
return {
|
|
75
76
|
state: value,
|
|
76
77
|
async submit(input) {
|
|
77
|
-
|
|
78
|
+
const generation = ++submissionGeneration;
|
|
79
|
+
setValue((previous) => ({
|
|
80
|
+
pending: true,
|
|
81
|
+
result: previous.result
|
|
82
|
+
}));
|
|
78
83
|
try {
|
|
79
84
|
const response = await fetch(location.href, {
|
|
80
85
|
method: "POST",
|
|
@@ -90,15 +95,17 @@ function action(descriptor) {
|
|
|
90
95
|
if (!response.ok) throw envelope.error ?? validationError(envelope, descriptor.id) ?? /* @__PURE__ */ new Error(`Action failed (${response.status}).`);
|
|
91
96
|
const redirect = typeof envelope.redirect === "string" ? normalizeActionRedirect(envelope.redirect) : void 0;
|
|
92
97
|
const invalidates = Array.isArray(envelope.invalidates) ? envelope.invalidates.filter((prefix) => typeof prefix === "string") : descriptor.invalidates;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
if (generation === submissionGeneration) {
|
|
99
|
+
for (const prefix of invalidates) invalidateQueriesForRuntime(runtime, prefix, true);
|
|
100
|
+
setValue({
|
|
101
|
+
pending: false,
|
|
102
|
+
result: envelope.result
|
|
103
|
+
});
|
|
104
|
+
if (redirect) location.assign(redirect);
|
|
105
|
+
}
|
|
99
106
|
return envelope.result;
|
|
100
107
|
} catch (error) {
|
|
101
|
-
setValue({
|
|
108
|
+
if (generation === submissionGeneration) setValue({
|
|
102
109
|
pending: false,
|
|
103
110
|
error
|
|
104
111
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
1
|
+
import { a as registerCommitOperation } from "./component-internal-DsM75Gl1.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-D-DFk2WN.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-BUwz4kfl.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-rdHAgyKe.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-BUwz4kfl.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-BU9TOqrA.js";
|
|
3
3
|
import { t as state } from "./state-BCl9DeiN.js";
|
|
4
|
-
import { t as selector } from "./selector-
|
|
5
|
-
import { i as For } from "./control-
|
|
4
|
+
import { t as selector } from "./selector-DVwvof1M.js";
|
|
5
|
+
import { i as For } from "./control-C0X1zgrM.js";
|
|
6
6
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
7
|
-
import { t as createIsland } from "./boot-
|
|
7
|
+
import { t as createIsland } from "./boot-CrpQQNAt.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.81",
|
|
67
|
+
buildLabel: "0.0.81-local"
|
|
68
68
|
};
|
|
69
69
|
function getBenchmarkMetadata() {
|
|
70
70
|
return { ...benchmarkMetadata };
|
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-CrpQQNAt.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-C3IECePB.js";
|
|
3
|
-
import { n as createComponentInstance, r as executeComponent } from "./component-internal-
|
|
3
|
+
import { n as createComponentInstance, r as executeComponent } from "./component-internal-DsM75Gl1.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-
|
|
7
|
-
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-
|
|
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-
|
|
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-BU9TOqrA.js";
|
|
7
|
+
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-CEF-cX49.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-rdHAgyKe.js";
|
|
9
9
|
import { c as stopHydrationRenderPhase, o as startHydrationRenderPhase } from "./render-context-D-DFk2WN.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-BUwz4kfl.js";
|
|
11
11
|
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-BZ_rN17v.js";
|
|
12
|
-
import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
12
|
+
import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-DDt0UNdt.js";
|
|
13
13
|
import { i as getDefaultDataRuntime } from "./data-runtime-D68YOo9L.js";
|
|
14
14
|
import { a as hydrateDataRuntime } from "./query-registry-BL6rjGsO.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-CnSRFO3d.js";
|
|
16
|
+
import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-Crvd5gUG.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-CNLXUcuR.js");
|
|
589
589
|
if (!verifyHydrationSyncForUrl({
|
|
590
590
|
root: rootElement,
|
|
591
591
|
url: currentUrl,
|
|
@@ -128,6 +128,7 @@ function attachDelegatedListener(container, element, eventName, handler, origina
|
|
|
128
128
|
entry
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
+
if (eventName === "focus" || eventName === "blur" || eventName === "scroll") dispatchPath.reverse();
|
|
131
132
|
for (const { node, entry } of dispatchPath) {
|
|
132
133
|
try {
|
|
133
134
|
entry.handler(createDelegatedEventFacade(e, node));
|
|
@@ -138,7 +139,11 @@ function attachDelegatedListener(container, element, eventName, handler, origina
|
|
|
138
139
|
}
|
|
139
140
|
}, "sync");
|
|
140
141
|
};
|
|
141
|
-
const
|
|
142
|
+
const passiveOptions = getPassiveOptions(eventName);
|
|
143
|
+
const listenerOptions = eventName === "focus" || eventName === "blur" || eventName === "scroll" ? {
|
|
144
|
+
...passiveOptions ?? options,
|
|
145
|
+
capture: true
|
|
146
|
+
} : passiveOptions ?? options;
|
|
142
147
|
container.addEventListener(eventName, delegatedHandler, listenerOptions);
|
|
143
148
|
containerListener = {
|
|
144
149
|
handler: delegatedHandler,
|
|
@@ -174,7 +179,7 @@ function setDelegatedHandlerForElement(element, entry, existing = getDelegatedHa
|
|
|
174
179
|
setDelegatedHandlerStore(element, next);
|
|
175
180
|
}
|
|
176
181
|
function getPassiveOptions(eventName) {
|
|
177
|
-
if (eventName === "
|
|
182
|
+
if (eventName === "scroll") return { passive: true };
|
|
178
183
|
}
|
|
179
184
|
function addDelegatedListener(element, eventName, handler, originalHandler, options) {
|
|
180
185
|
const container = getDelegationContainer();
|
|
@@ -365,6 +365,14 @@ function runScheduledComponent(instance, host) {
|
|
|
365
365
|
}
|
|
366
366
|
function commitPlaceholderReplacement(instance, result, host) {
|
|
367
367
|
if (result === null || result === void 0) {
|
|
368
|
+
const placeholder = instance._placeholder;
|
|
369
|
+
if (placeholder) {
|
|
370
|
+
const replacement = getRuntimeRenderer().replaceComponentRange(instance, result, placeholder);
|
|
371
|
+
if (replacement) {
|
|
372
|
+
instance.target = replacement instanceof Element ? replacement : null;
|
|
373
|
+
instance._placeholder = replacement instanceof Comment ? replacement : void 0;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
368
376
|
host.finalizeReadSubscriptions(instance);
|
|
369
377
|
host.commitRenderedComponent(instance);
|
|
370
378
|
return;
|
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-C0X1zgrM.js";
|
|
2
2
|
export { Case, For, Match, Show };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as markEagerControlPrimitive, t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
|
|
2
2
|
import { b as isDevelopmentEnvironment } from "./access-ePqdQqkV.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-C3IECePB.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-DRbV0h1d.js";
|
|
5
5
|
import { t as createFineGrainedEffect } from "./effect-2IIWvUjG.js";
|
|
6
6
|
import { t as state } from "./state-BCl9DeiN.js";
|
|
7
7
|
//#region src/control/shared.ts
|
package/dist/data/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-D68YOo9L.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-G0hURNm_.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-BL6rjGsO.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-D-DFk2WN.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-BJfxWUJr.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-D68YOo9L.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-C3IECePB.js";
|
|
2
|
-
import { g as readScope, u as defineScope } from "./component-internal-
|
|
2
|
+
import { g as readScope, u as defineScope } from "./component-internal-DsM75Gl1.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-D-DFk2WN.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-BUwz4kfl.js";
|
|
7
|
+
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-DDt0UNdt.js";
|
|
8
8
|
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-BL6rjGsO.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 { _ as rebaseVNodeTreeWithContextFrame, m as haveEquivalentContextFrames, 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-DsM75Gl1.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";
|
|
@@ -978,6 +978,7 @@ function reconcileForItems(forState, newArray) {
|
|
|
978
978
|
forState.pendingSwapIndices = null;
|
|
979
979
|
forState.pendingMoveOnly = false;
|
|
980
980
|
forState.pendingInsertedIndex = insertedIndex;
|
|
981
|
+
for (let index = insertedIndex; index < resultItems.length; index += 1) syncForItemIndex(forState, resultItems[index], index);
|
|
981
982
|
return resultVNodes;
|
|
982
983
|
}
|
|
983
984
|
}
|
|
@@ -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-DgGQyUQv.js";
|
|
2
2
|
export { applyInteractionPolicy, dismissable, focusable, hoverable, mergeInteractionProps, pressable, rovingFocus };
|
|
@@ -56,7 +56,8 @@ function makeControllable(options) {
|
|
|
56
56
|
*/
|
|
57
57
|
function controllableState(options) {
|
|
58
58
|
const isControlled = options.value !== void 0;
|
|
59
|
-
const internal =
|
|
59
|
+
const internal = state(options.defaultValue);
|
|
60
|
+
internal();
|
|
60
61
|
function read() {
|
|
61
62
|
if (isControlled) return options.value;
|
|
62
63
|
return internal();
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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-C3IECePB.js";
|
|
3
|
-
import { g as readScope, u as defineScope } from "./component-internal-
|
|
3
|
+
import { g as readScope, u as defineScope } from "./component-internal-DsM75Gl1.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-BU9TOqrA.js";
|
|
8
8
|
import { a as registerSSRStyle } from "./render-context-D-DFk2WN.js";
|
|
9
9
|
import { t as state } from "./state-BCl9DeiN.js";
|
|
10
|
-
import { t as selector } from "./selector-
|
|
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-
|
|
10
|
+
import { t as selector } from "./selector-DVwvof1M.js";
|
|
11
|
+
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-DDt0UNdt.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-C0X1zgrM.js";
|
|
13
13
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
14
|
-
import { t as createQuery } from "./data-
|
|
14
|
+
import { t as createQuery } from "./data-G0hURNm_.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-BL6rjGsO.js";
|
|
16
16
|
//#region src/runtime/derive.ts
|
|
17
17
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
@@ -136,8 +136,11 @@ function createMappedSelector(source, map) {
|
|
|
136
136
|
return () => {
|
|
137
137
|
let value;
|
|
138
138
|
if (typeof source === "function") value = source();
|
|
139
|
-
else if (isSnapshotSource(source))
|
|
140
|
-
|
|
139
|
+
else if (isSnapshotSource(source)) {
|
|
140
|
+
const snapshot = source;
|
|
141
|
+
if (snapshot.pending) return null;
|
|
142
|
+
value = snapshot.value;
|
|
143
|
+
} else value = source;
|
|
141
144
|
if (value == null) return null;
|
|
142
145
|
return map(value);
|
|
143
146
|
};
|
|
@@ -98,6 +98,7 @@ function hoverable({ disabled, onEnter, onLeave }) {
|
|
|
98
98
|
//#region src/foundations/interactions/roving-focus.ts
|
|
99
99
|
function rovingFocus(options) {
|
|
100
100
|
const { currentIndex, itemCount, orientation = "horizontal", loop = false, onNavigate, isDisabled } = options;
|
|
101
|
+
const effectiveCurrentIndex = currentIndex >= 0 && currentIndex < itemCount && !isDisabled?.(currentIndex) ? currentIndex : Array.from({ length: itemCount }, (_, index) => index).find((index) => !isDisabled?.(index));
|
|
101
102
|
function findNextIndex(from, direction) {
|
|
102
103
|
let next = from;
|
|
103
104
|
for (let steps = 0; steps < itemCount; steps += 1) {
|
|
@@ -122,7 +123,7 @@ function rovingFocus(options) {
|
|
|
122
123
|
if (key === "ArrowUp") direction = -1;
|
|
123
124
|
}
|
|
124
125
|
if (direction === void 0) return;
|
|
125
|
-
const nextIndex = findNextIndex(
|
|
126
|
+
const nextIndex = findNextIndex(effectiveCurrentIndex ?? 0, direction);
|
|
126
127
|
if (nextIndex === void 0) return;
|
|
127
128
|
e.preventDefault?.();
|
|
128
129
|
e.stopPropagation?.();
|
|
@@ -131,7 +132,7 @@ function rovingFocus(options) {
|
|
|
131
132
|
return {
|
|
132
133
|
container: { onKeyDown: handleKeyDown },
|
|
133
134
|
item: (index) => ({
|
|
134
|
-
tabIndex: index ===
|
|
135
|
+
tabIndex: index === effectiveCurrentIndex ? 0 : -1,
|
|
135
136
|
"data-roving-index": index
|
|
136
137
|
})
|
|
137
138
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
1
|
+
import { a as registerCommitOperation } from "./component-internal-DsM75Gl1.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-C3IECePB.js";
|
|
3
|
-
import { r as executeComponent } from "./component-internal-
|
|
3
|
+
import { r as executeComponent } from "./component-internal-DsM75Gl1.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
|
-
import { _ as teardownNodeSubtree } from "./cleanup-
|
|
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-
|
|
7
|
+
import { _ as teardownNodeSubtree } from "./cleanup-CEF-cX49.js";
|
|
8
|
+
import { d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, p as hasRouteRenderData } from "./deferred-rdHAgyKe.js";
|
|
9
|
+
import { j as lockRouteRegistration, r as computeRouteActivityMatches } from "./route-matching-BUwz4kfl.js";
|
|
10
10
|
import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-BZ_rN17v.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-DDt0UNdt.js";
|
|
12
|
+
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-CnSRFO3d.js";
|
|
13
13
|
//#region src/router/navigation-registry.ts
|
|
14
14
|
let currentInstance = null;
|
|
15
15
|
let currentPathname = "/";
|
|
@@ -162,6 +162,15 @@ function scrollToPosition(position) {
|
|
|
162
162
|
function applyNavigationScroll(behavior) {
|
|
163
163
|
const nextBehavior = behavior ?? scrollRestorationOptions.navigation;
|
|
164
164
|
if (!scrollRestorationOptions.enabled || nextBehavior === "preserve") return;
|
|
165
|
+
const hash = typeof window !== "undefined" ? window.location.hash : "";
|
|
166
|
+
if (hash && typeof document !== "undefined") {
|
|
167
|
+
const id = decodeURIComponent(hash.slice(1));
|
|
168
|
+
const target = document.getElementById(id);
|
|
169
|
+
if (target && typeof target.scrollIntoView === "function") {
|
|
170
|
+
target.scrollIntoView({ behavior: "auto" });
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
165
174
|
scrollToPosition({
|
|
166
175
|
x: 0,
|
|
167
176
|
y: 0
|
|
@@ -848,10 +857,7 @@ function applyNavigationTargets(requestId, path, options, redirectState, pathnam
|
|
|
848
857
|
navigationBatchClosed = true;
|
|
849
858
|
cleanupErrors.push(...drainLifecycleCommitErrors());
|
|
850
859
|
for (const target of matchedTargets) if (target.resolved && target.resolved.kind !== "redirect") syncAppRegistrationLocation(target.app, pathname, href);
|
|
851
|
-
if (isStaleRouteRequest(requestId))
|
|
852
|
-
restoreOnExit();
|
|
853
|
-
return;
|
|
854
|
-
}
|
|
860
|
+
if (isStaleRouteRequest(requestId)) return;
|
|
855
861
|
saveScrollPosition(previousHref);
|
|
856
862
|
const historyMethod = getNavigationHistoryMode(options) === "replace" ? "replaceState" : "pushState";
|
|
857
863
|
window.history[historyMethod]({ path: href }, "", href);
|
|
@@ -859,7 +865,7 @@ function applyNavigationTargets(requestId, path, options, redirectState, pathnam
|
|
|
859
865
|
clearStagedRouteLocations(matchedTargets);
|
|
860
866
|
syncRegisteredRouteSnapshot();
|
|
861
867
|
reconcileNavigationMetadata(matchedTargets);
|
|
862
|
-
if (pathname !== previousPathname) applyNavigationScroll(options.scroll);
|
|
868
|
+
if (pathname !== previousPathname || parseTargetUrl(href).hash) applyNavigationScroll(options.scroll);
|
|
863
869
|
for (const deferredCleanup of deferredCleanups) cleanupErrors.push(...cleanupDeferredRouteInstance(deferredCleanup));
|
|
864
870
|
for (const error of cleanupErrors) reportRouteCleanupErrors([error]);
|
|
865
871
|
} catch (error) {
|
|
@@ -893,6 +899,7 @@ function applyPopStateNavigationTargets(requestId, previousHref, previousState,
|
|
|
893
899
|
rootsToPrepare.push(target);
|
|
894
900
|
}
|
|
895
901
|
const previousPathname = getCurrentPathname();
|
|
902
|
+
saveScrollPosition(previousHref);
|
|
896
903
|
const rollbackSnapshots = matchedTargets.map((target) => captureDeferredRouteCleanup(target.app.instance));
|
|
897
904
|
const rollbackSnapshotByInstance = new Map(rollbackSnapshots.map((snapshot) => [snapshot.instance, snapshot]));
|
|
898
905
|
const deferredCleanups = [];
|
|
@@ -3,16 +3,16 @@ 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-CkBXZ_3K.js";
|
|
5
5
|
import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-C3IECePB.js";
|
|
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-
|
|
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-DsM75Gl1.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 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-
|
|
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-DRbV0h1d.js";
|
|
11
11
|
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-2IIWvUjG.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-
|
|
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-CEF-cX49.js";
|
|
13
13
|
import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
|
|
14
14
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
15
|
-
import { a as isSafeHref, i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
15
|
+
import { a as isSafeHref, i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-DDt0UNdt.js";
|
|
16
16
|
//#region src/runtime/error-boundary.ts
|
|
17
17
|
function createBoundaryReset(instance) {
|
|
18
18
|
return () => {
|
|
@@ -71,7 +71,7 @@ function parseEventProp(propName) {
|
|
|
71
71
|
if (propName === "onClick") return CLICK_EVENT_PROP;
|
|
72
72
|
if (propName === "onClickCapture") return CLICK_CAPTURE_EVENT_PROP;
|
|
73
73
|
if (!propName.startsWith("on") || propName.length <= 2) return null;
|
|
74
|
-
const capture = propName.endsWith("Capture") && propName.length > 9;
|
|
74
|
+
const capture = propName.endsWith("Capture") && !propName.endsWith("PointerCapture") && propName.length > 9;
|
|
75
75
|
const normalizedPropName = capture ? propName.slice(0, -7) : propName;
|
|
76
76
|
return normalizedPropName.length <= 2 ? null : {
|
|
77
77
|
eventName: normalizedPropName.slice(2).charAt(0).toLowerCase() + normalizedPropName.slice(3).toLowerCase(),
|
|
@@ -93,7 +93,7 @@ function getEventListenerOptions(eventName, capture = false) {
|
|
|
93
93
|
* Get default event listener options for passive events
|
|
94
94
|
*/
|
|
95
95
|
function getPassiveOptions(eventName) {
|
|
96
|
-
if (eventName === "
|
|
96
|
+
if (eventName === "scroll") return { passive: true };
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Create a wrapped event handler that integrates with the scheduler
|
|
@@ -902,14 +902,14 @@ function getRangeNodes(range) {
|
|
|
902
902
|
}
|
|
903
903
|
return nodes;
|
|
904
904
|
}
|
|
905
|
-
function createDetachedRange(nodes, owner, forceAnchors = false) {
|
|
905
|
+
function createDetachedRange(nodes, owner, forceAnchors = false, preserveExistingOwner = false) {
|
|
906
906
|
if (nodes instanceof DocumentFragment) {
|
|
907
907
|
const first = nodes.firstChild;
|
|
908
908
|
const last = nodes.lastChild;
|
|
909
909
|
const existingOwner = first ? getRangeOwner(first) : void 0;
|
|
910
910
|
const existingRange = existingOwner ? getOwnedRange(existingOwner) : void 0;
|
|
911
911
|
if (existingRange && !existingRange.single && existingRange.start === first && existingRange.end === last) {
|
|
912
|
-
if (owner) registerRange(existingRange, owner);
|
|
912
|
+
if (owner && !preserveExistingOwner) registerRange(existingRange, owner);
|
|
913
913
|
return {
|
|
914
914
|
range: existingRange,
|
|
915
915
|
fragment: nodes
|
|
@@ -4454,7 +4454,7 @@ function materializeChildScopeRange(vnode, parentNamespace, scope, scopeAlreadyA
|
|
|
4454
4454
|
}
|
|
4455
4455
|
if (!dom) return createEmptyRange(document, scope).range;
|
|
4456
4456
|
if (!(dom instanceof DocumentFragment)) return createSingleNodeRange(dom, scope);
|
|
4457
|
-
return createDetachedRange(dom, scope).range;
|
|
4457
|
+
return createDetachedRange(dom, scope, false, true).range;
|
|
4458
4458
|
}
|
|
4459
4459
|
function getBoundaryParentNamespace(parent) {
|
|
4460
4460
|
return getParentNamespace(parent);
|
|
@@ -4494,6 +4494,7 @@ function syncControlBoundaryScopeDom(parent, scope, vnode, before = null, allowH
|
|
|
4494
4494
|
if (!resolvedRange) {
|
|
4495
4495
|
const nextRange = materializeChildScopeRange(vnode, getBoundaryParentNamespace(parent), scope, true);
|
|
4496
4496
|
assignScopeRange(scope, nextRange);
|
|
4497
|
+
scope.hydrationPending = false;
|
|
4497
4498
|
if (insertDetached) insertRangeBefore(parent, nextRange, before);
|
|
4498
4499
|
return nextRange;
|
|
4499
4500
|
}
|
|
@@ -4561,7 +4562,7 @@ function syncControlBoundaryInMixedParent(parent, controlState, childrenVNodes,
|
|
|
4561
4562
|
const fallbackScope = controlState.fallbackScope;
|
|
4562
4563
|
const fallbackVNode = childrenVNodes[0];
|
|
4563
4564
|
if (fallbackScope && fallbackVNode !== void 0) {
|
|
4564
|
-
if (fallbackScope.hydrationPending && !fallbackScope.range && syncBefore instanceof Element && !checkVNodeShapeChanged(syncBefore, fallbackVNode)) {
|
|
4565
|
+
if (isHydrationAdoptionScopeActive() && fallbackScope.hydrationPending && !fallbackScope.range && syncBefore instanceof Element && !checkVNodeShapeChanged(syncBefore, fallbackVNode)) {
|
|
4565
4566
|
assignScopeRange(fallbackScope, {
|
|
4566
4567
|
start: syncBefore,
|
|
4567
4568
|
end: syncBefore,
|
|
@@ -4579,7 +4580,7 @@ function syncControlBoundaryInMixedParent(parent, controlState, childrenVNodes,
|
|
|
4579
4580
|
const item = controlState.orderedItems[index];
|
|
4580
4581
|
const vnode = childrenVNodes[index];
|
|
4581
4582
|
if (!item || vnode === void 0) continue;
|
|
4582
|
-
if (item.scope.hydrationPending && !item.scope.range && syncBefore instanceof Element && getMaterializedKey(syncBefore) === controlState.orderedKeys[index] && canAdoptHydratedElement(syncBefore, vnode)) {
|
|
4583
|
+
if (isHydrationAdoptionScopeActive() && item.scope.hydrationPending && !item.scope.range && syncBefore instanceof Element && getMaterializedKey(syncBefore) === controlState.orderedKeys[index] && canAdoptHydratedElement(syncBefore, vnode)) {
|
|
4583
4584
|
assignScopeRange(item.scope, {
|
|
4584
4585
|
start: syncBefore,
|
|
4585
4586
|
end: syncBefore,
|
|
@@ -4609,7 +4610,7 @@ function syncControlBoundaryInMixedParent(parent, controlState, childrenVNodes,
|
|
|
4609
4610
|
}
|
|
4610
4611
|
const activeScope = controlState.activeScope;
|
|
4611
4612
|
const activeVNode = childrenVNodes[0];
|
|
4612
|
-
if (activeScope?.hydrationPending && activeVNode !== void 0 && !activeScope.range && controlState.lastRemovedRanges.length === 0 && before instanceof Element && canAdoptHydratedElement(before, activeVNode)) {
|
|
4613
|
+
if (isHydrationAdoptionScopeActive() && activeScope?.hydrationPending && activeVNode !== void 0 && !activeScope.range && controlState.lastRemovedRanges.length === 0 && before instanceof Element && canAdoptHydratedElement(before, activeVNode)) {
|
|
4613
4614
|
assignScopeRange(activeScope, {
|
|
4614
4615
|
start: before,
|
|
4615
4616
|
end: before,
|
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-DsM75Gl1.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-BUwz4kfl.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-BJfxWUJr.js";
|
|
6
|
+
import { n as onRouteChange } from "../activity-CnSRFO3d.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, v as withAsyncResourceContext } from "./component-internal-
|
|
2
|
+
import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-DsM75Gl1.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.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
2
|
-
import { a as isSafeHref } from "../csp-nonce-
|
|
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-rdHAgyKe.js";
|
|
2
|
+
import { a as isSafeHref } from "../csp-nonce-DDt0UNdt.js";
|
|
3
3
|
import { jsx } from "../jsx-runtime.js";
|
|
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-
|
|
4
|
+
import { a as route, i as page, n as group, r as index, t as fallback } from "../authoring-DbGEgg40.js";
|
|
5
|
+
import { n as onRouteChange, t as currentRoute } from "../activity-CnSRFO3d.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-Crvd5gUG.js";
|
|
7
7
|
import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
|
|
8
|
-
import { t as applyInteractionPolicy } from "../interactions-
|
|
8
|
+
import { t as applyInteractionPolicy } from "../interactions-DgGQyUQv.js";
|
|
9
9
|
//#region src/router/route-query.ts
|
|
10
10
|
function getRouteQueryHistoryMode(options) {
|
|
11
11
|
if (options.history) return options.history;
|
|
@@ -175,13 +175,15 @@ function Link({ href: suppliedHref, to, class: className, children, rel, target,
|
|
|
175
175
|
const event = e;
|
|
176
176
|
if ((event.button ?? 0) !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;
|
|
177
177
|
if (target || !isSameOriginNavigableHref(href)) return;
|
|
178
|
+
if (rest.download !== void 0) return;
|
|
178
179
|
event.preventDefault();
|
|
179
180
|
navigate(href);
|
|
180
181
|
};
|
|
181
182
|
const interaction = applyInteractionPolicy({
|
|
182
183
|
isNative: true,
|
|
183
184
|
disabled: false,
|
|
184
|
-
onPress: handleNavigation
|
|
185
|
+
onPress: handleNavigation,
|
|
186
|
+
ref: rest.ref
|
|
185
187
|
});
|
|
186
188
|
const consumerActivation = (e) => {
|
|
187
189
|
onPress?.(e);
|
|
@@ -251,10 +251,20 @@ function getOrCreateSelectorHook(instance, hookIndex, source, equals) {
|
|
|
251
251
|
const store = getSelectorStore(instance);
|
|
252
252
|
const existing = store.get(hookIndex);
|
|
253
253
|
if (existing) {
|
|
254
|
-
if (existing._source !== source || existing._equals !== equals) {
|
|
254
|
+
if (existing._source !== source || existing._equals !== equals) if (existing._equals === equals && existing._record && existing._lane) {
|
|
255
|
+
const record = existing._record;
|
|
256
|
+
selectorRecords.delete(record._source);
|
|
257
|
+
record._source = source;
|
|
258
|
+
selectorRecords.set(source, record);
|
|
259
|
+
existing._source = source;
|
|
260
|
+
record._dirty = true;
|
|
261
|
+
recomputeSelectorSourceRecord(record, false);
|
|
262
|
+
ensureSelectorHookBinding(existing);
|
|
263
|
+
} else {
|
|
255
264
|
detachSelectorHookBinding(existing);
|
|
256
265
|
attachSelectorHookBinding(existing, source, equals);
|
|
257
|
-
}
|
|
266
|
+
}
|
|
267
|
+
else ensureSelectorHookBinding(existing);
|
|
258
268
|
return existing;
|
|
259
269
|
}
|
|
260
270
|
const created = createSelectorHook(instance, instance._ownershipGeneration, store, hookIndex, source, equals);
|
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-rdHAgyKe.js";
|
|
3
|
+
import { a as route } from "../authoring-DbGEgg40.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-C_Ql5_Kg.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.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { d as SSRDataMissingError } from "../render-context-D-DFk2WN.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-C_Ql5_Kg.js";
|
|
3
3
|
export { SSRDataMissingError, createRenderContext, getRenderContext, renderResolvedToStringSync, renderRouteRequest, renderRouteRequestToString, renderToStream, renderToString, renderToStringSync, resolveRequest, withRenderContext, withRenderContextAsync };
|
|
@@ -2,21 +2,21 @@ import { t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.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 { i as isFragmentType, n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
5
|
-
import { f as getExecutionContextFrame, h as markVNodeTreeWithContextFrame, l as callWithContext, n as createComponentInstance, p as getVNodeContextFrame } from "./component-internal-
|
|
5
|
+
import { f as getExecutionContextFrame, h as markVNodeTreeWithContextFrame, l as callWithContext, n as createComponentInstance, p as getVNodeContextFrame } from "./component-internal-DsM75Gl1.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 { _ as setControlBoundaryContextFrame, 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-DRbV0h1d.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-rdHAgyKe.js";
|
|
11
11
|
import { d as SSRDataMissingError, l as stopRenderPhase$1, s as startRenderPhase$1, t as configureRenderContextProvider } from "./render-context-D-DFk2WN.js";
|
|
12
|
-
import { a as resolveRouteFromRoutes, t as _resolveRouteMatchFromRoutes } from "./route-matching-
|
|
12
|
+
import { a as resolveRouteFromRoutes, t as _resolveRouteMatchFromRoutes } from "./route-matching-BUwz4kfl.js";
|
|
13
13
|
import { n as SSR_PORTAL_HOST, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
|
|
14
14
|
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-BZ_rN17v.js";
|
|
15
15
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
16
|
-
import { a as isSafeHref, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
16
|
+
import { a as isSafeHref, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-DDt0UNdt.js";
|
|
17
17
|
import { t as createDataRuntime } from "./data-runtime-D68YOo9L.js";
|
|
18
18
|
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-BL6rjGsO.js";
|
|
19
|
-
import { a as route } from "./authoring-
|
|
19
|
+
import { a as route } from "./authoring-DbGEgg40.js";
|
|
20
20
|
import { n as renderDocument, t as SSR_RENDER_DATA_ATTR } from "./ssr-CbQO5xd3.js";
|
|
21
21
|
//#region src/ssr/escape.ts
|
|
22
22
|
/**
|
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-BUwz4kfl.js";
|
|
3
3
|
import { l as addInvalidationListener } from "../data-runtime-D68YOo9L.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-CrpQQNAt.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-C_Ql5_Kg.js";
|
|
3
3
|
//#region src/ssr/verify-hydration.ts
|
|
4
4
|
function normalizeHydrationHtml(html) {
|
|
5
5
|
const template = document.createElement("template");
|