react-router 0.0.0-experimental-49d6214de → 0.0.0-experimental-213e4b178
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/{production/browser-M5pXTCvd.d.ts → development/browser-CYoCBM_s.d.mts} +25 -8
- package/dist/development/{browser-M5pXTCvd.d.ts → browser-vPEOwWRD.d.ts} +25 -8
- package/dist/development/{chunk-XQ46UDXV.mjs → chunk-KO5HLSX2.mjs} +643 -403
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +289 -242
- package/dist/development/dom-export.mjs +7 -6
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +6 -6
- package/dist/development/index.js +645 -404
- package/dist/development/index.mjs +6 -4
- package/dist/development/lib/types/route-module.d.mts +1 -1
- package/dist/development/lib/types/route-module.d.ts +1 -1
- package/dist/development/lib/types/route-module.js +1 -1
- package/dist/development/lib/types/route-module.mjs +1 -1
- package/dist/{production/route-data-DthZ7xs2.d.mts → development/route-data-BaZTTsr9.d.mts} +9 -1
- package/dist/{production/route-data-DthZ7xs2.d.ts → development/route-data-BaZTTsr9.d.ts} +9 -1
- package/dist/development/server.d.mts +25 -6
- package/dist/development/server.d.ts +25 -6
- package/dist/development/server.js +163 -88
- package/dist/development/server.mjs +163 -88
- package/dist/production/{browser-VRpJ8b08.d.mts → browser-CYoCBM_s.d.mts} +25 -8
- package/dist/{development/browser-VRpJ8b08.d.mts → production/browser-vPEOwWRD.d.ts} +25 -8
- package/dist/production/{chunk-UTRXPJEI.mjs → chunk-A54HSCHT.mjs} +643 -403
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +289 -242
- package/dist/production/dom-export.mjs +7 -6
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +6 -6
- package/dist/production/index.js +645 -404
- package/dist/production/index.mjs +6 -4
- package/dist/production/lib/types/route-module.d.mts +1 -1
- package/dist/production/lib/types/route-module.d.ts +1 -1
- package/dist/production/lib/types/route-module.js +1 -1
- package/dist/production/lib/types/route-module.mjs +1 -1
- package/dist/{development/route-data-DthZ7xs2.d.ts → production/route-data-BaZTTsr9.d.mts} +9 -1
- package/dist/{development/route-data-DthZ7xs2.d.mts → production/route-data-BaZTTsr9.d.ts} +9 -1
- package/dist/production/server.d.mts +25 -6
- package/dist/production/server.d.ts +25 -6
- package/dist/production/server.js +163 -88
- package/dist/production/server.mjs +163 -88
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { k 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, d as RelativeRoutingType, y as NonIndexRouteObject, a3 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, ar as Navigator, au as RouteMatch, p as StaticHandlerContext, c as RouteManifest, b as RouteModules, aq as DataRouteObject, aT as RouteModule, a2 as HTMLFormMethod, a0 as FormEncType, aD as PageLinkDescriptor, aU as History, J as GetScrollRestorationKeyFunction, N as NavigateOptions, K as Fetcher, n as SerializeFrom, B as BlockerFunction, av as ClientActionFunction, ax as ClientLoaderFunction, x as LinksFunction, w as MetaFunction, a8 as ShouldRevalidateFunction, j as Params, v as ActionFunction, t as LoaderFunction } from './route-data-BaZTTsr9.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -1711,7 +1711,7 @@ type ServerRouteObject = ServerRouteObjectBase & {
|
|
|
1711
1711
|
} | {
|
|
1712
1712
|
children?: ServerRouteObject[];
|
|
1713
1713
|
});
|
|
1714
|
-
type
|
|
1714
|
+
type RenderedRoute = {
|
|
1715
1715
|
clientAction?: ClientActionFunction;
|
|
1716
1716
|
clientLoader?: ClientLoaderFunction;
|
|
1717
1717
|
element?: React.ReactElement;
|
|
@@ -1725,10 +1725,11 @@ type ServerRouteManifest = {
|
|
|
1725
1725
|
index?: boolean;
|
|
1726
1726
|
links?: LinksFunction;
|
|
1727
1727
|
meta?: MetaFunction;
|
|
1728
|
+
parentId?: string;
|
|
1728
1729
|
path?: string;
|
|
1729
1730
|
shouldRevalidate?: ShouldRevalidateFunction;
|
|
1730
1731
|
};
|
|
1731
|
-
type ServerRouteMatch =
|
|
1732
|
+
type ServerRouteMatch = RenderedRoute & {
|
|
1732
1733
|
params: Params;
|
|
1733
1734
|
pathname: string;
|
|
1734
1735
|
pathnameBase: string;
|
|
@@ -1737,7 +1738,6 @@ type ServerRenderPayload = {
|
|
|
1737
1738
|
type: "render";
|
|
1738
1739
|
actionData: Record<string, any> | null;
|
|
1739
1740
|
basename?: string;
|
|
1740
|
-
deepestRenderedBoundaryId?: string;
|
|
1741
1741
|
errors: Record<string, any> | null;
|
|
1742
1742
|
loaderData: Record<string, any>;
|
|
1743
1743
|
location: Location;
|
|
@@ -1746,24 +1746,41 @@ type ServerRenderPayload = {
|
|
|
1746
1746
|
};
|
|
1747
1747
|
type ServerManifestPayload = {
|
|
1748
1748
|
type: "manifest";
|
|
1749
|
-
matches:
|
|
1749
|
+
matches: RenderedRoute[];
|
|
1750
|
+
};
|
|
1751
|
+
type ServerActionPayload = {
|
|
1752
|
+
type: "action";
|
|
1753
|
+
actionResult: Promise<unknown>;
|
|
1754
|
+
rerender?: Promise<ServerRenderPayload>;
|
|
1750
1755
|
};
|
|
1751
|
-
type ServerPayload = ServerRenderPayload | ServerManifestPayload;
|
|
1756
|
+
type ServerPayload = ServerRenderPayload | ServerManifestPayload | ServerActionPayload;
|
|
1752
1757
|
type ServerMatch = {
|
|
1753
1758
|
statusCode: number;
|
|
1754
1759
|
headers: Headers;
|
|
1755
1760
|
payload: ServerPayload;
|
|
1756
1761
|
};
|
|
1757
|
-
|
|
1762
|
+
type DecodeCallServerFunction = (id: string, reply: FormData | string) => Promise<() => Promise<unknown>>;
|
|
1763
|
+
declare function matchServerRequest({ decodeCallServer, onError, request, routes, }: {
|
|
1764
|
+
decodeCallServer?: DecodeCallServerFunction;
|
|
1765
|
+
onError?: (error: unknown) => void;
|
|
1766
|
+
request: Request;
|
|
1767
|
+
routes: ServerRouteObject[];
|
|
1768
|
+
}): Promise<ServerMatch | Response>;
|
|
1758
1769
|
declare function routeServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (payload: ServerPayload) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>): Promise<Response>;
|
|
1759
1770
|
declare function isReactServerRequest(url: URL): boolean;
|
|
1760
1771
|
|
|
1761
1772
|
type DecodeServerResponseFunction = (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
|
|
1773
|
+
type EncodeActionFunction = (args: unknown[]) => Promise<BodyInit>;
|
|
1762
1774
|
declare global {
|
|
1763
1775
|
interface Window {
|
|
1764
1776
|
__router: Router$1;
|
|
1777
|
+
__routerInitPromise?: Promise<void>;
|
|
1765
1778
|
}
|
|
1766
1779
|
}
|
|
1780
|
+
declare function createCallServer({ decode, encodeAction, }: {
|
|
1781
|
+
decode: DecodeServerResponseFunction;
|
|
1782
|
+
encodeAction: EncodeActionFunction;
|
|
1783
|
+
}): (id: string, args: unknown[]) => Promise<unknown>;
|
|
1767
1784
|
declare function ServerBrowserRouter({ decode, payload, }: {
|
|
1768
1785
|
decode: DecodeServerResponseFunction;
|
|
1769
1786
|
payload: ServerPayload;
|
|
@@ -1776,4 +1793,4 @@ declare global {
|
|
|
1776
1793
|
}
|
|
1777
1794
|
declare function getServerStream(): ReadableStream<any>;
|
|
1778
1795
|
|
|
1779
|
-
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 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,
|
|
1796
|
+
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 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, matchServerRequest as aA, routeServerRequest as aB, type DecodeServerResponseFunction as aC, type EncodeActionFunction as aD, createCallServer as aE, ServerBrowserRouter as aF, getServerStream as aG, 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, hydrationRouteProperties as aj, mapRouteProperties as ak, FrameworkContext as al, getPatchRoutesOnNavigationFunction as am, useFogOFWarDiscovery as an, createClientRoutes as ao, createClientRoutesWithHMRRevalidationOptOut as ap, shouldHydrateRouteLoader as aq, useScrollRestoration as ar, type DecodeCallServerFunction as as, type ServerManifestPayload as at, type ServerMatch as au, type ServerRenderPayload as av, type RenderedRoute as aw, type ServerRouteMatch as ax, type ServerRouteObject as ay, isReactServerRequest 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$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
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { k 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, d as RelativeRoutingType, y as NonIndexRouteObject, a3 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, ar as Navigator, au as RouteMatch, p as StaticHandlerContext, c as RouteManifest, b as RouteModules, aq as DataRouteObject, aT as RouteModule, a2 as HTMLFormMethod, a0 as FormEncType, aD as PageLinkDescriptor, aU as History, J as GetScrollRestorationKeyFunction, N as NavigateOptions, K as Fetcher, n as SerializeFrom, B as BlockerFunction, av as ClientActionFunction, ax as ClientLoaderFunction, x as LinksFunction, w as MetaFunction, a8 as ShouldRevalidateFunction, j as Params, v as ActionFunction, t as LoaderFunction } from './route-data-BaZTTsr9.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -1711,7 +1711,7 @@ type ServerRouteObject = ServerRouteObjectBase & {
|
|
|
1711
1711
|
} | {
|
|
1712
1712
|
children?: ServerRouteObject[];
|
|
1713
1713
|
});
|
|
1714
|
-
type
|
|
1714
|
+
type RenderedRoute = {
|
|
1715
1715
|
clientAction?: ClientActionFunction;
|
|
1716
1716
|
clientLoader?: ClientLoaderFunction;
|
|
1717
1717
|
element?: React.ReactElement;
|
|
@@ -1725,10 +1725,11 @@ type ServerRouteManifest = {
|
|
|
1725
1725
|
index?: boolean;
|
|
1726
1726
|
links?: LinksFunction;
|
|
1727
1727
|
meta?: MetaFunction;
|
|
1728
|
+
parentId?: string;
|
|
1728
1729
|
path?: string;
|
|
1729
1730
|
shouldRevalidate?: ShouldRevalidateFunction;
|
|
1730
1731
|
};
|
|
1731
|
-
type ServerRouteMatch =
|
|
1732
|
+
type ServerRouteMatch = RenderedRoute & {
|
|
1732
1733
|
params: Params;
|
|
1733
1734
|
pathname: string;
|
|
1734
1735
|
pathnameBase: string;
|
|
@@ -1737,7 +1738,6 @@ type ServerRenderPayload = {
|
|
|
1737
1738
|
type: "render";
|
|
1738
1739
|
actionData: Record<string, any> | null;
|
|
1739
1740
|
basename?: string;
|
|
1740
|
-
deepestRenderedBoundaryId?: string;
|
|
1741
1741
|
errors: Record<string, any> | null;
|
|
1742
1742
|
loaderData: Record<string, any>;
|
|
1743
1743
|
location: Location;
|
|
@@ -1746,24 +1746,41 @@ type ServerRenderPayload = {
|
|
|
1746
1746
|
};
|
|
1747
1747
|
type ServerManifestPayload = {
|
|
1748
1748
|
type: "manifest";
|
|
1749
|
-
matches:
|
|
1749
|
+
matches: RenderedRoute[];
|
|
1750
|
+
};
|
|
1751
|
+
type ServerActionPayload = {
|
|
1752
|
+
type: "action";
|
|
1753
|
+
actionResult: Promise<unknown>;
|
|
1754
|
+
rerender?: Promise<ServerRenderPayload>;
|
|
1750
1755
|
};
|
|
1751
|
-
type ServerPayload = ServerRenderPayload | ServerManifestPayload;
|
|
1756
|
+
type ServerPayload = ServerRenderPayload | ServerManifestPayload | ServerActionPayload;
|
|
1752
1757
|
type ServerMatch = {
|
|
1753
1758
|
statusCode: number;
|
|
1754
1759
|
headers: Headers;
|
|
1755
1760
|
payload: ServerPayload;
|
|
1756
1761
|
};
|
|
1757
|
-
|
|
1762
|
+
type DecodeCallServerFunction = (id: string, reply: FormData | string) => Promise<() => Promise<unknown>>;
|
|
1763
|
+
declare function matchServerRequest({ decodeCallServer, onError, request, routes, }: {
|
|
1764
|
+
decodeCallServer?: DecodeCallServerFunction;
|
|
1765
|
+
onError?: (error: unknown) => void;
|
|
1766
|
+
request: Request;
|
|
1767
|
+
routes: ServerRouteObject[];
|
|
1768
|
+
}): Promise<ServerMatch | Response>;
|
|
1758
1769
|
declare function routeServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (payload: ServerPayload) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>): Promise<Response>;
|
|
1759
1770
|
declare function isReactServerRequest(url: URL): boolean;
|
|
1760
1771
|
|
|
1761
1772
|
type DecodeServerResponseFunction = (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
|
|
1773
|
+
type EncodeActionFunction = (args: unknown[]) => Promise<BodyInit>;
|
|
1762
1774
|
declare global {
|
|
1763
1775
|
interface Window {
|
|
1764
1776
|
__router: Router$1;
|
|
1777
|
+
__routerInitPromise?: Promise<void>;
|
|
1765
1778
|
}
|
|
1766
1779
|
}
|
|
1780
|
+
declare function createCallServer({ decode, encodeAction, }: {
|
|
1781
|
+
decode: DecodeServerResponseFunction;
|
|
1782
|
+
encodeAction: EncodeActionFunction;
|
|
1783
|
+
}): (id: string, args: unknown[]) => Promise<unknown>;
|
|
1767
1784
|
declare function ServerBrowserRouter({ decode, payload, }: {
|
|
1768
1785
|
decode: DecodeServerResponseFunction;
|
|
1769
1786
|
payload: ServerPayload;
|
|
@@ -1776,4 +1793,4 @@ declare global {
|
|
|
1776
1793
|
}
|
|
1777
1794
|
declare function getServerStream(): ReadableStream<any>;
|
|
1778
1795
|
|
|
1779
|
-
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 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,
|
|
1796
|
+
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 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, matchServerRequest as aA, routeServerRequest as aB, type DecodeServerResponseFunction as aC, type EncodeActionFunction as aD, createCallServer as aE, ServerBrowserRouter as aF, getServerStream as aG, 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, hydrationRouteProperties as aj, mapRouteProperties as ak, FrameworkContext as al, getPatchRoutesOnNavigationFunction as am, useFogOFWarDiscovery as an, createClientRoutes as ao, createClientRoutesWithHMRRevalidationOptOut as ap, shouldHydrateRouteLoader as aq, useScrollRestoration as ar, type DecodeCallServerFunction as as, type ServerManifestPayload as at, type ServerMatch as au, type ServerRenderPayload as av, type RenderedRoute as aw, type ServerRouteMatch as ax, type ServerRouteObject as ay, isReactServerRequest 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$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 };
|