react-router 0.0.0-experimental-3d7dcee → 0.0.0-experimental-426e5caec
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 +39 -2
- package/dist/development/{chunk-WJ2QP6HN.mjs → chunk-5HELVQDL.mjs} +179 -249
- package/dist/development/{chunk-S2WJDCRE.js → chunk-KCPD675I.js} +173 -243
- package/dist/{production/chunk-NIW37A6Q.js → development/chunk-KPVSYEOF.js} +135 -135
- package/dist/development/{chunk-QMIAKNRH.mjs → chunk-ZOYSFAC5.mjs} +56 -102
- package/dist/{production/context-DnZM5brG.d.mts → development/context-EwD9faH7.d.mts} +34 -33
- package/dist/development/dom-export.d.mts +3 -3
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +7 -7
- package/dist/development/dom-export.mjs +7 -7
- package/dist/development/{index-react-server-client-zr5eNeut.d.ts → index-react-server-client-CjrUmqhw.d.ts} +12 -12
- package/dist/{production/index-react-server-client-9rHNv-U3.d.mts → development/index-react-server-client-DDdP8ud2.d.mts} +13 -13
- 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 +76 -38
- package/dist/development/index-react-server.d.ts +76 -38
- package/dist/development/index-react-server.js +116 -112
- package/dist/development/index-react-server.mjs +114 -111
- package/dist/development/index.d.mts +53 -15
- package/dist/development/index.d.ts +51 -13
- package/dist/development/index.js +138 -184
- package/dist/development/index.mjs +7 -7
- package/dist/development/lib/types/internal.d.mts +11 -8
- package/dist/development/lib/types/internal.d.ts +10 -7
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-C24VEkoE.d.mts → route-data-CAnRKu1U.d.mts} +14 -14
- package/dist/development/{routeModules-FY5IBiA_.d.ts → routeModules-CQWjJ9NX.d.ts} +46 -45
- package/dist/production/{chunk-2BFZ6QQU.mjs → chunk-5W7O3ZZ2.mjs} +179 -249
- package/dist/production/{chunk-OFC37UQM.mjs → chunk-DZS627TW.mjs} +56 -102
- package/dist/production/{chunk-7CWVKQLP.js → chunk-NLCKEFES.js} +173 -243
- package/dist/{development/chunk-LSB26UC6.js → production/chunk-TC5SCO6O.js} +135 -135
- package/dist/{development/context-DnZM5brG.d.mts → production/context-EwD9faH7.d.mts} +34 -33
- package/dist/production/dom-export.d.mts +3 -3
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +7 -7
- package/dist/production/dom-export.mjs +7 -7
- package/dist/production/{index-react-server-client-zr5eNeut.d.ts → index-react-server-client-CjrUmqhw.d.ts} +12 -12
- package/dist/{development/index-react-server-client-9rHNv-U3.d.mts → production/index-react-server-client-DDdP8ud2.d.mts} +13 -13
- 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 +76 -38
- package/dist/production/index-react-server.d.ts +76 -38
- package/dist/production/index-react-server.js +116 -112
- package/dist/production/index-react-server.mjs +114 -111
- package/dist/production/index.d.mts +53 -15
- package/dist/production/index.d.ts +51 -13
- package/dist/production/index.js +138 -184
- package/dist/production/index.mjs +7 -7
- package/dist/production/lib/types/internal.d.mts +11 -8
- package/dist/production/lib/types/internal.d.ts +10 -7
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-C24VEkoE.d.mts → route-data-CAnRKu1U.d.mts} +14 -14
- package/dist/production/{routeModules-FY5IBiA_.d.ts → routeModules-CQWjJ9NX.d.ts} +46 -45
- 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 v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-426e5caec
|
|
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 _chunkKCPD675Ijs = require('./chunk-KCPD675I.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) {
|
|
@@ -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(`[${_chunkKCPD675Ijs.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 v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-426e5caec
|
|
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-ZOYSFAC5.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-5HELVQDL.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) {
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ai as HTMLFormMethod, ag as FormEncType, k as RelativeRoutingType, bx as RouteManifest, by 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, ba as PageLinkDescriptor, T as To, bz as History, a3 as GetScrollRestorationKeyFunction, Z as RouterInit, bA 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, bB as CreateStaticHandlerOptions$1, a1 as StaticHandler } from './routeModules-CQWjJ9NX.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,6 +1,6 @@
|
|
|
1
|
-
import { b6 as RouteManifest,
|
|
1
|
+
import { b6 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, b7 as History, K as GetScrollRestorationKeyFunction, a as RouterInit, b8 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, b9 as CreateStaticHandlerOptions$1, G as StaticHandler } from './context-EwD9faH7.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-CAnRKu1U.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
|
-
export { aC as Await, aD as MemoryRouter, aE as Navigate, aF as Outlet, aG as Route, aH as Router, aI as RouterProvider, aJ as Routes, b0 as UNSAFE_WithComponentProps, b4 as UNSAFE_WithErrorBoundaryProps, b2 as UNSAFE_WithHydrateFallbackProps } from './context-
|
|
2
|
-
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-
|
|
1
|
+
export { aC as Await, aD as MemoryRouter, aE as Navigate, aF as Outlet, aG as Route, aH as Router, aI as RouterProvider, aJ as Routes, b0 as UNSAFE_WithComponentProps, b4 as UNSAFE_WithErrorBoundaryProps, b2 as UNSAFE_WithHydrateFallbackProps } from './context-EwD9faH7.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-DDdP8ud2.mjs';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './route-data-
|
|
4
|
+
import './route-data-CAnRKu1U.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 { aW as Await, aX as MemoryRouter, aY as Navigate, aZ as Outlet, a_ as Route, a$ as Router, b0 as RouterProvider, b1 as Routes, br as UNSAFE_WithComponentProps, bv as UNSAFE_WithErrorBoundaryProps, bt as UNSAFE_WithHydrateFallbackProps } from './routeModules-CQWjJ9NX.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-CjrUmqhw.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-426e5caec
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkKPVSYEOFjs = require('./chunk-KPVSYEOF.js');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkKCPD675Ijs = require('./chunk-KCPD675I.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkS2WJDCREjs = require('./chunk-S2WJDCRE.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.Await =
|
|
61
|
+
exports.Await = _chunkKPVSYEOFjs.Await; exports.BrowserRouter = _chunkKPVSYEOFjs.BrowserRouter; exports.Form = _chunkKPVSYEOFjs.Form; exports.HashRouter = _chunkKPVSYEOFjs.HashRouter; exports.Link = _chunkKPVSYEOFjs.Link; exports.Links = _chunkKCPD675Ijs.Links; exports.MemoryRouter = _chunkKPVSYEOFjs.MemoryRouter; exports.Meta = _chunkKCPD675Ijs.Meta; exports.NavLink = _chunkKPVSYEOFjs.NavLink; exports.Navigate = _chunkKPVSYEOFjs.Navigate; exports.Outlet = _chunkKPVSYEOFjs.Outlet; exports.Route = _chunkKPVSYEOFjs.Route; exports.Router = _chunkKPVSYEOFjs.Router; exports.RouterProvider = _chunkKPVSYEOFjs.RouterProvider; exports.Routes = _chunkKPVSYEOFjs.Routes; exports.ScrollRestoration = _chunkKPVSYEOFjs.ScrollRestoration; exports.StaticRouter = _chunkKPVSYEOFjs.StaticRouter; exports.StaticRouterProvider = _chunkKPVSYEOFjs.StaticRouterProvider; exports.UNSAFE_WithComponentProps = _chunkKPVSYEOFjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkKPVSYEOFjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkKPVSYEOFjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkKPVSYEOFjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-426e5caec
|
|
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-5HELVQDL.mjs";
|
|
36
36
|
export {
|
|
37
37
|
Await,
|
|
38
38
|
BrowserRouter,
|
|
@@ -169,7 +169,7 @@ interface History {
|
|
|
169
169
|
interface Future {
|
|
170
170
|
}
|
|
171
171
|
type MiddlewareEnabled = Future extends {
|
|
172
|
-
|
|
172
|
+
middleware: infer T extends boolean;
|
|
173
173
|
} ? T : false;
|
|
174
174
|
|
|
175
175
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -229,14 +229,14 @@ type Submission = {
|
|
|
229
229
|
};
|
|
230
230
|
/**
|
|
231
231
|
* A context instance used as the key for the `get`/`set` methods of a
|
|
232
|
-
* {@link
|
|
232
|
+
* {@link RouterContextProvider}. Accepts an optional default
|
|
233
233
|
* value to be returned if no value has been set.
|
|
234
234
|
*/
|
|
235
|
-
interface
|
|
235
|
+
interface RouterContext<T = unknown> {
|
|
236
236
|
defaultValue?: T;
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
|
-
* Creates a type-safe {@link
|
|
239
|
+
* Creates a type-safe {@link RouterContext} object that can be used to
|
|
240
240
|
* store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s,
|
|
241
241
|
* [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).
|
|
242
242
|
* Similar to React's [`createContext`](https://react.dev/reference/react/createContext),
|
|
@@ -247,11 +247,11 @@ interface unstable_RouterContext<T = unknown> {
|
|
|
247
247
|
* when no value has been set will throw an error.
|
|
248
248
|
*
|
|
249
249
|
* ```tsx filename=app/context.ts
|
|
250
|
-
* import {
|
|
250
|
+
* import { createContext } from "react-router";
|
|
251
251
|
*
|
|
252
252
|
* // Create a context for user data
|
|
253
253
|
* export const userContext =
|
|
254
|
-
*
|
|
254
|
+
* createContext<User | null>(null);
|
|
255
255
|
* ```
|
|
256
256
|
*
|
|
257
257
|
* ```tsx filename=app/middleware/auth.ts
|
|
@@ -289,23 +289,23 @@ interface unstable_RouterContext<T = unknown> {
|
|
|
289
289
|
* @mode data
|
|
290
290
|
* @param defaultValue An optional default value for the context. This value
|
|
291
291
|
* will be returned if no value has been set for this context.
|
|
292
|
-
* @returns A {@link
|
|
292
|
+
* @returns A {@link RouterContext} object that can be used with
|
|
293
293
|
* `context.get()` and `context.set()` in [`action`](../../start/framework/route-module#action)s,
|
|
294
294
|
* [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).
|
|
295
295
|
*/
|
|
296
|
-
declare function
|
|
296
|
+
declare function createContext<T>(defaultValue?: T): RouterContext<T>;
|
|
297
297
|
/**
|
|
298
298
|
* Provides methods for writing/reading values in application context in a
|
|
299
299
|
* type-safe way. Primarily for usage with [middleware](../../how-to/middleware).
|
|
300
300
|
*
|
|
301
301
|
* @example
|
|
302
302
|
* import {
|
|
303
|
-
*
|
|
304
|
-
*
|
|
303
|
+
* createContext,
|
|
304
|
+
* RouterContextProvider
|
|
305
305
|
* } from "react-router";
|
|
306
306
|
*
|
|
307
|
-
* const userContext =
|
|
308
|
-
* const contextProvider = new
|
|
307
|
+
* const userContext = createContext<User | null>(null);
|
|
308
|
+
* const contextProvider = new RouterContextProvider();
|
|
309
309
|
* contextProvider.set(userContext, getUser());
|
|
310
310
|
* // ^ Type-safe
|
|
311
311
|
* const user = contextProvider.get(userContext);
|
|
@@ -316,13 +316,13 @@ declare function unstable_createContext<T>(defaultValue?: T): unstable_RouterCon
|
|
|
316
316
|
* @mode framework
|
|
317
317
|
* @mode data
|
|
318
318
|
*/
|
|
319
|
-
declare class
|
|
319
|
+
declare class RouterContextProvider {
|
|
320
320
|
#private;
|
|
321
321
|
/**
|
|
322
|
-
* Create a new `
|
|
322
|
+
* Create a new `RouterContextProvider` instance
|
|
323
323
|
* @param init An optional initial context map to populate the provider with
|
|
324
324
|
*/
|
|
325
|
-
constructor(init?: Map<
|
|
325
|
+
constructor(init?: Map<RouterContext, unknown>);
|
|
326
326
|
/**
|
|
327
327
|
* Access a value from the context. If no value has been set for the context,
|
|
328
328
|
* it will return the context's `defaultValue` if provided, or throw an error
|
|
@@ -331,7 +331,7 @@ declare class unstable_RouterContextProvider {
|
|
|
331
331
|
* @returns The value for the context, or the context's `defaultValue` if no
|
|
332
332
|
* value was set
|
|
333
333
|
*/
|
|
334
|
-
get<T>(context:
|
|
334
|
+
get<T>(context: RouterContext<T>): T;
|
|
335
335
|
/**
|
|
336
336
|
* Set a value for the context. If the context already has a value set, this
|
|
337
337
|
* will overwrite it.
|
|
@@ -340,9 +340,9 @@ declare class unstable_RouterContextProvider {
|
|
|
340
340
|
* @param value The value to set for the context
|
|
341
341
|
* @returns {void}
|
|
342
342
|
*/
|
|
343
|
-
set<C extends
|
|
343
|
+
set<C extends RouterContext>(context: C, value: C extends RouterContext<infer T> ? T : never): void;
|
|
344
344
|
}
|
|
345
|
-
type DefaultContext = MiddlewareEnabled extends true ? Readonly<
|
|
345
|
+
type DefaultContext = MiddlewareEnabled extends true ? Readonly<RouterContextProvider> : any;
|
|
346
346
|
/**
|
|
347
347
|
* @private
|
|
348
348
|
* Arguments passed to route loader/action functions. Same for now but we keep
|
|
@@ -377,7 +377,7 @@ interface DataFunctionArgs<Context> {
|
|
|
377
377
|
* Route middleware `next` function to call downstream handlers and then complete
|
|
378
378
|
* middlewares from the bottom-up
|
|
379
379
|
*/
|
|
380
|
-
interface
|
|
380
|
+
interface MiddlewareNextFunction<Result = unknown> {
|
|
381
381
|
(): Promise<Result>;
|
|
382
382
|
}
|
|
383
383
|
/**
|
|
@@ -386,7 +386,7 @@ interface unstable_MiddlewareNextFunction<Result = unknown> {
|
|
|
386
386
|
* a `next` function as the second parameter which will call downstream handlers
|
|
387
387
|
* and then complete middlewares from the bottom-up
|
|
388
388
|
*/
|
|
389
|
-
type
|
|
389
|
+
type MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<Readonly<RouterContextProvider>>, next: MiddlewareNextFunction<Result>) => MaybePromise<Result | void>;
|
|
390
390
|
/**
|
|
391
391
|
* Arguments passed to loader functions
|
|
392
392
|
*/
|
|
@@ -541,7 +541,7 @@ interface DataStrategyFunctionArgs<Context = DefaultContext> extends DataFunctio
|
|
|
541
541
|
* Matches for this route extended with Data strategy APIs
|
|
542
542
|
*/
|
|
543
543
|
matches: DataStrategyMatch[];
|
|
544
|
-
|
|
544
|
+
runClientMiddleware: (cb: DataStrategyFunction<Context>) => Promise<Record<string, DataStrategyResult>>;
|
|
545
545
|
/**
|
|
546
546
|
* The key of the fetcher we are calling `dataStrategy` for, otherwise `null`
|
|
547
547
|
* for navigational executions
|
|
@@ -586,7 +586,7 @@ type UnsupportedLazyRouteObjectKey = "lazy" | "caseSensitive" | "path" | "id" |
|
|
|
586
586
|
* onto the route. Either they're meaningful to the router, or they'll get
|
|
587
587
|
* ignored.
|
|
588
588
|
*/
|
|
589
|
-
type UnsupportedLazyRouteFunctionKey = UnsupportedLazyRouteObjectKey | "
|
|
589
|
+
type UnsupportedLazyRouteFunctionKey = UnsupportedLazyRouteObjectKey | "middleware";
|
|
590
590
|
/**
|
|
591
591
|
* lazy object to load route properties, which can add non-matching
|
|
592
592
|
* related properties to a route
|
|
@@ -609,7 +609,7 @@ type AgnosticBaseRouteObject = {
|
|
|
609
609
|
caseSensitive?: boolean;
|
|
610
610
|
path?: string;
|
|
611
611
|
id?: string;
|
|
612
|
-
|
|
612
|
+
middleware?: MiddlewareFunction[];
|
|
613
613
|
loader?: LoaderFunction | boolean;
|
|
614
614
|
action?: ActionFunction | boolean;
|
|
615
615
|
hasErrorBoundary?: boolean;
|
|
@@ -849,6 +849,43 @@ declare const redirectDocument$1: RedirectFunction;
|
|
|
849
849
|
* header.
|
|
850
850
|
*/
|
|
851
851
|
declare const replace$1: RedirectFunction;
|
|
852
|
+
type ErrorResponse = {
|
|
853
|
+
status: number;
|
|
854
|
+
statusText: string;
|
|
855
|
+
data: any;
|
|
856
|
+
};
|
|
857
|
+
/**
|
|
858
|
+
* Check if the given error is an {@link ErrorResponse} generated from a 4xx/5xx
|
|
859
|
+
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
|
860
|
+
* thrown from an [`action`](../../start/framework/route-module#action)/[`loader`](../../start/framework/route-module#loader)
|
|
861
|
+
*
|
|
862
|
+
* @example
|
|
863
|
+
* import { isRouteErrorResponse } from "react-router";
|
|
864
|
+
*
|
|
865
|
+
* export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
|
866
|
+
* if (isRouteErrorResponse(error)) {
|
|
867
|
+
* return (
|
|
868
|
+
* <>
|
|
869
|
+
* <p>Error: `${error.status}: ${error.statusText}`</p>
|
|
870
|
+
* <p>{error.data}</p>
|
|
871
|
+
* </>
|
|
872
|
+
* );
|
|
873
|
+
* }
|
|
874
|
+
*
|
|
875
|
+
* return (
|
|
876
|
+
* <p>Error: {error instanceof Error ? error.message : "Unknown Error"}</p>
|
|
877
|
+
* );
|
|
878
|
+
* }
|
|
879
|
+
*
|
|
880
|
+
* @public
|
|
881
|
+
* @category Utils
|
|
882
|
+
* @mode framework
|
|
883
|
+
* @mode data
|
|
884
|
+
* @param error The error to check.
|
|
885
|
+
* @returns `true` if the error is an {@link ErrorResponse}, `false` otherwise.
|
|
886
|
+
*
|
|
887
|
+
*/
|
|
888
|
+
declare function isRouteErrorResponse(error: any): error is ErrorResponse;
|
|
852
889
|
|
|
853
890
|
/**
|
|
854
891
|
* A Router instance manages all navigation and data loading/mutations
|
|
@@ -1115,7 +1152,6 @@ type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "e
|
|
|
1115
1152
|
* Future flags to toggle new feature behavior
|
|
1116
1153
|
*/
|
|
1117
1154
|
interface FutureConfig {
|
|
1118
|
-
unstable_middleware: boolean;
|
|
1119
1155
|
}
|
|
1120
1156
|
/**
|
|
1121
1157
|
* Initialization options for createRouter
|
|
@@ -1124,7 +1160,7 @@ interface RouterInit {
|
|
|
1124
1160
|
routes: AgnosticRouteObject[];
|
|
1125
1161
|
history: History;
|
|
1126
1162
|
basename?: string;
|
|
1127
|
-
|
|
1163
|
+
getContext?: () => MaybePromise<RouterContextProvider>;
|
|
1128
1164
|
mapRouteProperties?: MapRoutePropertiesFunction;
|
|
1129
1165
|
future?: Partial<FutureConfig>;
|
|
1130
1166
|
hydrationRouteProperties?: string[];
|
|
@@ -1159,13 +1195,15 @@ interface StaticHandler {
|
|
|
1159
1195
|
skipLoaderErrorBubbling?: boolean;
|
|
1160
1196
|
skipRevalidation?: boolean;
|
|
1161
1197
|
dataStrategy?: DataStrategyFunction<unknown>;
|
|
1162
|
-
|
|
1198
|
+
generateMiddlewareResponse?: (query: (r: Request, args?: {
|
|
1199
|
+
filterMatchesToLoad?: (match: AgnosticDataRouteMatch) => boolean;
|
|
1200
|
+
}) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
|
|
1163
1201
|
}): Promise<StaticHandlerContext | Response>;
|
|
1164
1202
|
queryRoute(request: Request, opts?: {
|
|
1165
1203
|
routeId?: string;
|
|
1166
1204
|
requestContext?: unknown;
|
|
1167
1205
|
dataStrategy?: DataStrategyFunction<unknown>;
|
|
1168
|
-
|
|
1206
|
+
generateMiddlewareResponse?: (queryRoute: (r: Request) => Promise<Response>) => MaybePromise<Response>;
|
|
1169
1207
|
}): Promise<any>;
|
|
1170
1208
|
}
|
|
1171
1209
|
type ViewTransitionOpts = {
|
|
@@ -1397,7 +1435,7 @@ interface IndexRouteObject {
|
|
|
1397
1435
|
caseSensitive?: AgnosticIndexRouteObject["caseSensitive"];
|
|
1398
1436
|
path?: AgnosticIndexRouteObject["path"];
|
|
1399
1437
|
id?: AgnosticIndexRouteObject["id"];
|
|
1400
|
-
|
|
1438
|
+
middleware?: AgnosticIndexRouteObject["middleware"];
|
|
1401
1439
|
loader?: AgnosticIndexRouteObject["loader"];
|
|
1402
1440
|
action?: AgnosticIndexRouteObject["action"];
|
|
1403
1441
|
hasErrorBoundary?: AgnosticIndexRouteObject["hasErrorBoundary"];
|
|
@@ -1417,7 +1455,7 @@ interface NonIndexRouteObject {
|
|
|
1417
1455
|
caseSensitive?: AgnosticNonIndexRouteObject["caseSensitive"];
|
|
1418
1456
|
path?: AgnosticNonIndexRouteObject["path"];
|
|
1419
1457
|
id?: AgnosticNonIndexRouteObject["id"];
|
|
1420
|
-
|
|
1458
|
+
middleware?: AgnosticNonIndexRouteObject["middleware"];
|
|
1421
1459
|
loader?: AgnosticNonIndexRouteObject["loader"];
|
|
1422
1460
|
action?: AgnosticNonIndexRouteObject["action"];
|
|
1423
1461
|
hasErrorBoundary?: AgnosticNonIndexRouteObject["hasErrorBoundary"];
|
|
@@ -1571,7 +1609,7 @@ type unstable_SerializesTo<T> = {
|
|
|
1571
1609
|
unstable__ReactRouter_SerializesTo: [T];
|
|
1572
1610
|
};
|
|
1573
1611
|
|
|
1574
|
-
type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
|
|
1612
|
+
type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
|
|
1575
1613
|
[K in keyof T]: Serialize<T[K]>;
|
|
1576
1614
|
} : undefined;
|
|
1577
1615
|
type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T;
|
|
@@ -1603,14 +1641,14 @@ type ClientDataFunctionArgs<Params> = {
|
|
|
1603
1641
|
**/
|
|
1604
1642
|
params: Params;
|
|
1605
1643
|
/**
|
|
1606
|
-
* When `future.
|
|
1644
|
+
* When `future.v8_middleware` is not enabled, this is undefined.
|
|
1607
1645
|
*
|
|
1608
|
-
* When `future.
|
|
1609
|
-
* `
|
|
1646
|
+
* When `future.v8_middleware` is enabled, this is an instance of
|
|
1647
|
+
* `RouterContextProvider` and can be used to access context values
|
|
1610
1648
|
* from your route middlewares. You may pass in initial context values in your
|
|
1611
|
-
* `<HydratedRouter
|
|
1649
|
+
* `<HydratedRouter getContext>` prop
|
|
1612
1650
|
*/
|
|
1613
|
-
context: Readonly<
|
|
1651
|
+
context: Readonly<RouterContextProvider>;
|
|
1614
1652
|
};
|
|
1615
1653
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
|
|
1616
1654
|
ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
|
|
@@ -1933,7 +1971,7 @@ type LoadServerActionFunction = (id: string) => Promise<Function>;
|
|
|
1933
1971
|
* errors that occur during the request processing.
|
|
1934
1972
|
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
|
1935
1973
|
* to match against.
|
|
1936
|
-
* @param opts.requestContext An instance of {@link
|
|
1974
|
+
* @param opts.requestContext An instance of {@link RouterContextProvider}
|
|
1937
1975
|
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
|
|
1938
1976
|
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
|
1939
1977
|
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
|
|
@@ -1947,7 +1985,7 @@ declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename,
|
|
|
1947
1985
|
decodeReply?: DecodeReplyFunction;
|
|
1948
1986
|
decodeAction?: DecodeActionFunction;
|
|
1949
1987
|
decodeFormState?: DecodeFormStateFunction;
|
|
1950
|
-
requestContext?:
|
|
1988
|
+
requestContext?: RouterContextProvider;
|
|
1951
1989
|
loadServerAction?: LoadServerActionFunction;
|
|
1952
1990
|
onError?: (error: unknown) => void;
|
|
1953
1991
|
request: Request;
|
|
@@ -2187,4 +2225,4 @@ interface MemorySessionStorageOptions {
|
|
|
2187
2225
|
*/
|
|
2188
2226
|
declare function createMemorySessionStorage<Data = SessionData, FlashData = Data>({ cookie }?: MemorySessionStorageOptions): SessionStorage<Data, FlashData>;
|
|
2189
2227
|
|
|
2190
|
-
export { type Cookie, type CookieOptions, type CookieSignatureOptions, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isSession, matchRoutes, redirect, redirectDocument, replace, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, type LoadServerActionFunction as unstable_LoadServerActionFunction, type
|
|
2228
|
+
export { type Cookie, type CookieOptions, type CookieSignatureOptions, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type MiddlewareFunction, type MiddlewareNextFunction, type RouterContext, RouterContextProvider, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createContext, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isRouteErrorResponse, isSession, matchRoutes, redirect, redirectDocument, replace, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, type LoadServerActionFunction as unstable_LoadServerActionFunction, type RSCManifestPayload as unstable_RSCManifestPayload, type RSCMatch as unstable_RSCMatch, type RSCPayload as unstable_RSCPayload, type RSCRenderPayload as unstable_RSCRenderPayload, type RSCRouteConfig as unstable_RSCRouteConfig, type RSCRouteConfigEntry as unstable_RSCRouteConfigEntry, type RSCRouteManifest as unstable_RSCRouteManifest, type RSCRouteMatch as unstable_RSCRouteMatch, matchRSCServerRequest as unstable_matchRSCServerRequest };
|