react-router 7.8.0 → 7.8.1-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/development/{chunk-VC6RBZTR.js → chunk-3JLHOGU7.js} +130 -130
- package/dist/development/{chunk-EVX7OBGB.js → chunk-CXAO7FY7.js} +70 -47
- package/dist/{production/chunk-XPGU3ZMH.mjs → development/chunk-V2P3SFSY.mjs} +147 -33
- package/dist/development/{chunk-ZYFC6VSF.mjs → chunk-WKLBIS42.mjs} +34 -11
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-DXb0OgpJ.d.mts → development/index-react-server-client-11fLy3qB.d.mts} +1 -1
- package/dist/development/{index-react-server-client-CMphySRb.d.ts → index-react-server-client-BQ6FxdA_.d.ts} +1 -1
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +38 -1
- package/dist/development/index-react-server.d.ts +38 -1
- package/dist/development/index-react-server.js +28 -9
- package/dist/development/index-react-server.mjs +28 -10
- package/dist/development/index.d.mts +42 -4
- package/dist/development/index.d.ts +42 -4
- package/dist/development/index.js +242 -128
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +6 -3
- package/dist/development/lib/types/internal.d.ts +6 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-CpB5xtMm.d.mts → route-data-CNjObrhZ.d.mts} +1 -1
- package/dist/development/{routeModules-qBivMBjd.d.ts → routeModules-C3oqzPpI.d.ts} +1 -1
- package/dist/production/{chunk-O6DRQPUD.js → chunk-6K5ETUFZ.js} +130 -130
- package/dist/production/{chunk-SIHON65V.mjs → chunk-GIJZ6O2U.mjs} +34 -11
- package/dist/production/{chunk-BOD6JCOU.js → chunk-ZFXTWIWH.js} +70 -47
- package/dist/{development/chunk-HZX6U7MI.mjs → production/chunk-ZKLGVTLT.mjs} +147 -33
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-DXb0OgpJ.d.mts → production/index-react-server-client-11fLy3qB.d.mts} +1 -1
- package/dist/production/{index-react-server-client-CMphySRb.d.ts → index-react-server-client-BQ6FxdA_.d.ts} +1 -1
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +38 -1
- package/dist/production/index-react-server.d.ts +38 -1
- package/dist/production/index-react-server.js +28 -9
- package/dist/production/index-react-server.mjs +28 -10
- package/dist/production/index.d.mts +42 -4
- package/dist/production/index.d.ts +42 -4
- package/dist/production/index.js +242 -128
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +6 -3
- package/dist/production/lib/types/internal.d.ts +6 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-CpB5xtMm.d.mts → route-data-CNjObrhZ.d.mts} +1 -1
- package/dist/production/{routeModules-qBivMBjd.d.ts → routeModules-C3oqzPpI.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.8.0
|
|
2
|
+
* react-router v7.8.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
isSession,
|
|
32
32
|
routeRSCServerRequest,
|
|
33
33
|
setDevServerHooks
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-V2P3SFSY.mjs";
|
|
35
35
|
import {
|
|
36
36
|
Action,
|
|
37
37
|
Await,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
withComponentProps,
|
|
141
141
|
withErrorBoundaryProps,
|
|
142
142
|
withHydrateFallbackProps
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-WKLBIS42.mjs";
|
|
144
144
|
export {
|
|
145
145
|
Await,
|
|
146
146
|
BrowserRouter,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RouteModule, L as LinkDescriptor, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, C as ClientDataFunctionArgs, a as ServerDataFrom, N as Normalize, b as GetActionData } from '../../route-data-
|
|
1
|
+
import { R as RouteModule, L as LinkDescriptor, F as Func, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, C as ClientDataFunctionArgs, a as ServerDataFrom, N as Normalize, b as GetActionData } from '../../route-data-CNjObrhZ.mjs';
|
|
2
2
|
import { c as Location, u as unstable_MiddlewareNextFunction } from '../../context-DohQKLID.mjs';
|
|
3
3
|
import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.mjs';
|
|
4
4
|
import 'react';
|
|
@@ -29,6 +29,9 @@ type MetaMatch<T extends MatchInfo> = Pretty<{
|
|
|
29
29
|
error?: unknown;
|
|
30
30
|
}>;
|
|
31
31
|
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
|
|
32
|
+
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
|
|
33
|
+
ErrorBoundary: Func;
|
|
34
|
+
} ? true : false;
|
|
32
35
|
type CreateMetaArgs<T extends RouteInfo> = {
|
|
33
36
|
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
|
|
34
37
|
location: Location;
|
|
@@ -39,9 +42,9 @@ type CreateMetaArgs<T extends RouteInfo> = {
|
|
|
39
42
|
*
|
|
40
43
|
* @deprecated Use `Route.MetaArgs.loaderData` instead
|
|
41
44
|
*/
|
|
42
|
-
data: T["loaderData"] | undefined;
|
|
45
|
+
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
|
43
46
|
/** The return value for this route's server loader function */
|
|
44
|
-
loaderData: T["loaderData"] | undefined;
|
|
47
|
+
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
|
45
48
|
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
|
46
49
|
error?: unknown;
|
|
47
50
|
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RouteModule, L as LinkDescriptor, a as Location, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../routeModules-
|
|
1
|
+
import { R as RouteModule, L as LinkDescriptor, a as Location, F as Func, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../routeModules-C3oqzPpI.js';
|
|
2
2
|
import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -28,6 +28,9 @@ type MetaMatch<T extends MatchInfo> = Pretty<{
|
|
|
28
28
|
error?: unknown;
|
|
29
29
|
}>;
|
|
30
30
|
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
|
|
31
|
+
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
|
|
32
|
+
ErrorBoundary: Func;
|
|
33
|
+
} ? true : false;
|
|
31
34
|
type CreateMetaArgs<T extends RouteInfo> = {
|
|
32
35
|
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
|
|
33
36
|
location: Location;
|
|
@@ -38,9 +41,9 @@ type CreateMetaArgs<T extends RouteInfo> = {
|
|
|
38
41
|
*
|
|
39
42
|
* @deprecated Use `Route.MetaArgs.loaderData` instead
|
|
40
43
|
*/
|
|
41
|
-
data: T["loaderData"] | undefined;
|
|
44
|
+
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
|
42
45
|
/** The return value for this route's server loader function */
|
|
43
|
-
loaderData: T["loaderData"] | undefined;
|
|
46
|
+
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
|
44
47
|
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
|
45
48
|
error?: unknown;
|
|
46
49
|
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
|
@@ -470,4 +470,4 @@ type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
|
|
|
470
470
|
IsDefined<ClientActionData>
|
|
471
471
|
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
|
472
472
|
|
|
473
|
-
export type { AppLoadContext as A, ClientDataFunctionArgs as C, Equal as E, GetLoaderData as G, HeadersFunction as H, LinkDescriptor as L, MetaDescriptor as M, Normalize as N, Pretty as P, RouteModule as R, ServerDataFunctionArgs as S, ServerDataFrom as a, GetActionData as b, RouteModules as c, SerializeFrom as d, MetaFunction as e, LinksFunction as f, ClientActionFunction as g, ClientLoaderFunction as h, ClientActionFunctionArgs as i, ClientLoaderFunctionArgs as j, HeadersArgs as k, MetaArgs as l, PageLinkDescriptor as m, HtmlLinkDescriptor as n, ServerRouteModule as o, unstable_SerializesTo as u };
|
|
473
|
+
export type { AppLoadContext as A, ClientDataFunctionArgs as C, Equal as E, Func as F, GetLoaderData as G, HeadersFunction as H, LinkDescriptor as L, MetaDescriptor as M, Normalize as N, Pretty as P, RouteModule as R, ServerDataFunctionArgs as S, ServerDataFrom as a, GetActionData as b, RouteModules as c, SerializeFrom as d, MetaFunction as e, LinksFunction as f, ClientActionFunction as g, ClientLoaderFunction as h, ClientActionFunctionArgs as i, ClientLoaderFunctionArgs as j, HeadersArgs as k, MetaArgs as l, PageLinkDescriptor as m, HtmlLinkDescriptor as n, ServerRouteModule as o, unstable_SerializesTo as u };
|
|
@@ -2170,4 +2170,4 @@ type RouteComponent = ComponentType<{}>;
|
|
|
2170
2170
|
*/
|
|
2171
2171
|
type RouteHandle = unknown;
|
|
2172
2172
|
|
|
2173
|
-
export { type
|
|
2173
|
+
export { type GetScrollRestorationKeyFunction as $, Action as A, type BlockerFunction as B, type ClientDataFunctionArgs as C, type DataStrategyFunction as D, type Equal as E, type Func as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type ClientActionFunction as J, type ClientLoaderFunction as K, type LinkDescriptor as L, type MetaDescriptor as M, type Normalize as N, type HeadersFunction as O, type Pretty as P, type ShouldRevalidateFunction as Q, type RouteModule$1 as R, type ServerDataFunctionArgs as S, type To as T, type UIMatch as U, type RouterInit as V, type RouterState as W, type PatchRoutesOnNavigationFunction as X, type DataRouteObject as Y, type StaticHandler as Z, type GetScrollPositionFunction as _, type Location as a, type ServerRouteModule as a$, type StaticHandlerContext as a0, type Fetcher as a1, type NavigationStates as a2, type RouterSubscriber as a3, type RouterNavigateOptions as a4, type RouterFetchOptions as a5, type RevalidationState as a6, type ActionFunctionArgs as a7, type DataStrategyFunctionArgs as a8, type DataStrategyMatch as a9, replace as aA, resolvePath as aB, type DataRouteMatch as aC, type Navigator as aD, type PatchRoutesOnNavigationFunctionArgs as aE, type RouteMatch as aF, type ClientActionFunctionArgs as aG, type ClientLoaderFunctionArgs as aH, type HeadersArgs as aI, type MetaArgs as aJ, type PageLinkDescriptor as aK, type HtmlLinkDescriptor as aL, type Future as aM, type unstable_SerializesTo as aN, createBrowserHistory as aO, invariant as aP, createRouter as aQ, ErrorResponseImpl as aR, DataRouterContext as aS, DataRouterStateContext as aT, FetchersContext as aU, LocationContext as aV, NavigationContext as aW, RouteContext as aX, ViewTransitionContext as aY, type FutureConfig as aZ, type RouteManifest as a_, type DataStrategyResult as aa, DataWithResponseInit as ab, type ErrorResponse as ac, type FormEncType as ad, type FormMethod as ae, type HTMLFormMethod as af, type LazyRouteFunction as ag, type LoaderFunctionArgs as ah, type unstable_MiddlewareFunction as ai, type PathParam as aj, type RedirectFunction as ak, type unstable_RouterContext as al, type ShouldRevalidateFunctionArgs as am, unstable_createContext as an, createPath as ao, parsePath as ap, IDLE_NAVIGATION as aq, IDLE_FETCHER as ar, IDLE_BLOCKER as as, data as at, generatePath as au, isRouteErrorResponse as av, matchPath as aw, matchRoutes as ax, redirect as ay, redirectDocument as az, type ServerDataFrom as b, type History as b0, type CreateStaticHandlerOptions as b1, type GetActionData as c, type Router as d, type RouteModules as e, type NavigateOptions as f, type Blocker as g, type SerializeFrom as h, type RelativeRoutingType as i, type ParamParseKey as j, type Path as k, type PathPattern as l, type PathMatch as m, type Navigation as n, type Params as o, type RouteObject as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type MetaFunction as t, type unstable_MiddlewareNextFunction as u, type LinksFunction as v, type NonIndexRouteObject as w, type AppLoadContext as x, unstable_RouterContextProvider as y, type MiddlewareEnabled as z };
|