react-router 0.0.0-experimental-64e35e758 → 0.0.0-experimental-7db49e8d4
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/CHANGELOG.md +0 -7
- package/dist/{production/lib-C1JSsICm.d.mts → development/browser-BM9EKN98.d.mts} +80 -2
- package/dist/development/{chunk-AJ3FGZOA.mjs → chunk-UKHDCHH6.mjs} +1200 -325
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.js +2 -1
- package/dist/development/dom-export.mjs +3 -2
- package/dist/development/index.d.mts +16 -5
- package/dist/development/index.d.ts +92 -3
- package/dist/development/index.js +1204 -323
- package/dist/development/index.mjs +13 -2
- 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-DCE0tH5m.d.ts → development/register-B0EYMBux.d.ts} +13 -2
- package/dist/{production/route-data-ByAYLHuM.d.mts → development/route-data-B3YkvRuy.d.mts} +13 -2
- package/dist/development/rsc-export.d.mts +1803 -0
- package/dist/development/rsc-export.d.ts +1803 -0
- package/dist/development/rsc-export.js +2906 -0
- package/dist/development/rsc-export.mjs +2870 -0
- package/dist/{development/lib-C1JSsICm.d.mts → production/browser-BM9EKN98.d.mts} +80 -2
- package/dist/production/{chunk-26ZXQ6XE.mjs → chunk-ZA7BCDUO.mjs} +1200 -325
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.js +2 -1
- package/dist/production/dom-export.mjs +3 -2
- package/dist/production/index.d.mts +16 -5
- package/dist/production/index.d.ts +92 -3
- package/dist/production/index.js +1204 -323
- package/dist/production/index.mjs +13 -2
- 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-DCE0tH5m.d.ts → production/register-B0EYMBux.d.ts} +13 -2
- package/dist/{development/route-data-ByAYLHuM.d.mts → production/route-data-B3YkvRuy.d.mts} +13 -2
- package/dist/production/rsc-export.d.mts +1803 -0
- package/dist/production/rsc-export.d.ts +1803 -0
- package/dist/production/rsc-export.js +2906 -0
- package/dist/production/rsc-export.mjs +2870 -0
- package/package.json +33 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
-
## 7.6.2
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Avoid additional `with-props` chunk in Framework Mode by moving route module component prop logic from the Vite plugin to `react-router` ([#13650](https://github.com/remix-run/react-router/pull/13650))
|
|
8
|
-
- \[INTERNAL] Slight refactor of internal `headers()` function processing for use with RSC ([#13639](https://github.com/remix-run/react-router/pull/13639))
|
|
9
|
-
|
|
10
3
|
## 7.6.1
|
|
11
4
|
|
|
12
5
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs,
|
|
1
|
+
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs, b as RouteModules, S as StaticHandlerContext, H as HydrationState, k as DataRouteObject, l as ClientLoaderFunction, T as To, aq as NavigateOptions, s as BlockerFunction, B as Blocker, aT as SerializeFrom, r as RelativeRoutingType, L as Location, _ as ParamParseKey, m as Path, a2 as PathPattern, a0 as PathMatch, a7 as UIMatch, p as Navigation, aa as Action, $ as Params, a as Router$1, c as RouteObject, e as IndexRouteObject, X as LazyRouteFunction, N as NonIndexRouteObject, R as RouterInit, F as FutureConfig$1, I as InitialEntry, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, ar as Navigator, at as RouteMatch, W as HTMLFormMethod, U as FormEncType, aB as PageLinkDescriptor, aU as History, n as GetScrollRestorationKeyFunction, o as Fetcher, au as ClientActionFunction, g as LinksFunction, M as MetaFunction, a5 as ShouldRevalidateFunction } from './route-data-B3YkvRuy.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
@@ -2134,4 +2134,82 @@ declare function useViewTransitionState(to: To, opts?: {
|
|
|
2134
2134
|
relative?: RelativeRoutingType;
|
|
2135
2135
|
}): boolean;
|
|
2136
2136
|
|
|
2137
|
-
|
|
2137
|
+
type RenderedRoute = {
|
|
2138
|
+
clientAction?: ClientActionFunction;
|
|
2139
|
+
clientLoader?: ClientLoaderFunction;
|
|
2140
|
+
element?: React.ReactElement | false;
|
|
2141
|
+
errorElement?: React.ReactElement;
|
|
2142
|
+
handle?: any;
|
|
2143
|
+
hasAction: boolean;
|
|
2144
|
+
hasErrorBoundary: boolean;
|
|
2145
|
+
hasLoader: boolean;
|
|
2146
|
+
hydrateFallbackElement?: React.ReactElement;
|
|
2147
|
+
id: string;
|
|
2148
|
+
index?: boolean;
|
|
2149
|
+
links?: LinksFunction;
|
|
2150
|
+
meta?: MetaFunction;
|
|
2151
|
+
parentId?: string;
|
|
2152
|
+
path?: string;
|
|
2153
|
+
shouldRevalidate?: ShouldRevalidateFunction;
|
|
2154
|
+
};
|
|
2155
|
+
type ServerRouteMatch = RenderedRoute & {
|
|
2156
|
+
params: Params;
|
|
2157
|
+
pathname: string;
|
|
2158
|
+
pathnameBase: string;
|
|
2159
|
+
};
|
|
2160
|
+
type ServerRenderPayload = {
|
|
2161
|
+
type: "render";
|
|
2162
|
+
actionData: Record<string, any> | null;
|
|
2163
|
+
basename?: string;
|
|
2164
|
+
errors: Record<string, any> | null;
|
|
2165
|
+
loaderData: Record<string, any>;
|
|
2166
|
+
location: Location;
|
|
2167
|
+
matches: ServerRouteMatch[];
|
|
2168
|
+
patches?: RenderedRoute[];
|
|
2169
|
+
nonce?: string;
|
|
2170
|
+
};
|
|
2171
|
+
type ServerManifestPayload = {
|
|
2172
|
+
type: "manifest";
|
|
2173
|
+
patches: RenderedRoute[];
|
|
2174
|
+
};
|
|
2175
|
+
type ServerActionPayload = {
|
|
2176
|
+
type: "action";
|
|
2177
|
+
actionResult: Promise<unknown>;
|
|
2178
|
+
rerender?: Promise<ServerRenderPayload | ServerRedirectPayload>;
|
|
2179
|
+
};
|
|
2180
|
+
type ServerRedirectPayload = {
|
|
2181
|
+
type: "redirect";
|
|
2182
|
+
status: number;
|
|
2183
|
+
location: string;
|
|
2184
|
+
replace: boolean;
|
|
2185
|
+
reload: boolean;
|
|
2186
|
+
};
|
|
2187
|
+
type ServerPayload = ServerRenderPayload | ServerManifestPayload | ServerActionPayload | ServerRedirectPayload;
|
|
2188
|
+
|
|
2189
|
+
type DecodeServerResponseFunction = (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
|
|
2190
|
+
type EncodeActionFunction = (args: unknown[]) => Promise<BodyInit>;
|
|
2191
|
+
declare global {
|
|
2192
|
+
interface Window {
|
|
2193
|
+
__router: Router$1;
|
|
2194
|
+
__routerInitialized: boolean;
|
|
2195
|
+
__routerActionID: number;
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
declare function createCallServer({ decode, encodeAction, }: {
|
|
2199
|
+
decode: DecodeServerResponseFunction;
|
|
2200
|
+
encodeAction: EncodeActionFunction;
|
|
2201
|
+
}): (id: string, args: unknown[]) => Promise<unknown>;
|
|
2202
|
+
declare function RSCHydratedRouter({ decode, payload, routeDiscovery, }: {
|
|
2203
|
+
decode: DecodeServerResponseFunction;
|
|
2204
|
+
payload: ServerPayload;
|
|
2205
|
+
routeDiscovery?: "eager" | "lazy";
|
|
2206
|
+
}): React.JSX.Element;
|
|
2207
|
+
|
|
2208
|
+
declare global {
|
|
2209
|
+
interface Window {
|
|
2210
|
+
__FLIGHT_DATA: any[];
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
declare function getServerStream(): ReadableStream<any>;
|
|
2214
|
+
|
|
2215
|
+
export { useRoutes as $, type AssetsManifest as A, useInRouterContext as B, useLoaderData as C, useLocation as D, type EntryContext as E, type FutureConfig as F, useMatch as G, type HydrateFallbackType as H, type IndexRouteProps as I, useMatches as J, useNavigate as K, type LayoutRouteProps as L, type MemoryRouterOpts as M, type NavigateProps as N, type OutletProps as O, type PathRouteProps as P, useNavigation as Q, type RouterProviderProps as R, type ServerBuild as S, useNavigationType as T, useOutlet as U, useOutletContext as V, useParams as W, useResolvedPath as X, useRevalidator as Y, useRouteError as Z, useRouteLoaderData as _, type RouteComponentType as a, type BrowserRouterProps as a0, type DOMRouterOpts as a1, type HashRouterProps as a2, type HistoryRouterProps as a3, type LinkProps as a4, type NavLinkProps as a5, type NavLinkRenderProps as a6, type FetcherFormProps as a7, type FormProps as a8, type ScrollRestorationProps 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, type DecodeServerResponseFunction as aL, type EncodeActionFunction as aM, createCallServer as aN, RSCHydratedRouter as aO, getServerStream as aP, hydrationRouteProperties as aQ, mapRouteProperties as aR, withComponentProps as aS, withHydrateFallbackProps as aT, withErrorBoundaryProps as aU, FrameworkContext as aV, createClientRoutes as aW, createClientRoutesWithHMRRevalidationOptOut as aX, shouldHydrateRouteLoader as aY, useScrollRestoration as aZ, type SetURLSearchParams as aa, type SubmitFunction as ab, type FetcherSubmitFunction as ac, type FetcherWithComponents as ad, createBrowserRouter as ae, createHashRouter as af, BrowserRouter as ag, HashRouter as ah, Link as ai, HistoryRouter as aj, NavLink as ak, Form as al, ScrollRestoration as am, useLinkClickHandler as an, useSearchParams as ao, useSubmit as ap, useFormAction as aq, useFetcher as ar, useFetchers as as, useBeforeUnload as at, usePrompt as au, useViewTransitionState as av, type FetcherSubmitOptions as aw, type ParamKeyValuePair as ax, type SubmitOptions as ay, type URLSearchParamsInit as az, type ErrorBoundaryType as b, type ServerPayload as c, type AwaitProps as d, type MemoryRouterProps as e, type RouteProps as f, type RouterProps as g, type RoutesProps as h, Await as i, MemoryRouter as j, Navigate as k, Outlet as l, Route as m, Router as n, RouterProvider as o, Routes as p, createMemoryRouter as q, createRoutesFromChildren as r, createRoutesFromElements as s, renderMatches as t, type NavigateFunction as u, useBlocker as v, useActionData as w, useAsyncError as x, useAsyncValue as y, useHref as z };
|