react-router 7.8.1 → 7.8.2-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/development/{chunk-UH6JLGW7.mjs → chunk-5LNVHL6T.mjs} +185 -201
  3. package/dist/development/{chunk-TGXCWGPT.js → chunk-KUJAVZYD.js} +123 -180
  4. package/dist/development/{chunk-IFMMFE4R.mjs → chunk-RVSOEW4N.mjs} +34 -75
  5. package/dist/development/{chunk-IIA3TUI2.js → chunk-UMVNFWBW.js} +210 -169
  6. package/dist/development/{context-DohQKLID.d.mts → context-D5hQ2yCL.d.mts} +843 -6
  7. package/dist/development/dom-export.d.mts +20 -2
  8. package/dist/development/dom-export.d.ts +20 -1
  9. package/dist/development/dom-export.js +10 -4
  10. package/dist/development/dom-export.mjs +10 -4
  11. package/dist/{production/index-react-server-client-BQ6FxdA_.d.ts → development/index-react-server-client-C4AMmMi3.d.ts} +6 -816
  12. package/dist/{production/index-react-server-client-11fLy3qB.d.mts → development/index-react-server-client-DgVbd8DS.d.mts} +2 -3
  13. package/dist/development/index-react-server-client.d.mts +3 -4
  14. package/dist/development/index-react-server-client.d.ts +2 -2
  15. package/dist/development/index-react-server-client.js +4 -4
  16. package/dist/development/index-react-server-client.mjs +2 -2
  17. package/dist/development/index-react-server.d.mts +1 -1
  18. package/dist/development/index-react-server.d.ts +1 -1
  19. package/dist/development/index-react-server.js +39 -45
  20. package/dist/development/index-react-server.mjs +39 -45
  21. package/dist/development/index.d.mts +7 -9
  22. package/dist/development/index.d.ts +5 -5
  23. package/dist/development/index.js +122 -163
  24. package/dist/development/index.mjs +3 -3
  25. package/dist/development/lib/types/internal.d.mts +3 -3
  26. package/dist/development/lib/types/internal.d.ts +2 -2
  27. package/dist/development/lib/types/internal.js +1 -1
  28. package/dist/development/lib/types/internal.mjs +1 -1
  29. package/dist/development/{route-data-CNjObrhZ.d.mts → route-data-B3sNokxM.d.mts} +2 -2
  30. package/dist/development/{routeModules-C3oqzPpI.d.ts → routeModules-DRWHoPcT.d.ts} +844 -7
  31. package/dist/production/{chunk-YMYXECPK.js → chunk-3PSRBVDP.js} +210 -169
  32. package/dist/production/{chunk-5Y7ELDIJ.mjs → chunk-4HHN5NDL.mjs} +34 -75
  33. package/dist/production/{chunk-KHPQXKYM.js → chunk-NCRSBAFG.js} +123 -180
  34. package/dist/production/{chunk-PFDCNQUK.mjs → chunk-O46NJYOA.mjs} +185 -201
  35. package/dist/production/{context-DohQKLID.d.mts → context-D5hQ2yCL.d.mts} +843 -6
  36. package/dist/production/dom-export.d.mts +20 -2
  37. package/dist/production/dom-export.d.ts +20 -1
  38. package/dist/production/dom-export.js +10 -4
  39. package/dist/production/dom-export.mjs +10 -4
  40. package/dist/{development/index-react-server-client-BQ6FxdA_.d.ts → production/index-react-server-client-C4AMmMi3.d.ts} +6 -816
  41. package/dist/{development/index-react-server-client-11fLy3qB.d.mts → production/index-react-server-client-DgVbd8DS.d.mts} +2 -3
  42. package/dist/production/index-react-server-client.d.mts +3 -4
  43. package/dist/production/index-react-server-client.d.ts +2 -2
  44. package/dist/production/index-react-server-client.js +4 -4
  45. package/dist/production/index-react-server-client.mjs +2 -2
  46. package/dist/production/index-react-server.d.mts +1 -1
  47. package/dist/production/index-react-server.d.ts +1 -1
  48. package/dist/production/index-react-server.js +39 -45
  49. package/dist/production/index-react-server.mjs +39 -45
  50. package/dist/production/index.d.mts +7 -9
  51. package/dist/production/index.d.ts +5 -5
  52. package/dist/production/index.js +122 -163
  53. package/dist/production/index.mjs +3 -3
  54. package/dist/production/lib/types/internal.d.mts +3 -3
  55. package/dist/production/lib/types/internal.d.ts +2 -2
  56. package/dist/production/lib/types/internal.js +1 -1
  57. package/dist/production/lib/types/internal.mjs +1 -1
  58. package/dist/production/{route-data-CNjObrhZ.d.mts → route-data-B3sNokxM.d.mts} +2 -2
  59. package/dist/production/{routeModules-C3oqzPpI.d.ts → routeModules-DRWHoPcT.d.ts} +844 -7
  60. package/package.json +1 -1
  61. package/dist/development/components-CuPfnyiZ.d.mts +0 -814
  62. package/dist/production/components-CuPfnyiZ.d.mts +0 -814
@@ -1038,7 +1038,7 @@ declare function isRouteErrorResponse(error: any): error is ErrorResponse;
1038
1038
  /**
1039
1039
  * A Router instance manages all navigation and data loading/mutations
1040
1040
  */
