react-router 0.0.0-experimental-23decd7bc → 0.0.0-experimental-1d8f3ee

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 (63) hide show
  1. package/dist/development/{browser-CmIT056Z.d.mts → browser-Dy-ESm-r.d.mts} +1 -1
  2. package/dist/development/chunk-DUZSUZPY.js +42 -0
  3. package/dist/development/{chunk-GJVCYY62.mjs → chunk-LCKD6EHG.mjs} +29 -51
  4. package/dist/development/{chunk-H2M6MMUH.js → chunk-PACOJA5V.js} +34 -56
  5. package/dist/development/{chunk-3E3CD4NY.mjs → chunk-RCYOOFMP.mjs} +64 -10
  6. package/dist/development/{chunk-I3MHZ4NU.js → chunk-XDNTV7B4.js} +1 -1
  7. package/dist/development/{components-CwtESh53.d.mts → components-Yh5Jx3In.d.mts} +1 -1
  8. package/dist/development/dom-export.d.mts +8 -3
  9. package/dist/development/dom-export.d.ts +6 -0
  10. package/dist/development/dom-export.js +16 -6
  11. package/dist/development/dom-export.mjs +14 -6
  12. package/dist/{production/index-react-server-client-unV28389.d.ts → development/index-react-server-client-BM01za3r.d.ts} +3 -29
  13. package/dist/{production/index-react-server-client-CzKQ01cq.d.mts → development/index-react-server-client-CdDCHn2r.d.mts} +4 -30
  14. package/dist/development/index-react-server-client.d.mts +3 -3
  15. package/dist/development/index-react-server-client.d.ts +2 -2
  16. package/dist/development/index-react-server-client.js +4 -4
  17. package/dist/development/index-react-server-client.mjs +2 -2
  18. package/dist/development/index-react-server.d.mts +1 -1
  19. package/dist/development/index-react-server.d.ts +1 -1
  20. package/dist/development/index-react-server.js +2 -2
  21. package/dist/development/index-react-server.mjs +2 -2
  22. package/dist/development/index.d.mts +15 -11
  23. package/dist/development/index.d.ts +11 -7
  24. package/dist/development/index.js +129 -103
  25. package/dist/development/index.mjs +3 -3
  26. package/dist/development/lib/types/internal.d.mts +1 -1
  27. package/dist/development/lib/types/internal.d.ts +1 -1
  28. package/dist/development/lib/types/internal.js +1 -1
  29. package/dist/development/lib/types/internal.mjs +1 -1
  30. package/dist/{production/route-data-Csr8hE3v.d.mts → development/route-data-DJcKSHWq.d.mts} +30 -2
  31. package/dist/{production/route-data-x_b_BLCv.d.ts → development/routeModules-C82B1sOz.d.ts} +193 -165
  32. package/dist/production/{browser-CmIT056Z.d.mts → browser-Dy-ESm-r.d.mts} +1 -1
  33. package/dist/production/chunk-DUZSUZPY.js +42 -0
  34. package/dist/production/{chunk-7TUGB72O.js → chunk-F3UQRILU.js} +34 -56
  35. package/dist/production/{chunk-XNTCWHOK.mjs → chunk-FDXAKVCT.mjs} +64 -10
  36. package/dist/production/{chunk-YWCG2M57.mjs → chunk-VJ4SUXKA.mjs} +29 -51
  37. package/dist/production/{chunk-I3MHZ4NU.js → chunk-XDNTV7B4.js} +1 -1
  38. package/dist/production/{components-CwtESh53.d.mts → components-Yh5Jx3In.d.mts} +1 -1
  39. package/dist/production/dom-export.d.mts +8 -3
  40. package/dist/production/dom-export.d.ts +6 -0
  41. package/dist/production/dom-export.js +16 -6
  42. package/dist/production/dom-export.mjs +14 -6
  43. package/dist/{development/index-react-server-client-unV28389.d.ts → production/index-react-server-client-BM01za3r.d.ts} +3 -29
  44. package/dist/{development/index-react-server-client-CzKQ01cq.d.mts → production/index-react-server-client-CdDCHn2r.d.mts} +4 -30
  45. package/dist/production/index-react-server-client.d.mts +3 -3
  46. package/dist/production/index-react-server-client.d.ts +2 -2
  47. package/dist/production/index-react-server-client.js +4 -4
  48. package/dist/production/index-react-server-client.mjs +2 -2
  49. package/dist/production/index-react-server.d.mts +1 -1
  50. package/dist/production/index-react-server.d.ts +1 -1
  51. package/dist/production/index-react-server.js +2 -2
  52. package/dist/production/index-react-server.mjs +2 -2
  53. package/dist/production/index.d.mts +15 -11
  54. package/dist/production/index.d.ts +11 -7
  55. package/dist/production/index.js +129 -103
  56. package/dist/production/index.mjs +3 -3
  57. package/dist/production/lib/types/internal.d.mts +1 -1
  58. package/dist/production/lib/types/internal.d.ts +1 -1
  59. package/dist/production/lib/types/internal.js +1 -1
  60. package/dist/production/lib/types/internal.mjs +1 -1
  61. package/dist/{development/route-data-x_b_BLCv.d.ts → production/route-data-DJcKSHWq.d.mts} +40 -12
  62. package/dist/{development/route-data-Csr8hE3v.d.mts → production/routeModules-C82B1sOz.d.ts} +183 -155
  63. package/package.json +6 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-23decd7bc
