react-router 7.9.6-pre.0 → 7.9.6-pre.1
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 +6 -0
- package/dist/development/{chunk-TUTX3ERH.js → chunk-CYHICRRW.js} +25 -4
- package/dist/development/{chunk-7TW6LJC6.mjs → chunk-DKSAHU2I.mjs} +26 -5
- package/dist/{production/chunk-ZHTTD7UY.js → development/chunk-HSVNPM3C.js} +93 -93
- package/dist/{production/chunk-MKF3AQDO.js → development/chunk-OLIKX45O.js} +7 -7
- package/dist/{production/chunk-4MBU4DF6.mjs → development/chunk-RGKEVI2W.mjs} +2 -2
- package/dist/development/dom-export.js +26 -26
- package/dist/development/dom-export.mjs +3 -3
- 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.js +25 -4
- package/dist/development/index-react-server.mjs +25 -4
- package/dist/development/index.js +76 -76
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-RBZEEJIK.js → chunk-2DNJUQK6.js} +25 -4
- package/dist/{development/chunk-IR7LYQCC.js → production/chunk-EDK3MRM6.js} +93 -93
- package/dist/{development/chunk-DB25NZIA.js → production/chunk-JLDESRHY.js} +7 -7
- package/dist/{development/chunk-P6ZEAD4C.mjs → production/chunk-LC2OWLJG.mjs} +2 -2
- package/dist/production/{chunk-GG2LAVOQ.mjs → chunk-LESYMMDQ.mjs} +26 -5
- package/dist/production/dom-export.js +26 -26
- package/dist/production/dom-export.mjs +3 -3
- 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.js +25 -4
- package/dist/production/index-react-server.mjs +25 -4
- package/dist/production/index.js +76 -76
- package/dist/production/index.mjs +3 -3
- 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
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
|
2
|
-
* react-router v7.9.6-pre.
|
|
2
|
+
* react-router v7.9.6-pre.1
|
|
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 _chunk2DNJUQK6js = require('./chunk-2DNJUQK6.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 = _chunk2DNJUQK6js.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 (_chunk2DNJUQK6js.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 (_chunk2DNJUQK6js.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
|
+
_chunk2DNJUQK6js.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 = _chunk2DNJUQK6js.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.6-pre.
|
|
2
|
+
* react-router v7.9.6-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
withComponentProps,
|
|
50
50
|
withErrorBoundaryProps,
|
|
51
51
|
withHydrateFallbackProps
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-LESYMMDQ.mjs";
|
|
53
53
|
|
|
54
54
|
// lib/dom/ssr/server.tsx
|
|
55
55
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.6-pre.
|
|
2
|
+
* react-router v7.9.6-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -811,13 +811,36 @@ function prependBasename({
|
|
|
811
811
|
}) {
|
|
812
812
|
return pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
813
813
|
}
|
|
814
|
+
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
815
|
+
var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
|
|
814
816
|
function resolvePath(to, fromPathname = "/") {
|
|
815
817
|
let {
|
|
816
818
|
pathname: toPathname,
|
|
817
819
|
search = "",
|
|
818
820
|
hash = ""
|
|
819
821
|
} = typeof to === "string" ? parsePath(to) : to;
|
|
820
|
-
let pathname
|
|
822
|
+
let pathname;
|
|
823
|
+
if (toPathname) {
|
|
824
|
+
if (isAbsoluteUrl(toPathname)) {
|
|
825
|
+
pathname = toPathname;
|
|
826
|
+
} else {
|
|
827
|
+
if (toPathname.includes("//")) {
|
|
828
|
+
let oldPathname = toPathname;
|
|
829
|
+
toPathname = toPathname.replace(/\/\/+/g, "/");
|
|
830
|
+
warning(
|
|
831
|
+
false,
|
|
832
|
+
`Pathnames cannot have embedded double slashes - normalizing ${oldPathname} -> ${toPathname}`
|
|
833
|
+
);
|
|
834
|
+
}
|
|
835
|
+
if (toPathname.startsWith("/")) {
|
|
836
|
+
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
837
|
+
} else {
|
|
838
|
+
pathname = resolvePathname(toPathname, fromPathname);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
} else {
|
|
842
|
+
pathname = fromPathname;
|
|
843
|
+
}
|
|
821
844
|
return {
|
|
822
845
|
pathname,
|
|
823
846
|
search: normalizeSearch(search),
|
|
@@ -1265,8 +1288,6 @@ var IDLE_BLOCKER = {
|
|
|
1265
1288
|
reset: void 0,
|
|
1266
1289
|
location: void 0
|
|
1267
1290
|
};
|
|
1268
|
-
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
1269
|
-
var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
|
|
1270
1291
|
var defaultMapRouteProperties = (route) => ({
|
|
1271
1292
|
hasErrorBoundary: Boolean(route.hasErrorBoundary)
|
|
1272
1293
|
});
|
|
@@ -9517,7 +9538,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
|
|
|
9517
9538
|
try {
|
|
9518
9539
|
if (isBrowser) {
|
|
9519
9540
|
window.__reactRouterVersion = // @ts-expect-error
|
|
9520
|
-
"7.9.6-pre.
|
|
9541
|
+
"7.9.6-pre.1";
|
|
9521
9542
|
}
|
|
9522
9543
|
} catch (e) {
|
|
9523
9544
|
}
|
|
@@ -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.9.6-pre.
|
|
2
|
+
* react-router v7.9.6-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkJLDESRHYjs = require('./chunk-JLDESRHY.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ var _chunkMKF3AQDOjs = require('./chunk-MKF3AQDO.js');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunk2DNJUQK6js = require('./chunk-2DNJUQK6.js');
|
|
36
36
|
|
|
37
37
|
// lib/dom-export/dom-router-provider.tsx
|
|
38
38
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
@@ -204,7 +204,7 @@ function HydratedRouter(props) {
|
|
|
204
204
|
}, []);
|
|
205
205
|
React2.useEffect(() => {
|
|
206
206
|
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
|
|
207
|
-
document.querySelectorAll(`[${
|
|
207
|
+
document.querySelectorAll(`[${_chunk2DNJUQK6js.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
|
|
208
208
|
}
|
|
209
209
|
}, [criticalCss]);
|
|
210
210
|
let [location2, setLocation] = React2.useState(router.state.location);
|
|
@@ -373,10 +373,10 @@ function createRouterFromPayload({
|
|
|
373
373
|
};
|
|
374
374
|
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
375
375
|
globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
|
|
376
|
-
|
|
376
|
+
_chunkJLDESRHYjs.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
|
|
377
377
|
let patches = /* @__PURE__ */ new Map();
|
|
378
378
|
_optionalChain([payload, 'access', _22 => _22.patches, 'optionalAccess', _23 => _23.forEach, 'call', _24 => _24((patch) => {
|
|
379
|
-
|
|
379
|
+
_chunk2DNJUQK6js.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
380
380
|
if (!patches.has(patch.parentId)) {
|
|
381
381
|
patches.set(patch.parentId, []);
|
|
382
382
|
}
|
|
@@ -398,12 +398,12 @@ function createRouterFromPayload({
|
|
|
398
398
|
}
|
|
399
399
|
return [route];
|
|
400
400
|
}, []);
|
|
401
|
-
globalVar.__reactRouterDataRouter =
|
|
401
|
+
globalVar.__reactRouterDataRouter = _chunk2DNJUQK6js.createRouter.call(void 0, {
|
|
402
402
|
routes,
|
|
403
403
|
getContext,
|
|
404
404
|
basename: payload.basename,
|
|
405
|
-
history:
|
|
406
|
-
hydrationData:
|
|
405
|
+
history: _chunk2DNJUQK6js.createBrowserHistory.call(void 0, ),
|
|
406
|
+
hydrationData: _chunkJLDESRHYjs.getHydrationData.call(void 0, {
|
|
407
407
|
state: {
|
|
408
408
|
loaderData: payload.loaderData,
|
|
409
409
|
actionData: payload.actionData,
|
|
@@ -412,7 +412,7 @@ function createRouterFromPayload({
|
|
|
412
412
|
routes,
|
|
413
413
|
getRouteInfo: (routeId) => {
|
|
414
414
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
415
|
-
|
|
415
|
+
_chunk2DNJUQK6js.invariant.call(void 0, match, "Route not found in payload");
|
|
416
416
|
return {
|
|
417
417
|
clientLoader: match.clientLoader,
|
|
418
418
|
hasLoader: match.hasLoader,
|
|
@@ -510,9 +510,9 @@ function createRouterFromPayload({
|
|
|
510
510
|
routeModules: globalVar.__reactRouterRouteModules
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
|
-
var renderedRoutesContext =
|
|
513
|
+
var renderedRoutesContext = _chunk2DNJUQK6js.createContext.call(void 0, );
|
|
514
514
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
515
|
-
let dataStrategy =
|
|
515
|
+
let dataStrategy = _chunk2DNJUQK6js.getSingleFetchDataStrategyImpl.call(void 0,
|
|
516
516
|
getRouter,
|
|
517
517
|
(match) => {
|
|
518
518
|
let M = match;
|
|
@@ -566,20 +566,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
566
566
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
567
567
|
return async (args, basename, targetRoutes) => {
|
|
568
568
|
let { request, context } = args;
|
|
569
|
-
let url =
|
|
569
|
+
let url = _chunk2DNJUQK6js.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
570
570
|
if (request.method === "GET") {
|
|
571
|
-
url =
|
|
571
|
+
url = _chunk2DNJUQK6js.stripIndexParam.call(void 0, url);
|
|
572
572
|
if (targetRoutes) {
|
|
573
573
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
let res = await fetchImplementation(
|
|
577
|
-
new Request(url, await
|
|
577
|
+
new Request(url, await _chunk2DNJUQK6js.createRequestInit.call(void 0, request))
|
|
578
578
|
);
|
|
579
579
|
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
580
|
-
throw new (0,
|
|
580
|
+
throw new (0, _chunk2DNJUQK6js.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
581
581
|
}
|
|
582
|
-
|
|
582
|
+
_chunk2DNJUQK6js.invariant.call(void 0, res.body, "No response body to decode");
|
|
583
583
|
try {
|
|
584
584
|
const payload = await createFromReadableStream(res.body, {
|
|
585
585
|
temporaryReferences: void 0
|
|
@@ -603,7 +603,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
603
603
|
}
|
|
604
604
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
605
605
|
let results = { routes: {} };
|
|
606
|
-
const dataKey =
|
|
606
|
+
const dataKey = _chunk2DNJUQK6js.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
607
607
|
for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {
|
|
608
608
|
results.routes[routeId] = { data };
|
|
609
609
|
}
|
|
@@ -636,7 +636,7 @@ function RSCHydratedRouter({
|
|
|
636
636
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
637
637
|
);
|
|
638
638
|
React3.useEffect(() => {
|
|
639
|
-
|
|
639
|
+
_chunk2DNJUQK6js.setIsHydrated.call(void 0, );
|
|
640
640
|
}, []);
|
|
641
641
|
React3.useLayoutEffect(() => {
|
|
642
642
|
const globalVar = window;
|
|
@@ -723,7 +723,7 @@ function RSCHydratedRouter({
|
|
|
723
723
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
724
724
|
routeModules
|
|
725
725
|
};
|
|
726
|
-
return /* @__PURE__ */ React3.createElement(
|
|
726
|
+
return /* @__PURE__ */ React3.createElement(_chunk2DNJUQK6js.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkJLDESRHYjs.RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React3.createElement(_chunk2DNJUQK6js.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(_chunk2DNJUQK6js.UNSTABLE_TransitionEnabledRouterProvider, { router: router2, flushSync: ReactDOM2.flushSync }))));
|
|
727
727
|
}
|
|
728
728
|
function createRouteFromServerManifest(match, payload) {
|
|
729
729
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -734,8 +734,8 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
734
734
|
// the server loader flow regardless of whether the client loader calls
|
|
735
735
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
736
736
|
match.hasComponent && !match.element;
|
|
737
|
-
|
|
738
|
-
|
|
737
|
+
_chunk2DNJUQK6js.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
738
|
+
_chunkJLDESRHYjs.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
|
|
739
739
|
let dataRoute = {
|
|
740
740
|
id: match.id,
|
|
741
741
|
element: match.element,
|
|
@@ -785,7 +785,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
785
785
|
return await callSingleFetch(singleFetch);
|
|
786
786
|
}
|
|
787
787
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
788
|
-
throw
|
|
788
|
+
throw _chunk2DNJUQK6js.noActionDefinedError.call(void 0, "action", match.id);
|
|
789
789
|
},
|
|
790
790
|
path: match.path,
|
|
791
791
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -798,7 +798,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
798
798
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
799
799
|
};
|
|
800
800
|
if (typeof dataRoute.loader === "function") {
|
|
801
|
-
dataRoute.loader.hydrate =
|
|
801
|
+
dataRoute.loader.hydrate = _chunk2DNJUQK6js.shouldHydrateRouteLoader.call(void 0,
|
|
802
802
|
match.id,
|
|
803
803
|
match.clientLoader,
|
|
804
804
|
match.hasLoader,
|
|
@@ -808,7 +808,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
808
808
|
return dataRoute;
|
|
809
809
|
}
|
|
810
810
|
function callSingleFetch(singleFetch) {
|
|
811
|
-
|
|
811
|
+
_chunk2DNJUQK6js.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
812
812
|
return singleFetch();
|
|
813
813
|
}
|
|
814
814
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -816,7 +816,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
816
816
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
817
817
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
818
818
|
console.error(msg);
|
|
819
|
-
throw new (0,
|
|
819
|
+
throw new (0, _chunk2DNJUQK6js.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.6-pre.
|
|
2
|
+
* react-router v7.9.6-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
deserializeErrors,
|
|
15
15
|
getHydrationData,
|
|
16
16
|
populateRSCRouteModules
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LC2OWLJG.mjs";
|
|
18
18
|
import {
|
|
19
19
|
CRITICAL_CSS_DATA_ATTRIBUTE,
|
|
20
20
|
ErrorResponseImpl,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
singleFetchUrl,
|
|
44
44
|
stripIndexParam,
|
|
45
45
|
useFogOFWarDiscovery
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-LESYMMDQ.mjs";
|
|
47
47
|
|
|
48
48
|
// lib/dom-export/dom-router-provider.tsx
|
|
49
49
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.9.6-pre.
|
|
2
|
+
* react-router v7.9.6-pre.1
|
|
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 _chunkEDK3MRM6js = require('./chunk-EDK3MRM6.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -34,7 +34,7 @@ var _chunkZHTTD7UYjs = require('./chunk-ZHTTD7UY.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunk2DNJUQK6js = require('./chunk-2DNJUQK6.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkRBZEEJIKjs = require('./chunk-RBZEEJIK.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunkEDK3MRM6js.BrowserRouter; exports.Form = _chunkEDK3MRM6js.Form; exports.HashRouter = _chunkEDK3MRM6js.HashRouter; exports.Link = _chunkEDK3MRM6js.Link; exports.Links = _chunk2DNJUQK6js.Links; exports.MemoryRouter = _chunk2DNJUQK6js.MemoryRouter; exports.Meta = _chunk2DNJUQK6js.Meta; exports.NavLink = _chunkEDK3MRM6js.NavLink; exports.Navigate = _chunk2DNJUQK6js.Navigate; exports.Outlet = _chunk2DNJUQK6js.Outlet; exports.Route = _chunk2DNJUQK6js.Route; exports.Router = _chunk2DNJUQK6js.Router; exports.RouterProvider = _chunk2DNJUQK6js.RouterProvider; exports.Routes = _chunk2DNJUQK6js.Routes; exports.ScrollRestoration = _chunkEDK3MRM6js.ScrollRestoration; exports.StaticRouter = _chunkEDK3MRM6js.StaticRouter; exports.StaticRouterProvider = _chunkEDK3MRM6js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk2DNJUQK6js.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunk2DNJUQK6js.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk2DNJUQK6js.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk2DNJUQK6js.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkEDK3MRM6js.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.6-pre.
|
|
2
|
+
* react-router v7.9.6-pre.1
|
|
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-LESYMMDQ.mjs";
|
|
36
36
|
export {
|
|
37
37
|
BrowserRouter,
|
|
38
38
|
Form,
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v7.9.6-pre.
|
|
30
|
+
* react-router v7.9.6-pre.1
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -707,13 +707,36 @@ function prependBasename({
|
|
|
707
707
|
}) {
|
|
708
708
|
return pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
709
709
|
}
|
|
710
|
+
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
711
|
+
var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
|
|
710
712
|
function resolvePath(to, fromPathname = "/") {
|
|
711
713
|
let {
|
|
712
714
|
pathname: toPathname,
|
|
713
715
|
search = "",
|
|
714
716
|
hash = ""
|
|
715
717
|
} = typeof to === "string" ? parsePath(to) : to;
|
|
716
|
-
let pathname
|
|
718
|
+
let pathname;
|
|
719
|
+
if (toPathname) {
|
|
720
|
+
if (isAbsoluteUrl(toPathname)) {
|
|
721
|
+
pathname = toPathname;
|
|
722
|
+
} else {
|
|
723
|
+
if (toPathname.includes("//")) {
|
|
724
|
+
let oldPathname = toPathname;
|
|
725
|
+
toPathname = toPathname.replace(/\/\/+/g, "/");
|
|
726
|
+
warning(
|
|
727
|
+
false,
|
|
728
|
+
`Pathnames cannot have embedded double slashes - normalizing ${oldPathname} -> ${toPathname}`
|
|
729
|
+
);
|
|
730
|
+
}
|
|
731
|
+
if (toPathname.startsWith("/")) {
|
|
732
|
+
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
733
|
+
} else {
|
|
734
|
+
pathname = resolvePathname(toPathname, fromPathname);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
} else {
|
|
738
|
+
pathname = fromPathname;
|
|
739
|
+
}
|
|
717
740
|
return {
|
|
718
741
|
pathname,
|
|
719
742
|
search: normalizeSearch(search),
|
|
@@ -866,8 +889,6 @@ var validRequestMethodsArr = [
|
|
|
866
889
|
];
|
|
867
890
|
var validRequestMethods = new Set(validRequestMethodsArr);
|
|
868
891
|
var redirectStatusCodes = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
869
|
-
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
870
|
-
var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
|
|
871
892
|
var defaultMapRouteProperties = (route) => ({
|
|
872
893
|
hasErrorBoundary: Boolean(route.hasErrorBoundary)
|
|
873
894
|
});
|
|
@@ -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.9.6-pre.
|
|
9
|
+
* react-router v7.9.6-pre.1
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -686,13 +686,36 @@ function prependBasename({
|
|
|
686
686
|
}) {
|
|
687
687
|
return pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
688
688
|
}
|
|
689
|
+
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
690
|
+
var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
|
|
689
691
|
function resolvePath(to, fromPathname = "/") {
|
|
690
692
|
let {
|
|
691
693
|
pathname: toPathname,
|
|
692
694
|
search = "",
|
|
693
695
|
hash = ""
|
|
694
696
|
} = typeof to === "string" ? parsePath(to) : to;
|
|
695
|
-
let pathname
|
|
697
|
+
let pathname;
|
|
698
|
+
if (toPathname) {
|
|
699
|
+
if (isAbsoluteUrl(toPathname)) {
|
|
700
|
+
pathname = toPathname;
|
|
701
|
+
} else {
|
|
702
|
+
if (toPathname.includes("//")) {
|
|
703
|
+
let oldPathname = toPathname;
|
|
704
|
+
toPathname = toPathname.replace(/\/\/+/g, "/");
|
|
705
|
+
warning(
|
|
706
|
+
false,
|
|
707
|
+
`Pathnames cannot have embedded double slashes - normalizing ${oldPathname} -> ${toPathname}`
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
if (toPathname.startsWith("/")) {
|
|
711
|
+
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
712
|
+
} else {
|
|
713
|
+
pathname = resolvePathname(toPathname, fromPathname);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
} else {
|
|
717
|
+
pathname = fromPathname;
|
|
718
|
+
}
|
|
696
719
|
return {
|
|
697
720
|
pathname,
|
|
698
721
|
search: normalizeSearch(search),
|
|
@@ -845,8 +868,6 @@ var validRequestMethodsArr = [
|
|
|
845
868
|
];
|
|
846
869
|
var validRequestMethods = new Set(validRequestMethodsArr);
|
|
847
870
|
var redirectStatusCodes = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
848
|
-
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
849
|
-
var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
|
|
850
871
|
var defaultMapRouteProperties = (route) => ({
|
|
851
872
|
hasErrorBoundary: Boolean(route.hasErrorBoundary)
|
|
852
873
|
});
|