react-router 0.0.0-experimental-d312c78a4 → 0.0.0-experimental-db3389095

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 (57) hide show
  1. package/CHANGELOG.md +6 -264
  2. package/README.md +14 -5
  3. package/dist/index.d.ts +30 -0
  4. package/dist/index.js +1500 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/components.d.ts +157 -0
  7. package/dist/lib/context.d.ts +102 -0
  8. package/dist/lib/deprecations.d.ts +4 -0
  9. package/dist/lib/hooks.d.ts +181 -0
  10. package/dist/main.js +19 -0
  11. package/dist/react-router.development.js +1396 -0
  12. package/dist/react-router.development.js.map +1 -0
  13. package/dist/react-router.production.min.js +12 -0
  14. package/dist/react-router.production.min.js.map +1 -0
  15. package/dist/umd/react-router.development.js +1623 -0
  16. package/dist/umd/react-router.development.js.map +1 -0
  17. package/dist/umd/react-router.production.min.js +12 -0
  18. package/dist/umd/react-router.production.min.js.map +1 -0
  19. package/package.json +9 -80
  20. package/dist/development/chunk-YE7HM3VM.mjs +0 -9662
  21. package/dist/development/data-CQbyyGzl.d.mts +0 -11
  22. package/dist/development/data-CQbyyGzl.d.ts +0 -11
  23. package/dist/development/dom-export.d.mts +0 -13
  24. package/dist/development/dom-export.d.ts +0 -13
  25. package/dist/development/dom-export.js +0 -5573
  26. package/dist/development/dom-export.mjs +0 -199
  27. package/dist/development/fog-of-war-B3edLoNW.d.ts +0 -1601
  28. package/dist/development/fog-of-war-CTZ6x_bd.d.mts +0 -1601
  29. package/dist/development/index.d.mts +0 -839
  30. package/dist/development/index.d.ts +0 -839
  31. package/dist/development/index.js +0 -9807
  32. package/dist/development/index.mjs +0 -236
  33. package/dist/development/lib/types/route-module.d.mts +0 -109
  34. package/dist/development/lib/types/route-module.d.ts +0 -109
  35. package/dist/development/lib/types/route-module.js +0 -28
  36. package/dist/development/lib/types/route-module.mjs +0 -10
  37. package/dist/development/route-data-JFOfNyPS.d.mts +0 -1546
  38. package/dist/development/route-data-JFOfNyPS.d.ts +0 -1546
  39. package/dist/production/chunk-CB5USIQC.mjs +0 -9662
  40. package/dist/production/data-CQbyyGzl.d.mts +0 -11
  41. package/dist/production/data-CQbyyGzl.d.ts +0 -11
  42. package/dist/production/dom-export.d.mts +0 -13
  43. package/dist/production/dom-export.d.ts +0 -13
  44. package/dist/production/dom-export.js +0 -5573
  45. package/dist/production/dom-export.mjs +0 -199
  46. package/dist/production/fog-of-war-B3edLoNW.d.ts +0 -1601
  47. package/dist/production/fog-of-war-CTZ6x_bd.d.mts +0 -1601
  48. package/dist/production/index.d.mts +0 -839
  49. package/dist/production/index.d.ts +0 -839
  50. package/dist/production/index.js +0 -9807
  51. package/dist/production/index.mjs +0 -236
  52. package/dist/production/lib/types/route-module.d.mts +0 -109
  53. package/dist/production/lib/types/route-module.d.ts +0 -109
  54. package/dist/production/lib/types/route-module.js +0 -28
  55. package/dist/production/lib/types/route-module.mjs +0 -10
  56. package/dist/production/route-data-JFOfNyPS.d.mts +0 -1546
  57. package/dist/production/route-data-JFOfNyPS.d.ts +0 -1546
