react-router 0.0.0-experimental-28626d62e → 0.0.0-experimental-19ee16c3e
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/{browser-DSo2YArb.d.mts → browser-BenyQgT4.d.mts} +136 -154
- package/dist/development/{chunk-MKHQXMDT.mjs → chunk-6KBWYHGQ.mjs} +47 -55
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.js +1 -1
- package/dist/development/dom-export.mjs +2 -2
- package/dist/development/index.d.mts +10 -5
- package/dist/development/index.d.ts +801 -814
- package/dist/development/index.js +47 -56
- package/dist/development/index.mjs +2 -4
- package/dist/development/lib/types/internal.d.mts +1 -1
- package/dist/development/lib/types/internal.d.ts +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/register-9KQS4Qci.d.ts → development/register-D3Ithcl4.d.ts} +2 -1
- package/dist/{production/route-data-BGFzuhMS.d.mts → development/route-data-CBHO1x2o.d.mts} +1 -0
- package/dist/development/rsc-export.d.mts +2 -22
- package/dist/development/rsc-export.d.ts +2 -22
- package/dist/development/rsc-export.js +94 -64
- package/dist/development/rsc-export.mjs +94 -63
- package/dist/production/{browser-DSo2YArb.d.mts → browser-BenyQgT4.d.mts} +136 -154
- package/dist/production/{chunk-63QGRGEN.mjs → chunk-XK2DTS6N.mjs} +47 -55
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.js +1 -1
- package/dist/production/dom-export.mjs +2 -2
- package/dist/production/index.d.mts +10 -5
- package/dist/production/index.d.ts +801 -814
- package/dist/production/index.js +47 -56
- package/dist/production/index.mjs +2 -4
- package/dist/production/lib/types/internal.d.mts +1 -1
- package/dist/production/lib/types/internal.d.ts +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-9KQS4Qci.d.ts → production/register-D3Ithcl4.d.ts} +2 -1
- package/dist/{development/route-data-BGFzuhMS.d.mts → production/route-data-CBHO1x2o.d.mts} +1 -0
- package/dist/production/rsc-export.d.mts +2 -22
- package/dist/production/rsc-export.d.ts +2 -22
- package/dist/production/rsc-export.js +94 -64
- package/dist/production/rsc-export.mjs +94 -63
- package/package.json +1 -1
|
@@ -1,138 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
5
|
-
interface ServerRoute extends Route$1 {
|
|
6
|
-
children: ServerRoute[];
|
|
7
|
-
module: ServerRouteModule;
|
|
8
|
-
}
|
|
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 ? unstable_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;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
type SerializedError = {
|
|
59
|
-
message: string;
|
|
60
|
-
stack?: string;
|
|
61
|
-
};
|
|
62
|
-
interface FrameworkContextObject {
|
|
63
|
-
manifest: AssetsManifest;
|
|
64
|
-
routeModules: RouteModules;
|
|
65
|
-
criticalCss?: CriticalCss;
|
|
66
|
-
serverHandoffString?: string;
|
|
67
|
-
future: FutureConfig;
|
|
68
|
-
ssr: boolean;
|
|
69
|
-
isSpaMode: boolean;
|
|
70
|
-
routeDiscovery: ServerBuild["routeDiscovery"];
|
|
71
|
-
serializeError?(error: Error): SerializedError;
|
|
72
|
-
renderMeta?: {
|
|
73
|
-
didRenderScripts?: boolean;
|
|
74
|
-
streamCache?: Record<number, Promise<void> & {
|
|
75
|
-
result?: {
|
|
76
|
-
done: boolean;
|
|
77
|
-
value: string;
|
|
78
|
-
};
|
|
79
|
-
error?: unknown;
|
|
80
|
-
}>;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
interface EntryContext extends FrameworkContextObject {
|
|
84
|
-
staticHandlerContext: StaticHandlerContext;
|
|
85
|
-
serverHandoffStream?: ReadableStream<Uint8Array>;
|
|
86
|
-
}
|
|
87
|
-
interface FutureConfig {
|
|
88
|
-
unstable_subResourceIntegrity: boolean;
|
|
89
|
-
unstable_middleware: boolean;
|
|
90
|
-
}
|
|
91
|
-
type CriticalCss = string | {
|
|
92
|
-
rel: "stylesheet";
|
|
93
|
-
href: string;
|
|
94
|
-
};
|
|
95
|
-
interface AssetsManifest {
|
|
96
|
-
entry: {
|
|
97
|
-
imports: string[];
|
|
98
|
-
module: string;
|
|
99
|
-
};
|
|
100
|
-
routes: RouteManifest<EntryRoute>;
|
|
101
|
-
url: string;
|
|
102
|
-
version: string;
|
|
103
|
-
hmr?: {
|
|
104
|
-
timestamp?: number;
|
|
105
|
-
runtime: string;
|
|
106
|
-
};
|
|
107
|
-
sri?: Record<string, string> | true;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
interface Route$1 {
|
|
111
|
-
index?: boolean;
|
|
112
|
-
caseSensitive?: boolean;
|
|
113
|
-
id: string;
|
|
114
|
-
parentId?: string;
|
|
115
|
-
path?: string;
|
|
116
|
-
}
|
|
117
|
-
interface EntryRoute extends Route$1 {
|
|
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;
|
|
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;
|
|
2
|
+
import { h as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, v as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, n as NonIndexRouteObject, a3 as LazyRouteFunction, m as IndexRouteObject, L as Location, A as Action, as as Navigator, au as RouteMatch, aS as RouteManifest, aT as ServerRouteModule, r as MiddlewareEnabled, ac as unstable_RouterContextProvider, s as AppLoadContext, a4 as LoaderFunctionArgs, W as ActionFunctionArgs, k as StaticHandlerContext, b as RouteModules, w as DataRouteObject, x as ClientLoaderFunction, a2 as HTMLFormMethod, a0 as FormEncType, aC as PageLinkDescriptor, aU as History, y as GetScrollRestorationKeyFunction, N as NavigateOptions, z as Fetcher, S as SerializeFrom, B as BlockerFunction, av as ClientActionFunction, q as LinksFunction, M as MetaFunction, a9 as ShouldRevalidateFunction, g as Params } from './route-data-CBHO1x2o.mjs';
|
|
136
3
|
|
|
137
4
|
/**
|
|
138
5
|
* @private
|
|
@@ -326,7 +193,7 @@ type RouteProps = PathRouteProps | LayoutRouteProps | IndexRouteProps;
|
|
|
326
193
|
*
|
|
327
194
|
* @category Components
|
|
328
195
|
*/
|
|
329
|
-
declare function Route(_props: RouteProps): React.ReactElement | null;
|
|
196
|
+
declare function Route$1(_props: RouteProps): React.ReactElement | null;
|
|
330
197
|
/**
|
|
331
198
|
* @category Types
|
|
332
199
|
*/
|
|
@@ -526,24 +393,6 @@ function Book() {
|
|
|
526
393
|
|
|
527
394
|
*/
|
|
528
395
|
declare function Await<Resolve>({ children, errorElement, resolve, }: AwaitProps<Resolve>): React.JSX.Element;
|
|
529
|
-
declare function RouteComponentPropsProvider({ children, }: {
|
|
530
|
-
children: React.ReactElement;
|
|
531
|
-
}): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
532
|
-
declare function HydrateFallbackPropsProvider({ children, }: {
|
|
533
|
-
children: React.ReactElement;
|
|
534
|
-
}): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
535
|
-
declare function ErrorBoundaryPropsProvider({ children, }: {
|
|
536
|
-
children: React.ReactElement;
|
|
537
|
-
}): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
538
|
-
declare const clientComponentPropsProvidersByType: {
|
|
539
|
-
readonly Component: typeof RouteComponentPropsProvider;
|
|
540
|
-
readonly ErrorBoundary: typeof ErrorBoundaryPropsProvider;
|
|
541
|
-
readonly HydrateFallback: typeof HydrateFallbackPropsProvider;
|
|
542
|
-
};
|
|
543
|
-
declare function ClientComponentPropsProvider({ __type: type, children, }: {
|
|
544
|
-
__type: keyof typeof clientComponentPropsProvidersByType;
|
|
545
|
-
children: React.ReactElement;
|
|
546
|
-
}): React.JSX.Element;
|
|
547
396
|
/**
|
|
548
397
|
* Creates a route config from a React "children" object, which is usually
|
|
549
398
|
* either a `<Route>` element or an array of them. Used internally by
|
|
@@ -563,6 +412,139 @@ declare let createRoutesFromElements: typeof createRoutesFromChildren;
|
|
|
563
412
|
*/
|
|
564
413
|
declare function renderMatches(matches: RouteMatch[] | null): React.ReactElement | null;
|
|
565
414
|
|
|
415
|
+
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
416
|
+
interface ServerRoute extends Route {
|
|
417
|
+
children: ServerRoute[];
|
|
418
|
+
module: ServerRouteModule;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
type OptionalCriticalCss = CriticalCss | undefined;
|
|
422
|
+
/**
|
|
423
|
+
* The output of the compiler for the server build.
|
|
424
|
+
*/
|
|
425
|
+
interface ServerBuild {
|
|
426
|
+
entry: {
|
|
427
|
+
module: ServerEntryModule;
|
|
428
|
+
};
|
|
429
|
+
routes: ServerRouteManifest;
|
|
430
|
+
assets: AssetsManifest;
|
|
431
|
+
basename?: string;
|
|
432
|
+
publicPath: string;
|
|
433
|
+
assetsBuildDirectory: string;
|
|
434
|
+
future: FutureConfig;
|
|
435
|
+
ssr: boolean;
|
|
436
|
+
unstable_getCriticalCss?: (args: {
|
|
437
|
+
pathname: string;
|
|
438
|
+
}) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
|
|
439
|
+
/**
|
|
440
|
+
* @deprecated This is now done via a custom header during prerendering
|
|
441
|
+
*/
|
|
442
|
+
isSpaMode: boolean;
|
|
443
|
+
prerender: string[];
|
|
444
|
+
routeDiscovery: {
|
|
445
|
+
mode: "lazy" | "initial";
|
|
446
|
+
manifestPath: string;
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
interface HandleDocumentRequestFunction {
|
|
450
|
+
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext): Promise<Response> | Response;
|
|
451
|
+
}
|
|
452
|
+
interface HandleDataRequestFunction {
|
|
453
|
+
(response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
|
|
454
|
+
}
|
|
455
|
+
interface HandleErrorFunction {
|
|
456
|
+
(error: unknown, args: LoaderFunctionArgs | ActionFunctionArgs): void;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* A module that serves as the entry point for a Remix app during server
|
|
460
|
+
* rendering.
|
|
461
|
+
*/
|
|
462
|
+
interface ServerEntryModule {
|
|
463
|
+
default: HandleDocumentRequestFunction;
|
|
464
|
+
handleDataRequest?: HandleDataRequestFunction;
|
|
465
|
+
handleError?: HandleErrorFunction;
|
|
466
|
+
streamTimeout?: number;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
type SerializedError = {
|
|
470
|
+
message: string;
|
|
471
|
+
stack?: string;
|
|
472
|
+
};
|
|
473
|
+
interface FrameworkContextObject {
|
|
474
|
+
manifest: AssetsManifest;
|
|
475
|
+
routeModules: RouteModules;
|
|
476
|
+
criticalCss?: CriticalCss;
|
|
477
|
+
serverHandoffString?: string;
|
|
478
|
+
future: FutureConfig;
|
|
479
|
+
ssr: boolean;
|
|
480
|
+
isSpaMode: boolean;
|
|
481
|
+
routeDiscovery: ServerBuild["routeDiscovery"];
|
|
482
|
+
serializeError?(error: Error): SerializedError;
|
|
483
|
+
renderMeta?: {
|
|
484
|
+
didRenderScripts?: boolean;
|
|
485
|
+
streamCache?: Record<number, Promise<void> & {
|
|
486
|
+
result?: {
|
|
487
|
+
done: boolean;
|
|
488
|
+
value: string;
|
|
489
|
+
};
|
|
490
|
+
error?: unknown;
|
|
491
|
+
}>;
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
interface EntryContext extends FrameworkContextObject {
|
|
495
|
+
staticHandlerContext: StaticHandlerContext;
|
|
496
|
+
serverHandoffStream?: ReadableStream<Uint8Array>;
|
|
497
|
+
}
|
|
498
|
+
interface FutureConfig {
|
|
499
|
+
unstable_subResourceIntegrity: boolean;
|
|
500
|
+
unstable_middleware: boolean;
|
|
501
|
+
}
|
|
502
|
+
type CriticalCss = string | {
|
|
503
|
+
rel: "stylesheet";
|
|
504
|
+
href: string;
|
|
505
|
+
};
|
|
506
|
+
interface AssetsManifest {
|
|
507
|
+
entry: {
|
|
508
|
+
imports: string[];
|
|
509
|
+
module: string;
|
|
510
|
+
};
|
|
511
|
+
routes: RouteManifest<EntryRoute>;
|
|
512
|
+
url: string;
|
|
513
|
+
version: string;
|
|
514
|
+
hmr?: {
|
|
515
|
+
timestamp?: number;
|
|
516
|
+
runtime: string;
|
|
517
|
+
};
|
|
518
|
+
sri?: Record<string, string> | true;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
interface Route {
|
|
522
|
+
index?: boolean;
|
|
523
|
+
caseSensitive?: boolean;
|
|
524
|
+
id: string;
|
|
525
|
+
parentId?: string;
|
|
526
|
+
path?: string;
|
|
527
|
+
}
|
|
528
|
+
interface EntryRoute extends Route {
|
|
529
|
+
hasAction: boolean;
|
|
530
|
+
hasLoader: boolean;
|
|
531
|
+
hasClientAction: boolean;
|
|
532
|
+
hasClientLoader: boolean;
|
|
533
|
+
hasClientMiddleware: boolean;
|
|
534
|
+
hasErrorBoundary: boolean;
|
|
535
|
+
imports?: string[];
|
|
536
|
+
css?: string[];
|
|
537
|
+
module: string;
|
|
538
|
+
clientActionModule: string | undefined;
|
|
539
|
+
clientLoaderModule: string | undefined;
|
|
540
|
+
clientMiddlewareModule: string | undefined;
|
|
541
|
+
hydrateFallbackModule: string | undefined;
|
|
542
|
+
parentId?: string;
|
|
543
|
+
}
|
|
544
|
+
declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
|
|
545
|
+
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[];
|
|
546
|
+
declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
|
|
547
|
+
|
|
566
548
|
type ParamKeyValuePair = [string, string];
|
|
567
549
|
type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
|
|
568
550
|
/**
|
|
@@ -1829,4 +1811,4 @@ declare global {
|
|
|
1829
1811
|
}
|
|
1830
1812
|
declare function getServerStream(): ReadableStream<any>;
|
|
1831
1813
|
|
|
1832
|
-
export { useSearchParams as $, type AssetsManifest as A, type BrowserRouterProps as B, type SubmitFunction as C, type DOMRouterOpts as D, type EntryContext as E, type FutureConfig as F, type FetcherSubmitFunction as G, type HashRouterProps as H, type IndexRouteProps as I, type FetcherWithComponents as J, createBrowserRouter as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateProps as N, type OutletProps as O, type PathRouteProps as P, createHashRouter as Q, type RouterProviderProps as R, type ServerBuild as S, BrowserRouter as T, HashRouter as U, Link as V, HistoryRouter as W, NavLink as X, Form as Y, ScrollRestoration as Z, useLinkClickHandler as _, type ServerPayload as a, useSubmit as a0, useFormAction as a1, useFetcher as a2, useFetchers as a3, useBeforeUnload as a4, usePrompt as a5, useViewTransitionState as a6, type FetcherSubmitOptions as a7, type ParamKeyValuePair as a8, type SubmitOptions as a9, type URLSearchParamsInit as aa, type SubmitTarget as ab, createSearchParams as ac, Meta as ad, Links as ae, Scripts as af, PrefetchPageLinks as ag, type ScriptsProps as ah, type HandleDataRequestFunction as ai, type HandleDocumentRequestFunction as aj, type HandleErrorFunction as ak, type ServerEntryModule as al, type DecodeServerResponseFunction as am, type EncodeActionFunction as an, createCallServer as ao, RSCHydratedRouter as ap, getServerStream as aq,
|
|
1814
|
+
export { useSearchParams as $, type AssetsManifest as A, type BrowserRouterProps as B, type SubmitFunction as C, type DOMRouterOpts as D, type EntryContext as E, type FutureConfig as F, type FetcherSubmitFunction as G, type HashRouterProps as H, type IndexRouteProps as I, type FetcherWithComponents as J, createBrowserRouter as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateProps as N, type OutletProps as O, type PathRouteProps as P, createHashRouter as Q, type RouterProviderProps as R, type ServerBuild as S, BrowserRouter as T, HashRouter as U, Link as V, HistoryRouter as W, NavLink as X, Form as Y, ScrollRestoration as Z, useLinkClickHandler as _, type ServerPayload as a, useSubmit as a0, useFormAction as a1, useFetcher as a2, useFetchers as a3, useBeforeUnload as a4, usePrompt as a5, useViewTransitionState as a6, type FetcherSubmitOptions as a7, type ParamKeyValuePair as a8, type SubmitOptions as a9, type URLSearchParamsInit as aa, type SubmitTarget as ab, createSearchParams as ac, Meta as ad, Links as ae, Scripts as af, PrefetchPageLinks as ag, type ScriptsProps as ah, type HandleDataRequestFunction as ai, type HandleDocumentRequestFunction as aj, type HandleErrorFunction as ak, type ServerEntryModule as al, type DecodeServerResponseFunction as am, type EncodeActionFunction as an, createCallServer as ao, RSCHydratedRouter as ap, getServerStream as aq, hydrationRouteProperties as ar, mapRouteProperties as as, FrameworkContext as at, createClientRoutes as au, createClientRoutesWithHMRRevalidationOptOut as av, shouldHydrateRouteLoader as aw, useScrollRestoration as ax, type AwaitProps as b, type MemoryRouterProps as c, type RouteProps as d, type RouterProps as e, type RoutesProps as f, Await as g, MemoryRouter as h, Navigate as i, Outlet as j, Route$1 as k, Router as l, RouterProvider as m, Routes as n, createMemoryRouter as o, createRoutesFromChildren as p, createRoutesFromElements as q, renderMatches as r, type HistoryRouterProps as s, type LinkProps as t, type NavLinkProps as u, type NavLinkRenderProps as v, type FetcherFormProps as w, type FormProps as x, type ScrollRestorationProps as y, type SetURLSearchParams as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-19ee16c3e
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2719,6 +2719,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2719
2719
|
skipLoaderErrorBubbling,
|
|
2720
2720
|
skipRevalidation,
|
|
2721
2721
|
dataStrategy,
|
|
2722
|
+
unstable_stream: stream,
|
|
2722
2723
|
unstable_respond: respond
|
|
2723
2724
|
} = {}) {
|
|
2724
2725
|
let url = new URL(request.url);
|
|
@@ -2742,7 +2743,10 @@ function createStaticHandler(routes, opts) {
|
|
|
2742
2743
|
loaderHeaders: {},
|
|
2743
2744
|
actionHeaders: {}
|
|
2744
2745
|
};
|
|
2745
|
-
return
|
|
2746
|
+
return stream ? stream(
|
|
2747
|
+
requestContext,
|
|
2748
|
+
() => Promise.resolve(staticContext)
|
|
2749
|
+
) : respond ? respond(staticContext) : staticContext;
|
|
2746
2750
|
} else if (!matches) {
|
|
2747
2751
|
let error = getInternalRouterError(404, { pathname: location2.pathname });
|
|
2748
2752
|
let { matches: notFoundMatches, route } = getShortCircuitMatches(dataRoutes);
|
|
@@ -2759,9 +2763,12 @@ function createStaticHandler(routes, opts) {
|
|
|
2759
2763
|
loaderHeaders: {},
|
|
2760
2764
|
actionHeaders: {}
|
|
2761
2765
|
};
|
|
2762
|
-
return
|
|
2766
|
+
return stream ? stream(
|
|
2767
|
+
requestContext,
|
|
2768
|
+
() => Promise.resolve(staticContext)
|
|
2769
|
+
) : respond ? respond(staticContext) : staticContext;
|
|
2763
2770
|
}
|
|
2764
|
-
if (respond && matches.some(
|
|
2771
|
+
if (stream || respond && matches.some(
|
|
2765
2772
|
(m) => m.route.unstable_middleware || typeof m.route.lazy === "object" && m.route.lazy.unstable_middleware
|
|
2766
2773
|
)) {
|
|
2767
2774
|
invariant(
|
|
@@ -2786,6 +2793,27 @@ function createStaticHandler(routes, opts) {
|
|
|
2786
2793
|
},
|
|
2787
2794
|
true,
|
|
2788
2795
|
async () => {
|
|
2796
|
+
if (stream) {
|
|
2797
|
+
let res2 = await stream(
|
|
2798
|
+
requestContext,
|
|
2799
|
+
async (revalidationRequest) => {
|
|
2800
|
+
let result3 = await queryImpl(
|
|
2801
|
+
revalidationRequest,
|
|
2802
|
+
location2,
|
|
2803
|
+
matches,
|
|
2804
|
+
requestContext,
|
|
2805
|
+
dataStrategy || null,
|
|
2806
|
+
skipLoaderErrorBubbling === true,
|
|
2807
|
+
null,
|
|
2808
|
+
filterMatchesToLoad || null,
|
|
2809
|
+
skipRevalidation === true
|
|
2810
|
+
);
|
|
2811
|
+
return isResponse(result3) ? result3 : { location: location2, basename, ...result3 };
|
|
2812
|
+
}
|
|
2813
|
+
);
|
|
2814
|
+
return res2;
|
|
2815
|
+
}
|
|
2816
|
+
invariant(respond, "Expected respond to be defined");
|
|
2789
2817
|
let result2 = await queryImpl(
|
|
2790
2818
|
request,
|
|
2791
2819
|
location2,
|
|
@@ -2805,6 +2833,13 @@ function createStaticHandler(routes, opts) {
|
|
|
2805
2833
|
return res;
|
|
2806
2834
|
},
|
|
2807
2835
|
async (error, routeId) => {
|
|
2836
|
+
if (stream) {
|
|
2837
|
+
invariant(
|
|
2838
|
+
false,
|
|
2839
|
+
"stream() Not implemented for middleware errors yet"
|
|
2840
|
+
);
|
|
2841
|
+
}
|
|
2842
|
+
invariant(respond, "Expected respond to be defined");
|
|
2808
2843
|
if (isResponse(error)) {
|
|
2809
2844
|
return error;
|
|
2810
2845
|
}
|
|
@@ -5914,53 +5949,6 @@ function ResolveAwait({
|
|
|
5914
5949
|
let toRender = typeof children === "function" ? children(data2) : children;
|
|
5915
5950
|
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, toRender);
|
|
5916
5951
|
}
|
|
5917
|
-
function RouteComponentPropsProvider({
|
|
5918
|
-
children
|
|
5919
|
-
}) {
|
|
5920
|
-
let props = {
|
|
5921
|
-
loaderData: useLoaderData(),
|
|
5922
|
-
actionData: useActionData(),
|
|
5923
|
-
params: useParams(),
|
|
5924
|
-
matches: useMatches()
|
|
5925
|
-
};
|
|
5926
|
-
return React3.cloneElement(children, props);
|
|
5927
|
-
}
|
|
5928
|
-
function HydrateFallbackPropsProvider({
|
|
5929
|
-
children
|
|
5930
|
-
}) {
|
|
5931
|
-
let props = {
|
|
5932
|
-
loaderData: useLoaderData(),
|
|
5933
|
-
actionData: useActionData(),
|
|
5934
|
-
params: useParams()
|
|
5935
|
-
};
|
|
5936
|
-
return React3.cloneElement(children, props);
|
|
5937
|
-
}
|
|
5938
|
-
function ErrorBoundaryPropsProvider({
|
|
5939
|
-
children
|
|
5940
|
-
}) {
|
|
5941
|
-
let props = {
|
|
5942
|
-
loaderData: useLoaderData(),
|
|
5943
|
-
actionData: useActionData(),
|
|
5944
|
-
params: useParams(),
|
|
5945
|
-
error: useRouteError()
|
|
5946
|
-
};
|
|
5947
|
-
return React3.cloneElement(children, props);
|
|
5948
|
-
}
|
|
5949
|
-
var clientComponentPropsProvidersByType = {
|
|
5950
|
-
Component: RouteComponentPropsProvider,
|
|
5951
|
-
ErrorBoundary: ErrorBoundaryPropsProvider,
|
|
5952
|
-
HydrateFallback: HydrateFallbackPropsProvider
|
|
5953
|
-
};
|
|
5954
|
-
function ClientComponentPropsProvider({
|
|
5955
|
-
__type: type,
|
|
5956
|
-
children
|
|
5957
|
-
}) {
|
|
5958
|
-
const Provider = clientComponentPropsProvidersByType[type];
|
|
5959
|
-
if (!Provider) {
|
|
5960
|
-
throw new Error(`Invalid type: ${type}`);
|
|
5961
|
-
}
|
|
5962
|
-
return /* @__PURE__ */ React3.createElement(Provider, null, children);
|
|
5963
|
-
}
|
|
5964
5952
|
function createRoutesFromChildren(children, parentPath = []) {
|
|
5965
5953
|
let routes = [];
|
|
5966
5954
|
React3.Children.forEach(children, (element, index) => {
|
|
@@ -8780,7 +8768,7 @@ function mergeRefs(...refs) {
|
|
|
8780
8768
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8781
8769
|
try {
|
|
8782
8770
|
if (isBrowser) {
|
|
8783
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8771
|
+
window.__reactRouterVersion = "0.0.0-experimental-19ee16c3e";
|
|
8784
8772
|
}
|
|
8785
8773
|
} catch (e) {
|
|
8786
8774
|
}
|
|
@@ -11989,7 +11977,12 @@ function escapeScript(script) {
|
|
|
11989
11977
|
}
|
|
11990
11978
|
|
|
11991
11979
|
// lib/rsc/server.ssr.tsx
|
|
11992
|
-
async function routeRSCServerRequest(
|
|
11980
|
+
async function routeRSCServerRequest({
|
|
11981
|
+
request,
|
|
11982
|
+
callServer,
|
|
11983
|
+
decode: decode2,
|
|
11984
|
+
renderHTML
|
|
11985
|
+
}) {
|
|
11993
11986
|
const url = new URL(request.url);
|
|
11994
11987
|
let serverRequest = request;
|
|
11995
11988
|
const isDataRequest = isReactServerRequest(url);
|
|
@@ -12007,7 +12000,7 @@ async function routeRSCServerRequest(request, requestServer, decode2, renderHTML
|
|
|
12007
12000
|
signal: request.signal
|
|
12008
12001
|
});
|
|
12009
12002
|
}
|
|
12010
|
-
const serverResponse = await
|
|
12003
|
+
const serverResponse = await callServer(serverRequest);
|
|
12011
12004
|
if (respondWithRSCPayload) {
|
|
12012
12005
|
return serverResponse;
|
|
12013
12006
|
}
|
|
@@ -12273,7 +12266,6 @@ export {
|
|
|
12273
12266
|
Router,
|
|
12274
12267
|
Routes,
|
|
12275
12268
|
Await,
|
|
12276
|
-
ClientComponentPropsProvider,
|
|
12277
12269
|
createRoutesFromChildren,
|
|
12278
12270
|
createRoutesFromElements,
|
|
12279
12271
|
renderMatches,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './browser-
|
|
3
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './browser-BenyQgT4.mjs';
|
|
3
|
+
import { R as RouterInit } from './route-data-CBHO1x2o.mjs';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-19ee16c3e
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6KBWYHGQ.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Router, b as RouteModules, D as DataStrategyFunction, T as To, c as RelativeRoutingType, L as Location, A as Action, P as ParamParseKey, d as Path, e as PathPattern, f as PathMatch, N as NavigateOptions, g as Params, h as RouteObject, i as Navigation, U as UIMatch, S as SerializeFrom, B as BlockerFunction, j as Blocker, k as StaticHandlerContext, l as StaticHandler, F as FutureConfig, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as unstable_InitialContext, m as IndexRouteObject, n as NonIndexRouteObject, o as LoaderFunction, p as ActionFunction, M as MetaFunction, q as LinksFunction, r as MiddlewareEnabled, s as AppLoadContext, E as Equal, t as RouterState, v as PatchRoutesOnNavigationFunction, w as DataRouteObject, x as ClientLoaderFunction } from './route-data-
|
|
2
|
-
export { W as ActionFunctionArgs, av as ClientActionFunction, aw as ClientActionFunctionArgs, ax as ClientLoaderFunctionArgs, ar as DataRouteMatch, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, z as Fetcher, a0 as FormEncType, a1 as FormMethod, aF as Future, G as GetScrollPositionFunction, y as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ah as IDLE_BLOCKER, ag as IDLE_FETCHER, af as IDLE_NAVIGATION, a3 as LazyRouteFunction, aE as LinkDescriptor, a4 as LoaderFunctionArgs, aA as MetaArgs, aB as MetaDescriptor, J as NavigationStates, as as Navigator, aC as PageLinkDescriptor, at as PatchRoutesOnNavigationFunctionArgs, a6 as PathParam, a7 as RedirectFunction, V as RevalidationState, au as RouteMatch, Q as RouterFetchOptions, R as RouterInit, O as RouterNavigateOptions, K as RouterSubscriber, a9 as ShouldRevalidateFunction, aa as ShouldRevalidateFunctionArgs, aL as UNSAFE_DataRouterContext, aM as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aK as UNSAFE_ErrorResponseImpl, aN as UNSAFE_FetchersContext, aO as UNSAFE_LocationContext, aP as UNSAFE_NavigationContext, aQ as UNSAFE_RouteContext, aR as UNSAFE_ViewTransitionContext, aH as UNSAFE_createBrowserHistory, aJ as UNSAFE_createRouter, aI as UNSAFE_invariant, ad as createPath, ai as data, aj as generatePath, ak as isRouteErrorResponse, al as matchPath, am as matchRoutes, ae as parsePath, an as redirect, ao as redirectDocument, ap as replace, aq as resolvePath, a5 as unstable_MiddlewareFunction, a8 as unstable_RouterContext, ac as unstable_RouterContextProvider, aG as unstable_SerializesTo, ab as unstable_createContext } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, S as ServerBuild, a as ServerPayload } from './browser-
|
|
4
|
-
export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, am as DecodeServerResponseFunction, an as EncodeActionFunction, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, ai as HandleDataRequestFunction, aj as HandleDocumentRequestFunction, ak as HandleErrorFunction, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, ap as RSCHydratedRouter, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, y as ScrollRestorationProps, al as ServerEntryModule, z as SetURLSearchParams, C as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget,
|
|
1
|
+
import { a as Router, b as RouteModules, D as DataStrategyFunction, T as To, c as RelativeRoutingType, L as Location, A as Action, P as ParamParseKey, d as Path, e as PathPattern, f as PathMatch, N as NavigateOptions, g as Params, h as RouteObject, i as Navigation, U as UIMatch, S as SerializeFrom, B as BlockerFunction, j as Blocker, k as StaticHandlerContext, l as StaticHandler, F as FutureConfig, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as unstable_InitialContext, m as IndexRouteObject, n as NonIndexRouteObject, o as LoaderFunction, p as ActionFunction, M as MetaFunction, q as LinksFunction, r as MiddlewareEnabled, s as AppLoadContext, E as Equal, t as RouterState, v as PatchRoutesOnNavigationFunction, w as DataRouteObject, x as ClientLoaderFunction } from './route-data-CBHO1x2o.mjs';
|
|
2
|
+
export { W as ActionFunctionArgs, av as ClientActionFunction, aw as ClientActionFunctionArgs, ax as ClientLoaderFunctionArgs, ar as DataRouteMatch, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, z as Fetcher, a0 as FormEncType, a1 as FormMethod, aF as Future, G as GetScrollPositionFunction, y as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ah as IDLE_BLOCKER, ag as IDLE_FETCHER, af as IDLE_NAVIGATION, a3 as LazyRouteFunction, aE as LinkDescriptor, a4 as LoaderFunctionArgs, aA as MetaArgs, aB as MetaDescriptor, J as NavigationStates, as as Navigator, aC as PageLinkDescriptor, at as PatchRoutesOnNavigationFunctionArgs, a6 as PathParam, a7 as RedirectFunction, V as RevalidationState, au as RouteMatch, Q as RouterFetchOptions, R as RouterInit, O as RouterNavigateOptions, K as RouterSubscriber, a9 as ShouldRevalidateFunction, aa as ShouldRevalidateFunctionArgs, aL as UNSAFE_DataRouterContext, aM as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aK as UNSAFE_ErrorResponseImpl, aN as UNSAFE_FetchersContext, aO as UNSAFE_LocationContext, aP as UNSAFE_NavigationContext, aQ as UNSAFE_RouteContext, aR as UNSAFE_ViewTransitionContext, aH as UNSAFE_createBrowserHistory, aJ as UNSAFE_createRouter, aI as UNSAFE_invariant, ad as createPath, ai as data, aj as generatePath, ak as isRouteErrorResponse, al as matchPath, am as matchRoutes, ae as parsePath, an as redirect, ao as redirectDocument, ap as replace, aq as resolvePath, a5 as unstable_MiddlewareFunction, a8 as unstable_RouterContext, ac as unstable_RouterContextProvider, aG as unstable_SerializesTo, ab as unstable_createContext } from './route-data-CBHO1x2o.mjs';
|
|
3
|
+
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, S as ServerBuild, a as ServerPayload } from './browser-BenyQgT4.mjs';
|
|
4
|
+
export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, am as DecodeServerResponseFunction, an as EncodeActionFunction, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, ai as HandleDataRequestFunction, aj as HandleDocumentRequestFunction, ak as HandleErrorFunction, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, ap as RSCHydratedRouter, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, y as ScrollRestorationProps, al as ServerEntryModule, z as SetURLSearchParams, C as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget, at as UNSAFE_FrameworkContext, au as UNSAFE_createClientRoutes, av as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ar as UNSAFE_hydrationRouteProperties, as as UNSAFE_mapRouteProperties, aw as UNSAFE_shouldHydrateRouteLoader, ax as UNSAFE_useScrollRestoration, aa as URLSearchParamsInit, K as createBrowserRouter, ao as createCallServer, Q as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ac as createSearchParams, aq as getServerStream, r as renderMatches, W as unstable_HistoryRouter, a5 as unstable_usePrompt, a4 as useBeforeUnload, a2 as useFetcher, a3 as useFetchers, a1 as useFormAction, _ as useLinkClickHandler, $ as useSearchParams, a0 as useSubmit, a6 as useViewTransitionState } from './browser-BenyQgT4.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -764,7 +764,12 @@ type ToArgs<Params extends Record<string, string | undefined>> = Equal<Params, {
|
|
|
764
764
|
*/
|
|
765
765
|
declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
|
|
766
766
|
|
|
767
|
-
declare function routeRSCServerRequest(request
|
|
767
|
+
declare function routeRSCServerRequest({ request, callServer, decode, renderHTML, }: {
|
|
768
|
+
request: Request;
|
|
769
|
+
callServer: (request: Request) => Promise<Response>;
|
|
770
|
+
decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
|
|
771
|
+
renderHTML: (getPayload: () => Promise<ServerPayload>) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;
|
|
772
|
+
}): Promise<Response>;
|
|
768
773
|
declare function RSCStaticRouter({ getPayload, }: {
|
|
769
774
|
getPayload: () => Promise<ServerPayload>;
|
|
770
775
|
}): React.JSX.Element | null;
|