react-router 0.0.0-experimental-818f8e08d → 0.0.0-experimental-e56aa53bc

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 (48) hide show
  1. package/CHANGELOG.md +0 -19
  2. package/dist/development/{chunk-4O47XL4L.mjs → chunk-RMWJZNG5.mjs} +1045 -354
  3. package/dist/development/data-CQbyyGzl.d.mts +11 -0
  4. package/dist/development/data-CQbyyGzl.d.ts +11 -0
  5. package/dist/development/dom-export.d.mts +2 -2
  6. package/dist/development/dom-export.d.ts +2 -1
  7. package/dist/development/dom-export.js +6130 -35
  8. package/dist/development/dom-export.mjs +3 -6
  9. package/dist/development/fog-of-war-C5L_Yd5M.d.mts +1778 -0
  10. package/dist/{production/fog-of-war-B1MWugqW.d.mts → development/fog-of-war-DrUCUQQ-.d.ts} +170 -138
  11. package/dist/development/index.d.mts +68 -10
  12. package/dist/development/index.d.ts +207 -1889
  13. package/dist/development/index.js +1052 -352
  14. package/dist/development/index.mjs +19 -2
  15. package/dist/development/lib/types/route-module.d.mts +2 -1
  16. package/dist/development/lib/types/route-module.d.ts +2 -1
  17. package/dist/development/lib/types/route-module.js +1 -1
  18. package/dist/development/lib/types/route-module.mjs +1 -1
  19. package/dist/{production/route-data-BvrN3Sw4.d.mts → development/route-data-BIYebJr3.d.mts} +12 -12
  20. package/dist/{production/route-data-fNWkI-4T.d.ts → development/route-data-BIYebJr3.d.ts} +12 -12
  21. package/dist/development/rsc-export.d.mts +1788 -0
  22. package/dist/development/rsc-export.d.ts +1788 -0
  23. package/dist/development/rsc-export.js +2778 -0
  24. package/dist/development/rsc-export.mjs +2743 -0
  25. package/dist/production/{chunk-P2C2EGLF.mjs → chunk-BXBFRMFA.mjs} +1045 -354
  26. package/dist/production/data-CQbyyGzl.d.mts +11 -0
  27. package/dist/production/data-CQbyyGzl.d.ts +11 -0
  28. package/dist/production/dom-export.d.mts +2 -2
  29. package/dist/production/dom-export.d.ts +2 -1
  30. package/dist/production/dom-export.js +6130 -35
  31. package/dist/production/dom-export.mjs +3 -6
  32. package/dist/production/fog-of-war-C5L_Yd5M.d.mts +1778 -0
  33. package/dist/{development/fog-of-war-B1MWugqW.d.mts → production/fog-of-war-DrUCUQQ-.d.ts} +170 -138
  34. package/dist/production/index.d.mts +68 -10
  35. package/dist/production/index.d.ts +207 -1889
  36. package/dist/production/index.js +1052 -352
  37. package/dist/production/index.mjs +19 -2
  38. package/dist/production/lib/types/route-module.d.mts +2 -1
  39. package/dist/production/lib/types/route-module.d.ts +2 -1
  40. package/dist/production/lib/types/route-module.js +1 -1
  41. package/dist/production/lib/types/route-module.mjs +1 -1
  42. package/dist/{development/route-data-BvrN3Sw4.d.mts → production/route-data-BIYebJr3.d.mts} +12 -12
  43. package/dist/{development/route-data-fNWkI-4T.d.ts → production/route-data-BIYebJr3.d.ts} +12 -12
  44. package/dist/production/rsc-export.d.mts +1788 -0
  45. package/dist/production/rsc-export.d.ts +1788 -0
  46. package/dist/production/rsc-export.js +2778 -0
  47. package/dist/production/rsc-export.mjs +2743 -0
  48. package/package.json +33 -2
