react-router 7.9.4 → 7.9.6

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 (74) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/development/browser-BbBXFHbO.d.ts +310 -0
  3. package/dist/development/browser-C07r42Tt.d.mts +310 -0
  4. package/dist/development/{chunk-OIYGIGL5.mjs → chunk-4WY6JWTD.mjs} +458 -43
  5. package/dist/development/{chunk-DI2QHYMJ.js → chunk-AMVS5XVJ.js} +1314 -138
  6. package/dist/development/{chunk-WY5IRSCW.mjs → chunk-G3INQAYP.mjs} +197 -857
  7. package/dist/development/chunk-O4JVZSOY.js +1310 -0
  8. package/dist/development/chunk-PZWDWJAY.js +188 -0
  9. package/dist/development/dom-export.d.mts +103 -6
  10. package/dist/development/dom-export.d.ts +103 -4
  11. package/dist/development/dom-export.js +708 -20
  12. package/dist/development/dom-export.mjs +692 -11
  13. package/dist/{production/index-react-server-client-BbRcBjrA.d.ts → development/index-react-server-client-Da3kmxNd.d.ts} +195 -135
  14. package/dist/{production/index-react-server-client-BIz4AUNd.d.mts → development/index-react-server-client-rcoGPJhU.d.mts} +137 -78
  15. package/dist/development/index-react-server-client.d.mts +2 -3
  16. package/dist/development/index-react-server-client.d.ts +2 -2
  17. package/dist/development/index-react-server-client.js +4 -4
  18. package/dist/development/index-react-server-client.mjs +2 -2
  19. package/dist/development/index-react-server.d.mts +107 -3
  20. package/dist/development/index-react-server.d.ts +107 -3
  21. package/dist/development/index-react-server.js +259 -13
  22. package/dist/development/index-react-server.mjs +259 -13
  23. package/dist/development/index.d.mts +14 -320
  24. package/dist/development/index.d.ts +14 -362
  25. package/dist/development/index.js +146 -962
  26. package/dist/development/index.mjs +3 -9
  27. package/dist/development/{routeModules-D5iJ6JYT.d.ts → instrumentation-Unc20tLk.d.ts} +178 -25
  28. package/dist/development/lib/types/internal.d.mts +2 -3
  29. package/dist/development/lib/types/internal.d.ts +2 -2
  30. package/dist/development/lib/types/internal.js +1 -1
  31. package/dist/development/lib/types/internal.mjs +1 -1
  32. package/dist/{production/register-C34pU-in.d.ts → development/register-BpU9rFBJ.d.ts} +1 -1
  33. package/dist/development/{register-CI4bTprK.d.mts → register-QkB3HGjm.d.mts} +1 -1
  34. package/dist/{production/context-DSyS5mLj.d.mts → development/router-CAvh_Drx.d.mts} +1877 -1254
  35. package/dist/production/browser-BbBXFHbO.d.ts +310 -0
  36. package/dist/production/browser-C07r42Tt.d.mts +310 -0
  37. package/dist/production/{chunk-4E5LHRQP.js → chunk-EAIF67OW.js} +1314 -138
  38. package/dist/production/{chunk-FR6HSPLK.mjs → chunk-FDUMZGKM.mjs} +197 -857
  39. package/dist/production/{chunk-3TADTUL4.mjs → chunk-FUSXQSWG.mjs} +458 -43
  40. package/dist/production/chunk-G5A35OQU.js +188 -0
  41. package/dist/production/chunk-QN64DHI4.js +1310 -0
  42. package/dist/production/dom-export.d.mts +103 -6
  43. package/dist/production/dom-export.d.ts +103 -4
  44. package/dist/production/dom-export.js +708 -20
  45. package/dist/production/dom-export.mjs +692 -11
  46. package/dist/{development/index-react-server-client-BIz4AUNd.d.mts → production/index-react-server-client-Da3kmxNd.d.ts} +137 -78
  47. package/dist/{development/index-react-server-client-BbRcBjrA.d.ts → production/index-react-server-client-rcoGPJhU.d.mts} +195 -135
  48. package/dist/production/index-react-server-client.d.mts +2 -3
  49. package/dist/production/index-react-server-client.d.ts +2 -2
  50. package/dist/production/index-react-server-client.js +4 -4
  51. package/dist/production/index-react-server-client.mjs +2 -2
  52. package/dist/production/index-react-server.d.mts +107 -3
  53. package/dist/production/index-react-server.d.ts +107 -3
  54. package/dist/production/index-react-server.js +259 -13
  55. package/dist/production/index-react-server.mjs +259 -13
  56. package/dist/production/index.d.mts +14 -320
  57. package/dist/production/index.d.ts +14 -362
  58. package/dist/production/index.js +146 -962
  59. package/dist/production/index.mjs +3 -9
  60. package/dist/production/{routeModules-D5iJ6JYT.d.ts → instrumentation-Unc20tLk.d.ts} +178 -25
  61. package/dist/production/lib/types/internal.d.mts +2 -3
  62. package/dist/production/lib/types/internal.d.ts +2 -2
  63. package/dist/production/lib/types/internal.js +1 -1
  64. package/dist/production/lib/types/internal.mjs +1 -1
  65. package/dist/{development/register-C34pU-in.d.ts → production/register-BpU9rFBJ.d.ts} +1 -1
  66. package/dist/production/{register-CI4bTprK.d.mts → register-QkB3HGjm.d.mts} +1 -1
  67. package/dist/{development/context-DSyS5mLj.d.mts → production/router-CAvh_Drx.d.mts} +1877 -1254
  68. package/package.json +1 -1
  69. package/dist/development/browser-z32v5KVN.d.mts +0 -46
  70. package/dist/development/chunk-72XNTZCV.js +0 -2089
  71. package/dist/development/route-data-DZQOUSqV.d.mts +0 -473
  72. package/dist/production/browser-z32v5KVN.d.mts +0 -46
  73. package/dist/production/chunk-WNLQ53P5.js +0 -2089
  74. package/dist/production/route-data-DZQOUSqV.d.mts +0 -473
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * react-router v7.9.4
2
+ * react-router v7.9.6
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -19,6 +19,7 @@
19
19
 