1041
- interface Router {
1041
+ interface Router$1 {
1042
1042
  /**
1043
1043
  * @private
1044
1044
  * PRIVATE - DO NOT USE
@@ -1082,7 +1082,7 @@ interface Router {
1082
1082
  * initial data fetches. Returns a function to cleanup listeners and abort
1083
1083
  * any in-progress loads
1084
1084
  */
1085
- initialize(): Router;
1085
+ initialize(): Router$1;
1086
1086
  /**
1087
1087
  * @private
1088
1088
  * PRIVATE - DO NOT USE
@@ -1322,7 +1322,7 @@ interface RouterInit {
1322
1322
  * State returned from a server-side query() call
1323
1323
  */
1324
1324
  interface StaticHandlerContext {
1325
- basename: Router["basename"];
1325
+ basename: Router$1["basename"];
1326
1326
  location: RouterState["location"];
1327
1327
  matches: RouterState["matches"];
1328
1328
  loaderData: RouterState["loaderData"];
@@ -1577,7 +1577,7 @@ declare const IDLE_BLOCKER: BlockerUnblocked;
1577
1577
  /**
1578
1578
  * Create a router and listen to history POP navigations
1579
1579
  */
1580
- declare function createRouter(init: RouterInit): Router;
1580
+ declare function createRouter(init: RouterInit): Router$1;
1581
1581
  interface CreateStaticHandlerOptions {
1582
1582
  basename?: string;
1583
1583
  mapRouteProperties?: MapRoutePropertiesFunction;
@@ -1636,8 +1636,9 @@ interface DataRouteMatch extends RouteMatch<string, DataRouteObject> {
1636
1636
  type PatchRoutesOnNavigationFunctionArgs = AgnosticPatchRoutesOnNavigationFunctionArgs<RouteObject, RouteMatch>;
1637
1637
  type PatchRoutesOnNavigationFunction = AgnosticPatchRoutesOnNavigationFunction<RouteObject, RouteMatch>;
1638
1638
  interface DataRouterContextObject extends Omit<NavigationContextObject, "future"> {
1639
- router: Router;
1639
+ router: Router$1;
1640
1640
  staticContext?: StaticHandlerContext;
1641
+ unstable_onError?: unstable_ClientOnErrorFunction;
1641
1642
  }
1642
1643
  declare const DataRouterContext: React.Context<DataRouterContextObject | null>;
1643
1644
  declare const DataRouterStateContext: React.Context<RouterState | null>;
@@ -1701,6 +1702,842 @@ interface RouteContextObject {
1701
1702
  }
1702
1703
  declare const RouteContext: React.Context<RouteContextObject>;
1703
1704
 
1705
+ declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
1706
+ hasErrorBoundary: boolean;
1707
+ };
1708
+ declare const hydrationRouteProperties: (keyof RouteObject)[];
1709
+ /**
1710
+ * @category Data Routers
1711
+ */
1712
+ interface MemoryRouterOpts {
1713
+ /**
1714
+ * Basename path for the application.
1715
+ */
1716
+ basename?: string;
1717
+ /**
1718
+ * A function that returns an {@link unstable_RouterContextProvider} instance
1719
+ * which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
1720
+ * [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
1721
+ * This function is called to generate a fresh `context` instance on each
1722
+ * navigation or fetcher call.
1723
+ */
1724
+ unstable_getContext?: RouterInit["unstable_getContext"];
1725
+ /**
1726
+ * Future flags to enable for the router.
1727
+ */
1728
+ future?: Partial<FutureConfig>;
1729
+ /**
1730
+ * Hydration data to initialize the router with if you have already performed
1731
+ * data loading on the server.
1732
+ */
1733
+ hydrationData?: HydrationState;
1734
+ /**
1735
+ * Initial entries in the in-memory history stack
1736
+ */
1737
+ initialEntries?: InitialEntry[];
1738
+ /**
1739
+ * Index of `initialEntries` the application should initialize to
1740
+ */
1741
+ initialIndex?: number;
1742
+ /**
1743
+ * Override the default data strategy of loading in parallel.
1744
+ * Only intended for advanced usage.
1745
+ */
1746
+ dataStrategy?: DataStrategyFunction;
1747
+ /**
1748
+ * Lazily define portions of the route tree on navigations.
1749
+ */
1750
+ patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
1751
+ }
1752
+ /**
1753
+ * Create a new {@link DataRouter} that manages the application path using an
1754
+ * in-memory [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1755
+ * stack. Useful for non-browser environments without a DOM API.
1756
+ *
1757
+ * @public
1758
+ * @category Data Routers
1759
+ * @mode data
1760
+ * @param routes Application routes
1761
+ * @param opts Options
1762
+ * @param {MemoryRouterOpts.basename} opts.basename n/a
1763
+ * @param {MemoryRouterOpts.dataStrategy} opts.dataStrategy n/a
1764
+ * @param {MemoryRouterOpts.future} opts.future n/a
1765
+ * @param {MemoryRouterOpts.unstable_getContext} opts.unstable_getContext n/a
1766
+ * @param {MemoryRouterOpts.hydrationData} opts.hydrationData n/a
1767
+ * @param {MemoryRouterOpts.initialEntries} opts.initialEntries n/a
1768
+ * @param {MemoryRouterOpts.initialIndex} opts.initialIndex n/a
1769
+ * @param {MemoryRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
1770
+ * @returns An initialized {@link DataRouter} to pass to {@link RouterProvider | `<RouterProvider>`}
1771
+ */
1772
+ declare function createMemoryRouter(routes: RouteObject[], opts?: MemoryRouterOpts): Router$1;
1773
+ /**
1774
+ * Function signature for client side error handling for loader/actions errors
1775
+ * and rendering errors via `componentDidCatch`
1776
+ */
1777
+ interface unstable_ClientOnErrorFunction {
1778
+ (error: unknown, errorInfo?: React.ErrorInfo): void;
1779
+ }
1780
+ /**
1781
+ * @category Types
1782
+ */
1783
+ interface RouterProviderProps {
1784
+ /**
1785
+ * The {@link DataRouter} instance to use for navigation and data fetching.
1786
+ */
1787
+ router: Router$1;
1788
+ /**
1789
+ * The [`ReactDOM.flushSync`](https://react.dev/reference/react-dom/flushSync)
1790
+ * implementation to use for flushing updates.
1791
+ *
1792
+ * You usually don't have to worry about this:
1793
+ * - The `RouterProvider` exported from `react-router/dom` handles this internally for you
1794
+ * - If you are rendering in a non-DOM environment, you can import
1795
+ * `RouterProvider` from `react-router` and ignore this prop
1796
+ */
1797
+ flushSync?: (fn: () => unknown) => undefined;
1798
+ /**
1799
+ * An error handler function that will be called for any loader/action/render
1800
+ * errors that are encountered in your application. This is useful for
1801
+ * logging or reporting errors instead of the `ErrorBoundary` because it's not
1802
+ * subject to re-rendering and will only run one time per error.
1803
+ *
1804
+ * The `errorInfo` parameter is passed along from
1805
+ * [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
1806
+ * and is only present for render errors.
1807
+ *
1808
+ * ```tsx
1809
+ * <RouterProvider unstable_onError=(error, errorInfo) => {
1810
+ * console.error(error, errorInfo);
1811
+ * reportToErrorService(error, errorInfo);
1812
+ * }} />
1813
+ * ```
1814
+ */
1815
+ unstable_onError?: unstable_ClientOnErrorFunction;
1816
+ }
1817
+ /**
1818
+ * Render the UI for the given {@link DataRouter}. This component should
1819
+ * typically be at the top of an app's element tree.
1820
+ *
1821
+ * ```tsx
1822
+ * import { createBrowserRouter } from "react-router";
1823
+ * import { RouterProvider } from "react-router/dom";
1824
+ * import { createRoot } from "react-dom/client";
1825
+ *
1826
+ * const router = createBrowserRouter(routes);
1827
+ * createRoot(document.getElementById("root")).render(
1828
+ * <RouterProvider router={router} />
1829
+ * );
1830
+ * ```
1831
+ *
1832
+ * <docs-info>Please note that this component is exported both from
1833
+ * `react-router` and `react-router/dom` with the only difference being that the
1834
+ * latter automatically wires up `react-dom`'s [`flushSync`](https://react.dev/reference/react-dom/flushSync)
1835
+ * implementation. You _almost always_ want to use the version from
1836
+ * `react-router/dom` unless you're running in a non-DOM environment.</docs-info>
1837
+ *
1838
+ *
1839
+ * @public
1840
+ * @category Data Routers
1841
+ * @mode data
1842
+ * @param props Props
1843
+ * @param {RouterProviderProps.flushSync} props.flushSync n/a
1844
+ * @param {RouterProviderProps.unstable_onError} props.unstable_onError n/a
1845
+ * @param {RouterProviderProps.router} props.router n/a
1846
+ * @returns React element for the rendered router
1847
+ */
1848
+ declare function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, unstable_onError, }: RouterProviderProps): React.ReactElement;
1849
+ /**
1850
+ * @category Types
1851
+ */
1852
+ interface MemoryRouterProps {
1853
+ /**
1854
+ * Application basename
1855
+ */
1856
+ basename?: string;
1857
+ /**
1858
+ * Nested {@link Route} elements describing the route tree
1859
+ */
1860
+ children?: React.ReactNode;
1861
+ /**
1862
+ * Initial entries in the in-memory history stack
1863
+ */
1864
+ initialEntries?: InitialEntry[];
1865
+ /**
1866
+ * Index of `initialEntries` the application should initialize to
1867
+ */
1868
+ initialIndex?: number;
1869
+ }
1870
+ /**
1871
+ * A declarative {@link Router | `<Router>`} that stores all entries in memory.
1872
+ *
1873
+ * @public
1874
+ * @category Declarative Routers
1875
+ * @mode declarative
1876
+ * @param props Props
1877
+ * @param {MemoryRouterProps.basename} props.basename n/a
1878
+ * @param {MemoryRouterProps.children} props.children n/a
1879
+ * @param {MemoryRouterProps.initialEntries} props.initialEntries n/a
1880
+ * @param {MemoryRouterProps.initialIndex} props.initialIndex n/a
1881
+ * @returns A declarative in-memory {@link Router | `<Router>`} for client-side
1882
+ * routing.
1883
+ */
1884
+ declare function MemoryRouter({ basename, children, initialEntries, initialIndex, }: MemoryRouterProps): React.ReactElement;
1885
+ /**
1886
+ * @category Types
1887
+ */
1888
+ interface NavigateProps {
1889
+ /**
1890
+ * The path to navigate to. This can be a string or a {@link Path} object
1891
+ */
1892
+ to: To;
1893
+ /**
1894
+ * Whether to replace the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1895
+ * stack
1896
+ */
1897
+ replace?: boolean;
1898
+ /**
1899
+ * State to pass to the new {@link Location} to store in [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state).
1900
+ */
1901
+ state?: any;
1902
+ /**
1903
+ * How to interpret relative routing in the `to` prop.
1904
+ * See {@link RelativeRoutingType}.
1905
+ */
1906
+ relative?: RelativeRoutingType;
1907
+ }
1908
+ /**
1909
+ * A component-based version of {@link useNavigate} to use in a
1910
+ * [`React.Component` class](https://react.dev/reference/react/Component) where
1911
+ * hooks cannot be used.
1912
+ *
1913
+ * It's recommended to avoid using this component in favor of {@link useNavigate}.
1914
+ *
1915
+ * @example
1916
+ * <Navigate to="/tasks" />
1917
+ *
1918
+ * @public
1919
+ * @category Components
1920
+ * @param props Props
1921
+ * @param {NavigateProps.relative} props.relative n/a
1922
+ * @param {NavigateProps.replace} props.replace n/a
1923
+ * @param {NavigateProps.state} props.state n/a
1924
+ * @param {NavigateProps.to} props.to n/a
1925
+ * @returns {void}
1926
+ *
1927
+ */
1928
+ declare function Navigate({ to, replace, state, relative, }: NavigateProps): null;
1929
+ /**
1930
+ * @category Types
1931
+ */
1932
+ interface OutletProps {
1933
+ /**
1934
+ * Provides a context value to the element tree below the outlet. Use when
1935
+ * the parent route needs to provide values to child routes.
1936
+ *
1937
+ * ```tsx
1938
+ * <Outlet context={myContextValue} />
1939
+ * ```
1940
+ *
1941
+ * Access the context with {@link useOutletContext}.
1942
+ */
1943
+ context?: unknown;
1944
+ }
1945
+ /**
1946
+ * Renders the matching child route of a parent route or nothing if no child
1947
+ * route matches.
1948
+ *
1949
+ * @example
1950
+ * import { Outlet } from "react-router";
1951
+ *
1952
+ * export default function SomeParent() {
1953
+ * return (
1954
+ * <div>
1955
+ * <h1>Parent Content</h1>
1956
+ * <Outlet />
1957
+ * </div>
1958
+ * );
1959
+ * }
1960
+ *
1961
+ * @public
1962
+ * @category Components
1963
+ * @param props Props
1964
+ * @param {OutletProps.context} props.context n/a
1965
+ * @returns React element for the rendered outlet or `null` if no child route matches.
1966
+ */
1967
+ declare function Outlet(props: OutletProps): React.ReactElement | null;
1968
+ /**
1969
+ * @category Types
1970
+ */
1971
+ interface PathRouteProps {
1972
+ /**
1973
+ * Whether the path should be case-sensitive. Defaults to `false`.
1974
+ */
1975
+ caseSensitive?: NonIndexRouteObject["caseSensitive"];
1976
+ /**
1977
+ * The path pattern to match. If unspecified or empty, then this becomes a
1978
+ * layout route.
1979
+ */
1980
+ path?: NonIndexRouteObject["path"];
1981
+ /**
1982
+ * The unique identifier for this route (for use with {@link DataRouter}s)
1983
+ */
1984
+ id?: NonIndexRouteObject["id"];
1985
+ /**
1986
+ * A function that returns a promise that resolves to the route object.
1987
+ * Used for code-splitting routes.
1988
+ * See [`lazy`](../../start/data/route-object#lazy).
1989
+ */
1990
+ lazy?: LazyRouteFunction<NonIndexRouteObject>;
1991
+ /**
1992
+ * The route loader.
1993
+ * See [`loader`](../../start/data/route-object#loader).
1994
+ */
1995
+ loader?: NonIndexRouteObject["loader"];
1996
+ /**
1997
+ * The route action.
1998
+ * See [`action`](../../start/data/route-object#action).
1999
+ */
2000
+ action?: NonIndexRouteObject["action"];
2001
+ hasErrorBoundary?: NonIndexRouteObject["hasErrorBoundary"];
2002
+ /**
2003
+ * The route shouldRevalidate function.
2004
+ * See [`shouldRevalidate`](../../start/data/route-object#shouldRevalidate).
2005
+ */
2006
+ shouldRevalidate?: NonIndexRouteObject["shouldRevalidate"];
2007
+ /**
2008
+ * The route handle.
2009
+ */
2010
+ handle?: NonIndexRouteObject["handle"];
2011
+ /**
2012
+ * Whether this is an index route.
2013
+ */
2014
+ index?: false;
2015
+ /**
2016
+ * Child Route components
2017
+ */
2018
+ children?: React.ReactNode;
2019
+ /**
2020
+ * The React element to render when this Route matches.
2021
+ * Mutually exclusive with `Component`.
2022
+ */
2023
+ element?: React.ReactNode | null;
2024
+ /**
2025
+ * The React element to render while this router is loading data.
2026
+ * Mutually exclusive with `HydrateFallback`.
2027
+ */
2028
+ hydrateFallbackElement?: React.ReactNode | null;
2029
+ /**
2030
+ * The React element to render at this route if an error occurs.
2031
+ * Mutually exclusive with `ErrorBoundary`.
2032
+ */
2033
+ errorElement?: React.ReactNode | null;
2034
+ /**
2035
+ * The React Component to render when this route matches.
2036
+ * Mutually exclusive with `element`.
2037
+ */
2038
+ Component?: React.ComponentType | null;
2039
+ /**
2040
+ * The React Component to render while this router is loading data.
2041
+ * Mutually exclusive with `hydrateFallbackElement`.
2042
+ */
2043
+ HydrateFallback?: React.ComponentType | null;
2044
+ /**
2045
+ * The React Component to render at this route if an error occurs.
2046
+ * Mutually exclusive with `errorElement`.
2047
+ */
2048
+ ErrorBoundary?: React.ComponentType | null;
2049
+ }
2050
+ /**
2051
+ * @category Types
2052
+ */
2053
+ interface LayoutRouteProps extends PathRouteProps {
2054
+ }
2055
+ /**
2056
+ * @category Types
2057
+ */
2058
+ interface IndexRouteProps {
2059
+ /**
2060
+ * Whether the path should be case-sensitive. Defaults to `false`.
2061
+ */
2062
+ caseSensitive?: IndexRouteObject["caseSensitive"];
2063
+ /**
2064
+ * The path pattern to match. If unspecified or empty, then this becomes a
2065
+ * layout route.
2066
+ */
2067
+ path?: IndexRouteObject["path"];
2068
+ /**
2069
+ * The unique identifier for this route (for use with {@link DataRouter}s)
2070
+ */
2071
+ id?: IndexRouteObject["id"];
2072
+ /**
2073
+ * A function that returns a promise that resolves to the route object.
2074
+ * Used for code-splitting routes.
2075
+ * See [`lazy`](../../start/data/route-object#lazy).
2076
+ */
2077
+ lazy?: LazyRouteFunction<IndexRouteObject>;
2078
+ /**
2079
+ * The route loader.
2080
+ * See [`loader`](../../start/data/route-object#loader).
2081
+ */
2082
+ loader?: IndexRouteObject["loader"];
2083
+ /**
2084
+ * The route action.
2085
+ * See [`action`](../../start/data/route-object#action).
2086
+ */
2087
+ action?: IndexRouteObject["action"];
2088
+ hasErrorBoundary?: IndexRouteObject["hasErrorBoundary"];
2089
+ /**
2090
+ * The route shouldRevalidate function.
2091
+ * See [`shouldRevalidate`](../../start/data/route-object#shouldRevalidate).
2092
+ */
2093
+ shouldRevalidate?: IndexRouteObject["shouldRevalidate"];
2094
+ /**
2095
+ * The route handle.
2096
+ */
2097
+ handle?: IndexRouteObject["handle"];
2098
+ /**
2099
+ * Whether this is an index route.
2100
+ */
2101
+ index: true;
2102
+ /**
2103
+ * Child Route components
2104
+ */
2105
+ children?: undefined;
2106
+ /**
2107
+ * The React element to render when this Route matches.
2108
+ * Mutually exclusive with `Component`.
2109
+ */
2110
+ element?: React.ReactNode | null;
2111
+ /**
2112
+ * The React element to render while this router is loading data.
2113
+ * Mutually exclusive with `HydrateFallback`.
2114
+ */
2115
+ hydrateFallbackElement?: React.ReactNode | null;
2116
+ /**
2117
+ * The React element to render at this route if an error occurs.
2118
+ * Mutually exclusive with `ErrorBoundary`.
2119
+ */
2120
+ errorElement?: React.ReactNode | null;
2121
+ /**
2122
+ * The React Component to render when this route matches.
2123
+ * Mutually exclusive with `element`.
2124
+ */
2125
+ Component?: React.ComponentType | null;
2126
+ /**
2127
+ * The React Component to render while this router is loading data.
2128
+ * Mutually exclusive with `hydrateFallbackElement`.
2129
+ */
2130
+ HydrateFallback?: React.ComponentType | null;
2131
+ /**
2132
+ * The React Component to render at this route if an error occurs.
2133
+ * Mutually exclusive with `errorElement`.
2134
+ */
2135
+ ErrorBoundary?: React.ComponentType | null;
2136
+ }
2137
+ type RouteProps = PathRouteProps | LayoutRouteProps | IndexRouteProps;
2138
+ /**
2139
+ * Configures an element to render when a pattern matches the current location.
2140
+ * It must be rendered within a {@link Routes} element. Note that these routes
2141
+ * do not participate in data loading, actions, code splitting, or any other
2142
+ * route module features.
2143
+ *
2144
+ * @example
2145
+ * // Usually used in a declarative router
2146
+ * function App() {
2147
+ * return (
2148
+ * <BrowserRouter>
2149
+ * <Routes>
2150
+ * <Route index element={<StepOne />} />
2151
+ * <Route path="step-2" element={<StepTwo />} />
2152
+ * <Route path="step-3" element={<StepThree />} />
2153
+ * </Routes>
2154
+ * </BrowserRouter>
2155
+ * );
2156
+ * }
2157
+ *
2158
+ * // But can be used with a data router as well if you prefer the JSX notation
2159
+ * const routes = createRoutesFromElements(
2160
+ * <>
2161
+ * <Route index loader={step1Loader} Component={StepOne} />
2162
+ * <Route path="step-2" loader={step2Loader} Component={StepTwo} />
2163
+ * <Route path="step-3" loader={step3Loader} Component={StepThree} />
2164
+ * </>
2165
+ * );
2166
+ *
2167
+ * const router = createBrowserRouter(routes);
2168
+ *
2169
+ * function App() {
2170
+ * return <RouterProvider router={router} />;
2171
+ * }
2172
+ *
2173
+ * @public
2174
+ * @category Components
2175
+ * @param props Props
2176
+ * @param {PathRouteProps.action} props.action n/a
2177
+ * @param {PathRouteProps.caseSensitive} props.caseSensitive n/a
2178
+ * @param {PathRouteProps.Component} props.Component n/a
2179
+ * @param {PathRouteProps.children} props.children n/a
2180
+ * @param {PathRouteProps.element} props.element n/a
2181
+ * @param {PathRouteProps.ErrorBoundary} props.ErrorBoundary n/a
2182
+ * @param {PathRouteProps.errorElement} props.errorElement n/a
2183
+ * @param {PathRouteProps.handle} props.handle n/a
2184
+ * @param {PathRouteProps.HydrateFallback} props.HydrateFallback n/a
2185
+ * @param {PathRouteProps.hydrateFallbackElement} props.hydrateFallbackElement n/a
2186
+ * @param {PathRouteProps.id} props.id n/a
2187
+ * @param {PathRouteProps.index} props.index n/a
2188
+ * @param {PathRouteProps.lazy} props.lazy n/a
2189
+ * @param {PathRouteProps.loader} props.loader n/a
2190
+ * @param {PathRouteProps.path} props.path n/a
2191
+ * @param {PathRouteProps.shouldRevalidate} props.shouldRevalidate n/a
2192
+ * @returns {void}
2193
+ */
2194
+ declare function Route(props: RouteProps): React.ReactElement | null;
2195
+ /**
2196
+ * @category Types
2197
+ */
2198
+ interface RouterProps {
2199
+ /**
2200
+ * The base path for the application. This is prepended to all locations
2201
+ */
2202
+ basename?: string;
2203
+ /**
2204
+ * Nested {@link Route} elements describing the route tree
2205
+ */
2206
+ children?: React.ReactNode;
2207
+ /**
2208
+ * The location to match against. Defaults to the current location.
2209
+ * This can be a string or a {@link Location} object.
2210
+ */
2211
+ location: Partial<Location> | string;
2212
+ /**
2213
+ * The type of navigation that triggered this `location` change.
2214
+ * Defaults to {@link NavigationType.Pop}.
2215
+ */
2216
+ navigationType?: Action;
2217
+ /**
2218
+ * The navigator to use for navigation. This is usually a history object
2219
+ * or a custom navigator that implements the {@link Navigator} interface.
2220
+ */
2221
+ navigator: Navigator;
2222
+ /**
2223
+ * Whether this router is static or not (used for SSR). If `true`, the router
2224
+ * will not be reactive to location changes.
2225
+ */
2226
+ static?: boolean;
2227
+ }
2228
+ /**
2229
+ * Provides location context for the rest of the app.
2230
+ *
2231
+ * Note: You usually won't render a `<Router>` directly. Instead, you'll render a
2232
+ * router that is more specific to your environment such as a {@link BrowserRouter}
2233
+ * in web browsers or a {@link ServerRouter} for server rendering.
2234
+ *
2235
+ * @public
2236
+ * @category Declarative Routers
2237
+ * @mode declarative
2238
+ * @param props Props
2239
+ * @param {RouterProps.basename} props.basename n/a
2240
+ * @param {RouterProps.children} props.children n/a
2241
+ * @param {RouterProps.location} props.location n/a
2242
+ * @param {RouterProps.navigationType} props.navigationType n/a
2243
+ * @param {RouterProps.navigator} props.navigator n/a
2244
+ * @param {RouterProps.static} props.static n/a
2245
+ * @returns React element for the rendered router or `null` if the location does
2246
+ * not match the {@link props.basename}
2247
+ */
2248
+ declare function Router({ basename: basenameProp, children, location: locationProp, navigationType, navigator, static: staticProp, }: RouterProps): React.ReactElement | null;
2249
+ /**
2250
+ * @category Types
2251
+ */
2252
+ interface RoutesProps {
2253
+ /**
2254
+ * Nested {@link Route} elements
2255
+ */
2256
+ children?: React.ReactNode;
2257
+ /**
2258
+ * The {@link Location} to match against. Defaults to the current location.
2259
+ */
2260
+ location?: Partial<Location> | string;
2261
+ }
2262
+ /**
2263
+ * Renders a branch of {@link Route | `<Route>`s} that best matches the current
2264
+ * location. Note that these routes do not participate in [data loading](../../start/framework/route-module#loader),
2265
+ * [`action`](../../start/framework/route-module#action), code splitting, or
2266
+ * any other [route module](../../start/framework/route-module) features.
2267
+ *
2268
+ * @example
2269
+ * import { Route, Routes } from "react-router";
2270
+ *
2271
+ * <Routes>
2272
+ * <Route index element={<StepOne />} />
2273
+ * <Route path="step-2" element={<StepTwo />} />
2274
+ * <Route path="step-3" element={<StepThree />}>
2275
+ * </Routes>
2276
+ *
2277
+ * @public
2278
+ * @category Components
2279
+ * @param props Props
2280
+ * @param {RoutesProps.children} props.children n/a
2281
+ * @param {RoutesProps.location} props.location n/a
2282
+ * @returns React element for the rendered routes or `null` if no route matches
2283
+ */
2284
+ declare function Routes({ children, location, }: RoutesProps): React.ReactElement | null;
2285
+ interface AwaitResolveRenderFunction<Resolve = any> {
2286
+ (data: Awaited<Resolve>): React.ReactNode;
2287
+ }
2288
+ /**
2289
+ * @category Types
2290
+ */
2291
+ interface AwaitProps<Resolve> {
2292
+ /**
2293
+ * When using a function, the resolved value is provided as the parameter.
2294
+ *
2295
+ * ```tsx [2]
2296
+ * <Await resolve={reviewsPromise}>
2297
+ * {(resolvedReviews) => <Reviews items={resolvedReviews} />}
2298
+ * </Await>
2299
+ * ```
2300
+ *
2301
+ * When using React elements, {@link useAsyncValue} will provide the
2302
+ * resolved value:
2303
+ *
2304
+ * ```tsx [2]
2305
+ * <Await resolve={reviewsPromise}>
2306
+ * <Reviews />
2307
+ * </Await>
2308
+ *
2309
+ * function Reviews() {
2310
+ * const resolvedReviews = useAsyncValue();
2311
+ * return <div>...</div>;
2312
+ * }
2313
+ * ```
2314
+ */
2315
+ children: React.ReactNode | AwaitResolveRenderFunction<Resolve>;
2316
+ /**
2317
+ * The error element renders instead of the `children` when the [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
2318
+ * rejects.
2319
+ *
2320
+ * ```tsx
2321
+ * <Await
2322
+ * errorElement={<div>Oops</div>}
2323
+ * resolve={reviewsPromise}
2324
+ * >
2325
+ * <Reviews />
2326
+ * </Await>
2327
+ * ```
2328
+ *
2329
+ * To provide a more contextual error, you can use the {@link useAsyncError} in a
2330
+ * child component
2331
+ *
2332
+ * ```tsx
2333
+ * <Await
2334
+ * errorElement={<ReviewsError />}
2335
+ * resolve={reviewsPromise}
2336
+ * >
2337
+ * <Reviews />
2338
+ * </Await>
2339
+ *
2340
+ * function ReviewsError() {
2341
+ * const error = useAsyncError();
2342
+ * return <div>Error loading reviews: {error.message}</div>;
2343
+ * }
2344
+ * ```
2345
+ *
2346
+ * If you do not provide an `errorElement`, the rejected value will bubble up
2347
+ * to the nearest route-level [`ErrorBoundary`](../../start/framework/route-module#errorboundary)
2348
+ * and be accessible via the {@link useRouteError} hook.
2349
+ */
2350
+ errorElement?: React.ReactNode;
2351
+ /**
2352
+ * Takes a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
2353
+ * returned from a [`loader`](../../start/framework/route-module#loader) to be
2354
+ * resolved and rendered.
2355
+ *
2356
+ * ```tsx
2357
+ * import { Await, useLoaderData } from "react-router";
2358
+ *
2359
+ * export async function loader() {
2360
+ * let reviews = getReviews(); // not awaited
2361
+ * let book = await getBook();
2362
+ * return {
2363
+ * book,
2364
+ * reviews, // this is a promise
2365
+ * };
2366
+ * }
2367
+ *
2368
+ * export default function Book() {
2369
+ * const {
2370
+ * book,
2371
+ * reviews, // this is the same promise
2372
+ * } = useLoaderData();
2373
+ *
2374
+ * return (
2375
+ * <div>
2376
+ * <h1>{book.title}</h1>
2377
+ * <p>{book.description}</p>
2378
+ * <React.Suspense fallback={<ReviewsSkeleton />}>
2379
+ * <Await
2380
+ * // and is the promise we pass to Await
2381
+ * resolve={reviews}
2382
+ * >
2383
+ * <Reviews />
2384
+ * </Await>
2385
+ * </React.Suspense>
2386
+ * </div>
2387
+ * );
2388
+ * }
2389
+ * ```
2390
+ */
2391
+ resolve: Resolve;
2392
+ }
2393
+ /**
2394
+ * Used to render promise values with automatic error handling.
2395
+ *
2396
+ * **Note:** `<Await>` expects to be rendered inside a [`<React.Suspense>`](https://react.dev/reference/react/Suspense)
2397
+ *
2398
+ * @example
2399
+ * import { Await, useLoaderData } from "react-router";
2400
+ *
2401
+ * export async function loader() {
2402
+ * // not awaited
2403
+ * const reviews = getReviews();
2404
+ * // awaited (blocks the transition)
2405
+ * const book = await fetch("/api/book").then((res) => res.json());
2406
+ * return { book, reviews };
2407
+ * }
2408
+ *
2409
+ * function Book() {
2410
+ * const { book, reviews } = useLoaderData();
2411
+ * return (
2412
+ * <div>
2413
+ * <h1>{book.title}</h1>
2414
+ * <p>{book.description}</p>
2415
+ * <React.Suspense fallback={<ReviewsSkeleton />}>
2416
+ * <Await
2417
+ * resolve={reviews}
2418
+ * errorElement={
2419
+ * <div>Could not load reviews 😬</div>
2420
+ * }
2421
+ * children={(resolvedReviews) => (
2422
+ * <Reviews items={resolvedReviews} />
2423
+ * )}
2424
+ * />
2425
+ * </React.Suspense>
2426
+ * </div>
2427
+ * );
2428
+ * }
2429
+ *
2430
+ * @public
2431
+ * @category Components
2432
+ * @mode framework
2433
+ * @mode data
2434
+ * @param props Props
2435
+ * @param {AwaitProps.children} props.children n/a
2436
+ * @param {AwaitProps.errorElement} props.errorElement n/a
2437
+ * @param {AwaitProps.resolve} props.resolve n/a
2438
+ * @returns React element for the rendered awaited value
2439
+ */
2440
+ declare function Await<Resolve>({ children, errorElement, resolve, }: AwaitProps<Resolve>): React.JSX.Element;
2441
+ /**
2442
+ * Creates a route config from a React "children" object, which is usually
2443
+ * either a `<Route>` element or an array of them. Used internally by
2444
+ * `<Routes>` to create a route config from its children.
2445
+ *
2446
+ * @category Utils
2447
+ * @mode data
2448
+ * @param children The React children to convert into a route config
2449
+ * @param parentPath The path of the parent route, used to generate unique IDs.
2450
+ * @returns An array of {@link RouteObject}s that can be used with a {@link DataRouter}
2451
+ */
2452
+ declare function createRoutesFromChildren(children: React.ReactNode, parentPath?: number[]): RouteObject[];
2453
+ /**
2454
+ * Create route objects from JSX elements instead of arrays of objects.
2455
+ *
2456
+ * @example
2457
+ * const routes = createRoutesFromElements(
2458
+ * <>
2459
+ * <Route index loader={step1Loader} Component={StepOne} />
2460
+ * <Route path="step-2" loader={step2Loader} Component={StepTwo} />
2461
+ * <Route path="step-3" loader={step3Loader} Component={StepThree} />
2462
+ * </>
2463
+ * );
2464
+ *
2465
+ * const router = createBrowserRouter(routes);
2466
+ *
2467
+ * function App() {
2468
+ * return <RouterProvider router={router} />;
2469
+ * }
2470
+ *
2471
+ * @name createRoutesFromElements
2472
+ * @public
2473
+ * @category Utils
2474
+ * @mode data
2475
+ * @param children The React children to convert into a route config
2476
+ * @param parentPath The path of the parent route, used to generate unique IDs.
2477
+ * This is used for internal recursion and is not intended to be used by the
2478
+ * application developer.
2479
+ * @returns An array of {@link RouteObject}s that can be used with a {@link DataRouter}
2480
+ */
2481
+ declare const createRoutesFromElements: typeof createRoutesFromChildren;
2482
+ /**
2483
+ * Renders the result of {@link matchRoutes} into a React element.
2484
+ *
2485
+ * @public
2486
+ * @category Utils
2487
+ * @param matches The array of {@link RouteMatch | route matches} to render
2488
+ * @returns A React element that renders the matched routes or `null` if no matches
2489
+ */
2490
+ declare function renderMatches(matches: RouteMatch[] | null): React.ReactElement | null;
2491
+ declare function useRouteComponentProps(): {
2492
+ params: Readonly<Params<string>>;
2493
+ loaderData: any;
2494
+ actionData: any;
2495
+ matches: UIMatch<unknown, unknown>[];
2496
+ };
2497
+ type RouteComponentProps = ReturnType<typeof useRouteComponentProps>;
2498
+ type RouteComponentType = React.ComponentType<RouteComponentProps>;
2499
+ declare function WithComponentProps({ children, }: {
2500
+ children: React.ReactElement;
2501
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
2502
+ declare function withComponentProps(Component: RouteComponentType): () => React.ReactElement<{
2503
+ params: Readonly<Params<string>>;
2504
+ loaderData: any;
2505
+ actionData: any;
2506
+ matches: UIMatch<unknown, unknown>[];
2507
+ }, string | React.JSXElementConstructor<any>>;
2508
+ declare function useHydrateFallbackProps(): {
2509
+ params: Readonly<Params<string>>;
2510
+ loaderData: any;
2511
+ actionData: any;
2512
+ };
2513
+ type HydrateFallbackProps = ReturnType<typeof useHydrateFallbackProps>;
2514
+ type HydrateFallbackType = React.ComponentType<HydrateFallbackProps>;
2515
+ declare function WithHydrateFallbackProps({ children, }: {
2516
+ children: React.ReactElement;
2517
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
2518
+ declare function withHydrateFallbackProps(HydrateFallback: HydrateFallbackType): () => React.ReactElement<{
2519
+ params: Readonly<Params<string>>;
2520
+ loaderData: any;
2521
+ actionData: any;
2522
+ }, string | React.JSXElementConstructor<any>>;
2523
+ declare function useErrorBoundaryProps(): {
2524
+ params: Readonly<Params<string>>;
2525
+ loaderData: any;
2526
+ actionData: any;
2527
+ error: unknown;
2528
+ };
2529
+ type ErrorBoundaryProps = ReturnType<typeof useErrorBoundaryProps>;
2530
+ type ErrorBoundaryType = React.ComponentType<ErrorBoundaryProps>;
2531
+ declare function WithErrorBoundaryProps({ children, }: {
2532
+ children: React.ReactElement;
2533
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
2534
+ declare function withErrorBoundaryProps(ErrorBoundary: ErrorBoundaryType): () => React.ReactElement<{
2535
+ params: Readonly<Params<string>>;
2536
+ loaderData: any;
2537
+ actionData: any;
2538
+ error: unknown;
2539
+ }, string | React.JSXElementConstructor<any>>;
2540
+
1704
2541
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
1705
2542
  type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
1706
2543
  interface HtmlLinkProps {
@@ -1865,7 +2702,7 @@ type unstable_SerializesTo<T> = {
1865
2702
  unstable__ReactRouter_SerializesTo: [T];
1866
2703
  };
1867
2704
 
1868
- type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
2705
+ type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
1869
2706
  [K in keyof T]: Serialize<T[K]>;
1870
2707
  } : undefined;
1871
2708
  type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T;
@@ -2170,4 +3007,4 @@ type RouteComponent = ComponentType<{}>;
2170
3007
  */
2171
3008
  type RouteHandle = unknown;
2172
3009
 
2173
- export { type GetScrollRestorationKeyFunction as $, Action as A, type BlockerFunction as B, type ClientDataFunctionArgs as C, type DataStrategyFunction as D, type Equal as E, type Func as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type ClientActionFunction as J, type ClientLoaderFunction as K, type LinkDescriptor as L, type MetaDescriptor as M, type Normalize as N, type HeadersFunction as O, type Pretty as P, type ShouldRevalidateFunction as Q, type RouteModule$1 as R, type ServerDataFunctionArgs as S, type To as T, type UIMatch as U, type RouterInit as V, type RouterState as W, type PatchRoutesOnNavigationFunction as X, type DataRouteObject as Y, type StaticHandler as Z, type GetScrollPositionFunction as _, type Location as a, type ServerRouteModule as a$, type StaticHandlerContext as a0, type Fetcher as a1, type NavigationStates as a2, type RouterSubscriber as a3, type RouterNavigateOptions as a4, type RouterFetchOptions as a5, type RevalidationState as a6, type ActionFunctionArgs as a7, type DataStrategyFunctionArgs as a8, type DataStrategyMatch as a9, replace as aA, resolvePath as aB, type DataRouteMatch as aC, type Navigator as aD, type PatchRoutesOnNavigationFunctionArgs as aE, type RouteMatch as aF, type ClientActionFunctionArgs as aG, type ClientLoaderFunctionArgs as aH, type HeadersArgs as aI, type MetaArgs as aJ, type PageLinkDescriptor as aK, type HtmlLinkDescriptor as aL, type Future as aM, type unstable_SerializesTo as aN, createBrowserHistory as aO, invariant as aP, createRouter as aQ, ErrorResponseImpl as aR, DataRouterContext as aS, DataRouterStateContext as aT, FetchersContext as aU, LocationContext as aV, NavigationContext as aW, RouteContext as aX, ViewTransitionContext as aY, type FutureConfig as aZ, type RouteManifest as a_, type DataStrategyResult as aa, DataWithResponseInit as ab, type ErrorResponse as ac, type FormEncType as ad, type FormMethod as ae, type HTMLFormMethod as af, type LazyRouteFunction as ag, type LoaderFunctionArgs as ah, type unstable_MiddlewareFunction as ai, type PathParam as aj, type RedirectFunction as ak, type unstable_RouterContext as al, type ShouldRevalidateFunctionArgs as am, unstable_createContext as an, createPath as ao, parsePath as ap, IDLE_NAVIGATION as aq, IDLE_FETCHER as ar, IDLE_BLOCKER as as, data as at, generatePath as au, isRouteErrorResponse as av, matchPath as aw, matchRoutes as ax, redirect as ay, redirectDocument as az, type ServerDataFrom as b, type History as b0, type CreateStaticHandlerOptions as b1, type GetActionData as c, type Router as d, type RouteModules as e, type NavigateOptions as f, type Blocker as g, type SerializeFrom as h, type RelativeRoutingType as i, type ParamParseKey as j, type Path as k, type PathPattern as l, type PathMatch as m, type Navigation as n, type Params as o, type RouteObject as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type MetaFunction as t, type unstable_MiddlewareNextFunction as u, type LinksFunction as v, type NonIndexRouteObject as w, type AppLoadContext as x, unstable_RouterContextProvider as y, type MiddlewareEnabled as z };
3010
+ export { type PatchRoutesOnNavigationFunction as $, Action as A, type BlockerFunction as B, type ClientDataFunctionArgs as C, type DataStrategyResult as D, type ErrorBoundaryType as E, type Func as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type AppLoadContext as J, unstable_RouterContextProvider as K, type LinkDescriptor as L, type MetaDescriptor as M, type Normalize as N, type MiddlewareEnabled as O, type Pretty as P, type Equal as Q, type RouteModule$1 as R, type ServerDataFunctionArgs as S, type To as T, type UIMatch as U, type ClientActionFunction as V, type ClientLoaderFunction as W, type HeadersFunction as X, type ShouldRevalidateFunction as Y, type RouterInit as Z, type RouterState as _, type Location as a, Router as a$, type DataRouteObject as a0, type StaticHandler as a1, type GetScrollPositionFunction as a2, type GetScrollRestorationKeyFunction as a3, type StaticHandlerContext as a4, type Fetcher as a5, type NavigationStates as a6, type RouterSubscriber as a7, type RouterNavigateOptions as a8, type RouterFetchOptions as a9, matchRoutes as aA, redirect as aB, redirectDocument as aC, replace as aD, resolvePath as aE, type DataRouteMatch as aF, type Navigator as aG, type PatchRoutesOnNavigationFunctionArgs as aH, type RouteMatch as aI, type AwaitProps as aJ, type IndexRouteProps as aK, type unstable_ClientOnErrorFunction as aL, type LayoutRouteProps as aM, type MemoryRouterOpts as aN, type MemoryRouterProps as aO, type NavigateProps as aP, type OutletProps as aQ, type PathRouteProps as aR, type RouteProps as aS, type RouterProps as aT, type RouterProviderProps as aU, type RoutesProps as aV, Await as aW, MemoryRouter as aX, Navigate as aY, Outlet as aZ, Route as a_, type RevalidationState as aa, type ActionFunctionArgs as ab, type DataStrategyFunctionArgs as ac, type DataStrategyMatch as ad, DataWithResponseInit as ae, type ErrorResponse as af, type FormEncType as ag, type FormMethod as ah, type HTMLFormMethod as ai, type LazyRouteFunction as aj, type LoaderFunctionArgs as ak, type unstable_MiddlewareFunction as al, type PathParam as am, type RedirectFunction as an, type unstable_RouterContext as ao, type ShouldRevalidateFunctionArgs as ap, unstable_createContext as aq, createPath as ar, parsePath as as, IDLE_NAVIGATION as at, IDLE_FETCHER as au, IDLE_BLOCKER as av, data as aw, generatePath as ax, isRouteErrorResponse as ay, matchPath as az, type ServerDataFrom as b, RouterProvider as b0, Routes as b1, createMemoryRouter as b2, createRoutesFromChildren as b3, createRoutesFromElements as b4, renderMatches as b5, type ClientActionFunctionArgs as b6, type ClientLoaderFunctionArgs as b7, type HeadersArgs as b8, type MetaArgs as b9, type FutureConfig as bA, type CreateStaticHandlerOptions as bB, type PageLinkDescriptor as ba, type HtmlLinkDescriptor as bb, type Future as bc, type unstable_SerializesTo as bd, createBrowserHistory as be, invariant as bf, createRouter as bg, ErrorResponseImpl as bh, DataRouterContext as bi, DataRouterStateContext as bj, FetchersContext as bk, LocationContext as bl, NavigationContext as bm, RouteContext as bn, ViewTransitionContext as bo, hydrationRouteProperties as bp, mapRouteProperties as bq, WithComponentProps as br, withComponentProps as bs, WithHydrateFallbackProps as bt, withHydrateFallbackProps as bu, WithErrorBoundaryProps as bv, withErrorBoundaryProps as bw, type RouteManifest as bx, type ServerRouteModule as by, type History as bz, type GetActionData as c, type Router$1 as d, type RouteModules as e, type DataStrategyFunction as f, type NavigateOptions as g, type Blocker as h, type SerializeFrom as i, type RelativeRoutingType as j, type ParamParseKey as k, type Path as l, type PathPattern as m, type PathMatch as n, type Navigation as o, type Params as p, type RouteObject as q, type IndexRouteObject as r, type RouteComponentType as s, type HydrateFallbackType as t, type unstable_MiddlewareNextFunction as u, type LoaderFunction as v, type ActionFunction as w, type MetaFunction as x, type LinksFunction as y, type NonIndexRouteObject as z };