2
+ * react-router v0.0.0-experimental-1d8f3ee
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -31,7 +31,7 @@ import {
31
31
  isSession,
32
32
  routeRSCServerRequest,
33
33
  setDevServerHooks
34
- } from "./chunk-3E3CD4NY.mjs";
34
+ } from "./chunk-RCYOOFMP.mjs";
35
35
  import {
36
36
  Action,
37
37
  Await,
@@ -137,7 +137,7 @@ import {
137
137
  withComponentProps,
138
138
  withErrorBoundaryProps,
139
139
  withHydrateFallbackProps
140
- } from "./chunk-GJVCYY62.mjs";
140
+ } from "./chunk-LCKD6EHG.mjs";
141
141
  export {
142
142
  Await,
143
143
  BrowserRouter,
@@ -1,4 +1,4 @@
1
- import { v as RouteModule, w as LinkDescriptor, L as Location, x as Pretty, y as MetaDescriptor, G as GetLoaderData, z as ServerDataFunctionArgs, E as unstable_MiddlewareNextFunction, J as ClientDataFunctionArgs, K as ServerDataFrom, O as Normalize, Q as GetActionData } from '../../route-data-Csr8hE3v.mjs';
1
+ import { w as RouteModule, x as LinkDescriptor, c as Location, y as Pretty, z as MetaDescriptor, G as GetLoaderData, E as ServerDataFunctionArgs, J as unstable_MiddlewareNextFunction, K as ClientDataFunctionArgs, O as ServerDataFrom, Q as Normalize, V as GetActionData } from '../../route-data-DJcKSHWq.mjs';
2
2
  import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.mjs';
3
3
  import 'react';
4
4
 
@@ -1,4 +1,4 @@
1
- import { R as RouteModule, L as LinkDescriptor, a as Location, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../route-data-x_b_BLCv.js';
1
+ import { R as RouteModule, a as LinkDescriptor, b as Location, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, c as ServerDataFrom, N as Normalize, d as GetActionData } from '../../routeModules-C82B1sOz.js';
2
2
  import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.js';
3
3
  import 'react';
4
4
 
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * react-router v0.0.0-experimental-23decd7bc
2
+ * react-router v0.0.0-experimental-1d8f3ee
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-23decd7bc
2
+ * react-router v0.0.0-experimental-1d8f3ee
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -964,7 +964,7 @@ interface RouterState {
964
964
  /**
965
965
  * Current scroll position we should start at for a new view
966
966
  * - number -> scroll position to restore to
967
- * - false -> do not restore scroll at all (used during submissions)
967
+ * - false -> do not restore scroll at all (used during submissions/revalidations)
968
968
  * - null -> don't have a saved position, scroll to hash or top of page
969
969
  */
970
970
  restoreScrollPosition: number | false | null;
@@ -1418,6 +1418,33 @@ interface AppLoadContext {
1418
1418
  [key: string]: unknown;
1419
1419
  }
1420
1420
 
1421
+ interface Route {
1422
+ index?: boolean;
1423
+ caseSensitive?: boolean;
1424
+ id: string;
1425
+ parentId?: string;
1426
+ path?: string;
1427
+ }
1428
+ interface EntryRoute extends Route {
1429
+ hasAction: boolean;
1430
+ hasLoader: boolean;
1431
+ hasClientAction: boolean;
1432
+ hasClientLoader: boolean;
1433
+ hasClientMiddleware: boolean;
1434
+ hasErrorBoundary: boolean;
1435
+ imports?: string[];
1436
+ css?: string[];
1437
+ module: string;
1438
+ clientActionModule: string | undefined;
1439
+ clientLoaderModule: string | undefined;
1440
+ clientMiddlewareModule: string | undefined;
1441
+ hydrateFallbackModule: string | undefined;
1442
+ parentId?: string;
1443
+ }
1444
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean, loadRouteModule: LoadRouteModuleFunction): DataRouteObject[];
1445
+ declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, loadRouteModule: LoadRouteModuleFunction, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
1446
+ declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
1447
+
1421
1448
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
1422
1449
  type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
1423
1450
  interface HtmlLinkProps {
@@ -1724,6 +1751,7 @@ type RouteComponent = ComponentType<{}>;
1724
1751
  * @see https://remix.run/route/handle
1725
1752
  */
1726
1753
  type RouteHandle = unknown;
1754
+ type LoadRouteModuleFunction = (route: EntryRoute, routeModulesCache: RouteModules) => Promise<RouteModule$1>;
1727
1755
 
1728
1756
  type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {
1729
1757
  [key: PropertyKey]: Serializable;
@@ -1867,4 +1895,4 @@ type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
1867
1895
  IsDefined<ClientActionData>
1868
1896
  ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
1869
1897
 
1870
- export { type DataRouteObject as $, Action as A, type BlockerFunction as B, type ClientActionFunction as C, type DataStrategyFunction as D, type unstable_MiddlewareNextFunction as E, type FutureConfig as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type ClientDataFunctionArgs as J, type ServerDataFrom as K, type Location as L, type MetaFunction as M, type NavigateOptions as N, type Normalize as O, type ParamParseKey as P, type GetActionData as Q, type RouterInit as R, type SerializeFrom as S, type To as T, type UIMatch as U, type RouteModules as V, type unstable_InitialContext as W, type MiddlewareEnabled as X, type AppLoadContext as Y, type Equal as Z, type RouterState as _, type Blocker as a, type ServerRouteModule as a$, type StaticHandler as a0, type GetScrollPositionFunction as a1, type GetScrollRestorationKeyFunction as a2, type StaticHandlerContext as a3, type Fetcher as a4, type NavigationStates as a5, type RouterSubscriber as a6, type RouterNavigateOptions as a7, type RouterFetchOptions as a8, type RevalidationState as a9, matchRoutes as aA, redirect as aB, redirectDocument as aC, replace as aD, resolvePath as aE, type DataRouteMatch as aF, type PatchRoutesOnNavigationFunctionArgs as aG, type ClientActionFunctionArgs as aH, type ClientLoaderFunctionArgs as aI, type HeadersArgs as aJ, type MetaArgs as aK, type PageLinkDescriptor as aL, type HtmlLinkDescriptor as aM, type Future as aN, type unstable_SerializesTo as aO, createBrowserHistory as aP, invariant as aQ, createRouter as aR, ErrorResponseImpl as aS, DataRouterContext as aT, DataRouterStateContext as aU, FetchersContext as aV, LocationContext as aW, NavigationContext as aX, RouteContext as aY, ViewTransitionContext as aZ, type RouteManifest as a_, type ActionFunctionArgs as aa, type DataStrategyFunctionArgs as ab, type DataStrategyMatch as ac, type DataStrategyResult as ad, DataWithResponseInit as ae, type ErrorResponse as af, type FormEncType as ag, type FormMethod as ah, type HTMLFormMethod as ai, type LoaderFunctionArgs as aj, type unstable_MiddlewareFunction as ak, type PathParam as al, type RedirectFunction as am, type unstable_RouterContext as an, type ShouldRevalidateFunctionArgs as ao, unstable_createContext as ap, unstable_RouterContextProvider 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 RelativeRoutingType as b, type History as b0, type CreateStaticHandlerOptions as b1, type Path as c, type PathPattern as d, type PathMatch as e, type Navigation as f, type Params as g, type Router as h, type RouteObject as i, type NonIndexRouteObject as j, type LazyRouteFunction as k, type IndexRouteObject as l, type Navigator as m, type PatchRoutesOnNavigationFunction as n, type RouteMatch as o, type ActionFunction as p, type ClientLoaderFunction as q, type HeadersFunction as r, type LinksFunction as s, type LoaderFunction as t, type ShouldRevalidateFunction as u, type RouteModule as v, type LinkDescriptor as w, type Pretty as x, type MetaDescriptor as y, type ServerDataFunctionArgs as z };
1898
+ export { type RouterState as $, Action as A, type BlockerFunction as B, type ClientActionFunction as C, type DataStrategyFunction as D, type ServerDataFunctionArgs as E, type FutureConfig as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type unstable_MiddlewareNextFunction as J, type ClientDataFunctionArgs as K, type LoadRouteModuleFunction as L, type MetaFunction as M, type NavigateOptions as N, type ServerDataFrom as O, type ParamParseKey as P, type Normalize as Q, type RouterInit as R, type SerializeFrom as S, type To as T, type UIMatch as U, type GetActionData as V, type RouteModules as W, type unstable_InitialContext as X, type MiddlewareEnabled as Y, type AppLoadContext as Z, type Equal as _, type Blocker as a, createClientRoutes 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, matchPath as aA, matchRoutes as aB, redirect as aC, redirectDocument as aD, replace as aE, resolvePath as aF, type DataRouteMatch as aG, type PatchRoutesOnNavigationFunctionArgs as aH, type ClientActionFunctionArgs as aI, type ClientLoaderFunctionArgs as aJ, type HeadersArgs as aK, type MetaArgs as aL, type PageLinkDescriptor as aM, type HtmlLinkDescriptor as aN, type Future as aO, type unstable_SerializesTo as aP, createBrowserHistory as aQ, invariant as aR, createRouter as aS, ErrorResponseImpl as aT, DataRouterContext as aU, DataRouterStateContext as aV, FetchersContext as aW, LocationContext as aX, NavigationContext as aY, RouteContext as aZ, ViewTransitionContext as a_, type RevalidationState as aa, type ActionFunctionArgs as ab, type DataStrategyFunctionArgs as ac, type DataStrategyMatch as ad, type DataStrategyResult as ae, DataWithResponseInit as af, type ErrorResponse as ag, type FormEncType as ah, type FormMethod as ai, type HTMLFormMethod 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, unstable_RouterContextProvider as ar, createPath as as, parsePath as at, IDLE_NAVIGATION as au, IDLE_FETCHER as av, IDLE_BLOCKER as aw, data as ax, generatePath as ay, isRouteErrorResponse as az, type RelativeRoutingType as b, createClientRoutesWithHMRRevalidationOptOut as b0, shouldHydrateRouteLoader as b1, type RouteManifest as b2, type Route as b3, type ServerRouteModule as b4, type EntryRoute as b5, type History as b6, type CreateStaticHandlerOptions as b7, type Location as c, type Path as d, type PathPattern as e, type PathMatch as f, type Navigation as g, type Params as h, type Router as i, type RouteObject as j, type NonIndexRouteObject as k, type LazyRouteFunction as l, type IndexRouteObject as m, type Navigator as n, type PatchRoutesOnNavigationFunction as o, type RouteMatch as p, type ActionFunction as q, type ClientLoaderFunction as r, type HeadersFunction as s, type LinksFunction as t, type LoaderFunction as u, type ShouldRevalidateFunction as v, type RouteModule as w, type LinkDescriptor as x, type Pretty as y, type MetaDescriptor as z };
@@ -1,16 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentType, ReactElement } from 'react';
3
3
 
4
- /**
5
- * An augmentable interface users can modify in their app-code to opt into
6
- * future-flag-specific types
7
- */
8
- interface Future {
9
- }
10
- type MiddlewareEnabled = Future extends {
11
- unstable_middleware: infer T extends boolean;
12
- } ? T : false;
13
-
14
4
  /**
15
5
  * Actions represent the type of change to a location value.
16
6
  */
@@ -216,6 +206,16 @@ type UrlHistoryOptions = {
216
206
  v5Compat?: boolean;
217
207
  };
218
208
 
209
+ /**
210
+ * An augmentable interface users can modify in their app-code to opt into
211
+ * future-flag-specific types
212
+ */
213
+ interface Future {
214
+ }
215
+ type MiddlewareEnabled = Future extends {
216
+ unstable_middleware: infer T extends boolean;
217
+ } ? T : false;
218
+
219
219
  type MaybePromise<T> = T | Promise<T>;
220
220
  /**
221
221
  * Map of routeId -> data returned from a loader/action/error
@@ -964,7 +964,7 @@ interface RouterState {
964
964
  /**
965
965
  * Current scroll position we should start at for a new view
966
966
  * - number -> scroll position to restore to
967
- * - false -> do not restore scroll at all (used during submissions)
967
+ * - false -> do not restore scroll at all (used during submissions/revalidations)
968
968
  * - null -> don't have a saved position, scroll to hash or top of page
969
969
  */
970
970
  restoreScrollPosition: number | false | null;
@@ -1291,6 +1291,16 @@ interface CreateStaticHandlerOptions {
1291
1291
  future?: {};
1292
1292
  }
1293
1293
 
1294
+ /**
1295
+ * An object of unknown type for route loaders and actions provided by the
1296
+ * server's `getLoadContext()` function. This is defined as an empty interface
1297
+ * specifically so apps can leverage declaration merging to augment this type
1298
+ * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
1299
+ */
1300
+ interface AppLoadContext {
1301
+ [key: string]: unknown;
1302
+ }
1303
+
1294
1304
  interface IndexRouteObject {
1295
1305
  caseSensitive?: AgnosticIndexRouteObject["caseSensitive"];
1296
1306
  path?: AgnosticIndexRouteObject["path"];
@@ -1408,15 +1418,32 @@ interface RouteContextObject {
1408
1418
  }
1409
1419
  declare const RouteContext: React.Context<RouteContextObject>;
1410
1420
 
1411
- /**
1412
- * An object of unknown type for route loaders and actions provided by the
1413
- * server's `getLoadContext()` function. This is defined as an empty interface
1414
- * specifically so apps can leverage declaration merging to augment this type
1415
- * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
1416
- */
1417
- interface AppLoadContext {
1418
- [key: string]: unknown;
1421
+ interface Route {
1422
+ index?: boolean;
1423
+ caseSensitive?: boolean;
1424
+ id: string;
1425
+ parentId?: string;
1426
+ path?: string;
1419
1427
  }
1428
+ interface EntryRoute extends Route {
1429
+ hasAction: boolean;
1430
+ hasLoader: boolean;
1431
+ hasClientAction: boolean;
1432
+ hasClientLoader: boolean;
1433
+ hasClientMiddleware: boolean;
1434
+ hasErrorBoundary: boolean;
1435
+ imports?: string[];
1436
+ css?: string[];
1437
+ module: string;
1438
+ clientActionModule: string | undefined;
1439
+ clientLoaderModule: string | undefined;
1440
+ clientMiddlewareModule: string | undefined;
1441
+ hydrateFallbackModule: string | undefined;
1442
+ parentId?: string;
1443
+ }
1444
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean, loadRouteModule: LoadRouteModuleFunction): DataRouteObject[];
1445
+ declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, loadRouteModule: LoadRouteModuleFunction, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
1446
+ declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
1420
1447
 
1421
1448
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
1422
1449
  type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
@@ -1522,13 +1549,155 @@ interface PageLinkDescriptor extends Omit<HtmlLinkDescriptor, "href" | "rel" | "
1522
1549
  }
1523
1550
  type LinkDescriptor = HtmlLinkDescriptor | PageLinkDescriptor;
1524
1551
 
1552
+ type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {
1553
+ [key: PropertyKey]: Serializable;
1554
+ } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
1555
+
1556
+ type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
1557
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1558
+ type Func = (...args: any[]) => unknown;
1559
+ type Pretty<T> = {
1560
+ [K in keyof T]: T[K];
1561
+ } & {};
1562
+ type Normalize<T> = _Normalize<UnionKeys<T>, T>;
1563
+ type _Normalize<Key extends keyof any, T> = T extends infer U ? Pretty<{
1564
+ [K in Key as K extends keyof U ? undefined extends U[K] ? never : K : never]: K extends keyof U ? U[K] : never;
1565
+ } & {
1566
+ [K in Key as K extends keyof U ? undefined extends U[K] ? K : never : never]?: K extends keyof U ? U[K] : never;
1567
+ } & {
1568
+ [K in Key as K extends keyof U ? never : K]?: undefined;
1569
+ }> : never;
1570
+ type UnionKeys<T> = T extends any ? keyof T : never;
1571
+
1572
+ type RouteModule$1 = {
1573
+ meta?: Func;
1574
+ links?: Func;
1575
+ headers?: Func;
1576
+ loader?: Func;
1577
+ clientLoader?: Func;
1578
+ action?: Func;
1579
+ clientAction?: Func;
1580
+ HydrateFallback?: Func;
1581
+ default?: Func;
1582
+ ErrorBoundary?: Func;
1583
+ [key: string]: unknown;
1584
+ };
1585
+
1586
+ /**
1587
+ * A brand that can be applied to a type to indicate that it will serialize
1588
+ * to a specific type when transported to the client from a loader.
1589
+ * Only use this if you have additional serialization/deserialization logic
1590
+ * in your application.
1591
+ */
1592
+ type unstable_SerializesTo<T> = {
1593
+ unstable__ReactRouter_SerializesTo: [T];
1594
+ };
1595
+
1596
+ 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> ? {
1597
+ [K in keyof T]: Serialize<T[K]>;
1598
+ } : undefined;
1599
+ type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T;
1600
+ type DataFrom<T> = IsAny<T> extends true ? undefined : T extends Func ? VoidToUndefined<Awaited<ReturnType<T>>> : undefined;
1601
+ type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? U : T;
1602
+ type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
1603
+ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1604
+ type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1605
+ type ClientDataFunctionArgs<Params> = {
1606
+ /**
1607
+ * 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.
1608
+ *
1609
+ * @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.
1610
+ **/
1611
+ request: Request;
1612
+ /**
1613
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
1614
+ * @example
1615
+ * // app/routes.ts
1616
+ * route("teams/:teamId", "./team.tsx"),
1617
+ *
1618
+ * // app/team.tsx
1619
+ * export function clientLoader({
1620
+ * params,
1621
+ * }: Route.ClientLoaderArgs) {
1622
+ * params.teamId;
1623
+ * // ^ string
1624
+ * }
1625
+ **/
1626
+ params: Params;
1627
+ /**
1628
+ * When `future.unstable_middleware` is not enabled, this is undefined.
1629
+ *
1630
+ * When `future.unstable_middleware` is enabled, this is an instance of
1631
+ * `unstable_RouterContextProvider` and can be used to access context values
1632
+ * from your route middlewares. You may pass in initial context values in your
1633
+ * `<HydratedRouter unstable_getContext>` prop
1634
+ */
1635
+ context: unstable_RouterContextProvider;
1636
+ };
1637
+ type ServerDataFunctionArgs<Params> = {
1638
+ /** 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. */
1639
+ request: Request;
1640
+ /**
1641
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
1642
+ * @example
1643
+ * // app/routes.ts
1644
+ * route("teams/:teamId", "./team.tsx"),
1645
+ *
1646
+ * // app/team.tsx
1647
+ * export function loader({
1648
+ * params,
1649
+ * }: Route.LoaderArgs) {
1650
+ * params.teamId;
1651
+ * // ^ string
1652
+ * }
1653
+ **/
1654
+ params: Params;
1655
+ /**
1656
+ * Without `future.unstable_middleware` enabled, this is the context passed in
1657
+ * to your server adapter's `getLoadContext` function. It's a way to bridge the
1658
+ * gap between the adapter's request/response API with your React Router app.
1659
+ * It is only applicable if you are using a custom server adapter.
1660
+ *
1661
+ * With `future.unstable_middleware` enabled, this is an instance of
1662
+ * `unstable_RouterContextProvider` and can be used for type-safe access to
1663
+ * context value set in your route middlewares. If you are using a custom
1664
+ * server adapter, you may provide an initial set of context values from your
1665
+ * `getLoadContext` function.
1666
+ */
1667
+ context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
1668
+ };
1669
+ type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
1670
+ ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
1671
+ ] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1672
+ type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
1673
+ type IsHydrate<ClientLoader> = ClientLoader extends {
1674
+ hydrate: true;
1675
+ } ? true : ClientLoader extends {
1676
+ hydrate: false;
1677
+ } ? false : false;
1678
+ type GetLoaderData<T extends RouteModule$1> = _DataLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
1679
+ HydrateFallback: Func;
1680
+ } ? true : false>;
1681
+ type _DataLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
1682
+ HasHydrateFallback,
1683
+ ClientLoaderHydrate
1684
+ ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
1685
+ IsDefined<ClientLoaderData>,
1686
+ IsDefined<ServerLoaderData>
1687
+ ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
1688
+ type GetActionData<T extends RouteModule$1> = _DataActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
1689
+ type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
1690
+ IsDefined<ServerActionData>,
1691
+ IsDefined<ClientActionData>
1692
+ ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
1693
+
1525
1694
  interface RouteModules {
1526
- [routeId: string]: RouteModule$1 | undefined;
1695
+ [routeId: string]: RouteModule | undefined;
1527
1696
  }
1528
1697
  /**
1529
1698
  * The shape of a route module shipped to the client
1530
1699
  */
1531
- interface RouteModule$1 {
1700
+ interface RouteModule {
1532
1701
  clientAction?: ClientActionFunction;
1533
1702
  clientLoader?: ClientLoaderFunction;
1534
1703
  unstable_clientMiddleware?: unstable_MiddlewareFunction<undefined>[];
@@ -1544,7 +1713,7 @@ interface RouteModule$1 {
1544
1713
  /**
1545
1714
  * The shape of a route module on the server
1546
1715
  */
1547
- interface ServerRouteModule extends RouteModule$1 {
1716
+ interface ServerRouteModule extends RouteModule {
1548
1717
  action?: ActionFunction;
1549
1718
  headers?: HeadersFunction | {
1550
1719
  [name: string]: string;
@@ -1724,147 +1893,6 @@ type RouteComponent = ComponentType<{}>;
1724
1893
  * @see https://remix.run/route/handle
1725
1894
  */
1726
1895
  type RouteHandle = unknown;
1896
+ type LoadRouteModuleFunction = (route: EntryRoute, routeModulesCache: RouteModules) => Promise<RouteModule>;
1727
1897
 
1728
- type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {
1729
- [key: PropertyKey]: Serializable;
1730
- } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
1731
-
1732
- type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
1733
- type IsAny<T> = 0 extends 1 & T ? true : false;
1734
- type Func = (...args: any[]) => unknown;
1735
- type Pretty<T> = {
1736
- [K in keyof T]: T[K];
1737
- } & {};
1738
- type Normalize<T> = _Normalize<UnionKeys<T>, T>;
1739
- type _Normalize<Key extends keyof any, T> = T extends infer U ? Pretty<{
1740
- [K in Key as K extends keyof U ? undefined extends U[K] ? never : K : never]: K extends keyof U ? U[K] : never;
1741
- } & {
1742
- [K in Key as K extends keyof U ? undefined extends U[K] ? K : never : never]?: K extends keyof U ? U[K] : never;
1743
- } & {
1744
- [K in Key as K extends keyof U ? never : K]?: undefined;
1745
- }> : never;
1746
- type UnionKeys<T> = T extends any ? keyof T : never;
1747
-
1748
- type RouteModule = {
1749
- meta?: Func;
1750
- links?: Func;
1751
- headers?: Func;
1752
- loader?: Func;
1753
- clientLoader?: Func;
1754
- action?: Func;
1755
- clientAction?: Func;
1756
- HydrateFallback?: Func;
1757
- default?: Func;
1758
- ErrorBoundary?: Func;
1759
- [key: string]: unknown;
1760
- };
1761
-
1762
- /**
1763
- * A brand that can be applied to a type to indicate that it will serialize
1764
- * to a specific type when transported to the client from a loader.
1765
- * Only use this if you have additional serialization/deserialization logic
1766
- * in your application.
1767
- */
1768
- type unstable_SerializesTo<T> = {
1769
- unstable__ReactRouter_SerializesTo: [T];
1770
- };
1771
-
1772
- 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> ? {
1773
- [K in keyof T]: Serialize<T[K]>;
1774
- } : undefined;
1775
- type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T;
1776
- type DataFrom<T> = IsAny<T> extends true ? undefined : T extends Func ? VoidToUndefined<Awaited<ReturnType<T>>> : undefined;
1777
- type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? U : T;
1778
- type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
1779
- type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1780
- type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1781
- type ClientDataFunctionArgs<Params> = {
1782
- /**
1783
- * 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.
1784
- *
1785
- * @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.
1786
- **/
1787
- request: Request;
1788
- /**
1789
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
1790
- * @example
1791
- * // app/routes.ts
1792
- * route("teams/:teamId", "./team.tsx"),
1793
- *
1794
- * // app/team.tsx
1795
- * export function clientLoader({
1796
- * params,
1797
- * }: Route.ClientLoaderArgs) {
1798
- * params.teamId;
1799
- * // ^ string
1800
- * }
1801
- **/
1802
- params: Params;
1803
- /**
1804
- * When `future.unstable_middleware` is not enabled, this is undefined.
1805
- *
1806
- * When `future.unstable_middleware` is enabled, this is an instance of
1807
- * `unstable_RouterContextProvider` and can be used to access context values
1808
- * from your route middlewares. You may pass in initial context values in your
1809
- * `<HydratedRouter unstable_getContext>` prop
1810
- */
1811
- context: unstable_RouterContextProvider;
1812
- };
1813
- type ServerDataFunctionArgs<Params> = {
1814
- /** 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. */
1815
- request: Request;
1816
- /**
1817
- * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
1818
- * @example
1819
- * // app/routes.ts
1820
- * route("teams/:teamId", "./team.tsx"),
1821
- *
1822
- * // app/team.tsx
1823
- * export function loader({
1824
- * params,
1825
- * }: Route.LoaderArgs) {
1826
- * params.teamId;
1827
- * // ^ string
1828
- * }
1829
- **/
1830
- params: Params;
1831
- /**
1832
- * Without `future.unstable_middleware` enabled, this is the context passed in
1833
- * to your server adapter's `getLoadContext` function. It's a way to bridge the
1834
- * gap between the adapter's request/response API with your React Router app.
1835
- * It is only applicable if you are using a custom server adapter.
1836
- *
1837
- * With `future.unstable_middleware` enabled, this is an instance of
1838
- * `unstable_RouterContextProvider` and can be used for type-safe access to
1839
- * context value set in your route middlewares. If you are using a custom
1840
- * server adapter, you may provide an initial set of context values from your
1841
- * `getLoadContext` function.
1842
- */
1843
- context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
1844
- };
1845
- type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
1846
- ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
1847
- ] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1848
- type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
1849
- type IsHydrate<ClientLoader> = ClientLoader extends {
1850
- hydrate: true;
1851
- } ? true : ClientLoader extends {
1852
- hydrate: false;
1853
- } ? false : false;
1854
- type GetLoaderData<T extends RouteModule> = _DataLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
1855
- HydrateFallback: Func;
1856
- } ? true : false>;
1857
- type _DataLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
1858
- HasHydrateFallback,
1859
- ClientLoaderHydrate
1860
- ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
1861
- IsDefined<ClientLoaderData>,
1862
- IsDefined<ServerLoaderData>
1863
- ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
1864
- type GetActionData<T extends RouteModule> = _DataActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
1865
- type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
1866
- IsDefined<ServerActionData>,
1867
- IsDefined<ClientActionData>
1868
- ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
1869
-
1870
- export { type DataStrategyFunctionArgs as $, type ActionFunction as A, type StaticHandlerContext as B, type ClientDataFunctionArgs as C, type DataStrategyFunction as D, type Equal as E, type Fetcher as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type Navigation as J, type NavigationStates as K, type LinkDescriptor as L, type MetaDescriptor as M, type Normalize as N, type RelativeRoutingType as O, type Pretty as P, type Blocker as Q, type RouteModule as R, type ServerDataFunctionArgs as S, type To as T, type BlockerFunction as U, type RouterInit as V, type RouterSubscriber as W, type RouterNavigateOptions as X, type RouterFetchOptions as Y, type RevalidationState as Z, type ActionFunctionArgs as _, type Location as a, type FutureConfig as a$, type DataStrategyMatch as a0, type DataStrategyResult as a1, DataWithResponseInit as a2, type ErrorResponse as a3, type FormEncType as a4, type FormMethod as a5, type HTMLFormMethod as a6, type LazyRouteFunction as a7, type LoaderFunctionArgs as a8, type unstable_MiddlewareFunction as a9, type NavigateOptions as aA, type Navigator as aB, type PatchRoutesOnNavigationFunctionArgs as aC, type RouteMatch as aD, type RouteObject as aE, type ClientActionFunctionArgs as aF, type ClientLoaderFunctionArgs as aG, type HeadersArgs as aH, type MetaArgs as aI, type PageLinkDescriptor as aJ, type HtmlLinkDescriptor as aK, type Future as aL, type unstable_SerializesTo as aM, createBrowserHistory as aN, invariant as aO, createRouter as aP, ErrorResponseImpl as aQ, DataRouterContext as aR, DataRouterStateContext as aS, FetchersContext as aT, LocationContext as aU, NavigationContext as aV, RouteContext as aW, ViewTransitionContext as aX, type RouteManifest as aY, type ServerRouteModule as aZ, type SerializeFrom as a_, type ParamParseKey as aa, type PathMatch as ab, type PathParam as ac, type PathPattern as ad, type RedirectFunction as ae, type unstable_RouterContext as af, type ShouldRevalidateFunctionArgs as ag, type UIMatch as ah, unstable_createContext as ai, unstable_RouterContextProvider as aj, Action as ak, createPath as al, parsePath as am, IDLE_NAVIGATION as an, IDLE_FETCHER as ao, IDLE_BLOCKER as ap, data as aq, generatePath as ar, isRouteErrorResponse as as, matchPath as at, matchRoutes as au, redirect as av, redirectDocument as aw, replace as ax, resolvePath as ay, type DataRouteMatch 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 IndexRouteObject as f, type LoaderFunction as g, type MetaFunction as h, type LinksFunction as i, type NonIndexRouteObject as j, type unstable_InitialContext as k, type MiddlewareEnabled as l, type AppLoadContext as m, type ClientActionFunction as n, type ClientLoaderFunction as o, type HeadersFunction as p, type ShouldRevalidateFunction as q, type Params as r, type RouterState as s, type PatchRoutesOnNavigationFunction as t, type unstable_MiddlewareNextFunction as u, type DataRouteObject as v, type Path as w, type StaticHandler as x, type GetScrollPositionFunction as y, type GetScrollRestorationKeyFunction as z };
1898
+ export { type ActionFunctionArgs as $, type ActionFunction as A, type GetScrollRestorationKeyFunction as B, type ClientDataFunctionArgs as C, type DataStrategyFunction as D, type Equal as E, type StaticHandlerContext as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type Fetcher as J, type Navigation as K, type LoadRouteModuleFunction as L, type MetaDescriptor as M, type Normalize as N, type NavigationStates as O, type Pretty as P, type RelativeRoutingType as Q, type RouteModule$1 as R, type ServerDataFunctionArgs as S, type To as T, type Blocker as U, type BlockerFunction as V, type RouterInit as W, type RouterSubscriber as X, type RouterNavigateOptions as Y, type RouterFetchOptions as Z, type RevalidationState as _, type LinkDescriptor as a, shouldHydrateRouteLoader as a$, type DataStrategyFunctionArgs as a0, type DataStrategyMatch as a1, type DataStrategyResult as a2, DataWithResponseInit as a3, type ErrorResponse as a4, type FormEncType as a5, type FormMethod as a6, type HTMLFormMethod as a7, type LazyRouteFunction as a8, type LoaderFunctionArgs as a9, type DataRouteMatch as aA, type NavigateOptions as aB, type Navigator as aC, type PatchRoutesOnNavigationFunctionArgs as aD, type RouteMatch as aE, type RouteObject 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, createClientRoutes as aZ, createClientRoutesWithHMRRevalidationOptOut as a_, type unstable_MiddlewareFunction as aa, type ParamParseKey as ab, type PathMatch as ac, type PathParam as ad, type PathPattern as ae, type RedirectFunction as af, type unstable_RouterContext as ag, type ShouldRevalidateFunctionArgs as ah, type UIMatch as ai, unstable_createContext as aj, unstable_RouterContextProvider as ak, Action as al, createPath as am, parsePath as an, IDLE_NAVIGATION as ao, IDLE_FETCHER as ap, IDLE_BLOCKER as aq, data as ar, generatePath as as, isRouteErrorResponse as at, matchPath as au, matchRoutes as av, redirect as aw, redirectDocument as ax, replace as ay, resolvePath as az, type Location as b, type RouteManifest as b0, type Route as b1, type ServerRouteModule as b2, type EntryRoute as b3, type SerializeFrom as b4, type FutureConfig as b5, type History as b6, type CreateStaticHandlerOptions as b7, type ServerDataFrom as c, type GetActionData as d, type Router as e, type RouteModules as f, type IndexRouteObject as g, type LoaderFunction as h, type MetaFunction as i, type LinksFunction as j, type NonIndexRouteObject as k, type unstable_InitialContext as l, type MiddlewareEnabled as m, type AppLoadContext as n, type ClientActionFunction as o, type ClientLoaderFunction as p, type HeadersFunction as q, type ShouldRevalidateFunction as r, type Params as s, type RouterState as t, type unstable_MiddlewareNextFunction as u, type PatchRoutesOnNavigationFunction as v, type DataRouteObject as w, type Path as x, type StaticHandler as y, type GetScrollPositionFunction as z };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { p as ActionFunction, C as ClientActionFunction, q as ClientLoaderFunction, r as HeadersFunction, s as LinksFunction, t as LoaderFunction, M as MetaFunction, u as ShouldRevalidateFunction, L as Location, g as Params, h as Router } from './route-data-Csr8hE3v.mjs';
2
+ import { q as ActionFunction, C as ClientActionFunction, r as ClientLoaderFunction, s as HeadersFunction, t as LinksFunction, u as LoaderFunction, M as MetaFunction, v as ShouldRevalidateFunction, c as Location, h as Params, i as Router } from './route-data-DJcKSHWq.mjs';
3
3
  import { AsyncLocalStorage } from 'node:async_hooks';
4
4
 
5
5
  type ServerContext = {
@@ -0,0 +1,42 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }/**
2
+ * react-router v0.0.0-experimental-1d8f3ee
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
+
12
+ // lib/dom/ssr/routeModules.ts
13
+ var defaultLoadRouteModule = async (route, routeModulesCache) => {
14
+ if (route.id in routeModulesCache) {
15
+ return routeModulesCache[route.id];
16
+ }
17
+ try {
18
+ let routeModule = await Promise.resolve().then(() => _interopRequireWildcard(require(
19
+ /* @vite-ignore */
20
+ /* webpackIgnore: true */
21
+ route.module
22
+ )));
23
+ routeModulesCache[route.id] = routeModule;
24
+ return routeModule;
25
+ } catch (error) {
26
+ console.error(
27
+ `Error loading route module \`${route.module}\`, reloading page...`
28
+ );
29
+ console.error(error);
30
+ if (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && // @ts-expect-error
31
+ void 0) {
32
+ throw error;
33
+ }
34
+ window.location.reload();
35
+ return new Promise(() => {
36
+ });
37
+ }
38
+ };
39
+
40
+
41
+
42
+ exports.defaultLoadRouteModule = defaultLoadRouteModule;