20
20
 
21
21
 
22
+ var _chunkO4JVZSOYjs = require('./chunk-O4JVZSOY.js');
22
23
 
23
24
 
24
25
 
@@ -29,12 +30,11 @@
29
30
 
30
31
 
31
32
 
32
- var _chunk72XNTZCVjs = require('./chunk-72XNTZCV.js');
33
33
 
34
34
 
35
35
 
36
36
 
37
- var _chunkDI2QHYMJjs = require('./chunk-DI2QHYMJ.js');
37
+ var _chunkAMVS5XVJjs = require('./chunk-AMVS5XVJ.js');
38
38
 
39
39
 
40
40
 
@@ -58,4 +58,4 @@ var _chunkDI2QHYMJjs = require('./chunk-DI2QHYMJ.js');
58
58
 
59
59
 
60
60
 
61
- exports.BrowserRouter = _chunk72XNTZCVjs.BrowserRouter; exports.Form = _chunk72XNTZCVjs.Form; exports.HashRouter = _chunk72XNTZCVjs.HashRouter; exports.Link = _chunk72XNTZCVjs.Link; exports.Links = _chunkDI2QHYMJjs.Links; exports.MemoryRouter = _chunk72XNTZCVjs.MemoryRouter; exports.Meta = _chunkDI2QHYMJjs.Meta; exports.NavLink = _chunk72XNTZCVjs.NavLink; exports.Navigate = _chunk72XNTZCVjs.Navigate; exports.Outlet = _chunk72XNTZCVjs.Outlet; exports.Route = _chunk72XNTZCVjs.Route; exports.Router = _chunk72XNTZCVjs.Router; exports.RouterProvider = _chunk72XNTZCVjs.RouterProvider; exports.Routes = _chunk72XNTZCVjs.Routes; exports.ScrollRestoration = _chunk72XNTZCVjs.ScrollRestoration; exports.StaticRouter = _chunk72XNTZCVjs.StaticRouter; exports.StaticRouterProvider = _chunk72XNTZCVjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkDI2QHYMJjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunk72XNTZCVjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk72XNTZCVjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk72XNTZCVjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunk72XNTZCVjs.HistoryRouter;
61
+ exports.BrowserRouter = _chunkO4JVZSOYjs.BrowserRouter; exports.Form = _chunkO4JVZSOYjs.Form; exports.HashRouter = _chunkO4JVZSOYjs.HashRouter; exports.Link = _chunkO4JVZSOYjs.Link; exports.Links = _chunkAMVS5XVJjs.Links; exports.MemoryRouter = _chunkAMVS5XVJjs.MemoryRouter; exports.Meta = _chunkAMVS5XVJjs.Meta; exports.NavLink = _chunkO4JVZSOYjs.NavLink; exports.Navigate = _chunkAMVS5XVJjs.Navigate; exports.Outlet = _chunkAMVS5XVJjs.Outlet; exports.Route = _chunkAMVS5XVJjs.Route; exports.Router = _chunkAMVS5XVJjs.Router; exports.RouterProvider = _chunkAMVS5XVJjs.RouterProvider; exports.Routes = _chunkAMVS5XVJjs.Routes; exports.ScrollRestoration = _chunkO4JVZSOYjs.ScrollRestoration; exports.StaticRouter = _chunkO4JVZSOYjs.StaticRouter; exports.StaticRouterProvider = _chunkO4JVZSOYjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkAMVS5XVJjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkAMVS5XVJjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkAMVS5XVJjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkAMVS5XVJjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkO4JVZSOYjs.HistoryRouter;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.4
2
+ * react-router v7.9.6
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -32,7 +32,7 @@ import {
32
32
  WithComponentProps,
33
33
  WithErrorBoundaryProps,
34
34
  WithHydrateFallbackProps
35
- } from "./chunk-OIYGIGL5.mjs";
35
+ } from "./chunk-4WY6JWTD.mjs";
36
36
  export {
37
37
  BrowserRouter,
38
38
  Form,
@@ -351,6 +351,11 @@ type DefaultContext = MiddlewareEnabled extends true ? Readonly<RouterContextPro
351
351
  interface DataFunctionArgs<Context> {
352
352
  /** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read headers (like cookies, and {@link https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams URLSearchParams} from the request. */
353
353
  request: Request;
354
+ /**
355
+ * Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
356
+ * Mostly useful as a identifier to aggregate on for logging/tracing/etc.
357
+ */
358
+ unstable_pattern: string;
354
359
  /**
355
360
  * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
356
361
  * @example
@@ -571,7 +576,7 @@ type AgnosticPatchRoutesOnNavigationFunction<O extends AgnosticRouteObject = Agn
571
576
  * properties from framework-agnostic properties
572
577
  */
573
578
  interface MapRoutePropertiesFunction {
574
- (route: AgnosticRouteObject): {
579
+ (route: AgnosticDataRouteObject): {
575
580
  hasErrorBoundary: boolean;
576
581
  } & Record<string, any>;
577
582
  }
@@ -887,6 +892,98 @@ type ErrorResponse = {
887
892
  */
888
893
  declare function isRouteErrorResponse(error: any): error is ErrorResponse;
889
894
 
895
+ /**
896
+ * An object of unknown type for route loaders and actions provided by the
897
+ * server's `getLoadContext()` function. This is defined as an empty interface
898
+ * specifically so apps can leverage declaration merging to augment this type
899
+ * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
900
+ */
901
+ interface AppLoadContext {
902
+ [key: string]: unknown;
903
+ }
904
+
905
+ type unstable_ServerInstrumentation = {
906
+ handler?: unstable_InstrumentRequestHandlerFunction;
907
+ route?: unstable_InstrumentRouteFunction;
908
+ };
909
+ type unstable_ClientInstrumentation = {
910
+ router?: unstable_InstrumentRouterFunction;
911
+ route?: unstable_InstrumentRouteFunction;
912
+ };
913
+ type unstable_InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
914
+ type unstable_InstrumentRouterFunction = (router: InstrumentableRouter) => void;
915
+ type unstable_InstrumentRouteFunction = (route: InstrumentableRoute) => void;
916
+ type unstable_InstrumentationHandlerResult = {
917
+ status: "success";
918
+ error: undefined;
919
+ } | {
920
+ status: "error";
921
+ error: Error;
922
+ };
923
+ type InstrumentFunction<T> = (handler: () => Promise<unstable_InstrumentationHandlerResult>, info: T) => Promise<void>;
924
+ type ReadonlyRequest = {
925
+ method: string;
926
+ url: string;
927
+ headers: Pick<Headers, "get">;
928
+ };
929
+ type ReadonlyContext = MiddlewareEnabled extends true ? Pick<RouterContextProvider, "get"> : Readonly<AppLoadContext>;
930
+ type InstrumentableRoute = {
931
+ id: string;
932
+ index: boolean | undefined;
933
+ path: string | undefined;
934
+ instrument(instrumentations: RouteInstrumentations): void;
935
+ };
936
+ type RouteInstrumentations = {
937
+ lazy?: InstrumentFunction<RouteLazyInstrumentationInfo>;
938
+ "lazy.loader"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
939
+ "lazy.action"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
940
+ "lazy.middleware"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
941
+ middleware?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
942
+ loader?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
943
+ action?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
944
+ };
945
+ type RouteLazyInstrumentationInfo = undefined;
946
+ type RouteHandlerInstrumentationInfo = Readonly<{
947
+ request: ReadonlyRequest;
948
+ params: LoaderFunctionArgs["params"];
949
+ unstable_pattern: string;
950
+ context: ReadonlyContext;
951
+ }>;
952
+ type InstrumentableRouter = {
953
+ instrument(instrumentations: RouterInstrumentations): void;
954
+ };
955
+ type RouterInstrumentations = {
956
+ navigate?: InstrumentFunction<RouterNavigationInstrumentationInfo>;
957
+ fetch?: InstrumentFunction<RouterFetchInstrumentationInfo>;
958
+ };
959
+ type RouterNavigationInstrumentationInfo = Readonly<{
960
+ to: string | number;
961
+ currentUrl: string;
962
+ formMethod?: HTMLFormMethod;
963
+ formEncType?: FormEncType;
964
+ formData?: FormData;
965
+ body?: any;
966
+ }>;
967
+ type RouterFetchInstrumentationInfo = Readonly<{
968
+ href: string;
969
+ currentUrl: string;
970
+ fetcherKey: string;
971
+ formMethod?: HTMLFormMethod;
972
+ formEncType?: FormEncType;
973
+ formData?: FormData;
974
+ body?: any;
975
+ }>;
976
+ type InstrumentableRequestHandler = {
977
+ instrument(instrumentations: RequestHandlerInstrumentations): void;
978
+ };
979
+ type RequestHandlerInstrumentations = {
980
+ request?: InstrumentFunction<RequestHandlerInstrumentationInfo>;
981
+ };
982
+ type RequestHandlerInstrumentationInfo = Readonly<{
983
+ request: ReadonlyRequest;
984
+ context: ReadonlyContext | undefined;
985
+ }>;
986
+
890
987
  /**
891
988
  * A Router instance manages all navigation and data loading/mutations
892
989
  */
@@ -1171,6 +1268,7 @@ interface RouterInit {
1171
1268
  history: History;
1172
1269
  basename?: string;
1173
1270
  getContext?: () => MaybePromise<RouterContextProvider>;
1271
+ unstable_instrumentations?: unstable_ClientInstrumentation[];
1174
1272
  mapRouteProperties?: MapRoutePropertiesFunction;
1175
1273
  future?: Partial<FutureConfig>;
1176
1274
  hydrationRouteProperties?: string[];
@@ -1437,6 +1535,7 @@ type BlockerFunction = (args: {
1437
1535
  interface CreateStaticHandlerOptions {
1438
1536
  basename?: string;
1439
1537
  mapRouteProperties?: MapRoutePropertiesFunction;
1538
+ unstable_instrumentations?: Pick<unstable_ServerInstrumentation, "route">[];
1440
1539
  future?: {};
1441
1540
  }
1442
1541
  declare function createStaticHandler(routes: AgnosticRouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
@@ -1807,6 +1906,11 @@ type ClientDataFunctionArgs<Params> = {
1807
1906
  * }
1808
1907
  **/
1809
1908
  params: Params;
1909
+ /**
1910
+ * Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
1911
+ * Mostly useful as a identifier to aggregate on for logging/tracing/etc.
1912
+ */
1913
+ unstable_pattern: string;
1810
1914
  /**
1811
1915
  * When `future.v8_middleware` is not enabled, this is undefined.
1812
1916
  *
@@ -1860,7 +1964,7 @@ interface HeadersFunction {
1860
1964
  * A function that defines `<link>` tags to be inserted into the `<head>` of
1861
1965
  * the document on route transitions.
1862
1966
  *
1863
- * @see https://remix.run/route/meta
1967
+ * @see https://reactrouter.com/start/framework/route-module#meta
1864
1968
  */
1865
1969
  interface LinksFunction {
1866
1970
  (): LinkDescriptor[];
@@ -1973,7 +2077,7 @@ type LdJsonValue = LdJsonPrimitive | LdJsonObject | LdJsonArray;
1973
2077
  /**
1974
2078
  * An arbitrary object that is associated with a route.
1975
2079
  *
1976
- * @see https://remix.run/route/handle
2080
+ * @see https://reactrouter.com/how-to/using-handle
1977
2081
  */
1978
2082
  type RouteHandle = unknown;
1979
2083
 
@@ -351,6 +351,11 @@ type DefaultContext = MiddlewareEnabled extends true ? Readonly<RouterContextPro
351
351
  interface DataFunctionArgs<Context> {
352
352
  /** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read headers (like cookies, and {@link https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams URLSearchParams} from the request. */
353
353
  request: Request;
354
+ /**
355
+ * Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
356
+ * Mostly useful as a identifier to aggregate on for logging/tracing/etc.
357
+ */
358
+ unstable_pattern: string;
354
359
  /**
355
360
  * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
356
361
  * @example
@@ -571,7 +576,7 @@ type AgnosticPatchRoutesOnNavigationFunction<O extends AgnosticRouteObject = Agn
571
576
  * properties from framework-agnostic properties
572
577
  */
573
578
  interface MapRoutePropertiesFunction {
574
- (route: AgnosticRouteObject): {
579
+ (route: AgnosticDataRouteObject): {
575
580
  hasErrorBoundary: boolean;
576
581
  } & Record<string, any>;
577
582
  }
@@ -887,6 +892,98 @@ type ErrorResponse = {
887
892
  */
888
893
  declare function isRouteErrorResponse(error: any): error is ErrorResponse;
889
894
 
895
+ /**
896
+ * An object of unknown type for route loaders and actions provided by the
897
+ * server's `getLoadContext()` function. This is defined as an empty interface
898
+ * specifically so apps can leverage declaration merging to augment this type
899
+ * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
900
+ */
901
+ interface AppLoadContext {
902
+ [key: string]: unknown;
903
+ }
904
+
905
+ type unstable_ServerInstrumentation = {
906
+ handler?: unstable_InstrumentRequestHandlerFunction;
907
+ route?: unstable_InstrumentRouteFunction;
908
+ };
909
+ type unstable_ClientInstrumentation = {
910
+ router?: unstable_InstrumentRouterFunction;
911
+ route?: unstable_InstrumentRouteFunction;
912
+ };
913
+ type unstable_InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
914
+ type unstable_InstrumentRouterFunction = (router: InstrumentableRouter) => void;
915
+ type unstable_InstrumentRouteFunction = (route: InstrumentableRoute) => void;
916
+ type unstable_InstrumentationHandlerResult = {
917
+ status: "success";
918
+ error: undefined;
919
+ } | {
920
+ status: "error";
921
+ error: Error;
922
+ };
923
+ type InstrumentFunction<T> = (handler: () => Promise<unstable_InstrumentationHandlerResult>, info: T) => Promise<void>;
924
+ type ReadonlyRequest = {
925
+ method: string;
926
+ url: string;
927
+ headers: Pick<Headers, "get">;
928
+ };
929
+ type ReadonlyContext = MiddlewareEnabled extends true ? Pick<RouterContextProvider, "get"> : Readonly<AppLoadContext>;
930
+ type InstrumentableRoute = {
931
+ id: string;
932
+ index: boolean | undefined;
933
+ path: string | undefined;
934
+ instrument(instrumentations: RouteInstrumentations): void;
935
+ };
936
+ type RouteInstrumentations = {
937
+ lazy?: InstrumentFunction<RouteLazyInstrumentationInfo>;
938
+ "lazy.loader"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
939
+ "lazy.action"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
940
+ "lazy.middleware"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
941
+ middleware?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
942
+ loader?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
943
+ action?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
944
+ };
945
+ type RouteLazyInstrumentationInfo = undefined;
946
+ type RouteHandlerInstrumentationInfo = Readonly<{
947
+ request: ReadonlyRequest;
948
+ params: LoaderFunctionArgs["params"];
949
+ unstable_pattern: string;
950
+ context: ReadonlyContext;
951
+ }>;
952
+ type InstrumentableRouter = {
953
+ instrument(instrumentations: RouterInstrumentations): void;
954
+ };
955
+ type RouterInstrumentations = {
956
+ navigate?: InstrumentFunction<RouterNavigationInstrumentationInfo>;
957
+ fetch?: InstrumentFunction<RouterFetchInstrumentationInfo>;
958
+ };
959
+ type RouterNavigationInstrumentationInfo = Readonly<{
960
+ to: string | number;
961
+ currentUrl: string;
962
+ formMethod?: HTMLFormMethod;
963
+ formEncType?: FormEncType;
964
+ formData?: FormData;
965
+ body?: any;
966
+ }>;
967
+ type RouterFetchInstrumentationInfo = Readonly<{
968
+ href: string;
969
+ currentUrl: string;
970
+ fetcherKey: string;
971
+ formMethod?: HTMLFormMethod;
972
+ formEncType?: FormEncType;
973
+ formData?: FormData;
974
+ body?: any;
975
+ }>;
976
+ type InstrumentableRequestHandler = {
977
+ instrument(instrumentations: RequestHandlerInstrumentations): void;
978
+ };
979
+ type RequestHandlerInstrumentations = {
980
+ request?: InstrumentFunction<RequestHandlerInstrumentationInfo>;
981
+ };
982
+ type RequestHandlerInstrumentationInfo = Readonly<{
983
+ request: ReadonlyRequest;
984
+ context: ReadonlyContext | undefined;
985
+ }>;
986
+
890
987
  /**
891
988
  * A Router instance manages all navigation and data loading/mutations
892
989
  */
@@ -1171,6 +1268,7 @@ interface RouterInit {
1171
1268
  history: History;
1172
1269
  basename?: string;
1173
1270
  getContext?: () => MaybePromise<RouterContextProvider>;
1271
+ unstable_instrumentations?: unstable_ClientInstrumentation[];
1174
1272
  mapRouteProperties?: MapRoutePropertiesFunction;
1175
1273
  future?: Partial<FutureConfig>;
1176
1274
  hydrationRouteProperties?: string[];
@@ -1437,6 +1535,7 @@ type BlockerFunction = (args: {
1437
1535
  interface CreateStaticHandlerOptions {
1438
1536
  basename?: string;
1439
1537
  mapRouteProperties?: MapRoutePropertiesFunction;
1538
+ unstable_instrumentations?: Pick<unstable_ServerInstrumentation, "route">[];
1440
1539
  future?: {};
1441
1540
  }
1442
1541
  declare function createStaticHandler(routes: AgnosticRouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
@@ -1807,6 +1906,11 @@ type ClientDataFunctionArgs<Params> = {
1807
1906
  * }
1808
1907
  **/
1809
1908
  params: Params;
1909
+ /**
1910
+ * Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
1911
+ * Mostly useful as a identifier to aggregate on for logging/tracing/etc.
1912
+ */
1913
+ unstable_pattern: string;
1810
1914
  /**
1811
1915
  * When `future.v8_middleware` is not enabled, this is undefined.
1812
1916
  *
@@ -1860,7 +1964,7 @@ interface HeadersFunction {
1860
1964
  * A function that defines `<link>` tags to be inserted into the `<head>` of
1861
1965
  * the document on route transitions.
1862
1966
  *
1863
- * @see https://remix.run/route/meta
1967
+ * @see https://reactrouter.com/start/framework/route-module#meta
1864
1968
  */
1865
1969
  interface LinksFunction {
1866
1970
  (): LinkDescriptor[];
@@ -1973,7 +2077,7 @@ type LdJsonValue = LdJsonPrimitive | LdJsonObject | LdJsonArray;
1973
2077
  /**
1974
2078
  * An arbitrary object that is associated with a route.
1975
2079
  *
1976
- * @see https://remix.run/route/handle
2080
+ * @see https://reactrouter.com/how-to/using-handle
1977
2081
  */
1978
2082
  type RouteHandle = unknown;
1979
2083