react-router 7.9.6 → 7.10.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 +75 -10
- package/dist/development/{browser-BbBXFHbO.d.ts → browser-BpxEZgZC.d.ts} +1 -1
- package/dist/development/{browser-C07r42Tt.d.mts → browser-C5z6FZmz.d.mts} +1 -1
- package/dist/development/{chunk-4WY6JWTD.mjs → chunk-GIMUO62I.mjs} +208 -221
- package/dist/development/{chunk-AMVS5XVJ.js → chunk-KQLPIZ7E.js} +201 -258
- package/dist/development/{chunk-PZWDWJAY.js → chunk-RHWHYDYZ.js} +7 -7
- package/dist/development/{chunk-G3INQAYP.mjs → chunk-V5RTLP6E.mjs} +15 -5
- package/dist/development/{chunk-O4JVZSOY.js → chunk-XHWAND4X.js} +167 -123
- package/dist/development/dom-export.d.mts +29 -10
- package/dist/development/dom-export.d.ts +29 -10
- package/dist/development/dom-export.js +158 -103
- package/dist/development/dom-export.mjs +133 -79
- package/dist/{production/index-react-server-client-Da3kmxNd.d.ts → development/index-react-server-client-CCjKYJTH.d.ts} +75 -180
- package/dist/development/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-CipGfVBI.d.mts} +75 -180
- package/dist/development/index-react-server-client.d.mts +2 -2
- 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 +19 -4
- package/dist/development/index-react-server.d.ts +19 -4
- package/dist/development/index-react-server.js +30 -24
- package/dist/development/index-react-server.mjs +30 -24
- package/dist/development/index.d.mts +19 -15
- package/dist/development/index.d.ts +19 -15
- package/dist/development/index.js +92 -82
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-Unc20tLk.d.ts → development/instrumentation-BB0wRuqz.d.ts} +93 -11
- 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-QkB3HGjm.d.mts → register-C1RwVJAt.d.mts} +1 -1
- package/dist/development/{register-BpU9rFBJ.d.ts → register-ODDAAYlf.d.ts} +1 -1
- package/dist/development/{router-CAvh_Drx.d.mts → router-CwNp5l9u.d.mts} +93 -11
- package/dist/production/{browser-BbBXFHbO.d.ts → browser-BpxEZgZC.d.ts} +1 -1
- package/dist/production/{browser-C07r42Tt.d.mts → browser-C5z6FZmz.d.mts} +1 -1
- package/dist/production/{chunk-QN64DHI4.js → chunk-3MVZKESN.js} +167 -123
- package/dist/production/{chunk-FUSXQSWG.mjs → chunk-7F5XUDXM.mjs} +208 -221
- package/dist/production/{chunk-EAIF67OW.js → chunk-C7S4I3K5.js} +201 -258
- package/dist/production/{chunk-FDUMZGKM.mjs → chunk-ISOIFGFA.mjs} +15 -5
- package/dist/production/{chunk-G5A35OQU.js → chunk-YU3WNS3T.js} +7 -7
- package/dist/production/dom-export.d.mts +29 -10
- package/dist/production/dom-export.d.ts +29 -10
- package/dist/production/dom-export.js +158 -103
- package/dist/production/dom-export.mjs +133 -79
- package/dist/{development/index-react-server-client-Da3kmxNd.d.ts → production/index-react-server-client-CCjKYJTH.d.ts} +75 -180
- package/dist/production/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-CipGfVBI.d.mts} +75 -180
- package/dist/production/index-react-server-client.d.mts +2 -2
- 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 +19 -4
- package/dist/production/index-react-server.d.ts +19 -4
- package/dist/production/index-react-server.js +30 -24
- package/dist/production/index-react-server.mjs +30 -24
- package/dist/production/index.d.mts +19 -15
- package/dist/production/index.d.ts +19 -15
- package/dist/production/index.js +92 -82
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-Unc20tLk.d.ts → production/instrumentation-BB0wRuqz.d.ts} +93 -11
- 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/production/{register-QkB3HGjm.d.mts → register-C1RwVJAt.d.mts} +1 -1
- package/dist/production/{register-BpU9rFBJ.d.ts → register-ODDAAYlf.d.ts} +1 -1
- package/dist/production/{router-CAvh_Drx.d.mts → router-CwNp5l9u.d.mts} +93 -11
- 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.10.0-pre.1
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -869,8 +869,8 @@ var ErrorResponseImpl = class {
|
|
|
869
869
|
function isRouteErrorResponse(error) {
|
|
870
870
|
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
871
871
|
}
|
|
872
|
-
function getRoutePattern(
|
|
873
|
-
return
|
|
872
|
+
function getRoutePattern(matches) {
|
|
873
|
+
return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
|
|
874
874
|
}
|
|
875
875
|
|
|
876
876
|
// lib/router/router.ts
|
|
@@ -983,7 +983,7 @@ function createStaticHandler(routes, opts) {
|
|
|
983
983
|
let response = await runServerMiddlewarePipeline(
|
|
984
984
|
{
|
|
985
985
|
request,
|
|
986
|
-
unstable_pattern: getRoutePattern(matches
|
|
986
|
+
unstable_pattern: getRoutePattern(matches),
|
|
987
987
|
matches,
|
|
988
988
|
params: matches[0].params,
|
|
989
989
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1129,7 +1129,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1129
1129
|
let response = await runServerMiddlewarePipeline(
|
|
1130
1130
|
{
|
|
1131
1131
|
request,
|
|
1132
|
-
unstable_pattern: getRoutePattern(matches
|
|
1132
|
+
unstable_pattern: getRoutePattern(matches),
|
|
1133
1133
|
matches,
|
|
1134
1134
|
params: matches[0].params,
|
|
1135
1135
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1405,7 +1405,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1405
1405
|
// Up to but not including the boundary
|
|
1406
1406
|
matches.findIndex((m) => m.route.id === pendingActionResult[0]) - 1
|
|
1407
1407
|
) : void 0;
|
|
1408
|
-
let pattern = getRoutePattern(matches
|
|
1408
|
+
let pattern = getRoutePattern(matches);
|
|
1409
1409
|
dsMatches = matches.map((match, index) => {
|
|
1410
1410
|
if (maxIdx != null && index > maxIdx) {
|
|
1411
1411
|
return getDataStrategyMatch(
|
|
@@ -1850,7 +1850,7 @@ function getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request,
|
|
|
1850
1850
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
1851
1851
|
};
|
|
1852
1852
|
}
|
|
1853
|
-
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad,
|
|
1853
|
+
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null) {
|
|
1854
1854
|
let isUsingNewApi = false;
|
|
1855
1855
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
1856
1856
|
mapRouteProperties,
|
|
@@ -1863,19 +1863,19 @@ function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pa
|
|
|
1863
1863
|
...match,
|
|
1864
1864
|
_lazyPromises,
|
|
1865
1865
|
shouldLoad,
|
|
1866
|
-
|
|
1867
|
-
|
|
1866
|
+
shouldRevalidateArgs,
|
|
1867
|
+
shouldCallHandler(defaultShouldRevalidate) {
|
|
1868
1868
|
isUsingNewApi = true;
|
|
1869
|
-
if (!
|
|
1869
|
+
if (!shouldRevalidateArgs) {
|
|
1870
1870
|
return shouldLoad;
|
|
1871
1871
|
}
|
|
1872
1872
|
if (typeof defaultShouldRevalidate === "boolean") {
|
|
1873
1873
|
return shouldRevalidateLoader(match, {
|
|
1874
|
-
...
|
|
1874
|
+
...shouldRevalidateArgs,
|
|
1875
1875
|
defaultShouldRevalidate
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
1878
|
-
return shouldRevalidateLoader(match,
|
|
1878
|
+
return shouldRevalidateLoader(match, shouldRevalidateArgs);
|
|
1879
1879
|
},
|
|
1880
1880
|
resolve(handlerOverride) {
|
|
1881
1881
|
let { lazy, loader, middleware } = match.route;
|
|
@@ -1902,8 +1902,8 @@ function getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, m
|
|
|
1902
1902
|
return {
|
|
1903
1903
|
...match,
|
|
1904
1904
|
shouldLoad: false,
|
|
1905
|
-
|
|
1906
|
-
|
|
1905
|
+
shouldRevalidateArgs,
|
|
1906
|
+
shouldCallHandler: () => false,
|
|
1907
1907
|
_lazyPromises: getDataStrategyMatchLazyPromises(
|
|
1908
1908
|
mapRouteProperties,
|
|
1909
1909
|
manifest,
|
|
@@ -1918,7 +1918,7 @@ function getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, m
|
|
|
1918
1918
|
mapRouteProperties,
|
|
1919
1919
|
manifest,
|
|
1920
1920
|
request,
|
|
1921
|
-
getRoutePattern(matches
|
|
1921
|
+
getRoutePattern(matches),
|
|
1922
1922
|
match,
|
|
1923
1923
|
lazyRoutePropertiesToSkip,
|
|
1924
1924
|
scopedContext,
|
|
@@ -1933,7 +1933,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
1933
1933
|
}
|
|
1934
1934
|
let dataStrategyArgs = {
|
|
1935
1935
|
request,
|
|
1936
|
-
unstable_pattern: getRoutePattern(matches
|
|
1936
|
+
unstable_pattern: getRoutePattern(matches),
|
|
1937
1937
|
params: matches[0].params,
|
|
1938
1938
|
context: scopedContext,
|
|
1939
1939
|
matches
|
|
@@ -2103,11 +2103,7 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
|
2103
2103
|
}
|
|
2104
2104
|
return {
|
|
2105
2105
|
type: "error" /* error */,
|
|
2106
|
-
error:
|
|
2107
|
-
result.init?.status || 500,
|
|
2108
|
-
void 0,
|
|
2109
|
-
result.data
|
|
2110
|
-
),
|
|
2106
|
+
error: dataWithResponseInitToErrorResponse(result),
|
|
2111
2107
|
statusCode: isRouteErrorResponse(result) ? result.status : void 0,
|
|
2112
2108
|
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
2113
2109
|
};
|
|
@@ -3135,12 +3131,12 @@ function canDecodeWithFormData(contentType) {
|
|
|
3135
3131
|
// lib/href.ts
|
|
3136
3132
|
function href(path, ...args) {
|
|
3137
3133
|
let params = args[0];
|
|
3138
|
-
let result = path
|
|
3134
|
+
let result = trimTrailingSplat(path).replace(
|
|
3139
3135
|
/\/:([\w-]+)(\?)?/g,
|
|
3140
3136
|
// same regex as in .\router\utils.ts: compilePath().
|
|
3141
3137
|
(_, param, questionMark) => {
|
|
3142
3138
|
const isRequired = questionMark === void 0;
|
|
3143
|
-
const value = params
|
|
3139
|
+
const value = params?.[param];
|
|
3144
3140
|
if (isRequired && value === void 0) {
|
|
3145
3141
|
throw new Error(
|
|
3146
3142
|
`Path '${path}' requires param '${param}' but it was not provided`
|
|
@@ -3150,13 +3146,23 @@ function href(path, ...args) {
|
|
|
3150
3146
|
}
|
|
3151
3147
|
);
|
|
3152
3148
|
if (path.endsWith("*")) {
|
|
3153
|
-
const value = params
|
|
3149
|
+
const value = params?.["*"];
|
|
3154
3150
|
if (value !== void 0) {
|
|
3155
3151
|
result += "/" + value;
|
|
3156
3152
|
}
|
|
3157
3153
|
}
|
|
3158
3154
|
return result || "/";
|
|
3159
3155
|
}
|
|
3156
|
+
function trimTrailingSplat(path) {
|
|
3157
|
+
let i = path.length - 1;
|
|
3158
|
+
let char = path[i];
|
|
3159
|
+
if (char !== "*" && char !== "/") return path;
|
|
3160
|
+
i--;
|
|
3161
|
+
for (; i >= 0; i--) {
|
|
3162
|
+
if (path[i] !== "/") break;
|
|
3163
|
+
}
|
|
3164
|
+
return path.slice(0, i + 1);
|
|
3165
|
+
}
|
|
3160
3166
|
|
|
3161
3167
|
// lib/server-runtime/crypto.ts
|
|
3162
3168
|
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
@@ -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.10.0-pre.1
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -848,8 +848,8 @@ var ErrorResponseImpl = class {
|
|
|
848
848
|
function isRouteErrorResponse(error) {
|
|
849
849
|
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
850
850
|
}
|
|
851
|
-
function getRoutePattern(
|
|
852
|
-
return
|
|
851
|
+
function getRoutePattern(matches) {
|
|
852
|
+
return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
|
|
853
853
|
}
|
|
854
854
|
|
|
855
855
|
// lib/router/router.ts
|
|
@@ -962,7 +962,7 @@ function createStaticHandler(routes, opts) {
|
|
|
962
962
|
let response = await runServerMiddlewarePipeline(
|
|
963
963
|
{
|
|
964
964
|
request,
|
|
965
|
-
unstable_pattern: getRoutePattern(matches
|
|
965
|
+
unstable_pattern: getRoutePattern(matches),
|
|
966
966
|
matches,
|
|
967
967
|
params: matches[0].params,
|
|
968
968
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1108,7 +1108,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1108
1108
|
let response = await runServerMiddlewarePipeline(
|
|
1109
1109
|
{
|
|
1110
1110
|
request,
|
|
1111
|
-
unstable_pattern: getRoutePattern(matches
|
|
1111
|
+
unstable_pattern: getRoutePattern(matches),
|
|
1112
1112
|
matches,
|
|
1113
1113
|
params: matches[0].params,
|
|
1114
1114
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -1384,7 +1384,7 @@ function createStaticHandler(routes, opts) {
|
|
|
1384
1384
|
// Up to but not including the boundary
|
|
1385
1385
|
matches.findIndex((m) => m.route.id === pendingActionResult[0]) - 1
|
|
1386
1386
|
) : void 0;
|
|
1387
|
-
let pattern = getRoutePattern(matches
|
|
1387
|
+
let pattern = getRoutePattern(matches);
|
|
1388
1388
|
dsMatches = matches.map((match, index) => {
|
|
1389
1389
|
if (maxIdx != null && index > maxIdx) {
|
|
1390
1390
|
return getDataStrategyMatch(
|
|
@@ -1829,7 +1829,7 @@ function getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request,
|
|
|
1829
1829
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad,
|
|
1832
|
+
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null) {
|
|
1833
1833
|
let isUsingNewApi = false;
|
|
1834
1834
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
1835
1835
|
mapRouteProperties,
|
|
@@ -1842,19 +1842,19 @@ function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pa
|
|
|
1842
1842
|
...match,
|
|
1843
1843
|
_lazyPromises,
|
|
1844
1844
|
shouldLoad,
|
|
1845
|
-
|
|
1846
|
-
|
|
1845
|
+
shouldRevalidateArgs,
|
|
1846
|
+
shouldCallHandler(defaultShouldRevalidate) {
|
|
1847
1847
|
isUsingNewApi = true;
|
|
1848
|
-
if (!
|
|
1848
|
+
if (!shouldRevalidateArgs) {
|
|
1849
1849
|
return shouldLoad;
|
|
1850
1850
|
}
|
|
1851
1851
|
if (typeof defaultShouldRevalidate === "boolean") {
|
|
1852
1852
|
return shouldRevalidateLoader(match, {
|
|
1853
|
-
...
|
|
1853
|
+
...shouldRevalidateArgs,
|
|
1854
1854
|
defaultShouldRevalidate
|
|
1855
1855
|
});
|
|
1856
1856
|
}
|
|
1857
|
-
return shouldRevalidateLoader(match,
|
|
1857
|
+
return shouldRevalidateLoader(match, shouldRevalidateArgs);
|
|
1858
1858
|
},
|
|
1859
1859
|
resolve(handlerOverride) {
|
|
1860
1860
|
let { lazy, loader, middleware } = match.route;
|
|
@@ -1881,8 +1881,8 @@ function getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, m
|
|
|
1881
1881
|
return {
|
|
1882
1882
|
...match,
|
|
1883
1883
|
shouldLoad: false,
|
|
1884
|
-
|
|
1885
|
-
|
|
1884
|
+
shouldRevalidateArgs,
|
|
1885
|
+
shouldCallHandler: () => false,
|
|
1886
1886
|
_lazyPromises: getDataStrategyMatchLazyPromises(
|
|
1887
1887
|
mapRouteProperties,
|
|
1888
1888
|
manifest,
|
|
@@ -1897,7 +1897,7 @@ function getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, m
|
|
|
1897
1897
|
mapRouteProperties,
|
|
1898
1898
|
manifest,
|
|
1899
1899
|
request,
|
|
1900
|
-
getRoutePattern(matches
|
|
1900
|
+
getRoutePattern(matches),
|
|
1901
1901
|
match,
|
|
1902
1902
|
lazyRoutePropertiesToSkip,
|
|
1903
1903
|
scopedContext,
|
|
@@ -1912,7 +1912,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
1912
1912
|
}
|
|
1913
1913
|
let dataStrategyArgs = {
|
|
1914
1914
|
request,
|
|
1915
|
-
unstable_pattern: getRoutePattern(matches
|
|
1915
|
+
unstable_pattern: getRoutePattern(matches),
|
|
1916
1916
|
params: matches[0].params,
|
|
1917
1917
|
context: scopedContext,
|
|
1918
1918
|
matches
|
|
@@ -2082,11 +2082,7 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
return {
|
|
2084
2084
|
type: "error" /* error */,
|
|
2085
|
-
error:
|
|
2086
|
-
result.init?.status || 500,
|
|
2087
|
-
void 0,
|
|
2088
|
-
result.data
|
|
2089
|
-
),
|
|
2085
|
+
error: dataWithResponseInitToErrorResponse(result),
|
|
2090
2086
|
statusCode: isRouteErrorResponse(result) ? result.status : void 0,
|
|
2091
2087
|
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
2092
2088
|
};
|
|
@@ -3114,12 +3110,12 @@ function canDecodeWithFormData(contentType) {
|
|
|
3114
3110
|
// lib/href.ts
|
|
3115
3111
|
function href(path, ...args) {
|
|
3116
3112
|
let params = args[0];
|
|
3117
|
-
let result = path
|
|
3113
|
+
let result = trimTrailingSplat(path).replace(
|
|
3118
3114
|
/\/:([\w-]+)(\?)?/g,
|
|
3119
3115
|
// same regex as in .\router\utils.ts: compilePath().
|
|
3120
3116
|
(_, param, questionMark) => {
|
|
3121
3117
|
const isRequired = questionMark === void 0;
|
|
3122
|
-
const value = params
|
|
3118
|
+
const value = params?.[param];
|
|
3123
3119
|
if (isRequired && value === void 0) {
|
|
3124
3120
|
throw new Error(
|
|
3125
3121
|
`Path '${path}' requires param '${param}' but it was not provided`
|
|
@@ -3129,13 +3125,23 @@ function href(path, ...args) {
|
|
|
3129
3125
|
}
|
|
3130
3126
|
);
|
|
3131
3127
|
if (path.endsWith("*")) {
|
|
3132
|
-
const value = params
|
|
3128
|
+
const value = params?.["*"];
|
|
3133
3129
|
if (value !== void 0) {
|
|
3134
3130
|
result += "/" + value;
|
|
3135
3131
|
}
|
|
3136
3132
|
}
|
|
3137
3133
|
return result || "/";
|
|
3138
3134
|
}
|
|
3135
|
+
function trimTrailingSplat(path) {
|
|
3136
|
+
let i = path.length - 1;
|
|
3137
|
+
let char = path[i];
|
|
3138
|
+
if (char !== "*" && char !== "/") return path;
|
|
3139
|
+
i--;
|
|
3140
|
+
for (; i >= 0; i--) {
|
|
3141
|
+
if (path[i] !== "/") break;
|
|
3142
|
+
}
|
|
3143
|
+
return path.slice(0, i + 1);
|
|
3144
|
+
}
|
|
3139
3145
|
|
|
3140
3146
|
// lib/server-runtime/crypto.ts
|
|
3141
3147
|
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { p as Router, q as RouteModules, r as DataStrategyFunction, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, T as To, v as NavigateOptions, B as BlockerFunction, w as Blocker, x as SerializeFrom, y as RelativeRoutingType, L as Location, z as ParamParseKey, E as Path, I as PathPattern, J as PathMatch, U as UIMatch, K as Navigation, O as Action, P as Params, Q as RouteObject, G as GetLoaderData, o as GetActionData, V as InitialEntry, W as HydrationState, X as IndexRouteObject, Y as RouteComponentType, Z as HydrateFallbackType, _ as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, $ as NonIndexRouteObject, a0 as Equal, a1 as RouterState, a2 as PatchRoutesOnNavigationFunction, a3 as DataRouteObject, a as ClientLoaderFunction } from './router-
|
|
2
|
-
export { ae as ActionFunctionArgs, b1 as Await, aS as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, aN as DataRouteMatch, af as DataStrategyFunctionArgs, ag as DataStrategyMatch, D as DataStrategyResult, ai as ErrorResponse, a8 as Fetcher, aj as FormEncType, ak as FormMethod, bj as Future, a5 as GetScrollPositionFunction, a6 as GetScrollRestorationKeyFunction, al as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aD as IDLE_BLOCKER, aC as IDLE_FETCHER, aB as IDLE_NAVIGATION, aT as IndexRouteProps, aU as LayoutRouteProps, am as LazyRouteFunction, h as LinkDescriptor, an as LoaderFunctionArgs, b2 as MemoryRouter, aV as MemoryRouterOpts, aW as MemoryRouterProps, bg as MetaArgs, j as MetaDescriptor, ao as MiddlewareFunction, b3 as Navigate, aX as NavigateProps, a9 as NavigationStates, aO as Navigator, b4 as Outlet, aY as OutletProps, bh as PageLinkDescriptor, aP as PatchRoutesOnNavigationFunctionArgs, ap as PathParam, aZ as PathRouteProps, aq as RedirectFunction, ad as RevalidationState, b5 as Route, aQ as RouteMatch, a_ as RouteProps, b6 as Router, ar as RouterContext, ac as RouterFetchOptions, e as RouterInit, ab as RouterNavigateOptions, a$ as RouterProps, b7 as RouterProvider, f as RouterProviderProps, aa as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, as as ShouldRevalidateFunctionArgs, a4 as StaticHandler, a7 as StaticHandlerContext, aR as UNSAFE_AwaitContextProvider, bp as UNSAFE_DataRouterContext, bq as UNSAFE_DataRouterStateContext, ah as UNSAFE_DataWithResponseInit, bo as UNSAFE_ErrorResponseImpl, br as UNSAFE_FetchersContext, bs as UNSAFE_LocationContext, bt as UNSAFE_NavigationContext, bu as UNSAFE_RouteContext, bv as UNSAFE_ViewTransitionContext, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps, bl as UNSAFE_createBrowserHistory, bn as UNSAFE_createRouter, bw as UNSAFE_hydrationRouteProperties, bm as UNSAFE_invariant, bx as UNSAFE_mapRouteProperties, bz as UNSAFE_withComponentProps, bD as UNSAFE_withErrorBoundaryProps, bB as UNSAFE_withHydrateFallbackProps, at as createContext, b9 as createMemoryRouter, au as createPath, ba as createRoutesFromChildren, bb as createRoutesFromElements, aE as data, aF as generatePath, aG as isRouteErrorResponse, aH as matchPath, aI as matchRoutes, av as parsePath, aJ as redirect, aK as redirectDocument, bc as renderMatches, aL as replace, aM as resolvePath, u as unstable_ClientInstrumentation, g as unstable_ClientOnErrorFunction, ax as unstable_InstrumentRequestHandlerFunction, az as unstable_InstrumentRouteFunction, ay as unstable_InstrumentRouterFunction, aA as unstable_InstrumentationHandlerResult, bk as unstable_SerializesTo, aw as unstable_ServerInstrumentation } from './router-
|
|
1
|
+
import { p as Router, q as RouteModules, r as DataStrategyFunction, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, T as To, v as NavigateOptions, B as BlockerFunction, w as Blocker, x as SerializeFrom, y as RelativeRoutingType, L as Location, z as ParamParseKey, E as Path, I as PathPattern, J as PathMatch, U as UIMatch, K as Navigation, O as Action, P as Params, Q as RouteObject, G as GetLoaderData, o as GetActionData, V as InitialEntry, W as HydrationState, X as IndexRouteObject, Y as RouteComponentType, Z as HydrateFallbackType, _ as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, $ as NonIndexRouteObject, a0 as Equal, a1 as RouterState, a2 as PatchRoutesOnNavigationFunction, a3 as DataRouteObject, a as ClientLoaderFunction } from './router-CwNp5l9u.mjs';
|
|
2
|
+
export { ae as ActionFunctionArgs, b1 as Await, aS as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, aN as DataRouteMatch, af as DataStrategyFunctionArgs, ag as DataStrategyMatch, D as DataStrategyResult, ai as ErrorResponse, a8 as Fetcher, aj as FormEncType, ak as FormMethod, bj as Future, a5 as GetScrollPositionFunction, a6 as GetScrollRestorationKeyFunction, al as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aD as IDLE_BLOCKER, aC as IDLE_FETCHER, aB as IDLE_NAVIGATION, aT as IndexRouteProps, aU as LayoutRouteProps, am as LazyRouteFunction, h as LinkDescriptor, an as LoaderFunctionArgs, b2 as MemoryRouter, aV as MemoryRouterOpts, aW as MemoryRouterProps, bg as MetaArgs, j as MetaDescriptor, ao as MiddlewareFunction, b3 as Navigate, aX as NavigateProps, a9 as NavigationStates, aO as Navigator, b4 as Outlet, aY as OutletProps, bh as PageLinkDescriptor, aP as PatchRoutesOnNavigationFunctionArgs, ap as PathParam, aZ as PathRouteProps, aq as RedirectFunction, ad as RevalidationState, b5 as Route, aQ as RouteMatch, a_ as RouteProps, b6 as Router, ar as RouterContext, ac as RouterFetchOptions, e as RouterInit, ab as RouterNavigateOptions, a$ as RouterProps, b7 as RouterProvider, f as RouterProviderProps, aa as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, as as ShouldRevalidateFunctionArgs, a4 as StaticHandler, a7 as StaticHandlerContext, aR as UNSAFE_AwaitContextProvider, bp as UNSAFE_DataRouterContext, bq as UNSAFE_DataRouterStateContext, ah as UNSAFE_DataWithResponseInit, bo as UNSAFE_ErrorResponseImpl, br as UNSAFE_FetchersContext, bs as UNSAFE_LocationContext, bt as UNSAFE_NavigationContext, bu as UNSAFE_RouteContext, bv as UNSAFE_ViewTransitionContext, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps, bl as UNSAFE_createBrowserHistory, bn as UNSAFE_createRouter, bw as UNSAFE_hydrationRouteProperties, bm as UNSAFE_invariant, bx as UNSAFE_mapRouteProperties, bz as UNSAFE_withComponentProps, bD as UNSAFE_withErrorBoundaryProps, bB as UNSAFE_withHydrateFallbackProps, at as createContext, b9 as createMemoryRouter, au as createPath, ba as createRoutesFromChildren, bb as createRoutesFromElements, aE as data, aF as generatePath, aG as isRouteErrorResponse, aH as matchPath, aI as matchRoutes, av as parsePath, aJ as redirect, aK as redirectDocument, bc as renderMatches, aL as replace, aM as resolvePath, u as unstable_ClientInstrumentation, g as unstable_ClientOnErrorFunction, ax as unstable_InstrumentRequestHandlerFunction, az as unstable_InstrumentRouteFunction, ay as unstable_InstrumentRouterFunction, aA as unstable_InstrumentationHandlerResult, bk as unstable_SerializesTo, aw as unstable_ServerInstrumentation } from './router-CwNp5l9u.mjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { ReactElement } from 'react';
|
|
5
|
-
import { a as RouteModules$1, P as Pages } from './register-
|
|
6
|
-
export { b as Register } from './register-
|
|
7
|
-
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-
|
|
8
|
-
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-
|
|
5
|
+
import { a as RouteModules$1, P as Pages } from './register-C1RwVJAt.mjs';
|
|
6
|
+
export { b as Register } from './register-C1RwVJAt.mjs';
|
|
7
|
+
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-CipGfVBI.mjs';
|
|
8
|
+
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-CipGfVBI.mjs';
|
|
9
9
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
10
10
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
11
|
-
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-
|
|
12
|
-
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, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-
|
|
11
|
+
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-C5z6FZmz.mjs';
|
|
12
|
+
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, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-C5z6FZmz.mjs';
|
|
13
13
|
|
|
14
14
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
15
15
|
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined): DataStrategyFunction;
|
|
@@ -130,12 +130,14 @@ interface NavigateFunction {
|
|
|
130
130
|
*
|
|
131
131
|
* * `to` can be a string path, a {@link To} object, or a number (delta)
|
|
132
132
|
* * `options` contains options for modifying the navigation
|
|
133
|
-
* *
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* *
|
|
138
|
-
*
|
|
133
|
+
* * These options work in all modes (Framework, Data, and Declarative):
|
|
134
|
+
* * `relative`: `"route"` or `"path"` to control relative routing logic
|
|
135
|
+
* * `replace`: Replace the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack
|
|
136
|
+
* * `state`: Optional [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state) to include with the new {@link Location}
|
|
137
|
+
* * These options only work in Framework and Data modes:
|
|
138
|
+
* * `flushSync`: Wrap the DOM updates in [`ReactDom.flushSync`](https://react.dev/reference/react-dom/flushSync)
|
|
139
|
+
* * `preventScrollReset`: Do not scroll back to the top of the page after navigation
|
|
140
|
+
* * `viewTransition`: Enable [`document.startViewTransition`](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) for this navigation
|
|
139
141
|
*
|
|
140
142
|
* @example
|
|
141
143
|
* import { useNavigate } from "react-router";
|
|
@@ -867,7 +869,9 @@ declare function useBlocker(shouldBlock: boolean | BlockerFunction): Blocker;
|
|
|
867
869
|
type UseRouteArgs = [] | [routeId: keyof RouteModules$1];
|
|
868
870
|
type UseRouteResult<Args extends UseRouteArgs> = Args extends [] ? UseRoute<unknown> : Args extends ["root"] ? UseRoute<"root"> : Args extends [infer RouteId extends keyof RouteModules$1] ? UseRoute<RouteId> | undefined : never;
|
|
869
871
|
type UseRoute<RouteId extends keyof RouteModules$1 | unknown> = {
|
|
870
|
-
handle: RouteId extends keyof RouteModules$1 ? RouteModules$1[RouteId]
|
|
872
|
+
handle: RouteId extends keyof RouteModules$1 ? RouteModules$1[RouteId] extends {
|
|
873
|
+
handle: infer handle;
|
|
874
|
+
} ? handle : unknown : unknown;
|
|
871
875
|
loaderData: RouteId extends keyof RouteModules$1 ? GetLoaderData<RouteModules$1[RouteId]> | undefined : unknown;
|
|
872
876
|
actionData: RouteId extends keyof RouteModules$1 ? GetActionData<RouteModules$1[RouteId]> | undefined : unknown;
|
|
873
877
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { n as Router, o as RouteModules, p as DataStrategyFunction, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, T as To, s as NavigateOptions, B as BlockerFunction, t as Blocker, v as SerializeFrom, w as RelativeRoutingType, L as Location, x as ParamParseKey, y as Path, z as PathPattern, E as PathMatch, U as UIMatch, I as Navigation, J as Action, P as Params, K as RouteObject, G as GetLoaderData, m as GetActionData, O as InitialEntry, Q as HydrationState, V as IndexRouteObject, W as RouteComponentType, X as HydrateFallbackType, Y as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, Z as NonIndexRouteObject, _ as Equal, $ as RouterState, a0 as PatchRoutesOnNavigationFunction, a1 as DataRouteObject, a as ClientLoaderFunction } from './instrumentation-
|
|
2
|
-
export { ac as ActionFunctionArgs, b1 as Await, aQ as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, aL as DataRouteMatch, ad as DataStrategyFunctionArgs, ae as DataStrategyMatch, D as DataStrategyResult, ag as ErrorResponse, a6 as Fetcher, ah as FormEncType, ai as FormMethod, bj as Future, a3 as GetScrollPositionFunction, a4 as GetScrollRestorationKeyFunction, aj as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aB as IDLE_BLOCKER, aA as IDLE_FETCHER, az as IDLE_NAVIGATION, aR as IndexRouteProps, aT as LayoutRouteProps, ak as LazyRouteFunction, f as LinkDescriptor, al as LoaderFunctionArgs, b2 as MemoryRouter, aU as MemoryRouterOpts, aV as MemoryRouterProps, bg as MetaArgs, h as MetaDescriptor, am as MiddlewareFunction, b3 as Navigate, aW as NavigateProps, a7 as NavigationStates, aM as Navigator, b4 as Outlet, aX as OutletProps, bh as PageLinkDescriptor, aN as PatchRoutesOnNavigationFunctionArgs, an as PathParam, aY as PathRouteProps, ao as RedirectFunction, ab as RevalidationState, b5 as Route, aO as RouteMatch, aZ as RouteProps, b6 as Router, ap as RouterContext, aa as RouterFetchOptions, e as RouterInit, a9 as RouterNavigateOptions, a_ as RouterProps, b7 as RouterProvider, a$ as RouterProviderProps, a8 as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, aq as ShouldRevalidateFunctionArgs, a2 as StaticHandler, a5 as StaticHandlerContext, aP as UNSAFE_AwaitContextProvider, bp as UNSAFE_DataRouterContext, bq as UNSAFE_DataRouterStateContext, af as UNSAFE_DataWithResponseInit, bo as UNSAFE_ErrorResponseImpl, br as UNSAFE_FetchersContext, bs as UNSAFE_LocationContext, bt as UNSAFE_NavigationContext, bu as UNSAFE_RouteContext, bv as UNSAFE_ViewTransitionContext, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps, bl as UNSAFE_createBrowserHistory, bn as UNSAFE_createRouter, bw as UNSAFE_hydrationRouteProperties, bm as UNSAFE_invariant, bx as UNSAFE_mapRouteProperties, bz as UNSAFE_withComponentProps, bD as UNSAFE_withErrorBoundaryProps, bB as UNSAFE_withHydrateFallbackProps, ar as createContext, b9 as createMemoryRouter, as as createPath, ba as createRoutesFromChildren, bb as createRoutesFromElements, aC as data, aD as generatePath, aE as isRouteErrorResponse, aF as matchPath, aG as matchRoutes, at as parsePath, aH as redirect, aI as redirectDocument, bc as renderMatches, aJ as replace, aK as resolvePath, u as unstable_ClientInstrumentation, aS as unstable_ClientOnErrorFunction, av as unstable_InstrumentRequestHandlerFunction, ax as unstable_InstrumentRouteFunction, aw as unstable_InstrumentRouterFunction, ay as unstable_InstrumentationHandlerResult, bk as unstable_SerializesTo, au as unstable_ServerInstrumentation } from './instrumentation-
|
|
1
|
+
import { n as Router, o as RouteModules, p as DataStrategyFunction, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, T as To, s as NavigateOptions, B as BlockerFunction, t as Blocker, v as SerializeFrom, w as RelativeRoutingType, L as Location, x as ParamParseKey, y as Path, z as PathPattern, E as PathMatch, U as UIMatch, I as Navigation, J as Action, P as Params, K as RouteObject, G as GetLoaderData, m as GetActionData, O as InitialEntry, Q as HydrationState, V as IndexRouteObject, W as RouteComponentType, X as HydrateFallbackType, Y as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, Z as NonIndexRouteObject, _ as Equal, $ as RouterState, a0 as PatchRoutesOnNavigationFunction, a1 as DataRouteObject, a as ClientLoaderFunction } from './instrumentation-BB0wRuqz.js';
|
|
2
|
+
export { ac as ActionFunctionArgs, b1 as Await, aQ as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, aL as DataRouteMatch, ad as DataStrategyFunctionArgs, ae as DataStrategyMatch, D as DataStrategyResult, ag as ErrorResponse, a6 as Fetcher, ah as FormEncType, ai as FormMethod, bj as Future, a3 as GetScrollPositionFunction, a4 as GetScrollRestorationKeyFunction, aj as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aB as IDLE_BLOCKER, aA as IDLE_FETCHER, az as IDLE_NAVIGATION, aR as IndexRouteProps, aT as LayoutRouteProps, ak as LazyRouteFunction, f as LinkDescriptor, al as LoaderFunctionArgs, b2 as MemoryRouter, aU as MemoryRouterOpts, aV as MemoryRouterProps, bg as MetaArgs, h as MetaDescriptor, am as MiddlewareFunction, b3 as Navigate, aW as NavigateProps, a7 as NavigationStates, aM as Navigator, b4 as Outlet, aX as OutletProps, bh as PageLinkDescriptor, aN as PatchRoutesOnNavigationFunctionArgs, an as PathParam, aY as PathRouteProps, ao as RedirectFunction, ab as RevalidationState, b5 as Route, aO as RouteMatch, aZ as RouteProps, b6 as Router, ap as RouterContext, aa as RouterFetchOptions, e as RouterInit, a9 as RouterNavigateOptions, a_ as RouterProps, b7 as RouterProvider, a$ as RouterProviderProps, a8 as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, aq as ShouldRevalidateFunctionArgs, a2 as StaticHandler, a5 as StaticHandlerContext, aP as UNSAFE_AwaitContextProvider, bp as UNSAFE_DataRouterContext, bq as UNSAFE_DataRouterStateContext, af as UNSAFE_DataWithResponseInit, bo as UNSAFE_ErrorResponseImpl, br as UNSAFE_FetchersContext, bs as UNSAFE_LocationContext, bt as UNSAFE_NavigationContext, bu as UNSAFE_RouteContext, bv as UNSAFE_ViewTransitionContext, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps, bl as UNSAFE_createBrowserHistory, bn as UNSAFE_createRouter, bw as UNSAFE_hydrationRouteProperties, bm as UNSAFE_invariant, bx as UNSAFE_mapRouteProperties, bz as UNSAFE_withComponentProps, bD as UNSAFE_withErrorBoundaryProps, bB as UNSAFE_withHydrateFallbackProps, ar as createContext, b9 as createMemoryRouter, as as createPath, ba as createRoutesFromChildren, bb as createRoutesFromElements, aC as data, aD as generatePath, aE as isRouteErrorResponse, aF as matchPath, aG as matchRoutes, at as parsePath, aH as redirect, aI as redirectDocument, bc as renderMatches, aJ as replace, aK as resolvePath, u as unstable_ClientInstrumentation, aS as unstable_ClientOnErrorFunction, av as unstable_InstrumentRequestHandlerFunction, ax as unstable_InstrumentRouteFunction, aw as unstable_InstrumentRouterFunction, ay as unstable_InstrumentationHandlerResult, bk as unstable_SerializesTo, au as unstable_ServerInstrumentation } from './instrumentation-BB0wRuqz.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { ReactElement } from 'react';
|
|
5
|
-
import { a as RouteModules$1, P as Pages } from './register-
|
|
6
|
-
export { b as Register } from './register-
|
|
7
|
-
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-
|
|
8
|
-
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-
|
|
5
|
+
import { a as RouteModules$1, P as Pages } from './register-ODDAAYlf.js';
|
|
6
|
+
export { b as Register } from './register-ODDAAYlf.js';
|
|
7
|
+
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-CCjKYJTH.js';
|
|
8
|
+
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-CCjKYJTH.js';
|
|
9
9
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
10
10
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
11
|
-
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-
|
|
12
|
-
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, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-
|
|
11
|
+
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-BpxEZgZC.js';
|
|
12
|
+
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, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-BpxEZgZC.js';
|
|
13
13
|
|
|
14
14
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
15
15
|
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined): DataStrategyFunction;
|
|
@@ -130,12 +130,14 @@ interface NavigateFunction {
|
|
|
130
130
|
*
|
|
131
131
|
* * `to` can be a string path, a {@link To} object, or a number (delta)
|
|
132
132
|
* * `options` contains options for modifying the navigation
|
|
133
|
-
* *
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* *
|
|
138
|
-
*
|
|
133
|
+
* * These options work in all modes (Framework, Data, and Declarative):
|
|
134
|
+
* * `relative`: `"route"` or `"path"` to control relative routing logic
|
|
135
|
+
* * `replace`: Replace the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack
|
|
136
|
+
* * `state`: Optional [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state) to include with the new {@link Location}
|
|
137
|
+
* * These options only work in Framework and Data modes:
|
|
138
|
+
* * `flushSync`: Wrap the DOM updates in [`ReactDom.flushSync`](https://react.dev/reference/react-dom/flushSync)
|
|
139
|
+
* * `preventScrollReset`: Do not scroll back to the top of the page after navigation
|
|
140
|
+
* * `viewTransition`: Enable [`document.startViewTransition`](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) for this navigation
|
|
139
141
|
*
|
|
140
142
|
* @example
|
|
141
143
|
* import { useNavigate } from "react-router";
|
|
@@ -867,7 +869,9 @@ declare function useBlocker(shouldBlock: boolean | BlockerFunction): Blocker;
|
|
|
867
869
|
type UseRouteArgs = [] | [routeId: keyof RouteModules$1];
|
|
868
870
|
type UseRouteResult<Args extends UseRouteArgs> = Args extends [] ? UseRoute<unknown> : Args extends ["root"] ? UseRoute<"root"> : Args extends [infer RouteId extends keyof RouteModules$1] ? UseRoute<RouteId> | undefined : never;
|
|
869
871
|
type UseRoute<RouteId extends keyof RouteModules$1 | unknown> = {
|
|
870
|
-
handle: RouteId extends keyof RouteModules$1 ? RouteModules$1[RouteId]
|
|
872
|
+
handle: RouteId extends keyof RouteModules$1 ? RouteModules$1[RouteId] extends {
|
|
873
|
+
handle: infer handle;
|
|
874
|
+
} ? handle : unknown : unknown;
|
|
871
875
|
loaderData: RouteId extends keyof RouteModules$1 ? GetLoaderData<RouteModules$1[RouteId]> | undefined : unknown;
|
|
872
876
|
actionData: RouteId extends keyof RouteModules$1 ? GetActionData<RouteModules$1[RouteId]> | undefined : unknown;
|
|
873
877
|
};
|