react-router 0.0.0-experimental-e0b6ce9 → 0.0.0-experimental-de3b900

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 (76) hide show
  1. package/CHANGELOG.md +105 -0
  2. package/dist/development/browser-B4aBBnx8.d.ts +310 -0
  3. package/dist/development/browser-CN2w9Cbu.d.mts +310 -0
  4. package/dist/development/{chunk-4FI4BC6Y.mjs → chunk-5VDQAMOM.mjs} +181 -873
  5. package/dist/development/chunk-JEIV2ESS.js +1308 -0
  6. package/dist/development/{chunk-INO4IHBF.js → chunk-K3XLKYJI.js} +892 -409
  7. package/dist/development/{chunk-F6CT5MEB.mjs → chunk-OVO62ONG.mjs} +31 -314
  8. package/dist/development/chunk-UPBUMW2M.js +188 -0
  9. package/dist/development/dom-export.d.mts +51 -61
  10. package/dist/development/dom-export.d.ts +51 -60
  11. package/dist/development/dom-export.js +705 -23
  12. package/dist/development/dom-export.mjs +689 -14
  13. package/dist/{production/index-react-server-client-CYIi6gi0.d.mts → development/index-react-server-client-BOJoTiaG.d.ts} +76 -140
  14. package/dist/development/{index-react-server-client-CYIi6gi0.d.mts → index-react-server-client-CuQLmpku.d.mts} +76 -140
  15. package/dist/development/index-react-server-client.d.mts +2 -3
  16. package/dist/development/index-react-server-client.d.ts +2 -3
  17. package/dist/development/index-react-server-client.js +4 -4
  18. package/dist/development/index-react-server-client.mjs +2 -2
  19. package/dist/development/index-react-server.d.mts +1 -90
  20. package/dist/development/index-react-server.d.ts +1 -90
  21. package/dist/development/index-react-server.js +9 -188
  22. package/dist/development/index-react-server.mjs +9 -188
  23. package/dist/development/index.d.mts +21 -320
  24. package/dist/development/index.d.ts +21 -364
  25. package/dist/development/index.js +131 -977
  26. package/dist/development/index.mjs +5 -9
  27. package/dist/development/lib/types/internal.d.mts +2 -3
  28. package/dist/development/lib/types/internal.d.ts +2 -3
  29. package/dist/development/lib/types/internal.js +1 -1
  30. package/dist/development/lib/types/internal.mjs +1 -1
  31. package/dist/{production/register-DiOIlEq5.d.mts → development/register-BblEgJPm.d.mts} +7 -1
  32. package/dist/development/{register-DiOIlEq5.d.ts → register-D18raRVf.d.ts} +7 -1
  33. package/dist/development/{router-DWv6Clt-.d.mts → route-data-nQS6GSUI.d.mts} +1265 -932
  34. package/dist/development/{routeModules-DqotkItD.d.ts → routeModules-9wlxglVk.d.ts} +1047 -74
  35. package/dist/production/browser-B4aBBnx8.d.ts +310 -0
  36. package/dist/production/browser-CN2w9Cbu.d.mts +310 -0
  37. package/dist/production/{chunk-K7VXYOZD.js → chunk-63YB5VLY.js} +892 -409
  38. package/dist/production/chunk-IE722GR6.js +188 -0
  39. package/dist/production/{chunk-LKSLGWXX.mjs → chunk-U25H5FTL.mjs} +31 -314
  40. package/dist/production/chunk-VX4OHTGR.js +1308 -0
  41. package/dist/production/{chunk-52MYED7O.mjs → chunk-XOCFS75J.mjs} +181 -873
  42. package/dist/production/dom-export.d.mts +51 -61
  43. package/dist/production/dom-export.d.ts +51 -60
  44. package/dist/production/dom-export.js +705 -23
  45. package/dist/production/dom-export.mjs +689 -14
  46. package/dist/production/{index-react-server-client-ChBGplLn.d.ts → index-react-server-client-BOJoTiaG.d.ts} +76 -140
  47. package/dist/{development/index-react-server-client-ChBGplLn.d.ts → production/index-react-server-client-CuQLmpku.d.mts} +76 -140
  48. package/dist/production/index-react-server-client.d.mts +2 -3
  49. package/dist/production/index-react-server-client.d.ts +2 -3
  50. package/dist/production/index-react-server-client.js +4 -4
  51. package/dist/production/index-react-server-client.mjs +2 -2
  52. package/dist/production/index-react-server.d.mts +1 -90
  53. package/dist/production/index-react-server.d.ts +1 -90
  54. package/dist/production/index-react-server.js +9 -188
  55. package/dist/production/index-react-server.mjs +9 -188
  56. package/dist/production/index.d.mts +21 -320
  57. package/dist/production/index.d.ts +21 -364
  58. package/dist/production/index.js +131 -977
  59. package/dist/production/index.mjs +5 -9
  60. package/dist/production/lib/types/internal.d.mts +2 -3
  61. package/dist/production/lib/types/internal.d.ts +2 -3
  62. package/dist/production/lib/types/internal.js +1 -1
  63. package/dist/production/lib/types/internal.mjs +1 -1
  64. package/dist/{development/register-DiOIlEq5.d.mts → production/register-BblEgJPm.d.mts} +7 -1
  65. package/dist/production/{register-DiOIlEq5.d.ts → register-D18raRVf.d.ts} +7 -1
  66. package/dist/production/{router-DWv6Clt-.d.mts → route-data-nQS6GSUI.d.mts} +1265 -932
  67. package/dist/production/{routeModules-DqotkItD.d.ts → routeModules-9wlxglVk.d.ts} +1047 -74
  68. package/package.json +1 -1
  69. package/dist/development/browser-z32v5KVN.d.mts +0 -46
  70. package/dist/development/chunk-ITZFCV4J.js +0 -2092
  71. package/dist/development/instrumentation-BGrNA7uj.d.ts +0 -1122
  72. package/dist/development/routeModules-Cy4Xsfoi.d.mts +0 -483
  73. package/dist/production/browser-z32v5KVN.d.mts +0 -46
  74. package/dist/production/chunk-DASXXYNZ.js +0 -2092
  75. package/dist/production/instrumentation-BGrNA7uj.d.ts +0 -1122
  76. package/dist/production/routeModules-Cy4Xsfoi.d.mts +0 -483
