react-router 7.6.2 → 7.6.3
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 +22 -1
- package/dist/development/{chunk-NL6KNZEE.mjs → chunk-QMGIS6GS.mjs} +2 -2
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.js +1 -1
- package/dist/development/dom-export.mjs +2 -2
- package/dist/development/index.d.mts +4 -4
- package/dist/development/index.d.ts +2 -2
- package/dist/development/index.js +2 -2
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/internal.d.mts +7 -71
- package/dist/development/lib/types/internal.d.ts +7 -71
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/lib-C1JSsICm.d.mts → development/lib-B33EY9A0.d.mts} +1 -1
- package/dist/{production/register-DCE0tH5m.d.ts → development/register-COAKzST_.d.ts} +68 -2
- package/dist/{production/route-data-ByAYLHuM.d.mts → development/route-data-D7Xbr_Ww.d.mts} +68 -2
- package/dist/production/{chunk-JRQCFVZH.mjs → chunk-S4Z2UWCU.mjs} +2 -2
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.js +1 -1
- package/dist/production/dom-export.mjs +2 -2
- package/dist/production/index.d.mts +4 -4
- package/dist/production/index.d.ts +2 -2
- package/dist/production/index.js +2 -2
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/internal.d.mts +7 -71
- package/dist/production/lib/types/internal.d.ts +7 -71
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/lib-C1JSsICm.d.mts → production/lib-B33EY9A0.d.mts} +1 -1
- package/dist/{development/register-DCE0tH5m.d.ts → production/register-COAKzST_.d.ts} +68 -2
- package/dist/{development/route-data-ByAYLHuM.d.mts → production/route-data-D7Xbr_Ww.d.mts} +68 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Do not serialize types for `useRouteLoaderData<typeof clientLoader>` ([#13752](https://github.com/remix-run/react-router/pull/13752))
|
|
8
|
+
|
|
9
|
+
For types to distinguish a `clientLoader` from a `serverLoader`, you MUST annotate `clientLoader` args:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
// 👇 annotation required to skip serializing types
|
|
13
|
+
export function clientLoader({}: Route.ClientLoaderArgs) {
|
|
14
|
+
return { fn: () => "earth" };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function SomeComponent() {
|
|
18
|
+
const data = useRouteLoaderData<typeof clientLoader>("routes/this-route");
|
|
19
|
+
const planet = data?.fn() ?? "world";
|
|
20
|
+
return <h1>Hello, {planet}!</h1>;
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
3
24
|
## 7.6.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
6
27
|
|
|
7
28
|
- Avoid additional `with-props` chunk in Framework Mode by moving route module component prop logic from the Vite plugin to `react-router` ([#13650](https://github.com/remix-run/react-router/pull/13650))
|
|
8
|
-
-
|
|
29
|
+
- Slight refactor of internal `headers()` function processing for use with RSC ([#13639](https://github.com/remix-run/react-router/pull/13639))
|
|
9
30
|
|
|
10
31
|
## 7.6.1
|
|
11
32
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8717,7 +8717,7 @@ function mergeRefs(...refs) {
|
|
|
8717
8717
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8718
8718
|
try {
|
|
8719
8719
|
if (isBrowser) {
|
|
8720
|
-
window.__reactRouterVersion = "7.6.
|
|
8720
|
+
window.__reactRouterVersion = "7.6.3";
|
|
8721
8721
|
}
|
|
8722
8722
|
} catch (e) {
|
|
8723
8723
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './lib-
|
|
3
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './lib-B33EY9A0.mjs';
|
|
3
|
+
import { R as RouterInit } from './route-data-D7Xbr_Ww.mjs';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QMGIS6GS.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Router, b as RouteModules, D as DataStrategyFunction, L as Location, S as StaticHandlerContext, c as RouteObject,
|
|
2
|
-
export { y as ActionFunctionArgs, B as Blocker, s as BlockerFunction, au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunctionArgs, ap as DataRouteMatch, z as DataStrategyFunctionArgs, J as DataStrategyMatch, K as DataStrategyResult, Q as ErrorResponse, o as Fetcher, U as FormEncType, V as FormMethod, aE as Future, G as GetScrollPositionFunction, n as GetScrollRestorationKeyFunction, W as HTMLFormMethod, ax as HeadersArgs, ay as HeadersFunction, aC as HtmlLinkDescriptor, af as IDLE_BLOCKER, ae as IDLE_FETCHER, ad as IDLE_NAVIGATION, X as LazyRouteFunction, aD as LinkDescriptor, Y as LoaderFunctionArgs, az as MetaArgs, aA as MetaDescriptor, aq as NavigateOptions, p as Navigation, q as NavigationStates, aa as NavigationType, ar as Navigator, aB as PageLinkDescriptor, _ as ParamParseKey, $ as Params, as as PatchRoutesOnNavigationFunctionArgs, a0 as PathMatch, a1 as PathParam, a2 as PathPattern, a3 as RedirectFunction, r as RelativeRoutingType, x as RevalidationState, at as RouteMatch, w as RouterFetchOptions, R as RouterInit, v as RouterNavigateOptions, t as RouterSubscriber, a5 as ShouldRevalidateFunction, a6 as ShouldRevalidateFunctionArgs, T as To, a7 as UIMatch, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, O as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, ab as createPath, ag as data, ah as generatePath, ai as isRouteErrorResponse, aj as matchPath, ak as matchRoutes, ac as parsePath, al as redirect, am as redirectDocument, an as replace, ao as resolvePath, Z as unstable_MiddlewareFunction, a4 as unstable_RouterContext, a9 as unstable_RouterContextProvider, aF as unstable_SerializesTo, a8 as unstable_createContext } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, a as RouteComponentType, H as HydrateFallbackType, b as ErrorBoundaryType, S as ServerBuild } from './lib-
|
|
4
|
-
export { h as Await, c as AwaitProps, af as BrowserRouter, $ as BrowserRouterProps, a0 as DOMRouterOpts, a6 as FetcherFormProps, ab as FetcherSubmitFunction, av as FetcherSubmitOptions, ac as FetcherWithComponents, ak as Form, a7 as FormProps, aG as HandleDataRequestFunction, aH as HandleDocumentRequestFunction, aI as HandleErrorFunction, ag as HashRouter, a1 as HashRouterProps, a2 as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, ah as Link, a3 as LinkProps, aC as Links, i as MemoryRouter, M as MemoryRouterOpts, d as MemoryRouterProps, aB as Meta, aj as NavLink, a4 as NavLinkProps, a5 as NavLinkRenderProps, j as Navigate, t as NavigateFunction, N as NavigateProps, k as Outlet, O as OutletProps, aw as ParamKeyValuePair, P as PathRouteProps, aE as PrefetchPageLinks, l as Route, e as RouteProps, m as Router, f as RouterProps, n as RouterProvider, R as RouterProviderProps, o as Routes, g as RoutesProps, aD as Scripts, aF as ScriptsProps, al as ScrollRestoration, a8 as ScrollRestorationProps, aJ as ServerEntryModule, a9 as SetURLSearchParams, aa as SubmitFunction, ax as SubmitOptions, az as SubmitTarget, aP as UNSAFE_FrameworkContext, aQ as UNSAFE_createClientRoutes, aR as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aK as UNSAFE_hydrationRouteProperties, aL as UNSAFE_mapRouteProperties, aS as UNSAFE_shouldHydrateRouteLoader, aT as UNSAFE_useScrollRestoration, aM as UNSAFE_withComponentProps, aO as UNSAFE_withErrorBoundaryProps, aN as UNSAFE_withHydrateFallbackProps, ay as URLSearchParamsInit, ad as createBrowserRouter, ae as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, aA as createSearchParams, s as renderMatches, ai as unstable_HistoryRouter, at as unstable_usePrompt, v as useActionData, w as useAsyncError, x as useAsyncValue, as as useBeforeUnload, u as useBlocker, aq as useFetcher, ar as useFetchers, ap as useFormAction, y as useHref, z as useInRouterContext, am as useLinkClickHandler, B as useLoaderData, C as useLocation, D as useMatch, G as useMatches, J as useNavigate, K as useNavigation, Q as useNavigationType, T as useOutlet, U as useOutletContext, V as useParams, W as useResolvedPath, X as useRevalidator, Y as useRouteError, Z as useRouteLoaderData, _ as useRoutes, an as useSearchParams, ao as useSubmit, au as useViewTransitionState } from './lib-
|
|
1
|
+
import { a as Router, b as RouteModules, D as DataStrategyFunction, L as Location, S as StaticHandlerContext, c as RouteObject, C as CreateStaticHandlerOptions$1, d as StaticHandler, F as FutureConfig, I as InitialEntry, H as HydrationState, e as IndexRouteObject, f as LoaderFunction, A as ActionFunction, M as MetaFunction, g as LinksFunction, N as NonIndexRouteObject, u as unstable_InitialContext, h as MiddlewareEnabled, i as AppLoadContext, E as Equal, j as RouterState, P as PatchRoutesOnNavigationFunction, k as DataRouteObject, l as ClientLoaderFunction, m as Path } from './route-data-D7Xbr_Ww.mjs';
|
|
2
|
+
export { y as ActionFunctionArgs, B as Blocker, s as BlockerFunction, au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunctionArgs, ap as DataRouteMatch, z as DataStrategyFunctionArgs, J as DataStrategyMatch, K as DataStrategyResult, Q as ErrorResponse, o as Fetcher, U as FormEncType, V as FormMethod, aE as Future, G as GetScrollPositionFunction, n as GetScrollRestorationKeyFunction, W as HTMLFormMethod, ax as HeadersArgs, ay as HeadersFunction, aC as HtmlLinkDescriptor, af as IDLE_BLOCKER, ae as IDLE_FETCHER, ad as IDLE_NAVIGATION, X as LazyRouteFunction, aD as LinkDescriptor, Y as LoaderFunctionArgs, az as MetaArgs, aA as MetaDescriptor, aq as NavigateOptions, p as Navigation, q as NavigationStates, aa as NavigationType, ar as Navigator, aB as PageLinkDescriptor, _ as ParamParseKey, $ as Params, as as PatchRoutesOnNavigationFunctionArgs, a0 as PathMatch, a1 as PathParam, a2 as PathPattern, a3 as RedirectFunction, r as RelativeRoutingType, x as RevalidationState, at as RouteMatch, w as RouterFetchOptions, R as RouterInit, v as RouterNavigateOptions, t as RouterSubscriber, a5 as ShouldRevalidateFunction, a6 as ShouldRevalidateFunctionArgs, T as To, a7 as UIMatch, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, O as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, ab as createPath, ag as data, ah as generatePath, ai as isRouteErrorResponse, aj as matchPath, ak as matchRoutes, ac as parsePath, al as redirect, am as redirectDocument, an as replace, ao as resolvePath, Z as unstable_MiddlewareFunction, a4 as unstable_RouterContext, a9 as unstable_RouterContextProvider, aF as unstable_SerializesTo, a8 as unstable_createContext } from './route-data-D7Xbr_Ww.mjs';
|
|
3
|
+
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, a as RouteComponentType, H as HydrateFallbackType, b as ErrorBoundaryType, S as ServerBuild } from './lib-B33EY9A0.mjs';
|
|
4
|
+
export { h as Await, c as AwaitProps, af as BrowserRouter, $ as BrowserRouterProps, a0 as DOMRouterOpts, a6 as FetcherFormProps, ab as FetcherSubmitFunction, av as FetcherSubmitOptions, ac as FetcherWithComponents, ak as Form, a7 as FormProps, aG as HandleDataRequestFunction, aH as HandleDocumentRequestFunction, aI as HandleErrorFunction, ag as HashRouter, a1 as HashRouterProps, a2 as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, ah as Link, a3 as LinkProps, aC as Links, i as MemoryRouter, M as MemoryRouterOpts, d as MemoryRouterProps, aB as Meta, aj as NavLink, a4 as NavLinkProps, a5 as NavLinkRenderProps, j as Navigate, t as NavigateFunction, N as NavigateProps, k as Outlet, O as OutletProps, aw as ParamKeyValuePair, P as PathRouteProps, aE as PrefetchPageLinks, l as Route, e as RouteProps, m as Router, f as RouterProps, n as RouterProvider, R as RouterProviderProps, o as Routes, g as RoutesProps, aD as Scripts, aF as ScriptsProps, al as ScrollRestoration, a8 as ScrollRestorationProps, aJ as ServerEntryModule, a9 as SetURLSearchParams, aa as SubmitFunction, ax as SubmitOptions, az as SubmitTarget, aP as UNSAFE_FrameworkContext, aQ as UNSAFE_createClientRoutes, aR as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aK as UNSAFE_hydrationRouteProperties, aL as UNSAFE_mapRouteProperties, aS as UNSAFE_shouldHydrateRouteLoader, aT as UNSAFE_useScrollRestoration, aM as UNSAFE_withComponentProps, aO as UNSAFE_withErrorBoundaryProps, aN as UNSAFE_withHydrateFallbackProps, ay as URLSearchParamsInit, ad as createBrowserRouter, ae as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, aA as createSearchParams, s as renderMatches, ai as unstable_HistoryRouter, at as unstable_usePrompt, v as useActionData, w as useAsyncError, x as useAsyncValue, as as useBeforeUnload, u as useBlocker, aq as useFetcher, ar as useFetchers, ap as useFormAction, y as useHref, z as useInRouterContext, am as useLinkClickHandler, B as useLoaderData, C as useLocation, D as useMatch, G as useMatches, J as useNavigate, K as useNavigation, Q as useNavigationType, T as useOutlet, U as useOutletContext, V as useParams, W as useResolvedPath, X as useRevalidator, Y as useRouteError, Z as useRouteLoaderData, _ as useRoutes, an as useSearchParams, ao as useSubmit, au as useViewTransitionState } from './lib-B33EY9A0.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, A as AppLoadContext, L as LoaderFunctionArgs, a as ActionFunctionArgs, b as
|
|
2
|
-
export { aA as ClientActionFunction, aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, ay as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, ac as FormMethod, aJ as Future, a1 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ao as IDLE_BLOCKER, an as IDLE_FETCHER, am as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a2 as NavigationStates, az as PatchRoutesOnNavigationFunctionArgs, ae as PathParam, af as RedirectFunction, aL as Register, a6 as RevalidationState, a5 as RouterFetchOptions, a4 as RouterNavigateOptions, a3 as RouterSubscriber, ah as ShouldRevalidateFunction, ai as ShouldRevalidateFunctionArgs, aQ as UNSAFE_DataRouterContext, aR as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aP as UNSAFE_ErrorResponseImpl, aS as UNSAFE_FetchersContext, aT as UNSAFE_LocationContext, aU as UNSAFE_NavigationContext, aV as UNSAFE_RouteContext, aW as UNSAFE_ViewTransitionContext, aM as UNSAFE_createBrowserHistory, aO as UNSAFE_createRouter, aN as UNSAFE_invariant, ak as createPath, ap as data, aq as generatePath, ar as isRouteErrorResponse, as as matchPath, at as matchRoutes, al as parsePath, au as redirect, av as redirectDocument, aw as replace, ax as resolvePath, ad as unstable_MiddlewareFunction, ag as unstable_RouterContext, aK as unstable_SerializesTo, aj as unstable_createContext } from './register-
|
|
1
|
+
import { R as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, A as AppLoadContext, L as LoaderFunctionArgs, a as ActionFunctionArgs, b as RouteModules, c as StaticHandlerContext, H as HydrationState, D as DataRouteObject, C as ClientLoaderFunction, d as Router$1, e as DataStrategyFunction, T as To, N as NavigateOptions, B as BlockerFunction, f as Blocker, g as SerializeFrom, h as RelativeRoutingType, i as Location, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, U as UIMatch, m as Navigation, n as Action, o as Params, p as RouteObject, I as IndexRouteObject, q as LazyRouteFunction, r as NonIndexRouteObject, s as RouterInit, F as FutureConfig$1, t as InitialEntry, v as PatchRoutesOnNavigationFunction, w as Navigator, x as RouteMatch, y as HTMLFormMethod, z as FormEncType, E as PageLinkDescriptor, G as History, J as GetScrollRestorationKeyFunction, K as Fetcher, O as CreateStaticHandlerOptions$1, Q as StaticHandler, V as LoaderFunction, W as ActionFunction, X as MetaFunction, Y as LinksFunction, Z as unstable_InitialContext, _ as Pages, $ as Equal, a0 as RouterState } from './register-COAKzST_.js';
|
|
2
|
+
export { aA as ClientActionFunction, aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, ay as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, ac as FormMethod, aJ as Future, a1 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ao as IDLE_BLOCKER, an as IDLE_FETCHER, am as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a2 as NavigationStates, az as PatchRoutesOnNavigationFunctionArgs, ae as PathParam, af as RedirectFunction, aL as Register, a6 as RevalidationState, a5 as RouterFetchOptions, a4 as RouterNavigateOptions, a3 as RouterSubscriber, ah as ShouldRevalidateFunction, ai as ShouldRevalidateFunctionArgs, aQ as UNSAFE_DataRouterContext, aR as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aP as UNSAFE_ErrorResponseImpl, aS as UNSAFE_FetchersContext, aT as UNSAFE_LocationContext, aU as UNSAFE_NavigationContext, aV as UNSAFE_RouteContext, aW as UNSAFE_ViewTransitionContext, aM as UNSAFE_createBrowserHistory, aO as UNSAFE_createRouter, aN as UNSAFE_invariant, ak as createPath, ap as data, aq as generatePath, ar as isRouteErrorResponse, as as matchPath, at as matchRoutes, al as parsePath, au as redirect, av as redirectDocument, aw as replace, ax as resolvePath, ad as unstable_MiddlewareFunction, ag as unstable_RouterContext, aK as unstable_SerializesTo, aj as unstable_createContext } from './register-COAKzST_.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactElement } from 'react';
|
|
5
5
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8870,7 +8870,7 @@ function mergeRefs(...refs) {
|
|
|
8870
8870
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8871
8871
|
try {
|
|
8872
8872
|
if (isBrowser) {
|
|
8873
|
-
window.__reactRouterVersion = "7.6.
|
|
8873
|
+
window.__reactRouterVersion = "7.6.3";
|
|
8874
8874
|
}
|
|
8875
8875
|
} catch (e) {
|
|
8876
8876
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
withComponentProps,
|
|
129
129
|
withErrorBoundaryProps,
|
|
130
130
|
withHydrateFallbackProps
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-QMGIS6GS.mjs";
|
|
132
132
|
export {
|
|
133
133
|
Await,
|
|
134
134
|
BrowserRouter,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aV as RouteModule, aD as LinkDescriptor, L as Location, aW as Pretty, aA as MetaDescriptor, aX as GetLoaderData, aY as ServerDataFunctionArgs, aZ as unstable_MiddlewareNextFunction, a_ as ClientDataFunctionArgs, a$ as ServerDataFrom, b0 as Normalize, b1 as GetActionData } from '../../route-data-D7Xbr_Ww.mjs';
|
|
2
2
|
import { a as RouteFiles, P as Pages } from '../../register-DeIo2iHO.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -45,79 +45,15 @@ type HeadersArgs = {
|
|
|
45
45
|
actionHeaders: Headers;
|
|
46
46
|
errorHeaders: Headers | undefined;
|
|
47
47
|
};
|
|
48
|
-
type
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
53
|
-
**/
|
|
54
|
-
request: Request;
|
|
55
|
-
/**
|
|
56
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
57
|
-
* @example
|
|
58
|
-
* // app/routes.ts
|
|
59
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
60
|
-
*
|
|
61
|
-
* // app/team.tsx
|
|
62
|
-
* export function clientLoader({
|
|
63
|
-
* params,
|
|
64
|
-
* }: Route.ClientLoaderArgs) {
|
|
65
|
-
* params.teamId;
|
|
66
|
-
* // ^ string
|
|
67
|
-
* }
|
|
68
|
-
**/
|
|
69
|
-
params: T["params"];
|
|
70
|
-
/**
|
|
71
|
-
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
72
|
-
*
|
|
73
|
-
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
74
|
-
* `unstable_RouterContextProvider` and can be used to access context values
|
|
75
|
-
* from your route middlewares. You may pass in initial context values in your
|
|
76
|
-
* `<HydratedRouter unstable_getContext>` prop
|
|
77
|
-
*/
|
|
78
|
-
context: unstable_RouterContextProvider;
|
|
79
|
-
};
|
|
80
|
-
type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
81
|
-
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
82
|
-
request: Request;
|
|
83
|
-
/**
|
|
84
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
85
|
-
* @example
|
|
86
|
-
* // app/routes.ts
|
|
87
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
88
|
-
*
|
|
89
|
-
* // app/team.tsx
|
|
90
|
-
* export function loader({
|
|
91
|
-
* params,
|
|
92
|
-
* }: Route.LoaderArgs) {
|
|
93
|
-
* params.teamId;
|
|
94
|
-
* // ^ string
|
|
95
|
-
* }
|
|
96
|
-
**/
|
|
97
|
-
params: T["params"];
|
|
98
|
-
/**
|
|
99
|
-
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
100
|
-
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
101
|
-
* gap between the adapter's request/response API with your React Router app.
|
|
102
|
-
* It is only applicable if you are using a custom server adapter.
|
|
103
|
-
*
|
|
104
|
-
* With `future.unstable_middleware` enabled, this is an instance of
|
|
105
|
-
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
106
|
-
* context value set in your route middlewares. If you are using a custom
|
|
107
|
-
* server adapter, you may provide an initial set of context values from your
|
|
108
|
-
* `getLoadContext` function.
|
|
109
|
-
*/
|
|
110
|
-
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
111
|
-
};
|
|
112
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
113
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
114
|
-
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
115
|
-
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
48
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
49
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
50
|
+
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
51
|
+
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
116
52
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
117
53
|
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
|
118
54
|
};
|
|
119
|
-
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
120
|
-
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
55
|
+
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
56
|
+
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
121
57
|
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
|
122
58
|
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
|
123
59
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aX as RouteModule, aI as LinkDescriptor, i as Location, aY as Pretty, aG as MetaDescriptor, aZ as GetLoaderData, a_ as ServerDataFunctionArgs, a$ as unstable_MiddlewareNextFunction, b0 as ClientDataFunctionArgs, b1 as ServerDataFrom, b2 as RouteFiles, b3 as Normalize, _ as Pages, b4 as GetActionData } from '../../register-COAKzST_.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -44,79 +44,15 @@ type HeadersArgs = {
|
|
|
44
44
|
actionHeaders: Headers;
|
|
45
45
|
errorHeaders: Headers | undefined;
|
|
46
46
|
};
|
|
47
|
-
type
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
52
|
-
**/
|
|
53
|
-
request: Request;
|
|
54
|
-
/**
|
|
55
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
56
|
-
* @example
|
|
57
|
-
* // app/routes.ts
|
|
58
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
59
|
-
*
|
|
60
|
-
* // app/team.tsx
|
|
61
|
-
* export function clientLoader({
|
|
62
|
-
* params,
|
|
63
|
-
* }: Route.ClientLoaderArgs) {
|
|
64
|
-
* params.teamId;
|
|
65
|
-
* // ^ string
|
|
66
|
-
* }
|
|
67
|
-
**/
|
|
68
|
-
params: T["params"];
|
|
69
|
-
/**
|
|
70
|
-
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
71
|
-
*
|
|
72
|
-
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
73
|
-
* `unstable_RouterContextProvider` and can be used to access context values
|
|
74
|
-
* from your route middlewares. You may pass in initial context values in your
|
|
75
|
-
* `<HydratedRouter unstable_getContext>` prop
|
|
76
|
-
*/
|
|
77
|
-
context: unstable_RouterContextProvider;
|
|
78
|
-
};
|
|
79
|
-
type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
80
|
-
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
81
|
-
request: Request;
|
|
82
|
-
/**
|
|
83
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
84
|
-
* @example
|
|
85
|
-
* // app/routes.ts
|
|
86
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
87
|
-
*
|
|
88
|
-
* // app/team.tsx
|
|
89
|
-
* export function loader({
|
|
90
|
-
* params,
|
|
91
|
-
* }: Route.LoaderArgs) {
|
|
92
|
-
* params.teamId;
|
|
93
|
-
* // ^ string
|
|
94
|
-
* }
|
|
95
|
-
**/
|
|
96
|
-
params: T["params"];
|
|
97
|
-
/**
|
|
98
|
-
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
99
|
-
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
100
|
-
* gap between the adapter's request/response API with your React Router app.
|
|
101
|
-
* It is only applicable if you are using a custom server adapter.
|
|
102
|
-
*
|
|
103
|
-
* With `future.unstable_middleware` enabled, this is an instance of
|
|
104
|
-
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
105
|
-
* context value set in your route middlewares. If you are using a custom
|
|
106
|
-
* server adapter, you may provide an initial set of context values from your
|
|
107
|
-
* `getLoadContext` function.
|
|
108
|
-
*/
|
|
109
|
-
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
110
|
-
};
|
|
111
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
112
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
113
|
-
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
114
|
-
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
47
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
48
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
49
|
+
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
50
|
+
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
115
51
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
116
52
|
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
|
117
53
|
};
|
|
118
|
-
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
119
|
-
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
54
|
+
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
55
|
+
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
120
56
|
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
|
121
57
|
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
|
122
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs,
|
|
1
|
+
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs, b as RouteModules, S as StaticHandlerContext, H as HydrationState, k as DataRouteObject, l as ClientLoaderFunction, T as To, aq as NavigateOptions, s as BlockerFunction, B as Blocker, aT as SerializeFrom, r as RelativeRoutingType, L as Location, _ as ParamParseKey, m as Path, a2 as PathPattern, a0 as PathMatch, a7 as UIMatch, p as Navigation, aa as Action, $ as Params, a as Router$1, c as RouteObject, e as IndexRouteObject, X as LazyRouteFunction, N as NonIndexRouteObject, R as RouterInit, F as FutureConfig$1, I as InitialEntry, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, ar as Navigator, at as RouteMatch, W as HTMLFormMethod, U as FormEncType, aB as PageLinkDescriptor, aU as History, n as GetScrollRestorationKeyFunction, o as Fetcher } from './route-data-D7Xbr_Ww.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
@@ -1767,7 +1767,73 @@ type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit
|
|
|
1767
1767
|
type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
|
|
1768
1768
|
type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
1769
1769
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1770
|
-
type
|
|
1770
|
+
type ClientDataFunctionArgs<Params> = {
|
|
1771
|
+
/**
|
|
1772
|
+
* A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
|
|
1773
|
+
*
|
|
1774
|
+
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
1775
|
+
**/
|
|
1776
|
+
request: Request;
|
|
1777
|
+
/**
|
|
1778
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1779
|
+
* @example
|
|
1780
|
+
* // app/routes.ts
|
|
1781
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1782
|
+
*
|
|
1783
|
+
* // app/team.tsx
|
|
1784
|
+
* export function clientLoader({
|
|
1785
|
+
* params,
|
|
1786
|
+
* }: Route.ClientLoaderArgs) {
|
|
1787
|
+
* params.teamId;
|
|
1788
|
+
* // ^ string
|
|
1789
|
+
* }
|
|
1790
|
+
**/
|
|
1791
|
+
params: Params;
|
|
1792
|
+
/**
|
|
1793
|
+
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
1794
|
+
*
|
|
1795
|
+
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
1796
|
+
* `unstable_RouterContextProvider` and can be used to access context values
|
|
1797
|
+
* from your route middlewares. You may pass in initial context values in your
|
|
1798
|
+
* `<HydratedRouter unstable_getContext>` prop
|
|
1799
|
+
*/
|
|
1800
|
+
context: unstable_RouterContextProvider;
|
|
1801
|
+
};
|
|
1802
|
+
type ServerDataFunctionArgs<Params> = {
|
|
1803
|
+
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
1804
|
+
request: Request;
|
|
1805
|
+
/**
|
|
1806
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1807
|
+
* @example
|
|
1808
|
+
* // app/routes.ts
|
|
1809
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1810
|
+
*
|
|
1811
|
+
* // app/team.tsx
|
|
1812
|
+
* export function loader({
|
|
1813
|
+
* params,
|
|
1814
|
+
* }: Route.LoaderArgs) {
|
|
1815
|
+
* params.teamId;
|
|
1816
|
+
* // ^ string
|
|
1817
|
+
* }
|
|
1818
|
+
**/
|
|
1819
|
+
params: Params;
|
|
1820
|
+
/**
|
|
1821
|
+
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
1822
|
+
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
1823
|
+
* gap between the adapter's request/response API with your React Router app.
|
|
1824
|
+
* It is only applicable if you are using a custom server adapter.
|
|
1825
|
+
*
|
|
1826
|
+
* With `future.unstable_middleware` enabled, this is an instance of
|
|
1827
|
+
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
1828
|
+
* context value set in your route middlewares. If you are using a custom
|
|
1829
|
+
* server adapter, you may provide an initial set of context values from your
|
|
1830
|
+
* `getLoadContext` function.
|
|
1831
|
+
*/
|
|
1832
|
+
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
1833
|
+
};
|
|
1834
|
+
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
|
|
1835
|
+
ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
|
|
1836
|
+
] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1771
1837
|
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
|
1772
1838
|
type IsHydrate<ClientLoader> = ClientLoader extends {
|
|
1773
1839
|
hydrate: true;
|
|
@@ -1813,4 +1879,4 @@ type RouteFiles = Register extends {
|
|
|
1813
1879
|
routeFiles: infer Registered extends AnyRouteFiles;
|
|
1814
1880
|
} ? Registered : AnyRouteFiles;
|
|
1815
1881
|
|
|
1816
|
-
export { type Equal as $, type AppLoadContext as A, type BlockerFunction as B, type ClientLoaderFunction as C, type DataRouteObject as D, type PageLinkDescriptor as E, type FutureConfig as F, type History as G, type HydrationState as H, type
|
|
1882
|
+
export { type Equal as $, type AppLoadContext as A, type BlockerFunction as B, type ClientLoaderFunction as C, type DataRouteObject as D, type PageLinkDescriptor as E, type FutureConfig as F, type History as G, type HydrationState as H, type IndexRouteObject as I, type GetScrollRestorationKeyFunction as J, type Fetcher as K, type LoaderFunctionArgs as L, type MiddlewareEnabled as M, type NavigateOptions as N, type CreateStaticHandlerOptions as O, type ParamParseKey as P, type StaticHandler as Q, type RouteManifest as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type LoaderFunction as V, type ActionFunction as W, type MetaFunction as X, type LinksFunction as Y, type unstable_InitialContext as Z, type Pages as _, type ActionFunctionArgs as a, type unstable_MiddlewareNextFunction as a$, type RouterState as a0, type GetScrollPositionFunction as a1, type NavigationStates as a2, type RouterSubscriber as a3, type RouterNavigateOptions as a4, type RouterFetchOptions as a5, type RevalidationState as a6, type DataStrategyFunctionArgs as a7, type DataStrategyMatch as a8, type DataStrategyResult as a9, type ClientActionFunction as aA, type ClientActionFunctionArgs as aB, type ClientLoaderFunctionArgs as aC, type HeadersArgs as aD, type HeadersFunction as aE, type MetaArgs as aF, type MetaDescriptor as aG, type HtmlLinkDescriptor as aH, type LinkDescriptor as aI, type Future as aJ, type unstable_SerializesTo as aK, type Register as aL, createBrowserHistory as aM, invariant as aN, createRouter as aO, ErrorResponseImpl as aP, DataRouterContext as aQ, DataRouterStateContext as aR, FetchersContext as aS, LocationContext as aT, NavigationContext as aU, RouteContext as aV, ViewTransitionContext as aW, type RouteModule as aX, type Pretty as aY, type GetLoaderData as aZ, type ServerDataFunctionArgs as a_, DataWithResponseInit as aa, type ErrorResponse as ab, type FormMethod as ac, type unstable_MiddlewareFunction as ad, type PathParam as ae, type RedirectFunction as af, type unstable_RouterContext as ag, type ShouldRevalidateFunction as ah, type ShouldRevalidateFunctionArgs as ai, unstable_createContext as aj, createPath as ak, parsePath as al, IDLE_NAVIGATION as am, IDLE_FETCHER as an, IDLE_BLOCKER as ao, data as ap, generatePath as aq, isRouteErrorResponse as ar, matchPath as as, matchRoutes as at, redirect as au, redirectDocument as av, replace as aw, resolvePath as ax, type DataRouteMatch as ay, type PatchRoutesOnNavigationFunctionArgs as az, type RouteModules as b, type ClientDataFunctionArgs as b0, type ServerDataFrom as b1, type RouteFiles as b2, type Normalize as b3, type GetActionData as b4, type StaticHandlerContext as c, type Router as d, type DataStrategyFunction as e, type Blocker as f, type SerializeFrom as g, type RelativeRoutingType as h, type Location as i, type Path as j, type PathPattern as k, type PathMatch as l, type Navigation as m, Action as n, type Params as o, type RouteObject as p, type LazyRouteFunction as q, type NonIndexRouteObject as r, type RouterInit as s, type InitialEntry as t, unstable_RouterContextProvider as u, type PatchRoutesOnNavigationFunction as v, type Navigator as w, type RouteMatch as x, type HTMLFormMethod as y, type FormEncType as z };
|
|
@@ -1767,7 +1767,73 @@ type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit
|
|
|
1767
1767
|
type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
|
|
1768
1768
|
type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
1769
1769
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1770
|
-
type
|
|
1770
|
+
type ClientDataFunctionArgs<Params> = {
|
|
1771
|
+
/**
|
|
1772
|
+
* A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
|
|
1773
|
+
*
|
|
1774
|
+
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
1775
|
+
**/
|
|
1776
|
+
request: Request;
|
|
1777
|
+
/**
|
|
1778
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1779
|
+
* @example
|
|
1780
|
+
* // app/routes.ts
|
|
1781
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1782
|
+
*
|
|
1783
|
+
* // app/team.tsx
|
|
1784
|
+
* export function clientLoader({
|
|
1785
|
+
* params,
|
|
1786
|
+
* }: Route.ClientLoaderArgs) {
|
|
1787
|
+
* params.teamId;
|
|
1788
|
+
* // ^ string
|
|
1789
|
+
* }
|
|
1790
|
+
**/
|
|
1791
|
+
params: Params;
|
|
1792
|
+
/**
|
|
1793
|
+
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
1794
|
+
*
|
|
1795
|
+
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
1796
|
+
* `unstable_RouterContextProvider` and can be used to access context values
|
|
1797
|
+
* from your route middlewares. You may pass in initial context values in your
|
|
1798
|
+
* `<HydratedRouter unstable_getContext>` prop
|
|
1799
|
+
*/
|
|
1800
|
+
context: unstable_RouterContextProvider;
|
|
1801
|
+
};
|
|
1802
|
+
type ServerDataFunctionArgs<Params> = {
|
|
1803
|
+
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
1804
|
+
request: Request;
|
|
1805
|
+
/**
|
|
1806
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1807
|
+
* @example
|
|
1808
|
+
* // app/routes.ts
|
|
1809
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1810
|
+
*
|
|
1811
|
+
* // app/team.tsx
|
|
1812
|
+
* export function loader({
|
|
1813
|
+
* params,
|
|
1814
|
+
* }: Route.LoaderArgs) {
|
|
1815
|
+
* params.teamId;
|
|
1816
|
+
* // ^ string
|
|
1817
|
+
* }
|
|
1818
|
+
**/
|
|
1819
|
+
params: Params;
|
|
1820
|
+
/**
|
|
1821
|
+
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
1822
|
+
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
1823
|
+
* gap between the adapter's request/response API with your React Router app.
|
|
1824
|
+
* It is only applicable if you are using a custom server adapter.
|
|
1825
|
+
*
|
|
1826
|
+
* With `future.unstable_middleware` enabled, this is an instance of
|
|
1827
|
+
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
1828
|
+
* context value set in your route middlewares. If you are using a custom
|
|
1829
|
+
* server adapter, you may provide an initial set of context values from your
|
|
1830
|
+
* `getLoadContext` function.
|
|
1831
|
+
*/
|
|
1832
|
+
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
1833
|
+
};
|
|
1834
|
+
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
|
|
1835
|
+
ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
|
|
1836
|
+
] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1771
1837
|
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
|
1772
1838
|
type IsHydrate<ClientLoader> = ClientLoader extends {
|
|
1773
1839
|
hydrate: true;
|
|
@@ -1790,4 +1856,4 @@ type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
|
|
|
1790
1856
|
IsDefined<ClientActionData>
|
|
1791
1857
|
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
|
1792
1858
|
|
|
1793
|
-
export { type Params as $, type ActionFunction as A, type Blocker as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type DataStrategyMatch as J, type DataStrategyResult as K, type Location as L, type MetaFunction as M, type NonIndexRouteObject as N, DataWithResponseInit as O, type PatchRoutesOnNavigationFunction as P, type ErrorResponse as Q, type RouterInit as R, type StaticHandlerContext as S, type To as T, type FormEncType as U, type FormMethod as V, type HTMLFormMethod as W, type LazyRouteFunction as X, type LoaderFunctionArgs as Y, type unstable_MiddlewareFunction as Z, type ParamParseKey as _, type Router as a, type
|
|
1859
|
+
export { type Params as $, type ActionFunction as A, type Blocker as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type DataStrategyMatch as J, type DataStrategyResult as K, type Location as L, type MetaFunction as M, type NonIndexRouteObject as N, DataWithResponseInit as O, type PatchRoutesOnNavigationFunction as P, type ErrorResponse as Q, type RouterInit as R, type StaticHandlerContext as S, type To as T, type FormEncType as U, type FormMethod as V, type HTMLFormMethod as W, type LazyRouteFunction as X, type LoaderFunctionArgs as Y, type unstable_MiddlewareFunction as Z, type ParamParseKey as _, type Router as a, type ServerDataFrom as a$, type PathMatch as a0, type PathParam as a1, type PathPattern as a2, type RedirectFunction as a3, type unstable_RouterContext as a4, type ShouldRevalidateFunction as a5, type ShouldRevalidateFunctionArgs as a6, type UIMatch as a7, unstable_createContext as a8, unstable_RouterContextProvider as a9, type MetaDescriptor as aA, type PageLinkDescriptor as aB, type HtmlLinkDescriptor as aC, type LinkDescriptor as aD, type Future as aE, type unstable_SerializesTo as aF, createBrowserHistory as aG, invariant as aH, createRouter as aI, ErrorResponseImpl as aJ, DataRouterContext as aK, DataRouterStateContext as aL, FetchersContext as aM, LocationContext as aN, NavigationContext as aO, RouteContext as aP, ViewTransitionContext as aQ, type RouteManifest as aR, type ServerRouteModule as aS, type SerializeFrom as aT, type History as aU, type RouteModule as aV, type Pretty as aW, type GetLoaderData as aX, type ServerDataFunctionArgs as aY, type unstable_MiddlewareNextFunction as aZ, type ClientDataFunctionArgs as a_, Action as aa, createPath as ab, parsePath as ac, IDLE_NAVIGATION as ad, IDLE_FETCHER as ae, IDLE_BLOCKER as af, data as ag, generatePath as ah, isRouteErrorResponse as ai, matchPath as aj, matchRoutes as ak, redirect as al, redirectDocument as am, replace as an, resolvePath as ao, type DataRouteMatch as ap, type NavigateOptions as aq, type Navigator as ar, type PatchRoutesOnNavigationFunctionArgs as as, type RouteMatch as at, type ClientActionFunction as au, type ClientActionFunctionArgs as av, type ClientLoaderFunctionArgs as aw, type HeadersArgs as ax, type HeadersFunction as ay, type MetaArgs as az, type RouteModules as b, type Normalize as b0, type GetActionData as b1, type RouteObject as c, type StaticHandler as d, type IndexRouteObject as e, type LoaderFunction as f, type LinksFunction as g, type MiddlewareEnabled as h, type AppLoadContext as i, type RouterState as j, type DataRouteObject as k, type ClientLoaderFunction as l, type Path as m, type GetScrollRestorationKeyFunction as n, type Fetcher as o, type Navigation as p, type NavigationStates as q, type RelativeRoutingType as r, type BlockerFunction as s, type RouterSubscriber as t, type unstable_InitialContext as u, type RouterNavigateOptions as v, type RouterFetchOptions as w, type RevalidationState as x, type ActionFunctionArgs as y, type DataStrategyFunctionArgs as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8717,7 +8717,7 @@ function mergeRefs(...refs) {
|
|
|
8717
8717
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8718
8718
|
try {
|
|
8719
8719
|
if (isBrowser) {
|
|
8720
|
-
window.__reactRouterVersion = "7.6.
|
|
8720
|
+
window.__reactRouterVersion = "7.6.3";
|
|
8721
8721
|
}
|
|
8722
8722
|
} catch (e) {
|
|
8723
8723
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './lib-
|
|
3
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './lib-B33EY9A0.mjs';
|
|
3
|
+
import { R as RouterInit } from './route-data-D7Xbr_Ww.mjs';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-S4Z2UWCU.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Router, b as RouteModules, D as DataStrategyFunction, L as Location, S as StaticHandlerContext, c as RouteObject,
|
|
2
|
-
export { y as ActionFunctionArgs, B as Blocker, s as BlockerFunction, au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunctionArgs, ap as DataRouteMatch, z as DataStrategyFunctionArgs, J as DataStrategyMatch, K as DataStrategyResult, Q as ErrorResponse, o as Fetcher, U as FormEncType, V as FormMethod, aE as Future, G as GetScrollPositionFunction, n as GetScrollRestorationKeyFunction, W as HTMLFormMethod, ax as HeadersArgs, ay as HeadersFunction, aC as HtmlLinkDescriptor, af as IDLE_BLOCKER, ae as IDLE_FETCHER, ad as IDLE_NAVIGATION, X as LazyRouteFunction, aD as LinkDescriptor, Y as LoaderFunctionArgs, az as MetaArgs, aA as MetaDescriptor, aq as NavigateOptions, p as Navigation, q as NavigationStates, aa as NavigationType, ar as Navigator, aB as PageLinkDescriptor, _ as ParamParseKey, $ as Params, as as PatchRoutesOnNavigationFunctionArgs, a0 as PathMatch, a1 as PathParam, a2 as PathPattern, a3 as RedirectFunction, r as RelativeRoutingType, x as RevalidationState, at as RouteMatch, w as RouterFetchOptions, R as RouterInit, v as RouterNavigateOptions, t as RouterSubscriber, a5 as ShouldRevalidateFunction, a6 as ShouldRevalidateFunctionArgs, T as To, a7 as UIMatch, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, O as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, ab as createPath, ag as data, ah as generatePath, ai as isRouteErrorResponse, aj as matchPath, ak as matchRoutes, ac as parsePath, al as redirect, am as redirectDocument, an as replace, ao as resolvePath, Z as unstable_MiddlewareFunction, a4 as unstable_RouterContext, a9 as unstable_RouterContextProvider, aF as unstable_SerializesTo, a8 as unstable_createContext } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, a as RouteComponentType, H as HydrateFallbackType, b as ErrorBoundaryType, S as ServerBuild } from './lib-
|
|
4
|
-
export { h as Await, c as AwaitProps, af as BrowserRouter, $ as BrowserRouterProps, a0 as DOMRouterOpts, a6 as FetcherFormProps, ab as FetcherSubmitFunction, av as FetcherSubmitOptions, ac as FetcherWithComponents, ak as Form, a7 as FormProps, aG as HandleDataRequestFunction, aH as HandleDocumentRequestFunction, aI as HandleErrorFunction, ag as HashRouter, a1 as HashRouterProps, a2 as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, ah as Link, a3 as LinkProps, aC as Links, i as MemoryRouter, M as MemoryRouterOpts, d as MemoryRouterProps, aB as Meta, aj as NavLink, a4 as NavLinkProps, a5 as NavLinkRenderProps, j as Navigate, t as NavigateFunction, N as NavigateProps, k as Outlet, O as OutletProps, aw as ParamKeyValuePair, P as PathRouteProps, aE as PrefetchPageLinks, l as Route, e as RouteProps, m as Router, f as RouterProps, n as RouterProvider, R as RouterProviderProps, o as Routes, g as RoutesProps, aD as Scripts, aF as ScriptsProps, al as ScrollRestoration, a8 as ScrollRestorationProps, aJ as ServerEntryModule, a9 as SetURLSearchParams, aa as SubmitFunction, ax as SubmitOptions, az as SubmitTarget, aP as UNSAFE_FrameworkContext, aQ as UNSAFE_createClientRoutes, aR as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aK as UNSAFE_hydrationRouteProperties, aL as UNSAFE_mapRouteProperties, aS as UNSAFE_shouldHydrateRouteLoader, aT as UNSAFE_useScrollRestoration, aM as UNSAFE_withComponentProps, aO as UNSAFE_withErrorBoundaryProps, aN as UNSAFE_withHydrateFallbackProps, ay as URLSearchParamsInit, ad as createBrowserRouter, ae as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, aA as createSearchParams, s as renderMatches, ai as unstable_HistoryRouter, at as unstable_usePrompt, v as useActionData, w as useAsyncError, x as useAsyncValue, as as useBeforeUnload, u as useBlocker, aq as useFetcher, ar as useFetchers, ap as useFormAction, y as useHref, z as useInRouterContext, am as useLinkClickHandler, B as useLoaderData, C as useLocation, D as useMatch, G as useMatches, J as useNavigate, K as useNavigation, Q as useNavigationType, T as useOutlet, U as useOutletContext, V as useParams, W as useResolvedPath, X as useRevalidator, Y as useRouteError, Z as useRouteLoaderData, _ as useRoutes, an as useSearchParams, ao as useSubmit, au as useViewTransitionState } from './lib-
|
|
1
|
+
import { a as Router, b as RouteModules, D as DataStrategyFunction, L as Location, S as StaticHandlerContext, c as RouteObject, C as CreateStaticHandlerOptions$1, d as StaticHandler, F as FutureConfig, I as InitialEntry, H as HydrationState, e as IndexRouteObject, f as LoaderFunction, A as ActionFunction, M as MetaFunction, g as LinksFunction, N as NonIndexRouteObject, u as unstable_InitialContext, h as MiddlewareEnabled, i as AppLoadContext, E as Equal, j as RouterState, P as PatchRoutesOnNavigationFunction, k as DataRouteObject, l as ClientLoaderFunction, m as Path } from './route-data-D7Xbr_Ww.mjs';
|
|
2
|
+
export { y as ActionFunctionArgs, B as Blocker, s as BlockerFunction, au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunctionArgs, ap as DataRouteMatch, z as DataStrategyFunctionArgs, J as DataStrategyMatch, K as DataStrategyResult, Q as ErrorResponse, o as Fetcher, U as FormEncType, V as FormMethod, aE as Future, G as GetScrollPositionFunction, n as GetScrollRestorationKeyFunction, W as HTMLFormMethod, ax as HeadersArgs, ay as HeadersFunction, aC as HtmlLinkDescriptor, af as IDLE_BLOCKER, ae as IDLE_FETCHER, ad as IDLE_NAVIGATION, X as LazyRouteFunction, aD as LinkDescriptor, Y as LoaderFunctionArgs, az as MetaArgs, aA as MetaDescriptor, aq as NavigateOptions, p as Navigation, q as NavigationStates, aa as NavigationType, ar as Navigator, aB as PageLinkDescriptor, _ as ParamParseKey, $ as Params, as as PatchRoutesOnNavigationFunctionArgs, a0 as PathMatch, a1 as PathParam, a2 as PathPattern, a3 as RedirectFunction, r as RelativeRoutingType, x as RevalidationState, at as RouteMatch, w as RouterFetchOptions, R as RouterInit, v as RouterNavigateOptions, t as RouterSubscriber, a5 as ShouldRevalidateFunction, a6 as ShouldRevalidateFunctionArgs, T as To, a7 as UIMatch, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, O as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, ab as createPath, ag as data, ah as generatePath, ai as isRouteErrorResponse, aj as matchPath, ak as matchRoutes, ac as parsePath, al as redirect, am as redirectDocument, an as replace, ao as resolvePath, Z as unstable_MiddlewareFunction, a4 as unstable_RouterContext, a9 as unstable_RouterContextProvider, aF as unstable_SerializesTo, a8 as unstable_createContext } from './route-data-D7Xbr_Ww.mjs';
|
|
3
|
+
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, a as RouteComponentType, H as HydrateFallbackType, b as ErrorBoundaryType, S as ServerBuild } from './lib-B33EY9A0.mjs';
|
|
4
|
+
export { h as Await, c as AwaitProps, af as BrowserRouter, $ as BrowserRouterProps, a0 as DOMRouterOpts, a6 as FetcherFormProps, ab as FetcherSubmitFunction, av as FetcherSubmitOptions, ac as FetcherWithComponents, ak as Form, a7 as FormProps, aG as HandleDataRequestFunction, aH as HandleDocumentRequestFunction, aI as HandleErrorFunction, ag as HashRouter, a1 as HashRouterProps, a2 as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, ah as Link, a3 as LinkProps, aC as Links, i as MemoryRouter, M as MemoryRouterOpts, d as MemoryRouterProps, aB as Meta, aj as NavLink, a4 as NavLinkProps, a5 as NavLinkRenderProps, j as Navigate, t as NavigateFunction, N as NavigateProps, k as Outlet, O as OutletProps, aw as ParamKeyValuePair, P as PathRouteProps, aE as PrefetchPageLinks, l as Route, e as RouteProps, m as Router, f as RouterProps, n as RouterProvider, R as RouterProviderProps, o as Routes, g as RoutesProps, aD as Scripts, aF as ScriptsProps, al as ScrollRestoration, a8 as ScrollRestorationProps, aJ as ServerEntryModule, a9 as SetURLSearchParams, aa as SubmitFunction, ax as SubmitOptions, az as SubmitTarget, aP as UNSAFE_FrameworkContext, aQ as UNSAFE_createClientRoutes, aR as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aK as UNSAFE_hydrationRouteProperties, aL as UNSAFE_mapRouteProperties, aS as UNSAFE_shouldHydrateRouteLoader, aT as UNSAFE_useScrollRestoration, aM as UNSAFE_withComponentProps, aO as UNSAFE_withErrorBoundaryProps, aN as UNSAFE_withHydrateFallbackProps, ay as URLSearchParamsInit, ad as createBrowserRouter, ae as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, aA as createSearchParams, s as renderMatches, ai as unstable_HistoryRouter, at as unstable_usePrompt, v as useActionData, w as useAsyncError, x as useAsyncValue, as as useBeforeUnload, u as useBlocker, aq as useFetcher, ar as useFetchers, ap as useFormAction, y as useHref, z as useInRouterContext, am as useLinkClickHandler, B as useLoaderData, C as useLocation, D as useMatch, G as useMatches, J as useNavigate, K as useNavigation, Q as useNavigationType, T as useOutlet, U as useOutletContext, V as useParams, W as useResolvedPath, X as useRevalidator, Y as useRouteError, Z as useRouteLoaderData, _ as useRoutes, an as useSearchParams, ao as useSubmit, au as useViewTransitionState } from './lib-B33EY9A0.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, A as AppLoadContext, L as LoaderFunctionArgs, a as ActionFunctionArgs, b as
|
|
2
|
-
export { aA as ClientActionFunction, aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, ay as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, ac as FormMethod, aJ as Future, a1 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ao as IDLE_BLOCKER, an as IDLE_FETCHER, am as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a2 as NavigationStates, az as PatchRoutesOnNavigationFunctionArgs, ae as PathParam, af as RedirectFunction, aL as Register, a6 as RevalidationState, a5 as RouterFetchOptions, a4 as RouterNavigateOptions, a3 as RouterSubscriber, ah as ShouldRevalidateFunction, ai as ShouldRevalidateFunctionArgs, aQ as UNSAFE_DataRouterContext, aR as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aP as UNSAFE_ErrorResponseImpl, aS as UNSAFE_FetchersContext, aT as UNSAFE_LocationContext, aU as UNSAFE_NavigationContext, aV as UNSAFE_RouteContext, aW as UNSAFE_ViewTransitionContext, aM as UNSAFE_createBrowserHistory, aO as UNSAFE_createRouter, aN as UNSAFE_invariant, ak as createPath, ap as data, aq as generatePath, ar as isRouteErrorResponse, as as matchPath, at as matchRoutes, al as parsePath, au as redirect, av as redirectDocument, aw as replace, ax as resolvePath, ad as unstable_MiddlewareFunction, ag as unstable_RouterContext, aK as unstable_SerializesTo, aj as unstable_createContext } from './register-
|
|
1
|
+
import { R as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, A as AppLoadContext, L as LoaderFunctionArgs, a as ActionFunctionArgs, b as RouteModules, c as StaticHandlerContext, H as HydrationState, D as DataRouteObject, C as ClientLoaderFunction, d as Router$1, e as DataStrategyFunction, T as To, N as NavigateOptions, B as BlockerFunction, f as Blocker, g as SerializeFrom, h as RelativeRoutingType, i as Location, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, U as UIMatch, m as Navigation, n as Action, o as Params, p as RouteObject, I as IndexRouteObject, q as LazyRouteFunction, r as NonIndexRouteObject, s as RouterInit, F as FutureConfig$1, t as InitialEntry, v as PatchRoutesOnNavigationFunction, w as Navigator, x as RouteMatch, y as HTMLFormMethod, z as FormEncType, E as PageLinkDescriptor, G as History, J as GetScrollRestorationKeyFunction, K as Fetcher, O as CreateStaticHandlerOptions$1, Q as StaticHandler, V as LoaderFunction, W as ActionFunction, X as MetaFunction, Y as LinksFunction, Z as unstable_InitialContext, _ as Pages, $ as Equal, a0 as RouterState } from './register-COAKzST_.js';
|
|
2
|
+
export { aA as ClientActionFunction, aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, ay as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, ac as FormMethod, aJ as Future, a1 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ao as IDLE_BLOCKER, an as IDLE_FETCHER, am as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a2 as NavigationStates, az as PatchRoutesOnNavigationFunctionArgs, ae as PathParam, af as RedirectFunction, aL as Register, a6 as RevalidationState, a5 as RouterFetchOptions, a4 as RouterNavigateOptions, a3 as RouterSubscriber, ah as ShouldRevalidateFunction, ai as ShouldRevalidateFunctionArgs, aQ as UNSAFE_DataRouterContext, aR as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aP as UNSAFE_ErrorResponseImpl, aS as UNSAFE_FetchersContext, aT as UNSAFE_LocationContext, aU as UNSAFE_NavigationContext, aV as UNSAFE_RouteContext, aW as UNSAFE_ViewTransitionContext, aM as UNSAFE_createBrowserHistory, aO as UNSAFE_createRouter, aN as UNSAFE_invariant, ak as createPath, ap as data, aq as generatePath, ar as isRouteErrorResponse, as as matchPath, at as matchRoutes, al as parsePath, au as redirect, av as redirectDocument, aw as replace, ax as resolvePath, ad as unstable_MiddlewareFunction, ag as unstable_RouterContext, aK as unstable_SerializesTo, aj as unstable_createContext } from './register-COAKzST_.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactElement } from 'react';
|
|
5
5
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
package/dist/production/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8870,7 +8870,7 @@ function mergeRefs(...refs) {
|
|
|
8870
8870
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8871
8871
|
try {
|
|
8872
8872
|
if (isBrowser) {
|
|
8873
|
-
window.__reactRouterVersion = "7.6.
|
|
8873
|
+
window.__reactRouterVersion = "7.6.3";
|
|
8874
8874
|
}
|
|
8875
8875
|
} catch (e) {
|
|
8876
8876
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.6.
|
|
2
|
+
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
withComponentProps,
|
|
129
129
|
withErrorBoundaryProps,
|
|
130
130
|
withHydrateFallbackProps
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-S4Z2UWCU.mjs";
|
|
132
132
|
export {
|
|
133
133
|
Await,
|
|
134
134
|
BrowserRouter,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aV as RouteModule, aD as LinkDescriptor, L as Location, aW as Pretty, aA as MetaDescriptor, aX as GetLoaderData, aY as ServerDataFunctionArgs, aZ as unstable_MiddlewareNextFunction, a_ as ClientDataFunctionArgs, a$ as ServerDataFrom, b0 as Normalize, b1 as GetActionData } from '../../route-data-D7Xbr_Ww.mjs';
|
|
2
2
|
import { a as RouteFiles, P as Pages } from '../../register-DeIo2iHO.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -45,79 +45,15 @@ type HeadersArgs = {
|
|
|
45
45
|
actionHeaders: Headers;
|
|
46
46
|
errorHeaders: Headers | undefined;
|
|
47
47
|
};
|
|
48
|
-
type
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
53
|
-
**/
|
|
54
|
-
request: Request;
|
|
55
|
-
/**
|
|
56
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
57
|
-
* @example
|
|
58
|
-
* // app/routes.ts
|
|
59
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
60
|
-
*
|
|
61
|
-
* // app/team.tsx
|
|
62
|
-
* export function clientLoader({
|
|
63
|
-
* params,
|
|
64
|
-
* }: Route.ClientLoaderArgs) {
|
|
65
|
-
* params.teamId;
|
|
66
|
-
* // ^ string
|
|
67
|
-
* }
|
|
68
|
-
**/
|
|
69
|
-
params: T["params"];
|
|
70
|
-
/**
|
|
71
|
-
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
72
|
-
*
|
|
73
|
-
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
74
|
-
* `unstable_RouterContextProvider` and can be used to access context values
|
|
75
|
-
* from your route middlewares. You may pass in initial context values in your
|
|
76
|
-
* `<HydratedRouter unstable_getContext>` prop
|
|
77
|
-
*/
|
|
78
|
-
context: unstable_RouterContextProvider;
|
|
79
|
-
};
|
|
80
|
-
type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
81
|
-
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
82
|
-
request: Request;
|
|
83
|
-
/**
|
|
84
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
85
|
-
* @example
|
|
86
|
-
* // app/routes.ts
|
|
87
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
88
|
-
*
|
|
89
|
-
* // app/team.tsx
|
|
90
|
-
* export function loader({
|
|
91
|
-
* params,
|
|
92
|
-
* }: Route.LoaderArgs) {
|
|
93
|
-
* params.teamId;
|
|
94
|
-
* // ^ string
|
|
95
|
-
* }
|
|
96
|
-
**/
|
|
97
|
-
params: T["params"];
|
|
98
|
-
/**
|
|
99
|
-
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
100
|
-
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
101
|
-
* gap between the adapter's request/response API with your React Router app.
|
|
102
|
-
* It is only applicable if you are using a custom server adapter.
|
|
103
|
-
*
|
|
104
|
-
* With `future.unstable_middleware` enabled, this is an instance of
|
|
105
|
-
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
106
|
-
* context value set in your route middlewares. If you are using a custom
|
|
107
|
-
* server adapter, you may provide an initial set of context values from your
|
|
108
|
-
* `getLoadContext` function.
|
|
109
|
-
*/
|
|
110
|
-
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
111
|
-
};
|
|
112
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
113
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
114
|
-
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
115
|
-
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
48
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
49
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
50
|
+
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
51
|
+
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
116
52
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
117
53
|
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
|
118
54
|
};
|
|
119
|
-
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
120
|
-
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
55
|
+
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
56
|
+
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
121
57
|
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
|
122
58
|
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
|
123
59
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aX as RouteModule, aI as LinkDescriptor, i as Location, aY as Pretty, aG as MetaDescriptor, aZ as GetLoaderData, a_ as ServerDataFunctionArgs, a$ as unstable_MiddlewareNextFunction, b0 as ClientDataFunctionArgs, b1 as ServerDataFrom, b2 as RouteFiles, b3 as Normalize, _ as Pages, b4 as GetActionData } from '../../register-COAKzST_.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -44,79 +44,15 @@ type HeadersArgs = {
|
|
|
44
44
|
actionHeaders: Headers;
|
|
45
45
|
errorHeaders: Headers | undefined;
|
|
46
46
|
};
|
|
47
|
-
type
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
52
|
-
**/
|
|
53
|
-
request: Request;
|
|
54
|
-
/**
|
|
55
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
56
|
-
* @example
|
|
57
|
-
* // app/routes.ts
|
|
58
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
59
|
-
*
|
|
60
|
-
* // app/team.tsx
|
|
61
|
-
* export function clientLoader({
|
|
62
|
-
* params,
|
|
63
|
-
* }: Route.ClientLoaderArgs) {
|
|
64
|
-
* params.teamId;
|
|
65
|
-
* // ^ string
|
|
66
|
-
* }
|
|
67
|
-
**/
|
|
68
|
-
params: T["params"];
|
|
69
|
-
/**
|
|
70
|
-
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
71
|
-
*
|
|
72
|
-
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
73
|
-
* `unstable_RouterContextProvider` and can be used to access context values
|
|
74
|
-
* from your route middlewares. You may pass in initial context values in your
|
|
75
|
-
* `<HydratedRouter unstable_getContext>` prop
|
|
76
|
-
*/
|
|
77
|
-
context: unstable_RouterContextProvider;
|
|
78
|
-
};
|
|
79
|
-
type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
80
|
-
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
81
|
-
request: Request;
|
|
82
|
-
/**
|
|
83
|
-
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
84
|
-
* @example
|
|
85
|
-
* // app/routes.ts
|
|
86
|
-
* route("teams/:teamId", "./team.tsx"),
|
|
87
|
-
*
|
|
88
|
-
* // app/team.tsx
|
|
89
|
-
* export function loader({
|
|
90
|
-
* params,
|
|
91
|
-
* }: Route.LoaderArgs) {
|
|
92
|
-
* params.teamId;
|
|
93
|
-
* // ^ string
|
|
94
|
-
* }
|
|
95
|
-
**/
|
|
96
|
-
params: T["params"];
|
|
97
|
-
/**
|
|
98
|
-
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
99
|
-
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
100
|
-
* gap between the adapter's request/response API with your React Router app.
|
|
101
|
-
* It is only applicable if you are using a custom server adapter.
|
|
102
|
-
*
|
|
103
|
-
* With `future.unstable_middleware` enabled, this is an instance of
|
|
104
|
-
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
105
|
-
* context value set in your route middlewares. If you are using a custom
|
|
106
|
-
* server adapter, you may provide an initial set of context values from your
|
|
107
|
-
* `getLoadContext` function.
|
|
108
|
-
*/
|
|
109
|
-
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
110
|
-
};
|
|
111
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
112
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
113
|
-
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
114
|
-
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
47
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
48
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
49
|
+
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
50
|
+
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
115
51
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
116
52
|
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
|
117
53
|
};
|
|
118
|
-
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
119
|
-
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
54
|
+
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
|
55
|
+
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
|
120
56
|
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
|
121
57
|
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
|
122
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs,
|
|
1
|
+
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs, b as RouteModules, S as StaticHandlerContext, H as HydrationState, k as DataRouteObject, l as ClientLoaderFunction, T as To, aq as NavigateOptions, s as BlockerFunction, B as Blocker, aT as SerializeFrom, r as RelativeRoutingType, L as Location, _ as ParamParseKey, m as Path, a2 as PathPattern, a0 as PathMatch, a7 as UIMatch, p as Navigation, aa as Action, $ as Params, a as Router$1, c as RouteObject, e as IndexRouteObject, X as LazyRouteFunction, N as NonIndexRouteObject, R as RouterInit, F as FutureConfig$1, I as InitialEntry, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, ar as Navigator, at as RouteMatch, W as HTMLFormMethod, U as FormEncType, aB as PageLinkDescriptor, aU as History, n as GetScrollRestorationKeyFunction, o as Fetcher } from './route-data-D7Xbr_Ww.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
@@ -1767,7 +1767,73 @@ type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit
|
|
|
1767
1767
|
type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
|
|
1768
1768
|
type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
1769
1769
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1770
|
-
type
|
|
1770
|
+
type ClientDataFunctionArgs<Params> = {
|
|
1771
|
+
/**
|
|
1772
|
+
* A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
|
|
1773
|
+
*
|
|
1774
|
+
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
1775
|
+
**/
|
|
1776
|
+
request: Request;
|
|
1777
|
+
/**
|
|
1778
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1779
|
+
* @example
|
|
1780
|
+
* // app/routes.ts
|
|
1781
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1782
|
+
*
|
|
1783
|
+
* // app/team.tsx
|
|
1784
|
+
* export function clientLoader({
|
|
1785
|
+
* params,
|
|
1786
|
+
* }: Route.ClientLoaderArgs) {
|
|
1787
|
+
* params.teamId;
|
|
1788
|
+
* // ^ string
|
|
1789
|
+
* }
|
|
1790
|
+
**/
|
|
1791
|
+
params: Params;
|
|
1792
|
+
/**
|
|
1793
|
+
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
1794
|
+
*
|
|
1795
|
+
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
1796
|
+
* `unstable_RouterContextProvider` and can be used to access context values
|
|
1797
|
+
* from your route middlewares. You may pass in initial context values in your
|
|
1798
|
+
* `<HydratedRouter unstable_getContext>` prop
|
|
1799
|
+
*/
|
|
1800
|
+
context: unstable_RouterContextProvider;
|
|
1801
|
+
};
|
|
1802
|
+
type ServerDataFunctionArgs<Params> = {
|
|
1803
|
+
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
1804
|
+
request: Request;
|
|
1805
|
+
/**
|
|
1806
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1807
|
+
* @example
|
|
1808
|
+
* // app/routes.ts
|
|
1809
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1810
|
+
*
|
|
1811
|
+
* // app/team.tsx
|
|
1812
|
+
* export function loader({
|
|
1813
|
+
* params,
|
|
1814
|
+
* }: Route.LoaderArgs) {
|
|
1815
|
+
* params.teamId;
|
|
1816
|
+
* // ^ string
|
|
1817
|
+
* }
|
|
1818
|
+
**/
|
|
1819
|
+
params: Params;
|
|
1820
|
+
/**
|
|
1821
|
+
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
1822
|
+
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
1823
|
+
* gap between the adapter's request/response API with your React Router app.
|
|
1824
|
+
* It is only applicable if you are using a custom server adapter.
|
|
1825
|
+
*
|
|
1826
|
+
* With `future.unstable_middleware` enabled, this is an instance of
|
|
1827
|
+
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
1828
|
+
* context value set in your route middlewares. If you are using a custom
|
|
1829
|
+
* server adapter, you may provide an initial set of context values from your
|
|
1830
|
+
* `getLoadContext` function.
|
|
1831
|
+
*/
|
|
1832
|
+
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
1833
|
+
};
|
|
1834
|
+
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
|
|
1835
|
+
ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
|
|
1836
|
+
] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1771
1837
|
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
|
1772
1838
|
type IsHydrate<ClientLoader> = ClientLoader extends {
|
|
1773
1839
|
hydrate: true;
|
|
@@ -1813,4 +1879,4 @@ type RouteFiles = Register extends {
|
|
|
1813
1879
|
routeFiles: infer Registered extends AnyRouteFiles;
|
|
1814
1880
|
} ? Registered : AnyRouteFiles;
|
|
1815
1881
|
|
|
1816
|
-
export { type Equal as $, type AppLoadContext as A, type BlockerFunction as B, type ClientLoaderFunction as C, type DataRouteObject as D, type PageLinkDescriptor as E, type FutureConfig as F, type History as G, type HydrationState as H, type
|
|
1882
|
+
export { type Equal as $, type AppLoadContext as A, type BlockerFunction as B, type ClientLoaderFunction as C, type DataRouteObject as D, type PageLinkDescriptor as E, type FutureConfig as F, type History as G, type HydrationState as H, type IndexRouteObject as I, type GetScrollRestorationKeyFunction as J, type Fetcher as K, type LoaderFunctionArgs as L, type MiddlewareEnabled as M, type NavigateOptions as N, type CreateStaticHandlerOptions as O, type ParamParseKey as P, type StaticHandler as Q, type RouteManifest as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type LoaderFunction as V, type ActionFunction as W, type MetaFunction as X, type LinksFunction as Y, type unstable_InitialContext as Z, type Pages as _, type ActionFunctionArgs as a, type unstable_MiddlewareNextFunction as a$, type RouterState as a0, type GetScrollPositionFunction as a1, type NavigationStates as a2, type RouterSubscriber as a3, type RouterNavigateOptions as a4, type RouterFetchOptions as a5, type RevalidationState as a6, type DataStrategyFunctionArgs as a7, type DataStrategyMatch as a8, type DataStrategyResult as a9, type ClientActionFunction as aA, type ClientActionFunctionArgs as aB, type ClientLoaderFunctionArgs as aC, type HeadersArgs as aD, type HeadersFunction as aE, type MetaArgs as aF, type MetaDescriptor as aG, type HtmlLinkDescriptor as aH, type LinkDescriptor as aI, type Future as aJ, type unstable_SerializesTo as aK, type Register as aL, createBrowserHistory as aM, invariant as aN, createRouter as aO, ErrorResponseImpl as aP, DataRouterContext as aQ, DataRouterStateContext as aR, FetchersContext as aS, LocationContext as aT, NavigationContext as aU, RouteContext as aV, ViewTransitionContext as aW, type RouteModule as aX, type Pretty as aY, type GetLoaderData as aZ, type ServerDataFunctionArgs as a_, DataWithResponseInit as aa, type ErrorResponse as ab, type FormMethod as ac, type unstable_MiddlewareFunction as ad, type PathParam as ae, type RedirectFunction as af, type unstable_RouterContext as ag, type ShouldRevalidateFunction as ah, type ShouldRevalidateFunctionArgs as ai, unstable_createContext as aj, createPath as ak, parsePath as al, IDLE_NAVIGATION as am, IDLE_FETCHER as an, IDLE_BLOCKER as ao, data as ap, generatePath as aq, isRouteErrorResponse as ar, matchPath as as, matchRoutes as at, redirect as au, redirectDocument as av, replace as aw, resolvePath as ax, type DataRouteMatch as ay, type PatchRoutesOnNavigationFunctionArgs as az, type RouteModules as b, type ClientDataFunctionArgs as b0, type ServerDataFrom as b1, type RouteFiles as b2, type Normalize as b3, type GetActionData as b4, type StaticHandlerContext as c, type Router as d, type DataStrategyFunction as e, type Blocker as f, type SerializeFrom as g, type RelativeRoutingType as h, type Location as i, type Path as j, type PathPattern as k, type PathMatch as l, type Navigation as m, Action as n, type Params as o, type RouteObject as p, type LazyRouteFunction as q, type NonIndexRouteObject as r, type RouterInit as s, type InitialEntry as t, unstable_RouterContextProvider as u, type PatchRoutesOnNavigationFunction as v, type Navigator as w, type RouteMatch as x, type HTMLFormMethod as y, type FormEncType as z };
|
|
@@ -1767,7 +1767,73 @@ type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit
|
|
|
1767
1767
|
type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
|
|
1768
1768
|
type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
1769
1769
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1770
|
-
type
|
|
1770
|
+
type ClientDataFunctionArgs<Params> = {
|
|
1771
|
+
/**
|
|
1772
|
+
* A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
|
|
1773
|
+
*
|
|
1774
|
+
* @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
|
|
1775
|
+
**/
|
|
1776
|
+
request: Request;
|
|
1777
|
+
/**
|
|
1778
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1779
|
+
* @example
|
|
1780
|
+
* // app/routes.ts
|
|
1781
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1782
|
+
*
|
|
1783
|
+
* // app/team.tsx
|
|
1784
|
+
* export function clientLoader({
|
|
1785
|
+
* params,
|
|
1786
|
+
* }: Route.ClientLoaderArgs) {
|
|
1787
|
+
* params.teamId;
|
|
1788
|
+
* // ^ string
|
|
1789
|
+
* }
|
|
1790
|
+
**/
|
|
1791
|
+
params: Params;
|
|
1792
|
+
/**
|
|
1793
|
+
* When `future.unstable_middleware` is not enabled, this is undefined.
|
|
1794
|
+
*
|
|
1795
|
+
* When `future.unstable_middleware` is enabled, this is an instance of
|
|
1796
|
+
* `unstable_RouterContextProvider` and can be used to access context values
|
|
1797
|
+
* from your route middlewares. You may pass in initial context values in your
|
|
1798
|
+
* `<HydratedRouter unstable_getContext>` prop
|
|
1799
|
+
*/
|
|
1800
|
+
context: unstable_RouterContextProvider;
|
|
1801
|
+
};
|
|
1802
|
+
type ServerDataFunctionArgs<Params> = {
|
|
1803
|
+
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
|
|
1804
|
+
request: Request;
|
|
1805
|
+
/**
|
|
1806
|
+
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
1807
|
+
* @example
|
|
1808
|
+
* // app/routes.ts
|
|
1809
|
+
* route("teams/:teamId", "./team.tsx"),
|
|
1810
|
+
*
|
|
1811
|
+
* // app/team.tsx
|
|
1812
|
+
* export function loader({
|
|
1813
|
+
* params,
|
|
1814
|
+
* }: Route.LoaderArgs) {
|
|
1815
|
+
* params.teamId;
|
|
1816
|
+
* // ^ string
|
|
1817
|
+
* }
|
|
1818
|
+
**/
|
|
1819
|
+
params: Params;
|
|
1820
|
+
/**
|
|
1821
|
+
* Without `future.unstable_middleware` enabled, this is the context passed in
|
|
1822
|
+
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
1823
|
+
* gap between the adapter's request/response API with your React Router app.
|
|
1824
|
+
* It is only applicable if you are using a custom server adapter.
|
|
1825
|
+
*
|
|
1826
|
+
* With `future.unstable_middleware` enabled, this is an instance of
|
|
1827
|
+
* `unstable_RouterContextProvider` and can be used for type-safe access to
|
|
1828
|
+
* context value set in your route middlewares. If you are using a custom
|
|
1829
|
+
* server adapter, you may provide an initial set of context values from your
|
|
1830
|
+
* `getLoadContext` function.
|
|
1831
|
+
*/
|
|
1832
|
+
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
1833
|
+
};
|
|
1834
|
+
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
|
|
1835
|
+
ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
|
|
1836
|
+
] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1771
1837
|
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
|
1772
1838
|
type IsHydrate<ClientLoader> = ClientLoader extends {
|
|
1773
1839
|
hydrate: true;
|
|
@@ -1790,4 +1856,4 @@ type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
|
|
|
1790
1856
|
IsDefined<ClientActionData>
|
|
1791
1857
|
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
|
1792
1858
|
|
|
1793
|
-
export { type Params as $, type ActionFunction as A, type Blocker as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type DataStrategyMatch as J, type DataStrategyResult as K, type Location as L, type MetaFunction as M, type NonIndexRouteObject as N, DataWithResponseInit as O, type PatchRoutesOnNavigationFunction as P, type ErrorResponse as Q, type RouterInit as R, type StaticHandlerContext as S, type To as T, type FormEncType as U, type FormMethod as V, type HTMLFormMethod as W, type LazyRouteFunction as X, type LoaderFunctionArgs as Y, type unstable_MiddlewareFunction as Z, type ParamParseKey as _, type Router as a, type
|
|
1859
|
+
export { type Params as $, type ActionFunction as A, type Blocker as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type DataStrategyMatch as J, type DataStrategyResult as K, type Location as L, type MetaFunction as M, type NonIndexRouteObject as N, DataWithResponseInit as O, type PatchRoutesOnNavigationFunction as P, type ErrorResponse as Q, type RouterInit as R, type StaticHandlerContext as S, type To as T, type FormEncType as U, type FormMethod as V, type HTMLFormMethod as W, type LazyRouteFunction as X, type LoaderFunctionArgs as Y, type unstable_MiddlewareFunction as Z, type ParamParseKey as _, type Router as a, type ServerDataFrom as a$, type PathMatch as a0, type PathParam as a1, type PathPattern as a2, type RedirectFunction as a3, type unstable_RouterContext as a4, type ShouldRevalidateFunction as a5, type ShouldRevalidateFunctionArgs as a6, type UIMatch as a7, unstable_createContext as a8, unstable_RouterContextProvider as a9, type MetaDescriptor as aA, type PageLinkDescriptor as aB, type HtmlLinkDescriptor as aC, type LinkDescriptor as aD, type Future as aE, type unstable_SerializesTo as aF, createBrowserHistory as aG, invariant as aH, createRouter as aI, ErrorResponseImpl as aJ, DataRouterContext as aK, DataRouterStateContext as aL, FetchersContext as aM, LocationContext as aN, NavigationContext as aO, RouteContext as aP, ViewTransitionContext as aQ, type RouteManifest as aR, type ServerRouteModule as aS, type SerializeFrom as aT, type History as aU, type RouteModule as aV, type Pretty as aW, type GetLoaderData as aX, type ServerDataFunctionArgs as aY, type unstable_MiddlewareNextFunction as aZ, type ClientDataFunctionArgs as a_, Action as aa, createPath as ab, parsePath as ac, IDLE_NAVIGATION as ad, IDLE_FETCHER as ae, IDLE_BLOCKER as af, data as ag, generatePath as ah, isRouteErrorResponse as ai, matchPath as aj, matchRoutes as ak, redirect as al, redirectDocument as am, replace as an, resolvePath as ao, type DataRouteMatch as ap, type NavigateOptions as aq, type Navigator as ar, type PatchRoutesOnNavigationFunctionArgs as as, type RouteMatch as at, type ClientActionFunction as au, type ClientActionFunctionArgs as av, type ClientLoaderFunctionArgs as aw, type HeadersArgs as ax, type HeadersFunction as ay, type MetaArgs as az, type RouteModules as b, type Normalize as b0, type GetActionData as b1, type RouteObject as c, type StaticHandler as d, type IndexRouteObject as e, type LoaderFunction as f, type LinksFunction as g, type MiddlewareEnabled as h, type AppLoadContext as i, type RouterState as j, type DataRouteObject as k, type ClientLoaderFunction as l, type Path as m, type GetScrollRestorationKeyFunction as n, type Fetcher as o, type Navigation as p, type NavigationStates as q, type RelativeRoutingType as r, type BlockerFunction as s, type RouterSubscriber as t, type unstable_InitialContext as u, type RouterNavigateOptions as v, type RouterFetchOptions as w, type RevalidationState as x, type ActionFunctionArgs as y, type DataStrategyFunctionArgs as z };
|