react-router 7.14.1 → 7.14.2

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 (68) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/development/{browser-CtktEGQs.d.ts → browser-C-UvoYvi.d.ts} +2 -2
  3. package/dist/development/{browser-D-3-U2Jj.d.mts → browser-I6n6wVSO.d.mts} +2 -2
  4. package/dist/development/{chunk-OE4NN4TA.mjs → chunk-EVOBXE3Y.mjs} +23 -7
  5. package/dist/{production/chunk-3SUPTI2U.js → development/chunk-PZFPF4X7.js} +7 -7
  6. package/dist/development/{chunk-BFXCU3MI.mjs → chunk-YQSHRJWW.mjs} +3 -3
  7. package/dist/development/{chunk-3F6IB66O.js → chunk-YZKCRDTN.js} +99 -99
  8. package/dist/development/{chunk-YMKMFAYZ.js → chunk-ZZNWZ5Q3.js} +60 -44
  9. package/dist/{production/context-BzhbVly6.d.mts → development/context-DGGUoDIu.d.mts} +1 -1
  10. package/dist/development/dom-export.d.mts +4 -4
  11. package/dist/development/dom-export.d.ts +4 -4
  12. package/dist/development/dom-export.js +27 -27
  13. package/dist/development/dom-export.mjs +3 -3
  14. package/dist/development/{index-react-server-client-CimaPp9o.d.ts → index-react-server-client-BBd0A0TL.d.ts} +2 -2
  15. package/dist/{production/index-react-server-client-WSaoxloq.d.mts → development/index-react-server-client-BjhKIe3u.d.mts} +2 -2
  16. package/dist/development/index-react-server-client.d.mts +3 -3
  17. package/dist/development/index-react-server-client.d.ts +3 -3
  18. package/dist/development/index-react-server-client.js +4 -4
  19. package/dist/development/index-react-server-client.mjs +2 -2
  20. package/dist/development/index-react-server.js +1 -1
  21. package/dist/development/index-react-server.mjs +1 -1
  22. package/dist/development/index.d.mts +11 -11
  23. package/dist/development/index.d.ts +11 -11
  24. package/dist/development/index.js +96 -96
  25. package/dist/development/index.mjs +3 -3
  26. package/dist/{production/instrumentation-CMVbvxj9.d.ts → development/instrumentation-g0dG8UL0.d.ts} +1 -1
  27. package/dist/development/lib/types/internal.d.mts +2 -2
  28. package/dist/development/lib/types/internal.d.ts +2 -2
  29. package/dist/development/lib/types/internal.js +1 -1
  30. package/dist/development/lib/types/internal.mjs +1 -1
  31. package/dist/development/{register-aE9ob3TK.d.mts → register-D9d2sMQ7.d.mts} +1 -1
  32. package/dist/development/{register-D1WlEpq9.d.ts → register-DcBltf5q.d.ts} +1 -1
  33. package/dist/{production/routeModules-CM_clkdE.d.ts → development/routeModules-7rtk67cd.d.ts} +26 -11
  34. package/dist/development/{routeModules-Djumx26z.d.mts → routeModules-BW4a8k3I.d.mts} +26 -11
  35. package/dist/production/{browser-CtktEGQs.d.ts → browser-C-UvoYvi.d.ts} +2 -2
  36. package/dist/production/{browser-D-3-U2Jj.d.mts → browser-I6n6wVSO.d.mts} +2 -2
  37. package/dist/production/{chunk-G5ZWO7Q6.mjs → chunk-2WLZNCK5.mjs} +3 -3
  38. package/dist/production/{chunk-SPR7R4GU.mjs → chunk-LK6U7ULH.mjs} +23 -7
  39. package/dist/{development/chunk-7VLQJKNG.js → production/chunk-PQL4HLVQ.js} +7 -7
  40. package/dist/production/{chunk-LIOP3ILM.js → chunk-UJQ4OJF4.js} +99 -99
  41. package/dist/production/{chunk-UVEQGZIH.js → chunk-X5SKXJ4A.js} +60 -44
  42. package/dist/{development/context-BzhbVly6.d.mts → production/context-DGGUoDIu.d.mts} +1 -1
  43. package/dist/production/dom-export.d.mts +4 -4
  44. package/dist/production/dom-export.d.ts +4 -4
  45. package/dist/production/dom-export.js +27 -27
  46. package/dist/production/dom-export.mjs +3 -3
  47. package/dist/production/{index-react-server-client-CimaPp9o.d.ts → index-react-server-client-BBd0A0TL.d.ts} +2 -2
  48. package/dist/{development/index-react-server-client-WSaoxloq.d.mts → production/index-react-server-client-BjhKIe3u.d.mts} +2 -2
  49. package/dist/production/index-react-server-client.d.mts +3 -3
  50. package/dist/production/index-react-server-client.d.ts +3 -3
  51. package/dist/production/index-react-server-client.js +4 -4
  52. package/dist/production/index-react-server-client.mjs +2 -2
  53. package/dist/production/index-react-server.js +1 -1
  54. package/dist/production/index-react-server.mjs +1 -1
  55. package/dist/production/index.d.mts +11 -11
  56. package/dist/production/index.d.ts +11 -11
  57. package/dist/production/index.js +96 -96
  58. package/dist/production/index.mjs +3 -3
  59. package/dist/{development/instrumentation-CMVbvxj9.d.ts → production/instrumentation-g0dG8UL0.d.ts} +1 -1
  60. package/dist/production/lib/types/internal.d.mts +2 -2
  61. package/dist/production/lib/types/internal.d.ts +2 -2
  62. package/dist/production/lib/types/internal.js +1 -1
  63. package/dist/production/lib/types/internal.mjs +1 -1
  64. package/dist/production/{register-aE9ob3TK.d.mts → register-D9d2sMQ7.d.mts} +1 -1
  65. package/dist/production/{register-D1WlEpq9.d.ts → register-DcBltf5q.d.ts} +1 -1
  66. package/dist/{development/routeModules-CM_clkdE.d.ts → production/routeModules-7rtk67cd.d.ts} +26 -11
  67. package/dist/production/{routeModules-Djumx26z.d.mts → routeModules-BW4a8k3I.d.mts} +26 -11
  68. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.1
