react-router 7.14.2 → 7.15.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 (72) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/dist/development/{browser-I6n6wVSO.d.mts → browser-3AnU12UI.d.mts} +2 -2
  3. package/dist/{production/browser-I6n6wVSO.d.mts → development/browser-BOdXz9dK.d.ts} +2 -2
  4. package/dist/development/{chunk-EVOBXE3Y.mjs → chunk-4N6VE7H7.mjs} +567 -317
  5. package/dist/{production/chunk-PQL4HLVQ.js → development/chunk-4YRVXM2U.js} +7 -7
  6. package/dist/{production/chunk-UJQ4OJF4.js → development/chunk-66UKHEGQ.js} +153 -143
  7. package/dist/development/{chunk-ZZNWZ5Q3.js → chunk-D6LUOGOQ.js} +550 -310
  8. package/dist/development/{chunk-YQSHRJWW.mjs → chunk-RJYABSBD.mjs} +100 -80
  9. package/dist/{production/context-DGGUoDIu.d.mts → development/context-ByvtofY2.d.mts} +100 -42
  10. package/dist/development/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
  11. package/dist/development/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
  12. package/dist/development/dom-export.d.mts +8 -8
  13. package/dist/development/dom-export.d.ts +8 -8
  14. package/dist/development/dom-export.js +57 -62
  15. package/dist/development/dom-export.mjs +32 -37
  16. package/dist/{production/index-react-server-client-BBd0A0TL.d.ts → development/index-react-server-client-BS5F89FR.d.ts} +132 -122
  17. package/dist/{production/index-react-server-client-BjhKIe3u.d.mts → development/index-react-server-client-DY04-103.d.mts} +111 -101
  18. package/dist/development/index-react-server-client.d.mts +3 -3
  19. package/dist/development/index-react-server-client.d.ts +3 -3
  20. package/dist/development/index-react-server-client.js +4 -4
  21. package/dist/development/index-react-server-client.mjs +2 -2
  22. package/dist/development/index-react-server.d.mts +113 -36
  23. package/dist/development/index-react-server.d.ts +113 -36
  24. package/dist/development/index-react-server.js +63 -36
  25. package/dist/development/index-react-server.mjs +63 -36
  26. package/dist/development/index.d.mts +94 -12
  27. package/dist/development/index.d.ts +94 -12
  28. package/dist/development/index.js +193 -171
  29. package/dist/development/index.mjs +5 -3
  30. package/dist/{production/instrumentation-g0dG8UL0.d.ts → development/instrumentation-cRWWLfsU.d.ts} +79 -21
  31. package/dist/development/lib/types/internal.d.mts +2 -2
  32. package/dist/development/lib/types/internal.d.ts +2 -2
  33. package/dist/development/lib/types/internal.js +1 -1
  34. package/dist/development/lib/types/internal.mjs +1 -1
  35. package/dist/development/{register-DcBltf5q.d.ts → register-Bsscfj79.d.ts} +1 -1
  36. package/dist/{production/register-DcBltf5q.d.ts → development/register-Df8okEea.d.mts} +1 -1
  37. package/dist/production/{browser-C-UvoYvi.d.ts → browser-3AnU12UI.d.mts} +2 -2
  38. package/dist/{development/browser-C-UvoYvi.d.ts → production/browser-BOdXz9dK.d.ts} +2 -2
  39. package/dist/production/{chunk-2WLZNCK5.mjs → chunk-6S4627ZB.mjs} +100 -80
  40. package/dist/production/{chunk-X5SKXJ4A.js → chunk-HUBUW7R3.js} +550 -310
  41. package/dist/production/{chunk-LK6U7ULH.mjs → chunk-JAKZPQZC.mjs} +567 -317
  42. package/dist/{development/chunk-YZKCRDTN.js → production/chunk-PNZCCTKT.js} +153 -143
  43. package/dist/{development/chunk-PZFPF4X7.js → production/chunk-Y6IFXO7V.js} +7 -7
  44. package/dist/{development/context-DGGUoDIu.d.mts → production/context-ByvtofY2.d.mts} +100 -42
  45. package/dist/production/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
  46. package/dist/production/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
  47. package/dist/production/dom-export.d.mts +8 -8
  48. package/dist/production/dom-export.d.ts +8 -8
  49. package/dist/production/dom-export.js +57 -62
  50. package/dist/production/dom-export.mjs +32 -37
  51. package/dist/{development/index-react-server-client-BBd0A0TL.d.ts → production/index-react-server-client-BS5F89FR.d.ts} +132 -122
  52. package/dist/{development/index-react-server-client-BjhKIe3u.d.mts → production/index-react-server-client-DY04-103.d.mts} +111 -101
  53. package/dist/production/index-react-server-client.d.mts +3 -3
  54. package/dist/production/index-react-server-client.d.ts +3 -3
  55. package/dist/production/index-react-server-client.js +4 -4
  56. package/dist/production/index-react-server-client.mjs +2 -2
  57. package/dist/production/index-react-server.d.mts +113 -36
  58. package/dist/production/index-react-server.d.ts +113 -36
  59. package/dist/production/index-react-server.js +63 -36
  60. package/dist/production/index-react-server.mjs +63 -36
  61. package/dist/production/index.d.mts +94 -12
  62. package/dist/production/index.d.ts +94 -12
  63. package/dist/production/index.js +193 -171
  64. package/dist/production/index.mjs +5 -3
  65. package/dist/{development/instrumentation-g0dG8UL0.d.ts → production/instrumentation-cRWWLfsU.d.ts} +79 -21
  66. package/dist/production/lib/types/internal.d.mts +2 -2
  67. package/dist/production/lib/types/internal.d.ts +2 -2
  68. package/dist/production/lib/types/internal.js +1 -1
  69. package/dist/production/lib/types/internal.mjs +1 -1
  70. package/dist/{development/register-D9d2sMQ7.d.mts → production/register-Bsscfj79.d.ts} +1 -1
  71. package/dist/production/{register-D9d2sMQ7.d.mts → register-Df8okEea.d.mts} +1 -1
  72. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
