react-router 7.18.3 → 7.18.5
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/CHANGELOG.md +14 -0
- package/dist/development/{browser-eq4RgLsD.d.ts → browser-7x6a6gQP.d.ts} +1 -1
- package/dist/development/{browser-BR5QG7ZC.d.mts → browser-CiGxXXOl.d.mts} +1 -1
- package/dist/development/{chunk-7SIULPXI.js → chunk-2ZBLYC7V.js} +35 -4
- package/dist/development/{chunk-BV7QT456.mjs → chunk-6KYCQHYJ.mjs} +35 -4
- package/dist/development/{chunk-QPXIKN46.js → chunk-IFHLIXZW.js} +7 -7
- package/dist/development/{chunk-HT4INDD5.mjs → chunk-JAHXRPFV.mjs} +16 -6
- package/dist/development/{chunk-YRTY65LJ.js → chunk-NDF5KBLP.js} +103 -103
- package/dist/{production/context-nqAapj74.d.mts → development/context-BlYKn1tE.d.mts} +2 -0
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +34 -34
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-BjY-eKuf.d.ts → development/index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/{production/index-react-server-client-K63fpMH4.d.mts → development/index-react-server-client-KK-TR-t7.d.mts} +1 -1
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +2 -0
- package/dist/development/index-react-server.d.ts +2 -0
- package/dist/development/index-react-server.js +38 -15
- package/dist/development/index-react-server.mjs +38 -15
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +6 -6
- package/dist/development/index.js +102 -92
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-B7w3_Eo9.d.ts → development/instrumentation-CPkMwccd.d.ts} +2 -0
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{browser-eq4RgLsD.d.ts → browser-7x6a6gQP.d.ts} +1 -1
- package/dist/production/{browser-BR5QG7ZC.d.mts → browser-CiGxXXOl.d.mts} +1 -1
- package/dist/production/{chunk-LNBCQR6O.js → chunk-75HN637G.js} +103 -103
- package/dist/production/{chunk-EFMJ2SG4.mjs → chunk-7RTFRKQW.mjs} +35 -4
- package/dist/production/{chunk-6XRGXNVQ.js → chunk-HNBICOIU.js} +35 -4
- package/dist/production/{chunk-UODOIDHR.mjs → chunk-IAM5GYT3.mjs} +16 -6
- package/dist/production/{chunk-SJHDA7OG.js → chunk-K3NA4NUH.js} +7 -7
- package/dist/{development/context-nqAapj74.d.mts → production/context-BlYKn1tE.d.mts} +2 -0
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +34 -34
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-BjY-eKuf.d.ts → production/index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/{development/index-react-server-client-K63fpMH4.d.mts → production/index-react-server-client-KK-TR-t7.d.mts} +1 -1
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +2 -0
- package/dist/production/index-react-server.d.ts +2 -0
- package/dist/production/index-react-server.js +38 -15
- package/dist/production/index-react-server.mjs +38 -15
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +6 -6
- package/dist/production/index.js +102 -92
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-B7w3_Eo9.d.ts → production/instrumentation-CPkMwccd.d.ts} +2 -0
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.18.
|
|
2
|
+
* react-router v7.18.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1818,7 +1818,7 @@ function createRouter(init) {
|
|
|
1818
1818
|
init.history.replace(location, location.state);
|
|
1819
1819
|
}
|
|
1820
1820
|
let viewTransitionOpts;
|
|
1821
|
-
if (pendingAction === "POP" /* Pop */) {
|
|
1821
|
+
if (pendingAction === "POP" /* Pop */ && !isUninterruptedRevalidation && location !== state.location) {
|
|
1822
1822
|
let priorPaths = appliedViewTransitions.get(state.location.pathname);
|
|
1823
1823
|
if (priorPaths && priorPaths.has(location.pathname)) {
|
|
1824
1824
|
viewTransitionOpts = {
|
|
@@ -3538,6 +3538,10 @@ function createStaticHandler(routes, opts) {
|
|
|
3538
3538
|
manifest
|
|
3539
3539
|
);
|
|
3540
3540
|
let routeBranches = flattenAndRankRoutes(dataRoutes);
|
|
3541
|
+
let matchCost = routeBranches.reduce(
|
|
3542
|
+
(total, branch) => total + branch.routesMeta.length,
|
|
3543
|
+
0
|
|
3544
|
+
);
|
|
3541
3545
|
async function query(request, {
|
|
3542
3546
|
requestContext,
|
|
3543
3547
|
filterMatchesToLoad,
|
|
@@ -4159,6 +4163,7 @@ function createStaticHandler(routes, opts) {
|
|
|
4159
4163
|
}
|
|
4160
4164
|
return {
|
|
4161
4165
|
dataRoutes,
|
|
4166
|
+
_matchCost: matchCost,
|
|
4162
4167
|
_internalRouteBranches: routeBranches,
|
|
4163
4168
|
query,
|
|
4164
4169
|
queryRoute
|
|
@@ -7823,6 +7828,7 @@ function hydrate(index) {
|
|
|
7823
7828
|
set(-0);
|
|
7824
7829
|
continue;
|
|
7825
7830
|
}
|
|
7831
|
+
validateIndex(index2, values.length);
|
|
7826
7832
|
if (hydrated[index2]) {
|
|
7827
7833
|
set(hydrated[index2]);
|
|
7828
7834
|
continue;
|
|
@@ -7911,6 +7917,7 @@ function hydrate(index) {
|
|
|
7911
7917
|
set(obj);
|
|
7912
7918
|
continue;
|
|
7913
7919
|
case TYPE_PROMISE:
|
|
7920
|
+
validateIndex(b, values.length);
|
|
7914
7921
|
if (hydrated[b]) {
|
|
7915
7922
|
set(hydrated[index2] = hydrated[b]);
|
|
7916
7923
|
} else {
|
|
@@ -7926,6 +7933,7 @@ function hydrate(index) {
|
|
|
7926
7933
|
set(error);
|
|
7927
7934
|
continue;
|
|
7928
7935
|
case TYPE_PREVIOUS_RESOLVED:
|
|
7936
|
+
validateIndex(b, values.length);
|
|
7929
7937
|
set(hydrated[index2] = hydrated[b]);
|
|
7930
7938
|
continue;
|
|
7931
7939
|
default:
|
|
@@ -7990,7 +7998,12 @@ function hydrate(index) {
|
|
|
7990
7998
|
}
|
|
7991
7999
|
]);
|
|
7992
8000
|
postRun.push(() => {
|
|
7993
|
-
object
|
|
8001
|
+
Object.defineProperty(object, r[0], {
|
|
8002
|
+
value: r[1],
|
|
8003
|
+
enumerable: true,
|
|
8004
|
+
configurable: true,
|
|
8005
|
+
writable: true
|
|
8006
|
+
});
|
|
7994
8007
|
});
|
|
7995
8008
|
}
|
|
7996
8009
|
set(object);
|
|
@@ -8002,6 +8015,11 @@ function hydrate(index) {
|
|
|
8002
8015
|
}
|
|
8003
8016
|
return result;
|
|
8004
8017
|
}
|
|
8018
|
+
function validateIndex(index, length) {
|
|
8019
|
+
if (!Number.isSafeInteger(index) || index < 0 || index >= length) {
|
|
8020
|
+
throw new SyntaxError();
|
|
8021
|
+
}
|
|
8022
|
+
}
|
|
8005
8023
|
|
|
8006
8024
|
// vendor/turbo-stream-v2/turbo-stream.ts
|
|
8007
8025
|
async function decode(readable, options) {
|
|
@@ -8270,6 +8288,9 @@ var ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
|
8270
8288
|
function escapeHtml(html) {
|
|
8271
8289
|
return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
8272
8290
|
}
|
|
8291
|
+
function escapeAttribute(value) {
|
|
8292
|
+
return value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
8293
|
+
}
|
|
8273
8294
|
|
|
8274
8295
|
// lib/dom/ssr/invariant.ts
|
|
8275
8296
|
function invariant2(value, message) {
|
|
@@ -9478,6 +9499,13 @@ function getPathsWithAncestors(paths) {
|
|
|
9478
9499
|
function isFogOfWarEnabled(routeDiscovery, ssr) {
|
|
9479
9500
|
return routeDiscovery.mode === "lazy" && ssr === true;
|
|
9480
9501
|
}
|
|
9502
|
+
var MANIFEST_MATCH_COST_LIMIT = 5e4;
|
|
9503
|
+
var MANIFEST_MATCH_COST_SEGMENT_THRESHOLD = 10;
|
|
9504
|
+
function shouldUseInitialRouteDiscovery(pathname, matchCost = 0) {
|
|
9505
|
+
let segmentCount = pathname.split("/").length - 1;
|
|
9506
|
+
let ancestorCount = Math.max(segmentCount - 1, 0);
|
|
9507
|
+
return ancestorCount * pathname.length + 1 > URL_LIMIT || segmentCount > MANIFEST_MATCH_COST_SEGMENT_THRESHOLD && segmentCount * matchCost > MANIFEST_MATCH_COST_LIMIT;
|
|
9508
|
+
}
|
|
9481
9509
|
function getPartialManifest({ sri, ...manifest }, router) {
|
|
9482
9510
|
let routeIds = new Set(router.state.matches.map((m) => m.route.id));
|
|
9483
9511
|
let segments = router.state.location.pathname.split("/").filter(Boolean);
|
|
@@ -10405,7 +10433,7 @@ var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "un
|
|
|
10405
10433
|
try {
|
|
10406
10434
|
if (isBrowser2) {
|
|
10407
10435
|
window.__reactRouterVersion = // @ts-expect-error
|
|
10408
|
-
"7.18.
|
|
10436
|
+
"7.18.5";
|
|
10409
10437
|
}
|
|
10410
10438
|
} catch (e) {
|
|
10411
10439
|
}
|
|
@@ -11650,6 +11678,7 @@ export {
|
|
|
11650
11678
|
withErrorBoundaryProps,
|
|
11651
11679
|
createSearchParams,
|
|
11652
11680
|
escapeHtml,
|
|
11681
|
+
escapeAttribute,
|
|
11653
11682
|
encode,
|
|
11654
11683
|
createRequestInit,
|
|
11655
11684
|
SingleFetchRedirectSymbol,
|
|
@@ -11669,6 +11698,8 @@ export {
|
|
|
11669
11698
|
shouldHydrateRouteLoader,
|
|
11670
11699
|
URL_LIMIT,
|
|
11671
11700
|
getPathsWithAncestors,
|
|
11701
|
+
isFogOfWarEnabled,
|
|
11702
|
+
shouldUseInitialRouteDiscovery,
|
|
11672
11703
|
getPatchRoutesOnNavigationFunction,
|
|
11673
11704
|
useFogOFWarDiscovery,
|
|
11674
11705
|
getManifestPath,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v7.18.
|
|
2
|
+
* react-router v7.18.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1818,7 +1818,7 @@ function createRouter(init) {
|
|
|
1818
1818
|
init.history.replace(location, location.state);
|
|
1819
1819
|
}
|
|
1820
1820
|
let viewTransitionOpts;
|
|
1821
|
-
if (pendingAction === "POP" /* Pop */) {
|
|
1821
|
+
if (pendingAction === "POP" /* Pop */ && !isUninterruptedRevalidation && location !== state.location) {
|
|
1822
1822
|
let priorPaths = appliedViewTransitions.get(state.location.pathname);
|
|
1823
1823
|
if (priorPaths && priorPaths.has(location.pathname)) {
|
|
1824
1824
|
viewTransitionOpts = {
|
|
@@ -3538,6 +3538,10 @@ function createStaticHandler(routes, opts) {
|
|
|
3538
3538
|
manifest
|
|
3539
3539
|
);
|
|
3540
3540
|
let routeBranches = flattenAndRankRoutes(dataRoutes);
|
|
3541
|
+
let matchCost = routeBranches.reduce(
|
|
3542
|
+
(total, branch) => total + branch.routesMeta.length,
|
|
3543
|
+
0
|
|
3544
|
+
);
|
|
3541
3545
|
async function query(request, {
|
|
3542
3546
|
requestContext,
|
|
3543
3547
|
filterMatchesToLoad,
|
|
@@ -4159,6 +4163,7 @@ function createStaticHandler(routes, opts) {
|
|
|
4159
4163
|
}
|
|
4160
4164
|
return {
|
|
4161
4165
|
dataRoutes,
|
|
4166
|
+
_matchCost: matchCost,
|
|
4162
4167
|
_internalRouteBranches: routeBranches,
|
|
4163
4168
|
query,
|
|
4164
4169
|
queryRoute
|
|
@@ -6146,6 +6151,7 @@ function hydrate(index) {
|
|
|
6146
6151
|
set(-0);
|
|
6147
6152
|
continue;
|
|
6148
6153
|
}
|
|
6154
|
+
validateIndex(index2, values.length);
|
|
6149
6155
|
if (hydrated[index2]) {
|
|
6150
6156
|
set(hydrated[index2]);
|
|
6151
6157
|
continue;
|
|
@@ -6234,6 +6240,7 @@ function hydrate(index) {
|
|
|
6234
6240
|
set(obj);
|
|
6235
6241
|
continue;
|
|
6236
6242
|
case TYPE_PROMISE:
|
|
6243
|
+
validateIndex(b, values.length);
|
|
6237
6244
|
if (hydrated[b]) {
|
|
6238
6245
|
set(hydrated[index2] = hydrated[b]);
|
|
6239
6246
|
} else {
|
|
@@ -6249,6 +6256,7 @@ function hydrate(index) {
|
|
|
6249
6256
|
set(error);
|
|
6250
6257
|
continue;
|
|
6251
6258
|
case TYPE_PREVIOUS_RESOLVED:
|
|
6259
|
+
validateIndex(b, values.length);
|
|
6252
6260
|
set(hydrated[index2] = hydrated[b]);
|
|
6253
6261
|
continue;
|
|
6254
6262
|
default:
|
|
@@ -6313,7 +6321,12 @@ function hydrate(index) {
|
|
|
6313
6321
|
}
|
|
6314
6322
|
]);
|
|
6315
6323
|
postRun.push(() => {
|
|
6316
|
-
object
|
|
6324
|
+
Object.defineProperty(object, r[0], {
|
|
6325
|
+
value: r[1],
|
|
6326
|
+
enumerable: true,
|
|
6327
|
+
configurable: true,
|
|
6328
|
+
writable: true
|
|
6329
|
+
});
|
|
6317
6330
|
});
|
|
6318
6331
|
}
|
|
6319
6332
|
set(object);
|
|
@@ -6325,6 +6338,11 @@ function hydrate(index) {
|
|
|
6325
6338
|
}
|
|
6326
6339
|
return result;
|
|
6327
6340
|
}
|
|
6341
|
+
function validateIndex(index, length) {
|
|
6342
|
+
if (!Number.isSafeInteger(index) || index < 0 || index >= length) {
|
|
6343
|
+
throw new SyntaxError();
|
|
6344
|
+
}
|
|
6345
|
+
}
|
|
6328
6346
|
|
|
6329
6347
|
// vendor/turbo-stream-v2/turbo-stream.ts
|
|
6330
6348
|
async function decode(readable, options) {
|
|
@@ -6593,6 +6611,9 @@ var ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
|
6593
6611
|
function escapeHtml(html) {
|
|
6594
6612
|
return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
6595
6613
|
}
|
|
6614
|
+
function escapeAttribute(value) {
|
|
6615
|
+
return value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
6616
|
+
}
|
|
6596
6617
|
|
|
6597
6618
|
// lib/dom/ssr/invariant.ts
|
|
6598
6619
|
function invariant2(value, message) {
|
|
@@ -8625,6 +8646,13 @@ function getPathsWithAncestors(paths) {
|
|
|
8625
8646
|
function isFogOfWarEnabled(routeDiscovery, ssr) {
|
|
8626
8647
|
return routeDiscovery.mode === "lazy" && ssr === true;
|
|
8627
8648
|
}
|
|
8649
|
+
var MANIFEST_MATCH_COST_LIMIT = 5e4;
|
|
8650
|
+
var MANIFEST_MATCH_COST_SEGMENT_THRESHOLD = 10;
|
|
8651
|
+
function shouldUseInitialRouteDiscovery(pathname, matchCost = 0) {
|
|
8652
|
+
let segmentCount = pathname.split("/").length - 1;
|
|
8653
|
+
let ancestorCount = Math.max(segmentCount - 1, 0);
|
|
8654
|
+
return ancestorCount * pathname.length + 1 > URL_LIMIT || segmentCount > MANIFEST_MATCH_COST_SEGMENT_THRESHOLD && segmentCount * matchCost > MANIFEST_MATCH_COST_LIMIT;
|
|
8655
|
+
}
|
|
8628
8656
|
function getPartialManifest({ sri, ...manifest }, router) {
|
|
8629
8657
|
let routeIds = new Set(router.state.matches.map((m) => m.route.id));
|
|
8630
8658
|
let segments = router.state.location.pathname.split("/").filter(Boolean);
|
|
@@ -10403,4 +10431,7 @@ function withErrorBoundaryProps(ErrorBoundary) {
|
|
|
10403
10431
|
|
|
10404
10432
|
|
|
10405
10433
|
|
|
10406
|
-
|
|
10434
|
+
|
|
10435
|
+
|
|
10436
|
+
|
|
10437
|
+
exports.ABSOLUTE_URL_REGEX = ABSOLUTE_URL_REGEX; exports.PROTOCOL_RELATIVE_URL_REGEX = PROTOCOL_RELATIVE_URL_REGEX; exports.Action = Action; exports.createMemoryHistory = createMemoryHistory; exports.createBrowserHistory = createBrowserHistory; exports.createHashHistory = createHashHistory; exports.invariant = invariant; exports.warning = warning; exports.createPath = createPath; exports.parsePath = parsePath; exports.createContext = createContext; exports.RouterContextProvider = RouterContextProvider; exports.convertRoutesToDataRoutes = convertRoutesToDataRoutes; exports.matchRoutes = matchRoutes; exports.matchRoutesImpl = matchRoutesImpl; exports.generatePath = generatePath; exports.matchPath = matchPath; exports.stripBasename = stripBasename; exports.resolvePath = resolvePath; exports.resolveTo = resolveTo; exports.joinPaths = joinPaths; exports.data = data; exports.redirect = redirect; exports.redirectDocument = redirectDocument; exports.replace = replace; exports.SUPPORTED_ERROR_TYPES = SUPPORTED_ERROR_TYPES; exports.ErrorResponseImpl = ErrorResponseImpl; exports.isRouteErrorResponse = isRouteErrorResponse; exports.parseToInfo = parseToInfo; exports.escapeHtml = escapeHtml; exports.escapeAttribute = escapeAttribute; exports.encode = encode; exports.instrumentHandler = instrumentHandler; exports.validateNavigationTarget = validateNavigationTarget; exports.IDLE_NAVIGATION = IDLE_NAVIGATION; exports.IDLE_FETCHER = IDLE_FETCHER; exports.IDLE_BLOCKER = IDLE_BLOCKER; exports.createRouter = createRouter; exports.createStaticHandler = createStaticHandler; exports.getStaticContextFromError = getStaticContextFromError; exports.hasInvalidProtocol = hasInvalidProtocol; exports.isDataWithResponseInit = isDataWithResponseInit; exports.isResponse = isResponse; exports.isRedirectStatusCode = isRedirectStatusCode; exports.isRedirectResponse = isRedirectResponse; exports.isMutationMethod = isMutationMethod; exports.createRequestInit = createRequestInit; exports.SingleFetchRedirectSymbol = SingleFetchRedirectSymbol; exports.SINGLE_FETCH_REDIRECT_STATUS = SINGLE_FETCH_REDIRECT_STATUS; exports.NO_BODY_STATUS_CODES = NO_BODY_STATUS_CODES; exports.StreamTransfer = StreamTransfer; exports.getTurboStreamSingleFetchDataStrategy = getTurboStreamSingleFetchDataStrategy; exports.getSingleFetchDataStrategyImpl = getSingleFetchDataStrategyImpl; exports.stripIndexParam = stripIndexParam; exports.singleFetchUrl = singleFetchUrl; exports.decodeViaTurboStream = decodeViaTurboStream; exports.DataRouterContext = DataRouterContext; exports.DataRouterStateContext = DataRouterStateContext; exports.RSCRouterContext = RSCRouterContext; exports.ViewTransitionContext = ViewTransitionContext; exports.FetchersContext = FetchersContext; exports.AwaitContextProvider = AwaitContextProvider; exports.NavigationContext = NavigationContext; exports.LocationContext = LocationContext; exports.RouteContext = RouteContext; exports.ENABLE_DEV_WARNINGS = ENABLE_DEV_WARNINGS; exports.warnOnce = warnOnce; exports.decodeRedirectErrorDigest = decodeRedirectErrorDigest; exports.decodeRouteErrorResponseDigest = decodeRouteErrorResponseDigest; exports.useHref = useHref; exports.useInRouterContext = useInRouterContext; exports.useLocation = useLocation; exports.useNavigationType = useNavigationType; exports.useMatch = useMatch; exports.useNavigate = useNavigate; exports.useOutletContext = useOutletContext; exports.useOutlet = useOutlet; exports.useParams = useParams; exports.useResolvedPath = useResolvedPath; exports.useRoutes = useRoutes; exports.useRouteId = useRouteId; exports.useNavigation = useNavigation; exports.useRevalidator = useRevalidator; exports.useMatches = useMatches; exports.useLoaderData = useLoaderData; exports.useRouteLoaderData = useRouteLoaderData; exports.useActionData = useActionData; exports.useRouteError = useRouteError; exports.useAsyncValue = useAsyncValue; exports.useAsyncError = useAsyncError; exports.useBlocker = useBlocker; exports.useRoute = useRoute; exports.useRouterState = useRouterState; exports.RemixErrorBoundary = RemixErrorBoundary; exports.createServerRoutes = createServerRoutes; exports.createClientRoutesWithHMRRevalidationOptOut = createClientRoutesWithHMRRevalidationOptOut; exports.noActionDefinedError = noActionDefinedError; exports.createClientRoutes = createClientRoutes; exports.shouldHydrateRouteLoader = shouldHydrateRouteLoader; exports.URL_LIMIT = URL_LIMIT; exports.getPathsWithAncestors = getPathsWithAncestors; exports.isFogOfWarEnabled = isFogOfWarEnabled; exports.shouldUseInitialRouteDiscovery = shouldUseInitialRouteDiscovery; exports.getPatchRoutesOnNavigationFunction = getPatchRoutesOnNavigationFunction; exports.useFogOFWarDiscovery = useFogOFWarDiscovery; exports.getManifestPath = getManifestPath; exports.FrameworkContext = FrameworkContext; exports.usePrefetchBehavior = usePrefetchBehavior; exports.CRITICAL_CSS_DATA_ATTRIBUTE = CRITICAL_CSS_DATA_ATTRIBUTE; exports.Links = Links; exports.PrefetchPageLinks = PrefetchPageLinks; exports.Meta = Meta; exports.setIsHydrated = setIsHydrated; exports.Scripts = Scripts; exports.mergeRefs = mergeRefs; exports.mapRouteProperties = mapRouteProperties; exports.hydrationRouteProperties = hydrationRouteProperties; exports.createMemoryRouter = createMemoryRouter; exports.RouterProvider = RouterProvider; exports.DataRoutes = DataRoutes2; exports.MemoryRouter = MemoryRouter; exports.Navigate = Navigate; exports.Outlet = Outlet; exports.Route = Route; exports.Router = Router; exports.Routes = Routes; exports.Await = Await; exports.createRoutesFromChildren = createRoutesFromChildren; exports.createRoutesFromElements = createRoutesFromElements; exports.renderMatches = renderMatches; exports.WithComponentProps = WithComponentProps; exports.withComponentProps = withComponentProps; exports.WithHydrateFallbackProps = WithHydrateFallbackProps; exports.withHydrateFallbackProps = withHydrateFallbackProps; exports.WithErrorBoundaryProps = WithErrorBoundaryProps; exports.withErrorBoundaryProps = withErrorBoundaryProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.18.
|
|
2
|
+
* react-router v7.18.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -32,12 +32,14 @@ import {
|
|
|
32
32
|
decodeRouteErrorResponseDigest,
|
|
33
33
|
decodeViaTurboStream,
|
|
34
34
|
encode,
|
|
35
|
+
escapeAttribute,
|
|
35
36
|
escapeHtml,
|
|
36
37
|
getManifestPath,
|
|
37
38
|
getStaticContextFromError,
|
|
38
39
|
hasInvalidProtocol,
|
|
39
40
|
instrumentHandler,
|
|
40
41
|
isDataWithResponseInit,
|
|
42
|
+
isFogOfWarEnabled,
|
|
41
43
|
isMutationMethod,
|
|
42
44
|
isRedirectResponse,
|
|
43
45
|
isRedirectStatusCode,
|
|
@@ -49,13 +51,14 @@ import {
|
|
|
49
51
|
redirectDocument,
|
|
50
52
|
replace,
|
|
51
53
|
shouldHydrateRouteLoader,
|
|
54
|
+
shouldUseInitialRouteDiscovery,
|
|
52
55
|
stripBasename,
|
|
53
56
|
useRouteError,
|
|
54
57
|
warnOnce,
|
|
55
58
|
withComponentProps,
|
|
56
59
|
withErrorBoundaryProps,
|
|
57
60
|
withHydrateFallbackProps
|
|
58
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-7RTFRKQW.mjs";
|
|
59
62
|
|
|
60
63
|
// lib/dom/ssr/server.tsx
|
|
61
64
|
import * as React from "react";
|
|
@@ -1474,10 +1477,17 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1474
1477
|
actionData: context.actionData,
|
|
1475
1478
|
errors: context.errors
|
|
1476
1479
|
};
|
|
1480
|
+
let routeDiscovery = build.routeDiscovery;
|
|
1481
|
+
if (isFogOfWarEnabled(routeDiscovery, build.ssr) && shouldUseInitialRouteDiscovery(
|
|
1482
|
+
context.location.pathname,
|
|
1483
|
+
staticHandler._matchCost
|
|
1484
|
+
)) {
|
|
1485
|
+
routeDiscovery = { ...routeDiscovery, mode: "initial" };
|
|
1486
|
+
}
|
|
1477
1487
|
let baseServerHandoff = {
|
|
1478
1488
|
basename: build.basename,
|
|
1479
1489
|
future: build.future,
|
|
1480
|
-
routeDiscovery
|
|
1490
|
+
routeDiscovery,
|
|
1481
1491
|
ssr: build.ssr,
|
|
1482
1492
|
isSpaMode: isSpaMode2
|
|
1483
1493
|
};
|
|
@@ -1500,7 +1510,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1500
1510
|
renderMeta: {},
|
|
1501
1511
|
future: build.future,
|
|
1502
1512
|
ssr: build.ssr,
|
|
1503
|
-
routeDiscovery
|
|
1513
|
+
routeDiscovery,
|
|
1504
1514
|
isSpaMode: isSpaMode2,
|
|
1505
1515
|
serializeError: (err) => serializeError(err, serverMode)
|
|
1506
1516
|
};
|
|
@@ -2197,7 +2207,7 @@ async function routeRSCServerRequest({
|
|
|
2197
2207
|
}
|
|
2198
2208
|
controller.enqueue(
|
|
2199
2209
|
new TextEncoder().encode(
|
|
2200
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2210
|
+
`<meta http-equiv="refresh" content="0;url=${escapeAttribute(renderRedirect.location)}"/>`
|
|
2201
2211
|
)
|
|
2202
2212
|
);
|
|
2203
2213
|
}
|
|
@@ -2317,7 +2327,7 @@ async function routeRSCServerRequest({
|
|
|
2317
2327
|
}
|
|
2318
2328
|
controller.enqueue(
|
|
2319
2329
|
new TextEncoder().encode(
|
|
2320
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2330
|
+
`<meta http-equiv="refresh" content="0;url=${escapeAttribute(retryRedirect.location)}"/>`
|
|
2321
2331
|
)
|
|
2322
2332
|
);
|
|
2323
2333
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
|
2
|
-
* react-router v7.18.
|
|
2
|
+
* react-router v7.18.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkHNBICOIUjs = require('./chunk-HNBICOIU.js');
|
|
18
18
|
|
|
19
19
|
// lib/dom/ssr/hydration.tsx
|
|
20
20
|
function getHydrationData({
|
|
@@ -29,12 +29,12 @@ function getHydrationData({
|
|
|
29
29
|
...state,
|
|
30
30
|
loaderData: { ...state.loaderData }
|
|
31
31
|
};
|
|
32
|
-
let initialMatches =
|
|
32
|
+
let initialMatches = _chunkHNBICOIUjs.matchRoutes.call(void 0, routes, location, basename);
|
|
33
33
|
if (initialMatches) {
|
|
34
34
|
for (let match of initialMatches) {
|
|
35
35
|
let routeId = match.route.id;
|
|
36
36
|
let routeInfo = getRouteInfo(routeId);
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkHNBICOIUjs.shouldHydrateRouteLoader.call(void 0,
|
|
38
38
|
routeId,
|
|
39
39
|
routeInfo.clientLoader,
|
|
40
40
|
routeInfo.hasLoader,
|
|
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
if (
|
|
115
|
+
if (_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, error)) {
|
|
116
116
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
117
117
|
ErrorWrapper,
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
120
120
|
title: "Unhandled Thrown Response!"
|
|
121
121
|
},
|
|
122
122
|
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
123
|
-
|
|
123
|
+
_chunkHNBICOIUjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
let errorInstance;
|
|
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
146
146
|
function RSCDefaultRootErrorBoundary({
|
|
147
147
|
hasRootLayout
|
|
148
148
|
}) {
|
|
149
|
-
let error =
|
|
149
|
+
let error = _chunkHNBICOIUjs.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|
|
@@ -425,6 +425,8 @@ interface StaticHandler {
|
|
|
425
425
|
* The set of data routes managed by this handler
|
|
426
426
|
*/
|
|
427
427
|
dataRoutes: DataRouteObject[];
|
|
428
|
+
/** @private Estimated route metadata visits per regex match. */
|
|
429
|
+
readonly _matchCost?: number;
|
|
428
430
|
/**
|
|
429
431
|
* @private
|
|
430
432
|
* PRIVATE - DO NOT USE
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { a as RouterProviderProps$1, R as RouterInit, C as ClientInstrumentation, b as ClientOnErrorFunction } from './context-
|
|
3
|
-
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-
|
|
2
|
+
import { a as RouterProviderProps$1, R as RouterInit, C as ClientInstrumentation, b as ClientOnErrorFunction } from './context-BlYKn1tE.mjs';
|
|
3
|
+
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-CiGxXXOl.mjs';
|
|
4
4
|
import './data-DEjBmEfD.mjs';
|
|
5
5
|
|
|
6
6
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RouterProviderProps as RouterProviderProps$1, RouterInit, ClientOnErrorFunction } from 'react-router';
|
|
3
|
-
import { C as ClientInstrumentation } from './instrumentation-
|
|
4
|
-
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-
|
|
3
|
+
import { C as ClientInstrumentation } from './instrumentation-CPkMwccd.js';
|
|
4
|
+
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-7x6a6gQP.js';
|
|
5
5
|
import './data-CjO11-hU.js';
|
|
6
6
|
|
|
7
7
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|