react-router 0.0.0-experimental-23decd7bc → 0.0.0-experimental-1d8f3ee
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/dist/development/{browser-CmIT056Z.d.mts → browser-Dy-ESm-r.d.mts} +1 -1
- package/dist/development/chunk-DUZSUZPY.js +42 -0
- package/dist/development/{chunk-GJVCYY62.mjs → chunk-LCKD6EHG.mjs} +29 -51
- package/dist/development/{chunk-H2M6MMUH.js → chunk-PACOJA5V.js} +34 -56
- package/dist/development/{chunk-3E3CD4NY.mjs → chunk-RCYOOFMP.mjs} +64 -10
- package/dist/development/{chunk-I3MHZ4NU.js → chunk-XDNTV7B4.js} +1 -1
- package/dist/development/{components-CwtESh53.d.mts → components-Yh5Jx3In.d.mts} +1 -1
- package/dist/development/dom-export.d.mts +8 -3
- package/dist/development/dom-export.d.ts +6 -0
- package/dist/development/dom-export.js +16 -6
- package/dist/development/dom-export.mjs +14 -6
- package/dist/{production/index-react-server-client-unV28389.d.ts → development/index-react-server-client-BM01za3r.d.ts} +3 -29
- package/dist/{production/index-react-server-client-CzKQ01cq.d.mts → development/index-react-server-client-CdDCHn2r.d.mts} +4 -30
- package/dist/development/index-react-server-client.d.mts +3 -3
- 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 +1 -1
- package/dist/development/index-react-server.d.ts +1 -1
- package/dist/development/index-react-server.js +2 -2
- package/dist/development/index-react-server.mjs +2 -2
- package/dist/development/index.d.mts +15 -11
- package/dist/development/index.d.ts +11 -7
- package/dist/development/index.js +129 -103
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +1 -1
- package/dist/development/lib/types/internal.d.ts +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/route-data-Csr8hE3v.d.mts → development/route-data-DJcKSHWq.d.mts} +30 -2
- package/dist/{production/route-data-x_b_BLCv.d.ts → development/routeModules-C82B1sOz.d.ts} +193 -165
- package/dist/production/{browser-CmIT056Z.d.mts → browser-Dy-ESm-r.d.mts} +1 -1
- package/dist/production/chunk-DUZSUZPY.js +42 -0
- package/dist/production/{chunk-7TUGB72O.js → chunk-F3UQRILU.js} +34 -56
- package/dist/production/{chunk-XNTCWHOK.mjs → chunk-FDXAKVCT.mjs} +64 -10
- package/dist/production/{chunk-YWCG2M57.mjs → chunk-VJ4SUXKA.mjs} +29 -51
- package/dist/production/{chunk-I3MHZ4NU.js → chunk-XDNTV7B4.js} +1 -1
- package/dist/production/{components-CwtESh53.d.mts → components-Yh5Jx3In.d.mts} +1 -1
- package/dist/production/dom-export.d.mts +8 -3
- package/dist/production/dom-export.d.ts +6 -0
- package/dist/production/dom-export.js +16 -6
- package/dist/production/dom-export.mjs +14 -6
- package/dist/{development/index-react-server-client-unV28389.d.ts → production/index-react-server-client-BM01za3r.d.ts} +3 -29
- package/dist/{development/index-react-server-client-CzKQ01cq.d.mts → production/index-react-server-client-CdDCHn2r.d.mts} +4 -30
- package/dist/production/index-react-server-client.d.mts +3 -3
- 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 +1 -1
- package/dist/production/index-react-server.d.ts +1 -1
- package/dist/production/index-react-server.js +2 -2
- package/dist/production/index-react-server.mjs +2 -2
- package/dist/production/index.d.mts +15 -11
- package/dist/production/index.d.ts +11 -7
- package/dist/production/index.js +129 -103
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +1 -1
- package/dist/production/lib/types/internal.d.ts +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/route-data-x_b_BLCv.d.ts → production/route-data-DJcKSHWq.d.mts} +40 -12
- package/dist/{development/route-data-Csr8hE3v.d.mts → production/routeModules-C82B1sOz.d.ts} +183 -155
- package/package.json +6 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1d8f3ee
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -57,10 +57,40 @@ import {
|
|
|
57
57
|
withComponentProps,
|
|
58
58
|
withErrorBoundaryProps,
|
|
59
59
|
withHydrateFallbackProps
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LCKD6EHG.mjs";
|
|
61
61
|
|
|
62
62
|
// lib/dom/ssr/server.tsx
|
|
63
63
|
import * as React from "react";
|
|
64
|
+
|
|
65
|
+
// lib/dom/ssr/routeModules.ts
|
|
66
|
+
var defaultLoadRouteModule = async (route, routeModulesCache) => {
|
|
67
|
+
if (route.id in routeModulesCache) {
|
|
68
|
+
return routeModulesCache[route.id];
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
let routeModule = await import(
|
|
72
|
+
/* @vite-ignore */
|
|
73
|
+
/* webpackIgnore: true */
|
|
74
|
+
route.module
|
|
75
|
+
);
|
|
76
|
+
routeModulesCache[route.id] = routeModule;
|
|
77
|
+
return routeModule;
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.error(
|
|
80
|
+
`Error loading route module \`${route.module}\`, reloading page...`
|
|
81
|
+
);
|
|
82
|
+
console.error(error);
|
|
83
|
+
if (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && // @ts-expect-error
|
|
84
|
+
import.meta.hot) {
|
|
85
|
+
throw error;
|
|
86
|
+
}
|
|
87
|
+
window.location.reload();
|
|
88
|
+
return new Promise(() => {
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// lib/dom/ssr/server.tsx
|
|
64
94
|
function ServerRouter({
|
|
65
95
|
context,
|
|
66
96
|
url,
|
|
@@ -106,7 +136,8 @@ function ServerRouter({
|
|
|
106
136
|
isSpaMode: context.isSpaMode,
|
|
107
137
|
routeDiscovery: context.routeDiscovery,
|
|
108
138
|
serializeError: context.serializeError,
|
|
109
|
-
renderMeta: context.renderMeta
|
|
139
|
+
renderMeta: context.renderMeta,
|
|
140
|
+
loadRouteModule: defaultLoadRouteModule
|
|
110
141
|
}
|
|
111
142
|
},
|
|
112
143
|
/* @__PURE__ */ React.createElement(RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
@@ -136,7 +167,8 @@ function createRoutesStub(routes, unstable_getContext) {
|
|
|
136
167
|
initialEntries,
|
|
137
168
|
initialIndex,
|
|
138
169
|
hydrationData,
|
|
139
|
-
future
|
|
170
|
+
future,
|
|
171
|
+
loadRouteModule = defaultLoadRouteModule
|
|
140
172
|
}) {
|
|
141
173
|
let routerRef = React2.useRef();
|
|
142
174
|
let remixContextRef = React2.useRef();
|
|
@@ -155,6 +187,7 @@ function createRoutesStub(routes, unstable_getContext) {
|
|
|
155
187
|
routeModules: {},
|
|
156
188
|
ssr: false,
|
|
157
189
|
isSpaMode: false,
|
|
190
|
+
loadRouteModule,
|
|
158
191
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }
|
|
159
192
|
};
|
|
160
193
|
let patched = processRoutes(
|
|
@@ -941,6 +974,7 @@ function generateSingleFetchResponse(request, build, serverMode, {
|
|
|
941
974
|
return new Response(null, { status, headers: resultHeaders });
|
|
942
975
|
}
|
|
943
976
|
resultHeaders.set("Content-Type", "text/x-script");
|
|
977
|
+
resultHeaders.delete("Content-Length");
|
|
944
978
|
return new Response(
|
|
945
979
|
encodeViaTurboStream(
|
|
946
980
|
result,
|
|
@@ -1105,15 +1139,16 @@ Error: ${e instanceof Error ? e.toString() : e}`
|
|
|
1105
1139
|
}
|
|
1106
1140
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1107
1141
|
if (!_build.ssr) {
|
|
1142
|
+
let decodedPath = decodeURI(normalizedPath);
|
|
1108
1143
|
if (_build.prerender.length === 0) {
|
|
1109
1144
|
isSpaMode = true;
|
|
1110
|
-
} else if (!_build.prerender.includes(
|
|
1145
|
+
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1111
1146
|
if (url.pathname.endsWith(".data")) {
|
|
1112
1147
|
errorHandler(
|
|
1113
1148
|
new ErrorResponseImpl(
|
|
1114
1149
|
404,
|
|
1115
1150
|
"Not Found",
|
|
1116
|
-
`Refusing to SSR the path \`${
|
|
1151
|
+
`Refusing to SSR the path \`${decodedPath}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
|
|
1117
1152
|
),
|
|
1118
1153
|
{
|
|
1119
1154
|
context: loadContext,
|
|
@@ -1358,7 +1393,8 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1358
1393
|
ssr: build.ssr,
|
|
1359
1394
|
routeDiscovery: build.routeDiscovery,
|
|
1360
1395
|
isSpaMode: isSpaMode2,
|
|
1361
|
-
serializeError: (err) => serializeError(err, serverMode)
|
|
1396
|
+
serializeError: (err) => serializeError(err, serverMode),
|
|
1397
|
+
loadRouteModule: defaultLoadRouteModule
|
|
1362
1398
|
};
|
|
1363
1399
|
let handleDocumentRequestFunction = build.entry.module.default;
|
|
1364
1400
|
try {
|
|
@@ -2175,7 +2211,10 @@ function RSCHydratedRouter({
|
|
|
2175
2211
|
}
|
|
2176
2212
|
},
|
|
2177
2213
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2178
|
-
routeModules: {}
|
|
2214
|
+
routeModules: {},
|
|
2215
|
+
loadRouteModule: () => {
|
|
2216
|
+
throw new Error("Not required in RSC Mode");
|
|
2217
|
+
}
|
|
2179
2218
|
};
|
|
2180
2219
|
return /* @__PURE__ */ React4.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(RouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2181
2220
|
}
|
|
@@ -2486,12 +2525,23 @@ function RSCStaticRouter({
|
|
|
2486
2525
|
});
|
|
2487
2526
|
}
|
|
2488
2527
|
if (payload.type !== "render") return null;
|
|
2528
|
+
let patchedLoaderData = { ...payload.loaderData };
|
|
2529
|
+
for (const match of payload.matches) {
|
|
2530
|
+
if (shouldHydrateRouteLoader(
|
|
2531
|
+
match.id,
|
|
2532
|
+
match.clientLoader,
|
|
2533
|
+
match.hasLoader,
|
|
2534
|
+
false
|
|
2535
|
+
) && (match.hydrateFallbackElement || !match.hasLoader)) {
|
|
2536
|
+
delete patchedLoaderData[match.id];
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2489
2539
|
const context = {
|
|
2490
2540
|
actionData: payload.actionData,
|
|
2491
2541
|
actionHeaders: {},
|
|
2492
2542
|
basename: payload.basename,
|
|
2493
2543
|
errors: payload.errors,
|
|
2494
|
-
loaderData:
|
|
2544
|
+
loaderData: patchedLoaderData,
|
|
2495
2545
|
loaderHeaders: {},
|
|
2496
2546
|
location: payload.location,
|
|
2497
2547
|
statusCode: 200,
|
|
@@ -2553,7 +2603,10 @@ function RSCStaticRouter({
|
|
|
2553
2603
|
}
|
|
2554
2604
|
},
|
|
2555
2605
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2556
|
-
routeModules: {}
|
|
2606
|
+
routeModules: {},
|
|
2607
|
+
loadRouteModule: () => {
|
|
2608
|
+
throw new Error("Not required in RSC Mode");
|
|
2609
|
+
}
|
|
2557
2610
|
};
|
|
2558
2611
|
return /* @__PURE__ */ React5.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2559
2612
|
StaticRouterProvider,
|
|
@@ -2645,6 +2698,7 @@ function deserializeErrors(errors) {
|
|
|
2645
2698
|
}
|
|
2646
2699
|
|
|
2647
2700
|
export {
|
|
2701
|
+
defaultLoadRouteModule,
|
|
2648
2702
|
ServerRouter,
|
|
2649
2703
|
createRoutesStub,
|
|
2650
2704
|
createCookie,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as To, N as NavigateOptions, B as BlockerFunction, a as Blocker, S as SerializeFrom, b as RelativeRoutingType,
|
|
1
|
+
import { T as To, N as NavigateOptions, B as BlockerFunction, a as Blocker, S as SerializeFrom, b as RelativeRoutingType, c as Location, P as ParamParseKey, d as Path, e as PathPattern, f as PathMatch, U as UIMatch, g as Navigation, A as Action, h as Params, i as Router$1, j as RouteObject, I as InitialEntry, k as NonIndexRouteObject, l as LazyRouteFunction, m as IndexRouteObject, n as Navigator, R as RouterInit, F as FutureConfig, H as HydrationState, D as DataStrategyFunction, o as PatchRoutesOnNavigationFunction, p as RouteMatch } from './route-data-DJcKSHWq.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './components-
|
|
3
|
-
import './browser-
|
|
4
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './components-Yh5Jx3In.mjs';
|
|
3
|
+
import './browser-Dy-ESm-r.mjs';
|
|
4
|
+
import { R as RouterInit, L as LoadRouteModuleFunction } from './route-data-DJcKSHWq.mjs';
|
|
5
5
|
import 'node:async_hooks';
|
|
6
6
|
|
|
7
7
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
@@ -13,6 +13,11 @@ interface HydratedRouterProps {
|
|
|
13
13
|
* to `clientLoader`/`clientActon` functions
|
|
14
14
|
*/
|
|
15
15
|
unstable_getContext?: RouterInit["unstable_getContext"];
|
|
16
|
+
/**
|
|
17
|
+
* Optional function to take control over how route modules are loaded into
|
|
18
|
+
* the browser. Primarily for use by bundler plugins.
|
|
19
|
+
*/
|
|
20
|
+
loadRouteModule?: LoadRouteModuleFunction;
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
18
23
|
* Framework-mode router component to be used in `entry.client.tsx` to hydrate a
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RouterProviderProps as RouterProviderProps$1, RouterInit } from 'react-router';
|
|
3
|
+
import { L as LoadRouteModuleFunction } from './routeModules-C82B1sOz.js';
|
|
3
4
|
|
|
4
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
5
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -10,6 +11,11 @@ interface HydratedRouterProps {
|
|
|
10
11
|
* to `clientLoader`/`clientActon` functions
|
|
11
12
|
*/
|
|
12
13
|
unstable_getContext?: RouterInit["unstable_getContext"];
|
|
14
|
+
/**
|
|
15
|
+
* Optional function to take control over how route modules are loaded into
|
|
16
|
+
* the browser. Primarily for use by bundler plugins.
|
|
17
|
+
*/
|
|
18
|
+
loadRouteModule?: LoadRouteModuleFunction;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* Framework-mode router component to be used in `entry.client.tsx` to hydrate a
|
|
@@ -1,5 +1,5 @@
|
|
|
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 _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 v0.0.0-experimental-
|
|
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 v0.0.0-experimental-1d8f3ee
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
"use client";
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunkDUZSUZPYjs = require('./chunk-DUZSUZPY.js');
|
|
15
|
+
require('./chunk-XDNTV7B4.js');
|
|
13
16
|
|
|
14
17
|
// lib/dom-export/dom-router-provider.tsx
|
|
15
18
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react);
|
|
@@ -65,6 +68,7 @@ function initSsrInfo() {
|
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
function createHydratedRouter({
|
|
71
|
+
loadRouteModule = _chunkDUZSUZPYjs.defaultLoadRouteModule,
|
|
68
72
|
unstable_getContext
|
|
69
73
|
}) {
|
|
70
74
|
initSsrInfo();
|
|
@@ -96,7 +100,8 @@ function createHydratedRouter({
|
|
|
96
100
|
ssrInfo.routeModules,
|
|
97
101
|
ssrInfo.context.state,
|
|
98
102
|
ssrInfo.context.ssr,
|
|
99
|
-
ssrInfo.context.isSpaMode
|
|
103
|
+
ssrInfo.context.isSpaMode,
|
|
104
|
+
loadRouteModule
|
|
100
105
|
);
|
|
101
106
|
let hydrationData = void 0;
|
|
102
107
|
if (ssrInfo.context.isSpaMode) {
|
|
@@ -149,7 +154,8 @@ function createHydratedRouter({
|
|
|
149
154
|
ssrInfo.context.ssr,
|
|
150
155
|
ssrInfo.context.routeDiscovery,
|
|
151
156
|
ssrInfo.context.isSpaMode,
|
|
152
|
-
ssrInfo.context.basename
|
|
157
|
+
ssrInfo.context.basename,
|
|
158
|
+
loadRouteModule
|
|
153
159
|
)
|
|
154
160
|
});
|
|
155
161
|
ssrInfo.router = router2;
|
|
@@ -163,8 +169,10 @@ function createHydratedRouter({
|
|
|
163
169
|
return router2;
|
|
164
170
|
}
|
|
165
171
|
function HydratedRouter(props) {
|
|
172
|
+
let loadRouteModule = _nullishCoalesce(props.loadRouteModule, () => ( _chunkDUZSUZPYjs.defaultLoadRouteModule));
|
|
166
173
|
if (!router) {
|
|
167
174
|
router = createHydratedRouter({
|
|
175
|
+
loadRouteModule,
|
|
168
176
|
unstable_getContext: props.unstable_getContext
|
|
169
177
|
});
|
|
170
178
|
}
|
|
@@ -199,7 +207,8 @@ function HydratedRouter(props) {
|
|
|
199
207
|
ssrInfo.routeModules,
|
|
200
208
|
ssrInfo.context.ssr,
|
|
201
209
|
ssrInfo.context.routeDiscovery,
|
|
202
|
-
ssrInfo.context.isSpaMode
|
|
210
|
+
ssrInfo.context.isSpaMode,
|
|
211
|
+
loadRouteModule
|
|
203
212
|
);
|
|
204
213
|
return (
|
|
205
214
|
// This fragment is important to ensure we match the <ServerRouter> JSX
|
|
@@ -214,6 +223,7 @@ function HydratedRouter(props) {
|
|
|
214
223
|
criticalCss,
|
|
215
224
|
ssr: ssrInfo.context.ssr,
|
|
216
225
|
isSpaMode: ssrInfo.context.isSpaMode,
|
|
226
|
+
loadRouteModule,
|
|
217
227
|
routeDiscovery: ssrInfo.context.routeDiscovery
|
|
218
228
|
}
|
|
219
229
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1d8f3ee
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
*/
|
|
11
11
|
"use client";
|
|
12
12
|
import {
|
|
13
|
+
defaultLoadRouteModule,
|
|
13
14
|
deserializeErrors,
|
|
14
15
|
getHydrationData
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RCYOOFMP.mjs";
|
|
16
17
|
import {
|
|
17
18
|
FrameworkContext,
|
|
18
19
|
RemixErrorBoundary,
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
invariant,
|
|
29
30
|
mapRouteProperties,
|
|
30
31
|
useFogOFWarDiscovery
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-LCKD6EHG.mjs";
|
|
32
33
|
|
|
33
34
|
// lib/dom-export/dom-router-provider.tsx
|
|
34
35
|
import * as React from "react";
|
|
@@ -66,6 +67,7 @@ function initSsrInfo() {
|
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
function createHydratedRouter({
|
|
70
|
+
loadRouteModule = defaultLoadRouteModule,
|
|
69
71
|
unstable_getContext
|
|
70
72
|
}) {
|
|
71
73
|
initSsrInfo();
|
|
@@ -97,7 +99,8 @@ function createHydratedRouter({
|
|
|
97
99
|
ssrInfo.routeModules,
|
|
98
100
|
ssrInfo.context.state,
|
|
99
101
|
ssrInfo.context.ssr,
|
|
100
|
-
ssrInfo.context.isSpaMode
|
|
102
|
+
ssrInfo.context.isSpaMode,
|
|
103
|
+
loadRouteModule
|
|
101
104
|
);
|
|
102
105
|
let hydrationData = void 0;
|
|
103
106
|
if (ssrInfo.context.isSpaMode) {
|
|
@@ -150,7 +153,8 @@ function createHydratedRouter({
|
|
|
150
153
|
ssrInfo.context.ssr,
|
|
151
154
|
ssrInfo.context.routeDiscovery,
|
|
152
155
|
ssrInfo.context.isSpaMode,
|
|
153
|
-
ssrInfo.context.basename
|
|
156
|
+
ssrInfo.context.basename,
|
|
157
|
+
loadRouteModule
|
|
154
158
|
)
|
|
155
159
|
});
|
|
156
160
|
ssrInfo.router = router2;
|
|
@@ -164,8 +168,10 @@ function createHydratedRouter({
|
|
|
164
168
|
return router2;
|
|
165
169
|
}
|
|
166
170
|
function HydratedRouter(props) {
|
|
171
|
+
let loadRouteModule = props.loadRouteModule ?? defaultLoadRouteModule;
|
|
167
172
|
if (!router) {
|
|
168
173
|
router = createHydratedRouter({
|
|
174
|
+
loadRouteModule,
|
|
169
175
|
unstable_getContext: props.unstable_getContext
|
|
170
176
|
});
|
|
171
177
|
}
|
|
@@ -200,7 +206,8 @@ function HydratedRouter(props) {
|
|
|
200
206
|
ssrInfo.routeModules,
|
|
201
207
|
ssrInfo.context.ssr,
|
|
202
208
|
ssrInfo.context.routeDiscovery,
|
|
203
|
-
ssrInfo.context.isSpaMode
|
|
209
|
+
ssrInfo.context.isSpaMode,
|
|
210
|
+
loadRouteModule
|
|
204
211
|
);
|
|
205
212
|
return (
|
|
206
213
|
// This fragment is important to ensure we match the <ServerRouter> JSX
|
|
@@ -215,6 +222,7 @@ function HydratedRouter(props) {
|
|
|
215
222
|
criticalCss,
|
|
216
223
|
ssr: ssrInfo.context.ssr,
|
|
217
224
|
isSpaMode: ssrInfo.context.isSpaMode,
|
|
225
|
+
loadRouteModule,
|
|
218
226
|
routeDiscovery: ssrInfo.context.routeDiscovery
|
|
219
227
|
}
|
|
220
228
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b0 as RouteManifest, b1 as Route$1, b2 as ServerRouteModule, m as MiddlewareEnabled, ak as unstable_RouterContextProvider, n as AppLoadContext, a9 as LoaderFunctionArgs, $ as ActionFunctionArgs, b3 as EntryRoute, f as RouteModules, L as LoadRouteModuleFunction, F as StaticHandlerContext, T as To, aB as NavigateOptions, V as BlockerFunction, U as Blocker, b4 as SerializeFrom, Q as RelativeRoutingType, b as Location, ab as ParamParseKey, x as Path, ae as PathPattern, ac as PathMatch, ai as UIMatch, K as Navigation, al as Action, s as Params, e as Router$1, aF as RouteObject, I as InitialEntry, k as NonIndexRouteObject, a8 as LazyRouteFunction, g as IndexRouteObject, aC as Navigator, W as RouterInit, b5 as FutureConfig$1, H as HydrationState, D as DataStrategyFunction, v as PatchRoutesOnNavigationFunction, aE as RouteMatch, a7 as HTMLFormMethod, a5 as FormEncType, aK as PageLinkDescriptor, b6 as History, B as GetScrollRestorationKeyFunction, J as Fetcher, b7 as CreateStaticHandlerOptions$1, y as StaticHandler } from './routeModules-C82B1sOz.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
@@ -67,6 +67,7 @@ interface FrameworkContextObject {
|
|
|
67
67
|
future: FutureConfig;
|
|
68
68
|
ssr: boolean;
|
|
69
69
|
isSpaMode: boolean;
|
|
70
|
+
loadRouteModule: LoadRouteModuleFunction;
|
|
70
71
|
routeDiscovery: ServerBuild["routeDiscovery"];
|
|
71
72
|
serializeError?(error: Error): SerializedError;
|
|
72
73
|
renderMeta?: {
|
|
@@ -107,33 +108,6 @@ interface AssetsManifest {
|
|
|
107
108
|
sri?: Record<string, string> | true;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
interface Route$1 {
|
|
111
|
-
index?: boolean;
|
|
112
|
-
caseSensitive?: boolean;
|
|
113
|
-
id: string;
|
|
114
|
-
parentId?: string;
|
|
115
|
-
path?: string;
|
|
116
|
-
}
|
|
117
|
-
interface EntryRoute extends Route$1 {
|
|
118
|
-
hasAction: boolean;
|
|
119
|
-
hasLoader: boolean;
|
|
120
|
-
hasClientAction: boolean;
|
|
121
|
-
hasClientLoader: boolean;
|
|
122
|
-
hasClientMiddleware: boolean;
|
|
123
|
-
hasErrorBoundary: boolean;
|
|
124
|
-
imports?: string[];
|
|
125
|
-
css?: string[];
|
|
126
|
-
module: string;
|
|
127
|
-
clientActionModule: string | undefined;
|
|
128
|
-
clientLoaderModule: string | undefined;
|
|
129
|
-
clientMiddlewareModule: string | undefined;
|
|
130
|
-
hydrateFallbackModule: string | undefined;
|
|
131
|
-
parentId?: string;
|
|
132
|
-
}
|
|
133
|
-
declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
|
|
134
|
-
declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
|
|
135
|
-
declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
|
|
136
|
-
|
|
137
111
|
/**
|
|
138
112
|
Resolves a URL against the current location.
|
|
139
113
|
|
|
@@ -2168,4 +2142,4 @@ declare function createStaticRouter(routes: RouteObject[], context: StaticHandle
|
|
|
2168
2142
|
future?: Partial<FutureConfig$1>;
|
|
2169
2143
|
}): Router$1;
|
|
2170
2144
|
|
|
2171
|
-
export { type BrowserRouterProps as $, type AssetsManifest as A, useLoaderData as B, useLocation as C, useMatch as D, type EntryContext as E, type FutureConfig as F, useMatches as G, type HydrateFallbackType as H, type IndexRouteProps as I, useNavigate as J, useNavigation as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateProps as N, type OutletProps as O, type PathRouteProps as P, useNavigationType as Q, type RouteComponentType as R, type ServerBuild as S, useOutlet as T, useOutletContext as U, useParams as V, useResolvedPath as W, useRevalidator as X, useRouteError as Y, useRouteLoaderData as Z, useRoutes as _, type ErrorBoundaryType as a, type DOMRouterOpts as a0, type HashRouterProps as a1, type HistoryRouterProps as a2, type LinkProps as a3, type NavLinkProps as a4, type NavLinkRenderProps as a5, type FetcherFormProps as a6, type FormProps as a7, type ScrollRestorationProps as a8, type SetURLSearchParams as a9, createSearchParams as aA, type StaticRouterProps as aB, type StaticRouterProviderProps as aC, createStaticHandler as aD, createStaticRouter as aE, StaticRouter as aF, StaticRouterProvider as aG, Meta as aH, Links as aI, Scripts as aJ, PrefetchPageLinks as aK, type ScriptsProps as aL, type HandleDataRequestFunction as aM, type HandleDocumentRequestFunction as aN, type HandleErrorFunction as aO, type ServerEntryModule as aP, hydrationRouteProperties as aQ, mapRouteProperties as aR, withComponentProps as aS, withHydrateFallbackProps as aT, withErrorBoundaryProps as aU, FrameworkContext as aV,
|
|
2145
|
+
export { type BrowserRouterProps as $, type AssetsManifest as A, useLoaderData as B, useLocation as C, useMatch as D, type EntryContext as E, type FutureConfig as F, useMatches as G, type HydrateFallbackType as H, type IndexRouteProps as I, useNavigate as J, useNavigation as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateProps as N, type OutletProps as O, type PathRouteProps as P, useNavigationType as Q, type RouteComponentType as R, type ServerBuild as S, useOutlet as T, useOutletContext as U, useParams as V, useResolvedPath as W, useRevalidator as X, useRouteError as Y, useRouteLoaderData as Z, useRoutes as _, type ErrorBoundaryType as a, type DOMRouterOpts as a0, type HashRouterProps as a1, type HistoryRouterProps as a2, type LinkProps as a3, type NavLinkProps as a4, type NavLinkRenderProps as a5, type FetcherFormProps as a6, type FormProps as a7, type ScrollRestorationProps as a8, type SetURLSearchParams as a9, createSearchParams as aA, type StaticRouterProps as aB, type StaticRouterProviderProps as aC, createStaticHandler as aD, createStaticRouter as aE, StaticRouter as aF, StaticRouterProvider as aG, Meta as aH, Links as aI, Scripts as aJ, PrefetchPageLinks as aK, type ScriptsProps as aL, type HandleDataRequestFunction as aM, type HandleDocumentRequestFunction as aN, type HandleErrorFunction as aO, type ServerEntryModule as aP, hydrationRouteProperties as aQ, mapRouteProperties as aR, withComponentProps as aS, withHydrateFallbackProps as aT, withErrorBoundaryProps as aU, FrameworkContext as aV, useScrollRestoration as aW, type SubmitFunction as aa, type FetcherSubmitFunction as ab, type FetcherWithComponents as ac, createBrowserRouter as ad, createHashRouter as ae, BrowserRouter as af, HashRouter as ag, Link as ah, HistoryRouter as ai, NavLink as aj, Form as ak, ScrollRestoration as al, useLinkClickHandler as am, useSearchParams as an, useSubmit as ao, useFormAction as ap, useFetcher as aq, useFetchers as ar, useBeforeUnload as as, usePrompt as at, useViewTransitionState as au, type FetcherSubmitOptions as av, type ParamKeyValuePair as aw, type SubmitOptions as ax, type URLSearchParamsInit as ay, type SubmitTarget as az, type AwaitProps as b, type MemoryRouterProps as c, type RouteProps as d, type RouterProps as e, type RouterProviderProps as f, type RoutesProps as g, Await as h, MemoryRouter as i, Navigate as j, Outlet as k, Route as l, Router as m, RouterProvider as n, Routes as o, createMemoryRouter as p, createRoutesFromChildren as q, createRoutesFromElements as r, renderMatches as s, type NavigateFunction as t, useBlocker as u, useActionData as v, useAsyncError as w, useAsyncValue as x, useHref as y, useInRouterContext as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './components-
|
|
1
|
+
import './components-Yh5Jx3In.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { b2 as RouteManifest, b3 as Route, b4 as ServerRouteModule, Y as MiddlewareEnabled, ar as unstable_RouterContextProvider, Z as AppLoadContext, ak as LoaderFunctionArgs, ab as ActionFunctionArgs, b5 as EntryRoute, W as RouteModules, L as LoadRouteModuleFunction, a4 as StaticHandlerContext, aj as HTMLFormMethod, ah as FormEncType, b as RelativeRoutingType, aM as PageLinkDescriptor, T as To, b6 as History, a3 as GetScrollRestorationKeyFunction, R as RouterInit, F as FutureConfig$1, H as HydrationState, D as DataStrategyFunction, o as PatchRoutesOnNavigationFunction, N as NavigateOptions, a5 as Fetcher, j as RouteObject, i as Router, S as SerializeFrom, B as BlockerFunction, c as Location, b7 as CreateStaticHandlerOptions$1, a1 as StaticHandler } from './route-data-DJcKSHWq.mjs';
|
|
4
4
|
|
|
5
5
|
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
6
6
|
interface ServerRoute extends Route {
|
|
@@ -68,6 +68,7 @@ interface FrameworkContextObject {
|
|
|
68
68
|
future: FutureConfig;
|
|
69
69
|
ssr: boolean;
|
|
70
70
|
isSpaMode: boolean;
|
|
71
|
+
loadRouteModule: LoadRouteModuleFunction;
|
|
71
72
|
routeDiscovery: ServerBuild["routeDiscovery"];
|
|
72
73
|
serializeError?(error: Error): SerializedError;
|
|
73
74
|
renderMeta?: {
|
|
@@ -108,33 +109,6 @@ interface AssetsManifest {
|
|
|
108
109
|
sri?: Record<string, string> | true;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
interface Route {
|
|
112
|
-
index?: boolean;
|
|
113
|
-
caseSensitive?: boolean;
|
|
114
|
-
id: string;
|
|
115
|
-
parentId?: string;
|
|
116
|
-
path?: string;
|
|
117
|
-
}
|
|
118
|
-
interface EntryRoute extends Route {
|
|
119
|
-
hasAction: boolean;
|
|
120
|
-
hasLoader: boolean;
|
|
121
|
-
hasClientAction: boolean;
|
|
122
|
-
hasClientLoader: boolean;
|
|
123
|
-
hasClientMiddleware: boolean;
|
|
124
|
-
hasErrorBoundary: boolean;
|
|
125
|
-
imports?: string[];
|
|
126
|
-
css?: string[];
|
|
127
|
-
module: string;
|
|
128
|
-
clientActionModule: string | undefined;
|
|
129
|
-
clientLoaderModule: string | undefined;
|
|
130
|
-
clientMiddlewareModule: string | undefined;
|
|
131
|
-
hydrateFallbackModule: string | undefined;
|
|
132
|
-
parentId?: string;
|
|
133
|
-
}
|
|
134
|
-
declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
|
|
135
|
-
declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
|
|
136
|
-
declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
|
|
137
|
-
|
|
138
112
|
type ParamKeyValuePair = [string, string];
|
|
139
113
|
type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
|
|
140
114
|
/**
|
|
@@ -1357,4 +1331,4 @@ declare function createStaticRouter(routes: RouteObject[], context: StaticHandle
|
|
|
1357
1331
|
future?: Partial<FutureConfig$1>;
|
|
1358
1332
|
}): Router;
|
|
1359
1333
|
|
|
1360
|
-
export { type HandleDataRequestFunction as $, type AssetsManifest as A, type BrowserRouterProps as B, useViewTransitionState as C, type DOMRouterOpts as D, type EntryContext as E, type FutureConfig as F, type FetcherSubmitOptions as G, type HashRouterProps as H, type SubmitOptions as I, type SubmitTarget as J, createSearchParams as K, type LinkProps as L, type StaticRouterProps as M, type NavLinkProps as N, type StaticRouterProviderProps as O, type ParamKeyValuePair as P, createStaticHandler as Q, createStaticRouter as R, type ServerBuild as S, StaticRouter as T, type URLSearchParamsInit as U, StaticRouterProvider as V, Meta as W, Links as X, Scripts as Y, PrefetchPageLinks as Z, type ScriptsProps as _, type HistoryRouterProps as a, type HandleDocumentRequestFunction as a0, type HandleErrorFunction as a1, type ServerEntryModule as a2, FrameworkContext as a3,
|
|
1334
|
+
export { type HandleDataRequestFunction as $, type AssetsManifest as A, type BrowserRouterProps as B, useViewTransitionState as C, type DOMRouterOpts as D, type EntryContext as E, type FutureConfig as F, type FetcherSubmitOptions as G, type HashRouterProps as H, type SubmitOptions as I, type SubmitTarget as J, createSearchParams as K, type LinkProps as L, type StaticRouterProps as M, type NavLinkProps as N, type StaticRouterProviderProps as O, type ParamKeyValuePair as P, createStaticHandler as Q, createStaticRouter as R, type ServerBuild as S, StaticRouter as T, type URLSearchParamsInit as U, StaticRouterProvider as V, Meta as W, Links as X, Scripts as Y, PrefetchPageLinks as Z, type ScriptsProps as _, type HistoryRouterProps as a, type HandleDocumentRequestFunction as a0, type HandleErrorFunction as a1, type ServerEntryModule as a2, FrameworkContext as a3, useScrollRestoration as a4, type NavLinkRenderProps as b, type FetcherFormProps as c, type FormProps as d, type ScrollRestorationProps as e, type SetURLSearchParams as f, type SubmitFunction as g, type FetcherSubmitFunction as h, type FetcherWithComponents as i, createBrowserRouter as j, createHashRouter as k, BrowserRouter as l, HashRouter as m, Link as n, HistoryRouter as o, NavLink as p, Form as q, ScrollRestoration as r, useSearchParams as s, useSubmit as t, useLinkClickHandler as u, useFormAction as v, useFetcher as w, useFetchers as x, useBeforeUnload as y, usePrompt as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { f as Await, g as MemoryRouter, h as Navigate, i as Outlet, j as Route, k as Router, l as RouterProvider, m as Routes } from './components-
|
|
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-
|
|
3
|
-
import './route-data-
|
|
1
|
+
export { f as Await, g as MemoryRouter, h as Navigate, i as Outlet, j as Route, k as Router, l as RouterProvider, m as Routes } from './components-Yh5Jx3In.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-CdDCHn2r.mjs';
|
|
3
|
+
import './route-data-DJcKSHWq.mjs';
|
|
4
4
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { h as Await, af as BrowserRouter, ak as Form, ag as HashRouter, ah as Link, aI as Links, i as MemoryRouter, aH as Meta, aj as NavLink, j as Navigate, k as Outlet, l as Route, m as Router, n as RouterProvider, o as Routes, al as ScrollRestoration, aF as StaticRouter, aG as StaticRouterProvider, ai as unstable_HistoryRouter } from './index-react-server-client-
|
|
2
|
-
import './
|
|
1
|
+
export { h as Await, af as BrowserRouter, ak as Form, ag as HashRouter, ah as Link, aI as Links, i as MemoryRouter, aH as Meta, aj as NavLink, j as Navigate, k as Outlet, l as Route, m as Router, n as RouterProvider, o as Routes, al as ScrollRestoration, aF as StaticRouter, aG as StaticRouterProvider, ai as unstable_HistoryRouter } from './index-react-server-client-BM01za3r.js';
|
|
2
|
+
import './routeModules-C82B1sOz.js';
|
|
3
3
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1d8f3ee
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
33
|
-
require('./chunk-
|
|
32
|
+
var _chunkPACOJA5Vjs = require('./chunk-PACOJA5V.js');
|
|
33
|
+
require('./chunk-XDNTV7B4.js');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -51,4 +51,4 @@ require('./chunk-I3MHZ4NU.js');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
exports.Await =
|
|
54
|
+
exports.Await = _chunkPACOJA5Vjs.Await; exports.BrowserRouter = _chunkPACOJA5Vjs.BrowserRouter; exports.Form = _chunkPACOJA5Vjs.Form; exports.HashRouter = _chunkPACOJA5Vjs.HashRouter; exports.Link = _chunkPACOJA5Vjs.Link; exports.Links = _chunkPACOJA5Vjs.Links; exports.MemoryRouter = _chunkPACOJA5Vjs.MemoryRouter; exports.Meta = _chunkPACOJA5Vjs.Meta; exports.NavLink = _chunkPACOJA5Vjs.NavLink; exports.Navigate = _chunkPACOJA5Vjs.Navigate; exports.Outlet = _chunkPACOJA5Vjs.Outlet; exports.Route = _chunkPACOJA5Vjs.Route; exports.Router = _chunkPACOJA5Vjs.Router; exports.RouterProvider = _chunkPACOJA5Vjs.RouterProvider; exports.Routes = _chunkPACOJA5Vjs.Routes; exports.ScrollRestoration = _chunkPACOJA5Vjs.ScrollRestoration; exports.StaticRouter = _chunkPACOJA5Vjs.StaticRouter; exports.StaticRouterProvider = _chunkPACOJA5Vjs.StaticRouterProvider; exports.unstable_HistoryRouter = _chunkPACOJA5Vjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1d8f3ee
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
ScrollRestoration,
|
|
30
30
|
StaticRouter,
|
|
31
31
|
StaticRouterProvider
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-LCKD6EHG.mjs";
|
|
33
33
|
export {
|
|
34
34
|
Await,
|
|
35
35
|
BrowserRouter,
|
|
@@ -819,7 +819,7 @@ interface RouterState {
|
|
|
819
819
|
/**
|
|
820
820
|
* Current scroll position we should start at for a new view
|
|
821
821
|
* - number -> scroll position to restore to
|
|
822
|
-
* - false -> do not restore scroll at all (used during submissions)
|
|
822
|
+
* - false -> do not restore scroll at all (used during submissions/revalidations)
|
|
823
823
|
* - null -> don't have a saved position, scroll to hash or top of page
|
|
824
824
|
*/
|
|
825
825
|
restoreScrollPosition: number | false | null;
|
|
@@ -819,7 +819,7 @@ interface RouterState {
|
|
|
819
819
|
/**
|
|
820
820
|
* Current scroll position we should start at for a new view
|
|
821
821
|
* - number -> scroll position to restore to
|
|
822
|
-
* - false -> do not restore scroll at all (used during submissions)
|
|
822
|
+
* - false -> do not restore scroll at all (used during submissions/revalidations)
|
|
823
823
|
* - null -> don't have a saved position, scroll to hash or top of page
|
|
824
824
|
*/
|
|
825
825
|
restoreScrollPosition: number | false | null;
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v0.0.0-experimental-
|
|
30
|
+
* react-router v0.0.0-experimental-1d8f3ee
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -63,7 +63,7 @@ function createKey() {
|
|
|
63
63
|
}
|
|
64
64
|
function createLocation(current, to, state = null, key) {
|
|
65
65
|
let location = {
|
|
66
|
-
pathname:
|
|
66
|
+
pathname: typeof current === "string" ? current : current.pathname,
|
|
67
67
|
search: "",
|
|
68
68
|
hash: "",
|
|
69
69
|
...typeof to === "string" ? parsePath(to) : to,
|
|
@@ -5,7 +5,7 @@ export { Await, BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta
|
|
|
5
5
|
import { serialize, parse } from 'cookie';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* react-router v0.0.0-experimental-
|
|
8
|
+
* react-router v0.0.0-experimental-1d8f3ee
|
|
9
9
|
*
|
|
10
10
|
* Copyright (c) Remix Software Inc.
|
|
11
11
|
*
|
|
@@ -41,7 +41,7 @@ function createKey() {
|
|
|
41
41
|
}
|
|
42
42
|
function createLocation(current, to, state = null, key) {
|
|
43
43
|
let location = {
|
|
44
|
-
pathname:
|
|
44
|
+
pathname: typeof current === "string" ? current : current.pathname,
|
|
45
45
|
search: "",
|
|
46
46
|
hash: "",
|
|
47
47
|
...typeof to === "string" ? parsePath(to) : to,
|