react-router 0.0.0-experimental-e6fb6e074 → 0.0.0-experimental-5bbc45fb6

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 (53) hide show
  1. package/CHANGELOG.md +753 -18
  2. package/README.md +5 -14
  3. package/dist/development/chunk-EKICUOCX.mjs +11486 -0
  4. package/dist/development/dom-export.d.mts +23 -0
  5. package/dist/development/dom-export.d.ts +22 -0
  6. package/dist/development/dom-export.js +246 -0
  7. package/dist/development/dom-export.mjs +225 -0
  8. package/dist/development/index.d.mts +795 -0
  9. package/dist/development/index.d.ts +2524 -0
  10. package/dist/development/index.js +11636 -0
  11. package/dist/development/index.mjs +246 -0
  12. package/dist/development/lib/types/internal.d.mts +275 -0
  13. package/dist/development/lib/types/internal.d.ts +274 -0
  14. package/dist/development/lib/types/internal.js +28 -0
  15. package/dist/development/lib/types/internal.mjs +10 -0
  16. package/dist/development/lib-DOOHL1pK.d.mts +1736 -0
  17. package/dist/development/register-DEZBC9Yl.d.ts +1767 -0
  18. package/dist/development/register-e9PGCFx1.d.mts +10 -0
  19. package/dist/development/route-data-BwJdBC92.d.mts +1758 -0
  20. package/dist/production/chunk-5UK3OH7I.mjs +11486 -0
  21. package/dist/production/dom-export.d.mts +23 -0
  22. package/dist/production/dom-export.d.ts +22 -0
  23. package/dist/production/dom-export.js +246 -0
  24. package/dist/production/dom-export.mjs +225 -0
  25. package/dist/production/index.d.mts +795 -0
  26. package/dist/production/index.d.ts +2524 -0
  27. package/dist/production/index.js +11636 -0
  28. package/dist/production/index.mjs +246 -0
  29. package/dist/production/lib/types/internal.d.mts +275 -0
  30. package/dist/production/lib/types/internal.d.ts +274 -0
  31. package/dist/production/lib/types/internal.js +28 -0
  32. package/dist/production/lib/types/internal.mjs +10 -0
  33. package/dist/production/lib-DOOHL1pK.d.mts +1736 -0
  34. package/dist/production/register-DEZBC9Yl.d.ts +1767 -0
  35. package/dist/production/register-e9PGCFx1.d.mts +10 -0
  36. package/dist/production/route-data-BwJdBC92.d.mts +1758 -0
  37. package/package.json +82 -9
  38. package/dist/index.d.ts +0 -30
  39. package/dist/index.js +0 -1501
  40. package/dist/index.js.map +0 -1
  41. package/dist/lib/components.d.ts +0 -157
  42. package/dist/lib/context.d.ts +0 -102
  43. package/dist/lib/deprecations.d.ts +0 -4
  44. package/dist/lib/hooks.d.ts +0 -181
  45. package/dist/main.js +0 -19
  46. package/dist/react-router.development.js +0 -1397
  47. package/dist/react-router.development.js.map +0 -1
  48. package/dist/react-router.production.min.js +0 -12
  49. package/dist/react-router.production.min.js.map +0 -1
  50. package/dist/umd/react-router.development.js +0 -1624
  51. package/dist/umd/react-router.development.js.map +0 -1
  52. package/dist/umd/react-router.production.min.js +0 -12
  53. package/dist/umd/react-router.production.min.js.map +0 -1
