@workflow/web 5.3.1 → 5.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -34
- package/build/client/assets/app-CmaRLUwS.css +1 -0
- package/build/client/assets/arrow-up-right-AHTyWXU2.js +9 -0
- package/build/client/assets/{entry.client-DDsh88VE.js → entry.client-BqbaswKw.js} +13 -35
- package/build/client/assets/{highlighted-body-JLMTFACH-CWHg5f-6.js → highlighted-body-JLMTFACH-_kzpqYmW.js} +2 -2
- package/build/client/assets/{home-DZqYMSiD.js → home-DjUPTrY5.js} +91 -159
- package/build/client/assets/{index-BS6T0Zjc.js → index-BUQuaV5X.js} +108 -174
- package/build/client/assets/manifest-9126df65.js +1 -0
- package/build/client/assets/{mermaid-WFAXDIZX-BLO7Z8RE.js → mermaid-WFAXDIZX-CNo_0yWo.js} +1499 -4067
- package/build/client/assets/mermaid-WFAXDIZX-F88p7PFX.css +1 -0
- package/build/client/assets/meta-9cjJ0pVb.js +6 -0
- package/build/client/assets/{root-wdKzRZGT.js → root-Bh-E5He-.js} +17 -35
- package/build/client/assets/root-kJB77No4.css +1 -0
- package/build/client/assets/rpc-client-DL_nSX36.js +2481 -0
- package/build/client/assets/{run-detail-DyXpnv9C.js → run-detail-5dPVsaSm.js} +533 -807
- package/build/client/assets/run-usage-BEswHGKU.js +1252 -0
- package/build/client/assets/run-usage-C_wyncgV.js +33 -0
- package/build/client/assets/skeleton-DE14mNQw.js +76 -0
- package/build/client/assets/{url-state-DhOv2zv0.js → url-state-5GKQwo-f.js} +546 -857
- package/build/client/assets/{zstd-browser-decoder-BNeg7hxG.js → zstd-browser-decoder-CbTMLAMd.js} +2 -2
- package/build/server/assets/{app-CNGxG3wL.js → app-C-e60j14.js} +13627 -12777
- package/build/server/assets/{esm-CETb4fkq.js → esm-BzrGWk7J.js} +2 -2
- package/build/server/assets/{highlighted-body-JLMTFACH-Bj8JsfUl.js → highlighted-body-JLMTFACH-B7y0X_Kn.js} +1 -1
- package/build/server/assets/{index-DGn_6xEN.js → index-DRDsjR--.js} +398 -490
- package/build/server/assets/{mermaid-WFAXDIZX-C_v93dNU.js → mermaid-WFAXDIZX-MsPxEM1Y.js} +1 -1
- package/build/server/assets/{token-b1ZjKN2Q.js → token-CKgyaeCJ.js} +5 -5
- package/build/server/assets/{token-5fcfNNDG.js → token-DXh0TnqB.js} +6 -6
- package/build/server/assets/{token-util-BJhEZw83.js → token-util-CCc0uYVy.js} +2 -2
- package/build/server/assets/{token-util-spPPOelu.js → token-util-DOHYMq7D.js} +1 -1
- package/build/server/assets/{wrapper-Cc-ChiPM.js → wrapper-BzLz38Oh.js} +2 -2
- package/build/server/assets/{zstd-browser-decoder-y4X_FyMk.js → zstd-browser-decoder-BSSEC3XP.js} +1 -1
- package/build/server/index.js +1 -1
- package/handler.d.ts +9 -0
- package/handler.js +16 -2
- package/host-guard.js +179 -0
- package/package.json +9 -8
- package/server.d.ts +15 -1
- package/server.js +14 -1
- package/build/client/assets/app-BE8uqS_d.css +0 -1
- package/build/client/assets/arrow-up-right-CNHh1bh2.js +0 -15
- package/build/client/assets/manifest-f2e93220.js +0 -1
- package/build/client/assets/mermaid-WFAXDIZX-D8CjRQta.css +0 -1
- package/build/client/assets/root-BBptRWmF.css +0 -1
|
@@ -22,20 +22,11 @@ function getDefaultExportFromCjs(x) {
|
|
|
22
22
|
}
|
|
23
23
|
var jsxRuntime = { exports: {} };
|
|
24
24
|
var reactJsxRuntime_production = {};
|
|
25
|
-
/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-jsx-runtime.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/
|
|
34
25
|
var hasRequiredReactJsxRuntime_production;
|
|
35
26
|
function requireReactJsxRuntime_production() {
|
|
36
27
|
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
37
28
|
hasRequiredReactJsxRuntime_production = 1;
|
|
38
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
29
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
39
30
|
function jsxProd(type, config, maybeKey) {
|
|
40
31
|
var key = null;
|
|
41
32
|
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
@@ -71,20 +62,11 @@ function requireJsxRuntime() {
|
|
|
71
62
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
72
63
|
var react = { exports: {} };
|
|
73
64
|
var react_production = {};
|
|
74
|
-
/**
|
|
75
|
-
* @license React
|
|
76
|
-
* react.production.js
|
|
77
|
-
*
|
|
78
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the MIT license found in the
|
|
81
|
-
* LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/
|
|
83
65
|
var hasRequiredReact_production;
|
|
84
66
|
function requireReact_production() {
|
|
85
67
|
if (hasRequiredReact_production) return react_production;
|
|
86
68
|
hasRequiredReact_production = 1;
|
|
87
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
69
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
88
70
|
function getIteratorFn(maybeIterable) {
|
|
89
71
|
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
90
72
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
@@ -532,15 +514,6 @@ const React2 = /* @__PURE__ */ _mergeNamespaces({
|
|
|
532
514
|
}, [reactExports]);
|
|
533
515
|
var reactDom = { exports: {} };
|
|
534
516
|
var reactDom_production = {};
|
|
535
|
-
/**
|
|
536
|
-
* @license React
|
|
537
|
-
* react-dom.production.js
|
|
538
|
-
*
|
|
539
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
540
|
-
*
|
|
541
|
-
* This source code is licensed under the MIT license found in the
|
|
542
|
-
* LICENSE file in the root directory of this source tree.
|
|
543
|
-
*/
|
|
544
517
|
var hasRequiredReactDom_production;
|
|
545
518
|
function requireReactDom_production() {
|
|
546
519
|
if (hasRequiredReactDom_production) return reactDom_production;
|
|
@@ -573,7 +546,7 @@ function requireReactDom_production() {
|
|
|
573
546
|
},
|
|
574
547
|
p: 0,
|
|
575
548
|
findDOMNode: null
|
|
576
|
-
}, REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_RECOVERABLE_TYPE = Symbol.for("react.recoverable"), REACT_OPTIMISTIC_KEY = Symbol.for("react.optimistic_key");
|
|
549
|
+
}, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_RECOVERABLE_TYPE = /* @__PURE__ */ Symbol.for("react.recoverable"), REACT_OPTIMISTIC_KEY = /* @__PURE__ */ Symbol.for("react.optimistic_key");
|
|
577
550
|
function createPortal$1(children, containerInfo, implementation) {
|
|
578
551
|
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
|
579
552
|
return {
|
|
@@ -714,16 +687,6 @@ function requireReactDom() {
|
|
|
714
687
|
}
|
|
715
688
|
return reactDom.exports;
|
|
716
689
|
}
|
|
717
|
-
/**
|
|
718
|
-
* react-router v7.18.5
|
|
719
|
-
*
|
|
720
|
-
* Copyright (c) Remix Software Inc.
|
|
721
|
-
*
|
|
722
|
-
* This source code is licensed under the MIT license found in the
|
|
723
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
724
|
-
*
|
|
725
|
-
* @license MIT
|
|
726
|
-
*/
|
|
727
690
|
var __typeError = (msg) => {
|
|
728
691
|
throw TypeError(msg);
|
|
729
692
|
};
|
|
@@ -742,8 +705,7 @@ function isLocation(obj) {
|
|
|
742
705
|
}
|
|
743
706
|
function createBrowserHistory(options = {}) {
|
|
744
707
|
function createBrowserLocation(window2, globalHistory) {
|
|
745
|
-
|
|
746
|
-
let maskedLocation = (_a = globalHistory.state) == null ? void 0 : _a.masked;
|
|
708
|
+
let maskedLocation = globalHistory.state?.masked;
|
|
747
709
|
let { pathname, search, hash } = maskedLocation || window2.location;
|
|
748
710
|
return createLocation(
|
|
749
711
|
"",
|
|
@@ -1172,8 +1134,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
|
|
|
1172
1134
|
});
|
|
1173
1135
|
};
|
|
1174
1136
|
routes.forEach((route, index) => {
|
|
1175
|
-
|
|
1176
|
-
if (route.path === "" || !((_a = route.path) == null ? void 0 : _a.includes("?"))) {
|
|
1137
|
+
if (route.path === "" || !route.path?.includes("?")) {
|
|
1177
1138
|
flattenRoute(route, index);
|
|
1178
1139
|
} else {
|
|
1179
1140
|
for (let exploded of explodeOptionalSegments(route.path)) {
|
|
@@ -1600,7 +1561,7 @@ function parseToInfo(_to, basename) {
|
|
|
1600
1561
|
to
|
|
1601
1562
|
};
|
|
1602
1563
|
}
|
|
1603
|
-
var UninstrumentedSymbol = Symbol("Uninstrumented");
|
|
1564
|
+
var UninstrumentedSymbol = /* @__PURE__ */ Symbol("Uninstrumented");
|
|
1604
1565
|
function getRouteInstrumentationUpdates(fns, route) {
|
|
1605
1566
|
let aggregated = {
|
|
1606
1567
|
lazy: [],
|
|
@@ -1932,7 +1893,7 @@ var defaultMapRouteProperties = (route) => ({
|
|
|
1932
1893
|
hasErrorBoundary: Boolean(route.hasErrorBoundary)
|
|
1933
1894
|
});
|
|
1934
1895
|
var TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
|
|
1935
|
-
var ResetLoaderDataSymbol = Symbol("ResetLoaderData");
|
|
1896
|
+
var ResetLoaderDataSymbol = /* @__PURE__ */ Symbol("ResetLoaderData");
|
|
1936
1897
|
var _routes, _branches, _hmrRoutes, _hmrBranches;
|
|
1937
1898
|
var DataRoutes = class {
|
|
1938
1899
|
constructor(routes) {
|
|
@@ -2176,7 +2137,7 @@ function createRouter(init) {
|
|
|
2176
2137
|
updateState({ blockers });
|
|
2177
2138
|
}
|
|
2178
2139
|
});
|
|
2179
|
-
pendingPopstateNavigationDfd
|
|
2140
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
2180
2141
|
pendingPopstateNavigationDfd = null;
|
|
2181
2142
|
return;
|
|
2182
2143
|
}
|
|
@@ -2271,8 +2232,7 @@ function createRouter(init) {
|
|
|
2271
2232
|
mountedFetchers.forEach((key) => state.fetchers.delete(key));
|
|
2272
2233
|
}
|
|
2273
2234
|
function completeNavigation(location, newState, { flushSync } = {}) {
|
|
2274
|
-
|
|
2275
|
-
let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_a = location.state) == null ? void 0 : _a._isRedirect) !== true;
|
|
2235
|
+
let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && location.state?._isRedirect !== true;
|
|
2276
2236
|
let actionData;
|
|
2277
2237
|
if (newState.actionData) {
|
|
2278
2238
|
if (Object.keys(newState.actionData).length > 0) {
|
|
@@ -2297,7 +2257,7 @@ function createRouter(init) {
|
|
|
2297
2257
|
blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
|
|
2298
2258
|
}
|
|
2299
2259
|
let restoreScrollPosition = isUninterruptedRevalidation ? false : getSavedScrollPosition(location, newState.matches || state.matches);
|
|
2300
|
-
let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) &&
|
|
2260
|
+
let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && location.state?._isRedirect !== true;
|
|
2301
2261
|
dataRoutes.commitHmrRoutes();
|
|
2302
2262
|
if (isUninterruptedRevalidation) ;
|
|
2303
2263
|
else if (pendingAction === "POP") ;
|
|
@@ -2359,13 +2319,13 @@ function createRouter(init) {
|
|
|
2359
2319
|
pendingViewTransitionEnabled = false;
|
|
2360
2320
|
isUninterruptedRevalidation = false;
|
|
2361
2321
|
isRevalidationRequired = false;
|
|
2362
|
-
pendingPopstateNavigationDfd
|
|
2322
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
2363
2323
|
pendingPopstateNavigationDfd = null;
|
|
2364
|
-
pendingRevalidationDfd
|
|
2324
|
+
pendingRevalidationDfd?.resolve();
|
|
2365
2325
|
pendingRevalidationDfd = null;
|
|
2366
2326
|
}
|
|
2367
2327
|
async function navigate(to, opts) {
|
|
2368
|
-
pendingPopstateNavigationDfd
|
|
2328
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
2369
2329
|
pendingPopstateNavigationDfd = null;
|
|
2370
2330
|
if (typeof to === "number") {
|
|
2371
2331
|
if (!pendingPopstateNavigationDfd) {
|
|
@@ -2380,8 +2340,8 @@ function createRouter(init) {
|
|
|
2380
2340
|
state.matches,
|
|
2381
2341
|
basename,
|
|
2382
2342
|
to,
|
|
2383
|
-
opts
|
|
2384
|
-
opts
|
|
2343
|
+
opts?.fromRouteId,
|
|
2344
|
+
opts?.relative
|
|
2385
2345
|
);
|
|
2386
2346
|
let { path, submission, error } = normalizeNavigateOptions(
|
|
2387
2347
|
false,
|
|
@@ -2389,7 +2349,7 @@ function createRouter(init) {
|
|
|
2389
2349
|
opts
|
|
2390
2350
|
);
|
|
2391
2351
|
let maskPath;
|
|
2392
|
-
if (opts
|
|
2352
|
+
if (opts?.mask) {
|
|
2393
2353
|
let partialPath = typeof opts.mask === "string" ? parsePath(opts.mask) : {
|
|
2394
2354
|
...state.location.mask,
|
|
2395
2355
|
...opts.mask
|
|
@@ -2513,7 +2473,7 @@ function createRouter(init) {
|
|
|
2513
2473
|
pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
|
|
2514
2474
|
pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
|
|
2515
2475
|
let routesToUse = dataRoutes.activeRoutes;
|
|
2516
|
-
let matches =
|
|
2476
|
+
let matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
|
|
2517
2477
|
// `matchRoutes()` has already been called if we're in here via `router.initialize()`
|
|
2518
2478
|
state.matches
|
|
2519
2479
|
) : matchRoutesImpl(
|
|
@@ -3014,7 +2974,7 @@ function createRouter(init) {
|
|
|
3014
2974
|
basename,
|
|
3015
2975
|
href,
|
|
3016
2976
|
routeId,
|
|
3017
|
-
opts
|
|
2977
|
+
opts?.relative
|
|
3018
2978
|
);
|
|
3019
2979
|
let matches = matchRoutesImpl(
|
|
3020
2980
|
routesToUse,
|
|
@@ -3431,7 +3391,7 @@ function createRouter(init) {
|
|
|
3431
3391
|
replace: replace2
|
|
3432
3392
|
} = {}) {
|
|
3433
3393
|
if (!isNavigation) {
|
|
3434
|
-
pendingPopstateNavigationDfd
|
|
3394
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
3435
3395
|
pendingPopstateNavigationDfd = null;
|
|
3436
3396
|
}
|
|
3437
3397
|
if (redirect2.response.headers.has("X-Remix-Revalidate")) {
|
|
@@ -3510,7 +3470,6 @@ function createRouter(init) {
|
|
|
3510
3470
|
}
|
|
3511
3471
|
}
|
|
3512
3472
|
async function callDataStrategy(request, path, matches, scopedContext, fetcherKey) {
|
|
3513
|
-
var _a;
|
|
3514
3473
|
let results;
|
|
3515
3474
|
let dataResults = {};
|
|
3516
3475
|
try {
|
|
@@ -3537,7 +3496,7 @@ function createRouter(init) {
|
|
|
3537
3496
|
}
|
|
3538
3497
|
if (!isMutationMethod(request.method)) {
|
|
3539
3498
|
for (let match of matches) {
|
|
3540
|
-
if (
|
|
3499
|
+
if (results[match.route.id]?.type === "error") {
|
|
3541
3500
|
break;
|
|
3542
3501
|
}
|
|
3543
3502
|
if (!results.hasOwnProperty(match.route.id) && !state.loaderData.hasOwnProperty(match.route.id) && (!state.errors || !state.errors.hasOwnProperty(match.route.id)) && match.shouldCallHandler()) {
|
|
@@ -3650,7 +3609,7 @@ function createRouter(init) {
|
|
|
3650
3609
|
return state.fetchers.get(key) || IDLE_FETCHER;
|
|
3651
3610
|
}
|
|
3652
3611
|
function resetFetcher(key, opts) {
|
|
3653
|
-
abortFetcher(key, opts
|
|
3612
|
+
abortFetcher(key, opts?.reason);
|
|
3654
3613
|
updateFetcherState(key, getDoneFetcher(null));
|
|
3655
3614
|
}
|
|
3656
3615
|
function deleteFetcher(fetchers, key) {
|
|
@@ -4152,7 +4111,6 @@ function normalizeNavigateOptions(isFetcher, path, opts) {
|
|
|
4152
4111
|
return { path: createPath(parsedPath), submission };
|
|
4153
4112
|
}
|
|
4154
4113
|
function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest, history, state, matches, submission, location, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, hasPatchRoutesOnNavigation, branches, pendingActionResult, callSiteDefaultShouldRevalidate) {
|
|
4155
|
-
var _a;
|
|
4156
4114
|
let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0;
|
|
4157
4115
|
let currentUrl = history.createURL(state.location);
|
|
4158
4116
|
let nextUrl = history.createURL(location);
|
|
@@ -4168,7 +4126,7 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
|
|
|
4168
4126
|
let shouldSkipRevalidation = actionStatus && actionStatus >= 400;
|
|
4169
4127
|
let baseShouldRevalidateArgs = {
|
|
4170
4128
|
currentUrl,
|
|
4171
|
-
currentParams:
|
|
4129
|
+
currentParams: state.matches[0]?.params || {},
|
|
4172
4130
|
nextUrl,
|
|
4173
4131
|
nextParams: matches[0].params,
|
|
4174
4132
|
...submission,
|
|
@@ -4426,7 +4384,7 @@ function patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProper
|
|
|
4426
4384
|
let newRoutes = convertRoutesToDataRoutes(
|
|
4427
4385
|
uniqueChildren,
|
|
4428
4386
|
mapRouteProperties2,
|
|
4429
|
-
[routeId || "_", "patch", String(
|
|
4387
|
+
[routeId || "_", "patch", String(childrenToPatch?.length || "0")],
|
|
4430
4388
|
manifest
|
|
4431
4389
|
);
|
|
4432
4390
|
childrenToPatch.push(...newRoutes);
|
|
@@ -4456,7 +4414,6 @@ function patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProper
|
|
|
4456
4414
|
}
|
|
4457
4415
|
}
|
|
4458
4416
|
function isSameRoute(newRoute, existingRoute) {
|
|
4459
|
-
var _a;
|
|
4460
4417
|
if ("id" in newRoute && "id" in existingRoute && newRoute.id === existingRoute.id) {
|
|
4461
4418
|
return true;
|
|
4462
4419
|
}
|
|
@@ -4466,12 +4423,9 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
4466
4423
|
if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) {
|
|
4467
4424
|
return true;
|
|
4468
4425
|
}
|
|
4469
|
-
return
|
|
4470
|
-
(aChild, i) =>
|
|
4471
|
-
|
|
4472
|
-
return (_a2 = existingRoute.children) == null ? void 0 : _a2.some((bChild) => isSameRoute(aChild, bChild));
|
|
4473
|
-
}
|
|
4474
|
-
)) ?? false;
|
|
4426
|
+
return newRoute.children?.every(
|
|
4427
|
+
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
4428
|
+
) ?? false;
|
|
4475
4429
|
}
|
|
4476
4430
|
var lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap();
|
|
4477
4431
|
var loadLazyRouteProperty = ({
|
|
@@ -4618,9 +4572,9 @@ function loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRouteProp
|
|
|
4618
4572
|
}
|
|
4619
4573
|
let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {
|
|
4620
4574
|
}) : void 0;
|
|
4621
|
-
lazyRoutePromise
|
|
4575
|
+
lazyRoutePromise?.catch(() => {
|
|
4622
4576
|
});
|
|
4623
|
-
lazyHandlerPromise
|
|
4577
|
+
lazyHandlerPromise?.catch(() => {
|
|
4624
4578
|
});
|
|
4625
4579
|
return {
|
|
4626
4580
|
lazyRoutePromise,
|
|
@@ -4813,8 +4767,8 @@ function getDataStrategyMatch(mapRouteProperties2, manifest, request, path, patt
|
|
|
4813
4767
|
path,
|
|
4814
4768
|
pattern,
|
|
4815
4769
|
match,
|
|
4816
|
-
lazyHandlerPromise: _lazyPromises
|
|
4817
|
-
lazyRoutePromise: _lazyPromises
|
|
4770
|
+
lazyHandlerPromise: _lazyPromises?.handler,
|
|
4771
|
+
lazyRoutePromise: _lazyPromises?.route,
|
|
4818
4772
|
handlerOverride,
|
|
4819
4773
|
scopedContext
|
|
4820
4774
|
});
|
|
@@ -4856,14 +4810,8 @@ function getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request,
|
|
|
4856
4810
|
});
|
|
4857
4811
|
}
|
|
4858
4812
|
async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, scopedContext, isStaticHandler) {
|
|
4859
|
-
if (matches.some((m) => {
|
|
4860
|
-
|
|
4861
|
-
return (_a = m._lazyPromises) == null ? void 0 : _a.middleware;
|
|
4862
|
-
})) {
|
|
4863
|
-
await Promise.all(matches.map((m) => {
|
|
4864
|
-
var _a;
|
|
4865
|
-
return (_a = m._lazyPromises) == null ? void 0 : _a.middleware;
|
|
4866
|
-
}));
|
|
4813
|
+
if (matches.some((m) => m._lazyPromises?.middleware)) {
|
|
4814
|
+
await Promise.all(matches.map((m) => m._lazyPromises?.middleware));
|
|
4867
4815
|
}
|
|
4868
4816
|
let dataStrategyArgs = {
|
|
4869
4817
|
request,
|
|
@@ -4894,13 +4842,10 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
|
|
|
4894
4842
|
});
|
|
4895
4843
|
try {
|
|
4896
4844
|
await Promise.all(
|
|
4897
|
-
matches.flatMap((m) =>
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
(_b = m._lazyPromises) == null ? void 0 : _b.route
|
|
4902
|
-
];
|
|
4903
|
-
})
|
|
4845
|
+
matches.flatMap((m) => [
|
|
4846
|
+
m._lazyPromises?.handler,
|
|
4847
|
+
m._lazyPromises?.route
|
|
4848
|
+
])
|
|
4904
4849
|
);
|
|
4905
4850
|
} catch (e) {
|
|
4906
4851
|
}
|
|
@@ -5017,7 +4962,6 @@ async function parseResponseBody(response) {
|
|
|
5017
4962
|
return response.text();
|
|
5018
4963
|
}
|
|
5019
4964
|
async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
5020
|
-
var _a, _b, _c, _d, _e;
|
|
5021
4965
|
let { result, type } = dataStrategyResult;
|
|
5022
4966
|
if (isResponse(result)) {
|
|
5023
4967
|
let data2;
|
|
@@ -5047,15 +4991,15 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
|
5047
4991
|
return {
|
|
5048
4992
|
type: "error",
|
|
5049
4993
|
error: result.data,
|
|
5050
|
-
statusCode:
|
|
5051
|
-
headers:
|
|
4994
|
+
statusCode: result.init?.status,
|
|
4995
|
+
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
5052
4996
|
};
|
|
5053
4997
|
}
|
|
5054
4998
|
return {
|
|
5055
4999
|
type: "error",
|
|
5056
5000
|
error: dataWithResponseInitToErrorResponse(result),
|
|
5057
5001
|
statusCode: isRouteErrorResponse(result) ? result.status : void 0,
|
|
5058
|
-
headers:
|
|
5002
|
+
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
5059
5003
|
};
|
|
5060
5004
|
}
|
|
5061
5005
|
return {
|
|
@@ -5068,8 +5012,8 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
|
5068
5012
|
return {
|
|
5069
5013
|
type: "data",
|
|
5070
5014
|
data: result.data,
|
|
5071
|
-
statusCode:
|
|
5072
|
-
headers:
|
|
5015
|
+
statusCode: result.init?.status,
|
|
5016
|
+
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
5073
5017
|
};
|
|
5074
5018
|
}
|
|
5075
5019
|
return { type: "data", data: result };
|
|
@@ -5268,7 +5212,7 @@ function processLoaderData(state, matches, results, pendingActionResult, revalid
|
|
|
5268
5212
|
let result = fetcherResults[key];
|
|
5269
5213
|
invariant(result, "Did not find corresponding fetcher result");
|
|
5270
5214
|
if (isErrorResult(result)) {
|
|
5271
|
-
let boundaryMatch = findNearestBoundary(state.matches, match
|
|
5215
|
+
let boundaryMatch = findNearestBoundary(state.matches, match?.route.id);
|
|
5272
5216
|
if (!(errors && errors[boundaryMatch.route.id])) {
|
|
5273
5217
|
errors = {
|
|
5274
5218
|
...errors,
|
|
@@ -5398,10 +5342,9 @@ function isHashChangeOnly(a, b) {
|
|
|
5398
5342
|
return false;
|
|
5399
5343
|
}
|
|
5400
5344
|
function dataWithResponseInitToErrorResponse(data2) {
|
|
5401
|
-
var _a, _b;
|
|
5402
5345
|
return new ErrorResponseImpl(
|
|
5403
|
-
|
|
5404
|
-
|
|
5346
|
+
data2.init?.status ?? 500,
|
|
5347
|
+
data2.init?.statusText ?? "Internal Server Error",
|
|
5405
5348
|
data2.data
|
|
5406
5349
|
);
|
|
5407
5350
|
}
|
|
@@ -5805,6 +5748,9 @@ function useNavigateUnstable() {
|
|
|
5805
5748
|
return navigate;
|
|
5806
5749
|
}
|
|
5807
5750
|
var OutletContext = reactExports.createContext(null);
|
|
5751
|
+
function useOutletContext() {
|
|
5752
|
+
return reactExports.useContext(OutletContext);
|
|
5753
|
+
}
|
|
5808
5754
|
function useOutlet(context) {
|
|
5809
5755
|
let outlet = reactExports.useContext(RouteContext).outlet;
|
|
5810
5756
|
return reactExports.useMemo(
|
|
@@ -5815,7 +5761,7 @@ function useOutlet(context) {
|
|
|
5815
5761
|
function useParams() {
|
|
5816
5762
|
let { matches } = reactExports.useContext(RouteContext);
|
|
5817
5763
|
let routeMatch = matches[matches.length - 1];
|
|
5818
|
-
return
|
|
5764
|
+
return routeMatch?.params ?? {};
|
|
5819
5765
|
}
|
|
5820
5766
|
function useResolvedPath(to, { relative } = {}) {
|
|
5821
5767
|
let { matches } = reactExports.useContext(RouteContext);
|
|
@@ -6039,7 +5985,7 @@ function RenderedRoute({ routeContext, match, children }) {
|
|
|
6039
5985
|
return /* @__PURE__ */ reactExports.createElement(RouteContext.Provider, { value: routeContext }, children);
|
|
6040
5986
|
}
|
|
6041
5987
|
function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
6042
|
-
let dataRouterState = dataRouterOpts
|
|
5988
|
+
let dataRouterState = dataRouterOpts?.state;
|
|
6043
5989
|
if (matches == null) {
|
|
6044
5990
|
if (!dataRouterState) {
|
|
6045
5991
|
return null;
|
|
@@ -6053,10 +5999,10 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
|
6053
5999
|
}
|
|
6054
6000
|
}
|
|
6055
6001
|
let renderedMatches = matches;
|
|
6056
|
-
let errors = dataRouterState
|
|
6002
|
+
let errors = dataRouterState?.errors;
|
|
6057
6003
|
if (errors != null) {
|
|
6058
6004
|
let errorIndex = renderedMatches.findIndex(
|
|
6059
|
-
(m) => m.route.id &&
|
|
6005
|
+
(m) => m.route.id && errors?.[m.route.id] !== void 0
|
|
6060
6006
|
);
|
|
6061
6007
|
invariant(
|
|
6062
6008
|
errorIndex >= 0,
|
|
@@ -6095,12 +6041,11 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
|
6095
6041
|
}
|
|
6096
6042
|
}
|
|
6097
6043
|
}
|
|
6098
|
-
let onErrorHandler = dataRouterOpts
|
|
6044
|
+
let onErrorHandler = dataRouterOpts?.onError;
|
|
6099
6045
|
let onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {
|
|
6100
|
-
var _a, _b;
|
|
6101
6046
|
onErrorHandler(error, {
|
|
6102
6047
|
location: dataRouterState.location,
|
|
6103
|
-
params:
|
|
6048
|
+
params: dataRouterState.matches?.[0]?.params ?? {},
|
|
6104
6049
|
pattern: getRoutePattern(dataRouterState.matches),
|
|
6105
6050
|
errorInfo
|
|
6106
6051
|
});
|
|
@@ -6248,7 +6193,6 @@ function useActionData() {
|
|
|
6248
6193
|
return state.actionData ? state.actionData[routeId] : void 0;
|
|
6249
6194
|
}
|
|
6250
6195
|
function useRouteError() {
|
|
6251
|
-
var _a;
|
|
6252
6196
|
let error = reactExports.useContext(RouteErrorContext);
|
|
6253
6197
|
let state = useDataRouterState(
|
|
6254
6198
|
"useRouteError"
|
|
@@ -6261,7 +6205,7 @@ function useRouteError() {
|
|
|
6261
6205
|
if (error !== void 0) {
|
|
6262
6206
|
return error;
|
|
6263
6207
|
}
|
|
6264
|
-
return
|
|
6208
|
+
return state.errors?.[routeId];
|
|
6265
6209
|
}
|
|
6266
6210
|
function useNavigateStable() {
|
|
6267
6211
|
let { router } = useDataRouterContext(
|
|
@@ -6409,14 +6353,11 @@ function RouterProvider({
|
|
|
6409
6353
|
(newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {
|
|
6410
6354
|
if (newErrors && onError) {
|
|
6411
6355
|
Object.values(newErrors).forEach(
|
|
6412
|
-
(error) => {
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
pattern: getRoutePattern(newState.matches)
|
|
6418
|
-
});
|
|
6419
|
-
}
|
|
6356
|
+
(error) => onError(error, {
|
|
6357
|
+
location: newState.location,
|
|
6358
|
+
params: newState.matches[0]?.params ?? {},
|
|
6359
|
+
pattern: getRoutePattern(newState.matches)
|
|
6360
|
+
})
|
|
6420
6361
|
);
|
|
6421
6362
|
}
|
|
6422
6363
|
newState.fetchers.forEach((fetcher, key) => {
|
|
@@ -6452,7 +6393,7 @@ function RouterProvider({
|
|
|
6452
6393
|
if (reactDomFlushSyncImpl && flushSync) {
|
|
6453
6394
|
reactDomFlushSyncImpl(() => {
|
|
6454
6395
|
if (transition) {
|
|
6455
|
-
renderDfd
|
|
6396
|
+
renderDfd?.resolve();
|
|
6456
6397
|
transition.skipTransition();
|
|
6457
6398
|
}
|
|
6458
6399
|
setVtContext({
|
|
@@ -6477,7 +6418,7 @@ function RouterProvider({
|
|
|
6477
6418
|
return;
|
|
6478
6419
|
}
|
|
6479
6420
|
if (transition) {
|
|
6480
|
-
renderDfd
|
|
6421
|
+
renderDfd?.resolve();
|
|
6481
6422
|
transition.skipTransition();
|
|
6482
6423
|
setInterruption({
|
|
6483
6424
|
state: newState,
|
|
@@ -6567,12 +6508,12 @@ function RouterProvider({
|
|
|
6567
6508
|
go: (n) => router.navigate(n),
|
|
6568
6509
|
push: (to, state2, opts) => router.navigate(to, {
|
|
6569
6510
|
state: state2,
|
|
6570
|
-
preventScrollReset: opts
|
|
6511
|
+
preventScrollReset: opts?.preventScrollReset
|
|
6571
6512
|
}),
|
|
6572
6513
|
replace: (to, state2, opts) => router.navigate(to, {
|
|
6573
6514
|
replace: true,
|
|
6574
6515
|
state: state2,
|
|
6575
|
-
preventScrollReset: opts
|
|
6516
|
+
preventScrollReset: opts?.preventScrollReset
|
|
6576
6517
|
})
|
|
6577
6518
|
};
|
|
6578
6519
|
}, [router]);
|
|
@@ -7267,7 +7208,7 @@ function invariant2(value, message) {
|
|
|
7267
7208
|
throw new Error(message);
|
|
7268
7209
|
}
|
|
7269
7210
|
}
|
|
7270
|
-
var SingleFetchRedirectSymbol = Symbol("SingleFetchRedirect");
|
|
7211
|
+
var SingleFetchRedirectSymbol = /* @__PURE__ */ Symbol("SingleFetchRedirect");
|
|
7271
7212
|
var SingleFetchNoResultError = class extends Error {
|
|
7272
7213
|
};
|
|
7273
7214
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
@@ -7471,7 +7412,6 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
|
|
|
7471
7412
|
return results;
|
|
7472
7413
|
}
|
|
7473
7414
|
async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams, results) {
|
|
7474
|
-
var _a;
|
|
7475
7415
|
try {
|
|
7476
7416
|
let middlewareError;
|
|
7477
7417
|
let fetchedData = await singleFetchPromise;
|
|
@@ -7481,7 +7421,7 @@ async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams,
|
|
|
7481
7421
|
let routeResult = fetchedData.routes[match.route.id];
|
|
7482
7422
|
if ("error" in routeResult) {
|
|
7483
7423
|
middlewareError = routeResult.error;
|
|
7484
|
-
if (
|
|
7424
|
+
if (results[match.route.id]?.result == null) {
|
|
7485
7425
|
results[match.route.id] = {
|
|
7486
7426
|
type: "error",
|
|
7487
7427
|
result: middlewareError
|
|
@@ -7604,7 +7544,7 @@ async function fetchAndDecodeViaTurboStream(args, basename, trailingSlashAware,
|
|
|
7604
7544
|
}
|
|
7605
7545
|
} else {
|
|
7606
7546
|
let typed = decoded.value;
|
|
7607
|
-
let routeId = targetRoutes
|
|
7547
|
+
let routeId = targetRoutes?.[0];
|
|
7608
7548
|
invariant2(routeId, "No routeId found for single fetch call decoding");
|
|
7609
7549
|
if ("redirect" in typed) {
|
|
7610
7550
|
data2 = { redirect: typed };
|
|
@@ -7736,12 +7676,11 @@ async function loadRouteModule(route, routeModulesCache) {
|
|
|
7736
7676
|
}
|
|
7737
7677
|
function getKeyedLinksForMatches(matches, routeModules, manifest) {
|
|
7738
7678
|
let descriptors = matches.map((match) => {
|
|
7739
|
-
var _a;
|
|
7740
7679
|
let module = routeModules[match.route.id];
|
|
7741
7680
|
let route = manifest.routes[match.route.id];
|
|
7742
7681
|
return [
|
|
7743
7682
|
route && route.css ? route.css.map((href) => ({ rel: "stylesheet", href })) : [],
|
|
7744
|
-
|
|
7683
|
+
module?.links?.() || []
|
|
7745
7684
|
];
|
|
7746
7685
|
}).flat(2);
|
|
7747
7686
|
let preloads = getModuleLinkHrefs(matches, manifest);
|
|
@@ -7838,12 +7777,11 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
|
|
|
7838
7777
|
return match.route.id !== currentMatches[index].route.id;
|
|
7839
7778
|
};
|
|
7840
7779
|
let matchPathChanged = (match, index) => {
|
|
7841
|
-
var _a;
|
|
7842
7780
|
return (
|
|
7843
7781
|
// param change, /users/123 -> /users/456
|
|
7844
7782
|
currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
|
|
7845
7783
|
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
7846
|
-
|
|
7784
|
+
currentMatches[index].route.path?.endsWith("*") && currentMatches[index].params["*"] !== match.params["*"]
|
|
7847
7785
|
);
|
|
7848
7786
|
};
|
|
7849
7787
|
if (mode === "assets") {
|
|
@@ -7853,7 +7791,6 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
|
|
|
7853
7791
|
}
|
|
7854
7792
|
if (mode === "data") {
|
|
7855
7793
|
return nextMatches.filter((match, index) => {
|
|
7856
|
-
var _a;
|
|
7857
7794
|
let manifestRoute = manifest.routes[match.route.id];
|
|
7858
7795
|
if (!manifestRoute || !manifestRoute.hasLoader) {
|
|
7859
7796
|
return false;
|
|
@@ -7867,7 +7804,7 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
|
|
|
7867
7804
|
location.pathname + location.search + location.hash,
|
|
7868
7805
|
window.origin
|
|
7869
7806
|
),
|
|
7870
|
-
currentParams:
|
|
7807
|
+
currentParams: currentMatches[0]?.params || {},
|
|
7871
7808
|
nextUrl: new URL(page, window.origin),
|
|
7872
7809
|
nextParams: match.params,
|
|
7873
7810
|
defaultShouldRevalidate: true
|
|
@@ -8019,7 +7956,6 @@ function noActionDefinedError(type, routeId) {
|
|
|
8019
7956
|
}
|
|
8020
7957
|
function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {
|
|
8021
7958
|
return (routesByParentId[parentId] || []).map((route) => {
|
|
8022
|
-
var _a, _b, _c;
|
|
8023
7959
|
let routeModule = routeModulesCache[route.id];
|
|
8024
7960
|
function fetchServerHandler(singleFetch) {
|
|
8025
7961
|
invariant2(
|
|
@@ -8082,10 +8018,10 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
8082
8018
|
)
|
|
8083
8019
|
});
|
|
8084
8020
|
let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;
|
|
8085
|
-
let initialData = hasInitialData ?
|
|
8021
|
+
let initialData = hasInitialData ? initialState?.loaderData?.[route.id] : void 0;
|
|
8086
8022
|
let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;
|
|
8087
|
-
let initialError = hasInitialError ?
|
|
8088
|
-
let isHydrationRequest = needsRevalidation == null && (
|
|
8023
|
+
let initialError = hasInitialError ? initialState?.errors?.[route.id] : void 0;
|
|
8024
|
+
let isHydrationRequest = needsRevalidation == null && (routeModule.clientLoader?.hydrate === true || !route.hasLoader);
|
|
8089
8025
|
dataRoute.loader = async ({ request, params, context, pattern, url }, singleFetch) => {
|
|
8090
8026
|
let _isHydrationRequest = isHydrationRequest;
|
|
8091
8027
|
isHydrationRequest = false;
|
|
@@ -8398,9 +8334,8 @@ function getPatchRoutesOnNavigationFunction(getRouter, manifest, routeModules, s
|
|
|
8398
8334
|
}
|
|
8399
8335
|
function useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscovery, isSpaMode) {
|
|
8400
8336
|
reactExports.useEffect(() => {
|
|
8401
|
-
var _a, _b;
|
|
8402
8337
|
if (!isFogOfWarEnabled(routeDiscovery, ssr) || // @ts-expect-error - TS doesn't know about this yet
|
|
8403
|
-
|
|
8338
|
+
window.navigator?.connection?.saveData === true) {
|
|
8404
8339
|
return;
|
|
8405
8340
|
}
|
|
8406
8341
|
function registerElement(el) {
|
|
@@ -8507,7 +8442,7 @@ async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, ro
|
|
|
8507
8442
|
}
|
|
8508
8443
|
serverPatches = await res.json();
|
|
8509
8444
|
} catch (e) {
|
|
8510
|
-
if (signal
|
|
8445
|
+
if (signal?.aborted) return;
|
|
8511
8446
|
throw e;
|
|
8512
8447
|
}
|
|
8513
8448
|
let knownRoutes = new Set(Object.keys(manifest.routes));
|
|
@@ -8817,12 +8752,11 @@ function PrefetchPageLinksImpl({
|
|
|
8817
8752
|
let routesParams = /* @__PURE__ */ new Set();
|
|
8818
8753
|
let foundOptOutRoute = false;
|
|
8819
8754
|
nextMatches.forEach((m) => {
|
|
8820
|
-
var _a;
|
|
8821
8755
|
let manifestRoute = manifest.routes[m.route.id];
|
|
8822
8756
|
if (!manifestRoute || !manifestRoute.hasLoader) {
|
|
8823
8757
|
return;
|
|
8824
8758
|
}
|
|
8825
|
-
if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData &&
|
|
8759
|
+
if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) {
|
|
8826
8760
|
foundOptOutRoute = true;
|
|
8827
8761
|
} else if (manifestRoute.hasClientLoader) {
|
|
8828
8762
|
foundOptOutRoute = true;
|
|
@@ -8910,7 +8844,7 @@ function Meta() {
|
|
|
8910
8844
|
error
|
|
8911
8845
|
};
|
|
8912
8846
|
matches[i] = match;
|
|
8913
|
-
if (routeModule
|
|
8847
|
+
if (routeModule?.meta) {
|
|
8914
8848
|
routeMeta = typeof routeModule.meta === "function" ? routeModule.meta({
|
|
8915
8849
|
data: data2,
|
|
8916
8850
|
loaderData: data2,
|
|
@@ -9008,13 +8942,12 @@ function Scripts(scriptProps) {
|
|
|
9008
8942
|
setIsHydrated();
|
|
9009
8943
|
}, []);
|
|
9010
8944
|
let initialScripts = reactExports.useMemo(() => {
|
|
9011
|
-
var _a;
|
|
9012
8945
|
if (isRSCRouterContext) {
|
|
9013
8946
|
return null;
|
|
9014
8947
|
}
|
|
9015
8948
|
let streamScript = "window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());";
|
|
9016
8949
|
let contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};${streamScript}` : " ";
|
|
9017
|
-
let routeModulesScript = !isStatic ? " " : `${
|
|
8950
|
+
let routeModulesScript = !isStatic ? " " : `${manifest.hmr?.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
|
|
9018
8951
|
${matches.map((match, routeIndex) => {
|
|
9019
8952
|
let routeVarName = `route${routeIndex}`;
|
|
9020
8953
|
let manifestEntry = manifest.routes[match.route.id];
|
|
@@ -9247,9 +9180,8 @@ function BoundaryShell({
|
|
|
9247
9180
|
isOutsideRemixApp,
|
|
9248
9181
|
children
|
|
9249
9182
|
}) {
|
|
9250
|
-
var _a;
|
|
9251
9183
|
let { routeModules } = useFrameworkContext();
|
|
9252
|
-
if (
|
|
9184
|
+
if (routeModules.root?.Layout && !isOutsideRemixApp) {
|
|
9253
9185
|
return children;
|
|
9254
9186
|
}
|
|
9255
9187
|
return /* @__PURE__ */ reactExports.createElement("html", { lang: "en" }, /* @__PURE__ */ reactExports.createElement("head", null, /* @__PURE__ */ reactExports.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ reactExports.createElement(
|
|
@@ -9439,7 +9371,7 @@ var Form = reactExports.forwardRef(
|
|
|
9439
9371
|
if (event.defaultPrevented) return;
|
|
9440
9372
|
event.preventDefault();
|
|
9441
9373
|
let submitter = event.nativeEvent.submitter;
|
|
9442
|
-
let submitMethod =
|
|
9374
|
+
let submitMethod = submitter?.getAttribute("formmethod") || method;
|
|
9443
9375
|
let doSubmit = () => submit(submitter || event.currentTarget, {
|
|
9444
9376
|
fetcherKey,
|
|
9445
9377
|
method: submitMethod,
|
|
@@ -9515,7 +9447,7 @@ function ScrollRestoration({
|
|
|
9515
9447
|
sessionStorage.removeItem(storageKey2);
|
|
9516
9448
|
}
|
|
9517
9449
|
}).toString();
|
|
9518
|
-
if (props.nonce == null &&
|
|
9450
|
+
if (props.nonce == null && remixContext?.nonce) {
|
|
9519
9451
|
props.nonce = remixContext.nonce;
|
|
9520
9452
|
}
|
|
9521
9453
|
return /* @__PURE__ */ reactExports.createElement(
|
|
@@ -9781,7 +9713,7 @@ function useScrollRestoration({
|
|
|
9781
9713
|
}
|
|
9782
9714
|
}, [storageKey]);
|
|
9783
9715
|
reactExports.useLayoutEffect(() => {
|
|
9784
|
-
let disableScrollRestoration = router
|
|
9716
|
+
let disableScrollRestoration = router?.enableScrollRestoration(
|
|
9785
9717
|
savedScrollPositions,
|
|
9786
9718
|
() => window.scrollY,
|
|
9787
9719
|
getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0
|
|
@@ -9852,15 +9784,17 @@ function useViewTransitionState(to, { relative } = {}) {
|
|
|
9852
9784
|
var reactDomExports = requireReactDom();
|
|
9853
9785
|
const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(reactDomExports);
|
|
9854
9786
|
export {
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9787
|
+
useRouteError as A,
|
|
9788
|
+
useNavigate as B,
|
|
9789
|
+
useSearchParams as C,
|
|
9790
|
+
useLocation as D,
|
|
9791
|
+
useOutlet as E,
|
|
9860
9792
|
FrameworkContext as F,
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
|
|
9793
|
+
useParams as G,
|
|
9794
|
+
React2 as H,
|
|
9795
|
+
getDefaultExportFromCjs as I,
|
|
9796
|
+
ReactDOM as J,
|
|
9797
|
+
Link as L,
|
|
9864
9798
|
Meta as M,
|
|
9865
9799
|
NO_BODY_STATUS_CODES as N,
|
|
9866
9800
|
Outlet as O,
|
|
@@ -9869,27 +9803,27 @@ export {
|
|
|
9869
9803
|
requireReact as a,
|
|
9870
9804
|
requireReactDom as b,
|
|
9871
9805
|
invariant as c,
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9876
|
-
|
|
9806
|
+
useFogOFWarDiscovery as d,
|
|
9807
|
+
RemixErrorBoundary as e,
|
|
9808
|
+
RouterProvider as f,
|
|
9809
|
+
reactDomExports as g,
|
|
9810
|
+
decodeViaTurboStream as h,
|
|
9877
9811
|
isRouteErrorResponse as i,
|
|
9878
9812
|
jsxRuntimeExports as j,
|
|
9879
|
-
|
|
9880
|
-
|
|
9813
|
+
createClientRoutes as k,
|
|
9814
|
+
createRouter as l,
|
|
9881
9815
|
matchRoutes as m,
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9816
|
+
getPatchRoutesOnNavigationFunction as n,
|
|
9817
|
+
getTurboStreamSingleFetchDataStrategy as o,
|
|
9818
|
+
createBrowserHistory as p,
|
|
9819
|
+
createClientRoutesWithHMRRevalidationOptOut as q,
|
|
9886
9820
|
reactExports as r,
|
|
9887
9821
|
shouldHydrateRouteLoader as s,
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9822
|
+
mapRouteProperties as t,
|
|
9823
|
+
useOutletContext as u,
|
|
9824
|
+
hydrationRouteProperties as v,
|
|
9891
9825
|
withComponentProps as w,
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
|
|
9826
|
+
withErrorBoundaryProps as x,
|
|
9827
|
+
Links as y,
|
|
9828
|
+
Scripts as z
|
|
9895
9829
|
};
|