- import { m as HTMLFormMethod, n as FormEncType, o as LoaderFunctionArgs, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, r as RouteObject, s as History, t as MaybePromise, u as MapRoutePropertiesFunction, v as Action, L as Location, w as DataRouteMatch, x as Submission, y as RouteData, z as DataStrategyFunction, B as PatchRoutesOnNavigationFunction, E as DataRouteObject, U as UIMatch, T as To, I as Path, P as Params, J as InitialEntry, K as NonIndexRouteObject, O as LazyRouteFunction, Q as IndexRouteObject, V as RouteMatch, W as TrackedPromise } from './routeModules-BW4a8k3I.mjs';
1
+ import { m as HTMLFormMethod, n as FormEncType, o as LoaderFunctionArgs, p as MiddlewareEnabled, c as RouterContextProvider, q as AppLoadContext, r as RouteObject, s as History, t as MaybePromise, u as MapRoutePropertiesFunction, v as Action, L as Location, w as DataRouteMatch, x as Submission, y as RouteData, z as DataStrategyFunction, B as PatchRoutesOnNavigationFunction, E as DataRouteObject, I as RouteBranch, J as RouteManifest, U as UIMatch, T as To, K as Path, P as Params, O as InitialEntry, Q as NonIndexRouteObject, V as LazyRouteFunction, W as IndexRouteObject, X as RouteMatch, Y as TrackedPromise } from './data-BVUf681J.mjs';
2
2
  import * as React from 'react';
3
3
 