@@ -1,5 +1,83 @@
1
1
  import * as React from 'react';
2
- import { h as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, as as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, r as NonIndexRouteObject, a2 as LazyRouteFunction, n as IndexRouteObject, L as Location, A as Action, ar as Navigator, au as RouteMatch, aS as RouteManifest, aT as ServerRouteModule, s as MiddlewareEnabled, ab as unstable_RouterContextProvider, t as AppLoadContext, a3 as LoaderFunctionArgs, V as ActionFunctionArgs, l as StaticHandlerContext, b as RouteModules, w as DataRouteObject, x as ClientLoaderFunction, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aU as History, y as GetScrollRestorationKeyFunction, N as NavigateOptions, z as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-BvrN3Sw4.mjs';
2
+ import { p as StaticHandlerContext, c as RouteManifest, b as RouteModules, H as HydrationState, G as DataRouteObject, J as ClientLoaderFunction, k as RouteObject, R as RouterInit, F as FutureConfig$1, I as InitialEntry, D as DataStrategyFunction, at as PatchRoutesOnNavigationFunction, a as Router$1, T as To, d as RelativeRoutingType, y as NonIndexRouteObject, a5 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, as as Navigator, av as RouteMatch, a4 as HTMLFormMethod, a2 as FormEncType, aD as PageLinkDescriptor, aT as History, O as GetScrollRestorationKeyFunction, N as NavigateOptions, Q as Fetcher, n as SerializeFrom, B as BlockerFunction, aw as ClientActionFunction, x as LinksFunction, w as MetaFunction, aa as ShouldRevalidateFunction, j as Params } from './route-data-BIYebJr3.js';
3
+
4
+ type SerializedError = {
5
+ message: string;
6
+ stack?: string;
7
+ };
8
+ interface FrameworkContextObject {
9
+ manifest: AssetsManifest;
10
+ routeModules: RouteModules;
11
+ criticalCss?: CriticalCss;
12
+ serverHandoffString?: string;
13
+ future: FutureConfig;
14
+ ssr: boolean;
15
+ isSpaMode: boolean;
16
+ serializeError?(error: Error): SerializedError;
17
+ renderMeta?: {
18
+ didRenderScripts?: boolean;
19
+ streamCache?: Record<number, Promise<void> & {
20
+ result?: {
21
+ done: boolean;
22
+ value: string;
23
+ };
24
+ error?: unknown;
25
+ }>;
26
+ };
27
+ }
28
+ interface EntryContext extends FrameworkContextObject {
29
+ staticHandlerContext: StaticHandlerContext;
30
+ serverHandoffStream?: ReadableStream<Uint8Array>;
31
+ }
32
+ interface FutureConfig {
33
+ unstable_subResourceIntegrity: boolean;
34
+ unstable_middleware: boolean;
35
+ }
36
+ type CriticalCss = string | {
37
+ rel: "stylesheet";
38
+ href: string;
39
+ };
40
+ interface AssetsManifest {
41
+ entry: {
42
+ imports: string[];
43
+ module: string;
44
+ };
45
+ routes: RouteManifest<EntryRoute>;
46
+ url: string;
47
+ version: string;
48
+ hmr?: {
49
+ timestamp?: number;
50
+ runtime: string;
51
+ };
52
+ sri?: Record<string, string> | true;
53
+ }
54
+
55
+ interface Route$1 {
56
+ index?: boolean;
57
+ caseSensitive?: boolean;
58
+ id: string;
59
+ parentId?: string;
60
+ path?: string;
61
+ }
62
+ interface EntryRoute extends Route$1 {
63
+ hasAction: boolean;
64
+ hasLoader: boolean;
65
+ hasClientAction: boolean;
66
+ hasClientLoader: boolean;
67
+ hasClientMiddleware: boolean;
68
+ hasErrorBoundary: boolean;
69
+ imports?: string[];
70
+ css?: string[];
71
+ module: string;
72
+ clientActionModule: string | undefined;
73
+ clientLoaderModule: string | undefined;
74
+ clientMiddlewareModule: string | undefined;
75
+ hydrateFallbackModule: string | undefined;
76
+ parentId?: string;
77
+ }
78
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
79
+ 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[];
80
+ declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
3
81
 
4
82
  /**
5
83
  * @private
@@ -193,7 +271,7 @@ type RouteProps = PathRouteProps | LayoutRouteProps | IndexRouteProps;
193
271
  *
194
272
  * @category Components
195
273
  */
196
- declare function Route$1(_props: RouteProps): React.ReactElement | null;
274
+ declare function Route(_props: RouteProps): React.ReactElement | null;
197
275
  /**
198
276
  * @category Types
199
277
  */
@@ -393,6 +471,15 @@ function Book() {
393
471
 
394
472
  */
395
473
  declare function Await<Resolve>({ children, errorElement, resolve, }: AwaitProps<Resolve>): React.JSX.Element;
474
+ declare function WithRouteComponentProps({ children, }: {
475
+ children: React.ReactElement;
476
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
477
+ declare function WithHydrateFallbackProps({ children, }: {
478
+ children: React.ReactElement;
479
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
480
+ declare function WithErrorBoundaryProps({ children, }: {
481
+ children: React.ReactElement;
482
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
396
483
  /**
397
484
  * Creates a route config from a React "children" object, which is usually
398
485
  * either a `<Route>` element or an array of them. Used internally by
@@ -412,139 +499,6 @@ declare let createRoutesFromElements: typeof createRoutesFromChildren;
412
499
  */
413
500
  declare function renderMatches(matches: RouteMatch[] | null): React.ReactElement | null;
414
501
 
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
-
548
502
  type ParamKeyValuePair = [string, string];
549
503
  type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
550
504
  /**
@@ -1733,6 +1687,84 @@ declare function useViewTransitionState(to: To, opts?: {
1733
1687
  relative?: RelativeRoutingType;
1734
1688
  }): boolean;
1735
1689
 
1690
+ type RenderedRoute = {
1691
+ clientAction?: ClientActionFunction;
1692
+ clientLoader?: ClientLoaderFunction;
1693
+ element?: React.ReactElement | false;
1694
+ errorElement?: React.ReactElement;
1695
+ handle?: any;
1696
+ hasAction: boolean;
1697
+ hasErrorBoundary: boolean;
1698
+ hasLoader: boolean;
1699
+ hydrateFallbackElement?: React.ReactElement;
1700
+ id: string;
1701
+ index?: boolean;
1702
+ links?: LinksFunction;
1703
+ meta?: MetaFunction;
1704
+ parentId?: string;
1705
+ path?: string;
1706
+ shouldRevalidate?: ShouldRevalidateFunction;
1707
+ };
1708
+ type ServerRouteMatch = RenderedRoute & {
1709
+ params: Params;
1710
+ pathname: string;
1711
+ pathnameBase: string;
1712
+ };
1713
+ type ServerRenderPayload = {
1714
+ type: "render";
1715
+ actionData: Record<string, any> | null;
1716
+ basename?: string;
1717
+ errors: Record<string, any> | null;
1718
+ loaderData: Record<string, any>;
1719
+ location: Location;
1720
+ matches: ServerRouteMatch[];
1721
+ patches?: RenderedRoute[];
1722
+ nonce?: string;
1723
+ };
1724
+ type ServerManifestPayload = {
1725
+ type: "manifest";
1726
+ matches: RenderedRoute[];
1727
+ patches: RenderedRoute[];
1728
+ };
1729
+ type ServerActionPayload = {
1730
+ type: "action";
1731
+ actionResult: Promise<unknown>;
1732
+ rerender?: Promise<ServerRenderPayload | ServerRedirectPayload>;
1733
+ };
1734
+ type ServerRedirectPayload = {
1735
+ type: "redirect";
1736
+ status: number;
1737
+ location: string;
1738
+ replace: boolean;
1739
+ reload: boolean;
1740
+ };
1741
+ type ServerPayload = ServerRenderPayload | ServerManifestPayload | ServerActionPayload | ServerRedirectPayload;
1742
+
1743
+ type DecodeServerResponseFunction = (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
1744
+ type EncodeActionFunction = (args: unknown[]) => Promise<BodyInit>;
1745
+ declare global {
1746
+ interface Window {
1747
+ __router: Router$1;
1748
+ __routerInitialized: boolean;
1749
+ __routerActionID: number;
1750
+ }
1751
+ }
1752
+ declare function createCallServer({ decode, encodeAction, }: {
1753
+ decode: DecodeServerResponseFunction;
1754
+ encodeAction: EncodeActionFunction;
1755
+ }): (id: string, args: unknown[]) => Promise<unknown>;
1756
+ declare function RSCHydratedRouter({ decode, payload, }: {
1757
+ decode: DecodeServerResponseFunction;
1758
+ payload: ServerPayload;
1759
+ }): React.JSX.Element;
1760
+
1761
+ declare global {
1762
+ interface Window {
1763
+ __FLIGHT_DATA: any[];
1764
+ }
1765
+ }
1766
+ declare function getServerStream(): ReadableStream<any>;
1767
+
1736
1768
  declare global {
1737
1769
  interface Navigator {
1738
1770
  connection?: {
@@ -1740,7 +1772,7 @@ declare global {
1740
1772
  };
1741
1773
  }
1742
1774
  }
1743
- declare function getPatchRoutesOnNavigationFunction(manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, routeDiscovery: ServerBuild["routeDiscovery"], isSpaMode: boolean, basename: string | undefined): PatchRoutesOnNavigationFunction | undefined;
1744
- declare function useFogOFWarDiscovery(router: Router$1, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, routeDiscovery: ServerBuild["routeDiscovery"], isSpaMode: boolean): void;
1775
+ declare function getPatchRoutesOnNavigationFunction(manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, isSpaMode: boolean, basename: string | undefined): PatchRoutesOnNavigationFunction | undefined;
1776
+ declare function useFogOFWarDiscovery(router: Router$1, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, isSpaMode: boolean): void;
1745
1777
 
1746
- export { useSubmit as $, type AssetsManifest as A, type BrowserRouterProps as B, type FetcherSubmitFunction as C, type DOMRouterOpts as D, type EntryContext as E, type FutureConfig as F, type FetcherWithComponents as G, type HashRouterProps as H, type IndexRouteProps as I, createBrowserRouter as J, createHashRouter as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateProps as N, type OutletProps as O, type PathRouteProps as P, BrowserRouter as Q, type RouterProviderProps as R, type ServerBuild as S, HashRouter as T, Link as U, HistoryRouter as V, NavLink as W, Form as X, ScrollRestoration as Y, useLinkClickHandler as Z, useSearchParams as _, type AwaitProps as a, useFormAction as a0, useFetcher as a1, useFetchers as a2, useBeforeUnload as a3, usePrompt as a4, useViewTransitionState as a5, type FetcherSubmitOptions as a6, type ParamKeyValuePair as a7, type SubmitOptions as a8, type URLSearchParamsInit as a9, type SubmitTarget as aa, createSearchParams as ab, Meta as ac, Links as ad, Scripts as ae, PrefetchPageLinks as af, type ScriptsProps as ag, type HandleDataRequestFunction as ah, type HandleDocumentRequestFunction as ai, type HandleErrorFunction as aj, type ServerEntryModule as ak, hydrationRouteProperties as al, mapRouteProperties as am, FrameworkContext as an, getPatchRoutesOnNavigationFunction as ao, useFogOFWarDiscovery as ap, createClientRoutes as aq, createClientRoutesWithHMRRevalidationOptOut as ar, shouldHydrateRouteLoader as as, useScrollRestoration as at, type MemoryRouterProps as b, type RouteProps as c, type RouterProps as d, type RoutesProps as e, Await as f, MemoryRouter as g, Navigate as h, Outlet as i, Route$1 as j, Router as k, RouterProvider as l, Routes as m, createMemoryRouter as n, createRoutesFromChildren as o, createRoutesFromElements as p, type HistoryRouterProps as q, renderMatches as r, type LinkProps as s, type NavLinkProps as t, type NavLinkRenderProps as u, type FetcherFormProps as v, type FormProps as w, type ScrollRestorationProps as x, type SetURLSearchParams as y, type SubmitFunction as z };
1778
+ export { useLinkClickHandler as $, type AssetsManifest as A, type BrowserRouterProps as B, type CriticalCss as C, type DOMRouterOpts as D, type EntryContext as E, type FutureConfig as F, type SubmitFunction as G, type HashRouterProps as H, type IndexRouteProps as I, type FetcherSubmitFunction as J, type FetcherWithComponents as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateProps as N, type OutletProps as O, type PathRouteProps as P, createBrowserRouter as Q, type RouterProviderProps as R, type ServerPayload as S, createHashRouter as T, BrowserRouter as U, HashRouter as V, Link as W, HistoryRouter as X, NavLink as Y, Form as Z, ScrollRestoration as _, type Route$1 as a, useSearchParams as a0, useSubmit as a1, useFormAction as a2, useFetcher as a3, useFetchers as a4, useBeforeUnload as a5, usePrompt as a6, useViewTransitionState as a7, type FetcherSubmitOptions as a8, type ParamKeyValuePair as a9, type SubmitOptions as aa, type URLSearchParamsInit as ab, type SubmitTarget as ac, createSearchParams as ad, Meta as ae, Links as af, Scripts as ag, PrefetchPageLinks as ah, type ScriptsProps as ai, type DecodeServerResponseFunction as aj, type EncodeActionFunction as ak, createCallServer as al, RSCHydratedRouter as am, getServerStream as an, WithRouteComponentProps as ao, WithHydrateFallbackProps as ap, WithErrorBoundaryProps as aq, hydrationRouteProperties as ar, mapRouteProperties as as, FrameworkContext as at, getPatchRoutesOnNavigationFunction as au, useFogOFWarDiscovery as av, createClientRoutes as aw, createClientRoutesWithHMRRevalidationOptOut as ax, shouldHydrateRouteLoader as ay, useScrollRestoration as az, 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 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,11 +1,12 @@
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$1, h as RouteObject, i as Navigation, j as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, k as Blocker, l as StaticHandlerContext, m as StaticHandler, F as FutureConfig, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as unstable_InitialContext, n as IndexRouteObject, o as LoaderFunction, p as ActionFunction, M as MetaFunction, q as LinksFunction, r as NonIndexRouteObject, s as MiddlewareEnabled, t as AppLoadContext, E as Equal, v as RouterState, w as DataRouteObject, x as ClientLoaderFunction } from './route-data-BvrN3Sw4.mjs';
2
- export { V as ActionFunctionArgs, av as ClientActionFunction, aw as ClientActionFunctionArgs, ax as ClientLoaderFunctionArgs, aq as DataRouteMatch, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, z as Fetcher, $ as FormEncType, a0 as FormMethod, aF as Future, G as GetScrollPositionFunction, y as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ag as IDLE_BLOCKER, af as IDLE_FETCHER, ae as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, a3 as LoaderFunctionArgs, aA as MetaArgs, aB as MetaDescriptor, J as NavigationStates, ar as Navigator, aC as PageLinkDescriptor, as as PatchRoutesOnNavigationFunction, at as PatchRoutesOnNavigationFunctionArgs, a5 as PathParam, a6 as RedirectFunction, au as RouteMatch, Q as RouterFetchOptions, R as RouterInit, O as RouterNavigateOptions, K as RouterSubscriber, a8 as ShouldRevalidateFunction, a9 as ShouldRevalidateFunctionArgs, aL as UNSAFE_DataRouterContext, aM as UNSAFE_DataRouterStateContext, Z 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, ac as createPath, ah as data, ai as generatePath, aj as isRouteErrorResponse, ak as matchPath, al as matchRoutes, ad as parsePath, am as redirect, an as redirectDocument, ao as replace, ap as resolvePath, a4 as unstable_MiddlewareFunction, a7 as unstable_RouterContext, ab as unstable_RouterContextProvider, aG as unstable_SerializesTo, aa as unstable_createContext } from './route-data-BvrN3Sw4.mjs';
3
- import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, S as ServerBuild } from './fog-of-war-B1MWugqW.mjs';
4
- export { f as Await, a as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, v as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, w as FormProps, ah as HandleDataRequestFunction, ai as HandleDocumentRequestFunction, aj as HandleErrorFunction, T as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, s as LinkProps, ad as Links, g as MemoryRouter, M as MemoryRouterOpts, b as MemoryRouterProps, ac as Meta, W as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, x as ScrollRestorationProps, ak as ServerEntryModule, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, an as UNSAFE_FrameworkContext, aq as UNSAFE_createClientRoutes, ar as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ao as UNSAFE_getPatchRoutesOnNavigationFunction, al as UNSAFE_hydrationRouteProperties, am as UNSAFE_mapRouteProperties, as as UNSAFE_shouldHydrateRouteLoader, ap as UNSAFE_useFogOFWarDiscovery, at as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './fog-of-war-B1MWugqW.mjs';
1
+ import { a as Router, b as RouteModules, D as DataStrategyFunction, c as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, d as RelativeRoutingType, e as Location, f as Action, P as ParamParseKey, g as Path, h as PathPattern, i as PathMatch, N as NavigateOptions, j as Params$1, k as RouteObject, l as Navigation, m as RevalidationState, U as UIMatch, n as SerializeFrom, B as BlockerFunction, o as Blocker, p as StaticHandlerContext, q as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, r as unstable_InitialContext, s as IndexRouteObject, t as LoaderFunction, v as ActionFunction, w as MetaFunction, x as LinksFunction, y as NonIndexRouteObject, E as Equal, z as RouterState, G as DataRouteObject, J as ClientLoaderFunction } from './route-data-BIYebJr3.mjs';
2
+ export { aw as ClientActionFunction, ax as ClientActionFunctionArgs, ay as ClientLoaderFunctionArgs, ar as DataRouteMatch, Z as DataStrategyFunctionArgs, _ as DataStrategyMatch, $ as DataStrategyResult, a1 as ErrorResponse, Q as Fetcher, a2 as FormEncType, a3 as FormMethod, aG as Future, K as GetScrollPositionFunction, O as GetScrollRestorationKeyFunction, a4 as HTMLFormMethod, az as HeadersArgs, aA as HeadersFunction, aE as HtmlLinkDescriptor, ah as IDLE_BLOCKER, ag as IDLE_FETCHER, af as IDLE_NAVIGATION, a5 as LazyRouteFunction, aF as LinkDescriptor, aB as MetaArgs, aC as MetaDescriptor, V as NavigationStates, as as Navigator, aD as PageLinkDescriptor, at as PatchRoutesOnNavigationFunction, au as PatchRoutesOnNavigationFunctionArgs, a7 as PathParam, a8 as RedirectFunction, av as RouteMatch, Y as RouterFetchOptions, R as RouterInit, X as RouterNavigateOptions, W as RouterSubscriber, aa as ShouldRevalidateFunction, ab as ShouldRevalidateFunctionArgs, aM as UNSAFE_DataRouterContext, aN as UNSAFE_DataRouterStateContext, a0 as UNSAFE_DataWithResponseInit, aL as UNSAFE_ErrorResponseImpl, aO as UNSAFE_FetchersContext, aP as UNSAFE_LocationContext, aQ as UNSAFE_NavigationContext, aR as UNSAFE_RouteContext, aS as UNSAFE_ViewTransitionContext, aI as UNSAFE_createBrowserHistory, aK as UNSAFE_createRouter, aJ 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, a6 as unstable_MiddlewareFunction, a9 as unstable_RouterContext, aH as unstable_SerializesTo, ac as unstable_createContext } from './route-data-BIYebJr3.mjs';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss, S as ServerPayload } from './fog-of-war-C5L_Yd5M.mjs';
4
+ export { g as Await, b as AwaitProps, U as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, aj as DecodeServerResponseFunction, ak as EncodeActionFunction, w as FetcherFormProps, J as FetcherSubmitFunction, a8 as FetcherSubmitOptions, K as FetcherWithComponents, Z as Form, x as FormProps, V as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, W as Link, t as LinkProps, af as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ae as Meta, Y as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a9 as ParamKeyValuePair, P as PathRouteProps, ah as PrefetchPageLinks, am 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, ag as Scripts, ai as ScriptsProps, _ as ScrollRestoration, y as ScrollRestorationProps, z as SetURLSearchParams, G as SubmitFunction, aa as SubmitOptions, ac as SubmitTarget, at as UNSAFE_FrameworkContext, aq as UNSAFE_WithErrorBoundaryProps, ap as UNSAFE_WithHydrateFallbackProps, ao as UNSAFE_WithRouteComponentProps, aw as UNSAFE_createClientRoutes, ax as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, au as UNSAFE_getPatchRoutesOnNavigationFunction, ar as UNSAFE_hydrationRouteProperties, as as UNSAFE_mapRouteProperties, ay as UNSAFE_shouldHydrateRouteLoader, av as UNSAFE_useFogOFWarDiscovery, az as UNSAFE_useScrollRestoration, ab as URLSearchParamsInit, Q as createBrowserRouter, al as createCallServer, T as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ad as createSearchParams, an as getServerStream, r as renderMatches, X as unstable_HistoryRouter, a6 as unstable_usePrompt, a5 as useBeforeUnload, a3 as useFetcher, a4 as useFetchers, a2 as useFormAction, $ as useLinkClickHandler, a0 as useSearchParams, a1 as useSubmit, a7 as useViewTransitionState } from './fog-of-war-C5L_Yd5M.mjs';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
8
8
  export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
9
+ import { A as AppLoadContext } from './data-CQbyyGzl.mjs';
9
10
 
10
11
  declare const SingleFetchRedirectSymbol: unique symbol;
11
12
  declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined): DataStrategyFunction;
@@ -23,6 +24,56 @@ declare enum ServerMode {
23
24
  Test = "test"
24
25
  }
25
26
 
27
+ type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
28
+ interface ServerRoute extends Route {
29
+ children: ServerRoute[];
30
+ module: ServerRouteModule;
31
+ }
32
+
33
+ type OptionalCriticalCss = CriticalCss | undefined;
34
+ /**
35
+ * The output of the compiler for the server build.
36
+ */
37
+ interface ServerBuild {
38
+ entry: {
39
+ module: ServerEntryModule;
40
+ };
41
+ routes: ServerRouteManifest;
42
+ assets: AssetsManifest;
43
+ basename?: string;
44
+ publicPath: string;
45
+ assetsBuildDirectory: string;
46
+ future: FutureConfig;
47
+ ssr: boolean;
48
+ unstable_getCriticalCss?: (args: {
49
+ pathname: string;
50
+ }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
51
+ /**
52
+ * @deprecated This is now done via a custom header during prerendering
53
+ */
54
+ isSpaMode: boolean;
55
+ prerender: string[];
56
+ }
57
+ interface HandleDocumentRequestFunction {
58
+ (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext): Promise<Response> | Response;
59
+ }
60
+ interface HandleDataRequestFunction {
61
+ (response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
62
+ }
63
+ interface HandleErrorFunction {
64
+ (error: unknown, args: LoaderFunctionArgs | ActionFunctionArgs): void;
65
+ }
66
+ /**
67
+ * A module that serves as the entry point for a Remix app during server
68
+ * rendering.
69
+ */
70
+ interface ServerEntryModule {
71
+ default: HandleDocumentRequestFunction;
72
+ handleDataRequest?: HandleDataRequestFunction;
73
+ handleError?: HandleErrorFunction;
74
+ streamTimeout?: number;
75
+ }
76
+
26
77
  /**
27
78
  Resolves a URL against the current location.
28
79
 
@@ -424,7 +475,7 @@ declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticH
424
475
  * @category Data Routers
425
476
  */
426
477
  declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
427
- future?: Partial<FutureConfig>;
478
+ future?: Partial<FutureConfig$1>;
428
479
  }): Router;
429
480
 
430
481
  interface ServerRouterProps {
@@ -483,7 +534,7 @@ interface RoutesTestStubProps {
483
534
  /**
484
535
  * Future flags mimicking the settings in react-router.config.ts
485
536
  */
486
- future?: Partial<FutureConfig$1>;
537
+ future?: Partial<FutureConfig>;
487
538
  }
488
539
  /**
489
540
  * @category Utils
@@ -564,7 +615,7 @@ interface SessionData {
564
615
  /**
565
616
  * Session persists data across HTTP requests.
566
617
  *
567
- * @see https://reactrouter.com/explanation/sessions-and-cookies#sessions
618
+ * @see https://remix.run/utils/sessions#session-api
568
619
  */
569
620
  interface Session<Data = SessionData, FlashData = Data> {
570
621
  /**
@@ -614,13 +665,15 @@ type CreateSessionFunction = <Data = SessionData, FlashData = Data>(initialData?
614
665
  *
615
666
  * Note: This function is typically not invoked directly by application code.
616
667
  * Instead, use a `SessionStorage` object's `getSession` method.
668
+ *
669
+ * @see https://remix.run/utils/sessions#createsession
617
670
  */
618
671
  declare const createSession: CreateSessionFunction;
619
672
  type IsSessionFunction = (object: any) => object is Session;
620
673
  /**
621
- * Returns true if an object is a React Router session.
674
+ * Returns true if an object is a Remix session.
622
675
  *
623
- * @see https://reactrouter.com/api/utils/isSession
676
+ * @see https://remix.run/utils/sessions#issession
624
677
  */
625
678
  declare const isSession: IsSessionFunction;
626
679
  /**
@@ -761,6 +814,11 @@ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [
761
814
  */
762
815
  declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
763
816
 
817
+ declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (payload: ServerPayload) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>): Promise<Response>;
818
+ declare function RSCStaticRouter({ payload }: {
819
+ payload: ServerPayload;
820
+ }): React.JSX.Element | null;
821
+
764
822
  declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
765
823
 
766
824
  type RemixErrorBoundaryProps = React.PropsWithChildren<{
@@ -794,4 +852,4 @@ declare function getHydrationData(state: {
794
852
  hasHydrateFallback: boolean;
795
853
  }, location: Path, basename: string | undefined, isSpaMode: boolean): HydrationState;
796
854
 
797
- export { ActionFunction, AppLoadContext, Blocker, BlockerFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, ServerBuild, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, unstable_InitialContext, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
855
+ export { ActionFunction, ActionFunctionArgs, AppLoadContext, Blocker, BlockerFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, RSCStaticRouter, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, routeRSCServerRequest, unstable_InitialContext, unstable_RouterContextProvider, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };