react-router 7.1.5 → 7.2.0-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/dist/development/{chunk-IR6S3I6Y.mjs → chunk-FXE4ZOSB.mjs} +282 -97
  3. package/dist/development/dom-export.d.mts +2 -2
  4. package/dist/development/dom-export.d.ts +2 -2
  5. package/dist/development/dom-export.js +222 -58
  6. package/dist/development/dom-export.mjs +12 -4
  7. package/dist/{production/fog-of-war-CCAcUMgB.d.ts → development/fog-of-war-rn7nVSAv.d.ts} +9 -5
  8. package/dist/development/{fog-of-war-D6dP9JIt.d.mts → fog-of-war-yKFj2vdd.d.mts} +9 -5
  9. package/dist/development/index.d.mts +43 -7
  10. package/dist/development/index.d.ts +43 -7
  11. package/dist/development/index.js +283 -97
  12. package/dist/development/index.mjs +4 -2
  13. package/dist/development/lib/types/route-module.d.mts +3 -1
  14. package/dist/development/lib/types/route-module.d.ts +3 -1
  15. package/dist/development/lib/types/route-module.js +1 -1
  16. package/dist/development/lib/types/route-module.mjs +1 -1
  17. package/dist/development/{route-data-Cq_b5feC.d.ts → route-data-CfLfC_Bh.d.mts} +2 -1
  18. package/dist/{production/route-data-Cq_b5feC.d.mts → development/route-data-CfLfC_Bh.d.ts} +2 -1
  19. package/dist/production/{chunk-JRAGQQ3X.mjs → chunk-3BG6WSY4.mjs} +282 -97
  20. package/dist/production/dom-export.d.mts +2 -2
  21. package/dist/production/dom-export.d.ts +2 -2
  22. package/dist/production/dom-export.js +222 -58
  23. package/dist/production/dom-export.mjs +12 -4
  24. package/dist/{development/fog-of-war-CCAcUMgB.d.ts → production/fog-of-war-rn7nVSAv.d.ts} +9 -5
  25. package/dist/production/{fog-of-war-D6dP9JIt.d.mts → fog-of-war-yKFj2vdd.d.mts} +9 -5
  26. package/dist/production/index.d.mts +43 -7
  27. package/dist/production/index.d.ts +43 -7
  28. package/dist/production/index.js +283 -97
  29. package/dist/production/index.mjs +4 -2
  30. package/dist/production/lib/types/route-module.d.mts +3 -1
  31. package/dist/production/lib/types/route-module.d.ts +3 -1
  32. package/dist/production/lib/types/route-module.js +1 -1
  33. package/dist/production/lib/types/route-module.mjs +1 -1
  34. package/dist/production/{route-data-Cq_b5feC.d.ts → route-data-CfLfC_Bh.d.mts} +2 -1
  35. package/dist/{development/route-data-Cq_b5feC.d.mts → production/route-data-CfLfC_Bh.d.ts} +2 -1
  36. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.1.5
2
+ * react-router v7.2.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -73,6 +73,7 @@ import {
73
73
  generatePath,
74
74
  getPatchRoutesOnNavigationFunction,
75
75
  getSingleFetchDataStrategy,
76
+ href,
76
77
  invariant,
77
78
  isCookie,
78
79
  isRouteErrorResponse,
@@ -120,7 +121,7 @@ import {
120
121
  useSearchParams,
121
122
  useSubmit,
122
123
  useViewTransitionState
123
- } from "./chunk-JRAGQQ3X.mjs";
124
+ } from "./chunk-3BG6WSY4.mjs";
124
125
  export {
125
126
  Await,
126
127
  BrowserRouter,
@@ -190,6 +191,7 @@ export {
190
191
  createStaticRouter,
191
192
  data,
192
193
  generatePath,
194
+ href,
193
195
  isCookie,
194
196
  isRouteErrorResponse,
195
197
  isSession,
@@ -1,4 +1,4 @@
1
- import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.mjs';
1
+ import { az as LinkDescriptor, aw as MetaDescriptor, aN as ServerDataFrom, aO as ClientDataFrom, aP as Func, E as Equal, aQ as Pretty } from '../../route-data-CfLfC_Bh.mjs';
2
2
  import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
3
3
  import 'react';
4
4
 
@@ -86,6 +86,8 @@ type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
86
86
  };
87
87
  type CreateHydrateFallbackProps<T extends RouteInfo> = {
88
88
  params: T["params"];
89
+ loaderData?: T["loaderData"];
90
+ actionData?: T["actionData"];
89
91
  };
90
92
  type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
91
93
  pathname: string;
@@ -1,4 +1,4 @@
1
- import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.js';
1
+ import { az as LinkDescriptor, aw as MetaDescriptor, aN as ServerDataFrom, aO as ClientDataFrom, aP as Func, E as Equal, aQ as Pretty } from '../../route-data-CfLfC_Bh.js';
2
2
  import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
3
3
  import 'react';
4
4
 
@@ -86,6 +86,8 @@ type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
86
86
  };
87
87
  type CreateHydrateFallbackProps<T extends RouteInfo> = {
88
88
  params: T["params"];
89
+ loaderData?: T["loaderData"];
90
+ actionData?: T["actionData"];
89
91
  };
90
92
  type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
91
93
  pathname: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.1.5
2
+ * react-router v7.2.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.1.5
2
+ * react-router v7.2.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -348,6 +348,7 @@ interface DataStrategyFunction {
348
348
  (args: DataStrategyFunctionArgs): Promise<Record<string, DataStrategyResult>>;
349
349
  }
