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.
- package/CHANGELOG.md +0 -19
- package/dist/development/{chunk-4O47XL4L.mjs → chunk-RMWJZNG5.mjs} +1045 -354
- package/dist/development/data-CQbyyGzl.d.mts +11 -0
- package/dist/development/data-CQbyyGzl.d.ts +11 -0
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -1
- package/dist/development/dom-export.js +6130 -35
- package/dist/development/dom-export.mjs +3 -6
- package/dist/development/fog-of-war-C5L_Yd5M.d.mts +1778 -0
- package/dist/{production/fog-of-war-B1MWugqW.d.mts → development/fog-of-war-DrUCUQQ-.d.ts} +170 -138
- package/dist/development/index.d.mts +68 -10
- package/dist/development/index.d.ts +207 -1889
- package/dist/development/index.js +1052 -352
- package/dist/development/index.mjs +19 -2
- package/dist/development/lib/types/route-module.d.mts +2 -1
- package/dist/development/lib/types/route-module.d.ts +2 -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-BvrN3Sw4.d.mts → development/route-data-BIYebJr3.d.mts} +12 -12
- package/dist/{production/route-data-fNWkI-4T.d.ts → development/route-data-BIYebJr3.d.ts} +12 -12
- package/dist/development/rsc-export.d.mts +1788 -0
- package/dist/development/rsc-export.d.ts +1788 -0
- package/dist/development/rsc-export.js +2778 -0
- package/dist/development/rsc-export.mjs +2743 -0
- package/dist/production/{chunk-P2C2EGLF.mjs → chunk-BXBFRMFA.mjs} +1045 -354
- package/dist/production/data-CQbyyGzl.d.mts +11 -0
- package/dist/production/data-CQbyyGzl.d.ts +11 -0
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -1
- package/dist/production/dom-export.js +6130 -35
- package/dist/production/dom-export.mjs +3 -6
- package/dist/production/fog-of-war-C5L_Yd5M.d.mts +1778 -0
- package/dist/{development/fog-of-war-B1MWugqW.d.mts → production/fog-of-war-DrUCUQQ-.d.ts} +170 -138
- package/dist/production/index.d.mts +68 -10
- package/dist/production/index.d.ts +207 -1889
- package/dist/production/index.js +1052 -352
- package/dist/production/index.mjs +19 -2
- package/dist/production/lib/types/route-module.d.mts +2 -1
- package/dist/production/lib/types/route-module.d.ts +2 -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-BvrN3Sw4.d.mts → production/route-data-BIYebJr3.d.mts} +12 -12
- package/dist/{development/route-data-fNWkI-4T.d.ts → production/route-data-BIYebJr3.d.ts} +12 -12
- package/dist/production/rsc-export.d.mts +1788 -0
- package/dist/production/rsc-export.d.ts +1788 -0
- package/dist/production/rsc-export.js +2778 -0
- package/dist/production/rsc-export.mjs +2743 -0
- package/package.json +33 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-e56aa53bc
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
+
"use client";
|
|
11
12
|
import {
|
|
12
13
|
Action,
|
|
13
14
|
Await,
|
|
@@ -33,6 +34,8 @@ import {
|
|
|
33
34
|
NavigationContext,
|
|
34
35
|
Outlet,
|
|
35
36
|
PrefetchPageLinks,
|
|
37
|
+
RSCHydratedRouter,
|
|
38
|
+
RSCStaticRouter,
|
|
36
39
|
RemixErrorBoundary,
|
|
37
40
|
Route,
|
|
38
41
|
RouteContext,
|
|
@@ -47,8 +50,12 @@ import {
|
|
|
47
50
|
StaticRouter,
|
|
48
51
|
StaticRouterProvider,
|
|
49
52
|
ViewTransitionContext,
|
|
53
|
+
WithErrorBoundaryProps,
|
|
54
|
+
WithHydrateFallbackProps,
|
|
55
|
+
WithRouteComponentProps,
|
|
50
56
|
createBrowserHistory,
|
|
51
57
|
createBrowserRouter,
|
|
58
|
+
createCallServer,
|
|
52
59
|
createClientRoutes,
|
|
53
60
|
createClientRoutesWithHMRRevalidationOptOut,
|
|
54
61
|
createCookie,
|
|
@@ -73,6 +80,7 @@ import {
|
|
|
73
80
|
generatePath,
|
|
74
81
|
getHydrationData,
|
|
75
82
|
getPatchRoutesOnNavigationFunction,
|
|
83
|
+
getServerStream,
|
|
76
84
|
getTurboStreamSingleFetchDataStrategy,
|
|
77
85
|
href,
|
|
78
86
|
hydrationRouteProperties,
|
|
@@ -89,6 +97,7 @@ import {
|
|
|
89
97
|
renderMatches,
|
|
90
98
|
replace,
|
|
91
99
|
resolvePath,
|
|
100
|
+
routeRSCServerRequest,
|
|
92
101
|
setDevServerHooks,
|
|
93
102
|
shouldHydrateRouteLoader,
|
|
94
103
|
unstable_RouterContextProvider,
|
|
@@ -125,7 +134,7 @@ import {
|
|
|
125
134
|
useSearchParams,
|
|
126
135
|
useSubmit,
|
|
127
136
|
useViewTransitionState
|
|
128
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-BXBFRMFA.mjs";
|
|
129
138
|
export {
|
|
130
139
|
Await,
|
|
131
140
|
BrowserRouter,
|
|
@@ -143,6 +152,8 @@ export {
|
|
|
143
152
|
Action as NavigationType,
|
|
144
153
|
Outlet,
|
|
145
154
|
PrefetchPageLinks,
|
|
155
|
+
RSCHydratedRouter,
|
|
156
|
+
RSCStaticRouter,
|
|
146
157
|
Route,
|
|
147
158
|
Router,
|
|
148
159
|
RouterProvider,
|
|
@@ -164,6 +175,9 @@ export {
|
|
|
164
175
|
ServerMode as UNSAFE_ServerMode,
|
|
165
176
|
SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
|
|
166
177
|
ViewTransitionContext as UNSAFE_ViewTransitionContext,
|
|
178
|
+
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
|
|
179
|
+
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
|
|
180
|
+
WithRouteComponentProps as UNSAFE_WithRouteComponentProps,
|
|
167
181
|
createBrowserHistory as UNSAFE_createBrowserHistory,
|
|
168
182
|
createClientRoutes as UNSAFE_createClientRoutes,
|
|
169
183
|
createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
|
|
@@ -180,6 +194,7 @@ export {
|
|
|
180
194
|
useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
|
|
181
195
|
useScrollRestoration as UNSAFE_useScrollRestoration,
|
|
182
196
|
createBrowserRouter,
|
|
197
|
+
createCallServer,
|
|
183
198
|
createCookie,
|
|
184
199
|
createCookieSessionStorage,
|
|
185
200
|
createHashRouter,
|
|
@@ -197,6 +212,7 @@ export {
|
|
|
197
212
|
createStaticRouter,
|
|
198
213
|
data,
|
|
199
214
|
generatePath,
|
|
215
|
+
getServerStream,
|
|
200
216
|
href,
|
|
201
217
|
isCookie,
|
|
202
218
|
isRouteErrorResponse,
|
|
@@ -209,6 +225,7 @@ export {
|
|
|
209
225
|
renderMatches,
|
|
210
226
|
replace,
|
|
211
227
|
resolvePath,
|
|
228
|
+
routeRSCServerRequest,
|
|
212
229
|
HistoryRouter as unstable_HistoryRouter,
|
|
213
230
|
unstable_RouterContextProvider,
|
|
214
231
|
unstable_createContext,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aF as LinkDescriptor, aC as MetaDescriptor, aU as ServerDataFrom, aV as ClientDataFrom, aW as Func, aX as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, M as MiddlewareEnabled, aY as Pretty } from '../../route-data-BIYebJr3.mjs';
|
|
2
|
+
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
|
|
2
3
|
import 'react';
|
|
3
4
|
|
|
4
5
|
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aF as LinkDescriptor, aC as MetaDescriptor, aU as ServerDataFrom, aV as ClientDataFrom, aW as Func, aX as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, M as MiddlewareEnabled, aY as Pretty } from '../../route-data-BIYebJr3.js';
|
|
2
|
+
import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
|
|
4
5
|
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
|
@@ -912,8 +912,11 @@ interface Router {
|
|
|
912
912
|
* @param routeId The parent route id or a callback function accepting `patch`
|
|
913
913
|
* to perform batch patching
|
|
914
914
|
* @param children The additional children routes
|
|
915
|
+
* @param unstable_allowElementMutations Allow mutation or route elements on
|
|
916
|
+
* existing routes. Intended for RSC-usage
|
|
917
|
+
* only.
|
|
915
918
|
*/
|
|
916
|
-
patchRoutes(routeId: string | null, children: AgnosticRouteObject[]): void;
|
|
919
|
+
patchRoutes(routeId: string | null, children: AgnosticRouteObject[], unstable_allowElementMutations?: boolean): void;
|
|
917
920
|
/**
|
|
918
921
|
* @private
|
|
919
922
|
* PRIVATE - DO NOT USE
|
|
@@ -922,6 +925,13 @@ interface Router {
|
|
|
922
925
|
* TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)
|
|
923
926
|
*/
|
|
924
927
|
_internalSetRoutes(routes: AgnosticRouteObject[]): void;
|
|
928
|
+
/**
|
|
929
|
+
* @private
|
|
930
|
+
* PRIVATE - DO NOT USE
|
|
931
|
+
*
|
|
932
|
+
* Cause subscribers to re-render. This is used to force a re-render.
|
|
933
|
+
*/
|
|
934
|
+
_internalSetStateDoNotUseOrYouWillBreakYourApp(state: Partial<RouterState>): void;
|
|
925
935
|
/**
|
|
926
936
|
* @private
|
|
927
937
|
* PRIVATE - DO NOT USE
|
|
@@ -1397,16 +1407,6 @@ interface RouteContextObject {
|
|
|
1397
1407
|
}
|
|
1398
1408
|
declare const RouteContext: React.Context<RouteContextObject>;
|
|
1399
1409
|
|
|
1400
|
-
/**
|
|
1401
|
-
* An object of unknown type for route loaders and actions provided by the
|
|
1402
|
-
* server's `getLoadContext()` function. This is defined as an empty interface
|
|
1403
|
-
* specifically so apps can leverage declaration merging to augment this type
|
|
1404
|
-
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
|
1405
|
-
*/
|
|
1406
|
-
interface AppLoadContext {
|
|
1407
|
-
[key: string]: unknown;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
1410
|
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
1411
1411
|
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
|
|
1412
1412
|
interface HtmlLinkProps {
|
|
@@ -1746,4 +1746,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
|
1746
1746
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1747
1747
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1748
1748
|
|
|
1749
|
-
export { type
|
|
1749
|
+
export { type DataStrategyResult as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type DataRouteObject as G, type HydrationState as H, type InitialEntry as I, type ClientLoaderFunction as J, type GetScrollPositionFunction as K, type LoaderFunctionArgs as L, type MiddlewareEnabled as M, type NavigateOptions as N, type GetScrollRestorationKeyFunction as O, type ParamParseKey as P, type Fetcher as Q, type RouterInit as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type NavigationStates as V, type RouterSubscriber as W, type RouterNavigateOptions as X, type RouterFetchOptions as Y, type DataStrategyFunctionArgs as Z, type DataStrategyMatch as _, type Router as a, DataWithResponseInit as a0, type ErrorResponse as a1, type FormEncType as a2, type FormMethod as a3, type HTMLFormMethod as a4, type LazyRouteFunction as a5, type unstable_MiddlewareFunction as a6, type PathParam as a7, type RedirectFunction as a8, type unstable_RouterContext as a9, type HeadersFunction as aA, type MetaArgs as aB, type MetaDescriptor as aC, type PageLinkDescriptor as aD, type HtmlLinkDescriptor as aE, type LinkDescriptor as aF, type Future as aG, type unstable_SerializesTo as aH, createBrowserHistory as aI, invariant as aJ, createRouter as aK, ErrorResponseImpl as aL, DataRouterContext as aM, DataRouterStateContext as aN, FetchersContext as aO, LocationContext as aP, NavigationContext as aQ, RouteContext as aR, ViewTransitionContext as aS, type History as aT, type ServerDataFrom as aU, type ClientDataFrom as aV, type Func as aW, type unstable_MiddlewareNextFunction as aX, type Pretty as aY, type ShouldRevalidateFunction as aa, type ShouldRevalidateFunctionArgs as ab, unstable_createContext as ac, createPath as ad, parsePath as ae, IDLE_NAVIGATION as af, IDLE_FETCHER as ag, IDLE_BLOCKER as ah, data as ai, generatePath as aj, isRouteErrorResponse as ak, matchPath as al, matchRoutes as am, redirect as an, redirectDocument as ao, replace as ap, resolvePath as aq, type DataRouteMatch as ar, type Navigator as as, type PatchRoutesOnNavigationFunction as at, type PatchRoutesOnNavigationFunctionArgs as au, type RouteMatch as av, type ClientActionFunction as aw, type ClientActionFunctionArgs as ax, type ClientLoaderFunctionArgs as ay, type HeadersArgs as az, type RouteModules as b, type RouteManifest as c, type RelativeRoutingType as d, type Location as e, Action as f, type Path as g, type PathPattern as h, type PathMatch as i, type Params as j, type RouteObject as k, type Navigation as l, type RevalidationState as m, type SerializeFrom as n, type Blocker as o, type StaticHandlerContext as p, type StaticHandler as q, type unstable_InitialContext as r, type IndexRouteObject as s, type LoaderFunction as t, unstable_RouterContextProvider as u, type ActionFunction as v, type MetaFunction as w, type LinksFunction as x, type NonIndexRouteObject as y, type RouterState as z };
|
|
@@ -912,8 +912,11 @@ interface Router {
|
|
|
912
912
|
* @param routeId The parent route id or a callback function accepting `patch`
|
|
913
913
|
* to perform batch patching
|
|
914
914
|
* @param children The additional children routes
|
|
915
|
+
* @param unstable_allowElementMutations Allow mutation or route elements on
|
|
916
|
+
* existing routes. Intended for RSC-usage
|
|
917
|
+
* only.
|
|
915
918
|
*/
|
|
916
|
-
patchRoutes(routeId: string | null, children: AgnosticRouteObject[]): void;
|
|
919
|
+
patchRoutes(routeId: string | null, children: AgnosticRouteObject[], unstable_allowElementMutations?: boolean): void;
|
|
917
920
|
/**
|
|
918
921
|
* @private
|
|
919
922
|
* PRIVATE - DO NOT USE
|
|
@@ -922,6 +925,13 @@ interface Router {
|
|
|
922
925
|
* TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)
|
|
923
926
|
*/
|
|
924
927
|
_internalSetRoutes(routes: AgnosticRouteObject[]): void;
|
|
928
|
+
/**
|
|
929
|
+
* @private
|
|
930
|
+
* PRIVATE - DO NOT USE
|
|
931
|
+
*
|
|
932
|
+
* Cause subscribers to re-render. This is used to force a re-render.
|
|
933
|
+
*/
|
|
934
|
+
_internalSetStateDoNotUseOrYouWillBreakYourApp(state: Partial<RouterState>): void;
|
|
925
935
|
/**
|
|
926
936
|
* @private
|
|
927
937
|
* PRIVATE - DO NOT USE
|
|
@@ -1397,16 +1407,6 @@ interface RouteContextObject {
|
|
|
1397
1407
|
}
|
|
1398
1408
|
declare const RouteContext: React.Context<RouteContextObject>;
|
|
1399
1409
|
|
|
1400
|
-
/**
|
|
1401
|
-
* An object of unknown type for route loaders and actions provided by the
|
|
1402
|
-
* server's `getLoadContext()` function. This is defined as an empty interface
|
|
1403
|
-
* specifically so apps can leverage declaration merging to augment this type
|
|
1404
|
-
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
|
1405
|
-
*/
|
|
1406
|
-
interface AppLoadContext {
|
|
1407
|
-
[key: string]: unknown;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
1410
|
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
1411
1411
|
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
|
|
1412
1412
|
interface HtmlLinkProps {
|
|
@@ -1746,4 +1746,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
|
1746
1746
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1747
1747
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1748
1748
|
|
|
1749
|
-
export { type
|
|
1749
|
+
export { type DataStrategyResult as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type DataRouteObject as G, type HydrationState as H, type InitialEntry as I, type ClientLoaderFunction as J, type GetScrollPositionFunction as K, type LoaderFunctionArgs as L, type MiddlewareEnabled as M, type NavigateOptions as N, type GetScrollRestorationKeyFunction as O, type ParamParseKey as P, type Fetcher as Q, type RouterInit as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type NavigationStates as V, type RouterSubscriber as W, type RouterNavigateOptions as X, type RouterFetchOptions as Y, type DataStrategyFunctionArgs as Z, type DataStrategyMatch as _, type Router as a, DataWithResponseInit as a0, type ErrorResponse as a1, type FormEncType as a2, type FormMethod as a3, type HTMLFormMethod as a4, type LazyRouteFunction as a5, type unstable_MiddlewareFunction as a6, type PathParam as a7, type RedirectFunction as a8, type unstable_RouterContext as a9, type HeadersFunction as aA, type MetaArgs as aB, type MetaDescriptor as aC, type PageLinkDescriptor as aD, type HtmlLinkDescriptor as aE, type LinkDescriptor as aF, type Future as aG, type unstable_SerializesTo as aH, createBrowserHistory as aI, invariant as aJ, createRouter as aK, ErrorResponseImpl as aL, DataRouterContext as aM, DataRouterStateContext as aN, FetchersContext as aO, LocationContext as aP, NavigationContext as aQ, RouteContext as aR, ViewTransitionContext as aS, type History as aT, type ServerDataFrom as aU, type ClientDataFrom as aV, type Func as aW, type unstable_MiddlewareNextFunction as aX, type Pretty as aY, type ShouldRevalidateFunction as aa, type ShouldRevalidateFunctionArgs as ab, unstable_createContext as ac, createPath as ad, parsePath as ae, IDLE_NAVIGATION as af, IDLE_FETCHER as ag, IDLE_BLOCKER as ah, data as ai, generatePath as aj, isRouteErrorResponse as ak, matchPath as al, matchRoutes as am, redirect as an, redirectDocument as ao, replace as ap, resolvePath as aq, type DataRouteMatch as ar, type Navigator as as, type PatchRoutesOnNavigationFunction as at, type PatchRoutesOnNavigationFunctionArgs as au, type RouteMatch as av, type ClientActionFunction as aw, type ClientActionFunctionArgs as ax, type ClientLoaderFunctionArgs as ay, type HeadersArgs as az, type RouteModules as b, type RouteManifest as c, type RelativeRoutingType as d, type Location as e, Action as f, type Path as g, type PathPattern as h, type PathMatch as i, type Params as j, type RouteObject as k, type Navigation as l, type RevalidationState as m, type SerializeFrom as n, type Blocker as o, type StaticHandlerContext as p, type StaticHandler as q, type unstable_InitialContext as r, type IndexRouteObject as s, type LoaderFunction as t, unstable_RouterContextProvider as u, type ActionFunction as v, type MetaFunction as w, type LinksFunction as x, type NonIndexRouteObject as y, type RouterState as z };
|