react-router 0.0.0-experimental-a65d6f5 → 0.0.0-experimental-c19b79d
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.
- package/dist/development/{chunk-ZLVXSGFL.js → chunk-2G2U5HGB.js} +161 -164
- package/dist/development/{chunk-CWSJ6RYI.mjs → chunk-AGOH44BE.mjs} +51 -67
- package/dist/development/{chunk-47MIYFLC.mjs → chunk-IMKEG5CI.mjs} +29 -309
- package/dist/development/{chunk-QOFB7XZ5.js → chunk-LUB73E44.js} +70 -347
- package/dist/development/{router-DQIRhYoj.d.mts → context-BqL5Eckq.d.mts} +1288 -1441
- package/dist/development/dom-export.d.mts +4 -59
- package/dist/development/dom-export.d.ts +3 -59
- package/dist/development/dom-export.js +5 -8
- package/dist/development/dom-export.mjs +5 -8
- package/dist/{production/index-react-server-client-lf74v6ET.d.mts → development/index-react-server-client-2EDmGlsZ.d.mts} +77 -140
- package/dist/development/{index-react-server-client-lf74v6ET.d.mts → index-react-server-client-DKvU8YRr.d.ts} +134 -198
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +2 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +1 -106
- package/dist/development/index-react-server.d.ts +1 -106
- package/dist/development/index-react-server.js +8 -181
- package/dist/development/index-react-server.mjs +8 -181
- package/dist/development/index.d.mts +20 -13
- package/dist/development/index.d.ts +18 -13
- package/dist/development/index.js +147 -161
- package/dist/development/index.mjs +5 -3
- package/dist/development/lib/types/internal.d.mts +3 -3
- package/dist/development/lib/types/internal.d.ts +2 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-DiOIlEq5.d.mts → register-BrVEYTED.d.mts} +7 -1
- package/dist/{production/register-DiOIlEq5.d.mts → development/register-D8NQoPsO.d.ts} +7 -1
- package/dist/development/{routeModules--SgCTStn.d.mts → route-data-CDwqkzPE.d.mts} +147 -157
- package/dist/{production/routeModules-rxNxBmdR.d.ts → development/routeModules-BmVo7q9e.d.ts} +1046 -73
- package/dist/production/{chunk-ZOHTOBOT.js → chunk-2L5AG5Y5.js} +70 -347
- package/dist/production/{chunk-UAAA7FTX.mjs → chunk-AODJW4D3.mjs} +51 -67
- package/dist/production/{chunk-4SPSFXAZ.js → chunk-FGRCWJDI.js} +161 -164
- package/dist/production/{chunk-MMAHTIVZ.mjs → chunk-UOQCOPF6.mjs} +29 -309
- package/dist/production/{router-DQIRhYoj.d.mts → context-BqL5Eckq.d.mts} +1288 -1441
- package/dist/production/dom-export.d.mts +4 -59
- package/dist/production/dom-export.d.ts +3 -59
- package/dist/production/dom-export.js +5 -8
- package/dist/production/dom-export.mjs +5 -8
- package/dist/{development/index-react-server-client-Iw2PMej2.d.ts → production/index-react-server-client-2EDmGlsZ.d.mts} +77 -140
- package/dist/production/{index-react-server-client-Iw2PMej2.d.ts → index-react-server-client-DKvU8YRr.d.ts} +134 -198
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +2 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +1 -106
- package/dist/production/index-react-server.d.ts +1 -106
- package/dist/production/index-react-server.js +8 -181
- package/dist/production/index-react-server.mjs +8 -181
- package/dist/production/index.d.mts +20 -13
- package/dist/production/index.d.ts +18 -13
- package/dist/production/index.js +147 -161
- package/dist/production/index.mjs +5 -3
- package/dist/production/lib/types/internal.d.mts +3 -3
- package/dist/production/lib/types/internal.d.ts +2 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-DiOIlEq5.d.ts → production/register-BrVEYTED.d.mts} +7 -1
- package/dist/production/{register-DiOIlEq5.d.ts → register-D8NQoPsO.d.ts} +7 -1
- package/dist/production/{routeModules--SgCTStn.d.mts → route-data-CDwqkzPE.d.mts} +147 -157
- package/dist/{development/routeModules-rxNxBmdR.d.ts → production/routeModules-BmVo7q9e.d.ts} +1046 -73
- package/package.json +1 -1
- package/dist/development/instrumentation-BWRz1MRU.d.ts +0 -1138
- package/dist/production/instrumentation-BWRz1MRU.d.ts +0 -1138
|
@@ -1,148 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ai as HTMLFormMethod, ag as FormEncType, k as RelativeRoutingType, by as RouteManifest, bz as ServerRouteModule, O as MiddlewareEnabled, K as RouterContextProvider, J as AppLoadContext, ak as LoaderFunctionArgs, ab as ActionFunctionArgs, f as RouteModules, H as HydrationState, a0 as DataRouteObject, W as ClientLoaderFunction, a4 as StaticHandlerContext, bb as PageLinkDescriptor, T as To, bA as History, a3 as GetScrollRestorationKeyFunction, Z as RouterInit, bB as FutureConfig$1, g as DataStrategyFunction, $ as PatchRoutesOnNavigationFunction, h as NavigateOptions, a5 as Fetcher, r as RouteObject, e as Router, j as SerializeFrom, B as BlockerFunction, a as Location, bC as CreateStaticHandlerOptions$1, a1 as StaticHandler } from './routeModules-BmVo7q9e.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { c as RouteModules, h as ClientLoaderFunction, o as ServerRouteModule, A as AppLoadContext, m as PageLinkDescriptor, d as SerializeFrom } from './routeModules--SgCTStn.mjs';
|
|
4
|
-
|
|
5
|
-
interface Route {
|
|
6
|
-
index?: boolean;
|
|
7
|
-
caseSensitive?: boolean;
|
|
8
|
-
id: string;
|
|
9
|
-
parentId?: string;
|
|
10
|
-
path?: string;
|
|
11
|
-
}
|
|
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;
|
|
27
|
-
}
|
|
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
|
-
|
|
32
|
-
type SerializedError = {
|
|
33
|
-
message: string;
|
|
34
|
-
stack?: string;
|
|
35
|
-
};
|
|
36
|
-
interface FrameworkContextObject {
|
|
37
|
-
manifest: AssetsManifest;
|
|
38
|
-
routeModules: RouteModules;
|
|
39
|
-
criticalCss?: CriticalCss;
|
|
40
|
-
serverHandoffString?: string;
|
|
41
|
-
future: FutureConfig;
|
|
42
|
-
ssr: boolean;
|
|
43
|
-
isSpaMode: boolean;
|
|
44
|
-
routeDiscovery: ServerBuild["routeDiscovery"];
|
|
45
|
-
serializeError?(error: Error): SerializedError;
|
|
46
|
-
renderMeta?: {
|
|
47
|
-
didRenderScripts?: boolean;
|
|
48
|
-
streamCache?: Record<number, Promise<void> & {
|
|
49
|
-
result?: {
|
|
50
|
-
done: boolean;
|
|
51
|
-
value: string;
|
|
52
|
-
};
|
|
53
|
-
error?: unknown;
|
|
54
|
-
}>;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
interface EntryContext extends FrameworkContextObject {
|
|
58
|
-
staticHandlerContext: StaticHandlerContext;
|
|
59
|
-
serverHandoffStream?: ReadableStream<Uint8Array>;
|
|
60
|
-
}
|
|
61
|
-
interface FutureConfig {
|
|
62
|
-
unstable_subResourceIntegrity: boolean;
|
|
63
|
-
v8_middleware: boolean;
|
|
64
|
-
}
|
|
65
|
-
type CriticalCss = string | {
|
|
66
|
-
rel: "stylesheet";
|
|
67
|
-
href: string;
|
|
68
|
-
};
|
|
69
|
-
interface AssetsManifest {
|
|
70
|
-
entry: {
|
|
71
|
-
imports: string[];
|
|
72
|
-
module: string;
|
|
73
|
-
};
|
|
74
|
-
routes: RouteManifest<EntryRoute>;
|
|
75
|
-
url: string;
|
|
76
|
-
version: string;
|
|
77
|
-
hmr?: {
|
|
78
|
-
timestamp?: number;
|
|
79
|
-
runtime: string;
|
|
80
|
-
};
|
|
81
|
-
sri?: Record<string, string> | true;
|
|
82
|
-
}
|
|
83
|
-
|
|
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;
|
|
134
|
-
}
|
|
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;
|
|
145
|
-
}
|
|
146
3
|
|
|
147
4
|
type ParamKeyValuePair = [string, string];
|
|
148
5
|
type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
|
|
@@ -250,6 +107,139 @@ interface SubmitOptions extends FetcherSubmitOptions {
|
|
|
250
107
|
viewTransition?: boolean;
|
|
251
108
|
}
|
|
252
109
|
|
|
110
|
+
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
111
|
+
interface ServerRoute extends Route {
|
|
112
|
+
children: ServerRoute[];
|
|
113
|
+
module: ServerRouteModule;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
type OptionalCriticalCss = CriticalCss | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* The output of the compiler for the server build.
|
|
119
|
+
*/
|
|
120
|
+
interface ServerBuild {
|
|
121
|
+
entry: {
|
|
122
|
+
module: ServerEntryModule;
|
|
123
|
+
};
|
|
124
|
+
routes: ServerRouteManifest;
|
|
125
|
+
assets: AssetsManifest;
|
|
126
|
+
basename?: string;
|
|
127
|
+
publicPath: string;
|
|
128
|
+
assetsBuildDirectory: string;
|
|
129
|
+
future: FutureConfig;
|
|
130
|
+
ssr: boolean;
|
|
131
|
+
unstable_getCriticalCss?: (args: {
|
|
132
|
+
pathname: string;
|
|
133
|
+
}) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated This is now done via a custom header during prerendering
|
|
136
|
+
*/
|
|
137
|
+
isSpaMode: boolean;
|
|
138
|
+
prerender: string[];
|
|
139
|
+
routeDiscovery: {
|
|
140
|
+
mode: "lazy" | "initial";
|
|
141
|
+
manifestPath: string;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
interface HandleDocumentRequestFunction {
|
|
145
|
+
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
|
|
146
|
+
}
|
|
147
|
+
interface HandleDataRequestFunction {
|
|
148
|
+
(response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
|
|
149
|
+
}
|
|
150
|
+
interface HandleErrorFunction {
|
|
151
|
+
(error: unknown, args: LoaderFunctionArgs | ActionFunctionArgs): void;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* A module that serves as the entry point for a Remix app during server
|
|
155
|
+
* rendering.
|
|
156
|
+
*/
|
|
157
|
+
interface ServerEntryModule {
|
|
158
|
+
default: HandleDocumentRequestFunction;
|
|
159
|
+
handleDataRequest?: HandleDataRequestFunction;
|
|
160
|
+
handleError?: HandleErrorFunction;
|
|
161
|
+
streamTimeout?: number;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
interface Route {
|
|
165
|
+
index?: boolean;
|
|
166
|
+
caseSensitive?: boolean;
|
|
167
|
+
id: string;
|
|
168
|
+
parentId?: string;
|
|
169
|
+
path?: string;
|
|
170
|
+
}
|
|
171
|
+
interface EntryRoute extends Route {
|
|
172
|
+
hasAction: boolean;
|
|
173
|
+
hasLoader: boolean;
|
|
174
|
+
hasClientAction: boolean;
|
|
175
|
+
hasClientLoader: boolean;
|
|
176
|
+
hasClientMiddleware: boolean;
|
|
177
|
+
hasErrorBoundary: boolean;
|
|
178
|
+
imports?: string[];
|
|
179
|
+
css?: string[];
|
|
180
|
+
module: string;
|
|
181
|
+
clientActionModule: string | undefined;
|
|
182
|
+
clientLoaderModule: string | undefined;
|
|
183
|
+
clientMiddlewareModule: string | undefined;
|
|
184
|
+
hydrateFallbackModule: string | undefined;
|
|
185
|
+
parentId?: string;
|
|
186
|
+
}
|
|
187
|
+
declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
|
|
188
|
+
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[];
|
|
189
|
+
declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
|
|
190
|
+
|
|
191
|
+
type SerializedError = {
|
|
192
|
+
message: string;
|
|
193
|
+
stack?: string;
|
|
194
|
+
};
|
|
195
|
+
interface FrameworkContextObject {
|
|
196
|
+
manifest: AssetsManifest;
|
|
197
|
+
routeModules: RouteModules;
|
|
198
|
+
criticalCss?: CriticalCss;
|
|
199
|
+
serverHandoffString?: string;
|
|
200
|
+
future: FutureConfig;
|
|
201
|
+
ssr: boolean;
|
|
202
|
+
isSpaMode: boolean;
|
|
203
|
+
routeDiscovery: ServerBuild["routeDiscovery"];
|
|
204
|
+
serializeError?(error: Error): SerializedError;
|
|
205
|
+
renderMeta?: {
|
|
206
|
+
didRenderScripts?: boolean;
|
|
207
|
+
streamCache?: Record<number, Promise<void> & {
|
|
208
|
+
result?: {
|
|
209
|
+
done: boolean;
|
|
210
|
+
value: string;
|
|
211
|
+
};
|
|
212
|
+
error?: unknown;
|
|
213
|
+
}>;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
interface EntryContext extends FrameworkContextObject {
|
|
217
|
+
staticHandlerContext: StaticHandlerContext;
|
|
218
|
+
serverHandoffStream?: ReadableStream<Uint8Array>;
|
|
219
|
+
}
|
|
220
|
+
interface FutureConfig {
|
|
221
|
+
unstable_subResourceIntegrity: boolean;
|
|
222
|
+
v8_middleware: boolean;
|
|
223
|
+
}
|
|
224
|
+
type CriticalCss = string | {
|
|
225
|
+
rel: "stylesheet";
|
|
226
|
+
href: string;
|
|
227
|
+
};
|
|
228
|
+
interface AssetsManifest {
|
|
229
|
+
entry: {
|
|
230
|
+
imports: string[];
|
|
231
|
+
module: string;
|
|
232
|
+
};
|
|
233
|
+
routes: RouteManifest<EntryRoute>;
|
|
234
|
+
url: string;
|
|
235
|
+
version: string;
|
|
236
|
+
hmr?: {
|
|
237
|
+
timestamp?: number;
|
|
238
|
+
runtime: string;
|
|
239
|
+
};
|
|
240
|
+
sri?: Record<string, string> | true;
|
|
241
|
+
}
|
|
242
|
+
|
|
253
243
|
declare const FrameworkContext: React.Context<FrameworkContextObject | undefined>;
|
|
254
244
|
/**
|
|
255
245
|
* Defines the discovery behavior of the link:
|
|
@@ -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,4 @@
|
|
|
1
|
-
export {
|
|
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-
|
|
1
|
+
export { aE as MemoryRouter, aF as Navigate, aG as Outlet, aH as Route, aI as Router, aJ as RouterProvider, aK as Routes, ar as UNSAFE_AwaitContextProvider, b1 as UNSAFE_WithComponentProps, b5 as UNSAFE_WithErrorBoundaryProps, b3 as UNSAFE_WithHydrateFallbackProps } from './context-BqL5Eckq.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-2EDmGlsZ.mjs';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './
|
|
4
|
+
import './route-data-CDwqkzPE.mjs';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export {
|
|
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-
|
|
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-BmVo7q9e.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-DKvU8YRr.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './instrumentation-BWRz1MRU.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-c19b79d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunk2G2U5HGBjs = require('./chunk-2G2U5HGB.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkLUB73E44js = require('./chunk-LUB73E44.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkQOFB7XZ5js = require('./chunk-QOFB7XZ5.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunk2G2U5HGBjs.BrowserRouter; exports.Form = _chunk2G2U5HGBjs.Form; exports.HashRouter = _chunk2G2U5HGBjs.HashRouter; exports.Link = _chunk2G2U5HGBjs.Link; exports.Links = _chunkLUB73E44js.Links; exports.MemoryRouter = _chunk2G2U5HGBjs.MemoryRouter; exports.Meta = _chunkLUB73E44js.Meta; exports.NavLink = _chunk2G2U5HGBjs.NavLink; exports.Navigate = _chunk2G2U5HGBjs.Navigate; exports.Outlet = _chunk2G2U5HGBjs.Outlet; exports.Route = _chunk2G2U5HGBjs.Route; exports.Router = _chunk2G2U5HGBjs.Router; exports.RouterProvider = _chunk2G2U5HGBjs.RouterProvider; exports.Routes = _chunk2G2U5HGBjs.Routes; exports.ScrollRestoration = _chunk2G2U5HGBjs.ScrollRestoration; exports.StaticRouter = _chunk2G2U5HGBjs.StaticRouter; exports.StaticRouterProvider = _chunk2G2U5HGBjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkLUB73E44js.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunk2G2U5HGBjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk2G2U5HGBjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk2G2U5HGBjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunk2G2U5HGBjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-c19b79d
|
|
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-
|
|
35
|
+
} from "./chunk-IMKEG5CI.mjs";
|
|
36
36
|
export {
|
|
37
37
|
BrowserRouter,
|
|
38
38
|
Form,
|
|
@@ -351,11 +351,6 @@ type DefaultContext = MiddlewareEnabled extends true ? Readonly<RouterContextPro
|
|
|
351
351
|
interface DataFunctionArgs<Context> {
|
|
352
352
|
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read headers (like cookies, and {@link https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams URLSearchParams} from the request. */
|
|
353
353
|
request: Request;
|
|
354
|
-
/**
|
|
355
|
-
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
|
|
356
|
-
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
|
|
357
|
-
*/
|
|
358
|
-
unstable_pattern: string;
|
|
359
354
|
/**
|
|
360
355
|
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
361
356
|
* @example
|
|
@@ -576,7 +571,7 @@ type AgnosticPatchRoutesOnNavigationFunction<O extends AgnosticRouteObject = Agn
|
|
|
576
571
|
* properties from framework-agnostic properties
|
|
577
572
|
*/
|
|
578
573
|
interface MapRoutePropertiesFunction {
|
|
579
|
-
(route:
|
|
574
|
+
(route: AgnosticRouteObject): {
|
|
580
575
|
hasErrorBoundary: boolean;
|
|
581
576
|
} & Record<string, any>;
|
|
582
577
|
}
|
|
@@ -892,99 +887,6 @@ type ErrorResponse = {
|
|
|
892
887
|
*/
|
|
893
888
|
declare function isRouteErrorResponse(error: any): error is ErrorResponse;
|
|
894
889
|
|
|
895
|
-
type unstable_ServerInstrumentation = {
|
|
896
|
-
handler?: unstable_InstrumentRequestHandlerFunction;
|
|
897
|
-
route?: unstable_InstrumentRouteFunction;
|
|
898
|
-
};
|
|
899
|
-
type unstable_ClientInstrumentation = {
|
|
900
|
-
router?: unstable_InstrumentRouterFunction;
|
|
901
|
-
route?: unstable_InstrumentRouteFunction;
|
|
902
|
-
};
|
|
903
|
-
type unstable_InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
|
|
904
|
-
type unstable_InstrumentRouterFunction = (router: InstrumentableRouter) => void;
|
|
905
|
-
type unstable_InstrumentRouteFunction = (route: InstrumentableRoute) => void;
|
|
906
|
-
interface GenericInstrumentFunction {
|
|
907
|
-
(handler: () => Promise<void>, info: unknown): Promise<void>;
|
|
908
|
-
}
|
|
909
|
-
type InstrumentableRoute = {
|
|
910
|
-
id: string;
|
|
911
|
-
index: boolean | undefined;
|
|
912
|
-
path: string | undefined;
|
|
913
|
-
instrument(instrumentations: RouteInstrumentations): void;
|
|
914
|
-
};
|
|
915
|
-
type RouteInstrumentations = {
|
|
916
|
-
lazy?: InstrumentLazyFunction;
|
|
917
|
-
"lazy.loader"?: InstrumentLazyFunction;
|
|
918
|
-
"lazy.action"?: InstrumentLazyFunction;
|
|
919
|
-
"lazy.middleware"?: InstrumentLazyFunction;
|
|
920
|
-
middleware?: InstrumentRouteHandlerFunction;
|
|
921
|
-
loader?: InstrumentRouteHandlerFunction;
|
|
922
|
-
action?: InstrumentRouteHandlerFunction;
|
|
923
|
-
};
|
|
924
|
-
type RouteHandlerInstrumentationInfo = Readonly<{
|
|
925
|
-
request: {
|
|
926
|
-
method: string;
|
|
927
|
-
url: string;
|
|
928
|
-
headers: Pick<Headers, "get">;
|
|
929
|
-
};
|
|
930
|
-
params: LoaderFunctionArgs["params"];
|
|
931
|
-
unstable_pattern: string;
|
|
932
|
-
context: Pick<RouterContextProvider, "get">;
|
|
933
|
-
}>;
|
|
934
|
-
interface InstrumentLazyFunction extends GenericInstrumentFunction {
|
|
935
|
-
(handler: () => Promise<void>): Promise<void>;
|
|
936
|
-
}
|
|
937
|
-
interface InstrumentRouteHandlerFunction extends GenericInstrumentFunction {
|
|
938
|
-
(handler: () => Promise<void>, info: RouteHandlerInstrumentationInfo): Promise<void>;
|
|
939
|
-
}
|
|
940
|
-
type InstrumentableRouter = {
|
|
941
|
-
instrument(instrumentations: RouterInstrumentations): void;
|
|
942
|
-
};
|
|
943
|
-
type RouterInstrumentations = {
|
|
944
|
-
navigate?: InstrumentNavigateFunction;
|
|
945
|
-
fetch?: InstrumentFetchFunction;
|
|
946
|
-
};
|
|
947
|
-
type RouterNavigationInstrumentationInfo = Readonly<{
|
|
948
|
-
to: string | number;
|
|
949
|
-
currentUrl: string;
|
|
950
|
-
formMethod?: HTMLFormMethod;
|
|
951
|
-
formEncType?: FormEncType;
|
|
952
|
-
formData?: FormData;
|
|
953
|
-
body?: any;
|
|
954
|
-
}>;
|
|
955
|
-
type RouterFetchInstrumentationInfo = Readonly<{
|
|
956
|
-
href: string;
|
|
957
|
-
currentUrl: string;
|
|
958
|
-
fetcherKey: string;
|
|
959
|
-
formMethod?: HTMLFormMethod;
|
|
960
|
-
formEncType?: FormEncType;
|
|
961
|
-
formData?: FormData;
|
|
962
|
-
body?: any;
|
|
963
|
-
}>;
|
|
964
|
-
interface InstrumentNavigateFunction extends GenericInstrumentFunction {
|
|
965
|
-
(handler: () => Promise<void>, info: RouterNavigationInstrumentationInfo): MaybePromise<void>;
|
|
966
|
-
}
|
|
967
|
-
interface InstrumentFetchFunction extends GenericInstrumentFunction {
|
|
968
|
-
(handler: () => Promise<void>, info: RouterFetchInstrumentationInfo): MaybePromise<void>;
|
|
969
|
-
}
|
|
970
|
-
type InstrumentableRequestHandler = {
|
|
971
|
-
instrument(instrumentations: RequestHandlerInstrumentations): void;
|
|
972
|
-
};
|
|
973
|
-
type RequestHandlerInstrumentations = {
|
|
974
|
-
request?: InstrumentRequestHandlerFunction;
|
|
975
|
-
};
|
|
976
|
-
type RequestHandlerInstrumentationInfo = Readonly<{
|
|
977
|
-
request: {
|
|
978
|
-
method: string;
|
|
979
|
-
url: string;
|
|
980
|
-
headers: Pick<Headers, "get">;
|
|
981
|
-
};
|
|
982
|
-
context: Pick<RouterContextProvider, "get">;
|
|
983
|
-
}>;
|
|
984
|
-
interface InstrumentRequestHandlerFunction extends GenericInstrumentFunction {
|
|
985
|
-
(handler: () => Promise<void>, info: RequestHandlerInstrumentationInfo): MaybePromise<void>;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
890
|
/**
|
|
989
891
|
* A Router instance manages all navigation and data loading/mutations
|
|
990
892
|
*/
|
|
@@ -1269,7 +1171,6 @@ interface RouterInit {
|
|
|
1269
1171
|
history: History;
|
|
1270
1172
|
basename?: string;
|
|
1271
1173
|
getContext?: () => MaybePromise<RouterContextProvider>;
|
|
1272
|
-
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
|
1273
1174
|
mapRouteProperties?: MapRoutePropertiesFunction;
|
|
1274
1175
|
future?: Partial<FutureConfig>;
|
|
1275
1176
|
hydrationRouteProperties?: string[];
|
|
@@ -1536,7 +1437,6 @@ type BlockerFunction = (args: {
|
|
|
1536
1437
|
interface CreateStaticHandlerOptions {
|
|
1537
1438
|
basename?: string;
|
|
1538
1439
|
mapRouteProperties?: MapRoutePropertiesFunction;
|
|
1539
|
-
unstable_instrumentations?: Pick<unstable_ServerInstrumentation, "route">[];
|
|
1540
1440
|
future?: {};
|
|
1541
1441
|
}
|
|
1542
1442
|
declare function createStaticHandler(routes: AgnosticRouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
|
|
@@ -1907,11 +1807,6 @@ type ClientDataFunctionArgs<Params> = {
|
|
|
1907
1807
|
* }
|
|
1908
1808
|
**/
|
|
1909
1809
|
params: Params;
|
|
1910
|
-
/**
|
|
1911
|
-
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
|
|
1912
|
-
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
|
|
1913
|
-
*/
|
|
1914
|
-
unstable_pattern: string;
|
|
1915
1810
|
/**
|
|
1916
1811
|
* When `future.v8_middleware` is not enabled, this is undefined.
|
|
1917
1812
|
*
|