350
350
  type AgnosticPatchRoutesOnNavigationFunctionArgs<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = {
351
+ signal: AbortSignal;
351
352
  path: string;
352
353
  matches: M[];
353
354
  patch: (routeId: string | null, children: O[]) => void;
@@ -1575,4 +1576,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1575
1576
  type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1576
1577
  type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1577
1578
 
1578
- export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, invariant as aA, createRouter as aB, ErrorResponseImpl as aC, DataRouterContext as aD, DataRouterStateContext as aE, FetchersContext as aF, LocationContext as aG, NavigationContext as aH, RouteContext as aI, ViewTransitionContext as aJ, type RouteModule as aK, type History as aL, type ServerDataFrom as aM, type ClientDataFrom as aN, type Func as aO, type Equal as aP, type Pretty as aQ, generatePath as aa, isRouteErrorResponse as ab, matchPath as ac, matchRoutes as ad, redirect as ae, redirectDocument as af, replace as ag, resolvePath as ah, type DataRouteMatch as ai, type DataRouteObject as aj, type Navigator as ak, type PatchRoutesOnNavigationFunction as al, type PatchRoutesOnNavigationFunctionArgs as am, type RouteMatch as an, type ClientActionFunction as ao, type ClientActionFunctionArgs as ap, type ClientLoaderFunction as aq, type ClientLoaderFunctionArgs as ar, type HeadersArgs as as, type HeadersFunction as at, type MetaArgs as au, type MetaDescriptor as av, type PageLinkDescriptor as aw, type HtmlLinkDescriptor as ax, type LinkDescriptor as ay, createBrowserHistory as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
1579
+ export { type HTMLFormMethod as $, type ActionFunctionArgs as A, type BlockerFunction 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 RouterSubscriber as J, type RouterNavigateOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type RouterFetchOptions as O, type ParamParseKey as P, type DataStrategyFunctionArgs as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyMatch as V, type DataStrategyResult as W, DataWithResponseInit as X, type ErrorResponse as Y, type FormEncType as Z, type FormMethod as _, type Router as a, type LazyRouteFunction as a0, type PathParam as a1, type RedirectFunction as a2, type ShouldRevalidateFunction as a3, type ShouldRevalidateFunctionArgs as a4, createPath as a5, parsePath as a6, IDLE_NAVIGATION as a7, IDLE_FETCHER as a8, IDLE_BLOCKER as a9, createBrowserHistory as aA, invariant as aB, createRouter as aC, ErrorResponseImpl as aD, DataRouterContext as aE, DataRouterStateContext as aF, FetchersContext as aG, LocationContext as aH, NavigationContext as aI, RouteContext as aJ, ViewTransitionContext as aK, type RouteModule as aL, type History as aM, type ServerDataFrom as aN, type ClientDataFrom as aO, type Func as aP, type Pretty as aQ, data as aa, generatePath as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
@@ -348,6 +348,7 @@ interface DataStrategyFunction {
348
348
  (args: DataStrategyFunctionArgs): Promise<Record<string, DataStrategyResult>>;
349
349
  }
350
350
  type AgnosticPatchRoutesOnNavigationFunctionArgs<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = {
351
+ signal: AbortSignal;
351
352
  path: string;
352
353
  matches: M[];
353
354
  patch: (routeId: string | null, children: O[]) => void;
@@ -1575,4 +1576,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1575
1576
  type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1576
1577
  type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1577
1578
 
1578
- export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, invariant as aA, createRouter as aB, ErrorResponseImpl as aC, DataRouterContext as aD, DataRouterStateContext as aE, FetchersContext as aF, LocationContext as aG, NavigationContext as aH, RouteContext as aI, ViewTransitionContext as aJ, type RouteModule as aK, type History as aL, type ServerDataFrom as aM, type ClientDataFrom as aN, type Func as aO, type Equal as aP, type Pretty as aQ, generatePath as aa, isRouteErrorResponse as ab, matchPath as ac, matchRoutes as ad, redirect as ae, redirectDocument as af, replace as ag, resolvePath as ah, type DataRouteMatch as ai, type DataRouteObject as aj, type Navigator as ak, type PatchRoutesOnNavigationFunction as al, type PatchRoutesOnNavigationFunctionArgs as am, type RouteMatch as an, type ClientActionFunction as ao, type ClientActionFunctionArgs as ap, type ClientLoaderFunction as aq, type ClientLoaderFunctionArgs as ar, type HeadersArgs as as, type HeadersFunction as at, type MetaArgs as au, type MetaDescriptor as av, type PageLinkDescriptor as aw, type HtmlLinkDescriptor as ax, type LinkDescriptor as ay, createBrowserHistory as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
1579
+ export { type HTMLFormMethod as $, type ActionFunctionArgs as A, type BlockerFunction 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 RouterSubscriber as J, type RouterNavigateOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type RouterFetchOptions as O, type ParamParseKey as P, type DataStrategyFunctionArgs as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyMatch as V, type DataStrategyResult as W, DataWithResponseInit as X, type ErrorResponse as Y, type FormEncType as Z, type FormMethod as _, type Router as a, type LazyRouteFunction as a0, type PathParam as a1, type RedirectFunction as a2, type ShouldRevalidateFunction as a3, type ShouldRevalidateFunctionArgs as a4, createPath as a5, parsePath as a6, IDLE_NAVIGATION as a7, IDLE_FETCHER as a8, IDLE_BLOCKER as a9, createBrowserHistory as aA, invariant as aB, createRouter as aC, ErrorResponseImpl as aD, DataRouterContext as aE, DataRouterStateContext as aF, FetchersContext as aG, LocationContext as aH, NavigationContext as aI, RouteContext as aJ, ViewTransitionContext as aK, type RouteModule as aL, type History as aM, type ServerDataFrom as aN, type ClientDataFrom as aO, type Func as aP, type Pretty as aQ, data as aa, generatePath as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router",
3
- "version": "7.1.5",
3
+ "version": "7.2.0-pre.1",
4
4
  "description": "Declarative routing for React",
5
5
  "keywords": [
6
6
  "react",