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.
Files changed (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/development/{chunk-VC6RBZTR.js → chunk-3JLHOGU7.js} +130 -130
  3. package/dist/development/{chunk-EVX7OBGB.js → chunk-CXAO7FY7.js} +70 -47
  4. package/dist/{production/chunk-XPGU3ZMH.mjs → development/chunk-V2P3SFSY.mjs} +147 -33
  5. package/dist/development/{chunk-ZYFC6VSF.mjs → chunk-WKLBIS42.mjs} +34 -11
  6. package/dist/development/dom-export.js +3 -3
  7. package/dist/development/dom-export.mjs +3 -3
  8. package/dist/{production/index-react-server-client-DXb0OgpJ.d.mts → development/index-react-server-client-11fLy3qB.d.mts} +1 -1
  9. package/dist/development/{index-react-server-client-CMphySRb.d.ts → index-react-server-client-BQ6FxdA_.d.ts} +1 -1
  10. package/dist/development/index-react-server-client.d.mts +2 -2
  11. package/dist/development/index-react-server-client.d.ts +2 -2
  12. package/dist/development/index-react-server-client.js +4 -4
  13. package/dist/development/index-react-server-client.mjs +2 -2
  14. package/dist/development/index-react-server.d.mts +38 -1
  15. package/dist/development/index-react-server.d.ts +38 -1
  16. package/dist/development/index-react-server.js +28 -9
  17. package/dist/development/index-react-server.mjs +28 -10
  18. package/dist/development/index.d.mts +42 -4
  19. package/dist/development/index.d.ts +42 -4
  20. package/dist/development/index.js +242 -128
  21. package/dist/development/index.mjs +3 -3
  22. package/dist/development/lib/types/internal.d.mts +6 -3
  23. package/dist/development/lib/types/internal.d.ts +6 -3
  24. package/dist/development/lib/types/internal.js +1 -1
  25. package/dist/development/lib/types/internal.mjs +1 -1
  26. package/dist/development/{route-data-CpB5xtMm.d.mts → route-data-CNjObrhZ.d.mts} +1 -1
  27. package/dist/development/{routeModules-qBivMBjd.d.ts → routeModules-C3oqzPpI.d.ts} +1 -1
  28. package/dist/production/{chunk-O6DRQPUD.js → chunk-6K5ETUFZ.js} +130 -130
  29. package/dist/production/{chunk-SIHON65V.mjs → chunk-GIJZ6O2U.mjs} +34 -11
  30. package/dist/production/{chunk-BOD6JCOU.js → chunk-ZFXTWIWH.js} +70 -47
  31. package/dist/{development/chunk-HZX6U7MI.mjs → production/chunk-ZKLGVTLT.mjs} +147 -33
  32. package/dist/production/dom-export.js +3 -3
  33. package/dist/production/dom-export.mjs +3 -3
  34. package/dist/{development/index-react-server-client-DXb0OgpJ.d.mts → production/index-react-server-client-11fLy3qB.d.mts} +1 -1
  35. package/dist/production/{index-react-server-client-CMphySRb.d.ts → index-react-server-client-BQ6FxdA_.d.ts} +1 -1
  36. package/dist/production/index-react-server-client.d.mts +2 -2
  37. package/dist/production/index-react-server-client.d.ts +2 -2
  38. package/dist/production/index-react-server-client.js +4 -4
  39. package/dist/production/index-react-server-client.mjs +2 -2
  40. package/dist/production/index-react-server.d.mts +38 -1
  41. package/dist/production/index-react-server.d.ts +38 -1
  42. package/dist/production/index-react-server.js +28 -9
  43. package/dist/production/index-react-server.mjs +28 -10
  44. package/dist/production/index.d.mts +42 -4
  45. package/dist/production/index.d.ts +42 -4
  46. package/dist/production/index.js +242 -128
  47. package/dist/production/index.mjs +3 -3
  48. package/dist/production/lib/types/internal.d.mts +6 -3
  49. package/dist/production/lib/types/internal.d.ts +6 -3
  50. package/dist/production/lib/types/internal.js +1 -1
  51. package/dist/production/lib/types/internal.mjs +1 -1
  52. package/dist/production/{route-data-CpB5xtMm.d.mts → route-data-CNjObrhZ.d.mts} +1 -1
  53. package/dist/production/{routeModules-qBivMBjd.d.ts → routeModules-C3oqzPpI.d.ts} +1 -1
  54. 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-HZX6U7MI.mjs";
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-ZYFC6VSF.mjs";
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-CpB5xtMm.mjs';
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-qBivMBjd.js';
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. */
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
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
  *
@@ -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
  *
@@ -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 StaticHandlerContext as $, Action as A, type BlockerFunction as B, type ClientDataFunctionArgs as C, type DataStrategyFunction as D, type Equal as E, type ClientActionFunction as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type ClientLoaderFunction as J, type HeadersFunction as K, type LinkDescriptor as L, type MetaDescriptor as M, type Normalize as N, type ShouldRevalidateFunction as O, type Pretty as P, type RouterInit as Q, type RouteModule$1 as R, type ServerDataFunctionArgs as S, type To as T, type UIMatch as U, type RouterState as V, type PatchRoutesOnNavigationFunction as W, type DataRouteObject as X, type StaticHandler as Y, type GetScrollPositionFunction as Z, type GetScrollRestorationKeyFunction as _, type Location as a, type History as a$, type Fetcher as a0, type NavigationStates as a1, type RouterSubscriber as a2, type RouterNavigateOptions as a3, type RouterFetchOptions as a4, type RevalidationState as a5, type ActionFunctionArgs as a6, type DataStrategyFunctionArgs as a7, type DataStrategyMatch as a8, type DataStrategyResult as a9, resolvePath as aA, type DataRouteMatch as aB, type Navigator as aC, type PatchRoutesOnNavigationFunctionArgs as aD, type RouteMatch as aE, type ClientActionFunctionArgs as aF, type ClientLoaderFunctionArgs as aG, type HeadersArgs as aH, type MetaArgs as aI, type PageLinkDescriptor as aJ, type HtmlLinkDescriptor as aK, type Future as aL, type unstable_SerializesTo as aM, createBrowserHistory as aN, invariant as aO, createRouter as aP, ErrorResponseImpl as aQ, DataRouterContext as aR, DataRouterStateContext as aS, FetchersContext as aT, LocationContext as aU, NavigationContext as aV, RouteContext as aW, ViewTransitionContext as aX, type FutureConfig as aY, type RouteManifest as aZ, type ServerRouteModule as a_, DataWithResponseInit as aa, type ErrorResponse as ab, type FormEncType as ac, type FormMethod as ad, type HTMLFormMethod as ae, type LazyRouteFunction as af, type LoaderFunctionArgs as ag, type unstable_MiddlewareFunction as ah, type PathParam as ai, type RedirectFunction as aj, type unstable_RouterContext as ak, type ShouldRevalidateFunctionArgs as al, unstable_createContext as am, createPath as an, parsePath as ao, IDLE_NAVIGATION as ap, IDLE_FETCHER as aq, IDLE_BLOCKER as ar, data as as, generatePath as at, isRouteErrorResponse as au, matchPath as av, matchRoutes as aw, redirect as ax, redirectDocument as ay, replace as az, type ServerDataFrom as b, type CreateStaticHandlerOptions as b0, 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 };
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 };