2
+ * react-router v7.14.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -28,7 +28,7 @@ import {
28
28
  isSession,
29
29
  routeRSCServerRequest,
30
30
  setDevServerHooks
31
- } from "./chunk-G5ZWO7Q6.mjs";
31
+ } from "./chunk-2WLZNCK5.mjs";
32
32
  import {
33
33
  Action,
34
34
  Await,
@@ -141,7 +141,7 @@ import {
141
141
  withComponentProps,
142
142
  withErrorBoundaryProps,
143
143
  withHydrateFallbackProps
144
- } from "./chunk-SPR7R4GU.mjs";
144
+ } from "./chunk-LK6U7ULH.mjs";
145
145
  export {
146
146
  Await,
147
147
  BrowserRouter,
@@ -1,4 +1,4 @@
1
- import { e as RouteObject, f as History, g as MaybePromise, c as RouterContextProvider, h as MapRoutePropertiesFunction, i as Action, L as Location, D as DataRouteMatch, j as Submission, k as RouteData, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, n as DataRouteObject, U as UIMatch, T as To, o as HTMLFormMethod, F as FormEncType, p as Path, q as LoaderFunctionArgs, r as MiddlewareEnabled, s as AppLoadContext } from './routeModules-CM_clkdE.js';
1
+ import { e as RouteObject, f as History, g as MaybePromise, c as RouterContextProvider, h as MapRoutePropertiesFunction, i as Action, L as Location, D as DataRouteMatch, j as Submission, k as RouteData, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, n as DataRouteObject, U as UIMatch, T as To, o as HTMLFormMethod, F as FormEncType, p as Path, q as LoaderFunctionArgs, r as MiddlewareEnabled, s as AppLoadContext } from './routeModules-7rtk67cd.js';
2
2
 
3
3
  /**
4
4
  * A Router instance manages all navigation and data loading/mutations
@@ -1,5 +1,5 @@
1
- import { R as RouteModule, e as LinkDescriptor, L as Location, F as Func, f as Pretty, g as MetaDescriptor, G as GetLoaderData, h as ServerDataFunctionArgs, i as MiddlewareNextFunction, j as ClientDataFunctionArgs, D as DataStrategyResult, k as ServerDataFrom, N as Normalize, l as GetActionData } from '../../routeModules-Djumx26z.mjs';
2
- import { R as RouteFiles, P as Pages } from '../../register-aE9ob3TK.mjs';
1
+ import { R as RouteModule, e as LinkDescriptor, L as Location, F as Func, f as Pretty, g as MetaDescriptor, G as GetLoaderData, h as ServerDataFunctionArgs, i as MiddlewareNextFunction, j as ClientDataFunctionArgs, D as DataStrategyResult, k as ServerDataFrom, N as Normalize, l as GetActionData } from '../../routeModules-BW4a8k3I.mjs';
2
+ import { R as RouteFiles, P as Pages } from '../../register-D9d2sMQ7.mjs';
3
3
  import 'react';
4
4
 
5
5
  type MaybePromise<T> = T | Promise<T>;
@@ -1,5 +1,5 @@
1
- import { R as RouteModule, t as LinkDescriptor, L as Location, u as Func, v as Pretty, w as MetaDescriptor, G as GetLoaderData, x as ServerDataFunctionArgs, y as MiddlewareNextFunction, z as ClientDataFunctionArgs, B as DataStrategyResult, E as ServerDataFrom, N as Normalize, I as GetActionData } from '../../routeModules-CM_clkdE.js';
2
- import { R as RouteFiles, P as Pages } from '../../register-D1WlEpq9.js';
1
+ import { R as RouteModule, t as LinkDescriptor, L as Location, u as Func, v as Pretty, w as MetaDescriptor, G as GetLoaderData, x as ServerDataFunctionArgs, y as MiddlewareNextFunction, z as ClientDataFunctionArgs, B as DataStrategyResult, E as ServerDataFrom, N as Normalize, I as GetActionData } from '../../routeModules-7rtk67cd.js';
2
+ import { R as RouteFiles, P as Pages } from '../../register-DcBltf5q.js';
3
3
  import 'react';
4
4
 
5
5
  type MaybePromise<T> = T | Promise<T>;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * react-router v7.14.1
2
+ * react-router v7.14.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.1
2
+ * react-router v7.14.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { R as RouteModule } from './routeModules-Djumx26z.mjs';
1
+ import { R as RouteModule } from './routeModules-BW4a8k3I.mjs';
2
2
 
3
3
  /**
4
4
  * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
@@ -1,4 +1,4 @@
1
- import { R as RouteModule } from './routeModules-CM_clkdE.js';
1
+ import { R as RouteModule } from './routeModules-7rtk67cd.js';
2
2
 
3
3
  /**
4
4
  * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
@@ -846,13 +846,30 @@ type DataNonIndexRouteObject = NonIndexRouteObject & {
846
846
  type DataRouteObject = DataIndexRouteObject | DataNonIndexRouteObject;
847
847
  type RouteManifest<R = DataRouteObject> = Record<string, R | undefined>;
848
848
  type Regex_az = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
849
- type Regez_AZ = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z";
849
+ type Regex_AZ = Uppercase<Regex_az>;
850
850
  type Regex_09 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
851
- type Regex_w = Regex_az | Regez_AZ | Regex_09 | "_";
852
- type ParamChar = Regex_w | "-";
853
- type RegexMatchPlus<CharPattern extends string, T extends string> = T extends `${infer First}${infer Rest}` ? First extends CharPattern ? RegexMatchPlus<CharPattern, Rest> extends never ? First : `${First}${RegexMatchPlus<CharPattern, Rest>}` : never : never;
854
- type _PathParam<Path extends string> = Path extends `${infer L}/${infer R}` ? _PathParam<L> | _PathParam<R> : Path extends `:${infer Param}` ? Param extends `${infer Optional}?${string}` ? RegexMatchPlus<ParamChar, Optional> : RegexMatchPlus<ParamChar, Param> : never;
855
- type PathParam<Path extends string> = Path extends "*" | "/*" ? "*" : Path extends `${infer Rest}/*` ? "*" | _PathParam<Rest> : _PathParam<Path>;
851
+ type Regex_w = Regex_az | Regex_AZ | Regex_09 | "_";
852
+ /** Emulates Regex `+` operator */
853
+ type RegexMatchPlus<char extends string, T extends string> = _RegexMatchPlus<char, T> extends infer result extends string ? result extends '' ? never : result : never;
854
+ type _RegexMatchPlus<char extends string, T extends string> = T extends `${infer head extends char}${infer rest}` ? `${head}${_RegexMatchPlus<char, rest>}` : '';
855
+ type ParamNameChar = Regex_w | "-";
856
+ type Simplify<T> = {
857
+ [K in keyof T]: T[K];
858
+ } & {};
859
+ type GeneratePathParams<path extends string> = Simplify<ParseParams<path> & {
860
+ [key in string]: string | null | undefined;
861
+ }>;
862
+ type ParseParams<path extends string> = path extends '*' ? {
863
+ '*': string;
864
+ } : path extends `${infer rest}/*` ? {
865
+ '*': string;
866
+ } & ParseParams<rest> : _ParseParams<path>;
867
+ type _ParseParams<path extends string> = path extends `${infer left}/${infer right}` ? _ParseParams<left> & _ParseParams<right> : path extends `:${infer param}?${string}` ? {
868
+ [key in RegexMatchPlus<ParamNameChar, param>]?: string | null | undefined;
869
+ } : path extends `:${infer param}` ? {
870
+ [key in RegexMatchPlus<ParamNameChar, param>]: string;
871
+ } : {};
872
+ type PathParam<path extends string> = (keyof ParseParams<path>) & string;
856
873
  type ParamParseKey<Segment extends string> = [
857
874
  PathParam<Segment>
858
875
  ] extends [never] ? string : PathParam<Segment>;
@@ -953,9 +970,7 @@ interface UIMatch<Data = unknown, Handle = unknown> {
953
970
  * @param params The parameters to interpolate into the path.
954
971
  * @returns The generated path with parameters interpolated.
955
972
  */
956
- declare function generatePath<Path extends string>(originalPath: Path, params?: {
957
- [key in PathParam<Path>]: string | null;
958
- }): string;
973
+ declare function generatePath<Path extends string>(originalPath: Path, params?: GeneratePathParams<Path>): string;
959
974
  /**
960
975
  * Used to match on some portion of a URL pathname.
961
976
  */
@@ -1011,7 +1026,7 @@ interface PathMatch<ParamKey extends string = string> {
1011
1026
  * @returns A path match object if the pattern matches the pathname,
1012
1027
  * or `null` if it does not match.
1013
1028
  */
1014
- declare function matchPath<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path, pathname: string): PathMatch<ParamKey> | null;
1029
+ declare function matchPath<Path extends string>(pattern: PathPattern<Path> | Path, pathname: string): PathMatch<ParamParseKey<Path>> | null;
1015
1030
  /**
1016
1031
  * Returns a resolved {@link Path} object relative to the given pathname.
1017
1032
  *
@@ -1696,4 +1711,4 @@ type RouteComponent = ComponentType<{}>;
1696
1711
  */
1697
1712
  type RouteHandle = unknown;
1698
1713
 
1699
- export { type BaseRouteObject as $, type ActionFunction as A, type DataStrategyResult as B, type ClientActionFunction as C, type DataRouteMatch as D, type ServerDataFrom as E, type FormEncType as F, type GetLoaderData as G, type HeadersFunction as H, type GetActionData as I, type RouteModules as J, type SerializeFrom as K, type Location as L, type MetaFunction as M, type Normalize as N, type ParamParseKey as O, type Params as P, type PathPattern as Q, type RouteModule$1 as R, type ShouldRevalidateFunction as S, type To as T, type UIMatch as U, type PathMatch as V, type InitialEntry as W, type IndexRouteObject as X, type NonIndexRouteObject as Y, type Equal as Z, type ActionFunctionArgs as _, type ClientLoaderFunction as a, type DataStrategyFunctionArgs as a0, type DataStrategyMatch as a1, DataWithResponseInit as a2, type ErrorResponse as a3, type FormMethod as a4, type LazyRouteFunction as a5, type MiddlewareFunction as a6, type PatchRoutesOnNavigationFunctionArgs as a7, type PathParam as a8, type RedirectFunction as a9, invariant as aA, ErrorResponseImpl as aB, type RouteManifest as aC, type ServerRouteModule as aD, type TrackedPromise as aE, type RouteMatch as aa, type RouterContext as ab, type ShouldRevalidateFunctionArgs as ac, createContext as ad, createPath as ae, parsePath 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 ClientActionFunctionArgs as ap, type ClientLoaderFunctionArgs as aq, type HeadersArgs as ar, type MetaArgs as as, type PageLinkDescriptor as at, type HtmlLinkDescriptor as au, type Future as av, type unstable_SerializesTo as aw, createMemoryHistory as ax, createBrowserHistory as ay, createHashHistory as az, type LinksFunction as b, RouterContextProvider as c, type LoaderFunction as d, type RouteObject as e, type History as f, type MaybePromise as g, type MapRoutePropertiesFunction as h, Action as i, type Submission as j, type RouteData as k, type DataStrategyFunction as l, type PatchRoutesOnNavigationFunction as m, type DataRouteObject as n, type HTMLFormMethod as o, type Path as p, type LoaderFunctionArgs as q, type MiddlewareEnabled as r, type AppLoadContext as s, type LinkDescriptor as t, type Func as u, type Pretty as v, type MetaDescriptor as w, type ServerDataFunctionArgs as x, type MiddlewareNextFunction as y, type ClientDataFunctionArgs as z };
1714
+ export { type BaseRouteObject as $, type ActionFunction as A, type DataStrategyResult as B, type ClientActionFunction as C, type DataRouteMatch as D, type ServerDataFrom as E, type FormEncType as F, type GetLoaderData as G, type HeadersFunction as H, type GetActionData as I, type RouteModules as J, type SerializeFrom as K, type Location as L, type MetaFunction as M, type Normalize as N, type PathPattern as O, type Params as P, type PathMatch as Q, type RouteModule$1 as R, type ShouldRevalidateFunction as S, type To as T, type UIMatch as U, type ParamParseKey as V, type InitialEntry as W, type IndexRouteObject as X, type NonIndexRouteObject as Y, type Equal as Z, type ActionFunctionArgs as _, type ClientLoaderFunction as a, type DataStrategyFunctionArgs as a0, type DataStrategyMatch as a1, DataWithResponseInit as a2, type ErrorResponse as a3, type FormMethod as a4, type LazyRouteFunction as a5, type MiddlewareFunction as a6, type PatchRoutesOnNavigationFunctionArgs as a7, type PathParam as a8, type RedirectFunction as a9, invariant as aA, ErrorResponseImpl as aB, type RouteManifest as aC, type ServerRouteModule as aD, type TrackedPromise as aE, type RouteMatch as aa, type RouterContext as ab, type ShouldRevalidateFunctionArgs as ac, createContext as ad, createPath as ae, parsePath 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 ClientActionFunctionArgs as ap, type ClientLoaderFunctionArgs as aq, type HeadersArgs as ar, type MetaArgs as as, type PageLinkDescriptor as at, type HtmlLinkDescriptor as au, type Future as av, type unstable_SerializesTo as aw, createMemoryHistory as ax, createBrowserHistory as ay, createHashHistory as az, type LinksFunction as b, RouterContextProvider as c, type LoaderFunction as d, type RouteObject as e, type History as f, type MaybePromise as g, type MapRoutePropertiesFunction as h, Action as i, type Submission as j, type RouteData as k, type DataStrategyFunction as l, type PatchRoutesOnNavigationFunction as m, type DataRouteObject as n, type HTMLFormMethod as o, type Path as p, type LoaderFunctionArgs as q, type MiddlewareEnabled as r, type AppLoadContext as s, type LinkDescriptor as t, type Func as u, type Pretty as v, type MetaDescriptor as w, type ServerDataFunctionArgs as x, type MiddlewareNextFunction as y, type ClientDataFunctionArgs as z };
@@ -846,13 +846,30 @@ type DataNonIndexRouteObject = NonIndexRouteObject & {
846
846
  type DataRouteObject = DataIndexRouteObject | DataNonIndexRouteObject;
847
847
  type RouteManifest<R = DataRouteObject> = Record<string, R | undefined>;
848
848
  type Regex_az = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
849
- type Regez_AZ = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z";
849
+ type Regex_AZ = Uppercase<Regex_az>;
850
850
  type Regex_09 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
851
- type Regex_w = Regex_az | Regez_AZ | Regex_09 | "_";
852
- type ParamChar = Regex_w | "-";
853
- type RegexMatchPlus<CharPattern extends string, T extends string> = T extends `${infer First}${infer Rest}` ? First extends CharPattern ? RegexMatchPlus<CharPattern, Rest> extends never ? First : `${First}${RegexMatchPlus<CharPattern, Rest>}` : never : never;
854
- type _PathParam<Path extends string> = Path extends `${infer L}/${infer R}` ? _PathParam<L> | _PathParam<R> : Path extends `:${infer Param}` ? Param extends `${infer Optional}?${string}` ? RegexMatchPlus<ParamChar, Optional> : RegexMatchPlus<ParamChar, Param> : never;
855
- type PathParam<Path extends string> = Path extends "*" | "/*" ? "*" : Path extends `${infer Rest}/*` ? "*" | _PathParam<Rest> : _PathParam<Path>;
851
+ type Regex_w = Regex_az | Regex_AZ | Regex_09 | "_";
852
+ /** Emulates Regex `+` operator */
853
+ type RegexMatchPlus<char extends string, T extends string> = _RegexMatchPlus<char, T> extends infer result extends string ? result extends '' ? never : result : never;
854
+ type _RegexMatchPlus<char extends string, T extends string> = T extends `${infer head extends char}${infer rest}` ? `${head}${_RegexMatchPlus<char, rest>}` : '';
855
+ type ParamNameChar = Regex_w | "-";
856
+ type Simplify<T> = {
857
+ [K in keyof T]: T[K];
858
+ } & {};
859
+ type GeneratePathParams<path extends string> = Simplify<ParseParams<path> & {
860
+ [key in string]: string | null | undefined;
861
+ }>;
862
+ type ParseParams<path extends string> = path extends '*' ? {
863
+ '*': string;
864
+ } : path extends `${infer rest}/*` ? {
865
+ '*': string;
866
+ } & ParseParams<rest> : _ParseParams<path>;
867
+ type _ParseParams<path extends string> = path extends `${infer left}/${infer right}` ? _ParseParams<left> & _ParseParams<right> : path extends `:${infer param}?${string}` ? {
868
+ [key in RegexMatchPlus<ParamNameChar, param>]?: string | null | undefined;
869
+ } : path extends `:${infer param}` ? {
870
+ [key in RegexMatchPlus<ParamNameChar, param>]: string;
871
+ } : {};
872
+ type PathParam<path extends string> = (keyof ParseParams<path>) & string;
856
873
  type ParamParseKey<Segment extends string> = [
857
874
  PathParam<Segment>
858
875
  ] extends [never] ? string : PathParam<Segment>;
@@ -953,9 +970,7 @@ interface UIMatch<Data = unknown, Handle = unknown> {
953
970
  * @param params The parameters to interpolate into the path.
954
971
  * @returns The generated path with parameters interpolated.
955
972
  */
956
- declare function generatePath<Path extends string>(originalPath: Path, params?: {
957
- [key in PathParam<Path>]: string | null;
958
- }): string;
973
+ declare function generatePath<Path extends string>(originalPath: Path, params?: GeneratePathParams<Path>): string;
959
974
  /**
960
975
  * Used to match on some portion of a URL pathname.
961
976
  */
@@ -1011,7 +1026,7 @@ interface PathMatch<ParamKey extends string = string> {
1011
1026
  * @returns A path match object if the pattern matches the pathname,
1012
1027
  * or `null` if it does not match.
1013
1028
  */
1014
- declare function matchPath<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path, pathname: string): PathMatch<ParamKey> | null;
1029
+ declare function matchPath<Path extends string>(pattern: PathPattern<Path> | Path, pathname: string): PathMatch<ParamParseKey<Path>> | null;
1015
1030
  /**
1016
1031
  * Returns a resolved {@link Path} object relative to the given pathname.
1017
1032
  *
@@ -1696,4 +1711,4 @@ type RouteComponent = ComponentType<{}>;
1696
1711
  */
1697
1712
  type RouteHandle = unknown;
1698
1713
 
1699
- export { type PathMatch as $, type ActionFunction as A, type PatchRoutesOnNavigationFunction as B, type ClientActionFunction as C, type DataStrategyResult as D, type DataRouteObject as E, type Func as F, type GetLoaderData as G, type HeadersFunction as H, type Path as I, type InitialEntry as J, type NonIndexRouteObject as K, type Location as L, type MetaFunction as M, type Normalize as N, type LazyRouteFunction as O, type Params as P, type IndexRouteObject as Q, type RouteModule$1 as R, type ShouldRevalidateFunction as S, type To as T, type UIMatch as U, type RouteMatch as V, type TrackedPromise as W, type RouteModules as X, type SerializeFrom as Y, type ParamParseKey as Z, type PathPattern as _, type ClientLoaderFunction as a, type Equal as a0, type ActionFunctionArgs as a1, type BaseRouteObject as a2, type DataStrategyFunctionArgs as a3, type DataStrategyMatch as a4, DataWithResponseInit as a5, type ErrorResponse as a6, type FormMethod as a7, type MiddlewareFunction as a8, type PatchRoutesOnNavigationFunctionArgs as a9, createHashHistory as aA, invariant as aB, ErrorResponseImpl as aC, type RouteManifest as aD, type ServerRouteModule as aE, type PathParam as aa, type RedirectFunction as ab, type RouterContext as ac, type ShouldRevalidateFunctionArgs as ad, createContext as ae, createPath as af, parsePath as ag, data as ah, generatePath as ai, isRouteErrorResponse as aj, matchPath as ak, matchRoutes as al, redirect as am, redirectDocument as an, replace as ao, resolvePath as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunctionArgs as ar, type HeadersArgs as as, type MetaArgs as at, type PageLinkDescriptor as au, type HtmlLinkDescriptor as av, type Future as aw, type unstable_SerializesTo as ax, createMemoryHistory as ay, createBrowserHistory as az, type LinksFunction as b, RouterContextProvider as c, type LoaderFunction as d, type LinkDescriptor as e, type Pretty as f, type MetaDescriptor as g, type ServerDataFunctionArgs as h, type MiddlewareNextFunction as i, type ClientDataFunctionArgs as j, type ServerDataFrom as k, type GetActionData as l, type HTMLFormMethod as m, type FormEncType as n, type LoaderFunctionArgs as o, type MiddlewareEnabled as p, type AppLoadContext as q, type RouteObject as r, type History as s, type MaybePromise as t, type MapRoutePropertiesFunction as u, Action as v, type DataRouteMatch as w, type Submission as x, type RouteData as y, type DataStrategyFunction as z };
1714
+ export { type ParamParseKey as $, type ActionFunction as A, type PatchRoutesOnNavigationFunction as B, type ClientActionFunction as C, type DataStrategyResult as D, type DataRouteObject as E, type Func as F, type GetLoaderData as G, type HeadersFunction as H, type Path as I, type InitialEntry as J, type NonIndexRouteObject as K, type Location as L, type MetaFunction as M, type Normalize as N, type LazyRouteFunction as O, type Params as P, type IndexRouteObject as Q, type RouteModule$1 as R, type ShouldRevalidateFunction as S, type To as T, type UIMatch as U, type RouteMatch as V, type TrackedPromise as W, type RouteModules as X, type SerializeFrom as Y, type PathPattern as Z, type PathMatch as _, type ClientLoaderFunction as a, type Equal as a0, type ActionFunctionArgs as a1, type BaseRouteObject as a2, type DataStrategyFunctionArgs as a3, type DataStrategyMatch as a4, DataWithResponseInit as a5, type ErrorResponse as a6, type FormMethod as a7, type MiddlewareFunction as a8, type PatchRoutesOnNavigationFunctionArgs as a9, createHashHistory as aA, invariant as aB, ErrorResponseImpl as aC, type RouteManifest as aD, type ServerRouteModule as aE, type PathParam as aa, type RedirectFunction as ab, type RouterContext as ac, type ShouldRevalidateFunctionArgs as ad, createContext as ae, createPath as af, parsePath as ag, data as ah, generatePath as ai, isRouteErrorResponse as aj, matchPath as ak, matchRoutes as al, redirect as am, redirectDocument as an, replace as ao, resolvePath as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunctionArgs as ar, type HeadersArgs as as, type MetaArgs as at, type PageLinkDescriptor as au, type HtmlLinkDescriptor as av, type Future as aw, type unstable_SerializesTo as ax, createMemoryHistory as ay, createBrowserHistory as az, type LinksFunction as b, RouterContextProvider as c, type LoaderFunction as d, type LinkDescriptor as e, type Pretty as f, type MetaDescriptor as g, type ServerDataFunctionArgs as h, type MiddlewareNextFunction as i, type ClientDataFunctionArgs as j, type ServerDataFrom as k, type GetActionData as l, type HTMLFormMethod as m, type FormEncType as n, type LoaderFunctionArgs as o, type MiddlewareEnabled as p, type AppLoadContext as q, type RouteObject as r, type History as s, type MaybePromise as t, type MapRoutePropertiesFunction as u, Action as v, type DataRouteMatch as w, type Submission as x, type RouteData as y, type DataStrategyFunction as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router",
3
- "version": "7.14.1",
3
+ "version": "7.14.2",
4
4
  "description": "Declarative routing for React",
5
5
  "keywords": [
6
6
  "react",