@@ -1,33 +1,59 @@
1
- import { d as RouteModules, H as HydrationState, D as DataRouteObject, r as ClientLoaderFunction, z as StaticHandlerContext, aN as ServerRouteModule, A as AppLoadContext, h as RelativeRoutingType, au as PageLinkDescriptor, y as GetScrollRestorationKeyFunction, t as RouterInit, aO as FutureConfig$1, v as PatchRoutesOnNavigationFunction, e as NavigateOptions, J as Fetcher, j as RouteObject, c as Router, g as SerializeFrom, B as BlockerFunction, aP as CreateStaticHandlerOptions$1, w as StaticHandler } from './routeModules-DqotkItD.js';
1
+ import { by as RouteManifest, bz as ServerRouteModule, Y as MiddlewareEnabled, c as RouterContextProvider, X as AppLoadContext, ak as LoaderFunctionArgs, ab as ActionFunctionArgs, o as RouteModules, a4 as StaticHandlerContext, J as HydrationState, a0 as DataRouteObject, a as ClientLoaderFunction, ai as HTMLFormMethod, ag as FormEncType, t as RelativeRoutingType, bb as PageLinkDescriptor, T as To, bA as History, a3 as GetScrollRestorationKeyFunction, e as RouterInit, bB as FutureConfig$1, p as DataStrategyFunction, $ as PatchRoutesOnNavigationFunction, q as NavigateOptions, a5 as Fetcher, E as RouteObject, n as Router, s as SerializeFrom, B as BlockerFunction, L as Location, bC as CreateStaticHandlerOptions$1, a1 as StaticHandler } from './routeModules-9wlxglVk.js';
2
2
  import * as React from 'react';
3
- import { af as RouteManifest, t as MiddlewareEnabled, R as RouterContextProvider, w as LoaderFunctionArgs, v as ActionFunctionArgs, j as unstable_ServerInstrumentation, i as HTMLFormMethod, F as FormEncType, T as To, H as History, u as unstable_ClientInstrumentation, f as DataStrategyFunction, L as Location } from './instrumentation-BGrNA7uj.js';
4
3
 
