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
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.9.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -362,13 +362,13 @@ function createBrowserURLImpl(to, isAbsolute = false) {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
// lib/router/utils.ts
|
|
365
|
-
function
|
|
365
|
+
function createContext(defaultValue) {
|
|
366
366
|
return { defaultValue };
|
|
367
367
|
}
|
|
368
368
|
var _map;
|
|
369
|
-
var
|
|
369
|
+
var RouterContextProvider = class {
|
|
370
370
|
/**
|
|
371
|
-
* Create a new `
|
|
371
|
+
* Create a new `RouterContextProvider` instance
|
|
372
372
|
* @param init An optional initial context map to populate the provider with
|
|
373
373
|
*/
|
|
374
374
|
constructor(init) {
|
|
@@ -428,7 +428,7 @@ var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([
|
|
|
428
428
|
"path",
|
|
429
429
|
"id",
|
|
430
430
|
"index",
|
|
431
|
-
"
|
|
431
|
+
"middleware",
|
|
432
432
|
"children"
|
|
433
433
|
]);
|
|
434
434
|
function isUnsupportedLazyRouteFunctionKey(key) {
|
|
@@ -1466,7 +1466,7 @@ function createRouter(init) {
|
|
|
1466
1466
|
pendingNavigationController.signal,
|
|
1467
1467
|
opts && opts.submission
|
|
1468
1468
|
);
|
|
1469
|
-
let scopedContext = init.
|
|
1469
|
+
let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();
|
|
1470
1470
|
let pendingActionResult;
|
|
1471
1471
|
if (opts && opts.pendingError) {
|
|
1472
1472
|
pendingActionResult = [
|
|
@@ -1756,7 +1756,7 @@ function createRouter(init) {
|
|
|
1756
1756
|
pendingActionResult
|
|
1757
1757
|
);
|
|
1758
1758
|
pendingNavigationLoadId = ++incrementingLoadId;
|
|
1759
|
-
if (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some((m) => m.route.
|
|
1759
|
+
if (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some((m) => m.route.middleware) && revalidatingFetchers.length === 0) {
|
|
1760
1760
|
let updatedFetchers2 = markFetchRedirectsDone();
|
|
1761
1761
|
completeNavigation(
|
|
1762
1762
|
location,
|
|
@@ -1910,7 +1910,7 @@ function createRouter(init) {
|
|
|
1910
1910
|
setFetcherError(key, routeId, error, { flushSync });
|
|
1911
1911
|
return;
|
|
1912
1912
|
}
|
|
1913
|
-
let scopedContext = init.
|
|
1913
|
+
let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();
|
|
1914
1914
|
let preventScrollReset = (opts && opts.preventScrollReset) === true;
|
|
1915
1915
|
if (submission && isMutationMethod(submission.formMethod)) {
|
|
1916
1916
|
await handleFetcherAction(
|
|
@@ -2761,13 +2761,13 @@ function createStaticHandler(routes, opts) {
|
|
|
2761
2761
|
skipLoaderErrorBubbling,
|
|
2762
2762
|
skipRevalidation,
|
|
2763
2763
|
dataStrategy,
|
|
2764
|
-
|
|
2764
|
+
generateMiddlewareResponse
|
|
2765
2765
|
} = {}) {
|
|
2766
2766
|
let url = new URL(request.url);
|
|
2767
2767
|
let method = request.method;
|
|
2768
2768
|
let location = createLocation("", createPath(url), null, "default");
|
|
2769
2769
|
let matches = matchRoutes(dataRoutes, location, basename);
|
|
2770
|
-
requestContext = requestContext != null ? requestContext : new
|
|
2770
|
+
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
2771
2771
|
if (!isValidMethod(method) && method !== "HEAD") {
|
|
2772
2772
|
let error = getInternalRouterError(405, { method });
|
|
2773
2773
|
let { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes);
|
|
@@ -2805,8 +2805,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2805
2805
|
}
|
|
2806
2806
|
if (generateMiddlewareResponse) {
|
|
2807
2807
|
invariant(
|
|
2808
|
-
requestContext instanceof
|
|
2809
|
-
"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `
|
|
2808
|
+
requestContext instanceof RouterContextProvider,
|
|
2809
|
+
"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`"
|
|
2810
2810
|
);
|
|
2811
2811
|
try {
|
|
2812
2812
|
await loadLazyMiddlewareForMatches(
|
|
@@ -2835,7 +2835,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2835
2835
|
dataStrategy || null,
|
|
2836
2836
|
skipLoaderErrorBubbling === true,
|
|
2837
2837
|
null,
|
|
2838
|
-
"filterMatchesToLoad" in opts2 ? opts2.filterMatchesToLoad ?? null : null,
|
|
2838
|
+
"filterMatchesToLoad" in opts2 ? opts2.filterMatchesToLoad ?? null : filterMatchesToLoad ?? null,
|
|
2839
2839
|
skipRevalidation === true
|
|
2840
2840
|
);
|
|
2841
2841
|
if (isResponse(result2)) {
|
|
@@ -2933,13 +2933,13 @@ function createStaticHandler(routes, opts) {
|
|
|
2933
2933
|
routeId,
|
|
2934
2934
|
requestContext,
|
|
2935
2935
|
dataStrategy,
|
|
2936
|
-
|
|
2936
|
+
generateMiddlewareResponse
|
|
2937
2937
|
} = {}) {
|
|
2938
2938
|
let url = new URL(request.url);
|
|
2939
2939
|
let method = request.method;
|
|
2940
2940
|
let location = createLocation("", createPath(url), null, "default");
|
|
2941
2941
|
let matches = matchRoutes(dataRoutes, location, basename);
|
|
2942
|
-
requestContext = requestContext != null ? requestContext : new
|
|
2942
|
+
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
2943
2943
|
if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
|
|
2944
2944
|
throw getInternalRouterError(405, { method });
|
|
2945
2945
|
} else if (!matches) {
|
|
@@ -2956,8 +2956,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2956
2956
|
}
|
|
2957
2957
|
if (generateMiddlewareResponse) {
|
|
2958
2958
|
invariant(
|
|
2959
|
-
requestContext instanceof
|
|
2960
|
-
"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `
|
|
2959
|
+
requestContext instanceof RouterContextProvider,
|
|
2960
|
+
"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`"
|
|
2961
2961
|
);
|
|
2962
2962
|
await loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2);
|
|
2963
2963
|
let response = await runServerMiddlewarePipeline(
|
|
@@ -3947,11 +3947,11 @@ function isNonNullable(value) {
|
|
|
3947
3947
|
}
|
|
3948
3948
|
function loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2) {
|
|
3949
3949
|
let promises = matches.map(({ route }) => {
|
|
3950
|
-
if (typeof route.lazy !== "object" || !route.lazy.
|
|
3950
|
+
if (typeof route.lazy !== "object" || !route.lazy.middleware) {
|
|
3951
3951
|
return void 0;
|
|
3952
3952
|
}
|
|
3953
3953
|
return loadLazyRouteProperty({
|
|
3954
|
-
key: "
|
|
3954
|
+
key: "middleware",
|
|
3955
3955
|
route,
|
|
3956
3956
|
manifest,
|
|
3957
3957
|
mapRouteProperties: mapRouteProperties2
|
|
@@ -3969,7 +3969,7 @@ async function defaultDataStrategy(args) {
|
|
|
3969
3969
|
return keyedResults;
|
|
3970
3970
|
}
|
|
3971
3971
|
async function defaultDataStrategyWithMiddleware(args) {
|
|
3972
|
-
if (!args.matches.some((m) => m.route.
|
|
3972
|
+
if (!args.matches.some((m) => m.route.middleware)) {
|
|
3973
3973
|
return defaultDataStrategy(args);
|
|
3974
3974
|
}
|
|
3975
3975
|
return runClientMiddlewarePipeline(args, () => defaultDataStrategy(args));
|
|
@@ -4023,7 +4023,7 @@ function runClientMiddlewarePipeline(args, handler) {
|
|
|
4023
4023
|
async function runMiddlewarePipeline(args, handler, processResult, isResult, errorHandler) {
|
|
4024
4024
|
let { matches, request, params, context } = args;
|
|
4025
4025
|
let tuples = matches.flatMap(
|
|
4026
|
-
(m) => m.route.
|
|
4026
|
+
(m) => m.route.middleware ? m.route.middleware.map((fn) => [m.route.id, fn]) : []
|
|
4027
4027
|
);
|
|
4028
4028
|
let result = await callRouteMiddleware(
|
|
4029
4029
|
{ request, params, context },
|
|
@@ -4086,7 +4086,7 @@ async function callRouteMiddleware(args, middlewares, handler, processResult, is
|
|
|
4086
4086
|
}
|
|
4087
4087
|
function getDataStrategyMatchLazyPromises(mapRouteProperties2, manifest, request, match, lazyRoutePropertiesToSkip) {
|
|
4088
4088
|
let lazyMiddlewarePromise = loadLazyRouteProperty({
|
|
4089
|
-
key: "
|
|
4089
|
+
key: "middleware",
|
|
4090
4090
|
route: match.route,
|
|
4091
4091
|
manifest,
|
|
4092
4092
|
mapRouteProperties: mapRouteProperties2
|
|
@@ -4186,9 +4186,9 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4186
4186
|
context: scopedContext,
|
|
4187
4187
|
matches
|
|
4188
4188
|
};
|
|
4189
|
-
let
|
|
4189
|
+
let runClientMiddleware = isStaticHandler ? () => {
|
|
4190
4190
|
throw new Error(
|
|
4191
|
-
"You cannot call `
|
|
4191
|
+
"You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`"
|
|
4192
4192
|
);
|
|
4193
4193
|
} : (cb) => {
|
|
4194
4194
|
let typedDataStrategyArgs = dataStrategyArgs;
|
|
@@ -4196,9 +4196,9 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4196
4196
|
return cb({
|
|
4197
4197
|
...typedDataStrategyArgs,
|
|
4198
4198
|
fetcherKey,
|
|
4199
|
-
|
|
4199
|
+
runClientMiddleware: () => {
|
|
4200
4200
|
throw new Error(
|
|
4201
|
-
"Cannot call `
|
|
4201
|
+
"Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler"
|
|
4202
4202
|
);
|
|
4203
4203
|
}
|
|
4204
4204
|
});
|
|
@@ -4207,7 +4207,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4207
4207
|
let results = await dataStrategyImpl({
|
|
4208
4208
|
...dataStrategyArgs,
|
|
4209
4209
|
fetcherKey,
|
|
4210
|
-
|
|
4210
|
+
runClientMiddleware
|
|
4211
4211
|
});
|
|
4212
4212
|
try {
|
|
4213
4213
|
await Promise.all(
|
|
@@ -4926,6 +4926,7 @@ var FetchersContext = React.createContext(
|
|
|
4926
4926
|
FetchersContext.displayName = "Fetchers";
|
|
4927
4927
|
var AwaitContext = React.createContext(null);
|
|
4928
4928
|
AwaitContext.displayName = "Await";
|
|
4929
|
+
var AwaitContextProvider = (props) => React.createElement(AwaitContext.Provider, props);
|
|
4929
4930
|
var NavigationContext = React.createContext(
|
|
4930
4931
|
null
|
|
4931
4932
|
);
|
|
@@ -5593,7 +5594,7 @@ var hydrationRouteProperties = [
|
|
|
5593
5594
|
function createMemoryRouter(routes, opts) {
|
|
5594
5595
|
return createRouter({
|
|
5595
5596
|
basename: opts?.basename,
|
|
5596
|
-
|
|
5597
|
+
getContext: opts?.getContext,
|
|
5597
5598
|
future: opts?.future,
|
|
5598
5599
|
history: createMemoryHistory({
|
|
5599
5600
|
initialEntries: opts?.initialEntries,
|
|
@@ -6997,9 +6998,6 @@ var ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
|
6997
6998
|
function escapeHtml(html) {
|
|
6998
6999
|
return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
6999
7000
|
}
|
|
7000
|
-
function createHtml(html) {
|
|
7001
|
-
return { __html: html };
|
|
7002
|
-
}
|
|
7003
7001
|
|
|
7004
7002
|
// lib/dom/ssr/invariant.ts
|
|
7005
7003
|
function invariant2(value, message) {
|
|
@@ -7097,7 +7095,7 @@ function getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules
|
|
|
7097
7095
|
ssr,
|
|
7098
7096
|
basename
|
|
7099
7097
|
);
|
|
7100
|
-
return async (args) => args.
|
|
7098
|
+
return async (args) => args.runClientMiddleware(dataStrategy);
|
|
7101
7099
|
}
|
|
7102
7100
|
function getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode, ssr, basename, shouldAllowOptOut = () => true) {
|
|
7103
7101
|
return async (args) => {
|
|
@@ -7893,7 +7891,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
7893
7891
|
Object.assign(dataRoute, {
|
|
7894
7892
|
...dataRoute,
|
|
7895
7893
|
...getRouteComponents(route, routeModule, isSpaMode),
|
|
7896
|
-
|
|
7894
|
+
middleware: routeModule.clientMiddleware,
|
|
7897
7895
|
handle: routeModule.handle,
|
|
7898
7896
|
shouldRevalidate: getShouldRevalidateFunction(
|
|
7899
7897
|
dataRoute.path,
|
|
@@ -8035,17 +8033,14 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
8035
8033
|
}
|
|
8036
8034
|
});
|
|
8037
8035
|
} : void 0,
|
|
8038
|
-
|
|
8039
|
-
let {
|
|
8036
|
+
middleware: route.hasClientMiddleware ? async () => {
|
|
8037
|
+
let { clientMiddleware } = route.clientMiddlewareModule ? await import(
|
|
8040
8038
|
/* @vite-ignore */
|
|
8041
8039
|
/* webpackIgnore: true */
|
|
8042
8040
|
route.clientMiddlewareModule
|
|
8043
8041
|
) : await getLazyRoute();
|
|
8044
|
-
invariant2(
|
|
8045
|
-
|
|
8046
|
-
"No `unstable_clientMiddleware` export found"
|
|
8047
|
-
);
|
|
8048
|
-
return unstable_clientMiddleware;
|
|
8042
|
+
invariant2(clientMiddleware, "No `clientMiddleware` export found");
|
|
8043
|
+
return clientMiddleware;
|
|
8049
8044
|
} : void 0,
|
|
8050
8045
|
shouldRevalidate: async () => {
|
|
8051
8046
|
let lazyRoute = await getLazyRoute();
|
|
@@ -8126,7 +8121,7 @@ async function loadRouteModuleWithBlockingLinks(route, routeModules) {
|
|
|
8126
8121
|
return {
|
|
8127
8122
|
Component: getRouteModuleComponent(routeModule),
|
|
8128
8123
|
ErrorBoundary: routeModule.ErrorBoundary,
|
|
8129
|
-
|
|
8124
|
+
clientMiddleware: routeModule.clientMiddleware,
|
|
8130
8125
|
clientAction: routeModule.clientAction,
|
|
8131
8126
|
clientLoader: routeModule.clientLoader,
|
|
8132
8127
|
handle: routeModule.handle,
|
|
@@ -8678,7 +8673,7 @@ function Meta() {
|
|
|
8678
8673
|
{
|
|
8679
8674
|
key: `script:ld+json:${json}`,
|
|
8680
8675
|
type: "application/ld+json",
|
|
8681
|
-
dangerouslySetInnerHTML: { __html: json }
|
|
8676
|
+
dangerouslySetInnerHTML: { __html: escapeHtml(json) }
|
|
8682
8677
|
}
|
|
8683
8678
|
);
|
|
8684
8679
|
} catch (err) {
|
|
@@ -8783,7 +8778,7 @@ import(${JSON.stringify(manifest.entry.module)});`;
|
|
|
8783
8778
|
{
|
|
8784
8779
|
...scriptProps,
|
|
8785
8780
|
suppressHydrationWarning: true,
|
|
8786
|
-
dangerouslySetInnerHTML:
|
|
8781
|
+
dangerouslySetInnerHTML: { __html: contextScript },
|
|
8787
8782
|
type: void 0
|
|
8788
8783
|
}
|
|
8789
8784
|
), /* @__PURE__ */ React8.createElement(
|
|
@@ -8791,7 +8786,7 @@ import(${JSON.stringify(manifest.entry.module)});`;
|
|
|
8791
8786
|
{
|
|
8792
8787
|
...scriptProps,
|
|
8793
8788
|
suppressHydrationWarning: true,
|
|
8794
|
-
dangerouslySetInnerHTML:
|
|
8789
|
+
dangerouslySetInnerHTML: { __html: routeModulesScript },
|
|
8795
8790
|
type: "module",
|
|
8796
8791
|
async: true
|
|
8797
8792
|
}
|
|
@@ -8969,14 +8964,14 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
|
|
|
8969
8964
|
try {
|
|
8970
8965
|
if (isBrowser) {
|
|
8971
8966
|
window.__reactRouterVersion = // @ts-expect-error
|
|
8972
|
-
"7.
|
|
8967
|
+
"7.9.0-pre.1";
|
|
8973
8968
|
}
|
|
8974
8969
|
} catch (e) {
|
|
8975
8970
|
}
|
|
8976
8971
|
function createBrowserRouter(routes, opts) {
|
|
8977
8972
|
return createRouter({
|
|
8978
8973
|
basename: opts?.basename,
|
|
8979
|
-
|
|
8974
|
+
getContext: opts?.getContext,
|
|
8980
8975
|
future: opts?.future,
|
|
8981
8976
|
history: createBrowserHistory({ window: opts?.window }),
|
|
8982
8977
|
hydrationData: opts?.hydrationData || parseHydrationData(),
|
|
@@ -8991,7 +8986,7 @@ function createBrowserRouter(routes, opts) {
|
|
|
8991
8986
|
function createHashRouter(routes, opts) {
|
|
8992
8987
|
return createRouter({
|
|
8993
8988
|
basename: opts?.basename,
|
|
8994
|
-
|
|
8989
|
+
getContext: opts?.getContext,
|
|
8995
8990
|
future: opts?.future,
|
|
8996
8991
|
history: createHashHistory({ window: opts?.window }),
|
|
8997
8992
|
hydrationData: opts?.hydrationData || parseHydrationData(),
|
|
@@ -9960,7 +9955,7 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
9960
9955
|
},
|
|
9961
9956
|
get future() {
|
|
9962
9957
|
return {
|
|
9963
|
-
|
|
9958
|
+
v8_middleware: false,
|
|
9964
9959
|
...opts?.future
|
|
9965
9960
|
};
|
|
9966
9961
|
},
|
|
@@ -10066,8 +10061,8 @@ export {
|
|
|
10066
10061
|
invariant,
|
|
10067
10062
|
createPath,
|
|
10068
10063
|
parsePath,
|
|
10069
|
-
|
|
10070
|
-
|
|
10064
|
+
createContext,
|
|
10065
|
+
RouterContextProvider,
|
|
10071
10066
|
convertRoutesToDataRoutes,
|
|
10072
10067
|
matchRoutes,
|
|
10073
10068
|
generatePath,
|
|
@@ -10096,6 +10091,7 @@ export {
|
|
|
10096
10091
|
RSCRouterContext,
|
|
10097
10092
|
ViewTransitionContext,
|
|
10098
10093
|
FetchersContext,
|
|
10094
|
+
AwaitContextProvider,
|
|
10099
10095
|
NavigationContext,
|
|
10100
10096
|
LocationContext,
|
|
10101
10097
|
RouteContext,
|
|
@@ -10143,6 +10139,7 @@ export {
|
|
|
10143
10139
|
WithErrorBoundaryProps,
|
|
10144
10140
|
withErrorBoundaryProps,
|
|
10145
10141
|
createSearchParams,
|
|
10142
|
+
escapeHtml,
|
|
10146
10143
|
encode,
|
|
10147
10144
|
createRequestInit,
|
|
10148
10145
|
SingleFetchRedirectSymbol,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.9.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -362,13 +362,13 @@ function createBrowserURLImpl(to, isAbsolute = false) {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
// lib/router/utils.ts
|
|
365
|
-
function
|
|
365
|
+
function createContext(defaultValue) {
|
|
366
366
|
return { defaultValue };
|
|
367
367
|
}
|
|
368
368
|
var _map;
|
|
369
|
-
var
|
|
369
|
+
var RouterContextProvider = class {
|
|
370
370
|
/**
|
|
371
|
-
* Create a new `
|
|
371
|
+
* Create a new `RouterContextProvider` instance
|
|
372
372
|
* @param init An optional initial context map to populate the provider with
|
|
373
373
|
*/
|
|
374
374
|
constructor(init) {
|
|
@@ -428,7 +428,7 @@ var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([
|
|
|
428
428
|
"path",
|
|
429
429
|
"id",
|
|
430
430
|
"index",
|
|
431
|
-
"
|
|
431
|
+
"middleware",
|
|
432
432
|
"children"
|
|
433
433
|
]);
|
|
434
434
|
function isUnsupportedLazyRouteFunctionKey(key) {
|
|
@@ -1466,7 +1466,7 @@ function createRouter(init) {
|
|
|
1466
1466
|
pendingNavigationController.signal,
|
|
1467
1467
|
opts && opts.submission
|
|
1468
1468
|
);
|
|
1469
|
-
let scopedContext = init.
|
|
1469
|
+
let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();
|
|
1470
1470
|
let pendingActionResult;
|
|
1471
1471
|
if (opts && opts.pendingError) {
|
|
1472
1472
|
pendingActionResult = [
|
|
@@ -1756,7 +1756,7 @@ function createRouter(init) {
|
|
|
1756
1756
|
pendingActionResult
|
|
1757
1757
|
);
|
|
1758
1758
|
pendingNavigationLoadId = ++incrementingLoadId;
|
|
1759
|
-
if (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some((m) => m.route.
|
|
1759
|
+
if (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some((m) => m.route.middleware) && revalidatingFetchers.length === 0) {
|
|
1760
1760
|
let updatedFetchers2 = markFetchRedirectsDone();
|
|
1761
1761
|
completeNavigation(
|
|
1762
1762
|
location,
|
|
@@ -1910,7 +1910,7 @@ function createRouter(init) {
|
|
|
1910
1910
|
setFetcherError(key, routeId, error, { flushSync });
|
|
1911
1911
|
return;
|
|
1912
1912
|
}
|
|
1913
|
-
let scopedContext = init.
|
|
1913
|
+
let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();
|
|
1914
1914
|
let preventScrollReset = (opts && opts.preventScrollReset) === true;
|
|
1915
1915
|
if (submission && isMutationMethod(submission.formMethod)) {
|
|
1916
1916
|
await handleFetcherAction(
|
|
@@ -2761,13 +2761,13 @@ function createStaticHandler(routes, opts) {
|
|
|
2761
2761
|
skipLoaderErrorBubbling,
|
|
2762
2762
|
skipRevalidation,
|
|
2763
2763
|
dataStrategy,
|
|
2764
|
-
|
|
2764
|
+
generateMiddlewareResponse
|
|
2765
2765
|
} = {}) {
|
|
2766
2766
|
let url = new URL(request.url);
|
|
2767
2767
|
let method = request.method;
|
|
2768
2768
|
let location = createLocation("", createPath(url), null, "default");
|
|
2769
2769
|
let matches = matchRoutes(dataRoutes, location, basename);
|
|
2770
|
-
requestContext = requestContext != null ? requestContext : new
|
|
2770
|
+
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
2771
2771
|
if (!isValidMethod(method) && method !== "HEAD") {
|
|
2772
2772
|
let error = getInternalRouterError(405, { method });
|
|
2773
2773
|
let { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes);
|
|
@@ -2805,8 +2805,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2805
2805
|
}
|
|
2806
2806
|
if (generateMiddlewareResponse) {
|
|
2807
2807
|
invariant(
|
|
2808
|
-
requestContext instanceof
|
|
2809
|
-
"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `
|
|
2808
|
+
requestContext instanceof RouterContextProvider,
|
|
2809
|
+
"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`"
|
|
2810
2810
|
);
|
|
2811
2811
|
try {
|
|
2812
2812
|
await loadLazyMiddlewareForMatches(
|
|
@@ -2835,7 +2835,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2835
2835
|
dataStrategy || null,
|
|
2836
2836
|
skipLoaderErrorBubbling === true,
|
|
2837
2837
|
null,
|
|
2838
|
-
"filterMatchesToLoad" in opts2 ? _nullishCoalesce(opts2.filterMatchesToLoad, () => ( null)) : null,
|
|
2838
|
+
"filterMatchesToLoad" in opts2 ? _nullishCoalesce(opts2.filterMatchesToLoad, () => ( null)) : _nullishCoalesce(filterMatchesToLoad, () => ( null)),
|
|
2839
2839
|
skipRevalidation === true
|
|
2840
2840
|
);
|
|
2841
2841
|
if (isResponse(result2)) {
|
|
@@ -2933,13 +2933,13 @@ function createStaticHandler(routes, opts) {
|
|
|
2933
2933
|
routeId,
|
|
2934
2934
|
requestContext,
|
|
2935
2935
|
dataStrategy,
|
|
2936
|
-
|
|
2936
|
+
generateMiddlewareResponse
|
|
2937
2937
|
} = {}) {
|
|
2938
2938
|
let url = new URL(request.url);
|
|
2939
2939
|
let method = request.method;
|
|
2940
2940
|
let location = createLocation("", createPath(url), null, "default");
|
|
2941
2941
|
let matches = matchRoutes(dataRoutes, location, basename);
|
|
2942
|
-
requestContext = requestContext != null ? requestContext : new
|
|
2942
|
+
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
2943
2943
|
if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
|
|
2944
2944
|
throw getInternalRouterError(405, { method });
|
|
2945
2945
|
} else if (!matches) {
|
|
@@ -2956,8 +2956,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2956
2956
|
}
|
|
2957
2957
|
if (generateMiddlewareResponse) {
|
|
2958
2958
|
invariant(
|
|
2959
|
-
requestContext instanceof
|
|
2960
|
-
"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `
|
|
2959
|
+
requestContext instanceof RouterContextProvider,
|
|
2960
|
+
"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`"
|
|
2961
2961
|
);
|
|
2962
2962
|
await loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties);
|
|
2963
2963
|
let response = await runServerMiddlewarePipeline(
|
|
@@ -3947,11 +3947,11 @@ function isNonNullable(value) {
|
|
|
3947
3947
|
}
|
|
3948
3948
|
function loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties) {
|
|
3949
3949
|
let promises = matches.map(({ route }) => {
|
|
3950
|
-
if (typeof route.lazy !== "object" || !route.lazy.
|
|
3950
|
+
if (typeof route.lazy !== "object" || !route.lazy.middleware) {
|
|
3951
3951
|
return void 0;
|
|
3952
3952
|
}
|
|
3953
3953
|
return loadLazyRouteProperty({
|
|
3954
|
-
key: "
|
|
3954
|
+
key: "middleware",
|
|
3955
3955
|
route,
|
|
3956
3956
|
manifest,
|
|
3957
3957
|
mapRouteProperties
|
|
@@ -3969,7 +3969,7 @@ async function defaultDataStrategy(args) {
|
|
|
3969
3969
|
return keyedResults;
|
|
3970
3970
|
}
|
|
3971
3971
|
async function defaultDataStrategyWithMiddleware(args) {
|
|
3972
|
-
if (!args.matches.some((m) => m.route.
|
|
3972
|
+
if (!args.matches.some((m) => m.route.middleware)) {
|
|
3973
3973
|
return defaultDataStrategy(args);
|
|
3974
3974
|
}
|
|
3975
3975
|
return runClientMiddlewarePipeline(args, () => defaultDataStrategy(args));
|
|
@@ -4023,7 +4023,7 @@ function runClientMiddlewarePipeline(args, handler) {
|
|
|
4023
4023
|
async function runMiddlewarePipeline(args, handler, processResult, isResult, errorHandler) {
|
|
4024
4024
|
let { matches, request, params, context } = args;
|
|
4025
4025
|
let tuples = matches.flatMap(
|
|
4026
|
-
(m) => m.route.
|
|
4026
|
+
(m) => m.route.middleware ? m.route.middleware.map((fn) => [m.route.id, fn]) : []
|
|
4027
4027
|
);
|
|
4028
4028
|
let result = await callRouteMiddleware(
|
|
4029
4029
|
{ request, params, context },
|
|
@@ -4086,7 +4086,7 @@ async function callRouteMiddleware(args, middlewares, handler, processResult, is
|
|
|
4086
4086
|
}
|
|
4087
4087
|
function getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request, match, lazyRoutePropertiesToSkip) {
|
|
4088
4088
|
let lazyMiddlewarePromise = loadLazyRouteProperty({
|
|
4089
|
-
key: "
|
|
4089
|
+
key: "middleware",
|
|
4090
4090
|
route: match.route,
|
|
4091
4091
|
manifest,
|
|
4092
4092
|
mapRouteProperties
|
|
@@ -4186,9 +4186,9 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4186
4186
|
context: scopedContext,
|
|
4187
4187
|
matches
|
|
4188
4188
|
};
|
|
4189
|
-
let
|
|
4189
|
+
let runClientMiddleware = isStaticHandler ? () => {
|
|
4190
4190
|
throw new Error(
|
|
4191
|
-
"You cannot call `
|
|
4191
|
+
"You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`"
|
|
4192
4192
|
);
|
|
4193
4193
|
} : (cb) => {
|
|
4194
4194
|
let typedDataStrategyArgs = dataStrategyArgs;
|
|
@@ -4196,9 +4196,9 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4196
4196
|
return cb({
|
|
4197
4197
|
...typedDataStrategyArgs,
|
|
4198
4198
|
fetcherKey,
|
|
4199
|
-
|
|
4199
|
+
runClientMiddleware: () => {
|
|
4200
4200
|
throw new Error(
|
|
4201
|
-
"Cannot call `
|
|
4201
|
+
"Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler"
|
|
4202
4202
|
);
|
|
4203
4203
|
}
|
|
4204
4204
|
});
|
|
@@ -4207,7 +4207,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4207
4207
|
let results = await dataStrategyImpl({
|
|
4208
4208
|
...dataStrategyArgs,
|
|
4209
4209
|
fetcherKey,
|
|
4210
|
-
|
|
4210
|
+
runClientMiddleware
|
|
4211
4211
|
});
|
|
4212
4212
|
try {
|
|
4213
4213
|
await Promise.all(
|
|
@@ -5608,9 +5608,6 @@ var ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
|
5608
5608
|
function escapeHtml(html) {
|
|
5609
5609
|
return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
5610
5610
|
}
|
|
5611
|
-
function createHtml(html) {
|
|
5612
|
-
return { __html: html };
|
|
5613
|
-
}
|
|
5614
5611
|
|
|
5615
5612
|
// lib/dom/ssr/invariant.ts
|
|
5616
5613
|
function invariant2(value, message) {
|
|
@@ -5708,7 +5705,7 @@ function getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules
|
|
|
5708
5705
|
ssr,
|
|
5709
5706
|
basename
|
|
5710
5707
|
);
|
|
5711
|
-
return async (args) => args.
|
|
5708
|
+
return async (args) => args.runClientMiddleware(dataStrategy);
|
|
5712
5709
|
}
|
|
5713
5710
|
function getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode, ssr, basename, shouldAllowOptOut = () => true) {
|
|
5714
5711
|
return async (args) => {
|
|
@@ -6107,6 +6104,7 @@ var FetchersContext = React2.createContext(
|
|
|
6107
6104
|
FetchersContext.displayName = "Fetchers";
|
|
6108
6105
|
var AwaitContext = React2.createContext(null);
|
|
6109
6106
|
AwaitContext.displayName = "Await";
|
|
6107
|
+
var AwaitContextProvider = (props) => React2.createElement(AwaitContext.Provider, props);
|
|
6110
6108
|
var NavigationContext = React2.createContext(
|
|
6111
6109
|
null
|
|
6112
6110
|
);
|
|
@@ -7130,7 +7128,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
7130
7128
|
Object.assign(dataRoute, {
|
|
7131
7129
|
...dataRoute,
|
|
7132
7130
|
...getRouteComponents(route, routeModule, isSpaMode),
|
|
7133
|
-
|
|
7131
|
+
middleware: routeModule.clientMiddleware,
|
|
7134
7132
|
handle: routeModule.handle,
|
|
7135
7133
|
shouldRevalidate: getShouldRevalidateFunction(
|
|
7136
7134
|
dataRoute.path,
|
|
@@ -7272,17 +7270,14 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
7272
7270
|
}
|
|
7273
7271
|
});
|
|
7274
7272
|
} : void 0,
|
|
7275
|
-
|
|
7276
|
-
let {
|
|
7273
|
+
middleware: route.hasClientMiddleware ? async () => {
|
|
7274
|
+
let { clientMiddleware } = route.clientMiddlewareModule ? await Promise.resolve().then(() => _interopRequireWildcard(require(
|
|
7277
7275
|
/* @vite-ignore */
|
|
7278
7276
|
/* webpackIgnore: true */
|
|
7279
7277
|
route.clientMiddlewareModule
|
|
7280
7278
|
))) : await getLazyRoute();
|
|
7281
|
-
invariant2(
|
|
7282
|
-
|
|
7283
|
-
"No `unstable_clientMiddleware` export found"
|
|
7284
|
-
);
|
|
7285
|
-
return unstable_clientMiddleware;
|
|
7279
|
+
invariant2(clientMiddleware, "No `clientMiddleware` export found");
|
|
7280
|
+
return clientMiddleware;
|
|
7286
7281
|
} : void 0,
|
|
7287
7282
|
shouldRevalidate: async () => {
|
|
7288
7283
|
let lazyRoute = await getLazyRoute();
|
|
@@ -7363,7 +7358,7 @@ async function loadRouteModuleWithBlockingLinks(route, routeModules) {
|
|
|
7363
7358
|
return {
|
|
7364
7359
|
Component: getRouteModuleComponent(routeModule),
|
|
7365
7360
|
ErrorBoundary: routeModule.ErrorBoundary,
|
|
7366
|
-
|
|
7361
|
+
clientMiddleware: routeModule.clientMiddleware,
|
|
7367
7362
|
clientAction: routeModule.clientAction,
|
|
7368
7363
|
clientLoader: routeModule.clientLoader,
|
|
7369
7364
|
handle: routeModule.handle,
|
|
@@ -7915,7 +7910,7 @@ function Meta() {
|
|
|
7915
7910
|
{
|
|
7916
7911
|
key: `script:ld+json:${json}`,
|
|
7917
7912
|
type: "application/ld+json",
|
|
7918
|
-
dangerouslySetInnerHTML: { __html: json }
|
|
7913
|
+
dangerouslySetInnerHTML: { __html: escapeHtml(json) }
|
|
7919
7914
|
}
|
|
7920
7915
|
);
|
|
7921
7916
|
} catch (err) {
|
|
@@ -8020,7 +8015,7 @@ import(${JSON.stringify(manifest.entry.module)});`;
|
|
|
8020
8015
|
{
|
|
8021
8016
|
...scriptProps,
|
|
8022
8017
|
suppressHydrationWarning: true,
|
|
8023
|
-
dangerouslySetInnerHTML:
|
|
8018
|
+
dangerouslySetInnerHTML: { __html: contextScript },
|
|
8024
8019
|
type: void 0
|
|
8025
8020
|
}
|
|
8026
8021
|
), /* @__PURE__ */ React7.createElement(
|
|
@@ -8028,7 +8023,7 @@ import(${JSON.stringify(manifest.entry.module)});`;
|
|
|
8028
8023
|
{
|
|
8029
8024
|
...scriptProps,
|
|
8030
8025
|
suppressHydrationWarning: true,
|
|
8031
|
-
dangerouslySetInnerHTML:
|
|
8026
|
+
dangerouslySetInnerHTML: { __html: routeModulesScript },
|
|
8032
8027
|
type: "module",
|
|
8033
8028
|
async: true
|
|
8034
8029
|
}
|
|
@@ -8301,4 +8296,6 @@ function BoundaryShell({
|
|
|
8301
8296
|
|
|
8302
8297
|
|
|
8303
8298
|
|
|
8304
|
-
|
|
8299
|
+
|
|
8300
|
+
|
|
8301
|
+
exports.Action = Action; exports.createMemoryHistory = createMemoryHistory; exports.createBrowserHistory = createBrowserHistory; exports.createHashHistory = createHashHistory; exports.invariant = invariant; exports.warning = warning; exports.createPath = createPath; exports.parsePath = parsePath; exports.createContext = createContext; exports.RouterContextProvider = RouterContextProvider; exports.convertRoutesToDataRoutes = convertRoutesToDataRoutes; exports.matchRoutes = matchRoutes; exports.generatePath = generatePath; exports.matchPath = matchPath; exports.stripBasename = stripBasename; exports.resolvePath = resolvePath; exports.getResolveToMatches = getResolveToMatches; exports.resolveTo = resolveTo; exports.joinPaths = joinPaths; exports.data = data; exports.redirect = redirect; exports.redirectDocument = redirectDocument; exports.replace = replace; exports.ErrorResponseImpl = ErrorResponseImpl; exports.isRouteErrorResponse = isRouteErrorResponse; exports.escapeHtml = escapeHtml; exports.encode = encode; exports.IDLE_NAVIGATION = IDLE_NAVIGATION; exports.IDLE_FETCHER = IDLE_FETCHER; exports.IDLE_BLOCKER = IDLE_BLOCKER; exports.createRouter = createRouter; exports.createStaticHandler = createStaticHandler; exports.getStaticContextFromError = getStaticContextFromError; exports.isDataWithResponseInit = isDataWithResponseInit; exports.isResponse = isResponse; exports.isRedirectStatusCode = isRedirectStatusCode; exports.isRedirectResponse = isRedirectResponse; exports.isMutationMethod = isMutationMethod; exports.createRequestInit = createRequestInit; exports.SingleFetchRedirectSymbol = SingleFetchRedirectSymbol; exports.SINGLE_FETCH_REDIRECT_STATUS = SINGLE_FETCH_REDIRECT_STATUS; exports.NO_BODY_STATUS_CODES = NO_BODY_STATUS_CODES; exports.StreamTransfer = StreamTransfer; exports.getTurboStreamSingleFetchDataStrategy = getTurboStreamSingleFetchDataStrategy; exports.getSingleFetchDataStrategyImpl = getSingleFetchDataStrategyImpl; exports.stripIndexParam = stripIndexParam; exports.singleFetchUrl = singleFetchUrl; exports.decodeViaTurboStream = decodeViaTurboStream; exports.DataRouterContext = DataRouterContext; exports.DataRouterStateContext = DataRouterStateContext; exports.RSCRouterContext = RSCRouterContext; exports.ViewTransitionContext = ViewTransitionContext; exports.FetchersContext = FetchersContext; exports.AwaitContext = AwaitContext; exports.AwaitContextProvider = AwaitContextProvider; exports.NavigationContext = NavigationContext; exports.LocationContext = LocationContext; exports.RouteContext = RouteContext; exports.ENABLE_DEV_WARNINGS = ENABLE_DEV_WARNINGS; exports.warnOnce = warnOnce; exports.useHref = useHref; exports.useInRouterContext = useInRouterContext; exports.useLocation = useLocation; exports.useNavigationType = useNavigationType; exports.useMatch = useMatch; exports.useNavigate = useNavigate; exports.useOutletContext = useOutletContext; exports.useOutlet = useOutlet; exports.useParams = useParams; exports.useResolvedPath = useResolvedPath; exports.useRoutes = useRoutes; exports.useRoutesImpl = useRoutesImpl; exports._renderMatches = _renderMatches; exports.useRouteId = useRouteId; exports.useNavigation = useNavigation; exports.useRevalidator = useRevalidator; exports.useMatches = useMatches; exports.useLoaderData = useLoaderData; exports.useRouteLoaderData = useRouteLoaderData; exports.useActionData = useActionData; exports.useRouteError = useRouteError; exports.useAsyncValue = useAsyncValue; exports.useAsyncError = useAsyncError; exports.useBlocker = useBlocker; exports.RemixErrorBoundary = RemixErrorBoundary; exports.createServerRoutes = createServerRoutes; exports.createClientRoutesWithHMRRevalidationOptOut = createClientRoutesWithHMRRevalidationOptOut; exports.noActionDefinedError = noActionDefinedError; exports.createClientRoutes = createClientRoutes; exports.shouldHydrateRouteLoader = shouldHydrateRouteLoader; exports.getPatchRoutesOnNavigationFunction = getPatchRoutesOnNavigationFunction; exports.useFogOFWarDiscovery = useFogOFWarDiscovery; exports.getManifestPath = getManifestPath; exports.FrameworkContext = FrameworkContext; exports.usePrefetchBehavior = usePrefetchBehavior; exports.CRITICAL_CSS_DATA_ATTRIBUTE = CRITICAL_CSS_DATA_ATTRIBUTE; exports.Links = Links; exports.PrefetchPageLinks = PrefetchPageLinks; exports.Meta = Meta; exports.setIsHydrated = setIsHydrated; exports.Scripts = Scripts; exports.mergeRefs = mergeRefs;
|