@@ -0,0 +1,246 @@
1
+ /**
2
+ * react-router v0.0.0-experimental-5bbc45fb6
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ import {
12
+ Action,
13
+ Await,
14
+ BrowserRouter,
15
+ DataRouterContext,
16
+ DataRouterStateContext,
17
+ ErrorResponseImpl,
18
+ FetchersContext,
19
+ Form,
20
+ FrameworkContext,
21
+ HashRouter,
22
+ HistoryRouter,
23
+ IDLE_BLOCKER,
24
+ IDLE_FETCHER,
25
+ IDLE_NAVIGATION,
26
+ Link,
27
+ Links,
28
+ LocationContext,
29
+ MemoryRouter,
30
+ Meta,
31
+ NavLink,
32
+ Navigate,
33
+ NavigationContext,
34
+ Outlet,
35
+ PrefetchPageLinks,
36
+ RemixErrorBoundary,
37
+ Route,
38
+ RouteContext,
39
+ Router,
40
+ RouterProvider,
41
+ Routes,
42
+ Scripts,
43
+ ScrollRestoration,
44
+ ServerMode,
45
+ ServerRouter,
46
+ SingleFetchRedirectSymbol,
47
+ StaticRouter,
48
+ StaticRouterProvider,
49
+ ViewTransitionContext,
50
+ createBrowserHistory,
51
+ createBrowserRouter,
52
+ createClientRoutes,
53
+ createClientRoutesWithHMRRevalidationOptOut,
54
+ createCookie,
55
+ createCookieSessionStorage,
56
+ createHashRouter,
57
+ createMemoryRouter,
58
+ createMemorySessionStorage,
59
+ createPath,
60
+ createRequestHandler,
61
+ createRouter,
62
+ createRoutesFromChildren,
63
+ createRoutesFromElements,
64
+ createRoutesStub,
65
+ createSearchParams,
66
+ createSession,
67
+ createSessionStorage,
68
+ createStaticHandler,
69
+ createStaticRouter,
70
+ data,
71
+ decodeViaTurboStream,
72
+ deserializeErrors,
73
+ generatePath,
74
+ getHydrationData,
75
+ getPatchRoutesOnNavigationFunction,
76
+ getTurboStreamSingleFetchDataStrategy,
77
+ href,
78
+ hydrationRouteProperties,
79
+ invariant,
80
+ isCookie,
81
+ isRouteErrorResponse,
82
+ isSession,
83
+ mapRouteProperties,
84
+ matchPath,
85
+ matchRoutes,
86
+ parsePath,
87
+ redirect,
88
+ redirectDocument,
89
+ renderMatches,
90
+ replace,
91
+ resolvePath,
92
+ setDevServerHooks,
93
+ shouldHydrateRouteLoader,
94
+ unstable_RouterContextProvider,
95
+ unstable_createContext,
96
+ useActionData,
97
+ useAsyncError,
98
+ useAsyncValue,
99
+ useBeforeUnload,
100
+ useBlocker,
101
+ useFetcher,
102
+ useFetchers,
103
+ useFogOFWarDiscovery,
104
+ useFormAction,
105
+ useHref,
106
+ useInRouterContext,
107
+ useLinkClickHandler,
108
+ useLoaderData,
109
+ useLocation,
110
+ useMatch,
111
+ useMatches,
112
+ useNavigate,
113
+ useNavigation,
114
+ useNavigationType,
115
+ useOutlet,
116
+ useOutletContext,
117
+ useParams,
118
+ usePrompt,
119
+ useResolvedPath,
120
+ useRevalidator,
121
+ useRouteError,
122
+ useRouteLoaderData,
123
+ useRoutes,
124
+ useScrollRestoration,
125
+ useSearchParams,
126
+ useSubmit,
127
+ useViewTransitionState
128
+ } from "./chunk-EKICUOCX.mjs";
129
+ export {
130
+ Await,
131
+ BrowserRouter,
132
+ Form,
133
+ HashRouter,
134
+ IDLE_BLOCKER,
135
+ IDLE_FETCHER,
136
+ IDLE_NAVIGATION,
137
+ Link,
138
+ Links,
139
+ MemoryRouter,
140
+ Meta,
141
+ NavLink,
142
+ Navigate,
143
+ Action as NavigationType,
144
+ Outlet,
145
+ PrefetchPageLinks,
146
+ Route,
147
+ Router,
148
+ RouterProvider,
149
+ Routes,
150
+ Scripts,
151
+ ScrollRestoration,
152
+ ServerRouter,
153
+ StaticRouter,
154
+ StaticRouterProvider,
155
+ DataRouterContext as UNSAFE_DataRouterContext,
156
+ DataRouterStateContext as UNSAFE_DataRouterStateContext,
157
+ ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
158
+ FetchersContext as UNSAFE_FetchersContext,
159
+ FrameworkContext as UNSAFE_FrameworkContext,
160
+ LocationContext as UNSAFE_LocationContext,
161
+ NavigationContext as UNSAFE_NavigationContext,
162
+ RemixErrorBoundary as UNSAFE_RemixErrorBoundary,
163
+ RouteContext as UNSAFE_RouteContext,
164
+ ServerMode as UNSAFE_ServerMode,
165
+ SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
166
+ ViewTransitionContext as UNSAFE_ViewTransitionContext,
167
+ createBrowserHistory as UNSAFE_createBrowserHistory,
168
+ createClientRoutes as UNSAFE_createClientRoutes,
169
+ createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
170
+ createRouter as UNSAFE_createRouter,
171
+ decodeViaTurboStream as UNSAFE_decodeViaTurboStream,
172
+ deserializeErrors as UNSAFE_deserializeErrors,
173
+ getHydrationData as UNSAFE_getHydrationData,
174
+ getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,
175
+ getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy,
176
+ hydrationRouteProperties as UNSAFE_hydrationRouteProperties,
177
+ invariant as UNSAFE_invariant,
178
+ mapRouteProperties as UNSAFE_mapRouteProperties,
179
+ shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
180
+ useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
181
+ useScrollRestoration as UNSAFE_useScrollRestoration,
182
+ createBrowserRouter,
183
+ createCookie,
184
+ createCookieSessionStorage,
185
+ createHashRouter,
186
+ createMemoryRouter,
187
+ createMemorySessionStorage,
188
+ createPath,
189
+ createRequestHandler,
190
+ createRoutesFromChildren,
191
+ createRoutesFromElements,
192
+ createRoutesStub,
193
+ createSearchParams,
194
+ createSession,
195
+ createSessionStorage,
196
+ createStaticHandler,
197
+ createStaticRouter,
198
+ data,
199
+ generatePath,
200
+ href,
201
+ isCookie,
202
+ isRouteErrorResponse,
203
+ isSession,
204
+ matchPath,
205
+ matchRoutes,
206
+ parsePath,
207
+ redirect,
208
+ redirectDocument,
209
+ renderMatches,
210
+ replace,
211
+ resolvePath,
212
+ HistoryRouter as unstable_HistoryRouter,
213
+ unstable_RouterContextProvider,
214
+ unstable_createContext,
215
+ setDevServerHooks as unstable_setDevServerHooks,
216
+ usePrompt as unstable_usePrompt,
217
+ useActionData,
218
+ useAsyncError,
219
+ useAsyncValue,
220
+ useBeforeUnload,
221
+ useBlocker,
222
+ useFetcher,
223
+ useFetchers,
224
+ useFormAction,
225
+ useHref,
226
+ useInRouterContext,
227
+ useLinkClickHandler,
228
+ useLoaderData,
229
+ useLocation,
230
+ useMatch,
231
+ useMatches,
232
+ useNavigate,
233
+ useNavigation,
234
+ useNavigationType,
235
+ useOutlet,
236
+ useOutletContext,
237
+ useParams,
238
+ useResolvedPath,
239
+ useRevalidator,
240
+ useRouteError,
241
+ useRouteLoaderData,
242
+ useRoutes,
243
+ useSearchParams,
244
+ useSubmit,
245
+ useViewTransitionState
246
+ };
@@ -0,0 +1,275 @@
1
+ import { R as Register } from '../../register-e9PGCFx1.mjs';
2
+ import { aV as Normalize, aW as ServerDataFrom, aX as ClientDataFrom, aY as Func, aE as LinkDescriptor, E as Equal, L as Location, aB as MetaDescriptor, aZ as unstable_MiddlewareNextFunction, ac as unstable_RouterContextProvider, s as MiddlewareEnabled, t as AppLoadContext, a_ as Pretty } from '../../route-data-BwJdBC92.mjs';
3
+ import 'react';
4
+
5
+ type AnyRoutes = Record<string, {
6
+ parentId?: string;
7
+ path?: string;
8
+ index?: boolean;
9
+ file: string;
10
+ params: Record<string, string | undefined>;
11
+ }>;
12
+ type RoutesPre = Register extends {
13
+ routesPre: infer RegisteredRoutes extends AnyRoutes;
14
+ } ? RegisteredRoutes : AnyRoutes;
15
+ type RouteId = keyof RoutesPre;
16
+ type GetParents<Id extends RouteId> = RoutesPre[Id] extends {
17
+ parentId: infer P extends RouteId;
18
+ } ? [
19
+ ...GetParents<P>,
20
+ P
21
+ ] : [
22
+ ];
23
+ type _GetChildren<Id extends RouteId> = {
24
+ [K in RouteId]: RoutesPre[K] extends {
25
+ parentId: Id;
26
+ } ? RoutesPre[K] extends {
27
+ index: true;
28
+ } ? [K] : RoutesPre[K] extends {
29
+ path: undefined;
30
+ } ? [K, ...GetChildren<K>] : [
31
+ K
32
+ ] | [K, ...GetChildren<K>] : [
33
+ ];
34
+ }[RouteId];
35
+ type GetChildren<Id extends RouteId> = _GetChildren<Id> extends [] ? [] : Exclude<_GetChildren<Id>, []>;
36
+ type GetBranch<Id extends RouteId> = [
37
+ ...GetParents<Id>,
38
+ Id,
39
+ ..._GetChildren<Id>
40
+ ];
41
+ type Branches = {
42
+ [Id in RouteId]: GetBranch<Id>;
43
+ };
44
+ type PartialParams = {
45
+ [Id in RouteId]: RoutesPre[Id]["params"];
46
+ };
47
+ type BranchParams<Branch extends Array<RouteId>> = Branch extends [
48
+ infer Id extends RouteId,
49
+ ...infer Ids extends Array<RouteId>
50
+ ] ? PartialParams[Id] & BranchParams<Ids> : {};
51
+ type Params = {
52
+ [Id in RouteId]: Normalize<BranchParams<Branches[Id]>>;
53
+ };
54
+
55
+ type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
56
+ type MaybePromise<T> = T | Promise<T>;
57
+ type RouteModule = {
58
+ meta?: Func;
59
+ links?: Func;
60
+ headers?: Func;
61
+ loader?: Func;
62
+ clientLoader?: Func;
63
+ action?: Func;
64
+ clientAction?: Func;
65
+ HydrateFallback?: Func;
66
+ default?: Func;
67
+ ErrorBoundary?: Func;
68
+ [key: string]: unknown;
69
+ };
70
+ type Props = {
71
+ params: unknown;
72
+ loaderData: unknown;
73
+ actionData: unknown;
74
+ };
75
+ type RouteInfo = Props & {
76
+ parents: Props[];
77
+ module: RouteModule;
78
+ };
79
+ type MetaMatch<T extends Props> = Pretty<Pick<T, "params"> & {
80
+ pathname: string;
81
+ meta: MetaDescriptor[];
82
+ data: T["loaderData"];
83
+ handle?: unknown;
84
+ error?: unknown;
85
+ }>;
86
+ type MetaMatches<T extends Props[]> = T extends [infer F extends Props, ...infer R extends Props[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
87
+ type CreateMetaArgs<T extends RouteInfo> = {
88
+ /** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
89
+ location: Location;
90
+ /** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
91
+ params: T["params"];
92
+ /** The return value for this route's server loader function */
93
+ data: T["loaderData"];
94
+ /** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
95
+ error?: unknown;
96
+ /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
97
+ matches: MetaMatches<[...T["parents"], T]>;
98
+ };
99
+ type MetaDescriptors = MetaDescriptor[];
100
+ type HeadersArgs = {
101
+ loaderHeaders: Headers;
102
+ parentHeaders: Headers;
103
+ actionHeaders: Headers;
104
+ errorHeaders: Headers | undefined;
105
+ };
106
+ type IsHydrate<ClientLoader> = ClientLoader extends {
107
+ hydrate: true;
108
+ } ? true : ClientLoader extends {
109
+ hydrate: false;
110
+ } ? false : false;
111
+ type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
112
+ HydrateFallback: Func;
113
+ } ? true : false>;
114
+ type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
115
+ HasHydrateFallback,
116
+ ClientLoaderHydrate
117
+ ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
118
+ IsDefined<ClientLoaderData>,
119
+ IsDefined<ServerLoaderData>
120
+ ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
121
+ type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
122
+ type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
123
+ IsDefined<ServerActionData>,
124
+ IsDefined<ClientActionData>
125
+ ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
126
+ type ClientDataFunctionArgs<T extends RouteInfo> = {
127
+ /**
128
+ * A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
129
+ *
130
+ * @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
131
+ **/
132
+ request: Request;
133
+ /**
134
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
135
+ * @example
136
+ * // app/routes.ts
137
+ * route("teams/:teamId", "./team.tsx"),
138
+ *
139
+ * // app/team.tsx
140
+ * export function clientLoader({
141
+ * params,
142
+ * }: Route.ClientLoaderArgs) {
143
+ * params.teamId;
144
+ * // ^ string
145
+ * }
146
+ **/
147
+ params: T["params"];
148
+ /**
149
+ * When `future.unstable_middleware` is not enabled, this is undefined.
150
+ *
151
+ * When `future.unstable_middleware` is enabled, this is an instance of
152
+ * `unstable_RouterContextProvider` and can be used to access context values
153
+ * from your route middlewares. You may pass in initial context values in your
154
+ * `<HydratedRouter unstable_getContext>` prop
155
+ */
156
+ context: unstable_RouterContextProvider;
157
+ };
158
+ type ServerDataFunctionArgs<T extends RouteInfo> = {
159
+ /** 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. */
160
+ request: Request;
161
+ /**
162
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
163
+ * @example
164
+ * // app/routes.ts
165
+ * route("teams/:teamId", "./team.tsx"),
166
+ *
167
+ * // app/team.tsx
168
+ * export function loader({
169
+ * params,
170
+ * }: Route.LoaderArgs) {
171
+ * params.teamId;
172
+ * // ^ string
173
+ * }
174
+ **/
175
+ params: T["params"];
176
+ /**
177
+ * Without `future.unstable_middleware` enabled, this is the context passed in
178
+ * to your server adapter's `getLoadContext` function. It's a way to bridge the
179
+ * gap between the adapter's request/response API with your React Router app.
180
+ * It is only applicable if you are using a custom server adapter.
181
+ *
182
+ * With `future.unstable_middleware` enabled, this is an instance of
183
+ * `unstable_RouterContextProvider` and can be used for type-safe access to
184
+ * context value set in your route middlewares. If you are using a custom
185
+ * server adapter, you may provide an initial set of context values from your
186
+ * `getLoadContext` function.
187
+ */
188
+ context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
189
+ };
190
+ type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
191
+ type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
192
+ type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
193
+ type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
194
+ /** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
195
+ serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
196
+ };
197
+ type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
198
+ type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
199
+ /** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
200
+ serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
201
+ };
202
+ type CreateHydrateFallbackProps<T extends RouteInfo> = {
203
+ params: T["params"];
204
+ loaderData?: T["loaderData"];
205
+ actionData?: T["actionData"];
206
+ };
207
+ type Match<T extends Props> = Pretty<Pick<T, "params"> & {
208
+ pathname: string;
209
+ data: T["loaderData"];
210
+ handle: unknown;
211
+ }>;
212
+ type Matches<T extends Props[]> = T extends [infer F extends Props, ...infer R extends Props[]] ? [Match<F>, ...Matches<R>] : Array<Match<Props> | undefined>;
213
+ type CreateComponentProps<T extends RouteInfo> = {
214
+ /**
215
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
216
+ * @example
217
+ * // app/routes.ts
218
+ * route("teams/:teamId", "./team.tsx"),
219
+ *
220
+ * // app/team.tsx
221
+ * export default function Component({
222
+ * params,
223
+ * }: Route.ComponentProps) {
224
+ * params.teamId;
225
+ * // ^ string
226
+ * }
227
+ **/
228
+ params: T["params"];
229
+ /** The data returned from the `loader` or `clientLoader` */
230
+ loaderData: T["loaderData"];
231
+ /** The data returned from the `action` or `clientAction` following an action submission. */
232
+ actionData?: T["actionData"];
233
+ /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
234
+ matches: Matches<[...T["parents"], T]>;
235
+ };
236
+ type CreateErrorBoundaryProps<T extends RouteInfo> = {
237
+ /**
238
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
239
+ * @example
240
+ * // app/routes.ts
241
+ * route("teams/:teamId", "./team.tsx"),
242
+ *
243
+ * // app/team.tsx
244
+ * export function ErrorBoundary({
245
+ * params,
246
+ * }: Route.ErrorBoundaryProps) {
247
+ * params.teamId;
248
+ * // ^ string
249
+ * }
250
+ **/
251
+ params: T["params"];
252
+ error: unknown;
253
+ loaderData?: T["loaderData"];
254
+ actionData?: T["actionData"];
255
+ };
256
+ type RouteModuleAnnotations<Info extends RouteInfo> = {
257
+ LinkDescriptors: LinkDescriptor[];
258
+ LinksFunction: () => LinkDescriptor[];
259
+ MetaArgs: CreateMetaArgs<Info>;
260
+ MetaDescriptors: MetaDescriptors;
261
+ MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
262
+ HeadersArgs: HeadersArgs;
263
+ HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
264
+ unstable_MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
265
+ unstable_ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
266
+ LoaderArgs: CreateServerLoaderArgs<Info>;
267
+ ClientLoaderArgs: CreateClientLoaderArgs<Info>;
268
+ ActionArgs: CreateServerActionArgs<Info>;
269
+ ClientActionArgs: CreateClientActionArgs<Info>;
270
+ HydrateFallbackProps: CreateHydrateFallbackProps<Info>;
271
+ ComponentProps: CreateComponentProps<Info>;
272
+ ErrorBoundaryProps: CreateErrorBoundaryProps<Info>;
273
+ };
274
+
275
+ export type { CreateActionData, CreateLoaderData, Params, RouteModuleAnnotations };