react-router 7.1.1 → 7.1.2-pre.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 +16 -1
- package/dist/development/{chunk-K6AXKMTT.mjs → chunk-UCVHOMP5.mjs} +10 -8
- package/dist/development/dom-export.d.mts +3 -3
- package/dist/development/dom-export.d.ts +3 -3
- package/dist/development/dom-export.js +9 -7
- package/dist/development/dom-export.mjs +2 -2
- package/dist/{production/fog-of-war-BhhVTjSZ.d.mts → development/fog-of-war-Ckdfl79L.d.ts} +8 -8
- package/dist/development/{fog-of-war-DLtn2OLr.d.ts → fog-of-war-ClXvjZ4E.d.mts} +8 -8
- package/dist/development/index.d.mts +7 -7
- package/dist/development/index.d.ts +7 -7
- package/dist/development/index.js +10 -8
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/route-module.d.mts +1 -1
- package/dist/development/lib/types/route-module.d.ts +1 -1
- package/dist/development/lib/types/route-module.js +1 -1
- package/dist/development/lib/types/route-module.mjs +1 -1
- package/dist/development/{route-data-aSUFWnQ6.d.ts → route-data-Cw8htKcF.d.mts} +10 -8
- package/dist/{production/route-data-aSUFWnQ6.d.mts → development/route-data-Cw8htKcF.d.ts} +10 -8
- package/dist/production/{chunk-CFRHUJMS.mjs → chunk-3FJJQETC.mjs} +10 -8
- package/dist/production/dom-export.d.mts +3 -3
- package/dist/production/dom-export.d.ts +3 -3
- package/dist/production/dom-export.js +9 -7
- package/dist/production/dom-export.mjs +2 -2
- package/dist/{development/fog-of-war-BhhVTjSZ.d.mts → production/fog-of-war-Ckdfl79L.d.ts} +8 -8
- package/dist/production/{fog-of-war-DLtn2OLr.d.ts → fog-of-war-ClXvjZ4E.d.mts} +8 -8
- package/dist/production/index.d.mts +7 -7
- package/dist/production/index.d.ts +7 -7
- package/dist/production/index.js +10 -8
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/route-module.d.mts +1 -1
- package/dist/production/lib/types/route-module.d.ts +1 -1
- package/dist/production/lib/types/route-module.js +1 -1
- package/dist/production/lib/types/route-module.mjs +1 -1
- package/dist/production/{route-data-aSUFWnQ6.d.ts → route-data-Cw8htKcF.d.mts} +10 -8
- package/dist/{development/route-data-aSUFWnQ6.d.mts → production/route-data-Cw8htKcF.d.ts} +10 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.1.2-pre.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix issue with fetcher data cleanup in the data layer on fetcher unmount ([#12681](https://github.com/remix-run/react-router/pull/12681))
|
|
8
|
+
- Do not rely on `symbol` for filtering out `redirect` responses from loader data ([#12694](https://github.com/remix-run/react-router/pull/12694))
|
|
9
|
+
|
|
10
|
+
Previously, some projects were getting type checking errors like:
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
error TS4058: Return type of exported function has or is using name 'redirectSymbol' from external module "node_modules/..." but cannot be named.
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Now that `symbol`s are not used for the `redirect` response type, these errors should no longer be present.
|
|
17
|
+
|
|
3
18
|
## 7.1.1
|
|
4
19
|
|
|
5
20
|
## 7.1.0
|
|
@@ -40,7 +55,7 @@
|
|
|
40
55
|
- Collapse `@remix-run/server-runtime` into `react-router`
|
|
41
56
|
- Collapse `@remix-run/testing` into `react-router`
|
|
42
57
|
|
|
43
|
-
- Remove
|
|
58
|
+
- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
|
|
44
59
|
|
|
45
60
|
- Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391))
|
|
46
61
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.1.
|
|
2
|
+
* react-router v7.1.2-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -684,7 +684,7 @@ function decodePath(value) {
|
|
|
684
684
|
} catch (error) {
|
|
685
685
|
warning(
|
|
686
686
|
false,
|
|
687
|
-
`The URL path "${value}" could not be decoded because it is
|
|
687
|
+
`The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`
|
|
688
688
|
);
|
|
689
689
|
return value;
|
|
690
690
|
}
|
|
@@ -812,10 +812,7 @@ var redirect = (url, init = 302) => {
|
|
|
812
812
|
}
|
|
813
813
|
let headers = new Headers(responseInit.headers);
|
|
814
814
|
headers.set("Location", url);
|
|
815
|
-
return new Response(null, {
|
|
816
|
-
...responseInit,
|
|
817
|
-
headers
|
|
818
|
-
});
|
|
815
|
+
return new Response(null, { ...responseInit, headers });
|
|
819
816
|
};
|
|
820
817
|
var redirectDocument = (url, init) => {
|
|
821
818
|
let response = redirect(url, init);
|
|
@@ -1098,6 +1095,11 @@ function createRouter(init) {
|
|
|
1098
1095
|
}
|
|
1099
1096
|
}
|
|
1100
1097
|
});
|
|
1098
|
+
fetchersQueuedForDeletion.forEach((key) => {
|
|
1099
|
+
if (!state.fetchers.has(key) && !fetchControllers.has(key)) {
|
|
1100
|
+
unmountedFetchers.push(key);
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1101
1103
|
[...subscribers].forEach(
|
|
1102
1104
|
(subscriber) => subscriber(state, {
|
|
1103
1105
|
deletedFetchers: unmountedFetchers,
|
|
@@ -4741,12 +4743,12 @@ function RouterProvider({
|
|
|
4741
4743
|
let fetcherData = React3.useRef(/* @__PURE__ */ new Map());
|
|
4742
4744
|
let setState = React3.useCallback(
|
|
4743
4745
|
(newState, { deletedFetchers, flushSync, viewTransitionOpts }) => {
|
|
4744
|
-
deletedFetchers.forEach((key) => fetcherData.current.delete(key));
|
|
4745
4746
|
newState.fetchers.forEach((fetcher, key) => {
|
|
4746
4747
|
if (fetcher.data !== void 0) {
|
|
4747
4748
|
fetcherData.current.set(key, fetcher.data);
|
|
4748
4749
|
}
|
|
4749
4750
|
});
|
|
4751
|
+
deletedFetchers.forEach((key) => fetcherData.current.delete(key));
|
|
4750
4752
|
warnOnce(
|
|
4751
4753
|
flushSync === false || reactDomFlushSyncImpl != null,
|
|
4752
4754
|
'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
|
|
@@ -6980,7 +6982,7 @@ function mergeRefs(...refs) {
|
|
|
6980
6982
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
6981
6983
|
try {
|
|
6982
6984
|
if (isBrowser) {
|
|
6983
|
-
window.__reactRouterVersion = "7.1.
|
|
6985
|
+
window.__reactRouterVersion = "7.1.2-pre.0";
|
|
6984
6986
|
}
|
|
6985
6987
|
} catch (e) {
|
|
6986
6988
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './fog-of-war-
|
|
3
|
-
import './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-ClXvjZ4E.mjs';
|
|
3
|
+
import './route-data-Cw8htKcF.mjs';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @category
|
|
9
|
+
* @category Component Routers
|
|
10
10
|
*/
|
|
11
11
|
declare function HydratedRouter(): React.JSX.Element;
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './fog-of-war-
|
|
3
|
-
import './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-Ckdfl79L.js';
|
|
3
|
+
import './route-data-Cw8htKcF.js';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @category
|
|
9
|
+
* @category Component Routers
|
|
10
10
|
*/
|
|
11
11
|
declare function HydratedRouter(): React.JSX.Element;
|
|
12
12
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.1.
|
|
2
|
+
* react-router v7.1.2-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -551,7 +551,7 @@ function decodePath(value) {
|
|
|
551
551
|
} catch (error) {
|
|
552
552
|
warning(
|
|
553
553
|
false,
|
|
554
|
-
`The URL path "${value}" could not be decoded because it is
|
|
554
|
+
`The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`
|
|
555
555
|
);
|
|
556
556
|
return value;
|
|
557
557
|
}
|
|
@@ -679,10 +679,7 @@ var redirect = (url, init = 302) => {
|
|
|
679
679
|
}
|
|
680
680
|
let headers = new Headers(responseInit.headers);
|
|
681
681
|
headers.set("Location", url);
|
|
682
|
-
return new Response(null, {
|
|
683
|
-
...responseInit,
|
|
684
|
-
headers
|
|
685
|
-
});
|
|
682
|
+
return new Response(null, { ...responseInit, headers });
|
|
686
683
|
};
|
|
687
684
|
var ErrorResponseImpl = class {
|
|
688
685
|
constructor(status, statusText, data2, internal = false) {
|
|
@@ -955,6 +952,11 @@ function createRouter(init) {
|
|
|
955
952
|
}
|
|
956
953
|
}
|
|
957
954
|
});
|
|
955
|
+
fetchersQueuedForDeletion.forEach((key) => {
|
|
956
|
+
if (!state.fetchers.has(key) && !fetchControllers.has(key)) {
|
|
957
|
+
unmountedFetchers.push(key);
|
|
958
|
+
}
|
|
959
|
+
});
|
|
958
960
|
[...subscribers].forEach(
|
|
959
961
|
(subscriber) => subscriber(state, {
|
|
960
962
|
deletedFetchers: unmountedFetchers,
|
|
@@ -3953,12 +3955,12 @@ function RouterProvider({
|
|
|
3953
3955
|
let fetcherData = React3.useRef(/* @__PURE__ */ new Map());
|
|
3954
3956
|
let setState = React3.useCallback(
|
|
3955
3957
|
(newState, { deletedFetchers, flushSync: flushSync2, viewTransitionOpts }) => {
|
|
3956
|
-
deletedFetchers.forEach((key) => fetcherData.current.delete(key));
|
|
3957
3958
|
newState.fetchers.forEach((fetcher, key) => {
|
|
3958
3959
|
if (fetcher.data !== void 0) {
|
|
3959
3960
|
fetcherData.current.set(key, fetcher.data);
|
|
3960
3961
|
}
|
|
3961
3962
|
});
|
|
3963
|
+
deletedFetchers.forEach((key) => fetcherData.current.delete(key));
|
|
3962
3964
|
warnOnce(
|
|
3963
3965
|
flushSync2 === false || reactDomFlushSyncImpl != null,
|
|
3964
3966
|
'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.1.
|
|
2
|
+
* react-router v7.1.2-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
matchRoutes,
|
|
26
26
|
shouldHydrateRouteLoader,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UCVHOMP5.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { n as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, g as RelativeRoutingType, v as NonIndexRouteObject, a0 as LazyRouteFunction, u as IndexRouteObject, h as Location, i as Action, al as Navigator, ao as RouteMatch, r as StaticHandlerContext, d as RouteManifest, R as RouteModules, ak as DataRouteObject, aH as RouteModule, $ as HTMLFormMethod, Z as FormEncType, at as PageLinkDescriptor, aI as History, x as GetScrollRestorationKeyFunction, N as NavigateOptions, y as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-
|
|
2
|
+
import { n as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, g as RelativeRoutingType, v as NonIndexRouteObject, a0 as LazyRouteFunction, u as IndexRouteObject, h as Location, i as Action, al as Navigator, ao as RouteMatch, r as StaticHandlerContext, d as RouteManifest, R as RouteModules, ak as DataRouteObject, aH as RouteModule, $ as HTMLFormMethod, Z as FormEncType, at as PageLinkDescriptor, aI as History, x as GetScrollRestorationKeyFunction, N as NavigateOptions, y as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-Cw8htKcF.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -8,7 +8,7 @@ declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> &
|
|
|
8
8
|
hasErrorBoundary: boolean;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* @category Routers
|
|
11
|
+
* @category Data Routers
|
|
12
12
|
*/
|
|
13
13
|
declare function createMemoryRouter(routes: RouteObject[], opts?: {
|
|
14
14
|
basename?: string;
|
|
@@ -39,7 +39,7 @@ interface MemoryRouterProps {
|
|
|
39
39
|
/**
|
|
40
40
|
* A `<Router>` that stores all entries in memory.
|
|
41
41
|
*
|
|
42
|
-
* @category
|
|
42
|
+
* @category Component Routers
|
|
43
43
|
*/
|
|
44
44
|
declare function MemoryRouter({ basename, children, initialEntries, initialIndex, }: MemoryRouterProps): React.ReactElement;
|
|
45
45
|
/**
|
|
@@ -662,11 +662,11 @@ interface DOMRouterOpts {
|
|
|
662
662
|
window?: Window;
|
|
663
663
|
}
|
|
664
664
|
/**
|
|
665
|
-
* @category Routers
|
|
665
|
+
* @category Data Routers
|
|
666
666
|
*/
|
|
667
667
|
declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts): Router$1;
|
|
668
668
|
/**
|
|
669
|
-
* @category Routers
|
|
669
|
+
* @category Data Routers
|
|
670
670
|
*/
|
|
671
671
|
declare function createHashRouter(routes: RouteObject[], opts?: DOMRouterOpts): Router$1;
|
|
672
672
|
/**
|
|
@@ -680,7 +680,7 @@ interface BrowserRouterProps {
|
|
|
680
680
|
/**
|
|
681
681
|
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
|
|
682
682
|
*
|
|
683
|
-
* @category
|
|
683
|
+
* @category Component Routers
|
|
684
684
|
*/
|
|
685
685
|
declare function BrowserRouter({ basename, children, window, }: BrowserRouterProps): React.JSX.Element;
|
|
686
686
|
/**
|
|
@@ -695,7 +695,7 @@ interface HashRouterProps {
|
|
|
695
695
|
* A `<Router>` for use in web browsers. Stores the location in the hash
|
|
696
696
|
* portion of the URL so it is not sent to the server.
|
|
697
697
|
*
|
|
698
|
-
* @category
|
|
698
|
+
* @category Component Routers
|
|
699
699
|
*/
|
|
700
700
|
declare function HashRouter({ basename, children, window }: HashRouterProps): React.JSX.Element;
|
|
701
701
|
/**
|
|
@@ -713,7 +713,7 @@ interface HistoryRouterProps {
|
|
|
713
713
|
* version of the history library that React Router uses internally.
|
|
714
714
|
*
|
|
715
715
|
* @name unstable_HistoryRouter
|
|
716
|
-
* @category
|
|
716
|
+
* @category Component Routers
|
|
717
717
|
*/
|
|
718
718
|
declare function HistoryRouter({ basename, children, history, }: HistoryRouterProps): React.JSX.Element;
|
|
719
719
|
declare namespace HistoryRouter {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { n as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, g as RelativeRoutingType, v as NonIndexRouteObject, a0 as LazyRouteFunction, u as IndexRouteObject, h as Location, i as Action, al as Navigator, ao as RouteMatch, r as StaticHandlerContext, d as RouteManifest, R as RouteModules, ak as DataRouteObject, aH as RouteModule, $ as HTMLFormMethod, Z as FormEncType, at as PageLinkDescriptor, aI as History, x as GetScrollRestorationKeyFunction, N as NavigateOptions, y as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-
|
|
2
|
+
import { n as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, g as RelativeRoutingType, v as NonIndexRouteObject, a0 as LazyRouteFunction, u as IndexRouteObject, h as Location, i as Action, al as Navigator, ao as RouteMatch, r as StaticHandlerContext, d as RouteManifest, R as RouteModules, ak as DataRouteObject, aH as RouteModule, $ as HTMLFormMethod, Z as FormEncType, at as PageLinkDescriptor, aI as History, x as GetScrollRestorationKeyFunction, N as NavigateOptions, y as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-Cw8htKcF.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -8,7 +8,7 @@ declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> &
|
|
|
8
8
|
hasErrorBoundary: boolean;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* @category Routers
|
|
11
|
+
* @category Data Routers
|
|
12
12
|
*/
|
|
13
13
|
declare function createMemoryRouter(routes: RouteObject[], opts?: {
|
|
14
14
|
basename?: string;
|
|
@@ -39,7 +39,7 @@ interface MemoryRouterProps {
|
|
|
39
39
|
/**
|
|
40
40
|
* A `<Router>` that stores all entries in memory.
|
|
41
41
|
*
|
|
42
|
-
* @category
|
|
42
|
+
* @category Component Routers
|
|
43
43
|
*/
|
|
44
44
|
declare function MemoryRouter({ basename, children, initialEntries, initialIndex, }: MemoryRouterProps): React.ReactElement;
|
|
45
45
|
/**
|
|
@@ -662,11 +662,11 @@ interface DOMRouterOpts {
|
|
|
662
662
|
window?: Window;
|
|
663
663
|
}
|
|
664
664
|
/**
|
|
665
|
-
* @category Routers
|
|
665
|
+
* @category Data Routers
|
|
666
666
|
*/
|
|
667
667
|
declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts): Router$1;
|
|
668
668
|
/**
|
|
669
|
-
* @category Routers
|
|
669
|
+
* @category Data Routers
|
|
670
670
|
*/
|
|
671
671
|
declare function createHashRouter(routes: RouteObject[], opts?: DOMRouterOpts): Router$1;
|
|
672
672
|
/**
|
|
@@ -680,7 +680,7 @@ interface BrowserRouterProps {
|
|
|
680
680
|
/**
|
|
681
681
|
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
|
|
682
682
|
*
|
|
683
|
-
* @category
|
|
683
|
+
* @category Component Routers
|
|
684
684
|
*/
|
|
685
685
|
declare function BrowserRouter({ basename, children, window, }: BrowserRouterProps): React.JSX.Element;
|
|
686
686
|
/**
|
|
@@ -695,7 +695,7 @@ interface HashRouterProps {
|
|
|
695
695
|
* A `<Router>` for use in web browsers. Stores the location in the hash
|
|
696
696
|
* portion of the URL so it is not sent to the server.
|
|
697
697
|
*
|
|
698
|
-
* @category
|
|
698
|
+
* @category Component Routers
|
|
699
699
|
*/
|
|
700
700
|
declare function HashRouter({ basename, children, window }: HashRouterProps): React.JSX.Element;
|
|
701
701
|
/**
|
|
@@ -713,7 +713,7 @@ interface HistoryRouterProps {
|
|
|
713
713
|
* version of the history library that React Router uses internally.
|
|
714
714
|
*
|
|
715
715
|
* @name unstable_HistoryRouter
|
|
716
|
-
* @category
|
|
716
|
+
* @category Component Routers
|
|
717
717
|
*/
|
|
718
718
|
declare function HistoryRouter({ basename, children, history, }: HistoryRouterProps): React.JSX.Element;
|
|
719
719
|
declare namespace HistoryRouter {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-
|
|
2
|
-
export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-
|
|
4
|
-
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-
|
|
1
|
+
import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-Cw8htKcF.mjs';
|
|
2
|
+
export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-Cw8htKcF.mjs';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-ClXvjZ4E.mjs';
|
|
4
|
+
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-ClXvjZ4E.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -477,7 +477,7 @@ interface StaticRouterProps {
|
|
|
477
477
|
* A `<Router>` that may not navigate to any other location. This is useful
|
|
478
478
|
* on the server where there is no stateful UI.
|
|
479
479
|
*
|
|
480
|
-
* @category
|
|
480
|
+
* @category Component Routers
|
|
481
481
|
*/
|
|
482
482
|
declare function StaticRouter({ basename, children, location: locationProp, }: StaticRouterProps): React.JSX.Element;
|
|
483
483
|
interface StaticRouterProviderProps {
|
|
@@ -490,7 +490,7 @@ interface StaticRouterProviderProps {
|
|
|
490
490
|
* A Data Router that may not navigate to any other location. This is useful
|
|
491
491
|
* on the server where there is no stateful UI.
|
|
492
492
|
*
|
|
493
|
-
* @category
|
|
493
|
+
* @category Component Routers
|
|
494
494
|
*/
|
|
495
495
|
declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
|
|
496
496
|
type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRouteProperties">;
|
|
@@ -499,7 +499,7 @@ type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRoutePr
|
|
|
499
499
|
*/
|
|
500
500
|
declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
|
|
501
501
|
/**
|
|
502
|
-
* @category Routers
|
|
502
|
+
* @category Data Routers
|
|
503
503
|
*/
|
|
504
504
|
declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
|
|
505
505
|
future?: Partial<FutureConfig$1>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-
|
|
2
|
-
export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-
|
|
4
|
-
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-
|
|
1
|
+
import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-Cw8htKcF.js';
|
|
2
|
+
export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-Cw8htKcF.js';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-Ckdfl79L.js';
|
|
4
|
+
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-Ckdfl79L.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -477,7 +477,7 @@ interface StaticRouterProps {
|
|
|
477
477
|
* A `<Router>` that may not navigate to any other location. This is useful
|
|
478
478
|
* on the server where there is no stateful UI.
|
|
479
479
|
*
|
|
480
|
-
* @category
|
|
480
|
+
* @category Component Routers
|
|
481
481
|
*/
|
|
482
482
|
declare function StaticRouter({ basename, children, location: locationProp, }: StaticRouterProps): React.JSX.Element;
|
|
483
483
|
interface StaticRouterProviderProps {
|
|
@@ -490,7 +490,7 @@ interface StaticRouterProviderProps {
|
|
|
490
490
|
* A Data Router that may not navigate to any other location. This is useful
|
|
491
491
|
* on the server where there is no stateful UI.
|
|
492
492
|
*
|
|
493
|
-
* @category
|
|
493
|
+
* @category Component Routers
|
|
494
494
|
*/
|
|
495
495
|
declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
|
|
496
496
|
type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRouteProperties">;
|
|
@@ -499,7 +499,7 @@ type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRoutePr
|
|
|
499
499
|
*/
|
|
500
500
|
declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
|
|
501
501
|
/**
|
|
502
|
-
* @category Routers
|
|
502
|
+
* @category Data Routers
|
|
503
503
|
*/
|
|
504
504
|
declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
|
|
505
505
|
future?: Partial<FutureConfig$1>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.1.
|
|
2
|
+
* react-router v7.1.2-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -829,7 +829,7 @@ function decodePath(value) {
|
|
|
829
829
|
} catch (error) {
|
|
830
830
|
warning(
|
|
831
831
|
false,
|
|
832
|
-
`The URL path "${value}" could not be decoded because it is
|
|
832
|
+
`The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`
|
|
833
833
|
);
|
|
834
834
|
return value;
|
|
835
835
|
}
|
|
@@ -957,10 +957,7 @@ var redirect = (url, init = 302) => {
|
|
|
957
957
|
}
|
|
958
958
|
let headers = new Headers(responseInit.headers);
|
|
959
959
|
headers.set("Location", url);
|
|
960
|
-
return new Response(null, {
|
|
961
|
-
...responseInit,
|
|
962
|
-
headers
|
|
963
|
-
});
|
|
960
|
+
return new Response(null, { ...responseInit, headers });
|
|
964
961
|
};
|
|
965
962
|
var redirectDocument = (url, init) => {
|
|
966
963
|
let response = redirect(url, init);
|
|
@@ -1243,6 +1240,11 @@ function createRouter(init) {
|
|
|
1243
1240
|
}
|
|
1244
1241
|
}
|
|
1245
1242
|
});
|
|
1243
|
+
fetchersQueuedForDeletion.forEach((key) => {
|
|
1244
|
+
if (!state.fetchers.has(key) && !fetchControllers.has(key)) {
|
|
1245
|
+
unmountedFetchers.push(key);
|
|
1246
|
+
}
|
|
1247
|
+
});
|
|
1246
1248
|
[...subscribers].forEach(
|
|
1247
1249
|
(subscriber) => subscriber(state, {
|
|
1248
1250
|
deletedFetchers: unmountedFetchers,
|
|
@@ -4886,12 +4888,12 @@ function RouterProvider({
|
|
|
4886
4888
|
let fetcherData = React3.useRef(/* @__PURE__ */ new Map());
|
|
4887
4889
|
let setState = React3.useCallback(
|
|
4888
4890
|
(newState, { deletedFetchers, flushSync, viewTransitionOpts }) => {
|
|
4889
|
-
deletedFetchers.forEach((key) => fetcherData.current.delete(key));
|
|
4890
4891
|
newState.fetchers.forEach((fetcher, key) => {
|
|
4891
4892
|
if (fetcher.data !== void 0) {
|
|
4892
4893
|
fetcherData.current.set(key, fetcher.data);
|
|
4893
4894
|
}
|
|
4894
4895
|
});
|
|
4896
|
+
deletedFetchers.forEach((key) => fetcherData.current.delete(key));
|
|
4895
4897
|
warnOnce(
|
|
4896
4898
|
flushSync === false || reactDomFlushSyncImpl != null,
|
|
4897
4899
|
'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
|
|
@@ -7125,7 +7127,7 @@ function mergeRefs(...refs) {
|
|
|
7125
7127
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7126
7128
|
try {
|
|
7127
7129
|
if (isBrowser) {
|
|
7128
|
-
window.__reactRouterVersion = "7.1.
|
|
7130
|
+
window.__reactRouterVersion = "7.1.2-pre.0";
|
|
7129
7131
|
}
|
|
7130
7132
|
} catch (e) {
|
|
7131
7133
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.1.
|
|
2
|
+
* react-router v7.1.2-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
useSearchParams,
|
|
121
121
|
useSubmit,
|
|
122
122
|
useViewTransitionState
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-UCVHOMP5.mjs";
|
|
124
124
|
export {
|
|
125
125
|
Await,
|
|
126
126
|
BrowserRouter,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-
|
|
1
|
+
import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-Cw8htKcF.mjs';
|
|
2
2
|
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-
|
|
1
|
+
import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-Cw8htKcF.js';
|
|
2
2
|
import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -551,11 +551,7 @@ declare class DataWithResponseInit<D> {
|
|
|
551
551
|
* @category Utils
|
|
552
552
|
*/
|
|
553
553
|
declare function data<D>(data: D, init?: number | ResponseInit): DataWithResponseInit<D>;
|
|
554
|
-
type RedirectFunction = (url: string, init?: number | ResponseInit) =>
|
|
555
|
-
declare const redirectSymbol: unique symbol;
|
|
556
|
-
type Redirect = Response & {
|
|
557
|
-
[redirectSymbol]: never;
|
|
558
|
-
};
|
|
554
|
+
type RedirectFunction = (url: string, init?: number | ResponseInit) => Response;
|
|
559
555
|
/**
|
|
560
556
|
* A redirect response. Sets the status code and the `Location` header.
|
|
561
557
|
* Defaults to "302 Found".
|
|
@@ -796,7 +792,7 @@ interface Router {
|
|
|
796
792
|
}
|
|
797
793
|
/**
|
|
798
794
|
* State maintained internally by the router. During a navigation, all states
|
|
799
|
-
* reflect the
|
|
795
|
+
* reflect the "old" location unless otherwise noted.
|
|
800
796
|
*/
|
|
801
797
|
interface RouterState {
|
|
802
798
|
/**
|
|
@@ -1204,11 +1200,17 @@ declare const ViewTransitionContext: React.Context<ViewTransitionContextObject>;
|
|
|
1204
1200
|
type FetchersContextObject = Map<string, any>;
|
|
1205
1201
|
declare const FetchersContext: React.Context<FetchersContextObject>;
|
|
1206
1202
|
interface NavigateOptions {
|
|
1203
|
+
/** Replace the current entry in the history stack instead of pushing a new one */
|
|
1207
1204
|
replace?: boolean;
|
|
1205
|
+
/** Adds persistent client side routing state to the next location */
|
|
1208
1206
|
state?: any;
|
|
1207
|
+
/** If you are using {@link https://api.reactrouter.com/v7/functions/react_router.ScrollRestoration.html <ScrollRestoration>}, prevent the scroll position from being reset to the top of the window when navigating */
|
|
1209
1208
|
preventScrollReset?: boolean;
|
|
1209
|
+
/** Defines the relative path behavior for the link. "route" will use the route hierarchy so ".." will remove all URL segments of the current route pattern while "path" will use the URL path so ".." will remove one URL segment. */
|
|
1210
1210
|
relative?: RelativeRoutingType;
|
|
1211
|
+
/** Wraps the initial state update for this navigation in a {@link https://react.dev/reference/react-dom/flushSync ReactDOM.flushSync} call instead of the default {@link https://react.dev/reference/react/startTransition React.startTransition} */
|
|
1211
1212
|
flushSync?: boolean;
|
|
1213
|
+
/** Enables a {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API View Transition} for this navigation by wrapping the final state update in `document.startViewTransition()`. If you need to apply specific styles for this view transition, you will also need to leverage the {@link https://api.reactrouter.com/v7/functions/react_router.useViewTransitionState.html useViewTransitionState()} hook. */
|
|
1212
1214
|
viewTransition?: boolean;
|
|
1213
1215
|
}
|
|
1214
1216
|
/**
|
|
@@ -1541,8 +1543,8 @@ type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => u
|
|
|
1541
1543
|
} : undefined;
|
|
1542
1544
|
type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T;
|
|
1543
1545
|
type DataFrom<T> = IsAny<T> extends true ? undefined : T extends Func ? VoidToUndefined<Awaited<ReturnType<T>>> : undefined;
|
|
1544
|
-
type ClientData<T> = T extends
|
|
1545
|
-
type ServerData<T> = T extends
|
|
1546
|
+
type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? U : T;
|
|
1547
|
+
type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
|
|
1546
1548
|
type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
1547
1549
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1548
1550
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|