@workflow/web 4.1.34 → 4.1.35
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/build/client/assets/{encryption-Cu4jq70Y.js → encryption-BhH0xZid.js} +2 -2
- package/build/client/assets/{entry.client-C7XgFTHI.js → entry.client-CaUKWFDB.js} +13 -35
- package/build/client/assets/{highlighted-body-B3W2YXNL-CK5bxjZc.js → highlighted-body-B3W2YXNL-D5wXP22M.js} +2 -2
- package/build/client/assets/{home-vGjXNC_q.js → home-CjokEfcx.js} +92 -164
- package/build/client/assets/{index-BQ-Xa8kF.js → index-BbkkdbNz.js} +78 -149
- package/build/client/assets/{index-CXBr7N7m.js → index-DY3Cy2uF.js} +20 -23
- package/build/client/assets/{manifest-5d325d67.js → manifest-cbe27963.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-CCVNMOf9.js → mermaid-3ZIDBTTL-8p93TMNC.js} +315 -479
- package/build/client/assets/mermaid-3ZIDBTTL-DHICBbcE.css +1 -0
- package/build/client/assets/{root-DjobWPwY.js → root-D-ZCwNhI.js} +5 -35
- package/build/client/assets/root-DzrclYrK.css +1 -0
- package/build/client/assets/{run-detail-nLEl00wq.js → run-detail-H0o7UsyU.js} +141 -205
- package/build/client/assets/server-build-DMZyIeNn.css +1 -0
- package/build/client/assets/{worker-CqHKTA7D.js → worker-DxRAeS-i.js} +2 -2
- package/build/client/assets/{workflow-graph-viewer-CTw33ANm.js → workflow-graph-viewer-C-MZ2XPV.js} +466 -723
- package/build/server/assets/{app-CYvC9qzx.js → app-BX9dMsx4.js} +67 -153
- package/build/server/assets/{highlighted-body-B3W2YXNL-rgouBaKE.js → highlighted-body-B3W2YXNL-CHc9_Xzp.js} +2 -2
- package/build/server/assets/{index-BUlN7QFn.js → index-BC_EEwAS.js} +2 -2
- package/build/server/assets/{index-DTsZ56KK.js → index-BNN2zck_.js} +3 -3
- package/build/server/assets/{index-CMfOrLiJ.js → index-C-y3EhAf.js} +25 -32
- package/build/server/assets/{mermaid-3ZIDBTTL-DrSJagSv.js → mermaid-3ZIDBTTL-CP_u5jLd.js} +2 -2
- package/build/server/assets/{server-build-Bx0fBara.js → server-build-C0EUGBN0.js} +6483 -7670
- package/build/server/assets/{token-3JN9PPgD.js → token-DYdYwRhs.js} +6 -6
- package/build/server/assets/{token-util-Dq4hPEUy.js → token-util-BZHkMK_T.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +4 -4
- package/build/client/assets/mermaid-3ZIDBTTL-yyHEMZs4.css +0 -1
- package/build/client/assets/root-BOS11TzD.css +0 -1
- package/build/client/assets/server-build-CNEy-GiI.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"), 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"), 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"];
|
|
@@ -527,15 +509,6 @@ const React = /* @__PURE__ */ _mergeNamespaces({
|
|
|
527
509
|
}, [reactExports]);
|
|
528
510
|
var reactDom = { exports: {} };
|
|
529
511
|
var reactDom_production = {};
|
|
530
|
-
/**
|
|
531
|
-
* @license React
|
|
532
|
-
* react-dom.production.js
|
|
533
|
-
*
|
|
534
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
535
|
-
*
|
|
536
|
-
* This source code is licensed under the MIT license found in the
|
|
537
|
-
* LICENSE file in the root directory of this source tree.
|
|
538
|
-
*/
|
|
539
512
|
var hasRequiredReactDom_production;
|
|
540
513
|
function requireReactDom_production() {
|
|
541
514
|
if (hasRequiredReactDom_production) return reactDom_production;
|
|
@@ -568,7 +541,7 @@ function requireReactDom_production() {
|
|
|
568
541
|
},
|
|
569
542
|
p: 0,
|
|
570
543
|
findDOMNode: null
|
|
571
|
-
}, REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
544
|
+
}, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
572
545
|
function createPortal$1(children, containerInfo, implementation) {
|
|
573
546
|
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
|
574
547
|
return {
|
|
@@ -703,16 +676,6 @@ function requireReactDom() {
|
|
|
703
676
|
}
|
|
704
677
|
return reactDom.exports;
|
|
705
678
|
}
|
|
706
|
-
/**
|
|
707
|
-
* react-router v7.18.4
|
|
708
|
-
*
|
|
709
|
-
* Copyright (c) Remix Software Inc.
|
|
710
|
-
*
|
|
711
|
-
* This source code is licensed under the MIT license found in the
|
|
712
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
713
|
-
*
|
|
714
|
-
* @license MIT
|
|
715
|
-
*/
|
|
716
679
|
var __typeError = (msg) => {
|
|
717
680
|
throw TypeError(msg);
|
|
718
681
|
};
|
|
@@ -731,8 +694,7 @@ function isLocation(obj) {
|
|
|
731
694
|
}
|
|
732
695
|
function createBrowserHistory(options = {}) {
|
|
733
696
|
function createBrowserLocation(window2, globalHistory) {
|
|
734
|
-
|
|
735
|
-
let maskedLocation = (_a = globalHistory.state) == null ? void 0 : _a.masked;
|
|
697
|
+
let maskedLocation = globalHistory.state?.masked;
|
|
736
698
|
let { pathname, search, hash } = maskedLocation || window2.location;
|
|
737
699
|
return createLocation(
|
|
738
700
|
"",
|
|
@@ -1161,8 +1123,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
|
|
|
1161
1123
|
});
|
|
1162
1124
|
};
|
|
1163
1125
|
routes.forEach((route, index) => {
|
|
1164
|
-
|
|
1165
|
-
if (route.path === "" || !((_a = route.path) == null ? void 0 : _a.includes("?"))) {
|
|
1126
|
+
if (route.path === "" || !route.path?.includes("?")) {
|
|
1166
1127
|
flattenRoute(route, index);
|
|
1167
1128
|
} else {
|
|
1168
1129
|
for (let exploded of explodeOptionalSegments(route.path)) {
|
|
@@ -1589,7 +1550,7 @@ function parseToInfo(_to, basename) {
|
|
|
1589
1550
|
to
|
|
1590
1551
|
};
|
|
1591
1552
|
}
|
|
1592
|
-
var UninstrumentedSymbol = Symbol("Uninstrumented");
|
|
1553
|
+
var UninstrumentedSymbol = /* @__PURE__ */ Symbol("Uninstrumented");
|
|
1593
1554
|
function getRouteInstrumentationUpdates(fns, route) {
|
|
1594
1555
|
let aggregated = {
|
|
1595
1556
|
lazy: [],
|
|
@@ -1921,7 +1882,7 @@ var defaultMapRouteProperties = (route) => ({
|
|
|
1921
1882
|
hasErrorBoundary: Boolean(route.hasErrorBoundary)
|
|
1922
1883
|
});
|
|
1923
1884
|
var TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
|
|
1924
|
-
var ResetLoaderDataSymbol = Symbol("ResetLoaderData");
|
|
1885
|
+
var ResetLoaderDataSymbol = /* @__PURE__ */ Symbol("ResetLoaderData");
|
|
1925
1886
|
var _routes, _branches, _hmrRoutes, _hmrBranches;
|
|
1926
1887
|
var DataRoutes = class {
|
|
1927
1888
|
constructor(routes) {
|
|
@@ -2165,7 +2126,7 @@ function createRouter(init) {
|
|
|
2165
2126
|
updateState({ blockers });
|
|
2166
2127
|
}
|
|
2167
2128
|
});
|
|
2168
|
-
pendingPopstateNavigationDfd
|
|
2129
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
2169
2130
|
pendingPopstateNavigationDfd = null;
|
|
2170
2131
|
return;
|
|
2171
2132
|
}
|
|
@@ -2260,8 +2221,7 @@ function createRouter(init) {
|
|
|
2260
2221
|
mountedFetchers.forEach((key) => state.fetchers.delete(key));
|
|
2261
2222
|
}
|
|
2262
2223
|
function completeNavigation(location, newState, { flushSync } = {}) {
|
|
2263
|
-
|
|
2264
|
-
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;
|
|
2224
|
+
let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && location.state?._isRedirect !== true;
|
|
2265
2225
|
let actionData;
|
|
2266
2226
|
if (newState.actionData) {
|
|
2267
2227
|
if (Object.keys(newState.actionData).length > 0) {
|
|
@@ -2286,7 +2246,7 @@ function createRouter(init) {
|
|
|
2286
2246
|
blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
|
|
2287
2247
|
}
|
|
2288
2248
|
let restoreScrollPosition = isUninterruptedRevalidation ? false : getSavedScrollPosition(location, newState.matches || state.matches);
|
|
2289
|
-
let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) &&
|
|
2249
|
+
let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && location.state?._isRedirect !== true;
|
|
2290
2250
|
dataRoutes.commitHmrRoutes();
|
|
2291
2251
|
if (isUninterruptedRevalidation) ;
|
|
2292
2252
|
else if (pendingAction === "POP") ;
|
|
@@ -2348,13 +2308,13 @@ function createRouter(init) {
|
|
|
2348
2308
|
pendingViewTransitionEnabled = false;
|
|
2349
2309
|
isUninterruptedRevalidation = false;
|
|
2350
2310
|
isRevalidationRequired = false;
|
|
2351
|
-
pendingPopstateNavigationDfd
|
|
2311
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
2352
2312
|
pendingPopstateNavigationDfd = null;
|
|
2353
|
-
pendingRevalidationDfd
|
|
2313
|
+
pendingRevalidationDfd?.resolve();
|
|
2354
2314
|
pendingRevalidationDfd = null;
|
|
2355
2315
|
}
|
|
2356
2316
|
async function navigate(to, opts) {
|
|
2357
|
-
pendingPopstateNavigationDfd
|
|
2317
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
2358
2318
|
pendingPopstateNavigationDfd = null;
|
|
2359
2319
|
if (typeof to === "number") {
|
|
2360
2320
|
if (!pendingPopstateNavigationDfd) {
|
|
@@ -2369,8 +2329,8 @@ function createRouter(init) {
|
|
|
2369
2329
|
state.matches,
|
|
2370
2330
|
basename,
|
|
2371
2331
|
to,
|
|
2372
|
-
opts
|
|
2373
|
-
opts
|
|
2332
|
+
opts?.fromRouteId,
|
|
2333
|
+
opts?.relative
|
|
2374
2334
|
);
|
|
2375
2335
|
let { path, submission, error } = normalizeNavigateOptions(
|
|
2376
2336
|
false,
|
|
@@ -2378,7 +2338,7 @@ function createRouter(init) {
|
|
|
2378
2338
|
opts
|
|
2379
2339
|
);
|
|
2380
2340
|
let maskPath;
|
|
2381
|
-
if (opts
|
|
2341
|
+
if (opts?.mask) {
|
|
2382
2342
|
let partialPath = typeof opts.mask === "string" ? parsePath(opts.mask) : {
|
|
2383
2343
|
...state.location.mask,
|
|
2384
2344
|
...opts.mask
|
|
@@ -2502,7 +2462,7 @@ function createRouter(init) {
|
|
|
2502
2462
|
pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
|
|
2503
2463
|
pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
|
|
2504
2464
|
let routesToUse = dataRoutes.activeRoutes;
|
|
2505
|
-
let matches =
|
|
2465
|
+
let matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
|
|
2506
2466
|
// `matchRoutes()` has already been called if we're in here via `router.initialize()`
|
|
2507
2467
|
state.matches
|
|
2508
2468
|
) : matchRoutesImpl(
|
|
@@ -3003,7 +2963,7 @@ function createRouter(init) {
|
|
|
3003
2963
|
basename,
|
|
3004
2964
|
href,
|
|
3005
2965
|
routeId,
|
|
3006
|
-
opts
|
|
2966
|
+
opts?.relative
|
|
3007
2967
|
);
|
|
3008
2968
|
let matches = matchRoutesImpl(
|
|
3009
2969
|
routesToUse,
|
|
@@ -3420,7 +3380,7 @@ function createRouter(init) {
|
|
|
3420
3380
|
replace: replace2
|
|
3421
3381
|
} = {}) {
|
|
3422
3382
|
if (!isNavigation) {
|
|
3423
|
-
pendingPopstateNavigationDfd
|
|
3383
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
3424
3384
|
pendingPopstateNavigationDfd = null;
|
|
3425
3385
|
}
|
|
3426
3386
|
if (redirect2.response.headers.has("X-Remix-Revalidate")) {
|
|
@@ -3499,7 +3459,6 @@ function createRouter(init) {
|
|
|
3499
3459
|
}
|
|
3500
3460
|
}
|
|
3501
3461
|
async function callDataStrategy(request, path, matches, scopedContext, fetcherKey) {
|
|
3502
|
-
var _a;
|
|
3503
3462
|
let results;
|
|
3504
3463
|
let dataResults = {};
|
|
3505
3464
|
try {
|
|
@@ -3526,7 +3485,7 @@ function createRouter(init) {
|
|
|
3526
3485
|
}
|
|
3527
3486
|
if (!isMutationMethod(request.method)) {
|
|
3528
3487
|
for (let match of matches) {
|
|
3529
|
-
if (
|
|
3488
|
+
if (results[match.route.id]?.type === "error") {
|
|
3530
3489
|
break;
|
|
3531
3490
|
}
|
|
3532
3491
|
if (!results.hasOwnProperty(match.route.id) && !state.loaderData.hasOwnProperty(match.route.id) && (!state.errors || !state.errors.hasOwnProperty(match.route.id)) && match.shouldCallHandler()) {
|
|
@@ -3639,7 +3598,7 @@ function createRouter(init) {
|
|
|
3639
3598
|
return state.fetchers.get(key) || IDLE_FETCHER;
|
|
3640
3599
|
}
|
|
3641
3600
|
function resetFetcher(key, opts) {
|
|
3642
|
-
abortFetcher(key, opts
|
|
3601
|
+
abortFetcher(key, opts?.reason);
|
|
3643
3602
|
updateFetcherState(key, getDoneFetcher(null));
|
|
3644
3603
|
}
|
|
3645
3604
|
function deleteFetcher(fetchers, key) {
|
|
@@ -4141,7 +4100,6 @@ function normalizeNavigateOptions(isFetcher, path, opts) {
|
|
|
4141
4100
|
return { path: createPath(parsedPath), submission };
|
|
4142
4101
|
}
|
|
4143
4102
|
function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest, history, state, matches, submission, location, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, hasPatchRoutesOnNavigation, branches, pendingActionResult, callSiteDefaultShouldRevalidate) {
|
|
4144
|
-
var _a;
|
|
4145
4103
|
let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0;
|
|
4146
4104
|
let currentUrl = history.createURL(state.location);
|
|
4147
4105
|
let nextUrl = history.createURL(location);
|
|
@@ -4157,7 +4115,7 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
|
|
|
4157
4115
|
let shouldSkipRevalidation = actionStatus && actionStatus >= 400;
|
|
4158
4116
|
let baseShouldRevalidateArgs = {
|
|
4159
4117
|
currentUrl,
|
|
4160
|
-
currentParams:
|
|
4118
|
+
currentParams: state.matches[0]?.params || {},
|
|
4161
4119
|
nextUrl,
|
|
4162
4120
|
nextParams: matches[0].params,
|
|
4163
4121
|
...submission,
|
|
@@ -4415,7 +4373,7 @@ function patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProper
|
|
|
4415
4373
|
let newRoutes = convertRoutesToDataRoutes(
|
|
4416
4374
|
uniqueChildren,
|
|
4417
4375
|
mapRouteProperties2,
|
|
4418
|
-
[routeId || "_", "patch", String(
|
|
4376
|
+
[routeId || "_", "patch", String(childrenToPatch?.length || "0")],
|
|
4419
4377
|
manifest
|
|
4420
4378
|
);
|
|
4421
4379
|
childrenToPatch.push(...newRoutes);
|
|
@@ -4445,7 +4403,6 @@ function patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProper
|
|
|
4445
4403
|
}
|
|
4446
4404
|
}
|
|
4447
4405
|
function isSameRoute(newRoute, existingRoute) {
|
|
4448
|
-
var _a;
|
|
4449
4406
|
if ("id" in newRoute && "id" in existingRoute && newRoute.id === existingRoute.id) {
|
|
4450
4407
|
return true;
|
|
4451
4408
|
}
|
|
@@ -4455,12 +4412,9 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
4455
4412
|
if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) {
|
|
4456
4413
|
return true;
|
|
4457
4414
|
}
|
|
4458
|
-
return
|
|
4459
|
-
(aChild, i) =>
|
|
4460
|
-
|
|
4461
|
-
return (_a2 = existingRoute.children) == null ? void 0 : _a2.some((bChild) => isSameRoute(aChild, bChild));
|
|
4462
|
-
}
|
|
4463
|
-
)) ?? false;
|
|
4415
|
+
return newRoute.children?.every(
|
|
4416
|
+
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
4417
|
+
) ?? false;
|
|
4464
4418
|
}
|
|
4465
4419
|
var lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap();
|
|
4466
4420
|
var loadLazyRouteProperty = ({
|
|
@@ -4607,9 +4561,9 @@ function loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRouteProp
|
|
|
4607
4561
|
}
|
|
4608
4562
|
let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {
|
|
4609
4563
|
}) : void 0;
|
|
4610
|
-
lazyRoutePromise
|
|
4564
|
+
lazyRoutePromise?.catch(() => {
|
|
4611
4565
|
});
|
|
4612
|
-
lazyHandlerPromise
|
|
4566
|
+
lazyHandlerPromise?.catch(() => {
|
|
4613
4567
|
});
|
|
4614
4568
|
return {
|
|
4615
4569
|
lazyRoutePromise,
|
|
@@ -4802,8 +4756,8 @@ function getDataStrategyMatch(mapRouteProperties2, manifest, request, path, patt
|
|
|
4802
4756
|
path,
|
|
4803
4757
|
pattern,
|
|
4804
4758
|
match,
|
|
4805
|
-
lazyHandlerPromise: _lazyPromises
|
|
4806
|
-
lazyRoutePromise: _lazyPromises
|
|
4759
|
+
lazyHandlerPromise: _lazyPromises?.handler,
|
|
4760
|
+
lazyRoutePromise: _lazyPromises?.route,
|
|
4807
4761
|
handlerOverride,
|
|
4808
4762
|
scopedContext
|
|
4809
4763
|
});
|
|
@@ -4845,14 +4799,8 @@ function getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request,
|
|
|
4845
4799
|
});
|
|
4846
4800
|
}
|
|
4847
4801
|
async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, scopedContext, isStaticHandler) {
|
|
4848
|
-
if (matches.some((m) => {
|
|
4849
|
-
|
|
4850
|
-
return (_a = m._lazyPromises) == null ? void 0 : _a.middleware;
|
|
4851
|
-
})) {
|
|
4852
|
-
await Promise.all(matches.map((m) => {
|
|
4853
|
-
var _a;
|
|
4854
|
-
return (_a = m._lazyPromises) == null ? void 0 : _a.middleware;
|
|
4855
|
-
}));
|
|
4802
|
+
if (matches.some((m) => m._lazyPromises?.middleware)) {
|
|
4803
|
+
await Promise.all(matches.map((m) => m._lazyPromises?.middleware));
|
|
4856
4804
|
}
|
|
4857
4805
|
let dataStrategyArgs = {
|
|
4858
4806
|
request,
|
|
@@ -4883,13 +4831,10 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
|
|
|
4883
4831
|
});
|
|
4884
4832
|
try {
|
|
4885
4833
|
await Promise.all(
|
|
4886
|
-
matches.flatMap((m) =>
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
(_b = m._lazyPromises) == null ? void 0 : _b.route
|
|
4891
|
-
];
|
|
4892
|
-
})
|
|
4834
|
+
matches.flatMap((m) => [
|
|
4835
|
+
m._lazyPromises?.handler,
|
|
4836
|
+
m._lazyPromises?.route
|
|
4837
|
+
])
|
|
4893
4838
|
);
|
|
4894
4839
|
} catch (e) {
|
|
4895
4840
|
}
|
|
@@ -5006,7 +4951,6 @@ async function parseResponseBody(response) {
|
|
|
5006
4951
|
return response.text();
|
|
5007
4952
|
}
|
|
5008
4953
|
async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
5009
|
-
var _a, _b, _c, _d, _e;
|
|
5010
4954
|
let { result, type } = dataStrategyResult;
|
|
5011
4955
|
if (isResponse(result)) {
|
|
5012
4956
|
let data2;
|
|
@@ -5036,15 +4980,15 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
|
5036
4980
|
return {
|
|
5037
4981
|
type: "error",
|
|
5038
4982
|
error: result.data,
|
|
5039
|
-
statusCode:
|
|
5040
|
-
headers:
|
|
4983
|
+
statusCode: result.init?.status,
|
|
4984
|
+
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
5041
4985
|
};
|
|
5042
4986
|
}
|
|
5043
4987
|
return {
|
|
5044
4988
|
type: "error",
|
|
5045
4989
|
error: dataWithResponseInitToErrorResponse(result),
|
|
5046
4990
|
statusCode: isRouteErrorResponse(result) ? result.status : void 0,
|
|
5047
|
-
headers:
|
|
4991
|
+
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
5048
4992
|
};
|
|
5049
4993
|
}
|
|
5050
4994
|
return {
|
|
@@ -5057,8 +5001,8 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
|
5057
5001
|
return {
|
|
5058
5002
|
type: "data",
|
|
5059
5003
|
data: result.data,
|
|
5060
|
-
statusCode:
|
|
5061
|
-
headers:
|
|
5004
|
+
statusCode: result.init?.status,
|
|
5005
|
+
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
5062
5006
|
};
|
|
5063
5007
|
}
|
|
5064
5008
|
return { type: "data", data: result };
|
|
@@ -5257,7 +5201,7 @@ function processLoaderData(state, matches, results, pendingActionResult, revalid
|
|
|
5257
5201
|
let result = fetcherResults[key];
|
|
5258
5202
|
invariant(result, "Did not find corresponding fetcher result");
|
|
5259
5203
|
if (isErrorResult(result)) {
|
|
5260
|
-
let boundaryMatch = findNearestBoundary(state.matches, match
|
|
5204
|
+
let boundaryMatch = findNearestBoundary(state.matches, match?.route.id);
|
|
5261
5205
|
if (!(errors && errors[boundaryMatch.route.id])) {
|
|
5262
5206
|
errors = {
|
|
5263
5207
|
...errors,
|
|
@@ -5387,10 +5331,9 @@ function isHashChangeOnly(a, b) {
|
|
|
5387
5331
|
return false;
|
|
5388
5332
|
}
|
|
5389
5333
|
function dataWithResponseInitToErrorResponse(data2) {
|
|
5390
|
-
var _a, _b;
|
|
5391
5334
|
return new ErrorResponseImpl(
|
|
5392
|
-
|
|
5393
|
-
|
|
5335
|
+
data2.init?.status ?? 500,
|
|
5336
|
+
data2.init?.statusText ?? "Internal Server Error",
|
|
5394
5337
|
data2.data
|
|
5395
5338
|
);
|
|
5396
5339
|
}
|
|
@@ -5804,7 +5747,7 @@ function useOutlet(context) {
|
|
|
5804
5747
|
function useParams() {
|
|
5805
5748
|
let { matches } = reactExports.useContext(RouteContext);
|
|
5806
5749
|
let routeMatch = matches[matches.length - 1];
|
|
5807
|
-
return
|
|
5750
|
+
return routeMatch?.params ?? {};
|
|
5808
5751
|
}
|
|
5809
5752
|
function useResolvedPath(to, { relative } = {}) {
|
|
5810
5753
|
let { matches } = reactExports.useContext(RouteContext);
|
|
@@ -6028,7 +5971,7 @@ function RenderedRoute({ routeContext, match, children }) {
|
|
|
6028
5971
|
return /* @__PURE__ */ reactExports.createElement(RouteContext.Provider, { value: routeContext }, children);
|
|
6029
5972
|
}
|
|
6030
5973
|
function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
6031
|
-
let dataRouterState = dataRouterOpts
|
|
5974
|
+
let dataRouterState = dataRouterOpts?.state;
|
|
6032
5975
|
if (matches == null) {
|
|
6033
5976
|
if (!dataRouterState) {
|
|
6034
5977
|
return null;
|
|
@@ -6042,10 +5985,10 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
|
6042
5985
|
}
|
|
6043
5986
|
}
|
|
6044
5987
|
let renderedMatches = matches;
|
|
6045
|
-
let errors = dataRouterState
|
|
5988
|
+
let errors = dataRouterState?.errors;
|
|
6046
5989
|
if (errors != null) {
|
|
6047
5990
|
let errorIndex = renderedMatches.findIndex(
|
|
6048
|
-
(m) => m.route.id &&
|
|
5991
|
+
(m) => m.route.id && errors?.[m.route.id] !== void 0
|
|
6049
5992
|
);
|
|
6050
5993
|
invariant(
|
|
6051
5994
|
errorIndex >= 0,
|
|
@@ -6084,12 +6027,11 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
|
6084
6027
|
}
|
|
6085
6028
|
}
|
|
6086
6029
|
}
|
|
6087
|
-
let onErrorHandler = dataRouterOpts
|
|
6030
|
+
let onErrorHandler = dataRouterOpts?.onError;
|
|
6088
6031
|
let onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {
|
|
6089
|
-
var _a, _b;
|
|
6090
6032
|
onErrorHandler(error, {
|
|
6091
6033
|
location: dataRouterState.location,
|
|
6092
|
-
params:
|
|
6034
|
+
params: dataRouterState.matches?.[0]?.params ?? {},
|
|
6093
6035
|
pattern: getRoutePattern(dataRouterState.matches),
|
|
6094
6036
|
errorInfo
|
|
6095
6037
|
});
|
|
@@ -6237,7 +6179,6 @@ function useActionData() {
|
|
|
6237
6179
|
return state.actionData ? state.actionData[routeId] : void 0;
|
|
6238
6180
|
}
|
|
6239
6181
|
function useRouteError() {
|
|
6240
|
-
var _a;
|
|
6241
6182
|
let error = reactExports.useContext(RouteErrorContext);
|
|
6242
6183
|
let state = useDataRouterState(
|
|
6243
6184
|
"useRouteError"
|
|
@@ -6250,7 +6191,7 @@ function useRouteError() {
|
|
|
6250
6191
|
if (error !== void 0) {
|
|
6251
6192
|
return error;
|
|
6252
6193
|
}
|
|
6253
|
-
return
|
|
6194
|
+
return state.errors?.[routeId];
|
|
6254
6195
|
}
|
|
6255
6196
|
function useNavigateStable() {
|
|
6256
6197
|
let { router } = useDataRouterContext(
|
|
@@ -6398,14 +6339,11 @@ function RouterProvider({
|
|
|
6398
6339
|
(newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {
|
|
6399
6340
|
if (newErrors && onError) {
|
|
6400
6341
|
Object.values(newErrors).forEach(
|
|
6401
|
-
(error) => {
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
pattern: getRoutePattern(newState.matches)
|
|
6407
|
-
});
|
|
6408
|
-
}
|
|
6342
|
+
(error) => onError(error, {
|
|
6343
|
+
location: newState.location,
|
|
6344
|
+
params: newState.matches[0]?.params ?? {},
|
|
6345
|
+
pattern: getRoutePattern(newState.matches)
|
|
6346
|
+
})
|
|
6409
6347
|
);
|
|
6410
6348
|
}
|
|
6411
6349
|
newState.fetchers.forEach((fetcher, key) => {
|
|
@@ -6441,7 +6379,7 @@ function RouterProvider({
|
|
|
6441
6379
|
if (reactDomFlushSyncImpl && flushSync) {
|
|
6442
6380
|
reactDomFlushSyncImpl(() => {
|
|
6443
6381
|
if (transition) {
|
|
6444
|
-
renderDfd
|
|
6382
|
+
renderDfd?.resolve();
|
|
6445
6383
|
transition.skipTransition();
|
|
6446
6384
|
}
|
|
6447
6385
|
setVtContext({
|
|
@@ -6466,7 +6404,7 @@ function RouterProvider({
|
|
|
6466
6404
|
return;
|
|
6467
6405
|
}
|
|
6468
6406
|
if (transition) {
|
|
6469
|
-
renderDfd
|
|
6407
|
+
renderDfd?.resolve();
|
|
6470
6408
|
transition.skipTransition();
|
|
6471
6409
|
setInterruption({
|
|
6472
6410
|
state: newState,
|
|
@@ -6556,12 +6494,12 @@ function RouterProvider({
|
|
|
6556
6494
|
go: (n) => router.navigate(n),
|
|
6557
6495
|
push: (to, state2, opts) => router.navigate(to, {
|
|
6558
6496
|
state: state2,
|
|
6559
|
-
preventScrollReset: opts
|
|
6497
|
+
preventScrollReset: opts?.preventScrollReset
|
|
6560
6498
|
}),
|
|
6561
6499
|
replace: (to, state2, opts) => router.navigate(to, {
|
|
6562
6500
|
replace: true,
|
|
6563
6501
|
state: state2,
|
|
6564
|
-
preventScrollReset: opts
|
|
6502
|
+
preventScrollReset: opts?.preventScrollReset
|
|
6565
6503
|
})
|
|
6566
6504
|
};
|
|
6567
6505
|
}, [router]);
|
|
@@ -7243,7 +7181,7 @@ function invariant2(value, message) {
|
|
|
7243
7181
|
throw new Error(message);
|
|
7244
7182
|
}
|
|
7245
7183
|
}
|
|
7246
|
-
var SingleFetchRedirectSymbol = Symbol("SingleFetchRedirect");
|
|
7184
|
+
var SingleFetchRedirectSymbol = /* @__PURE__ */ Symbol("SingleFetchRedirect");
|
|
7247
7185
|
var SingleFetchNoResultError = class extends Error {
|
|
7248
7186
|
};
|
|
7249
7187
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
@@ -7447,7 +7385,6 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
|
|
|
7447
7385
|
return results;
|
|
7448
7386
|
}
|
|
7449
7387
|
async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams, results) {
|
|
7450
|
-
var _a;
|
|
7451
7388
|
try {
|
|
7452
7389
|
let middlewareError;
|
|
7453
7390
|
let fetchedData = await singleFetchPromise;
|
|
@@ -7457,7 +7394,7 @@ async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams,
|
|
|
7457
7394
|
let routeResult = fetchedData.routes[match.route.id];
|
|
7458
7395
|
if ("error" in routeResult) {
|
|
7459
7396
|
middlewareError = routeResult.error;
|
|
7460
|
-
if (
|
|
7397
|
+
if (results[match.route.id]?.result == null) {
|
|
7461
7398
|
results[match.route.id] = {
|
|
7462
7399
|
type: "error",
|
|
7463
7400
|
result: middlewareError
|
|
@@ -7580,7 +7517,7 @@ async function fetchAndDecodeViaTurboStream(args, basename, trailingSlashAware,
|
|
|
7580
7517
|
}
|
|
7581
7518
|
} else {
|
|
7582
7519
|
let typed = decoded.value;
|
|
7583
|
-
let routeId = targetRoutes
|
|
7520
|
+
let routeId = targetRoutes?.[0];
|
|
7584
7521
|
invariant2(routeId, "No routeId found for single fetch call decoding");
|
|
7585
7522
|
if ("redirect" in typed) {
|
|
7586
7523
|
data2 = { redirect: typed };
|
|
@@ -7712,12 +7649,11 @@ async function loadRouteModule(route, routeModulesCache) {
|
|
|
7712
7649
|
}
|
|
7713
7650
|
function getKeyedLinksForMatches(matches, routeModules, manifest) {
|
|
7714
7651
|
let descriptors = matches.map((match) => {
|
|
7715
|
-
var _a;
|
|
7716
7652
|
let module = routeModules[match.route.id];
|
|
7717
7653
|
let route = manifest.routes[match.route.id];
|
|
7718
7654
|
return [
|
|
7719
7655
|
route && route.css ? route.css.map((href) => ({ rel: "stylesheet", href })) : [],
|
|
7720
|
-
|
|
7656
|
+
module?.links?.() || []
|
|
7721
7657
|
];
|
|
7722
7658
|
}).flat(2);
|
|
7723
7659
|
let preloads = getModuleLinkHrefs(matches, manifest);
|
|
@@ -7814,12 +7750,11 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
|
|
|
7814
7750
|
return match.route.id !== currentMatches[index].route.id;
|
|
7815
7751
|
};
|
|
7816
7752
|
let matchPathChanged = (match, index) => {
|
|
7817
|
-
var _a;
|
|
7818
7753
|
return (
|
|
7819
7754
|
// param change, /users/123 -> /users/456
|
|
7820
7755
|
currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
|
|
7821
7756
|
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
7822
|
-
|
|
7757
|
+
currentMatches[index].route.path?.endsWith("*") && currentMatches[index].params["*"] !== match.params["*"]
|
|
7823
7758
|
);
|
|
7824
7759
|
};
|
|
7825
7760
|
if (mode === "assets") {
|
|
@@ -7829,7 +7764,6 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
|
|
|
7829
7764
|
}
|
|
7830
7765
|
if (mode === "data") {
|
|
7831
7766
|
return nextMatches.filter((match, index) => {
|
|
7832
|
-
var _a;
|
|
7833
7767
|
let manifestRoute = manifest.routes[match.route.id];
|
|
7834
7768
|
if (!manifestRoute || !manifestRoute.hasLoader) {
|
|
7835
7769
|
return false;
|
|
@@ -7843,7 +7777,7 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
|
|
|
7843
7777
|
location.pathname + location.search + location.hash,
|
|
7844
7778
|
window.origin
|
|
7845
7779
|
),
|
|
7846
|
-
currentParams:
|
|
7780
|
+
currentParams: currentMatches[0]?.params || {},
|
|
7847
7781
|
nextUrl: new URL(page, window.origin),
|
|
7848
7782
|
nextParams: match.params,
|
|
7849
7783
|
defaultShouldRevalidate: true
|
|
@@ -7995,7 +7929,6 @@ function noActionDefinedError(type, routeId) {
|
|
|
7995
7929
|
}
|
|
7996
7930
|
function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {
|
|
7997
7931
|
return (routesByParentId[parentId] || []).map((route) => {
|
|
7998
|
-
var _a, _b, _c;
|
|
7999
7932
|
let routeModule = routeModulesCache[route.id];
|
|
8000
7933
|
function fetchServerHandler(singleFetch) {
|
|
8001
7934
|
invariant2(
|
|
@@ -8058,10 +7991,10 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
8058
7991
|
)
|
|
8059
7992
|
});
|
|
8060
7993
|
let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;
|
|
8061
|
-
let initialData = hasInitialData ?
|
|
7994
|
+
let initialData = hasInitialData ? initialState?.loaderData?.[route.id] : void 0;
|
|
8062
7995
|
let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;
|
|
8063
|
-
let initialError = hasInitialError ?
|
|
8064
|
-
let isHydrationRequest = needsRevalidation == null && (
|
|
7996
|
+
let initialError = hasInitialError ? initialState?.errors?.[route.id] : void 0;
|
|
7997
|
+
let isHydrationRequest = needsRevalidation == null && (routeModule.clientLoader?.hydrate === true || !route.hasLoader);
|
|
8065
7998
|
dataRoute.loader = async ({ request, params, context, pattern, url }, singleFetch) => {
|
|
8066
7999
|
let _isHydrationRequest = isHydrationRequest;
|
|
8067
8000
|
isHydrationRequest = false;
|
|
@@ -8374,9 +8307,8 @@ function getPatchRoutesOnNavigationFunction(getRouter, manifest, routeModules, s
|
|
|
8374
8307
|
}
|
|
8375
8308
|
function useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscovery, isSpaMode) {
|
|
8376
8309
|
reactExports.useEffect(() => {
|
|
8377
|
-
var _a, _b;
|
|
8378
8310
|
if (!isFogOfWarEnabled(routeDiscovery, ssr) || // @ts-expect-error - TS doesn't know about this yet
|
|
8379
|
-
|
|
8311
|
+
window.navigator?.connection?.saveData === true) {
|
|
8380
8312
|
return;
|
|
8381
8313
|
}
|
|
8382
8314
|
function registerElement(el) {
|
|
@@ -8483,7 +8415,7 @@ async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, ro
|
|
|
8483
8415
|
}
|
|
8484
8416
|
serverPatches = await res.json();
|
|
8485
8417
|
} catch (e) {
|
|
8486
|
-
if (signal
|
|
8418
|
+
if (signal?.aborted) return;
|
|
8487
8419
|
throw e;
|
|
8488
8420
|
}
|
|
8489
8421
|
let knownRoutes = new Set(Object.keys(manifest.routes));
|
|
@@ -8793,12 +8725,11 @@ function PrefetchPageLinksImpl({
|
|
|
8793
8725
|
let routesParams = /* @__PURE__ */ new Set();
|
|
8794
8726
|
let foundOptOutRoute = false;
|
|
8795
8727
|
nextMatches.forEach((m) => {
|
|
8796
|
-
var _a;
|
|
8797
8728
|
let manifestRoute = manifest.routes[m.route.id];
|
|
8798
8729
|
if (!manifestRoute || !manifestRoute.hasLoader) {
|
|
8799
8730
|
return;
|
|
8800
8731
|
}
|
|
8801
|
-
if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData &&
|
|
8732
|
+
if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) {
|
|
8802
8733
|
foundOptOutRoute = true;
|
|
8803
8734
|
} else if (manifestRoute.hasClientLoader) {
|
|
8804
8735
|
foundOptOutRoute = true;
|
|
@@ -8886,7 +8817,7 @@ function Meta() {
|
|
|
8886
8817
|
error
|
|
8887
8818
|
};
|
|
8888
8819
|
matches[i] = match;
|
|
8889
|
-
if (routeModule
|
|
8820
|
+
if (routeModule?.meta) {
|
|
8890
8821
|
routeMeta = typeof routeModule.meta === "function" ? routeModule.meta({
|
|
8891
8822
|
data: data2,
|
|
8892
8823
|
loaderData: data2,
|
|
@@ -8984,13 +8915,12 @@ function Scripts(scriptProps) {
|
|
|
8984
8915
|
setIsHydrated();
|
|
8985
8916
|
}, []);
|
|
8986
8917
|
let initialScripts = reactExports.useMemo(() => {
|
|
8987
|
-
var _a;
|
|
8988
8918
|
if (isRSCRouterContext) {
|
|
8989
8919
|
return null;
|
|
8990
8920
|
}
|
|
8991
8921
|
let streamScript = "window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());";
|
|
8992
8922
|
let contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};${streamScript}` : " ";
|
|
8993
|
-
let routeModulesScript = !isStatic ? " " : `${
|
|
8923
|
+
let routeModulesScript = !isStatic ? " " : `${manifest.hmr?.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
|
|
8994
8924
|
${matches.map((match, routeIndex) => {
|
|
8995
8925
|
let routeVarName = `route${routeIndex}`;
|
|
8996
8926
|
let manifestEntry = manifest.routes[match.route.id];
|
|
@@ -9223,9 +9153,8 @@ function BoundaryShell({
|
|
|
9223
9153
|
isOutsideRemixApp,
|
|
9224
9154
|
children
|
|
9225
9155
|
}) {
|
|
9226
|
-
var _a;
|
|
9227
9156
|
let { routeModules } = useFrameworkContext();
|
|
9228
|
-
if (
|
|
9157
|
+
if (routeModules.root?.Layout && !isOutsideRemixApp) {
|
|
9229
9158
|
return children;
|
|
9230
9159
|
}
|
|
9231
9160
|
return /* @__PURE__ */ reactExports.createElement("html", { lang: "en" }, /* @__PURE__ */ reactExports.createElement("head", null, /* @__PURE__ */ reactExports.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ reactExports.createElement(
|
|
@@ -9415,7 +9344,7 @@ var Form = reactExports.forwardRef(
|
|
|
9415
9344
|
if (event.defaultPrevented) return;
|
|
9416
9345
|
event.preventDefault();
|
|
9417
9346
|
let submitter = event.nativeEvent.submitter;
|
|
9418
|
-
let submitMethod =
|
|
9347
|
+
let submitMethod = submitter?.getAttribute("formmethod") || method;
|
|
9419
9348
|
let doSubmit = () => submit(submitter || event.currentTarget, {
|
|
9420
9349
|
fetcherKey,
|
|
9421
9350
|
method: submitMethod,
|
|
@@ -9491,7 +9420,7 @@ function ScrollRestoration({
|
|
|
9491
9420
|
sessionStorage.removeItem(storageKey2);
|
|
9492
9421
|
}
|
|
9493
9422
|
}).toString();
|
|
9494
|
-
if (props.nonce == null &&
|
|
9423
|
+
if (props.nonce == null && remixContext?.nonce) {
|
|
9495
9424
|
props.nonce = remixContext.nonce;
|
|
9496
9425
|
}
|
|
9497
9426
|
return /* @__PURE__ */ reactExports.createElement(
|
|
@@ -9757,7 +9686,7 @@ function useScrollRestoration({
|
|
|
9757
9686
|
}
|
|
9758
9687
|
}, [storageKey]);
|
|
9759
9688
|
reactExports.useLayoutEffect(() => {
|
|
9760
|
-
let disableScrollRestoration = router
|
|
9689
|
+
let disableScrollRestoration = router?.enableScrollRestoration(
|
|
9761
9690
|
savedScrollPositions,
|
|
9762
9691
|
() => window.scrollY,
|
|
9763
9692
|
getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0
|