4
- type unstable_ServerInstrumentation = {
5
- handler?: unstable_InstrumentRequestHandlerFunction;
6
- route?: unstable_InstrumentRouteFunction;
4
+ type ServerInstrumentation = {
5
+ handler?: InstrumentRequestHandlerFunction;
6
+ route?: InstrumentRouteFunction;
7
7
  };
8
- type unstable_ClientInstrumentation = {
9
- router?: unstable_InstrumentRouterFunction;
10
- route?: unstable_InstrumentRouteFunction;
8
+ type ClientInstrumentation = {
9
+ router?: InstrumentRouterFunction;
10
+ route?: InstrumentRouteFunction;
11
11
  };
12
- type unstable_InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
13
- type unstable_InstrumentRouterFunction = (router: InstrumentableRouter) => void;
14
- type unstable_InstrumentRouteFunction = (route: InstrumentableRoute) => void;
15
- type unstable_InstrumentationHandlerResult = {
12
+ type InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
13
+ type InstrumentRouterFunction = (router: InstrumentableRouter) => void;
14
+ type InstrumentRouteFunction = (route: InstrumentableRoute) => void;
15
+ type InstrumentationHandlerResult = {
16
16
  status: "success";
17
17
  error: undefined;
18
18
  } | {
19
19
  status: "error";
20
20
  error: Error;
21
21
  };
22
- type InstrumentFunction<T> = (handler: () => Promise<unstable_InstrumentationHandlerResult>, info: T) => Promise<void>;
22
+ type InstrumentFunction<T> = (handler: () => Promise<InstrumentationHandlerResult>, info: T) => Promise<void>;
23
23
  type ReadonlyRequest = {
24
24
  method: string;
25
25
  url: string;
@@ -45,7 +45,7 @@ type RouteLazyInstrumentationInfo = undefined;
45
45
  type RouteHandlerInstrumentationInfo = Readonly<{
46
46
  request: ReadonlyRequest;
47
47
  params: LoaderFunctionArgs["params"];
48
- unstable_pattern: string;
48
+ pattern: string;
49
49
  context: ReadonlyContext;
50
50
  }>;
51
51
  type InstrumentableRouter = {
@@ -115,6 +115,20 @@ interface Router$1 {
115
115
  * Return the routes for this router instance
116
116
  */
117
117
  get routes(): DataRouteObject[];
118
+ /**
119
+ * @private
120
+ * PRIVATE - DO NOT USE
121
+ *
122
+ * Return the route branches for this router instance
123
+ */
124
+ get branches(): RouteBranch<DataRouteObject>[] | undefined;
125
+ /**
126
+ * @private
127
+ * PRIVATE - DO NOT USE
128
+ *
129
+ * Return the manifest for this router instance
130
+ */
131
+ get manifest(): RouteManifest;
118
132
  /**
119
133
  * @private
120
134
  * PRIVATE - DO NOT USE
@@ -362,7 +376,6 @@ type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "e
362
376
  * Future flags to toggle new feature behavior
363
377
  */
364
378
  interface FutureConfig {
365
- unstable_passThroughRequests: boolean;
366
379
  }
367
380
  /**
368
381
  * Initialization options for createRouter
@@ -372,7 +385,7 @@ interface RouterInit {
372
385
  history: History;
373
386
  basename?: string;
374
387
  getContext?: () => MaybePromise<RouterContextProvider>;
375
- unstable_instrumentations?: unstable_ClientInstrumentation[];
388
+ instrumentations?: ClientInstrumentation[];
376
389
  mapRouteProperties?: MapRoutePropertiesFunction;
377
390
  future?: Partial<FutureConfig>;
378
391
  hydrationRouteProperties?: string[];
@@ -400,7 +413,33 @@ interface StaticHandlerContext {
400
413
  * A StaticHandler instance manages a singular SSR navigation/fetch event
401
414
  */
402
415
  interface StaticHandler {
416
+ /**
417
+ * The set of data routes managed by this handler
418
+ */
403
419
  dataRoutes: DataRouteObject[];
420
+ /**
421
+ * @private
422
+ * PRIVATE - DO NOT USE
423
+ *
424
+ * The route branches derived from the data routes, used for internal route
425
+ * matching in Framework Mode
426
+ */
427
+ _internalRouteBranches: RouteBranch<DataRouteObject>[];
428
+ /**
429
+ * Perform a query for a given request - executing all matched route
430
+ * loaders/actions. Used for document requests.
431
+ *
432
+ * @param request The request to query
433
+ * @param opts Optional query options
434
+ * @param opts.dataStrategy Alternate dataStrategy implementation
435
+ * @param opts.filterMatchesToLoad Predicate function to filter which matches should be loaded
436
+ * @param opts.generateMiddlewareResponse To enable middleware, provide a function
437
+ * to generate a response to bubble back up the middleware chain
438
+ * @param opts.requestContext Context object to pass to loaders/actions
439
+ * @param opts.skipLoaderErrorBubbling Skip loader error bubbling
440
+ * @param opts.skipRevalidation Skip revalidation after action submission
441
+ * @param opts.normalizePath Normalize the request path
442
+ */
404
443
  query(request: Request, opts?: {
405
444
  requestContext?: unknown;
406
445
  filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
@@ -410,14 +449,27 @@ interface StaticHandler {
410
449
  generateMiddlewareResponse?: (query: (r: Request, args?: {
411
450
  filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
412
451
  }) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
413
- unstable_normalizePath?: (request: Request) => Path;
452
+ normalizePath?: (request: Request) => Path;
414
453
  }): Promise<StaticHandlerContext | Response>;
454
+ /**
455
+ * Perform a query for a specific route. Used for resource requests.
456
+ *
457
+ * @param request The request to query
458
+ * @param opts Optional queryRoute options
459
+ * @param opts.dataStrategy Alternate dataStrategy implementation
460
+ * @param opts.generateMiddlewareResponse To enable middleware, provide a function
461
+ * to generate a response to bubble back up the middleware chain
462
+ * @param opts.requestContext Context object to pass to loaders/actions
463
+ * @param opts.routeId The ID of the route to query
464
+ * @param opts.normalizePath Normalize the request path
465
+
466
+ */
415
467
  queryRoute(request: Request, opts?: {
416
468
  routeId?: string;
417
469
  requestContext?: unknown;
418
470
  dataStrategy?: DataStrategyFunction<unknown>;
419
471
  generateMiddlewareResponse?: (queryRoute: (r: Request) => Promise<Response>) => MaybePromise<Response>;
420
- unstable_normalizePath?: (request: Request) => Path;
472
+ normalizePath?: (request: Request) => Path;
421
473
  }): Promise<any>;
422
474
  }
423
475
  type ViewTransitionOpts = {
@@ -461,14 +513,14 @@ type BaseNavigateOrFetchOptions = {
461
513
  preventScrollReset?: boolean;
462
514
  relative?: RelativeRoutingType;
463
515
  flushSync?: boolean;
464
- unstable_defaultShouldRevalidate?: boolean;
516
+ defaultShouldRevalidate?: boolean;
465
517
  };
466
518
  type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
467
519
  replace?: boolean;
468
520
  state?: any;
469
521
  fromRouteId?: string;
470
522
  viewTransition?: boolean;
471
- unstable_mask?: To;
523
+ mask?: To;
472
524
  };
473
525
  type BaseSubmissionOptions = {
474
526
  formMethod?: HTMLFormMethod;
@@ -511,6 +563,8 @@ type NavigationStates = {
511
563
  Idle: {
512
564
  state: "idle";
513
565
  location: undefined;
566
+ matches: undefined;
567
+ historyAction: undefined;
514
568
  formMethod: undefined;
515
569
  formAction: undefined;
516
570
  formEncType: undefined;
@@ -521,6 +575,8 @@ type NavigationStates = {
521
575
  Loading: {
522
576
  state: "loading";
523
577
  location: Location;
578
+ matches: DataRouteMatch[];
579
+ historyAction: Action;
524
580
  formMethod: Submission["formMethod"] | undefined;
525
581
  formAction: Submission["formAction"] | undefined;
526
582
  formEncType: Submission["formEncType"] | undefined;
@@ -531,6 +587,8 @@ type NavigationStates = {
531
587
  Submitting: {
532
588
  state: "submitting";
533
589
  location: Location;
590
+ matches: DataRouteMatch[];
591
+ historyAction: Action;
534
592
  formMethod: Submission["formMethod"];
535
593
  formAction: Submission["formAction"];
536
594
  formEncType: Submission["formEncType"];
@@ -651,7 +709,7 @@ declare function createRouter(init: RouterInit): Router$1;
651
709
  interface CreateStaticHandlerOptions {
652
710
  basename?: string;
653
711
  mapRouteProperties?: MapRoutePropertiesFunction;
654
- unstable_instrumentations?: Pick<unstable_ServerInstrumentation, "route">[];
712
+ instrumentations?: Pick<ServerInstrumentation, "route">[];
655
713
  future?: Partial<FutureConfig>;
656
714
  }
657
715
 
@@ -702,7 +760,7 @@ interface MemoryRouterOpts {
702
760
  *
703
761
  * ```tsx
704
762
  * let router = createBrowserRouter(routes, {
705
- * unstable_instrumentations: [logging]
763
+ * instrumentations: [logging]
706
764
  * });
707
765
  *
708
766
  *
@@ -740,7 +798,7 @@ interface MemoryRouterOpts {
740
798
  * }
741
799
  * ```
742
800
  */
743
- unstable_instrumentations?: unstable_ClientInstrumentation[];
801
+ instrumentations?: ClientInstrumentation[];
744
802
  /**
745
803
  * Override the default data strategy of running loaders in parallel -
746
804
  * see the [docs](../../how-to/data-strategy) for more information.
@@ -792,7 +850,7 @@ interface MemoryRouterOpts {
792
850
  * @param {MemoryRouterOpts.hydrationData} opts.hydrationData n/a
793
851
  * @param {MemoryRouterOpts.initialEntries} opts.initialEntries n/a
794
852
  * @param {MemoryRouterOpts.initialIndex} opts.initialIndex n/a
795
- * @param {MemoryRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
853
+ * @param {MemoryRouterOpts.instrumentations} opts.instrumentations n/a
796
854
  * @param {MemoryRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
797
855
  * @returns An initialized {@link DataRouter} to pass to {@link RouterProvider | `<RouterProvider>`}
798
856
  */
@@ -805,7 +863,7 @@ interface ClientOnErrorFunction {
805
863
  (error: unknown, info: {
806
864
  location: Location;
807
865
  params: Params;
808
- unstable_pattern: string;
866
+ pattern: string;
809
867
  errorInfo?: React.ErrorInfo;
810
868
  }): void;
811
869
  }
@@ -839,7 +897,7 @@ interface RouterProviderProps {
839
897
  *
840
898
  * ```tsx
841
899
  * <RouterProvider onError=(error, info) => {
842
- * let { location, params, unstable_pattern, errorInfo } = info;
900
+ * let { location, params, pattern, errorInfo } = info;
843
901
  * console.error(error, location, errorInfo);
844
902
  * reportToErrorService(error, location, errorInfo);
845
903
  * }} />
@@ -862,9 +920,9 @@ interface RouterProviderProps {
862
920
  * - When set to `false`, the router will not leverage `React.startTransition` or
863
921
  * `React.useOptimistic` on any navigations or state changes.
864
922
  *
865
- * For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
923
+ * For more information, please see the [docs](../../explanation/react-transitions).
866
924
  */
867
- unstable_useTransitions?: boolean;
925
+ useTransitions?: boolean;
868
926
  }
869
927
  /**
870
928
  * Render the UI for the given {@link DataRouter}. This component should
@@ -895,10 +953,10 @@ interface RouterProviderProps {
895
953
  * @param {RouterProviderProps.flushSync} props.flushSync n/a
896
954
  * @param {RouterProviderProps.onError} props.onError n/a
897
955
  * @param {RouterProviderProps.router} props.router n/a
898
- * @param {RouterProviderProps.unstable_useTransitions} props.unstable_useTransitions n/a
956
+ * @param {RouterProviderProps.useTransitions} props.useTransitions n/a
899
957
  * @returns React element for the rendered router
900
958
  */
901
- declare function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, unstable_useTransitions, }: RouterProviderProps): React.ReactElement;
959
+ declare function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, useTransitions, }: RouterProviderProps): React.ReactElement;
902
960
  /**
903
961
  * @category Types
904
962
  */
@@ -931,9 +989,9 @@ interface MemoryRouterProps {
931
989
  * - When set to `false`, the router will not leverage `React.startTransition`
932
990
  * on any navigations or state changes.
933
991
  *
934
- * For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
992
+ * For more information, please see the [docs](../../explanation/react-transitions).
935
993
  */
936
- unstable_useTransitions?: boolean;
994
+ useTransitions?: boolean;
937
995
  }
938
996
  /**
939
997
  * A declarative {@link Router | `<Router>`} that stores all entries in memory.
@@ -946,11 +1004,11 @@ interface MemoryRouterProps {
946
1004
  * @param {MemoryRouterProps.children} props.children n/a
947
1005
  * @param {MemoryRouterProps.initialEntries} props.initialEntries n/a
948
1006
  * @param {MemoryRouterProps.initialIndex} props.initialIndex n/a
949
- * @param {MemoryRouterProps.unstable_useTransitions} props.unstable_useTransitions n/a
1007
+ * @param {MemoryRouterProps.useTransitions} props.useTransitions n/a
950
1008
  * @returns A declarative in-memory {@link Router | `<Router>`} for client-side
951
1009
  * routing.
952
1010
  */
953
- declare function MemoryRouter({ basename, children, initialEntries, initialIndex, unstable_useTransitions, }: MemoryRouterProps): React.ReactElement;
1011
+ declare function MemoryRouter({ basename, children, initialEntries, initialIndex, useTransitions, }: MemoryRouterProps): React.ReactElement;
954
1012
  /**
955
1013
  * @category Types
956
1014
  */
@@ -1318,9 +1376,9 @@ interface RouterProps {
1318
1376
  * - When set to `false`, the router will not leverage `React.startTransition`
1319
1377
  * on any navigations or state changes.
1320
1378
  *
1321
- * For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
1379
+ * For more information, please see the [docs](../../explanation/react-transitions).
1322
1380
  */
1323
- unstable_useTransitions?: boolean;
1381
+ useTransitions?: boolean;
1324
1382
  }
1325
1383
  /**
1326
1384
  * Provides location context for the rest of the app.
@@ -1339,11 +1397,11 @@ interface RouterProps {
1339
1397
  * @param {RouterProps.navigationType} props.navigationType n/a
1340
1398
  * @param {RouterProps.navigator} props.navigator n/a
1341
1399
  * @param {RouterProps.static} props.static n/a
1342
- * @param {RouterProps.unstable_useTransitions} props.unstable_useTransitions n/a
1400
+ * @param {RouterProps.useTransitions} props.useTransitions n/a
1343
1401
  * @returns React element for the rendered router or `null` if the location does
1344
1402
  * not match the {@link props.basename}
1345
1403
  */
1346
- declare function Router({ basename: basenameProp, children, location: locationProp, navigationType, navigator, static: staticProp, unstable_useTransitions, }: RouterProps): React.ReactElement | null;
1404
+ declare function Router({ basename: basenameProp, children, location: locationProp, navigationType, navigator, static: staticProp, useTransitions, }: RouterProps): React.ReactElement | null;
1347
1405
  /**
1348
1406
  * @category Types
1349
1407
  */
@@ -1636,7 +1694,7 @@ declare function withErrorBoundaryProps(ErrorBoundary: ErrorBoundaryType): () =>
1636
1694
  error: unknown;
1637
1695
  }, string | React.JSXElementConstructor<any>>;
1638
1696
 
1639
- interface DataRouterContextObject extends Omit<NavigationContextObject, "future" | "unstable_useTransitions"> {
1697
+ interface DataRouterContextObject extends Omit<NavigationContextObject, "future" | "useTransitions"> {
1640
1698
  router: Router$1;
1641
1699
  staticContext?: StaticHandlerContext;
1642
1700
  onError?: ClientOnErrorFunction;
@@ -1660,7 +1718,7 @@ interface NavigateOptions {
1660
1718
  /** Replace the current entry in the history stack instead of pushing a new one */
1661
1719
  replace?: boolean;
1662
1720
  /** Masked URL */
1663
- unstable_mask?: To;
1721
+ mask?: To;
1664
1722
  /** Adds persistent client side routing state to the next location */
1665
1723
  state?: any;
1666
1724
  /** If you are using {@link ScrollRestoration `<ScrollRestoration>`}, prevent the scroll position from being reset to the top of the window when navigating */
@@ -1672,7 +1730,7 @@ interface NavigateOptions {
1672
1730
  /** Enables a {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API View Transition} for this navigation by wrapping the final state update in `document.startViewTransition()`. If you need to apply specific styles for this view transition, you will also need to leverage the {@link useViewTransitionState `useViewTransitionState()`} hook. */
1673
1731
  viewTransition?: boolean;
1674
1732
  /** Specifies the default revalidation behavior after this submission */
1675
- unstable_defaultShouldRevalidate?: boolean;
1733
+ defaultShouldRevalidate?: boolean;
1676
1734
  }
1677
1735
  /**
1678
1736
  * A Navigator is a "location changer"; it's how you get to different locations.
@@ -1694,7 +1752,7 @@ interface NavigationContextObject {
1694
1752
  basename: string;
1695
1753
  navigator: Navigator;
1696
1754
  static: boolean;
1697
- unstable_useTransitions: boolean | undefined;
1755
+ useTransitions: boolean | undefined;
1698
1756
  future: {};
1699
1757
  }
1700
1758
  declare const NavigationContext: React.Context<NavigationContextObject>;
@@ -1710,4 +1768,4 @@ interface RouteContextObject {
1710
1768
  }
1711
1769
  declare const RouteContext: React.Context<RouteContextObject>;
1712
1770
 
1713
- export { createRoutesFromElements as $, AwaitContextProvider as A, type BlockerFunction as B, type ClientOnErrorFunction as C, type RouteProps as D, type RouterProps as E, type Fetcher as F, type GetScrollPositionFunction as G, type HydrationState as H, IDLE_NAVIGATION as I, type RoutesProps as J, Await as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateOptions as N, type OutletProps as O, type PathRouteProps as P, MemoryRouter as Q, type RouterInit as R, type StaticHandler as S, Navigate as T, Outlet as U, Route as V, Router as W, RouterProvider as X, Routes as Y, createMemoryRouter as Z, createRoutesFromChildren as _, type RouterProviderProps as a, renderMatches as a0, createRouter as a1, DataRouterContext as a2, DataRouterStateContext as a3, FetchersContext as a4, LocationContext as a5, NavigationContext as a6, RouteContext as a7, ViewTransitionContext as a8, hydrationRouteProperties as a9, mapRouteProperties as aa, WithComponentProps as ab, withComponentProps as ac, WithHydrateFallbackProps as ad, withHydrateFallbackProps as ae, WithErrorBoundaryProps as af, withErrorBoundaryProps as ag, type FutureConfig as ah, type CreateStaticHandlerOptions as ai, type Router$1 as b, type Blocker as c, type RelativeRoutingType as d, type Navigation as e, type RouterState as f, type GetScrollRestorationKeyFunction as g, type StaticHandlerContext as h, type NavigationStates as i, type RouterSubscriber as j, type RouterNavigateOptions as k, type RouterFetchOptions as l, type RevalidationState as m, type unstable_ServerInstrumentation as n, type unstable_InstrumentRequestHandlerFunction as o, type unstable_InstrumentRouterFunction as p, type unstable_InstrumentRouteFunction as q, type unstable_InstrumentationHandlerResult as r, IDLE_FETCHER as s, IDLE_BLOCKER as t, type unstable_ClientInstrumentation as u, type Navigator as v, type AwaitProps as w, type IndexRouteProps as x, type MemoryRouterProps as y, type NavigateProps as z };
1771
+ export { createRoutesFromElements as $, AwaitContextProvider as A, type BlockerFunction as B, type ClientInstrumentation as C, type RouteProps as D, type RouterProps as E, type Fetcher as F, type GetScrollPositionFunction as G, type HydrationState as H, type InstrumentRequestHandlerFunction as I, type RoutesProps as J, Await as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateOptions as N, type OutletProps as O, type PathRouteProps as P, MemoryRouter as Q, type RouterInit as R, type StaticHandler as S, Navigate as T, Outlet as U, Route as V, Router as W, RouterProvider as X, Routes as Y, createMemoryRouter as Z, createRoutesFromChildren as _, type RouterProviderProps as a, renderMatches as a0, createRouter as a1, DataRouterContext as a2, DataRouterStateContext as a3, FetchersContext as a4, LocationContext as a5, NavigationContext as a6, RouteContext as a7, ViewTransitionContext as a8, hydrationRouteProperties as a9, mapRouteProperties as aa, WithComponentProps as ab, withComponentProps as ac, WithHydrateFallbackProps as ad, withHydrateFallbackProps as ae, WithErrorBoundaryProps as af, withErrorBoundaryProps as ag, type FutureConfig as ah, type CreateStaticHandlerOptions as ai, type ClientOnErrorFunction as b, type Router$1 as c, type NavigationStates as d, type Blocker as e, type RelativeRoutingType as f, type Navigation as g, type RouterState as h, type GetScrollRestorationKeyFunction as i, type StaticHandlerContext as j, type RouterSubscriber as k, type RouterNavigateOptions as l, type RouterFetchOptions as m, type RevalidationState as n, type ServerInstrumentation as o, type InstrumentRouterFunction as p, type InstrumentRouteFunction as q, type InstrumentationHandlerResult as r, IDLE_NAVIGATION as s, IDLE_FETCHER as t, IDLE_BLOCKER as u, type Navigator as v, type AwaitProps as w, type IndexRouteProps as x, type MemoryRouterProps as y, type NavigateProps as z };
@@ -1,16 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentType, ReactElement } from 'react';
3
3
 
4
- /**
5
- * An augmentable interface users can modify in their app-code to opt into
6
- * future-flag-specific types
7
- */
8
- interface Future {
9
- }
10
- type MiddlewareEnabled = Future extends {
11
- v8_middleware: infer T extends boolean;
12
- } ? T : false;
13
-
14
4
  /**
15
5
  * Actions represent the type of change to a location value.
16
6
  */
@@ -72,7 +62,7 @@ interface Location<State = any> extends Path {
72
62
  * The masked location displayed in the URL bar, which differs from the URL the
73
63
  * router is operating on
74
64
  */
75
- unstable_mask: Path | undefined;
65
+ mask?: Path;
76
66
  }
77
67
  /**
78
68
  * A change to the current location.
@@ -265,6 +255,16 @@ type UrlHistoryOptions = {
265
255
  v5Compat?: boolean;
266
256
  };
267
257
 
258
+ /**
259
+ * An augmentable interface users can modify in their app-code to opt into
260
+ * future-flag-specific types
261
+ */
262
+ interface Future {
263
+ }
264
+ type MiddlewareEnabled = Future extends {
265
+ v8_middleware: infer T extends boolean;
266
+ } ? T : false;
267
+
268
268
  type MaybePromise<T> = T | Promise<T>;
269
269
  /**
270
270
  * Map of routeId -> data returned from a loader/action/error
@@ -445,19 +445,19 @@ interface DataFunctionArgs<Context> {
445
445
  /** 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. */
446
446
  request: Request;
447
447
  /**
448
- * A URL instance representing the application location being navigated to or fetched.
449
- * Without `future.unstable_passThroughRequests` enabled, this matches `request.url`.
450
- * With `future.unstable_passThroughRequests` enabled, this is a normalized
451
- * URL with React-Router-specific implementation details removed (`.data`
452
- * suffixes, `index`/`_routes` search params).
453
- * The URL includes the origin from the request for convenience.
448
+ * A URL instance representing the application location being navigated to or
449
+ * fetched. By default, this matches `request.url`.
450
+ *
451
+ * In Framework mode with `future.v8_passThroughRequests` enabled, this is a
452
+ * normalized URL with React-Router-specific implementation details removed
453
+ * (`.data` suffixes, `index`/`_routes` search params).
454
454
  */
455
- unstable_url: URL;
455
+ url: URL;
456
456
  /**
457
457
  * Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
458
458
  * Mostly useful as a identifier to aggregate on for logging/tracing/etc.
459
459
  */
460
- unstable_pattern: string;
460
+ pattern: string;
461
461
  /**
462
462
  * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
463
463
  * @example
@@ -956,6 +956,24 @@ interface UIMatch<Data = unknown, Handle = unknown> {
956
956
  */
957
957
  handle: Handle;
958
958
  }
959
+ interface RouteMeta<RouteObjectType extends RouteObject = RouteObject> {
960
+ relativePath: string;
961
+ caseSensitive: boolean;
962
+ childrenIndex: number;
963
+ route: RouteObjectType;
964
+ }
965
+ /**
966
+ * @private
967
+ * PRIVATE - DO NOT USE
968
+ *
969
+ * A "branch" of routes that match a given route pattern.
970
+ * This is an internal interface not intended for direct external usage.
971
+ */
972
+ interface RouteBranch<RouteObjectType extends RouteObject = RouteObject> {
973
+ path: string;
974
+ score: number;
975
+ routesMeta: RouteMeta<RouteObjectType>[];
976
+ }
959
977
  /**
960
978
  * Returns a path with params interpolated.
961
979
  *
@@ -1214,16 +1232,6 @@ declare class ErrorResponseImpl implements ErrorResponse {
1214
1232
  */
1215
1233
  declare function isRouteErrorResponse(error: any): error is ErrorResponse;
1216
1234
 
1217
- /**
1218
- * An object of unknown type for route loaders and actions provided by the
1219
- * server's `getLoadContext()` function. This is defined as an empty interface
1220
- * specifically so apps can leverage declaration merging to augment this type
1221
- * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
1222
- */
1223
- interface AppLoadContext {
1224
- [key: string]: unknown;
1225
- }
1226
-
1227
1235
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
1228
1236
  type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
1229
1237
  interface HtmlLinkProps {
@@ -1395,14 +1403,14 @@ type ClientDataFunctionArgs<Params> = {
1395
1403
  **/
1396
1404
  request: Request;
1397
1405
  /**
1398
- * A URL instance representing the application location being navigated to or fetched.
1399
- * Without `future.unstable_passThroughRequests` enabled, this matches `request.url`.
1400
- * With `future.unstable_passThroughRequests` enabled, this is a normalized
1401
- * URL with React-Router-specific implementation details removed (`.data`
1402
- * pathnames, `index`/`_routes` search params).
1403
- * The URL includes the origin from the request for convenience.
1406
+ * A URL instance representing the application location being navigated to or
1407
+ * fetched. By default, this matches `request.url`.
1408
+ *
1409
+ * In Framework mode with `future.v8_passThroughRequests` enabled, this is a
1410
+ * normalized URL with React-Router-specific implementation details removed
1411
+ * (`.data` suffixes, `index`/`_routes` search params).
1404
1412
  */
1405
- unstable_url: URL;
1413
+ url: URL;
1406
1414
  /**
1407
1415
  * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
1408
1416
  * @example
@@ -1422,7 +1430,7 @@ type ClientDataFunctionArgs<Params> = {
1422
1430
  * Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
1423
1431
  * Mostly useful as a identifier to aggregate on for logging/tracing/etc.
1424
1432
  */
1425
- unstable_pattern: string;
1433
+ pattern: string;
1426
1434
  /**
1427
1435
  * When `future.v8_middleware` is not enabled, this is undefined.
1428
1436
  *
@@ -1437,14 +1445,14 @@ type ServerDataFunctionArgs<Params> = {
1437
1445
  /** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
1438
1446
  request: Request;
1439
1447
  /**
1440
- * A URL instance representing the application location being navigated to or fetched.
1441
- * Without `future.unstable_passThroughRequests` enabled, this matches `request.url`.
1442
- * With `future.unstable_passThroughRequests` enabled, this is a normalized
1443
- * URL with React-Router-specific implementation details removed (`.data`
1444
- * pathnames, `index`/`_routes` search params).
1445
- * The URL includes the origin from the request for convenience.
1448
+ * A URL instance representing the application location being navigated to or
1449
+ * fetched. By default, this matches `request.url`.
1450
+ *
1451
+ * In Framework mode with `future.v8_passThroughRequests` enabled, this is a
1452
+ * normalized URL with React-Router-specific implementation details removed
1453
+ * (`.data` suffixes, `index`/`_routes` search params).
1446
1454
  */
1447
- unstable_url: URL;
1455
+ url: URL;
1448
1456
  /**
1449
1457
  * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
1450
1458
  * @example
@@ -1464,7 +1472,7 @@ type ServerDataFunctionArgs<Params> = {
1464
1472
  * Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
1465
1473
  * Mostly useful as a identifier to aggregate on for logging/tracing/etc.
1466
1474
  */
1467
- unstable_pattern: string;
1475
+ pattern: string;
1468
1476
  /**
1469
1477
  * Without `future.v8_middleware` enabled, this is the context passed in
1470
1478
  * to your server adapter's `getLoadContext` function. It's a way to bridge the
@@ -1711,4 +1719,14 @@ type RouteComponent = ComponentType<{}>;
1711
1719
  */
1712
1720
  type RouteHandle = unknown;
1713
1721
 
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 };
1722
+ /**
1723
+ * An object of unknown type for route loaders and actions provided by the
1724
+ * server's `getLoadContext()` function. This is defined as an empty interface
1725
+ * specifically so apps can leverage declaration merging to augment this type
1726
+ * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
1727
+ */
1728
+ interface AppLoadContext {
1729
+ [key: string]: unknown;
1730
+ }
1731
+
1732
+ export { type PathPattern 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 RouteBranch as I, type RouteManifest as J, type Path as K, type Location as L, type MetaFunction as M, type Normalize as N, type InitialEntry as O, type Params as P, type NonIndexRouteObject as Q, type RouteModule$1 as R, type ShouldRevalidateFunction as S, type To as T, type UIMatch as U, type LazyRouteFunction as V, type IndexRouteObject as W, type RouteMatch as X, type TrackedPromise as Y, type RouteModules as Z, type SerializeFrom as _, type ClientLoaderFunction as a, type PathMatch as a0, type ParamParseKey as a1, type Equal as a2, type ActionFunctionArgs as a3, type BaseRouteObject as a4, type DataStrategyFunctionArgs as a5, type DataStrategyMatch as a6, DataWithResponseInit as a7, type ErrorResponse as a8, type FormMethod as a9, createMemoryHistory as aA, createBrowserHistory as aB, createHashHistory as aC, invariant as aD, ErrorResponseImpl as aE, type ServerRouteModule as aF, type MiddlewareFunction as aa, type PatchRoutesOnNavigationFunctionArgs as ab, type PathParam as ac, type RedirectFunction as ad, type RouterContext as ae, type ShouldRevalidateFunctionArgs as af, createContext as ag, createPath as ah, parsePath as ai, data as aj, generatePath as ak, isRouteErrorResponse as al, matchPath as am, matchRoutes as an, redirect as ao, redirectDocument as ap, replace as aq, resolvePath as ar, type ClientActionFunctionArgs as as, type ClientLoaderFunctionArgs as at, type HeadersArgs as au, type MetaArgs as av, type PageLinkDescriptor as aw, type HtmlLinkDescriptor as ax, type Future as ay, type unstable_SerializesTo 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 };