react-router 7.18.4 → 7.18.6
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 +21 -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-LVPI3KDG.js → chunk-3QTLHDUO.js} +7 -7
- package/dist/{production/chunk-G2MPF4YY.mjs → development/chunk-E2PF4K4Z.mjs} +25 -7
- package/dist/development/{chunk-HQO5H5CC.js → chunk-QM7ETCUK.js} +109 -104
- package/dist/development/{chunk-GR4NQCSD.js → chunk-S47XUPN5.js} +133 -66
- package/dist/development/{chunk-OB3PAWPO.mjs → chunk-YDNE64FV.mjs} +135 -64
- 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 +37 -35
- package/dist/development/dom-export.mjs +6 -4
- package/dist/development/{index-react-server-client-BjY-eKuf.d.ts → index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/development/{index-react-server-client-K63fpMH4.d.mts → 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 +109 -17
- package/dist/development/index-react-server.mjs +109 -17
- package/dist/development/index.d.mts +7 -7
- package/dist/development/index.d.ts +7 -7
- package/dist/development/index.js +121 -103
- 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-AOOKMWND.js → chunk-2WUBOUFU.js} +109 -104
- package/dist/production/{chunk-QURBR4FZ.js → chunk-3IBQ4CTZ.js} +7 -7
- package/dist/production/{chunk-YNGRUB6F.js → chunk-AC65NKOP.js} +133 -66
- package/dist/production/{chunk-Q34X6AWR.mjs → chunk-HEAXLYUI.mjs} +135 -64
- package/dist/{development/chunk-H4DAEOV7.mjs → production/chunk-JRCXCPLA.mjs} +25 -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 +37 -35
- package/dist/production/dom-export.mjs +6 -4
- package/dist/production/{index-react-server-client-BjY-eKuf.d.ts → index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/production/{index-react-server-client-K63fpMH4.d.mts → 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 +109 -17
- package/dist/production/index-react-server.mjs +109 -17
- package/dist/production/index.d.mts +7 -7
- package/dist/production/index.d.ts +7 -7
- package/dist/production/index.js +121 -103
- 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.6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
RSCRouterGlobalErrorBoundary,
|
|
14
14
|
getHydrationData,
|
|
15
15
|
populateRSCRouteModules
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-E2PF4K4Z.mjs";
|
|
17
17
|
import {
|
|
18
18
|
CRITICAL_CSS_DATA_ATTRIBUTE,
|
|
19
19
|
ErrorResponseImpl,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
stripIndexParam,
|
|
48
48
|
useFogOFWarDiscovery,
|
|
49
49
|
validateNavigationTarget
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-YDNE64FV.mjs";
|
|
51
51
|
|
|
52
52
|
// lib/dom-export/dom-router-provider.tsx
|
|
53
53
|
import * as React from "react";
|
|
@@ -201,7 +201,9 @@ function HydratedRouter(props) {
|
|
|
201
201
|
);
|
|
202
202
|
React2.useEffect(() => {
|
|
203
203
|
if (process.env.NODE_ENV === "development") {
|
|
204
|
-
|
|
204
|
+
React2.startTransition(() => {
|
|
205
|
+
setCriticalCss(void 0);
|
|
206
|
+
});
|
|
205
207
|
}
|
|
206
208
|
}, []);
|
|
207
209
|
React2.useEffect(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as ServerInstrumentation, H as HydrationState, e as StaticHandlerContext, c as RelativeRoutingType, a as Router$1, g as RouterState, R as RouterInit, t as FutureConfig$1, C as ClientInstrumentation, d as GetScrollRestorationKeyFunction, F as Fetcher, B as BlockerFunction, u as CreateStaticHandlerOptions$1, S as StaticHandler } from './instrumentation-
|
|
1
|
+
import { l as ServerInstrumentation, H as HydrationState, e as StaticHandlerContext, c as RelativeRoutingType, a as Router$1, g as RouterState, R as RouterInit, t as FutureConfig$1, C as ClientInstrumentation, d as GetScrollRestorationKeyFunction, F as Fetcher, B as BlockerFunction, u as CreateStaticHandlerOptions$1, S as StaticHandler } from './instrumentation-CPkMwccd.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { p as RouteManifest, aE as ServerRouteModule, t as MiddlewareEnabled, c as RouterContextProvider, u as AppLoadContext, s as LoaderFunctionArgs, a0 as ActionFunctionArgs, O as RouteModules, n as DataRouteObject, a as ClientLoaderFunction, o as RouteBranch, aF as TrackedPromise, f as History, T as To, L as Location, i as Action, ac as RouteMatch, Y as InitialEntry, _ as NonIndexRouteObject, a7 as LazyRouteFunction, Z as IndexRouteObject, P as Params, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, e as RouteObject, U as UIMatch, q as HTMLFormMethod, F as FormEncType, av as PageLinkDescriptor, Q as SerializeFrom } from './data-CjO11-hU.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as ServerInstrumentation, H as HydrationState, h as StaticHandlerContext, f as RelativeRoutingType, g as GetScrollRestorationKeyFunction, R as RouterInit, ah as FutureConfig$1, C as ClientInstrumentation, N as NavigateOptions, F as Fetcher, c as Router, B as BlockerFunction, ai as CreateStaticHandlerOptions$1, S as StaticHandler } from './context-
|
|
1
|
+
import { o as ServerInstrumentation, H as HydrationState, h as StaticHandlerContext, f as RelativeRoutingType, g as GetScrollRestorationKeyFunction, R as RouterInit, ah as FutureConfig$1, C as ClientInstrumentation, N as NavigateOptions, F as Fetcher, c as Router, B as BlockerFunction, ai as CreateStaticHandlerOptions$1, S as StaticHandler } from './context-BlYKn1tE.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { J as RouteManifest, aF as ServerRouteModule, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, o as LoaderFunctionArgs, a3 as ActionFunctionArgs, Z as RouteModules, E as DataRouteObject, a as ClientLoaderFunction, I as RouteBranch, m as HTMLFormMethod, n as FormEncType, aw as PageLinkDescriptor, T as To, s as History, z as DataStrategyFunction, B as PatchRoutesOnNavigationFunction, r as RouteObject, _ as SerializeFrom, L as Location } from './data-DEjBmEfD.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Q as MemoryRouter, T as Navigate, U as Outlet, V as Route, W as Router, X as RouterProvider, Y as Routes, A as UNSAFE_AwaitContextProvider, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps } from './context-
|
|
2
|
-
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-
|
|
1
|
+
export { Q as MemoryRouter, T as Navigate, U as Outlet, V as Route, W as Router, X as RouterProvider, Y as Routes, A as UNSAFE_AwaitContextProvider, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps } from './context-BlYKn1tE.mjs';
|
|
2
|
+
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-KK-TR-t7.mjs';
|
|
3
3
|
import './data-DEjBmEfD.mjs';
|
|
4
4
|
import 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { W as BrowserRouter, $ as Form, X as HashRouter, Y as Link, an as Links, j as MemoryRouter, am as Meta, _ as NavLink, k as Navigate, l as Outlet, m as Route, n as Router, o as RouterProvider, p as Routes, a0 as ScrollRestoration, ak as StaticRouter, al as StaticRouterProvider, b as UNSAFE_AwaitContextProvider, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, Z as unstable_HistoryRouter } from './index-react-server-client-
|
|
2
|
-
import './instrumentation-
|
|
1
|
+
export { W as BrowserRouter, $ as Form, X as HashRouter, Y as Link, an as Links, j as MemoryRouter, am as Meta, _ as NavLink, k as Navigate, l as Outlet, m as Route, n as Router, o as RouterProvider, p as Routes, a0 as ScrollRestoration, ak as StaticRouter, al as StaticRouterProvider, b as UNSAFE_AwaitContextProvider, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, Z as unstable_HistoryRouter } from './index-react-server-client-BaaZU3sM.js';
|
|
2
|
+
import './instrumentation-CPkMwccd.js';
|
|
3
3
|
import './data-CjO11-hU.js';
|
|
4
4
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.18.
|
|
2
|
+
* react-router v7.18.6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkQM7ETCUKjs = require('./chunk-QM7ETCUK.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -34,7 +34,7 @@ var _chunkHQO5H5CCjs = require('./chunk-HQO5H5CC.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkS47XUPN5js = require('./chunk-S47XUPN5.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkGR4NQCSDjs = require('./chunk-GR4NQCSD.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunkQM7ETCUKjs.BrowserRouter; exports.Form = _chunkQM7ETCUKjs.Form; exports.HashRouter = _chunkQM7ETCUKjs.HashRouter; exports.Link = _chunkQM7ETCUKjs.Link; exports.Links = _chunkS47XUPN5js.Links; exports.MemoryRouter = _chunkS47XUPN5js.MemoryRouter; exports.Meta = _chunkS47XUPN5js.Meta; exports.NavLink = _chunkQM7ETCUKjs.NavLink; exports.Navigate = _chunkS47XUPN5js.Navigate; exports.Outlet = _chunkS47XUPN5js.Outlet; exports.Route = _chunkS47XUPN5js.Route; exports.Router = _chunkS47XUPN5js.Router; exports.RouterProvider = _chunkS47XUPN5js.RouterProvider; exports.Routes = _chunkS47XUPN5js.Routes; exports.ScrollRestoration = _chunkQM7ETCUKjs.ScrollRestoration; exports.StaticRouter = _chunkQM7ETCUKjs.StaticRouter; exports.StaticRouterProvider = _chunkQM7ETCUKjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkS47XUPN5js.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkS47XUPN5js.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkS47XUPN5js.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkS47XUPN5js.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkQM7ETCUKjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.18.
|
|
2
|
+
* react-router v7.18.6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
WithComponentProps,
|
|
33
33
|
WithErrorBoundaryProps,
|
|
34
34
|
WithHydrateFallbackProps
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-YDNE64FV.mjs";
|
|
36
36
|
export {
|
|
37
37
|
BrowserRouter,
|
|
38
38
|
Form,
|
|
@@ -1461,6 +1461,8 @@ interface StaticHandler {
|
|
|
1461
1461
|
* The set of data routes managed by this handler
|
|
1462
1462
|
*/
|
|
1463
1463
|
dataRoutes: DataRouteObject[];
|
|
1464
|
+
/** @private Estimated route metadata visits per regex match. */
|
|
1465
|
+
readonly _matchCost?: number;
|
|
1464
1466
|
/**
|
|
1465
1467
|
* @private
|
|
1466
1468
|
* PRIVATE - DO NOT USE
|
|
@@ -1461,6 +1461,8 @@ interface StaticHandler {
|
|
|
1461
1461
|
* The set of data routes managed by this handler
|
|
1462
1462
|
*/
|
|
1463
1463
|
dataRoutes: DataRouteObject[];
|
|
1464
|
+
/** @private Estimated route metadata visits per regex match. */
|
|
1465
|
+
readonly _matchCost?: number;
|
|
1464
1466
|
/**
|
|
1465
1467
|
* @private
|
|
1466
1468
|
* PRIVATE - DO NOT USE
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v7.18.
|
|
30
|
+
* react-router v7.18.6
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -293,6 +293,53 @@ function isPlainObject(thing) {
|
|
|
293
293
|
return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
+
// lib/router/navigation.ts
|
|
297
|
+
var DEFAULT_NAVIGATION_URL = new URL("http://localhost");
|
|
298
|
+
function isSameOrigin(a, b) {
|
|
299
|
+
return a.origin === b.origin && (a.origin !== "null" || a.protocol === b.protocol && a.host === b.host);
|
|
300
|
+
}
|
|
301
|
+
function isExplicitUrl(destination, target) {
|
|
302
|
+
if (destination.startsWith("//")) {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
let protocol = target.protocol.toLowerCase();
|
|
306
|
+
if (!destination.toLowerCase().startsWith(protocol)) {
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
return target.host === "" || destination.slice(protocol.length).startsWith("//");
|
|
310
|
+
}
|
|
311
|
+
function validateDocumentNavigationTarget(destination) {
|
|
312
|
+
let normalized = destination.replace(/[\t\n\r]/g, "");
|
|
313
|
+
let start = 0;
|
|
314
|
+
while (normalized.charCodeAt(start) <= 32) start++;
|
|
315
|
+
normalized = normalized.slice(start);
|
|
316
|
+
if (!ABSOLUTE_URL_REGEX.test(normalized)) return;
|
|
317
|
+
let target;
|
|
318
|
+
try {
|
|
319
|
+
target = new URL(destination, DEFAULT_NAVIGATION_URL);
|
|
320
|
+
} catch {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (!isExplicitUrl(destination, target)) {
|
|
324
|
+
throw new Error("External navigation is not allowed");
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
function validateNavigationTarget(original, resolved, currentUrl, externalPolicy) {
|
|
328
|
+
let originalUrl = null;
|
|
329
|
+
try {
|
|
330
|
+
originalUrl = original == null ? null : new URL(original, currentUrl);
|
|
331
|
+
} catch {
|
|
332
|
+
}
|
|
333
|
+
let resolvedUrl = new URL(resolved, currentUrl);
|
|
334
|
+
originalUrl != null && !isSameOrigin(originalUrl, currentUrl);
|
|
335
|
+
let resolvedIsExternal = !isSameOrigin(resolvedUrl, currentUrl);
|
|
336
|
+
if (resolvedIsExternal) {
|
|
337
|
+
if (originalUrl == null || !isExplicitUrl(original, originalUrl) || !isSameOrigin(originalUrl, resolvedUrl)) {
|
|
338
|
+
throw new Error("External navigation is not allowed");
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
296
343
|
// lib/router/utils.ts
|
|
297
344
|
function createContext(defaultValue) {
|
|
298
345
|
return { defaultValue };
|
|
@@ -874,6 +921,7 @@ function data(data2, init) {
|
|
|
874
921
|
);
|
|
875
922
|
}
|
|
876
923
|
var redirect = (url, init = 302) => {
|
|
924
|
+
validateDocumentNavigationTarget(url);
|
|
877
925
|
let responseInit = init;
|
|
878
926
|
if (typeof responseInit === "number") {
|
|
879
927
|
responseInit = { status: responseInit };
|
|
@@ -966,6 +1014,10 @@ function createStaticHandler(routes, opts) {
|
|
|
966
1014
|
manifest
|
|
967
1015
|
);
|
|
968
1016
|
let routeBranches = flattenAndRankRoutes(dataRoutes);
|
|
1017
|
+
let matchCost = routeBranches.reduce(
|
|
1018
|
+
(total, branch) => total + branch.routesMeta.length,
|
|
1019
|
+
0
|
|
1020
|
+
);
|
|
969
1021
|
async function query(request, {
|
|
970
1022
|
requestContext,
|
|
971
1023
|
filterMatchesToLoad,
|
|
@@ -1585,6 +1637,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1585
1637
|
}
|
|
1586
1638
|
return {
|
|
1587
1639
|
dataRoutes,
|
|
1640
|
+
_matchCost: matchCost,
|
|
1588
1641
|
_internalRouteBranches: routeBranches,
|
|
1589
1642
|
query,
|
|
1590
1643
|
queryRoute
|
|
@@ -2222,6 +2275,10 @@ function normalizeRelativeRoutingRedirectResponse(response, request, routeId, ma
|
|
|
2222
2275
|
location,
|
|
2223
2276
|
"Redirects returned/thrown from loaders/actions must have a Location header"
|
|
2224
2277
|
);
|
|
2278
|
+
validateNavigationTarget(
|
|
2279
|
+
location,
|
|
2280
|
+
location,
|
|
2281
|
+
new URL(request.url));
|
|
2225
2282
|
if (!isAbsoluteUrl(location)) {
|
|
2226
2283
|
let trimmedMatches = matches.slice(
|
|
2227
2284
|
0,
|
|
@@ -2565,6 +2622,13 @@ function getPathsWithAncestors(paths) {
|
|
|
2565
2622
|
});
|
|
2566
2623
|
return Array.from(result);
|
|
2567
2624
|
}
|
|
2625
|
+
var MANIFEST_MATCH_COST_LIMIT = 5e4;
|
|
2626
|
+
var MANIFEST_MATCH_COST_SEGMENT_THRESHOLD = 10;
|
|
2627
|
+
function shouldUseInitialRouteDiscovery(pathname, matchCost = 0) {
|
|
2628
|
+
let segmentCount = pathname.split("/").length - 1;
|
|
2629
|
+
let ancestorCount = Math.max(segmentCount - 1, 0);
|
|
2630
|
+
return ancestorCount * pathname.length + 1 > URL_LIMIT || segmentCount > MANIFEST_MATCH_COST_SEGMENT_THRESHOLD && segmentCount * matchCost > MANIFEST_MATCH_COST_LIMIT;
|
|
2631
|
+
}
|
|
2568
2632
|
|
|
2569
2633
|
// lib/actions.ts
|
|
2570
2634
|
function throwIfPotentialCSRFAttack(request, allowedActionOrigins) {
|
|
@@ -2789,7 +2853,7 @@ async function matchRSCServerRequest({
|
|
|
2789
2853
|
}
|
|
2790
2854
|
const leafMatch = matches?.[matches.length - 1];
|
|
2791
2855
|
if (!isDataRequest && leafMatch && !leafMatch.route.Component && !leafMatch.route.ErrorBoundary) {
|
|
2792
|
-
|
|
2856
|
+
let response2 = await generateResourceResponse(
|
|
2793
2857
|
routerRequest,
|
|
2794
2858
|
routes,
|
|
2795
2859
|
basename,
|
|
@@ -2797,6 +2861,7 @@ async function matchRSCServerRequest({
|
|
|
2797
2861
|
requestContext,
|
|
2798
2862
|
onError
|
|
2799
2863
|
);
|
|
2864
|
+
return normalizeResourceResponse(request, response2);
|
|
2800
2865
|
}
|
|
2801
2866
|
let response = await generateRenderResponse(
|
|
2802
2867
|
routerRequest,
|
|
@@ -2817,6 +2882,20 @@ async function matchRSCServerRequest({
|
|
|
2817
2882
|
response.headers.set("X-Remix-Response", "yes");
|
|
2818
2883
|
return response;
|
|
2819
2884
|
}
|
|
2885
|
+
function normalizeResourceResponse(request, response) {
|
|
2886
|
+
if (request.method === "HEAD") {
|
|
2887
|
+
response.body?.cancel().catch(() => {
|
|
2888
|
+
});
|
|
2889
|
+
let headers = new Headers(response.headers);
|
|
2890
|
+
headers.set("React-Router-Resource", "true");
|
|
2891
|
+
return new Response(null, {
|
|
2892
|
+
status: response.status,
|
|
2893
|
+
statusText: response.statusText,
|
|
2894
|
+
headers
|
|
2895
|
+
});
|
|
2896
|
+
}
|
|
2897
|
+
return response;
|
|
2898
|
+
}
|
|
2820
2899
|
async function generateManifestResponse(routes, basename, request, generateResponse, temporaryReferences, routeDiscovery) {
|
|
2821
2900
|
let url = new URL(request.url);
|
|
2822
2901
|
if (url.toString().length > URL_LIMIT) {
|
|
@@ -3130,7 +3209,8 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
3130
3209
|
temporaryReferences,
|
|
3131
3210
|
skipRevalidation,
|
|
3132
3211
|
ctx.redirect?.headers,
|
|
3133
|
-
routeDiscovery
|
|
3212
|
+
routeDiscovery,
|
|
3213
|
+
staticHandler._matchCost
|
|
3134
3214
|
);
|
|
3135
3215
|
}
|
|
3136
3216
|
})
|
|
@@ -3180,7 +3260,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
|
|
|
3180
3260
|
{ temporaryReferences, onError: defaultOnError }
|
|
3181
3261
|
);
|
|
3182
3262
|
}
|
|
3183
|
-
async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery) {
|
|
3263
|
+
async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery, matchCost) {
|
|
3184
3264
|
statusCode = staticContext.statusCode ?? statusCode;
|
|
3185
3265
|
if (staticContext.errors) {
|
|
3186
3266
|
staticContext.errors = Object.fromEntries(
|
|
@@ -3222,7 +3302,8 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
3222
3302
|
routeIdsToLoad,
|
|
3223
3303
|
isDataRequest,
|
|
3224
3304
|
staticContext,
|
|
3225
|
-
routeDiscovery
|
|
3305
|
+
routeDiscovery,
|
|
3306
|
+
matchCost
|
|
3226
3307
|
);
|
|
3227
3308
|
let payload;
|
|
3228
3309
|
if (actionResult) {
|
|
@@ -3249,7 +3330,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
3249
3330
|
{ temporaryReferences, onError: defaultOnError }
|
|
3250
3331
|
);
|
|
3251
3332
|
}
|
|
3252
|
-
async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery) {
|
|
3333
|
+
async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery, matchCost) {
|
|
3253
3334
|
let deepestRenderedRouteIdx = staticContext.matches.length - 1;
|
|
3254
3335
|
let parentIds = {};
|
|
3255
3336
|
staticContext.matches.forEach((m, i) => {
|
|
@@ -3273,18 +3354,27 @@ async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToL
|
|
|
3273
3354
|
});
|
|
3274
3355
|
})
|
|
3275
3356
|
);
|
|
3276
|
-
let
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3357
|
+
let pathname = staticContext.location.pathname;
|
|
3358
|
+
let useInitialRouteDiscovery = routeDiscovery?.mode === "initial" && !isDataRequest || shouldUseInitialRouteDiscovery(pathname, matchCost);
|
|
3359
|
+
let patches;
|
|
3360
|
+
if (useInitialRouteDiscovery) {
|
|
3361
|
+
patches = getAllRoutePatches(routes).then(
|
|
3362
|
+
(patches2) => patches2.filter(
|
|
3363
|
+
(patch) => !staticContext.matches.some((m) => m.route.id === patch.id)
|
|
3364
|
+
)
|
|
3365
|
+
);
|
|
3366
|
+
} else {
|
|
3367
|
+
patches = getAdditionalRoutePatches(
|
|
3368
|
+
// The full pathname is last and its matches are already in the payload.
|
|
3369
|
+
getPathsWithAncestors([pathname]).slice(0, -1),
|
|
3370
|
+
routes,
|
|
3371
|
+
basename,
|
|
3372
|
+
staticContext.matches.map((m) => m.route.id)
|
|
3373
|
+
);
|
|
3374
|
+
}
|
|
3286
3375
|
return {
|
|
3287
3376
|
...baseRenderPayload,
|
|
3377
|
+
routeDiscovery: useInitialRouteDiscovery ? { mode: "initial" } : baseRenderPayload.routeDiscovery,
|
|
3288
3378
|
matches: await matchesPromise,
|
|
3289
3379
|
patches
|
|
3290
3380
|
};
|
|
@@ -3512,7 +3602,9 @@ function href(path, ...args) {
|
|
|
3512
3602
|
result += "/" + value;
|
|
3513
3603
|
}
|
|
3514
3604
|
}
|
|
3515
|
-
|
|
3605
|
+
result = result.replace(/^[\\/]{2,}/, "/") || "/";
|
|
3606
|
+
validateDocumentNavigationTarget(result);
|
|
3607
|
+
return result;
|
|
3516
3608
|
}
|
|
3517
3609
|
function trimTrailingSplat(path) {
|
|
3518
3610
|
let i = path.length - 1;
|
|
@@ -6,7 +6,7 @@ export { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLi
|
|
|
6
6
|
import { serialize, parse } from 'cookie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* react-router v7.18.
|
|
9
|
+
* react-router v7.18.6
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -272,6 +272,53 @@ function isPlainObject(thing) {
|
|
|
272
272
|
return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
// lib/router/navigation.ts
|
|
276
|
+
var DEFAULT_NAVIGATION_URL = new URL("http://localhost");
|
|
277
|
+
function isSameOrigin(a, b) {
|
|
278
|
+
return a.origin === b.origin && (a.origin !== "null" || a.protocol === b.protocol && a.host === b.host);
|
|
279
|
+
}
|
|
280
|
+
function isExplicitUrl(destination, target) {
|
|
281
|
+
if (destination.startsWith("//")) {
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
let protocol = target.protocol.toLowerCase();
|
|
285
|
+
if (!destination.toLowerCase().startsWith(protocol)) {
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
return target.host === "" || destination.slice(protocol.length).startsWith("//");
|
|
289
|
+
}
|
|
290
|
+
function validateDocumentNavigationTarget(destination) {
|
|
291
|
+
let normalized = destination.replace(/[\t\n\r]/g, "");
|
|
292
|
+
let start = 0;
|
|
293
|
+
while (normalized.charCodeAt(start) <= 32) start++;
|
|
294
|
+
normalized = normalized.slice(start);
|
|
295
|
+
if (!ABSOLUTE_URL_REGEX.test(normalized)) return;
|
|
296
|
+
let target;
|
|
297
|
+
try {
|
|
298
|
+
target = new URL(destination, DEFAULT_NAVIGATION_URL);
|
|
299
|
+
} catch {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (!isExplicitUrl(destination, target)) {
|
|
303
|
+
throw new Error("External navigation is not allowed");
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function validateNavigationTarget(original, resolved, currentUrl, externalPolicy) {
|
|
307
|
+
let originalUrl = null;
|
|
308
|
+
try {
|
|
309
|
+
originalUrl = original == null ? null : new URL(original, currentUrl);
|
|
310
|
+
} catch {
|
|
311
|
+
}
|
|
312
|
+
let resolvedUrl = new URL(resolved, currentUrl);
|
|
313
|
+
originalUrl != null && !isSameOrigin(originalUrl, currentUrl);
|
|
314
|
+
let resolvedIsExternal = !isSameOrigin(resolvedUrl, currentUrl);
|
|
315
|
+
if (resolvedIsExternal) {
|
|
316
|
+
if (originalUrl == null || !isExplicitUrl(original, originalUrl) || !isSameOrigin(originalUrl, resolvedUrl)) {
|
|
317
|
+
throw new Error("External navigation is not allowed");
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
275
322
|
// lib/router/utils.ts
|
|
276
323
|
function createContext(defaultValue) {
|
|
277
324
|
return { defaultValue };
|
|
@@ -853,6 +900,7 @@ function data(data2, init) {
|
|
|
853
900
|
);
|
|
854
901
|
}
|
|
855
902
|
var redirect = (url, init = 302) => {
|
|
903
|
+
validateDocumentNavigationTarget(url);
|
|
856
904
|
let responseInit = init;
|
|
857
905
|
if (typeof responseInit === "number") {
|
|
858
906
|
responseInit = { status: responseInit };
|
|
@@ -945,6 +993,10 @@ function createStaticHandler(routes, opts) {
|
|
|
945
993
|
manifest
|
|
946
994
|
);
|
|
947
995
|
let routeBranches = flattenAndRankRoutes(dataRoutes);
|
|
996
|
+
let matchCost = routeBranches.reduce(
|
|
997
|
+
(total, branch) => total + branch.routesMeta.length,
|
|
998
|
+
0
|
|
999
|
+
);
|
|
948
1000
|
async function query(request, {
|
|
949
1001
|
requestContext,
|
|
950
1002
|
filterMatchesToLoad,
|
|
@@ -1564,6 +1616,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1564
1616
|
}
|
|
1565
1617
|
return {
|
|
1566
1618
|
dataRoutes,
|
|
1619
|
+
_matchCost: matchCost,
|
|
1567
1620
|
_internalRouteBranches: routeBranches,
|
|
1568
1621
|
query,
|
|
1569
1622
|
queryRoute
|
|
@@ -2201,6 +2254,10 @@ function normalizeRelativeRoutingRedirectResponse(response, request, routeId, ma
|
|
|
2201
2254
|
location,
|
|
2202
2255
|
"Redirects returned/thrown from loaders/actions must have a Location header"
|
|
2203
2256
|
);
|
|
2257
|
+
validateNavigationTarget(
|
|
2258
|
+
location,
|
|
2259
|
+
location,
|
|
2260
|
+
new URL(request.url));
|
|
2204
2261
|
if (!isAbsoluteUrl(location)) {
|
|
2205
2262
|
let trimmedMatches = matches.slice(
|
|
2206
2263
|
0,
|
|
@@ -2544,6 +2601,13 @@ function getPathsWithAncestors(paths) {
|
|
|
2544
2601
|
});
|
|
2545
2602
|
return Array.from(result);
|
|
2546
2603
|
}
|
|
2604
|
+
var MANIFEST_MATCH_COST_LIMIT = 5e4;
|
|
2605
|
+
var MANIFEST_MATCH_COST_SEGMENT_THRESHOLD = 10;
|
|
2606
|
+
function shouldUseInitialRouteDiscovery(pathname, matchCost = 0) {
|
|
2607
|
+
let segmentCount = pathname.split("/").length - 1;
|
|
2608
|
+
let ancestorCount = Math.max(segmentCount - 1, 0);
|
|
2609
|
+
return ancestorCount * pathname.length + 1 > URL_LIMIT || segmentCount > MANIFEST_MATCH_COST_SEGMENT_THRESHOLD && segmentCount * matchCost > MANIFEST_MATCH_COST_LIMIT;
|
|
2610
|
+
}
|
|
2547
2611
|
|
|
2548
2612
|
// lib/actions.ts
|
|
2549
2613
|
function throwIfPotentialCSRFAttack(request, allowedActionOrigins) {
|
|
@@ -2768,7 +2832,7 @@ async function matchRSCServerRequest({
|
|
|
2768
2832
|
}
|
|
2769
2833
|
const leafMatch = matches?.[matches.length - 1];
|
|
2770
2834
|
if (!isDataRequest && leafMatch && !leafMatch.route.Component && !leafMatch.route.ErrorBoundary) {
|
|
2771
|
-
|
|
2835
|
+
let response2 = await generateResourceResponse(
|
|
2772
2836
|
routerRequest,
|
|
2773
2837
|
routes,
|
|
2774
2838
|
basename,
|
|
@@ -2776,6 +2840,7 @@ async function matchRSCServerRequest({
|
|
|
2776
2840
|
requestContext,
|
|
2777
2841
|
onError
|
|
2778
2842
|
);
|
|
2843
|
+
return normalizeResourceResponse(request, response2);
|
|
2779
2844
|
}
|
|
2780
2845
|
let response = await generateRenderResponse(
|
|
2781
2846
|
routerRequest,
|
|
@@ -2796,6 +2861,20 @@ async function matchRSCServerRequest({
|
|
|
2796
2861
|
response.headers.set("X-Remix-Response", "yes");
|
|
2797
2862
|
return response;
|
|
2798
2863
|
}
|
|
2864
|
+
function normalizeResourceResponse(request, response) {
|
|
2865
|
+
if (request.method === "HEAD") {
|
|
2866
|
+
response.body?.cancel().catch(() => {
|
|
2867
|
+
});
|
|
2868
|
+
let headers = new Headers(response.headers);
|
|
2869
|
+
headers.set("React-Router-Resource", "true");
|
|
2870
|
+
return new Response(null, {
|
|
2871
|
+
status: response.status,
|
|
2872
|
+
statusText: response.statusText,
|
|
2873
|
+
headers
|
|
2874
|
+
});
|
|
2875
|
+
}
|
|
2876
|
+
return response;
|
|
2877
|
+
}
|
|
2799
2878
|
async function generateManifestResponse(routes, basename, request, generateResponse, temporaryReferences, routeDiscovery) {
|
|
2800
2879
|
let url = new URL(request.url);
|
|
2801
2880
|
if (url.toString().length > URL_LIMIT) {
|
|
@@ -3109,7 +3188,8 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
3109
3188
|
temporaryReferences,
|
|
3110
3189
|
skipRevalidation,
|
|
3111
3190
|
ctx.redirect?.headers,
|
|
3112
|
-
routeDiscovery
|
|
3191
|
+
routeDiscovery,
|
|
3192
|
+
staticHandler._matchCost
|
|
3113
3193
|
);
|
|
3114
3194
|
}
|
|
3115
3195
|
})
|
|
@@ -3159,7 +3239,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
|
|
|
3159
3239
|
{ temporaryReferences, onError: defaultOnError }
|
|
3160
3240
|
);
|
|
3161
3241
|
}
|
|
3162
|
-
async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery) {
|
|
3242
|
+
async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery, matchCost) {
|
|
3163
3243
|
statusCode = staticContext.statusCode ?? statusCode;
|
|
3164
3244
|
if (staticContext.errors) {
|
|
3165
3245
|
staticContext.errors = Object.fromEntries(
|
|
@@ -3201,7 +3281,8 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
3201
3281
|
routeIdsToLoad,
|
|
3202
3282
|
isDataRequest,
|
|
3203
3283
|
staticContext,
|
|
3204
|
-
routeDiscovery
|
|
3284
|
+
routeDiscovery,
|
|
3285
|
+
matchCost
|
|
3205
3286
|
);
|
|
3206
3287
|
let payload;
|
|
3207
3288
|
if (actionResult) {
|
|
@@ -3228,7 +3309,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
3228
3309
|
{ temporaryReferences, onError: defaultOnError }
|
|
3229
3310
|
);
|
|
3230
3311
|
}
|
|
3231
|
-
async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery) {
|
|
3312
|
+
async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery, matchCost) {
|
|
3232
3313
|
let deepestRenderedRouteIdx = staticContext.matches.length - 1;
|
|
3233
3314
|
let parentIds = {};
|
|
3234
3315
|
staticContext.matches.forEach((m, i) => {
|
|
@@ -3252,18 +3333,27 @@ async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToL
|
|
|
3252
3333
|
});
|
|
3253
3334
|
})
|
|
3254
3335
|
);
|
|
3255
|
-
let
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3336
|
+
let pathname = staticContext.location.pathname;
|
|
3337
|
+
let useInitialRouteDiscovery = routeDiscovery?.mode === "initial" && !isDataRequest || shouldUseInitialRouteDiscovery(pathname, matchCost);
|
|
3338
|
+
let patches;
|
|
3339
|
+
if (useInitialRouteDiscovery) {
|
|
3340
|
+
patches = getAllRoutePatches(routes).then(
|
|
3341
|
+
(patches2) => patches2.filter(
|
|
3342
|
+
(patch) => !staticContext.matches.some((m) => m.route.id === patch.id)
|
|
3343
|
+
)
|
|
3344
|
+
);
|
|
3345
|
+
} else {
|
|
3346
|
+
patches = getAdditionalRoutePatches(
|
|
3347
|
+
// The full pathname is last and its matches are already in the payload.
|
|
3348
|
+
getPathsWithAncestors([pathname]).slice(0, -1),
|
|
3349
|
+
routes,
|
|
3350
|
+
basename,
|
|
3351
|
+
staticContext.matches.map((m) => m.route.id)
|
|
3352
|
+
);
|
|
3353
|
+
}
|
|
3265
3354
|
return {
|
|
3266
3355
|
...baseRenderPayload,
|
|
3356
|
+
routeDiscovery: useInitialRouteDiscovery ? { mode: "initial" } : baseRenderPayload.routeDiscovery,
|
|
3267
3357
|
matches: await matchesPromise,
|
|
3268
3358
|
patches
|
|
3269
3359
|
};
|
|
@@ -3491,7 +3581,9 @@ function href(path, ...args) {
|
|
|
3491
3581
|
result += "/" + value;
|
|
3492
3582
|
}
|
|
3493
3583
|
}
|
|
3494
|
-
|
|
3584
|
+
result = result.replace(/^[\\/]{2,}/, "/") || "/";
|
|
3585
|
+
validateDocumentNavigationTarget(result);
|
|
3586
|
+
return result;
|
|
3495
3587
|
}
|
|
3496
3588
|
function trimTrailingSplat(path) {
|
|
3497
3589
|
let i = path.length - 1;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Z as RouteModules, z as DataStrategyFunction, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, T as To, L as Location, P as Params, U as UIMatch, v as Action, _ as SerializeFrom, $ as PathPattern, a0 as PathMatch, a1 as ParamParseKey, K as Path, r as RouteObject, G as GetLoaderData, l as GetActionData, O as InitialEntry, W as IndexRouteObject, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, Q as NonIndexRouteObject, a2 as Equal, B as PatchRoutesOnNavigationFunction, E as DataRouteObject, a as ClientLoaderFunction } from './data-DEjBmEfD.mjs';
|
|
2
2
|
export { a3 as ActionFunctionArgs, a4 as BaseRouteObject, C as ClientActionFunction, as as ClientActionFunctionArgs, at as ClientLoaderFunctionArgs, w as DataRouteMatch, a5 as DataStrategyFunctionArgs, a6 as DataStrategyMatch, D as DataStrategyResult, a8 as ErrorResponse, n as FormEncType, a9 as FormMethod, ay as Future, m as HTMLFormMethod, au as HeadersArgs, H as HeadersFunction, ax as HtmlLinkDescriptor, V as LazyRouteFunction, e as LinkDescriptor, o as LoaderFunctionArgs, av as MetaArgs, g as MetaDescriptor, aa as MiddlewareFunction, aw as PageLinkDescriptor, ab as PatchRoutesOnNavigationFunctionArgs, ac as PathParam, ad as RedirectFunction, X as RouteMatch, ae as RouterContext, S as ShouldRevalidateFunction, af as ShouldRevalidateFunctionArgs, a7 as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aB as UNSAFE_createBrowserHistory, aC as UNSAFE_createHashHistory, aA as UNSAFE_createMemoryHistory, aD as UNSAFE_invariant, ag as createContext, ah as createPath, aj as data, ak as generatePath, al as isRouteErrorResponse, am as matchPath, an as matchRoutes, ai as parsePath, ao as redirect, ap as redirectDocument, aq as replace, ar as resolvePath, az as unstable_SerializesTo } from './data-DEjBmEfD.mjs';
|
|
3
|
-
import { c as Router, N as NavigateOptions, d as NavigationStates, B as BlockerFunction, e as Blocker, f as RelativeRoutingType, H as HydrationState } from './context-
|
|
4
|
-
export { K as Await, w as AwaitProps, C as ClientInstrumentation, b as ClientOnErrorFunction, F as Fetcher, G as GetScrollPositionFunction, g as GetScrollRestorationKeyFunction, u as IDLE_BLOCKER, t as IDLE_FETCHER, s as IDLE_NAVIGATION, x as IndexRouteProps, I as InstrumentRequestHandlerFunction, q as InstrumentRouteFunction, p as InstrumentRouterFunction, r as InstrumentationHandlerResult, L as LayoutRouteProps, Q as MemoryRouter, M as MemoryRouterOpts, y as MemoryRouterProps, T as Navigate, z as NavigateProps, i as Navigation, v as Navigator, U as Outlet, O as OutletProps, P as PathRouteProps, n as RevalidationState, V as Route, D as RouteProps, W as Router, m as RouterFetchOptions, R as RouterInit, l as RouterNavigateOptions, E as RouterProps, X as RouterProvider, a as RouterProviderProps, j as RouterState, k as RouterSubscriber, Y as Routes, J as RoutesProps, o as ServerInstrumentation, S as StaticHandler, h as StaticHandlerContext, A as UNSAFE_AwaitContextProvider, a2 as UNSAFE_DataRouterContext, a3 as UNSAFE_DataRouterStateContext, a4 as UNSAFE_FetchersContext, a5 as UNSAFE_LocationContext, a6 as UNSAFE_NavigationContext, a7 as UNSAFE_RouteContext, a8 as UNSAFE_ViewTransitionContext, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps, a1 as UNSAFE_createRouter, a9 as UNSAFE_hydrationRouteProperties, aa as UNSAFE_mapRouteProperties, ac as UNSAFE_withComponentProps, ag as UNSAFE_withErrorBoundaryProps, ae as UNSAFE_withHydrateFallbackProps, Z as createMemoryRouter, _ as createRoutesFromChildren, $ as createRoutesFromElements, a0 as renderMatches } from './context-
|
|
3
|
+
import { c as Router, N as NavigateOptions, d as NavigationStates, B as BlockerFunction, e as Blocker, f as RelativeRoutingType, H as HydrationState } from './context-BlYKn1tE.mjs';
|
|
4
|
+
export { K as Await, w as AwaitProps, C as ClientInstrumentation, b as ClientOnErrorFunction, F as Fetcher, G as GetScrollPositionFunction, g as GetScrollRestorationKeyFunction, u as IDLE_BLOCKER, t as IDLE_FETCHER, s as IDLE_NAVIGATION, x as IndexRouteProps, I as InstrumentRequestHandlerFunction, q as InstrumentRouteFunction, p as InstrumentRouterFunction, r as InstrumentationHandlerResult, L as LayoutRouteProps, Q as MemoryRouter, M as MemoryRouterOpts, y as MemoryRouterProps, T as Navigate, z as NavigateProps, i as Navigation, v as Navigator, U as Outlet, O as OutletProps, P as PathRouteProps, n as RevalidationState, V as Route, D as RouteProps, W as Router, m as RouterFetchOptions, R as RouterInit, l as RouterNavigateOptions, E as RouterProps, X as RouterProvider, a as RouterProviderProps, j as RouterState, k as RouterSubscriber, Y as Routes, J as RoutesProps, o as ServerInstrumentation, S as StaticHandler, h as StaticHandlerContext, A as UNSAFE_AwaitContextProvider, a2 as UNSAFE_DataRouterContext, a3 as UNSAFE_DataRouterStateContext, a4 as UNSAFE_FetchersContext, a5 as UNSAFE_LocationContext, a6 as UNSAFE_NavigationContext, a7 as UNSAFE_RouteContext, a8 as UNSAFE_ViewTransitionContext, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps, a1 as UNSAFE_createRouter, a9 as UNSAFE_hydrationRouteProperties, aa as UNSAFE_mapRouteProperties, ac as UNSAFE_withComponentProps, ag as UNSAFE_withErrorBoundaryProps, ae as UNSAFE_withHydrateFallbackProps, Z as createMemoryRouter, _ as createRoutesFromChildren, $ as createRoutesFromElements, a0 as renderMatches } from './context-BlYKn1tE.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { ReactElement } from 'react';
|
|
7
7
|
import { a as RouteModules$1, P as Pages } from './register-CmkRspdl.mjs';
|
|
8
8
|
export { b as Register } from './register-CmkRspdl.mjs';
|
|
9
|
-
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-
|
|
10
|
-
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-
|
|
9
|
+
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-KK-TR-t7.mjs';
|
|
10
|
+
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-KK-TR-t7.mjs';
|
|
11
11
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
12
12
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
13
|
-
import { e as RSCPayload, g as getRequest, m as matchRSCServerRequest } from './browser-
|
|
14
|
-
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, h as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, i as unstable_RSCMatch, f as unstable_RSCRenderPayload, n as unstable_RSCRouteConfig, l as unstable_RSCRouteConfigEntry, j as unstable_RSCRouteManifest, k as unstable_RSCRouteMatch } from './browser-
|
|
13
|
+
import { e as RSCPayload, g as getRequest, m as matchRSCServerRequest } from './browser-CiGxXXOl.mjs';
|
|
14
|
+
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, h as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, i as unstable_RSCMatch, f as unstable_RSCRenderPayload, n as unstable_RSCRouteConfig, l as unstable_RSCRouteConfigEntry, j as unstable_RSCRouteManifest, k as unstable_RSCRouteMatch } from './browser-CiGxXXOl.mjs';
|
|
15
15
|
|
|
16
16
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
17
17
|
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined, trailingSlashAware: boolean): DataStrategyFunction;
|
|
@@ -1445,7 +1445,7 @@ declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps
|
|
|
1445
1445
|
error: Error | null;
|
|
1446
1446
|
location: Location<any>;
|
|
1447
1447
|
};
|
|
1448
|
-
render(): string | number | boolean |
|
|
1448
|
+
render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
1451
|
declare function getPatchRoutesOnNavigationFunction(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, routeDiscovery: ServerBuild["routeDiscovery"], isSpaMode: boolean, basename: string | undefined): PatchRoutesOnNavigationFunction | undefined;
|