react-router 7.1.3 → 7.1.4
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 +23 -1
- package/dist/development/{chunk-SYFQ2XB5.mjs → chunk-W3FMU5Y5.mjs} +52 -47
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +35 -36
- package/dist/development/dom-export.mjs +2 -2
- package/dist/{production/fog-of-war-Ckdfl79L.d.ts → development/fog-of-war-CCAcUMgB.d.ts} +1 -1
- package/dist/development/{fog-of-war-Ckdfl79L.d.ts → fog-of-war-D6dP9JIt.d.mts} +1 -1
- package/dist/development/index.d.mts +5 -41
- package/dist/development/index.d.ts +5 -41
- package/dist/development/index.js +52 -47
- package/dist/development/index.mjs +2 -2
- 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/development/{route-data-Cw8htKcF.d.ts → route-data-Cq_b5feC.d.mts} +27 -1
- package/dist/{production/route-data-Cw8htKcF.d.mts → development/route-data-Cq_b5feC.d.ts} +27 -1
- package/dist/production/{chunk-OKQ6KMOJ.mjs → chunk-FIUQORTV.mjs} +52 -47
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +35 -36
- package/dist/production/dom-export.mjs +2 -2
- package/dist/{development/fog-of-war-ClXvjZ4E.d.mts → production/fog-of-war-CCAcUMgB.d.ts} +1 -1
- package/dist/production/{fog-of-war-ClXvjZ4E.d.mts → fog-of-war-D6dP9JIt.d.mts} +1 -1
- package/dist/production/index.d.mts +5 -41
- package/dist/production/index.d.ts +5 -41
- package/dist/production/index.js +52 -47
- package/dist/production/index.mjs +2 -2
- 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/production/{route-data-Cw8htKcF.d.ts → route-data-Cq_b5feC.d.mts} +27 -1
- package/dist/{development/route-data-Cw8htKcF.d.mts → production/route-data-Cq_b5feC.d.ts} +27 -1
- package/package.json +1 -1
|
@@ -1355,6 +1355,9 @@ type LinkDescriptor = HtmlLinkDescriptor | PageLinkDescriptor;
|
|
|
1355
1355
|
interface RouteModules {
|
|
1356
1356
|
[routeId: string]: RouteModule | undefined;
|
|
1357
1357
|
}
|
|
1358
|
+
/**
|
|
1359
|
+
* The shape of a route module shipped to the client
|
|
1360
|
+
*/
|
|
1358
1361
|
interface RouteModule {
|
|
1359
1362
|
clientAction?: ClientActionFunction;
|
|
1360
1363
|
clientLoader?: ClientLoaderFunction;
|
|
@@ -1367,6 +1370,16 @@ interface RouteModule {
|
|
|
1367
1370
|
meta?: MetaFunction;
|
|
1368
1371
|
shouldRevalidate?: ShouldRevalidateFunction;
|
|
1369
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* The shape of a route module on the server
|
|
1375
|
+
*/
|
|
1376
|
+
interface ServerRouteModule extends RouteModule {
|
|
1377
|
+
action?: ActionFunction;
|
|
1378
|
+
headers?: HeadersFunction | {
|
|
1379
|
+
[name: string]: string;
|
|
1380
|
+
};
|
|
1381
|
+
loader?: LoaderFunction;
|
|
1382
|
+
}
|
|
1370
1383
|
/**
|
|
1371
1384
|
* A function that handles data mutations for a route on the client
|
|
1372
1385
|
*/
|
|
@@ -1393,6 +1406,19 @@ type ClientLoaderFunctionArgs = LoaderFunctionArgs<undefined> & {
|
|
|
1393
1406
|
* ErrorBoundary to display for this route
|
|
1394
1407
|
*/
|
|
1395
1408
|
type ErrorBoundaryComponent = ComponentType;
|
|
1409
|
+
type HeadersArgs = {
|
|
1410
|
+
loaderHeaders: Headers;
|
|
1411
|
+
parentHeaders: Headers;
|
|
1412
|
+
actionHeaders: Headers;
|
|
1413
|
+
errorHeaders: Headers | undefined;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* A function that returns HTTP headers to be used for a route. These headers
|
|
1417
|
+
* will be merged with (and take precedence over) headers from parent routes.
|
|
1418
|
+
*/
|
|
1419
|
+
interface HeadersFunction {
|
|
1420
|
+
(args: HeadersArgs): Headers | HeadersInit;
|
|
1421
|
+
}
|
|
1396
1422
|
/**
|
|
1397
1423
|
* `<Route HydrateFallback>` component to render on initial loads
|
|
1398
1424
|
* when client loaders are present
|
|
@@ -1549,4 +1575,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
|
1549
1575
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1550
1576
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1551
1577
|
|
|
1552
|
-
export { type
|
|
1578
|
+
export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, invariant as aA, createRouter as aB, ErrorResponseImpl as aC, DataRouterContext as aD, DataRouterStateContext as aE, FetchersContext as aF, LocationContext as aG, NavigationContext as aH, RouteContext as aI, ViewTransitionContext as aJ, type RouteModule as aK, type History as aL, type ServerDataFrom as aM, type ClientDataFrom as aN, type Func as aO, type Equal as aP, type Pretty as aQ, generatePath as aa, isRouteErrorResponse as ab, matchPath as ac, matchRoutes as ad, redirect as ae, redirectDocument as af, replace as ag, resolvePath as ah, type DataRouteMatch as ai, type DataRouteObject as aj, type Navigator as ak, type PatchRoutesOnNavigationFunction as al, type PatchRoutesOnNavigationFunctionArgs as am, type RouteMatch as an, type ClientActionFunction as ao, type ClientActionFunctionArgs as ap, type ClientLoaderFunction as aq, type ClientLoaderFunctionArgs as ar, type HeadersArgs as as, type HeadersFunction as at, type MetaArgs as au, type MetaDescriptor as av, type PageLinkDescriptor as aw, type HtmlLinkDescriptor as ax, type LinkDescriptor as ay, createBrowserHistory as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
|
|
@@ -1355,6 +1355,9 @@ type LinkDescriptor = HtmlLinkDescriptor | PageLinkDescriptor;
|
|
|
1355
1355
|
interface RouteModules {
|
|
1356
1356
|
[routeId: string]: RouteModule | undefined;
|
|
1357
1357
|
}
|
|
1358
|
+
/**
|
|
1359
|
+
* The shape of a route module shipped to the client
|
|
1360
|
+
*/
|
|
1358
1361
|
interface RouteModule {
|
|
1359
1362
|
clientAction?: ClientActionFunction;
|
|
1360
1363
|
clientLoader?: ClientLoaderFunction;
|
|
@@ -1367,6 +1370,16 @@ interface RouteModule {
|
|
|
1367
1370
|
meta?: MetaFunction;
|
|
1368
1371
|
shouldRevalidate?: ShouldRevalidateFunction;
|
|
1369
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* The shape of a route module on the server
|
|
1375
|
+
*/
|
|
1376
|
+
interface ServerRouteModule extends RouteModule {
|
|
1377
|
+
action?: ActionFunction;
|
|
1378
|
+
headers?: HeadersFunction | {
|
|
1379
|
+
[name: string]: string;
|
|
1380
|
+
};
|
|
1381
|
+
loader?: LoaderFunction;
|
|
1382
|
+
}
|
|
1370
1383
|
/**
|
|
1371
1384
|
* A function that handles data mutations for a route on the client
|
|
1372
1385
|
*/
|
|
@@ -1393,6 +1406,19 @@ type ClientLoaderFunctionArgs = LoaderFunctionArgs<undefined> & {
|
|
|
1393
1406
|
* ErrorBoundary to display for this route
|
|
1394
1407
|
*/
|
|
1395
1408
|
type ErrorBoundaryComponent = ComponentType;
|
|
1409
|
+
type HeadersArgs = {
|
|
1410
|
+
loaderHeaders: Headers;
|
|
1411
|
+
parentHeaders: Headers;
|
|
1412
|
+
actionHeaders: Headers;
|
|
1413
|
+
errorHeaders: Headers | undefined;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* A function that returns HTTP headers to be used for a route. These headers
|
|
1417
|
+
* will be merged with (and take precedence over) headers from parent routes.
|
|
1418
|
+
*/
|
|
1419
|
+
interface HeadersFunction {
|
|
1420
|
+
(args: HeadersArgs): Headers | HeadersInit;
|
|
1421
|
+
}
|
|
1396
1422
|
/**
|
|
1397
1423
|
* `<Route HydrateFallback>` component to render on initial loads
|
|
1398
1424
|
* when client loaders are present
|
|
@@ -1549,4 +1575,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
|
1549
1575
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1550
1576
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1551
1577
|
|
|
1552
|
-
export { type
|
|
1578
|
+
export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, invariant as aA, createRouter as aB, ErrorResponseImpl as aC, DataRouterContext as aD, DataRouterStateContext as aE, FetchersContext as aF, LocationContext as aG, NavigationContext as aH, RouteContext as aI, ViewTransitionContext as aJ, type RouteModule as aK, type History as aL, type ServerDataFrom as aM, type ClientDataFrom as aN, type Func as aO, type Equal as aP, type Pretty as aQ, generatePath as aa, isRouteErrorResponse as ab, matchPath as ac, matchRoutes as ad, redirect as ae, redirectDocument as af, replace as ag, resolvePath as ah, type DataRouteMatch as ai, type DataRouteObject as aj, type Navigator as ak, type PatchRoutesOnNavigationFunction as al, type PatchRoutesOnNavigationFunctionArgs as am, type RouteMatch as an, type ClientActionFunction as ao, type ClientActionFunctionArgs as ap, type ClientLoaderFunction as aq, type ClientLoaderFunctionArgs as ar, type HeadersArgs as as, type HeadersFunction as at, type MetaArgs as au, type MetaDescriptor as av, type PageLinkDescriptor as aw, type HtmlLinkDescriptor as ax, type LinkDescriptor as ay, createBrowserHistory as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
|