react-router 7.14.1 → 7.15.0
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 +105 -0
- package/dist/development/{browser-D-3-U2Jj.d.mts → browser-CRsXgNrY.d.mts} +2 -2
- package/dist/{production/browser-D-3-U2Jj.d.mts → development/browser-wDl1FZEL.d.ts} +2 -2
- package/dist/{production/chunk-3SUPTI2U.js → development/chunk-2D5H3HU3.js} +7 -7
- package/dist/development/{chunk-OE4NN4TA.mjs → chunk-5KNZJZUH.mjs} +362 -213
- package/dist/development/{chunk-YMKMFAYZ.js → chunk-AM3XM4LS.js} +314 -172
- package/dist/development/{chunk-BFXCU3MI.mjs → chunk-RMD3H4O3.mjs} +81 -62
- package/dist/development/{chunk-3F6IB66O.js → chunk-Z5YQYACE.js} +146 -139
- package/dist/{production/context-BzhbVly6.d.mts → development/context-BQs41HrG.d.mts} +94 -42
- package/dist/development/{routeModules-CM_clkdE.d.ts → data-BVUf681J.d.mts} +89 -56
- package/dist/{production/routeModules-CM_clkdE.d.ts → development/data-BqZ2x964.d.ts} +79 -46
- package/dist/development/dom-export.d.mts +9 -9
- package/dist/development/dom-export.d.ts +9 -9
- package/dist/development/dom-export.js +37 -40
- package/dist/development/dom-export.mjs +12 -15
- package/dist/development/{index-react-server-client-CimaPp9o.d.ts → index-react-server-client-CSv-KZBk.d.ts} +123 -121
- package/dist/{production/index-react-server-client-WSaoxloq.d.mts → development/index-react-server-client-Ck_yZ1qL.d.mts} +102 -100
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +3 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +107 -36
- package/dist/development/index-react-server.d.ts +107 -36
- package/dist/development/index-react-server.js +60 -33
- package/dist/development/index-react-server.mjs +60 -33
- package/dist/development/index.d.mts +11 -11
- package/dist/development/index.d.ts +11 -11
- package/dist/development/index.js +174 -155
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-CMVbvxj9.d.ts → development/instrumentation-DlJ2QV7d.d.ts} +73 -21
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-D1WlEpq9.d.ts → register-Bsscfj79.d.ts} +1 -1
- package/dist/{production/register-D1WlEpq9.d.ts → development/register-Df8okEea.d.mts} +1 -1
- package/dist/production/{browser-CtktEGQs.d.ts → browser-CRsXgNrY.d.mts} +2 -2
- package/dist/{development/browser-CtktEGQs.d.ts → production/browser-wDl1FZEL.d.ts} +2 -2
- package/dist/production/{chunk-G5ZWO7Q6.mjs → chunk-23ZOHYE5.mjs} +81 -62
- package/dist/{development/chunk-7VLQJKNG.js → production/chunk-7YXKJMLN.js} +7 -7
- package/dist/production/{chunk-SPR7R4GU.mjs → chunk-GM3PW4GX.mjs} +362 -213
- package/dist/production/{chunk-UVEQGZIH.js → chunk-LCJTIOKZ.js} +314 -172
- package/dist/production/{chunk-LIOP3ILM.js → chunk-YBQJ3ABE.js} +146 -139
- package/dist/{development/context-BzhbVly6.d.mts → production/context-BQs41HrG.d.mts} +94 -42
- package/dist/{development/routeModules-Djumx26z.d.mts → production/data-BVUf681J.d.mts} +79 -46
- package/dist/production/{routeModules-Djumx26z.d.mts → data-BqZ2x964.d.ts} +89 -56
- package/dist/production/dom-export.d.mts +9 -9
- package/dist/production/dom-export.d.ts +9 -9
- package/dist/production/dom-export.js +37 -40
- package/dist/production/dom-export.mjs +12 -15
- package/dist/production/{index-react-server-client-CimaPp9o.d.ts → index-react-server-client-CSv-KZBk.d.ts} +123 -121
- package/dist/{development/index-react-server-client-WSaoxloq.d.mts → production/index-react-server-client-Ck_yZ1qL.d.mts} +102 -100
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +3 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +107 -36
- package/dist/production/index-react-server.d.ts +107 -36
- package/dist/production/index-react-server.js +60 -33
- package/dist/production/index-react-server.mjs +60 -33
- package/dist/production/index.d.mts +11 -11
- package/dist/production/index.d.ts +11 -11
- package/dist/production/index.js +174 -155
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-CMVbvxj9.d.ts → production/instrumentation-DlJ2QV7d.d.ts} +73 -21
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-aE9ob3TK.d.mts → production/register-Bsscfj79.d.ts} +1 -1
- package/dist/production/{register-aE9ob3TK.d.mts → register-Df8okEea.d.mts} +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v7.
|
|
30
|
+
* react-router v7.15.0
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -61,7 +61,7 @@ function warning(cond, message) {
|
|
|
61
61
|
function createKey() {
|
|
62
62
|
return Math.random().toString(36).substring(2, 10);
|
|
63
63
|
}
|
|
64
|
-
function createLocation(current, to, state = null, key,
|
|
64
|
+
function createLocation(current, to, state = null, key, mask) {
|
|
65
65
|
let location = {
|
|
66
66
|
pathname: typeof current === "string" ? current : current.pathname,
|
|
67
67
|
search: "",
|
|
@@ -73,7 +73,7 @@ function createLocation(current, to, state = null, key, unstable_mask) {
|
|
|
73
73
|
// But that's a pretty big refactor to the current test suite so going to
|
|
74
74
|
// keep as is for the time being and just let any incoming keys take precedence
|
|
75
75
|
key: to && to.key || key || createKey(),
|
|
76
|
-
|
|
76
|
+
mask
|
|
77
77
|
};
|
|
78
78
|
return location;
|
|
79
79
|
}
|
|
@@ -253,11 +253,11 @@ async function recurseRight(impls, info, handler, index) {
|
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
function getHandlerInfo(args) {
|
|
256
|
-
let { request, context, params,
|
|
256
|
+
let { request, context, params, pattern } = args;
|
|
257
257
|
return {
|
|
258
258
|
request: getReadonlyRequest(request),
|
|
259
259
|
params: { ...params },
|
|
260
|
-
|
|
260
|
+
pattern,
|
|
261
261
|
context: getReadonlyContext(context)
|
|
262
262
|
};
|
|
263
263
|
}
|
|
@@ -427,17 +427,16 @@ function mergeRouteUpdates(route, updates) {
|
|
|
427
427
|
function matchRoutes(routes, locationArg, basename = "/") {
|
|
428
428
|
return matchRoutesImpl(routes, locationArg, basename, false);
|
|
429
429
|
}
|
|
430
|
-
function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
|
|
430
|
+
function matchRoutesImpl(routes, locationArg, basename, allowPartial, precomputedBranches) {
|
|
431
431
|
let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
|
|
432
432
|
let pathname = stripBasename(location.pathname || "/", basename);
|
|
433
433
|
if (pathname == null) {
|
|
434
434
|
return null;
|
|
435
435
|
}
|
|
436
|
-
let branches =
|
|
437
|
-
rankRouteBranches(branches);
|
|
436
|
+
let branches = precomputedBranches ?? flattenAndRankRoutes(routes);
|
|
438
437
|
let matches = null;
|
|
438
|
+
let decoded = decodePath(pathname);
|
|
439
439
|
for (let i = 0; matches == null && i < branches.length; ++i) {
|
|
440
|
-
let decoded = decodePath(pathname);
|
|
441
440
|
matches = matchRouteBranch(
|
|
442
441
|
branches[i],
|
|
443
442
|
decoded,
|
|
@@ -457,6 +456,11 @@ function convertRouteMatchToUiMatch(match, loaderData) {
|
|
|
457
456
|
handle: route.handle
|
|
458
457
|
};
|
|
459
458
|
}
|
|
459
|
+
function flattenAndRankRoutes(routes) {
|
|
460
|
+
let branches = flattenRoutes(routes);
|
|
461
|
+
rankRouteBranches(branches);
|
|
462
|
+
return branches;
|
|
463
|
+
}
|
|
460
464
|
function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = false) {
|
|
461
465
|
let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
|
|
462
466
|
let meta = {
|
|
@@ -906,11 +910,10 @@ function createStaticHandler(routes, opts) {
|
|
|
906
910
|
let _mapRouteProperties = opts?.mapRouteProperties || defaultMapRouteProperties;
|
|
907
911
|
let mapRouteProperties = _mapRouteProperties;
|
|
908
912
|
({
|
|
909
|
-
// unused in static handler
|
|
910
913
|
...opts?.future
|
|
911
914
|
});
|
|
912
|
-
if (opts?.
|
|
913
|
-
let instrumentations = opts.
|
|
915
|
+
if (opts?.instrumentations) {
|
|
916
|
+
let instrumentations = opts.instrumentations;
|
|
914
917
|
mapRouteProperties = (route) => {
|
|
915
918
|
return {
|
|
916
919
|
..._mapRouteProperties(route),
|
|
@@ -927,6 +930,7 @@ function createStaticHandler(routes, opts) {
|
|
|
927
930
|
void 0,
|
|
928
931
|
manifest
|
|
929
932
|
);
|
|
933
|
+
let routeBranches = flattenAndRankRoutes(dataRoutes);
|
|
930
934
|
async function query(request, {
|
|
931
935
|
requestContext,
|
|
932
936
|
filterMatchesToLoad,
|
|
@@ -934,12 +938,23 @@ function createStaticHandler(routes, opts) {
|
|
|
934
938
|
skipRevalidation,
|
|
935
939
|
dataStrategy,
|
|
936
940
|
generateMiddlewareResponse,
|
|
937
|
-
|
|
941
|
+
normalizePath
|
|
938
942
|
} = {}) {
|
|
939
|
-
let
|
|
943
|
+
let normalizePathImpl = normalizePath || defaultNormalizePath;
|
|
940
944
|
let method = request.method;
|
|
941
|
-
let location = createLocation(
|
|
942
|
-
|
|
945
|
+
let location = createLocation(
|
|
946
|
+
"",
|
|
947
|
+
normalizePathImpl(request),
|
|
948
|
+
null,
|
|
949
|
+
"default"
|
|
950
|
+
);
|
|
951
|
+
let matches = matchRoutesImpl(
|
|
952
|
+
dataRoutes,
|
|
953
|
+
location,
|
|
954
|
+
basename,
|
|
955
|
+
false,
|
|
956
|
+
routeBranches
|
|
957
|
+
);
|
|
943
958
|
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
944
959
|
if (!isValidMethod(method) && method !== "HEAD") {
|
|
945
960
|
let error = getInternalRouterError(405, { method });
|
|
@@ -991,8 +1006,8 @@ function createStaticHandler(routes, opts) {
|
|
|
991
1006
|
let response = await runServerMiddlewarePipeline(
|
|
992
1007
|
{
|
|
993
1008
|
request,
|
|
994
|
-
|
|
995
|
-
|
|
1009
|
+
url: createDataFunctionUrl(request, location),
|
|
1010
|
+
pattern: getRoutePattern(matches),
|
|
996
1011
|
matches,
|
|
997
1012
|
params: matches[0].params,
|
|
998
1013
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1109,12 +1124,23 @@ function createStaticHandler(routes, opts) {
|
|
|
1109
1124
|
requestContext,
|
|
1110
1125
|
dataStrategy,
|
|
1111
1126
|
generateMiddlewareResponse,
|
|
1112
|
-
|
|
1127
|
+
normalizePath
|
|
1113
1128
|
} = {}) {
|
|
1114
|
-
let
|
|
1129
|
+
let normalizePathImpl = normalizePath || defaultNormalizePath;
|
|
1115
1130
|
let method = request.method;
|
|
1116
|
-
let location = createLocation(
|
|
1117
|
-
|
|
1131
|
+
let location = createLocation(
|
|
1132
|
+
"",
|
|
1133
|
+
normalizePathImpl(request),
|
|
1134
|
+
null,
|
|
1135
|
+
"default"
|
|
1136
|
+
);
|
|
1137
|
+
let matches = matchRoutesImpl(
|
|
1138
|
+
dataRoutes,
|
|
1139
|
+
location,
|
|
1140
|
+
basename,
|
|
1141
|
+
false,
|
|
1142
|
+
routeBranches
|
|
1143
|
+
);
|
|
1118
1144
|
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
1119
1145
|
if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
|
|
1120
1146
|
throw getInternalRouterError(405, { method });
|
|
@@ -1139,8 +1165,8 @@ function createStaticHandler(routes, opts) {
|
|
|
1139
1165
|
let response = await runServerMiddlewarePipeline(
|
|
1140
1166
|
{
|
|
1141
1167
|
request,
|
|
1142
|
-
|
|
1143
|
-
|
|
1168
|
+
url: createDataFunctionUrl(request, location),
|
|
1169
|
+
pattern: getRoutePattern(matches),
|
|
1144
1170
|
matches,
|
|
1145
1171
|
params: matches[0].params,
|
|
1146
1172
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1524,6 +1550,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1524
1550
|
}
|
|
1525
1551
|
return {
|
|
1526
1552
|
dataRoutes,
|
|
1553
|
+
_internalRouteBranches: routeBranches,
|
|
1527
1554
|
query,
|
|
1528
1555
|
queryRoute
|
|
1529
1556
|
};
|
|
@@ -1875,7 +1902,7 @@ function getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request,
|
|
|
1875
1902
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
1876
1903
|
};
|
|
1877
1904
|
}
|
|
1878
|
-
function getDataStrategyMatch(mapRouteProperties, manifest, request, path,
|
|
1905
|
+
function getDataStrategyMatch(mapRouteProperties, manifest, request, path, pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null, callSiteDefaultShouldRevalidate) {
|
|
1879
1906
|
let isUsingNewApi = false;
|
|
1880
1907
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
1881
1908
|
mapRouteProperties,
|
|
@@ -1910,7 +1937,7 @@ function getDataStrategyMatch(mapRouteProperties, manifest, request, path, unsta
|
|
|
1910
1937
|
return callLoaderOrAction({
|
|
1911
1938
|
request,
|
|
1912
1939
|
path,
|
|
1913
|
-
|
|
1940
|
+
pattern,
|
|
1914
1941
|
match,
|
|
1915
1942
|
lazyHandlerPromise: _lazyPromises?.handler,
|
|
1916
1943
|
lazyRoutePromise: _lazyPromises?.route,
|
|
@@ -1960,8 +1987,8 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
|
|
|
1960
1987
|
}
|
|
1961
1988
|
let dataStrategyArgs = {
|
|
1962
1989
|
request,
|
|
1963
|
-
|
|
1964
|
-
|
|
1990
|
+
url: createDataFunctionUrl(request, path),
|
|
1991
|
+
pattern: getRoutePattern(matches),
|
|
1965
1992
|
params: matches[0].params,
|
|
1966
1993
|
context: scopedContext,
|
|
1967
1994
|
matches
|
|
@@ -1990,7 +2017,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
|
|
|
1990
2017
|
async function callLoaderOrAction({
|
|
1991
2018
|
request,
|
|
1992
2019
|
path,
|
|
1993
|
-
|
|
2020
|
+
pattern,
|
|
1994
2021
|
match,
|
|
1995
2022
|
lazyHandlerPromise,
|
|
1996
2023
|
lazyRoutePromise,
|
|
@@ -2017,8 +2044,8 @@ async function callLoaderOrAction({
|
|
|
2017
2044
|
return handler(
|
|
2018
2045
|
{
|
|
2019
2046
|
request,
|
|
2020
|
-
|
|
2021
|
-
|
|
2047
|
+
url: createDataFunctionUrl(request, path),
|
|
2048
|
+
pattern,
|
|
2022
2049
|
params: match.params,
|
|
2023
2050
|
context: scopedContext
|
|
2024
2051
|
},
|
|
@@ -2897,7 +2924,7 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
|
|
|
2897
2924
|
return generateErrorResponse(error);
|
|
2898
2925
|
}
|
|
2899
2926
|
},
|
|
2900
|
-
|
|
2927
|
+
normalizePath: (r) => getNormalizedPath(r, basename, null)
|
|
2901
2928
|
});
|
|
2902
2929
|
return response;
|
|
2903
2930
|
} catch (error) {
|
|
@@ -2953,7 +2980,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
2953
2980
|
skipLoaderErrorBubbling: isDataRequest,
|
|
2954
2981
|
skipRevalidation: isSubmission,
|
|
2955
2982
|
...routeIdsToLoad ? { filterMatchesToLoad: (m) => routeIdsToLoad.includes(m.route.id) } : {},
|
|
2956
|
-
|
|
2983
|
+
normalizePath: (r) => getNormalizedPath(r, basename),
|
|
2957
2984
|
async generateMiddlewareResponse(query) {
|
|
2958
2985
|
let formState;
|
|
2959
2986
|
let skipRevalidation = false;
|
|
@@ -6,7 +6,7 @@ export { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLi
|
|
|
6
6
|
import { serialize, parse } from 'cookie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* react-router v7.
|
|
9
|
+
* react-router v7.15.0
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -40,7 +40,7 @@ function warning(cond, message) {
|
|
|
40
40
|
function createKey() {
|
|
41
41
|
return Math.random().toString(36).substring(2, 10);
|
|
42
42
|
}
|
|
43
|
-
function createLocation(current, to, state = null, key,
|
|
43
|
+
function createLocation(current, to, state = null, key, mask) {
|
|
44
44
|
let location = {
|
|
45
45
|
pathname: typeof current === "string" ? current : current.pathname,
|
|
46
46
|
search: "",
|
|
@@ -52,7 +52,7 @@ function createLocation(current, to, state = null, key, unstable_mask) {
|
|
|
52
52
|
// But that's a pretty big refactor to the current test suite so going to
|
|
53
53
|
// keep as is for the time being and just let any incoming keys take precedence
|
|
54
54
|
key: to && to.key || key || createKey(),
|
|
55
|
-
|
|
55
|
+
mask
|
|
56
56
|
};
|
|
57
57
|
return location;
|
|
58
58
|
}
|
|
@@ -232,11 +232,11 @@ async function recurseRight(impls, info, handler, index) {
|
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
function getHandlerInfo(args) {
|
|
235
|
-
let { request, context, params,
|
|
235
|
+
let { request, context, params, pattern } = args;
|
|
236
236
|
return {
|
|
237
237
|
request: getReadonlyRequest(request),
|
|
238
238
|
params: { ...params },
|
|
239
|
-
|
|
239
|
+
pattern,
|
|
240
240
|
context: getReadonlyContext(context)
|
|
241
241
|
};
|
|
242
242
|
}
|
|
@@ -406,17 +406,16 @@ function mergeRouteUpdates(route, updates) {
|
|
|
406
406
|
function matchRoutes(routes, locationArg, basename = "/") {
|
|
407
407
|
return matchRoutesImpl(routes, locationArg, basename, false);
|
|
408
408
|
}
|
|
409
|
-
function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
|
|
409
|
+
function matchRoutesImpl(routes, locationArg, basename, allowPartial, precomputedBranches) {
|
|
410
410
|
let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
|
|
411
411
|
let pathname = stripBasename(location.pathname || "/", basename);
|
|
412
412
|
if (pathname == null) {
|
|
413
413
|
return null;
|
|
414
414
|
}
|
|
415
|
-
let branches =
|
|
416
|
-
rankRouteBranches(branches);
|
|
415
|
+
let branches = precomputedBranches ?? flattenAndRankRoutes(routes);
|
|
417
416
|
let matches = null;
|
|
417
|
+
let decoded = decodePath(pathname);
|
|
418
418
|
for (let i = 0; matches == null && i < branches.length; ++i) {
|
|
419
|
-
let decoded = decodePath(pathname);
|
|
420
419
|
matches = matchRouteBranch(
|
|
421
420
|
branches[i],
|
|
422
421
|
decoded,
|
|
@@ -436,6 +435,11 @@ function convertRouteMatchToUiMatch(match, loaderData) {
|
|
|
436
435
|
handle: route.handle
|
|
437
436
|
};
|
|
438
437
|
}
|
|
438
|
+
function flattenAndRankRoutes(routes) {
|
|
439
|
+
let branches = flattenRoutes(routes);
|
|
440
|
+
rankRouteBranches(branches);
|
|
441
|
+
return branches;
|
|
442
|
+
}
|
|
439
443
|
function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = false) {
|
|
440
444
|
let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
|
|
441
445
|
let meta = {
|
|
@@ -885,11 +889,10 @@ function createStaticHandler(routes, opts) {
|
|
|
885
889
|
let _mapRouteProperties = opts?.mapRouteProperties || defaultMapRouteProperties;
|
|
886
890
|
let mapRouteProperties = _mapRouteProperties;
|
|
887
891
|
({
|
|
888
|
-
// unused in static handler
|
|
889
892
|
...opts?.future
|
|
890
893
|
});
|
|
891
|
-
if (opts?.
|
|
892
|
-
let instrumentations = opts.
|
|
894
|
+
if (opts?.instrumentations) {
|
|
895
|
+
let instrumentations = opts.instrumentations;
|
|
893
896
|
mapRouteProperties = (route) => {
|
|
894
897
|
return {
|
|
895
898
|
..._mapRouteProperties(route),
|
|
@@ -906,6 +909,7 @@ function createStaticHandler(routes, opts) {
|
|
|
906
909
|
void 0,
|
|
907
910
|
manifest
|
|
908
911
|
);
|
|
912
|
+
let routeBranches = flattenAndRankRoutes(dataRoutes);
|
|
909
913
|
async function query(request, {
|
|
910
914
|
requestContext,
|
|
911
915
|
filterMatchesToLoad,
|
|
@@ -913,12 +917,23 @@ function createStaticHandler(routes, opts) {
|
|
|
913
917
|
skipRevalidation,
|
|
914
918
|
dataStrategy,
|
|
915
919
|
generateMiddlewareResponse,
|
|
916
|
-
|
|
920
|
+
normalizePath
|
|
917
921
|
} = {}) {
|
|
918
|
-
let
|
|
922
|
+
let normalizePathImpl = normalizePath || defaultNormalizePath;
|
|
919
923
|
let method = request.method;
|
|
920
|
-
let location = createLocation(
|
|
921
|
-
|
|
924
|
+
let location = createLocation(
|
|
925
|
+
"",
|
|
926
|
+
normalizePathImpl(request),
|
|
927
|
+
null,
|
|
928
|
+
"default"
|
|
929
|
+
);
|
|
930
|
+
let matches = matchRoutesImpl(
|
|
931
|
+
dataRoutes,
|
|
932
|
+
location,
|
|
933
|
+
basename,
|
|
934
|
+
false,
|
|
935
|
+
routeBranches
|
|
936
|
+
);
|
|
922
937
|
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
923
938
|
if (!isValidMethod(method) && method !== "HEAD") {
|
|
924
939
|
let error = getInternalRouterError(405, { method });
|
|
@@ -970,8 +985,8 @@ function createStaticHandler(routes, opts) {
|
|
|
970
985
|
let response = await runServerMiddlewarePipeline(
|
|
971
986
|
{
|
|
972
987
|
request,
|
|
973
|
-
|
|
974
|
-
|
|
988
|
+
url: createDataFunctionUrl(request, location),
|
|
989
|
+
pattern: getRoutePattern(matches),
|
|
975
990
|
matches,
|
|
976
991
|
params: matches[0].params,
|
|
977
992
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1088,12 +1103,23 @@ function createStaticHandler(routes, opts) {
|
|
|
1088
1103
|
requestContext,
|
|
1089
1104
|
dataStrategy,
|
|
1090
1105
|
generateMiddlewareResponse,
|
|
1091
|
-
|
|
1106
|
+
normalizePath
|
|
1092
1107
|
} = {}) {
|
|
1093
|
-
let
|
|
1108
|
+
let normalizePathImpl = normalizePath || defaultNormalizePath;
|
|
1094
1109
|
let method = request.method;
|
|
1095
|
-
let location = createLocation(
|
|
1096
|
-
|
|
1110
|
+
let location = createLocation(
|
|
1111
|
+
"",
|
|
1112
|
+
normalizePathImpl(request),
|
|
1113
|
+
null,
|
|
1114
|
+
"default"
|
|
1115
|
+
);
|
|
1116
|
+
let matches = matchRoutesImpl(
|
|
1117
|
+
dataRoutes,
|
|
1118
|
+
location,
|
|
1119
|
+
basename,
|
|
1120
|
+
false,
|
|
1121
|
+
routeBranches
|
|
1122
|
+
);
|
|
1097
1123
|
requestContext = requestContext != null ? requestContext : new RouterContextProvider();
|
|
1098
1124
|
if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
|
|
1099
1125
|
throw getInternalRouterError(405, { method });
|
|
@@ -1118,8 +1144,8 @@ function createStaticHandler(routes, opts) {
|
|
|
1118
1144
|
let response = await runServerMiddlewarePipeline(
|
|
1119
1145
|
{
|
|
1120
1146
|
request,
|
|
1121
|
-
|
|
1122
|
-
|
|
1147
|
+
url: createDataFunctionUrl(request, location),
|
|
1148
|
+
pattern: getRoutePattern(matches),
|
|
1123
1149
|
matches,
|
|
1124
1150
|
params: matches[0].params,
|
|
1125
1151
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1503,6 +1529,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1503
1529
|
}
|
|
1504
1530
|
return {
|
|
1505
1531
|
dataRoutes,
|
|
1532
|
+
_internalRouteBranches: routeBranches,
|
|
1506
1533
|
query,
|
|
1507
1534
|
queryRoute
|
|
1508
1535
|
};
|
|
@@ -1854,7 +1881,7 @@ function getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request,
|
|
|
1854
1881
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
1855
1882
|
};
|
|
1856
1883
|
}
|
|
1857
|
-
function getDataStrategyMatch(mapRouteProperties, manifest, request, path,
|
|
1884
|
+
function getDataStrategyMatch(mapRouteProperties, manifest, request, path, pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null, callSiteDefaultShouldRevalidate) {
|
|
1858
1885
|
let isUsingNewApi = false;
|
|
1859
1886
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
1860
1887
|
mapRouteProperties,
|
|
@@ -1889,7 +1916,7 @@ function getDataStrategyMatch(mapRouteProperties, manifest, request, path, unsta
|
|
|
1889
1916
|
return callLoaderOrAction({
|
|
1890
1917
|
request,
|
|
1891
1918
|
path,
|
|
1892
|
-
|
|
1919
|
+
pattern,
|
|
1893
1920
|
match,
|
|
1894
1921
|
lazyHandlerPromise: _lazyPromises?.handler,
|
|
1895
1922
|
lazyRoutePromise: _lazyPromises?.route,
|
|
@@ -1939,8 +1966,8 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
|
|
|
1939
1966
|
}
|
|
1940
1967
|
let dataStrategyArgs = {
|
|
1941
1968
|
request,
|
|
1942
|
-
|
|
1943
|
-
|
|
1969
|
+
url: createDataFunctionUrl(request, path),
|
|
1970
|
+
pattern: getRoutePattern(matches),
|
|
1944
1971
|
params: matches[0].params,
|
|
1945
1972
|
context: scopedContext,
|
|
1946
1973
|
matches
|
|
@@ -1969,7 +1996,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
|
|
|
1969
1996
|
async function callLoaderOrAction({
|
|
1970
1997
|
request,
|
|
1971
1998
|
path,
|
|
1972
|
-
|
|
1999
|
+
pattern,
|
|
1973
2000
|
match,
|
|
1974
2001
|
lazyHandlerPromise,
|
|
1975
2002
|
lazyRoutePromise,
|
|
@@ -1996,8 +2023,8 @@ async function callLoaderOrAction({
|
|
|
1996
2023
|
return handler(
|
|
1997
2024
|
{
|
|
1998
2025
|
request,
|
|
1999
|
-
|
|
2000
|
-
|
|
2026
|
+
url: createDataFunctionUrl(request, path),
|
|
2027
|
+
pattern,
|
|
2001
2028
|
params: match.params,
|
|
2002
2029
|
context: scopedContext
|
|
2003
2030
|
},
|
|
@@ -2876,7 +2903,7 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
|
|
|
2876
2903
|
return generateErrorResponse(error);
|
|
2877
2904
|
}
|
|
2878
2905
|
},
|
|
2879
|
-
|
|
2906
|
+
normalizePath: (r) => getNormalizedPath(r, basename, null)
|
|
2880
2907
|
});
|
|
2881
2908
|
return response;
|
|
2882
2909
|
} catch (error) {
|
|
@@ -2932,7 +2959,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
2932
2959
|
skipLoaderErrorBubbling: isDataRequest,
|
|
2933
2960
|
skipRevalidation: isSubmission,
|
|
2934
2961
|
...routeIdsToLoad ? { filterMatchesToLoad: (m) => routeIdsToLoad.includes(m.route.id) } : {},
|
|
2935
|
-
|
|
2962
|
+
normalizePath: (r) => getNormalizedPath(r, basename),
|
|
2936
2963
|
async generateMiddlewareResponse(query) {
|
|
2937
2964
|
let formState;
|
|
2938
2965
|
let skipRevalidation = false;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { K as Await, w as AwaitProps, C as ClientOnErrorFunction, F as Fetcher, G as GetScrollPositionFunction,
|
|
1
|
+
import { Z as RouteModules, z as DataStrategyFunction, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, T as To, _ as SerializeFrom, L as Location, $ as PathPattern, a0 as PathMatch, a1 as ParamParseKey, U as UIMatch, v as Action, P as Params, K as Path, r as RouteObject, G as GetLoaderData, l as GetActionData, O as InitialEntry, W as IndexRouteObject, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, Q as NonIndexRouteObject, a2 as Equal, B as PatchRoutesOnNavigationFunction, E as DataRouteObject, a as ClientLoaderFunction } from './data-BVUf681J.mjs';
|
|
2
|
+
export { a3 as ActionFunctionArgs, a4 as BaseRouteObject, C as ClientActionFunction, as as ClientActionFunctionArgs, at as ClientLoaderFunctionArgs, w as DataRouteMatch, a5 as DataStrategyFunctionArgs, a6 as DataStrategyMatch, D as DataStrategyResult, a8 as ErrorResponse, n as FormEncType, a9 as FormMethod, ay as Future, m as HTMLFormMethod, au as HeadersArgs, H as HeadersFunction, ax as HtmlLinkDescriptor, V as LazyRouteFunction, e as LinkDescriptor, o as LoaderFunctionArgs, av as MetaArgs, g as MetaDescriptor, aa as MiddlewareFunction, aw as PageLinkDescriptor, ab as PatchRoutesOnNavigationFunctionArgs, ac as PathParam, ad as RedirectFunction, X as RouteMatch, ae as RouterContext, S as ShouldRevalidateFunction, af as ShouldRevalidateFunctionArgs, a7 as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aB as UNSAFE_createBrowserHistory, aC as UNSAFE_createHashHistory, aA as UNSAFE_createMemoryHistory, aD as UNSAFE_invariant, ag as createContext, ah as createPath, aj as data, ak as generatePath, al as isRouteErrorResponse, am as matchPath, an as matchRoutes, ai as parsePath, ao as redirect, ap as redirectDocument, aq as replace, ar as resolvePath, az as unstable_SerializesTo } from './data-BVUf681J.mjs';
|
|
3
|
+
import { c as Router, N as NavigateOptions, B as BlockerFunction, d as Blocker, e as RelativeRoutingType, f as Navigation, H as HydrationState, g as RouterState } from './context-BQs41HrG.mjs';
|
|
4
|
+
export { K as Await, w as AwaitProps, C as ClientInstrumentation, b as ClientOnErrorFunction, F as Fetcher, G as GetScrollPositionFunction, h as GetScrollRestorationKeyFunction, u as IDLE_BLOCKER, t as IDLE_FETCHER, s as IDLE_NAVIGATION, x as IndexRouteProps, I as InstrumentRequestHandlerFunction, q as InstrumentRouteFunction, p as InstrumentRouterFunction, r as InstrumentationHandlerResult, L as LayoutRouteProps, Q as MemoryRouter, M as MemoryRouterOpts, y as MemoryRouterProps, T as Navigate, z as NavigateProps, j as NavigationStates, v as Navigator, U as Outlet, O as OutletProps, P as PathRouteProps, n as RevalidationState, V as Route, D as RouteProps, W as Router, m as RouterFetchOptions, R as RouterInit, l as RouterNavigateOptions, E as RouterProps, X as RouterProvider, a as RouterProviderProps, k as RouterSubscriber, Y as Routes, J as RoutesProps, o as ServerInstrumentation, S as StaticHandler, i as StaticHandlerContext, A as UNSAFE_AwaitContextProvider, a2 as UNSAFE_DataRouterContext, a3 as UNSAFE_DataRouterStateContext, a4 as UNSAFE_FetchersContext, a5 as UNSAFE_LocationContext, a6 as UNSAFE_NavigationContext, a7 as UNSAFE_RouteContext, a8 as UNSAFE_ViewTransitionContext, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps, a1 as UNSAFE_createRouter, a9 as UNSAFE_hydrationRouteProperties, aa as UNSAFE_mapRouteProperties, ac as UNSAFE_withComponentProps, ag as UNSAFE_withErrorBoundaryProps, ae as UNSAFE_withHydrateFallbackProps, Z as createMemoryRouter, _ as createRoutesFromChildren, $ as createRoutesFromElements, a0 as renderMatches } from './context-BQs41HrG.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { ReactElement } from 'react';
|
|
7
|
-
import { a as RouteModules$1, P as Pages } from './register-
|
|
8
|
-
export { b as Register } from './register-
|
|
9
|
-
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-
|
|
10
|
-
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-
|
|
7
|
+
import { a as RouteModules$1, P as Pages } from './register-Df8okEea.mjs';
|
|
8
|
+
export { b as Register } from './register-Df8okEea.mjs';
|
|
9
|
+
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-Ck_yZ1qL.mjs';
|
|
10
|
+
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-Ck_yZ1qL.mjs';
|
|
11
11
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
12
12
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
13
|
-
import { e as RSCPayload, g as getRequest, m as matchRSCServerRequest } from './browser-
|
|
14
|
-
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, h as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, i as unstable_RSCMatch, f as unstable_RSCRenderPayload, n as unstable_RSCRouteConfig, l as unstable_RSCRouteConfigEntry, j as unstable_RSCRouteManifest, k as unstable_RSCRouteMatch } from './browser-
|
|
13
|
+
import { e as RSCPayload, g as getRequest, m as matchRSCServerRequest } from './browser-CRsXgNrY.mjs';
|
|
14
|
+
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, h as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, i as unstable_RSCMatch, f as unstable_RSCRenderPayload, n as unstable_RSCRouteConfig, l as unstable_RSCRouteConfigEntry, j as unstable_RSCRouteManifest, k as unstable_RSCRouteMatch } from './browser-CRsXgNrY.mjs';
|
|
15
15
|
|
|
16
16
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
17
17
|
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined, trailingSlashAware: boolean): DataStrategyFunction;
|
|
@@ -113,7 +113,7 @@ declare function useNavigationType(): Action;
|
|
|
113
113
|
* @param pattern The pattern to match against the current {@link Location}
|
|
114
114
|
* @returns The path match object if the pattern matches, `null` otherwise
|
|
115
115
|
*/
|
|
116
|
-
declare function useMatch<
|
|
116
|
+
declare function useMatch<Path extends string>(pattern: PathPattern<Path> | Path): PathMatch<ParamParseKey<Path>> | null;
|
|
117
117
|
/**
|
|
118
118
|
* The interface for the `navigate` function returned from {@link useNavigate}.
|
|
119
119
|
*/
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { a as Router, B as BlockerFunction, b as Blocker, c as RelativeRoutingType, N as Navigation, H as HydrationState, d as RouterState } from './instrumentation-
|
|
4
|
-
export { F as Fetcher, G as GetScrollPositionFunction, e as GetScrollRestorationKeyFunction, r as IDLE_BLOCKER, q as IDLE_FETCHER,
|
|
5
|
-
import { A as AssetsManifest, S as ServerBuild, N as NavigateOptions, E as EntryContext, F as FutureConfig } from './index-react-server-client-
|
|
6
|
-
export { i as Await, c as AwaitProps, W as BrowserRouter, B as BrowserRouterProps, C as ClientOnErrorFunction, D as DOMRouterOpts, at as DiscoverBehavior, y as FetcherFormProps, Q as FetcherSubmitFunction, aa as FetcherSubmitOptions, T as FetcherWithComponents, $ as Form, z as FormProps, au as HandleDataRequestFunction, av as HandleDocumentRequestFunction, aw as HandleErrorFunction, X as HashRouter, H as HashRouterProps, u as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Y as Link, v as LinkProps, an as Links, aq as LinksProps, j as MemoryRouter, M as MemoryRouterOpts, d as MemoryRouterProps, am as Meta, _ as NavLink, w as NavLinkProps, x as NavLinkRenderProps, k as Navigate, e as NavigateProps, a as Navigator, l as Outlet, O as OutletProps, ab as ParamKeyValuePair, P as PathRouteProps, as as PrefetchBehavior, ap as PrefetchPageLinks, m as Route, R as RouteProps, n as Router, f as RouterProps, o as RouterProvider, g as RouterProviderProps, p as Routes, h as RoutesProps, ao as Scripts, ar as ScriptsProps, a0 as ScrollRestoration, G as ScrollRestorationProps, ax as ServerEntryModule, J as SetURLSearchParams, ak as StaticRouter, ag as StaticRouterProps, al as StaticRouterProvider, ah as StaticRouterProviderProps, K as SubmitFunction, ac as SubmitOptions, ae as SubmitTarget, b as UNSAFE_AwaitContextProvider, ay as UNSAFE_DataRouterContext, az as UNSAFE_DataRouterStateContext, aA as UNSAFE_FetchersContext, aN as UNSAFE_FrameworkContext, aB as UNSAFE_LocationContext, aC as UNSAFE_NavigationContext, aD as UNSAFE_RouteContext, aE as UNSAFE_ViewTransitionContext, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, aO as UNSAFE_createClientRoutes, aP as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aF as UNSAFE_hydrationRouteProperties, aG as UNSAFE_mapRouteProperties, aQ as UNSAFE_shouldHydrateRouteLoader, aR as UNSAFE_useScrollRestoration, aI as UNSAFE_withComponentProps, aM as UNSAFE_withErrorBoundaryProps, aK as UNSAFE_withHydrateFallbackProps, ad as URLSearchParamsInit, U as createBrowserRouter, V as createHashRouter, q as createMemoryRouter, r as createRoutesFromChildren, s as createRoutesFromElements, af as createSearchParams, ai as createStaticHandler, aj as createStaticRouter, t as renderMatches, Z as unstable_HistoryRouter, a8 as unstable_usePrompt, a7 as useBeforeUnload, a5 as useFetcher, a6 as useFetchers, a4 as useFormAction, a1 as useLinkClickHandler, a2 as useSearchParams, a3 as useSubmit, a9 as useViewTransitionState } from './index-react-server-client-
|
|
1
|
+
import { O as RouteModules, l as DataStrategyFunction, t as MiddlewareEnabled, c as RouterContextProvider, u as AppLoadContext, T as To, Q as SerializeFrom, L as Location, V as PathPattern, W as PathMatch, X as ParamParseKey, U as UIMatch, i as Action, P as Params, r as Path, e as RouteObject, G as GetLoaderData, K as GetActionData, Y as InitialEntry, Z as IndexRouteObject, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, _ as NonIndexRouteObject, $ as Equal, m as PatchRoutesOnNavigationFunction, n as DataRouteObject, a as ClientLoaderFunction } from './data-BqZ2x964.js';
|
|
2
|
+
export { a0 as ActionFunctionArgs, a1 as BaseRouteObject, C as ClientActionFunction, ar as ClientActionFunctionArgs, as as ClientLoaderFunctionArgs, D as DataRouteMatch, a2 as DataStrategyFunctionArgs, a3 as DataStrategyMatch, I as DataStrategyResult, a5 as ErrorResponse, F as FormEncType, a6 as FormMethod, ax as Future, q as HTMLFormMethod, at as HeadersArgs, H as HeadersFunction, aw as HtmlLinkDescriptor, a7 as LazyRouteFunction, v as LinkDescriptor, s as LoaderFunctionArgs, au as MetaArgs, y as MetaDescriptor, a8 as MiddlewareFunction, av as PageLinkDescriptor, a9 as PatchRoutesOnNavigationFunctionArgs, aa as PathParam, ab as RedirectFunction, ac as RouteMatch, ad as RouterContext, S as ShouldRevalidateFunction, ae as ShouldRevalidateFunctionArgs, a4 as UNSAFE_DataWithResponseInit, aD as UNSAFE_ErrorResponseImpl, aA as UNSAFE_createBrowserHistory, aB as UNSAFE_createHashHistory, az as UNSAFE_createMemoryHistory, aC as UNSAFE_invariant, af as createContext, ag as createPath, ai as data, aj as generatePath, ak as isRouteErrorResponse, al as matchPath, am as matchRoutes, ah as parsePath, an as redirect, ao as redirectDocument, ap as replace, aq as resolvePath, ay as unstable_SerializesTo } from './data-BqZ2x964.js';
|
|
3
|
+
import { a as Router, B as BlockerFunction, b as Blocker, c as RelativeRoutingType, N as Navigation, H as HydrationState, d as RouterState } from './instrumentation-DlJ2QV7d.js';
|
|
4
|
+
export { C as ClientInstrumentation, F as Fetcher, G as GetScrollPositionFunction, e as GetScrollRestorationKeyFunction, r as IDLE_BLOCKER, q as IDLE_FETCHER, p as IDLE_NAVIGATION, I as InstrumentRequestHandlerFunction, n as InstrumentRouteFunction, m as InstrumentRouterFunction, o as InstrumentationHandlerResult, g as NavigationStates, k as RevalidationState, j as RouterFetchOptions, R as RouterInit, i as RouterNavigateOptions, h as RouterSubscriber, l as ServerInstrumentation, S as StaticHandler, f as StaticHandlerContext, s as UNSAFE_createRouter } from './instrumentation-DlJ2QV7d.js';
|
|
5
|
+
import { A as AssetsManifest, S as ServerBuild, N as NavigateOptions, E as EntryContext, F as FutureConfig } from './index-react-server-client-CSv-KZBk.js';
|
|
6
|
+
export { i as Await, c as AwaitProps, W as BrowserRouter, B as BrowserRouterProps, C as ClientOnErrorFunction, D as DOMRouterOpts, at as DiscoverBehavior, y as FetcherFormProps, Q as FetcherSubmitFunction, aa as FetcherSubmitOptions, T as FetcherWithComponents, $ as Form, z as FormProps, au as HandleDataRequestFunction, av as HandleDocumentRequestFunction, aw as HandleErrorFunction, X as HashRouter, H as HashRouterProps, u as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Y as Link, v as LinkProps, an as Links, aq as LinksProps, j as MemoryRouter, M as MemoryRouterOpts, d as MemoryRouterProps, am as Meta, _ as NavLink, w as NavLinkProps, x as NavLinkRenderProps, k as Navigate, e as NavigateProps, a as Navigator, l as Outlet, O as OutletProps, ab as ParamKeyValuePair, P as PathRouteProps, as as PrefetchBehavior, ap as PrefetchPageLinks, m as Route, R as RouteProps, n as Router, f as RouterProps, o as RouterProvider, g as RouterProviderProps, p as Routes, h as RoutesProps, ao as Scripts, ar as ScriptsProps, a0 as ScrollRestoration, G as ScrollRestorationProps, ax as ServerEntryModule, J as SetURLSearchParams, ak as StaticRouter, ag as StaticRouterProps, al as StaticRouterProvider, ah as StaticRouterProviderProps, K as SubmitFunction, ac as SubmitOptions, ae as SubmitTarget, b as UNSAFE_AwaitContextProvider, ay as UNSAFE_DataRouterContext, az as UNSAFE_DataRouterStateContext, aA as UNSAFE_FetchersContext, aN as UNSAFE_FrameworkContext, aB as UNSAFE_LocationContext, aC as UNSAFE_NavigationContext, aD as UNSAFE_RouteContext, aE as UNSAFE_ViewTransitionContext, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, aO as UNSAFE_createClientRoutes, aP as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aF as UNSAFE_hydrationRouteProperties, aG as UNSAFE_mapRouteProperties, aQ as UNSAFE_shouldHydrateRouteLoader, aR as UNSAFE_useScrollRestoration, aI as UNSAFE_withComponentProps, aM as UNSAFE_withErrorBoundaryProps, aK as UNSAFE_withHydrateFallbackProps, ad as URLSearchParamsInit, U as createBrowserRouter, V as createHashRouter, q as createMemoryRouter, r as createRoutesFromChildren, s as createRoutesFromElements, af as createSearchParams, ai as createStaticHandler, aj as createStaticRouter, t as renderMatches, Z as unstable_HistoryRouter, a8 as unstable_usePrompt, a7 as useBeforeUnload, a5 as useFetcher, a6 as useFetchers, a4 as useFormAction, a1 as useLinkClickHandler, a2 as useSearchParams, a3 as useSubmit, a9 as useViewTransitionState } from './index-react-server-client-CSv-KZBk.js';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import React__default, { ReactElement } from 'react';
|
|
9
|
-
import { a as RouteModules$1, P as Pages } from './register-
|
|
10
|
-
export { b as Register } from './register-
|
|
9
|
+
import { a as RouteModules$1, P as Pages } from './register-Bsscfj79.js';
|
|
10
|
+
export { b as Register } from './register-Bsscfj79.js';
|
|
11
11
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
12
12
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
13
|
-
import { e as RSCPayload, g as getRequest, m as matchRSCServerRequest } from './browser-
|
|
14
|
-
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, h as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, i as unstable_RSCMatch, f as unstable_RSCRenderPayload, n as unstable_RSCRouteConfig, l as unstable_RSCRouteConfigEntry, j as unstable_RSCRouteManifest, k as unstable_RSCRouteMatch } from './browser-
|
|
13
|
+
import { e as RSCPayload, g as getRequest, m as matchRSCServerRequest } from './browser-wDl1FZEL.js';
|
|
14
|
+
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, h as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, i as unstable_RSCMatch, f as unstable_RSCRenderPayload, n as unstable_RSCRouteConfig, l as unstable_RSCRouteConfigEntry, j as unstable_RSCRouteManifest, k as unstable_RSCRouteMatch } from './browser-wDl1FZEL.js';
|
|
15
15
|
|
|
16
16
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
17
17
|
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined, trailingSlashAware: boolean): DataStrategyFunction;
|
|
@@ -113,7 +113,7 @@ declare function useNavigationType(): Action;
|
|
|
113
113
|
* @param pattern The pattern to match against the current {@link Location}
|
|
114
114
|
* @returns The path match object if the pattern matches, `null` otherwise
|
|
115
115
|
*/
|
|
116
|
-
declare function useMatch<
|
|
116
|
+
declare function useMatch<Path extends string>(pattern: PathPattern<Path> | Path): PathMatch<ParamParseKey<Path>> | null;
|
|
117
117
|
/**
|
|
118
118
|
* The interface for the `navigate` function returned from {@link useNavigate}.
|
|
119
119
|
*/
|