5
- interface Route {
6
- index?: boolean;
7
- caseSensitive?: boolean;
8
- id: string;
9
- parentId?: string;
10
- path?: string;
4
+ type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
5
+ interface ServerRoute extends Route {
6
+ children: ServerRoute[];
7
+ module: ServerRouteModule;
11
8
  }
12
- interface EntryRoute extends Route {
13
- hasAction: boolean;
14
- hasLoader: boolean;
15
- hasClientAction: boolean;
16
- hasClientLoader: boolean;
17
- hasClientMiddleware: boolean;
18
- hasErrorBoundary: boolean;
19
- imports?: string[];
20
- css?: string[];
21
- module: string;
22
- clientActionModule: string | undefined;
23
- clientLoaderModule: string | undefined;
24
- clientMiddlewareModule: string | undefined;
25
- hydrateFallbackModule: string | undefined;
26
- parentId?: string;
9
+
10
+ type OptionalCriticalCss = CriticalCss | undefined;
11
+ /**
12
+ * The output of the compiler for the server build.
13
+ */
14
+ interface ServerBuild {
15
+ entry: {
16
+ module: ServerEntryModule;
17
+ };
18
+ routes: ServerRouteManifest;
19
+ assets: AssetsManifest;
20
+ basename?: string;
21
+ publicPath: string;
22
+ assetsBuildDirectory: string;
23
+ future: FutureConfig;
24
+ ssr: boolean;
25
+ unstable_getCriticalCss?: (args: {
26
+ pathname: string;
27
+ }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
28
+ /**
29
+ * @deprecated This is now done via a custom header during prerendering
30
+ */
31
+ isSpaMode: boolean;
32
+ prerender: string[];
33
+ routeDiscovery: {
34
+ mode: "lazy" | "initial";
35
+ manifestPath: string;
36
+ };
37
+ }
38
+ interface HandleDocumentRequestFunction {
39
+ (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
40
+ }
41
+ interface HandleDataRequestFunction {
42
+ (response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
43
+ }
44
+ interface HandleErrorFunction {
45
+ (error: unknown, args: LoaderFunctionArgs | ActionFunctionArgs): void;
46
+ }
47
+ /**
48
+ * A module that serves as the entry point for a Remix app during server
49
+ * rendering.
50
+ */
51
+ interface ServerEntryModule {
52
+ default: HandleDocumentRequestFunction;
53
+ handleDataRequest?: HandleDataRequestFunction;
54
+ handleError?: HandleErrorFunction;
55
+ streamTimeout?: number;
27
56
  }
28
- declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
29
- declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
30
- declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
31
57
 
32
58
  type SerializedError = {
33
59
  message: string;
@@ -81,68 +107,32 @@ interface AssetsManifest {
81
107
  sri?: Record<string, string> | true;
82
108
  }
83
109
 
84
- type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
85
- interface ServerRoute extends Route {
86
- children: ServerRoute[];
87
- module: ServerRouteModule;
88
- }
89
-
90
- type OptionalCriticalCss = CriticalCss | undefined;
91
- /**
92
- * The output of the compiler for the server build.
93
- */
94
- interface ServerBuild {
95
- entry: {
96
- module: ServerEntryModule;
97
- };
98
- routes: ServerRouteManifest;
99
- assets: AssetsManifest;
100
- basename?: string;
101
- publicPath: string;
102
- assetsBuildDirectory: string;
103
- future: FutureConfig;
104
- ssr: boolean;
105
- unstable_getCriticalCss?: (args: {
106
- pathname: string;
107
- }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
108
- /**
109
- * @deprecated This is now done via a custom header during prerendering
110
- */
111
- isSpaMode: boolean;
112
- prerender: string[];
113
- routeDiscovery: {
114
- mode: "lazy" | "initial";
115
- manifestPath: string;
116
- };
117
- }
118
- interface HandleDocumentRequestFunction {
119
- (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
120
- }
121
- interface HandleDataRequestFunction {
122
- (response: Response, args: {
123
- request: LoaderFunctionArgs["request"] | ActionFunctionArgs["request"];
124
- context: LoaderFunctionArgs["context"] | ActionFunctionArgs["context"];
125
- params: LoaderFunctionArgs["params"] | ActionFunctionArgs["params"];
126
- }): Promise<Response> | Response;
127
- }
128
- interface HandleErrorFunction {
129
- (error: unknown, args: {
130
- request: LoaderFunctionArgs["request"] | ActionFunctionArgs["request"];
131
- context: LoaderFunctionArgs["context"] | ActionFunctionArgs["context"];
132
- params: LoaderFunctionArgs["params"] | ActionFunctionArgs["params"];
133
- }): void;
110
+ interface Route {
111
+ index?: boolean;
112
+ caseSensitive?: boolean;
113
+ id: string;
114
+ parentId?: string;
115
+ path?: string;
134
116
  }
135
- /**
136
- * A module that serves as the entry point for a Remix app during server
137
- * rendering.
138
- */
139
- interface ServerEntryModule {
140
- default: HandleDocumentRequestFunction;
141
- handleDataRequest?: HandleDataRequestFunction;
142
- handleError?: HandleErrorFunction;
143
- unstable_instrumentations?: unstable_ServerInstrumentation[];
144
- streamTimeout?: number;
117
+ interface EntryRoute extends Route {
118
+ hasAction: boolean;
119
+ hasLoader: boolean;
120
+ hasClientAction: boolean;
121
+ hasClientLoader: boolean;
122
+ hasClientMiddleware: boolean;
123
+ hasErrorBoundary: boolean;
124
+ imports?: string[];
125
+ css?: string[];
126
+ module: string;
127
+ clientActionModule: string | undefined;
128
+ clientLoaderModule: string | undefined;
129
+ clientMiddlewareModule: string | undefined;
130
+ hydrateFallbackModule: string | undefined;
131
+ parentId?: string;
145
132
  }
133
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
134
+ declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
135
+ declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
146
136
 
147
137
  type ParamKeyValuePair = [string, string];
148
138
  type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
@@ -531,58 +521,6 @@ interface DOMRouterOpts {
531
521
  * ```
532
522
  */
533
523
  hydrationData?: HydrationState;
534
- /**
535
- * Array of instrumentation objects allowing you to instrument the router and
536
- * individual routes prior to router initialization (and on any subsequently
537
- * added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
538
- * mostly useful for observability such as wrapping navigations, fetches,
539
- * as well as route loaders/actions/middlewares with logging and/or performance
540
- * tracing.
541
- *
542
- * ```tsx
543
- * let router = createBrowserRouter(routes, {
544
- * unstable_instrumentations: [logging]
545
- * });
546
- *
547
- *
548
- * let logging = {
549
- * router({ instrument }) {
550
- * instrument({
551
- * navigate: (impl, info) => logExecution(`navigate ${info.to}`, impl),
552
- * fetch: (impl, info) => logExecution(`fetch ${info.to}`, impl)
553
- * });
554
- * },
555
- * route({ instrument, id }) {
556
- * instrument({
557
- * middleware: (impl, info) => logExecution(
558
- * `middleware ${info.request.url} (route ${id})`,
559
- * impl
560
- * ),
561
- * loader: (impl, info) => logExecution(
562
- * `loader ${info.request.url} (route ${id})`,
563
- * impl
564
- * ),
565
- * action: (impl, info) => logExecution(
566
- * `action ${info.request.url} (route ${id})`,
567
- * impl
568
- * ),
569
- * })
570
- * }
571
- * };
572
- *
573
- * async function logExecution(label: string, impl: () => Promise<void>) {
574
- * let start = performance.now();
575
- * console.log(`start ${label}`);
576
- * try {
577
- * await impl();
578
- * } finally {
579
- * let end = performance.now();
580
- * console.log(`end ${label} (${Math.round(end - start)}ms)`);
581
- * }
582
- * }
583
- * ```
584
- */
585
- unstable_instrumentations?: unstable_ClientInstrumentation[];
586
524
  /**
587
525
  * Override the default data strategy of running loaders in parallel.
588
526
  * See {@link DataStrategyFunction}.
@@ -1088,7 +1026,6 @@ interface DOMRouterOpts {
1088
1026
  * @param {DOMRouterOpts.future} opts.future n/a
1089
1027
  * @param {DOMRouterOpts.getContext} opts.getContext n/a
1090
1028
  * @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
1091
- * @param {DOMRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
1092
1029
  * @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
1093
1030
  * @param {DOMRouterOpts.window} opts.window n/a
1094
1031
  * @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}
@@ -1107,7 +1044,6 @@ declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts
1107
1044
  * @param {DOMRouterOpts.future} opts.future n/a
1108
1045
  * @param {DOMRouterOpts.getContext} opts.getContext n/a
1109
1046
  * @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
1110
- * @param {DOMRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
1111
1047
  * @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
1112
1048
  * @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
1113
1049
  * @param {DOMRouterOpts.window} opts.window n/a
@@ -1,33 +1,59 @@
1
- import { d as RouteModules, H as HydrationState, D as DataRouteObject, r as ClientLoaderFunction, z as StaticHandlerContext, aN as ServerRouteModule, A as AppLoadContext, h as RelativeRoutingType, au as PageLinkDescriptor, y as GetScrollRestorationKeyFunction, t as RouterInit, aO as FutureConfig$1, v as PatchRoutesOnNavigationFunction, e as NavigateOptions, J as Fetcher, j as RouteObject, c as Router, g as SerializeFrom, B as BlockerFunction, aP as CreateStaticHandlerOptions$1, w as StaticHandler } from './routeModules-DqotkItD.js';
1
+ import { by as RouteManifest, bz as ServerRouteModule, _ as MiddlewareEnabled, c as RouterContextProvider, Z as AppLoadContext, am as LoaderFunctionArgs, ad as ActionFunctionArgs, p as RouteModules, a6 as StaticHandlerContext, O as HydrationState, a2 as DataRouteObject, a as ClientLoaderFunction, ak as HTMLFormMethod, ai as FormEncType, v as RelativeRoutingType, bb as PageLinkDescriptor, T as To, bA as History, a5 as GetScrollRestorationKeyFunction, e as RouterInit, bB as FutureConfig$1, q as DataStrategyFunction, a1 as PatchRoutesOnNavigationFunction, r as NavigateOptions, a7 as Fetcher, J as RouteObject, o as Router, t as SerializeFrom, B as BlockerFunction, L as Location, bC as CreateStaticHandlerOptions$1, a3 as StaticHandler } from './route-data-nQS6GSUI.mjs';
2
2
  import * as React from 'react';
3
- import { af as RouteManifest, t as MiddlewareEnabled, R as RouterContextProvider, w as LoaderFunctionArgs, v as ActionFunctionArgs, j as unstable_ServerInstrumentation, i as HTMLFormMethod, F as FormEncType, T as To, H as History, u as unstable_ClientInstrumentation, f as DataStrategyFunction, L as Location } from './instrumentation-BGrNA7uj.js';
4
3
 
5
- interface Route {
6
- index?: boolean;
7
- caseSensitive?: boolean;
8
- id: string;
9
- parentId?: string;
10
- path?: string;
4
+ type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
5
+ interface ServerRoute extends Route {
6
+ children: ServerRoute[];
7
+ module: ServerRouteModule;
11
8
  }
12
- interface EntryRoute extends Route {
13
- hasAction: boolean;
14
- hasLoader: boolean;
15
- hasClientAction: boolean;
16
- hasClientLoader: boolean;
17
- hasClientMiddleware: boolean;
18
- hasErrorBoundary: boolean;
19
- imports?: string[];
20
- css?: string[];
21
- module: string;
22
- clientActionModule: string | undefined;
23
- clientLoaderModule: string | undefined;
24
- clientMiddlewareModule: string | undefined;
25
- hydrateFallbackModule: string | undefined;
26
- parentId?: string;
9
+
10
+ type OptionalCriticalCss = CriticalCss | undefined;
11
+ /**
12
+ * The output of the compiler for the server build.
13
+ */
14
+ interface ServerBuild {
15
+ entry: {
16
+ module: ServerEntryModule;
17
+ };
18
+ routes: ServerRouteManifest;
19
+ assets: AssetsManifest;
20
+ basename?: string;
21
+ publicPath: string;
22
+ assetsBuildDirectory: string;
23
+ future: FutureConfig;
24
+ ssr: boolean;
25
+ unstable_getCriticalCss?: (args: {
26
+ pathname: string;
27
+ }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
28
+ /**
29
+ * @deprecated This is now done via a custom header during prerendering
30
+ */
31
+ isSpaMode: boolean;
32
+ prerender: string[];
33
+ routeDiscovery: {
34
+ mode: "lazy" | "initial";
35
+ manifestPath: string;
36
+ };
37
+ }
38
+ interface HandleDocumentRequestFunction {
39
+ (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
40
+ }
41
+ interface HandleDataRequestFunction {
42
+ (response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
43
+ }
44
+ interface HandleErrorFunction {
45
+ (error: unknown, args: LoaderFunctionArgs | ActionFunctionArgs): void;
46
+ }
47
+ /**
48
+ * A module that serves as the entry point for a Remix app during server
49
+ * rendering.
50
+ */
51
+ interface ServerEntryModule {
52
+ default: HandleDocumentRequestFunction;
53
+ handleDataRequest?: HandleDataRequestFunction;
54
+ handleError?: HandleErrorFunction;
55
+ streamTimeout?: number;
27
56
  }
28
- declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
29
- declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
30
- declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
31
57
 
32
58
  type SerializedError = {
33
59
  message: string;
@@ -81,68 +107,32 @@ interface AssetsManifest {
81
107
  sri?: Record<string, string> | true;
82
108
  }
83
109
 
84
- type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
85
- interface ServerRoute extends Route {
86
- children: ServerRoute[];
87
- module: ServerRouteModule;
88
- }
89
-
90
- type OptionalCriticalCss = CriticalCss | undefined;
91
- /**
92
- * The output of the compiler for the server build.
93
- */
94
- interface ServerBuild {
95
- entry: {
96
- module: ServerEntryModule;
97
- };
98
- routes: ServerRouteManifest;
99
- assets: AssetsManifest;
100
- basename?: string;
101
- publicPath: string;
102
- assetsBuildDirectory: string;
103
- future: FutureConfig;
104
- ssr: boolean;
105
- unstable_getCriticalCss?: (args: {
106
- pathname: string;
107
- }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
108
- /**
109
- * @deprecated This is now done via a custom header during prerendering
110
- */
111
- isSpaMode: boolean;
112
- prerender: string[];
113
- routeDiscovery: {
114
- mode: "lazy" | "initial";
115
- manifestPath: string;
116
- };
117
- }
118
- interface HandleDocumentRequestFunction {
119
- (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
120
- }
121
- interface HandleDataRequestFunction {
122
- (response: Response, args: {
123
- request: LoaderFunctionArgs["request"] | ActionFunctionArgs["request"];
124
- context: LoaderFunctionArgs["context"] | ActionFunctionArgs["context"];
125
- params: LoaderFunctionArgs["params"] | ActionFunctionArgs["params"];
126
- }): Promise<Response> | Response;
127
- }
128
- interface HandleErrorFunction {
129
- (error: unknown, args: {
130
- request: LoaderFunctionArgs["request"] | ActionFunctionArgs["request"];
131
- context: LoaderFunctionArgs["context"] | ActionFunctionArgs["context"];
132
- params: LoaderFunctionArgs["params"] | ActionFunctionArgs["params"];
133
- }): void;
110
+ interface Route {
111
+ index?: boolean;
112
+ caseSensitive?: boolean;
113
+ id: string;
114
+ parentId?: string;
115
+ path?: string;
134
116
  }
135
- /**
136
- * A module that serves as the entry point for a Remix app during server
137
- * rendering.
138
- */
139
- interface ServerEntryModule {
140
- default: HandleDocumentRequestFunction;
141
- handleDataRequest?: HandleDataRequestFunction;
142
- handleError?: HandleErrorFunction;
143
- unstable_instrumentations?: unstable_ServerInstrumentation[];
144
- streamTimeout?: number;
117
+ interface EntryRoute extends Route {
118
+ hasAction: boolean;
119
+ hasLoader: boolean;
120
+ hasClientAction: boolean;
121
+ hasClientLoader: boolean;
122
+ hasClientMiddleware: boolean;
123
+ hasErrorBoundary: boolean;
124
+ imports?: string[];
125
+ css?: string[];
126
+ module: string;
127
+ clientActionModule: string | undefined;
128
+ clientLoaderModule: string | undefined;
129
+ clientMiddlewareModule: string | undefined;
130
+ hydrateFallbackModule: string | undefined;
131
+ parentId?: string;
145
132
  }
133
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
134
+ declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
135
+ declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
146
136
 
147
137
  type ParamKeyValuePair = [string, string];
148
138
  type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
@@ -531,58 +521,6 @@ interface DOMRouterOpts {
531
521
  * ```
532
522
  */
533
523
  hydrationData?: HydrationState;
534
- /**
535
- * Array of instrumentation objects allowing you to instrument the router and
536
- * individual routes prior to router initialization (and on any subsequently
537
- * added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
538
- * mostly useful for observability such as wrapping navigations, fetches,
539
- * as well as route loaders/actions/middlewares with logging and/or performance
540
- * tracing.
541
- *
542
- * ```tsx
543
- * let router = createBrowserRouter(routes, {
544
- * unstable_instrumentations: [logging]
545
- * });
546
- *
547
- *
548
- * let logging = {
549
- * router({ instrument }) {
550
- * instrument({
551
- * navigate: (impl, info) => logExecution(`navigate ${info.to}`, impl),
552
- * fetch: (impl, info) => logExecution(`fetch ${info.to}`, impl)
553
- * });
554
- * },
555
- * route({ instrument, id }) {
556
- * instrument({
557
- * middleware: (impl, info) => logExecution(
558
- * `middleware ${info.request.url} (route ${id})`,
559
- * impl
560
- * ),
561
- * loader: (impl, info) => logExecution(
562
- * `loader ${info.request.url} (route ${id})`,
563
- * impl
564
- * ),
565
- * action: (impl, info) => logExecution(
566
- * `action ${info.request.url} (route ${id})`,
567
- * impl
568
- * ),
569
- * })
570
- * }
571
- * };
572
- *
573
- * async function logExecution(label: string, impl: () => Promise<void>) {
574
- * let start = performance.now();
575
- * console.log(`start ${label}`);
576
- * try {
577
- * await impl();
578
- * } finally {
579
- * let end = performance.now();
580
- * console.log(`end ${label} (${Math.round(end - start)}ms)`);
581
- * }
582
- * }
583
- * ```
584
- */
585
- unstable_instrumentations?: unstable_ClientInstrumentation[];
586
524
  /**
587
525
  * Override the default data strategy of running loaders in parallel.
588
526
  * See {@link DataStrategyFunction}.
@@ -1088,7 +1026,6 @@ interface DOMRouterOpts {
1088
1026
  * @param {DOMRouterOpts.future} opts.future n/a
1089
1027
  * @param {DOMRouterOpts.getContext} opts.getContext n/a
1090
1028
  * @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
1091
- * @param {DOMRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
1092
1029
  * @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
1093
1030
  * @param {DOMRouterOpts.window} opts.window n/a
1094
1031
  * @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}
@@ -1107,7 +1044,6 @@ declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts
1107
1044
  * @param {DOMRouterOpts.future} opts.future n/a
1108
1045
  * @param {DOMRouterOpts.getContext} opts.getContext n/a
1109
1046
  * @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
1110
- * @param {DOMRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
1111
1047
  * @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
1112
1048
  * @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
1113
1049
  * @param {DOMRouterOpts.window} opts.window n/a
@@ -1,4 +1,3 @@
1
- export { aJ as MemoryRouter, aK as Navigate, aL as Outlet, aM as Route, aN as Router, aO as RouterProvider, aP as Routes, aw as UNSAFE_AwaitContextProvider, b6 as UNSAFE_WithComponentProps, ba as UNSAFE_WithErrorBoundaryProps, b8 as UNSAFE_WithHydrateFallbackProps } from './router-DWv6Clt-.mjs';
2
- export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-CYIi6gi0.mjs';
1
+ export { aY as MemoryRouter, aZ as Navigate, a_ as Outlet, a$ as Route, b0 as Router, b1 as RouterProvider, b2 as Routes, aL as UNSAFE_AwaitContextProvider, bs as UNSAFE_WithComponentProps, bw as UNSAFE_WithErrorBoundaryProps, bu as UNSAFE_WithHydrateFallbackProps } from './route-data-nQS6GSUI.mjs';
2
+ export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-CuQLmpku.mjs';
3
3
  import 'react';
4
- import './routeModules-Cy4Xsfoi.mjs';
@@ -1,4 +1,3 @@
1
- export { af as MemoryRouter, ag as Navigate, ah as Outlet, ai as Route, aj as Router, ak as RouterProvider, al as Routes, a0 as UNSAFE_AwaitContextProvider, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps } from './routeModules-DqotkItD.js';
2
- export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-ChBGplLn.js';
1
+ export { aY as MemoryRouter, aZ as Navigate, a_ as Outlet, a$ as Route, b0 as Router, b1 as RouterProvider, b2 as Routes, aJ as UNSAFE_AwaitContextProvider, bs as UNSAFE_WithComponentProps, bw as UNSAFE_WithErrorBoundaryProps, bu as UNSAFE_WithHydrateFallbackProps } from './routeModules-9wlxglVk.js';
2
+ export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-BOJoTiaG.js';
3
3
  import 'react';
4
- import './instrumentation-BGrNA7uj.js';
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * react-router v0.0.0-experimental-e0b6ce9
2
+ * react-router v0.0.0-experimental-de3b900
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -19,6 +19,7 @@
19
19
 
20
20
 
21
21
 
22
+ var _chunkVX4OHTGRjs = require('./chunk-VX4OHTGR.js');
22
23
 
23
24
 
24
25
 
@@ -29,12 +30,11 @@
29
30
 
30
31
 
31
32
 
32
- var _chunkDASXXYNZjs = require('./chunk-DASXXYNZ.js');
33
33
 
34
34
 
35
35
 
36
36
 
37
- var _chunkK7VXYOZDjs = require('./chunk-K7VXYOZD.js');
37
+ var _chunk63YB5VLYjs = require('./chunk-63YB5VLY.js');
38
38
 
39
39
 
40
40
 
@@ -58,4 +58,4 @@ var _chunkK7VXYOZDjs = require('./chunk-K7VXYOZD.js');
58
58
 
59
59
 
60
60
 
61
- exports.BrowserRouter = _chunkDASXXYNZjs.BrowserRouter; exports.Form = _chunkDASXXYNZjs.Form; exports.HashRouter = _chunkDASXXYNZjs.HashRouter; exports.Link = _chunkDASXXYNZjs.Link; exports.Links = _chunkK7VXYOZDjs.Links; exports.MemoryRouter = _chunkDASXXYNZjs.MemoryRouter; exports.Meta = _chunkK7VXYOZDjs.Meta; exports.NavLink = _chunkDASXXYNZjs.NavLink; exports.Navigate = _chunkDASXXYNZjs.Navigate; exports.Outlet = _chunkDASXXYNZjs.Outlet; exports.Route = _chunkDASXXYNZjs.Route; exports.Router = _chunkDASXXYNZjs.Router; exports.RouterProvider = _chunkDASXXYNZjs.RouterProvider; exports.Routes = _chunkDASXXYNZjs.Routes; exports.ScrollRestoration = _chunkDASXXYNZjs.ScrollRestoration; exports.StaticRouter = _chunkDASXXYNZjs.StaticRouter; exports.StaticRouterProvider = _chunkDASXXYNZjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkK7VXYOZDjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkDASXXYNZjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkDASXXYNZjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkDASXXYNZjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkDASXXYNZjs.HistoryRouter;
61
+ exports.BrowserRouter = _chunkVX4OHTGRjs.BrowserRouter; exports.Form = _chunkVX4OHTGRjs.Form; exports.HashRouter = _chunkVX4OHTGRjs.HashRouter; exports.Link = _chunkVX4OHTGRjs.Link; exports.Links = _chunk63YB5VLYjs.Links; exports.MemoryRouter = _chunk63YB5VLYjs.MemoryRouter; exports.Meta = _chunk63YB5VLYjs.Meta; exports.NavLink = _chunkVX4OHTGRjs.NavLink; exports.Navigate = _chunk63YB5VLYjs.Navigate; exports.Outlet = _chunk63YB5VLYjs.Outlet; exports.Route = _chunk63YB5VLYjs.Route; exports.Router = _chunk63YB5VLYjs.Router; exports.RouterProvider = _chunk63YB5VLYjs.RouterProvider; exports.Routes = _chunk63YB5VLYjs.Routes; exports.ScrollRestoration = _chunkVX4OHTGRjs.ScrollRestoration; exports.StaticRouter = _chunkVX4OHTGRjs.StaticRouter; exports.StaticRouterProvider = _chunkVX4OHTGRjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk63YB5VLYjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunk63YB5VLYjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk63YB5VLYjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk63YB5VLYjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkVX4OHTGRjs.HistoryRouter;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-e0b6ce9
2
+ * react-router v0.0.0-experimental-de3b900
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -32,7 +32,7 @@ import {
32
32
  WithComponentProps,
33
33
  WithErrorBoundaryProps,
34
34
  WithHydrateFallbackProps
35
- } from "./chunk-LKSLGWXX.mjs";
35
+ } from "./chunk-U25H5FTL.mjs";
36
36
  export {
37
37
  BrowserRouter,
38
38
  Form,