package/CHANGELOG.md CHANGED
@@ -1,281 +1,23 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.1.1
4
-
5
- ## 7.1.0
6
-
7
- ### Patch Changes
8
-
9
- - Throw unwrapped single fetch redirect to align with pre-single fetch behavior ([#12506](https://github.com/remix-run/react-router/pull/12506))
10
- - Ignore redirects when inferring loader data types ([#12527](https://github.com/remix-run/react-router/pull/12527))
11
- - Remove `<Link prefetch>` warning which suffers from false positives in a lazy route discovery world ([#12485](https://github.com/remix-run/react-router/pull/12485))
12
-
13
- ## 7.0.2
3
+ ## 6.28.2
14
4
 
15
5
  ### Patch Changes
16
6
 
17
- - temporarily only use one build in export map so packages can have a peer dependency on react router ([#12437](https://github.com/remix-run/react-router/pull/12437))
18
- - Generate wide `matches` and `params` types for current route and child routes ([#12397](https://github.com/remix-run/react-router/pull/12397))
19
-
20
- At runtime, `matches` includes child route matches and `params` include child route path parameters.
21
- But previously, we only generated types for parent routes in `matches`; for `params`, we only considered the parent routes and the current route.
22
- To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information.
23
-
24
- ## 7.0.1
25
-
26
- ## 7.0.0
27
-
28
- ### Major Changes
29
-
30
- - Remove the original `defer` implementation in favor of using raw promises via single fetch and `turbo-stream`. This removes these exports from React Router: ([#11744](https://github.com/remix-run/react-router/pull/11744))
31
-
32
- - `defer`
33
- - `AbortedDeferredError`
34
- - `type TypedDeferredData`
35
- - `UNSAFE_DeferredData`
36
- - `UNSAFE_DEFERRED_SYMBOL`,
37
-
38
- - - Collapse `@remix-run/router` into `react-router` ([#11505](https://github.com/remix-run/react-router/pull/11505))
39
- - Collapse `react-router-dom` into `react-router`
40
- - Collapse `@remix-run/server-runtime` into `react-router`
41
- - Collapse `@remix-run/testing` into `react-router`
42
-
43
- - Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
44
-
45
- - Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391))
46
-
47
- - Remove `future.v7_startTransition` flag ([#11696](https://github.com/remix-run/react-router/pull/11696))
48
-
49
- - - Expose the underlying router promises from the following APIs for compsition in React 19 APIs: ([#11521](https://github.com/remix-run/react-router/pull/11521))
50
- - `useNavigate()`
51
- - `useSubmit`
52
- - `useFetcher().load`
53
- - `useFetcher().submit`
54
- - `useRevalidator.revalidate`
55
-
56
- - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
57
-
58
- - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))
59
-
60
- - `createCookie`
61
- - `createCookieSessionStorage`
62
- - `createMemorySessionStorage`
63
- - `createSessionStorage`
64
-
65
- For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)
66
-
67
- Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
68
-
69
- - `createCookieFactory`
70
- - `createSessionStorageFactory`
71
- - `createCookieSessionStorageFactory`
72
- - `createMemorySessionStorageFactory`
73
-
74
- - Imports/Exports cleanup ([#11840](https://github.com/remix-run/react-router/pull/11840))
75
-
76
- - Removed the following exports that were previously public API from `@remix-run/router`
77
- - types
78
- - `AgnosticDataIndexRouteObject`
79
- - `AgnosticDataNonIndexRouteObject`
80
- - `AgnosticDataRouteMatch`
81
- - `AgnosticDataRouteObject`
82
- - `AgnosticIndexRouteObject`
83
- - `AgnosticNonIndexRouteObject`
84
- - `AgnosticRouteMatch`
85
- - `AgnosticRouteObject`
86
- - `TrackedPromise`
87
- - `unstable_AgnosticPatchRoutesOnMissFunction`
88
- - `Action` -> exported as `NavigationType` via `react-router`
89
- - `Router` exported as `DataRouter` to differentiate from RR's `<Router>`
90
- - API
91
- - `getToPathname` (`@private`)
92
- - `joinPaths` (`@private`)
93
- - `normalizePathname` (`@private`)
94
- - `resolveTo` (`@private`)
95
- - `stripBasename` (`@private`)
96
- - `createBrowserHistory` -> in favor of `createBrowserRouter`
97
- - `createHashHistory` -> in favor of `createHashRouter`
98
- - `createMemoryHistory` -> in favor of `createMemoryRouter`
99
- - `createRouter`
100
- - `createStaticHandler` -> in favor of wrapper `createStaticHandler` in RR Dom
101
- - `getStaticContextFromError`
102
- - Removed the following exports that were previously public API from `react-router`
103
- - `Hash`
104
- - `Pathname`
105
- - `Search`
106
-
107
- - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690))
108
-
109
- - Remove `future.v7_prependBasename` from the ionternalized `@remix-run/router` package ([#11726](https://github.com/remix-run/react-router/pull/11726))
110
-
111
- - Migrate Remix type generics to React Router ([#12180](https://github.com/remix-run/react-router/pull/12180))
112
-
113
- - These generics are provided for Remix v2 migration purposes
114
- - These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types
115
- - Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types
116
- - For React Router v6 users, these generics are new and should not impact your app, with one exception
117
- - `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type
118
- - This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`)
119
- - Therefore, you should update your usages:
120
- - ❌ `useFetcher<LoaderData>()`
121
- - ✅ `useFetcher<typeof loader>()`
122
-
123
- - Remove `future.v7_throwAbortReason` from internalized `@remix-run/router` package ([#11728](https://github.com/remix-run/react-router/pull/11728))
124
-
125
- - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675))
126
-
127
- - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702))
128
-
129
- - renamed RemixContext to FrameworkContext ([#11705](https://github.com/remix-run/react-router/pull/11705))
130
-
131
- - updates the minimum React version to 18 ([#11689](https://github.com/remix-run/react-router/pull/11689))
132
-
133
- - PrefetchPageDescriptor replaced by PageLinkDescriptor ([#11960](https://github.com/remix-run/react-router/pull/11960))
134
-
135
- - - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177))
136
- - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
137
- - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
138
- - `Record<string, Route> -> Record<string, Route | undefined>`
139
- - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used
140
- - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
141
-
142
- - - Remove the `future.v7_partialHydration` flag ([#11725](https://github.com/remix-run/react-router/pull/11725))
143
- - This also removes the `<RouterProvider fallbackElement>` prop
144
- - To migrate, move the `fallbackElement` to a `hydrateFallbackElement`/`HydrateFallback` on your root route
145
- - Also worth nothing there is a related breaking changer with this future flag:
146
- - Without `future.v7_partialHydration` (when using `fallbackElement`), `state.navigation` was populated during the initial load
147
- - With `future.v7_partialHydration`, `state.navigation` remains in an `"idle"` state during the initial load
148
-
149
- - Remove `v7_relativeSplatPath` future flag ([#11695](https://github.com/remix-run/react-router/pull/11695))
150
-
151
- - Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171))
152
-
153
- - Remove `installGlobals()` as this should no longer be necessary
154
-
155
- - Remove remaining future flags ([#11820](https://github.com/remix-run/react-router/pull/11820))
156
-
157
- - React Router `v7_skipActionErrorRevalidation`
158
- - Remix `v3_fetcherPersist`, `v3_relativeSplatPath`, `v3_throwAbortReason`
159
-
160
- - rename createRemixStub to createRoutesStub ([#11692](https://github.com/remix-run/react-router/pull/11692))
161
-
162
- - Remove `@remix-run/router` deprecated `detectErrorBoundary` option in favor of `mapRouteProperties` ([#11751](https://github.com/remix-run/react-router/pull/11751))
163
-
164
- - Add `react-router/dom` subpath export to properly enable `react-dom` as an optional `peerDependency` ([#11851](https://github.com/remix-run/react-router/pull/11851))
165
-
166
- - This ensures that we don't blindly `import ReactDOM from "react-dom"` in `<RouterProvider>` in order to access `ReactDOM.flushSync()`, since that would break `createMemoryRouter` use cases in non-DOM environments
167
- - DOM environments should import from `react-router/dom` to get the proper component that makes `ReactDOM.flushSync()` available:
168
- - If you are using the Vite plugin, use this in your `entry.client.tsx`:
169
- - `import { HydratedRouter } from 'react-router/dom'`
170
- - If you are not using the Vite plugin and are manually calling `createBrowserRouter`/`createHashRouter`:
171
- - `import { RouterProvider } from "react-router/dom"`
172
-
173
- - Remove `future.v7_fetcherPersist` flag ([#11731](https://github.com/remix-run/react-router/pull/11731))
174
-
175
- - Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes ([#12172](https://github.com/remix-run/react-router/pull/12172))
176
-
177
- ### Minor Changes
178
-
179
- - - Add support for `prerender` config in the React Router vite plugin, to support existing SSG use-cases ([#11539](https://github.com/remix-run/react-router/pull/11539))
180
- - You can use the `prerender` config to pre-render your `.html` and `.data` files at build time and then serve them statically at runtime (either from a running server or a CDN)
181
- - `prerender` can either be an array of string paths, or a function (sync or async) that returns an array of strings so that you can dynamically generate the paths by talking to your CMS, etc.
182
-
183
- ```ts
184
- // react-router.config.ts
185
- import type { Config } from "@react-router/dev/config";
186
-
187
- export default {
188
- async prerender() {
189
- let slugs = await fakeGetSlugsFromCms();
190
- // Prerender these paths into `.html` files at build time, and `.data`
191
- // files if they have loaders
192
- return ["/", "/about", ...slugs.map((slug) => `/product/${slug}`)];
193
- },
194
- } satisfies Config;
195
-
196
- async function fakeGetSlugsFromCms() {
197
- await new Promise((r) => setTimeout(r, 1000));
198
- return ["shirt", "hat"];
199
- }
200
- ```
201
-
202
- - Params, loader data, and action data as props for route component exports ([#11961](https://github.com/remix-run/react-router/pull/11961))
203
-
204
- ```tsx
205
- export default function Component({ params, loaderData, actionData }) {}
206
-
207
- export function HydrateFallback({ params }) {}
208
- export function ErrorBoundary({ params, loaderData, actionData }) {}
209
- ```
210
-
211
- - Remove duplicate `RouterProvider` impliementations ([#11679](https://github.com/remix-run/react-router/pull/11679))
212
-
213
- - ### Typesafety improvements ([#12019](https://github.com/remix-run/react-router/pull/12019))
214
-
215
- React Router now generates types for each of your route modules.
216
- You can access those types by importing them from `./+types.<route filename without extension>`.
217
- For example:
218
-
219
- ```ts
220
- // app/routes/product.tsx
221
- import type * as Route from "./+types.product";
222
-
223
- export function loader({ params }: Route.LoaderArgs) {}
224
-
225
- export default function Component({ loaderData }: Route.ComponentProps) {}
226
- ```
227
-
228
- This initial implementation targets type inference for:
229
-
230
- - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
231
- - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
232
- - `ActionData` : Action data from `action` and/or `clientAction` within your route module
233
-
234
- In the future, we plan to add types for the rest of the route module exports: `meta`, `links`, `headers`, `shouldRevalidate`, etc.
235
- We also plan to generate types for typesafe `Link`s:
236
-
237
- ```tsx
238
- <Link to="/products/:id" params={{ id: 1 }} />
239
- // ^^^^^^^^^^^^^ ^^^^^^^^^
240
- // typesafe `to` and `params` based on the available routes in your app
241
- ```
242
-
243
- Check out our docs for more:
244
-
245
- - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
246
- - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
247
-
248
- - Stabilize `unstable_dataStrategy` ([#11969](https://github.com/remix-run/react-router/pull/11969))
7
+ - Updated dependencies:
8
+ - `@remix-run/router@1.21.1`
249
9
 
250
- - Stabilize `unstable_patchRoutesOnNavigation` ([#11970](https://github.com/remix-run/react-router/pull/11970))
10
+ ## 6.28.1
251
11
 
252
12
  ### Patch Changes
253
13
 
254
- - No changes ([`506329c4e`](https://github.com/remix-run/react-router/commit/506329c4e2e7aba9837cbfa44df6103b49423745))
255
-
256
- - chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269))
257
-
258
- - Remove unstable upload handler. ([#12015](https://github.com/remix-run/react-router/pull/12015))
259
-
260
- - Remove unneeded dependency on @web3-storage/multipart-parser ([#12274](https://github.com/remix-run/react-router/pull/12274))
261
-
262
- - Fix redirects returned from loaders/actions using `data()` ([#12021](https://github.com/remix-run/react-router/pull/12021))
263
-
264
- - fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161))
265
-
266
- - Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080))
267
-
268
- - Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146))
269
-
270
- - You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app
271
-
272
- - Remove unneeded dependency on source-map ([#12275](https://github.com/remix-run/react-router/pull/12275))
14
+ - Allow users to opt out of deprecation warnings by setting flags to false ([#12441](https://github.com/remix-run/react-router/pull/12441))
273
15
 
274
16
  ## 6.28.0
275
17
 
276
18
  ### Minor Changes
277
19
 
278
- - - Log deprecation warnings for v7 flags ([#11750](https://github.com/remix-run/react-router/pull/11750))
20
+ - Log deprecation warnings for v7 flags ([#11750](https://github.com/remix-run/react-router/pull/11750))
279
21
  - Add deprecation warnings to `json`/`defer` in favor of returning raw objects
280
22
  - These methods will be removed in React Router v7
281
23
 
package/README.md CHANGED
@@ -1,7 +1,16 @@
1
- `react-router` is the primary package in the React Router project.
1
+ # React Router
2
2
 
3
- ## Installation
3
+ The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all
4
+ the core functionality for both
5
+ [`react-router-dom`](https://github.com/remix-run/react-router/tree/main/packages/react-router-dom)
6
+ and
7
+ [`react-router-native`](https://github.com/remix-run/react-router/tree/main/packages/react-router-native).
4
8
 
5
- ```sh
6
- npm i react-router
7
- ```
9
+ If you're using React Router, you should never `import` anything directly from
10
+ the `react-router` package, but you should have everything you need in either
11
+ `react-router-dom` or `react-router-native`. Both of those packages re-export
12
+ everything from `react-router`.
13
+
14
+ If you'd like to extend React Router and you know what you're doing, you should
15
+ add `react-router` **as a peer dependency, not a regular dependency** in your
16
+ package.
@@ -0,0 +1,30 @@
1
+ import type { ActionFunction, ActionFunctionArgs, AgnosticPatchRoutesOnNavigationFunction, AgnosticPatchRoutesOnNavigationFunctionArgs, Blocker, BlockerFunction, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, Fetcher, HydrationState, InitialEntry, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, Router as RemixRouter, FutureConfig as RouterFutureConfig, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch } from "@remix-run/router";
2
+ import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, resolvePath } from "@remix-run/router";
3
+ import type { AwaitProps, FutureConfig, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps } from "./lib/components";
4
+ import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches } from "./lib/components";
5
+ import type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./lib/context";
6
+ import { DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RouteContext } from "./lib/context";
7
+ import type { NavigateFunction } from "./lib/hooks";
8
+ import { useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteId, useRouteLoaderData, useRoutes, useRoutesImpl } from "./lib/hooks";
9
+ import { logV6DeprecationWarnings } from "./lib/deprecations";
10
+ type Hash = string;
11
+ type Pathname = string;
12
+ type Search = string;
13
+ export type { ActionFunction, ActionFunctionArgs, AwaitProps, DataRouteMatch, DataRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, Fetcher, FutureConfig, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, PathRouteProps, Pathname, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, Blocker, BlockerFunction, };
14
+ export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, createPath, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, renderMatches, resolvePath, useBlocker, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, };
15
+ export type PatchRoutesOnNavigationFunctionArgs = AgnosticPatchRoutesOnNavigationFunctionArgs<RouteObject, RouteMatch>;
16
+ export type PatchRoutesOnNavigationFunction = AgnosticPatchRoutesOnNavigationFunction<RouteObject, RouteMatch>;
17
+ declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
18
+ hasErrorBoundary: boolean;
19
+ };
20
+ export declare function createMemoryRouter(routes: RouteObject[], opts?: {
21
+ basename?: string;
22
+ future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
23
+ hydrationData?: HydrationState;
24
+ initialEntries?: InitialEntry[];
25
+ initialIndex?: number;
26
+ dataStrategy?: DataStrategyFunction;
27
+ patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
28
+ }): RemixRouter;
29
+ /** @internal */
30
+ export { DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, mapRouteProperties as UNSAFE_mapRouteProperties, useRouteId as UNSAFE_useRouteId, useRoutesImpl as UNSAFE_useRoutesImpl, logV6DeprecationWarnings as UNSAFE_logV6DeprecationWarnings, };