react-router 7.8.2 → 7.9.0-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 +28 -0
- package/dist/development/{chunk-5UALIXAM.mjs → chunk-AVXIT45F.mjs} +94 -70
- package/dist/development/{chunk-PVWAREVJ.mjs → chunk-QZH3B547.mjs} +47 -50
- package/dist/development/{chunk-ZO66TDGB.js → chunk-RGB6BZUL.js} +41 -44
- package/dist/development/{chunk-CSDGKXLR.js → chunk-XYB2GISA.js} +135 -135
- package/dist/{production/context-jKip1TFB.d.mts → development/context-BH6Jwdoy.d.mts} +39 -32
- package/dist/development/dom-export.d.mts +3 -3
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +14 -14
- package/dist/development/dom-export.mjs +14 -14
- package/dist/development/{index-react-server-client-DRhjXpk2.d.mts → index-react-server-client-1cWMpKk4.d.mts} +13 -13
- package/dist/{production/index-react-server-client-BKpa2trA.d.ts → development/index-react-server-client-CMC2eQAY.d.ts} +12 -12
- 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 +4 -4
- package/dist/development/index-react-server.d.mts +229 -37
- package/dist/development/index-react-server.d.ts +229 -37
- package/dist/development/index-react-server.js +89 -39
- package/dist/development/index-react-server.mjs +88 -36
- package/dist/development/index.d.mts +31 -24
- package/dist/development/index.d.ts +29 -22
- package/dist/development/index.js +184 -158
- package/dist/development/index.mjs +9 -7
- package/dist/development/lib/types/internal.d.mts +6 -6
- package/dist/development/lib/types/internal.d.ts +5 -5
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-DAVP2QQ0.d.mts → route-data-BQkq8Erj.d.mts} +12 -12
- package/dist/development/{routeModules-rOzWJJ9x.d.ts → routeModules-DSKAn01V.d.ts} +175 -168
- package/dist/production/{chunk-Z56HUDN5.js → chunk-A6EU7LHU.js} +41 -44
- package/dist/production/{chunk-REDRD2MB.mjs → chunk-BQLQLXP4.mjs} +47 -50
- package/dist/production/{chunk-JNT5PWCQ.js → chunk-IR3XRH6J.js} +135 -135
- package/dist/production/{chunk-KWHRV2I7.mjs → chunk-WMHWIEJV.mjs} +94 -70
- package/dist/{development/context-jKip1TFB.d.mts → production/context-BH6Jwdoy.d.mts} +39 -32
- package/dist/production/dom-export.d.mts +3 -3
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +14 -14
- package/dist/production/dom-export.mjs +14 -14
- package/dist/production/{index-react-server-client-DRhjXpk2.d.mts → index-react-server-client-1cWMpKk4.d.mts} +13 -13
- package/dist/{development/index-react-server-client-BKpa2trA.d.ts → production/index-react-server-client-CMC2eQAY.d.ts} +12 -12
- 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 +4 -4
- package/dist/production/index-react-server.d.mts +229 -37
- package/dist/production/index-react-server.d.ts +229 -37
- package/dist/production/index-react-server.js +89 -39
- package/dist/production/index-react-server.mjs +88 -36
- package/dist/production/index.d.mts +31 -24
- package/dist/production/index.d.ts +29 -22
- package/dist/production/index.js +184 -158
- package/dist/production/index.mjs +9 -7
- package/dist/production/lib/types/internal.d.mts +6 -6
- package/dist/production/lib/types/internal.d.ts +5 -5
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-DAVP2QQ0.d.mts → route-data-BQkq8Erj.d.mts} +12 -12
- package/dist/production/{routeModules-rOzWJJ9x.d.ts → routeModules-DSKAn01V.d.ts} +175 -168
- package/package.json +1 -1
|
@@ -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 _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.
|
|
2
|
+
* react-router v7.9.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"use client";
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkA6EU7LHUjs = require('./chunk-A6EU7LHU.js');
|
|
15
15
|
|
|
16
16
|
// lib/dom-export/dom-router-provider.tsx
|
|
17
17
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react);
|
|
@@ -67,7 +67,7 @@ function initSsrInfo() {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
function createHydratedRouter({
|
|
70
|
-
|
|
70
|
+
getContext
|
|
71
71
|
}) {
|
|
72
72
|
initSsrInfo();
|
|
73
73
|
if (!ssrInfo) {
|
|
@@ -111,18 +111,18 @@ function createHydratedRouter({
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
} else {
|
|
114
|
-
hydrationData = _reactrouter.UNSAFE_getHydrationData.call(void 0,
|
|
115
|
-
ssrInfo.context.state,
|
|
114
|
+
hydrationData = _reactrouter.UNSAFE_getHydrationData.call(void 0, {
|
|
115
|
+
state: ssrInfo.context.state,
|
|
116
116
|
routes,
|
|
117
|
-
(routeId) => ({
|
|
117
|
+
getRouteInfo: (routeId) => ({
|
|
118
118
|
clientLoader: _optionalChain([ssrInfo, 'access', _6 => _6.routeModules, 'access', _7 => _7[routeId], 'optionalAccess', _8 => _8.clientLoader]),
|
|
119
119
|
hasLoader: _optionalChain([ssrInfo, 'access', _9 => _9.manifest, 'access', _10 => _10.routes, 'access', _11 => _11[routeId], 'optionalAccess', _12 => _12.hasLoader]) === true,
|
|
120
120
|
hasHydrateFallback: _optionalChain([ssrInfo, 'access', _13 => _13.routeModules, 'access', _14 => _14[routeId], 'optionalAccess', _15 => _15.HydrateFallback]) != null
|
|
121
121
|
}),
|
|
122
|
-
window.location,
|
|
123
|
-
_optionalChain([window, 'access', _16 => _16.__reactRouterContext, 'optionalAccess', _17 => _17.basename]),
|
|
124
|
-
ssrInfo.context.isSpaMode
|
|
125
|
-
);
|
|
122
|
+
location: window.location,
|
|
123
|
+
basename: _optionalChain([window, 'access', _16 => _16.__reactRouterContext, 'optionalAccess', _17 => _17.basename]),
|
|
124
|
+
isSpaMode: ssrInfo.context.isSpaMode
|
|
125
|
+
});
|
|
126
126
|
if (hydrationData && hydrationData.errors) {
|
|
127
127
|
hydrationData.errors = _reactrouter.UNSAFE_deserializeErrors.call(void 0, hydrationData.errors);
|
|
128
128
|
}
|
|
@@ -131,12 +131,12 @@ function createHydratedRouter({
|
|
|
131
131
|
routes,
|
|
132
132
|
history: _reactrouter.UNSAFE_createBrowserHistory.call(void 0, ),
|
|
133
133
|
basename: ssrInfo.context.basename,
|
|
134
|
-
|
|
134
|
+
getContext,
|
|
135
135
|
hydrationData,
|
|
136
136
|
hydrationRouteProperties: _reactrouter.UNSAFE_hydrationRouteProperties,
|
|
137
137
|
mapRouteProperties: _reactrouter.UNSAFE_mapRouteProperties,
|
|
138
138
|
future: {
|
|
139
|
-
|
|
139
|
+
middleware: ssrInfo.context.future.v8_middleware
|
|
140
140
|
},
|
|
141
141
|
dataStrategy: _reactrouter.UNSAFE_getTurboStreamSingleFetchDataStrategy.call(void 0,
|
|
142
142
|
() => router2,
|
|
@@ -167,7 +167,7 @@ function createHydratedRouter({
|
|
|
167
167
|
function HydratedRouter(props) {
|
|
168
168
|
if (!router) {
|
|
169
169
|
router = createHydratedRouter({
|
|
170
|
-
|
|
170
|
+
getContext: props.getContext
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
let [criticalCss, setCriticalCss] = React2.useState(
|
|
@@ -180,7 +180,7 @@ function HydratedRouter(props) {
|
|
|
180
180
|
}, []);
|
|
181
181
|
React2.useEffect(() => {
|
|
182
182
|
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
|
|
183
|
-
document.querySelectorAll(`[${
|
|
183
|
+
document.querySelectorAll(`[${_chunkA6EU7LHUjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
|
|
184
184
|
}
|
|
185
185
|
}, [criticalCss]);
|
|
186
186
|
let [location, setLocation] = React2.useState(router.state.location);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.9.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import {
|
|
13
13
|
deserializeErrors,
|
|
14
14
|
getHydrationData
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WMHWIEJV.mjs";
|
|
16
16
|
import {
|
|
17
17
|
CRITICAL_CSS_DATA_ATTRIBUTE,
|
|
18
18
|
FrameworkContext,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
invariant,
|
|
30
30
|
mapRouteProperties,
|
|
31
31
|
useFogOFWarDiscovery
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BQLQLXP4.mjs";
|
|
33
33
|
|
|
34
34
|
// lib/dom-export/dom-router-provider.tsx
|
|
35
35
|
import * as React from "react";
|
|
@@ -67,7 +67,7 @@ function initSsrInfo() {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
function createHydratedRouter({
|
|
70
|
-
|
|
70
|
+
getContext
|
|
71
71
|
}) {
|
|
72
72
|
initSsrInfo();
|
|
73
73
|
if (!ssrInfo) {
|
|
@@ -111,18 +111,18 @@ function createHydratedRouter({
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
} else {
|
|
114
|
-
hydrationData = getHydrationData(
|
|
115
|
-
ssrInfo.context.state,
|
|
114
|
+
hydrationData = getHydrationData({
|
|
115
|
+
state: ssrInfo.context.state,
|
|
116
116
|
routes,
|
|
117
|
-
(routeId) => ({
|
|
117
|
+
getRouteInfo: (routeId) => ({
|
|
118
118
|
clientLoader: ssrInfo.routeModules[routeId]?.clientLoader,
|
|
119
119
|
hasLoader: ssrInfo.manifest.routes[routeId]?.hasLoader === true,
|
|
120
120
|
hasHydrateFallback: ssrInfo.routeModules[routeId]?.HydrateFallback != null
|
|
121
121
|
}),
|
|
122
|
-
window.location,
|
|
123
|
-
window.__reactRouterContext?.basename,
|
|
124
|
-
ssrInfo.context.isSpaMode
|
|
125
|
-
);
|
|
122
|
+
location: window.location,
|
|
123
|
+
basename: window.__reactRouterContext?.basename,
|
|
124
|
+
isSpaMode: ssrInfo.context.isSpaMode
|
|
125
|
+
});
|
|
126
126
|
if (hydrationData && hydrationData.errors) {
|
|
127
127
|
hydrationData.errors = deserializeErrors(hydrationData.errors);
|
|
128
128
|
}
|
|
@@ -131,12 +131,12 @@ function createHydratedRouter({
|
|
|
131
131
|
routes,
|
|
132
132
|
history: createBrowserHistory(),
|
|
133
133
|
basename: ssrInfo.context.basename,
|
|
134
|
-
|
|
134
|
+
getContext,
|
|
135
135
|
hydrationData,
|
|
136
136
|
hydrationRouteProperties,
|
|
137
137
|
mapRouteProperties,
|
|
138
138
|
future: {
|
|
139
|
-
|
|
139
|
+
middleware: ssrInfo.context.future.v8_middleware
|
|
140
140
|
},
|
|
141
141
|
dataStrategy: getTurboStreamSingleFetchDataStrategy(
|
|
142
142
|
() => router2,
|
|
@@ -167,7 +167,7 @@ function createHydratedRouter({
|
|
|
167
167
|
function HydratedRouter(props) {
|
|
168
168
|
if (!router) {
|
|
169
169
|
router = createHydratedRouter({
|
|
170
|
-
|
|
170
|
+
getContext: props.getContext
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
let [criticalCss, setCriticalCss] = React2.useState(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b7 as RouteManifest, i as MiddlewareEnabled, g as RouterContextProvider, b as LoaderFunctionArgs, A as ActionFunctionArgs, O as StaticHandlerContext, H as HydrationState, F as DataRouteObject, a3 as HTMLFormMethod, a1 as FormEncType, m as RelativeRoutingType, T as To, b8 as History, K as GetScrollRestorationKeyFunction, a as RouterInit, b9 as FutureConfig$1, k as DataStrategyFunction, C as PatchRoutesOnNavigationFunction, N as NavigateOptions, Q as Fetcher, t as RouteObject, j as Router, B as BlockerFunction, L as Location, ba as CreateStaticHandlerOptions$1, G as StaticHandler } from './context-BH6Jwdoy.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { o as ServerRouteModule, A as AppLoadContext, c as RouteModules, h as ClientLoaderFunction, m as PageLinkDescriptor, d as SerializeFrom } from './route-data-
|
|
3
|
+
import { o as ServerRouteModule, A as AppLoadContext, c as RouteModules, h as ClientLoaderFunction, m as PageLinkDescriptor, d as SerializeFrom } from './route-data-BQkq8Erj.mjs';
|
|
4
4
|
|
|
5
5
|
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
6
6
|
interface ServerRoute extends Route {
|
|
@@ -37,7 +37,7 @@ interface ServerBuild {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
interface HandleDocumentRequestFunction {
|
|
40
|
-
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ?
|
|
40
|
+
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
|
|
41
41
|
}
|
|
42
42
|
interface HandleDataRequestFunction {
|
|
43
43
|
(response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
|
|
@@ -87,7 +87,7 @@ interface EntryContext extends FrameworkContextObject {
|
|
|
87
87
|
}
|
|
88
88
|
interface FutureConfig {
|
|
89
89
|
unstable_subResourceIntegrity: boolean;
|
|
90
|
-
|
|
90
|
+
v8_middleware: boolean;
|
|
91
91
|
}
|
|
92
92
|
type CriticalCss = string | {
|
|
93
93
|
rel: "stylesheet";
|
|
@@ -425,7 +425,7 @@ interface DOMRouterOpts {
|
|
|
425
425
|
*/
|
|
426
426
|
basename?: string;
|
|
427
427
|
/**
|
|
428
|
-
* A function that returns an {@link
|
|
428
|
+
* A function that returns an {@link RouterContextProvider} instance
|
|
429
429
|
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
|
|
430
430
|
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
|
431
431
|
* This function is called to generate a fresh `context` instance on each
|
|
@@ -433,22 +433,22 @@ interface DOMRouterOpts {
|
|
|
433
433
|
*
|
|
434
434
|
* ```tsx
|
|
435
435
|
* import {
|
|
436
|
-
*
|
|
437
|
-
*
|
|
436
|
+
* createContext,
|
|
437
|
+
* RouterContextProvider,
|
|
438
438
|
* } from "react-router";
|
|
439
439
|
*
|
|
440
|
-
* const apiClientContext =
|
|
440
|
+
* const apiClientContext = createContext<APIClient>();
|
|
441
441
|
*
|
|
442
442
|
* function createBrowserRouter(routes, {
|
|
443
|
-
*
|
|
444
|
-
* let context = new
|
|
443
|
+
* getContext() {
|
|
444
|
+
* let context = new RouterContextProvider();
|
|
445
445
|
* context.set(apiClientContext, getApiClient());
|
|
446
446
|
* return context;
|
|
447
447
|
* }
|
|
448
448
|
* })
|
|
449
449
|
* ```
|
|
450
450
|
*/
|
|
451
|
-
|
|
451
|
+
getContext?: RouterInit["getContext"];
|
|
452
452
|
/**
|
|
453
453
|
* Future flags to enable for the router.
|
|
454
454
|
*/
|
|
@@ -1025,7 +1025,7 @@ interface DOMRouterOpts {
|
|
|
1025
1025
|
* @param {DOMRouterOpts.basename} opts.basename n/a
|
|
1026
1026
|
* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
|
|
1027
1027
|
* @param {DOMRouterOpts.future} opts.future n/a
|
|
1028
|
-
* @param {DOMRouterOpts.
|
|
1028
|
+
* @param {DOMRouterOpts.getContext} opts.getContext n/a
|
|
1029
1029
|
* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
|
|
1030
1030
|
* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
|
|
1031
1031
|
* @param {DOMRouterOpts.window} opts.window n/a
|
|
@@ -1043,7 +1043,7 @@ declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts
|
|
|
1043
1043
|
* @param opts Options
|
|
1044
1044
|
* @param {DOMRouterOpts.basename} opts.basename n/a
|
|
1045
1045
|
* @param {DOMRouterOpts.future} opts.future n/a
|
|
1046
|
-
* @param {DOMRouterOpts.
|
|
1046
|
+
* @param {DOMRouterOpts.getContext} opts.getContext n/a
|
|
1047
1047
|
* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
|
|
1048
1048
|
* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
|
|
1049
1049
|
* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as HTMLFormMethod, ag as FormEncType,
|
|
1
|
+
import { ai as HTMLFormMethod, ag as FormEncType, k as RelativeRoutingType, by as RouteManifest, bz as ServerRouteModule, O as MiddlewareEnabled, K as RouterContextProvider, J as AppLoadContext, ak as LoaderFunctionArgs, ab as ActionFunctionArgs, f as RouteModules, H as HydrationState, a0 as DataRouteObject, W as ClientLoaderFunction, a4 as StaticHandlerContext, bb as PageLinkDescriptor, T as To, bA as History, a3 as GetScrollRestorationKeyFunction, Z as RouterInit, bB as FutureConfig$1, g as DataStrategyFunction, $ as PatchRoutesOnNavigationFunction, h as NavigateOptions, a5 as Fetcher, r as RouteObject, e as Router, j as SerializeFrom, B as BlockerFunction, a as Location, bC as CreateStaticHandlerOptions$1, a1 as StaticHandler } from './routeModules-DSKAn01V.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
type ParamKeyValuePair = [string, string];
|
|
@@ -142,7 +142,7 @@ interface ServerBuild {
|
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
interface HandleDocumentRequestFunction {
|
|
145
|
-
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ?
|
|
145
|
+
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
|
|
146
146
|
}
|
|
147
147
|
interface HandleDataRequestFunction {
|
|
148
148
|
(response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
|
|
@@ -219,7 +219,7 @@ interface EntryContext extends FrameworkContextObject {
|
|
|
219
219
|
}
|
|
220
220
|
interface FutureConfig {
|
|
221
221
|
unstable_subResourceIntegrity: boolean;
|
|
222
|
-
|
|
222
|
+
v8_middleware: boolean;
|
|
223
223
|
}
|
|
224
224
|
type CriticalCss = string | {
|
|
225
225
|
rel: "stylesheet";
|
|
@@ -424,7 +424,7 @@ interface DOMRouterOpts {
|
|
|
424
424
|
*/
|
|
425
425
|
basename?: string;
|
|
426
426
|
/**
|
|
427
|
-
* A function that returns an {@link
|
|
427
|
+
* A function that returns an {@link RouterContextProvider} instance
|
|
428
428
|
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
|
|
429
429
|
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
|
430
430
|
* This function is called to generate a fresh `context` instance on each
|
|
@@ -432,22 +432,22 @@ interface DOMRouterOpts {
|
|
|
432
432
|
*
|
|
433
433
|
* ```tsx
|
|
434
434
|
* import {
|
|
435
|
-
*
|
|
436
|
-
*
|
|
435
|
+
* createContext,
|
|
436
|
+
* RouterContextProvider,
|
|
437
437
|
* } from "react-router";
|
|
438
438
|
*
|
|
439
|
-
* const apiClientContext =
|
|
439
|
+
* const apiClientContext = createContext<APIClient>();
|
|
440
440
|
*
|
|
441
441
|
* function createBrowserRouter(routes, {
|
|
442
|
-
*
|
|
443
|
-
* let context = new
|
|
442
|
+
* getContext() {
|
|
443
|
+
* let context = new RouterContextProvider();
|
|
444
444
|
* context.set(apiClientContext, getApiClient());
|
|
445
445
|
* return context;
|
|
446
446
|
* }
|
|
447
447
|
* })
|
|
448
448
|
* ```
|
|
449
449
|
*/
|
|
450
|
-
|
|
450
|
+
getContext?: RouterInit["getContext"];
|
|
451
451
|
/**
|
|
452
452
|
* Future flags to enable for the router.
|
|
453
453
|
*/
|
|
@@ -1024,7 +1024,7 @@ interface DOMRouterOpts {
|
|
|
1024
1024
|
* @param {DOMRouterOpts.basename} opts.basename n/a
|
|
1025
1025
|
* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
|
|
1026
1026
|
* @param {DOMRouterOpts.future} opts.future n/a
|
|
1027
|
-
* @param {DOMRouterOpts.
|
|
1027
|
+
* @param {DOMRouterOpts.getContext} opts.getContext n/a
|
|
1028
1028
|
* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
|
|
1029
1029
|
* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
|
|
1030
1030
|
* @param {DOMRouterOpts.window} opts.window n/a
|
|
@@ -1042,7 +1042,7 @@ declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts
|
|
|
1042
1042
|
* @param opts Options
|
|
1043
1043
|
* @param {DOMRouterOpts.basename} opts.basename n/a
|
|
1044
1044
|
* @param {DOMRouterOpts.future} opts.future n/a
|
|
1045
|
-
* @param {DOMRouterOpts.
|
|
1045
|
+
* @param {DOMRouterOpts.getContext} opts.getContext n/a
|
|
1046
1046
|
* @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
|
|
1047
1047
|
* @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
|
|
1048
1048
|
* @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
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 { aE as MemoryRouter, aF as Navigate, aG as Outlet, aH as Route, aI as Router, aJ as RouterProvider, aK as Routes, ar as UNSAFE_AwaitContextProvider, b1 as UNSAFE_WithComponentProps, b5 as UNSAFE_WithErrorBoundaryProps, b3 as UNSAFE_WithHydrateFallbackProps } from './context-BH6Jwdoy.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-1cWMpKk4.mjs';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './route-data-
|
|
4
|
+
import './route-data-BQkq8Erj.mjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
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 { aY as MemoryRouter, aZ as Navigate, a_ as Outlet, a$ as Route, b0 as Router, b1 as RouterProvider, b2 as Routes, aJ as UNSAFE_AwaitContextProvider, bs as UNSAFE_WithComponentProps, bw as UNSAFE_WithErrorBoundaryProps, bu as UNSAFE_WithHydrateFallbackProps } from './routeModules-DSKAn01V.js';
|
|
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-CMC2eQAY.js';
|
|
3
3
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.9.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
var _chunkIR3XRH6Jjs = require('./chunk-IR3XRH6J.js');
|
|
32
33
|
|
|
33
|
-
var _chunkJNT5PWCQjs = require('./chunk-JNT5PWCQ.js');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkA6EU7LHUjs = require('./chunk-A6EU7LHU.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkZ56HUDN5js = require('./chunk-Z56HUDN5.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.
|
|
61
|
+
exports.BrowserRouter = _chunkIR3XRH6Jjs.BrowserRouter; exports.Form = _chunkIR3XRH6Jjs.Form; exports.HashRouter = _chunkIR3XRH6Jjs.HashRouter; exports.Link = _chunkIR3XRH6Jjs.Link; exports.Links = _chunkA6EU7LHUjs.Links; exports.MemoryRouter = _chunkIR3XRH6Jjs.MemoryRouter; exports.Meta = _chunkA6EU7LHUjs.Meta; exports.NavLink = _chunkIR3XRH6Jjs.NavLink; exports.Navigate = _chunkIR3XRH6Jjs.Navigate; exports.Outlet = _chunkIR3XRH6Jjs.Outlet; exports.Route = _chunkIR3XRH6Jjs.Route; exports.Router = _chunkIR3XRH6Jjs.Router; exports.RouterProvider = _chunkIR3XRH6Jjs.RouterProvider; exports.Routes = _chunkIR3XRH6Jjs.Routes; exports.ScrollRestoration = _chunkIR3XRH6Jjs.ScrollRestoration; exports.StaticRouter = _chunkIR3XRH6Jjs.StaticRouter; exports.StaticRouterProvider = _chunkIR3XRH6Jjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkA6EU7LHUjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkIR3XRH6Jjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkIR3XRH6Jjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkIR3XRH6Jjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkIR3XRH6Jjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.9.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
"use client";
|
|
12
12
|
import {
|
|
13
|
-
|
|
13
|
+
AwaitContextProvider,
|
|
14
14
|
BrowserRouter,
|
|
15
15
|
Form,
|
|
16
16
|
HashRouter,
|
|
@@ -32,9 +32,8 @@ import {
|
|
|
32
32
|
WithComponentProps,
|
|
33
33
|
WithErrorBoundaryProps,
|
|
34
34
|
WithHydrateFallbackProps
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-BQLQLXP4.mjs";
|
|
36
36
|
export {
|
|
37
|
-
Await,
|
|
38
37
|
BrowserRouter,
|
|
39
38
|
Form,
|
|
40
39
|
HashRouter,
|
|
@@ -52,6 +51,7 @@ export {
|
|
|
52
51
|
ScrollRestoration,
|
|
53
52
|
StaticRouter,
|
|
54
53
|
StaticRouterProvider,
|
|
54
|
+
AwaitContextProvider as UNSAFE_AwaitContextProvider,
|
|
55
55
|
WithComponentProps as UNSAFE_WithComponentProps,
|
|
56
56
|
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
|
|
57
57
|
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
|