react-router 7.9.4 → 7.9.6
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 +70 -0
- package/dist/development/browser-BbBXFHbO.d.ts +310 -0
- package/dist/development/browser-C07r42Tt.d.mts +310 -0
- package/dist/development/{chunk-OIYGIGL5.mjs → chunk-4WY6JWTD.mjs} +458 -43
- package/dist/development/{chunk-DI2QHYMJ.js → chunk-AMVS5XVJ.js} +1314 -138
- package/dist/development/{chunk-WY5IRSCW.mjs → chunk-G3INQAYP.mjs} +197 -857
- package/dist/development/chunk-O4JVZSOY.js +1310 -0
- package/dist/development/chunk-PZWDWJAY.js +188 -0
- package/dist/development/dom-export.d.mts +103 -6
- package/dist/development/dom-export.d.ts +103 -4
- package/dist/development/dom-export.js +708 -20
- package/dist/development/dom-export.mjs +692 -11
- package/dist/{production/index-react-server-client-BbRcBjrA.d.ts → development/index-react-server-client-Da3kmxNd.d.ts} +195 -135
- package/dist/{production/index-react-server-client-BIz4AUNd.d.mts → development/index-react-server-client-rcoGPJhU.d.mts} +137 -78
- package/dist/development/index-react-server-client.d.mts +2 -3
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +107 -3
- package/dist/development/index-react-server.d.ts +107 -3
- package/dist/development/index-react-server.js +259 -13
- package/dist/development/index-react-server.mjs +259 -13
- package/dist/development/index.d.mts +14 -320
- package/dist/development/index.d.ts +14 -362
- package/dist/development/index.js +146 -962
- package/dist/development/index.mjs +3 -9
- package/dist/development/{routeModules-D5iJ6JYT.d.ts → instrumentation-Unc20tLk.d.ts} +178 -25
- package/dist/development/lib/types/internal.d.mts +2 -3
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/register-C34pU-in.d.ts → development/register-BpU9rFBJ.d.ts} +1 -1
- package/dist/development/{register-CI4bTprK.d.mts → register-QkB3HGjm.d.mts} +1 -1
- package/dist/{production/context-DSyS5mLj.d.mts → development/router-CAvh_Drx.d.mts} +1877 -1254
- package/dist/production/browser-BbBXFHbO.d.ts +310 -0
- package/dist/production/browser-C07r42Tt.d.mts +310 -0
- package/dist/production/{chunk-4E5LHRQP.js → chunk-EAIF67OW.js} +1314 -138
- package/dist/production/{chunk-FR6HSPLK.mjs → chunk-FDUMZGKM.mjs} +197 -857
- package/dist/production/{chunk-3TADTUL4.mjs → chunk-FUSXQSWG.mjs} +458 -43
- package/dist/production/chunk-G5A35OQU.js +188 -0
- package/dist/production/chunk-QN64DHI4.js +1310 -0
- package/dist/production/dom-export.d.mts +103 -6
- package/dist/production/dom-export.d.ts +103 -4
- package/dist/production/dom-export.js +708 -20
- package/dist/production/dom-export.mjs +692 -11
- package/dist/{development/index-react-server-client-BIz4AUNd.d.mts → production/index-react-server-client-Da3kmxNd.d.ts} +137 -78
- package/dist/{development/index-react-server-client-BbRcBjrA.d.ts → production/index-react-server-client-rcoGPJhU.d.mts} +195 -135
- package/dist/production/index-react-server-client.d.mts +2 -3
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +107 -3
- package/dist/production/index-react-server.d.ts +107 -3
- package/dist/production/index-react-server.js +259 -13
- package/dist/production/index-react-server.mjs +259 -13
- package/dist/production/index.d.mts +14 -320
- package/dist/production/index.d.ts +14 -362
- package/dist/production/index.js +146 -962
- package/dist/production/index.mjs +3 -9
- package/dist/production/{routeModules-D5iJ6JYT.d.ts → instrumentation-Unc20tLk.d.ts} +178 -25
- package/dist/production/lib/types/internal.d.mts +2 -3
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-C34pU-in.d.ts → production/register-BpU9rFBJ.d.ts} +1 -1
- package/dist/production/{register-CI4bTprK.d.mts → register-QkB3HGjm.d.mts} +1 -1
- package/dist/{development/context-DSyS5mLj.d.mts → production/router-CAvh_Drx.d.mts} +1877 -1254
- package/package.json +1 -1
- package/dist/development/browser-z32v5KVN.d.mts +0 -46
- package/dist/development/chunk-72XNTZCV.js +0 -2089
- package/dist/development/route-data-DZQOUSqV.d.mts +0 -473
- package/dist/production/browser-z32v5KVN.d.mts +0 -46
- package/dist/production/chunk-WNLQ53P5.js +0 -2089
- package/dist/production/route-data-DZQOUSqV.d.mts +0 -473
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.
|
|
2
|
+
* react-router v7.9.6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -11,11 +11,9 @@
|
|
|
11
11
|
"use client";
|
|
12
12
|
import {
|
|
13
13
|
RSCDefaultRootErrorBoundary,
|
|
14
|
-
RSCHydratedRouter,
|
|
15
14
|
RSCStaticRouter,
|
|
16
15
|
ServerMode,
|
|
17
16
|
ServerRouter,
|
|
18
|
-
createCallServer,
|
|
19
17
|
createCookie,
|
|
20
18
|
createCookieSessionStorage,
|
|
21
19
|
createMemorySessionStorage,
|
|
@@ -25,13 +23,12 @@ import {
|
|
|
25
23
|
createSessionStorage,
|
|
26
24
|
deserializeErrors,
|
|
27
25
|
getHydrationData,
|
|
28
|
-
getRSCStream,
|
|
29
26
|
href,
|
|
30
27
|
isCookie,
|
|
31
28
|
isSession,
|
|
32
29
|
routeRSCServerRequest,
|
|
33
30
|
setDevServerHooks
|
|
34
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-G3INQAYP.mjs";
|
|
35
32
|
import {
|
|
36
33
|
Action,
|
|
37
34
|
Await,
|
|
@@ -142,7 +139,7 @@ import {
|
|
|
142
139
|
withComponentProps,
|
|
143
140
|
withErrorBoundaryProps,
|
|
144
141
|
withHydrateFallbackProps
|
|
145
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-4WY6JWTD.mjs";
|
|
146
143
|
export {
|
|
147
144
|
Await,
|
|
148
145
|
BrowserRouter,
|
|
@@ -237,10 +234,7 @@ export {
|
|
|
237
234
|
replace,
|
|
238
235
|
resolvePath,
|
|
239
236
|
HistoryRouter as unstable_HistoryRouter,
|
|
240
|
-
RSCHydratedRouter as unstable_RSCHydratedRouter,
|
|
241
237
|
RSCStaticRouter as unstable_RSCStaticRouter,
|
|
242
|
-
createCallServer as unstable_createCallServer,
|
|
243
|
-
getRSCStream as unstable_getRSCStream,
|
|
244
238
|
routeRSCServerRequest as unstable_routeRSCServerRequest,
|
|
245
239
|
setDevServerHooks as unstable_setDevServerHooks,
|
|
246
240
|
usePrompt as unstable_usePrompt,
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ComponentType, ReactElement } from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* An augmentable interface users can modify in their app-code to opt into
|
|
6
|
+
* future-flag-specific types
|
|
7
|
+
*/
|
|
8
|
+
interface Future {
|
|
9
|
+
}
|
|
10
|
+
type MiddlewareEnabled = Future extends {
|
|
11
|
+
v8_middleware: infer T extends boolean;
|
|
12
|
+
} ? T : false;
|
|
13
|
+
|
|
4
14
|
/**
|
|
5
15
|
* Actions represent the type of change to a location value.
|
|
6
16
|
*/
|
|
@@ -206,16 +216,6 @@ type UrlHistoryOptions = {
|
|
|
206
216
|
v5Compat?: boolean;
|
|
207
217
|
};
|
|
208
218
|
|
|
209
|
-
/**
|
|
210
|
-
* An augmentable interface users can modify in their app-code to opt into
|
|
211
|
-
* future-flag-specific types
|
|
212
|
-
*/
|
|
213
|
-
interface Future {
|
|
214
|
-
}
|
|
215
|
-
type MiddlewareEnabled = Future extends {
|
|
216
|
-
v8_middleware: infer T extends boolean;
|
|
217
|
-
} ? T : false;
|
|
218
|
-
|
|
219
219
|
type MaybePromise<T> = T | Promise<T>;
|
|
220
220
|
/**
|
|
221
221
|
* Map of routeId -> data returned from a loader/action/error
|
|
@@ -395,6 +395,11 @@ type DefaultContext = MiddlewareEnabled extends true ? Readonly<RouterContextPro
|
|
|
395
395
|
interface DataFunctionArgs<Context> {
|
|
396
396
|
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read headers (like cookies, and {@link https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams URLSearchParams} from the request. */
|
|
397
397
|
request: Request;
|
|
398
|
+
/**
|
|
399
|
+
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
|
|
400
|
+
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
|
|
401
|
+
*/
|
|
402
|
+
unstable_pattern: string;
|
|
398
403
|
/**
|
|
399
404
|
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
400
405
|
* @example
|
|
@@ -615,7 +620,7 @@ type AgnosticPatchRoutesOnNavigationFunction<O extends AgnosticRouteObject = Agn
|
|
|
615
620
|
* properties from framework-agnostic properties
|
|
616
621
|
*/
|
|
617
622
|
interface MapRoutePropertiesFunction {
|
|
618
|
-
(route:
|
|
623
|
+
(route: AgnosticDataRouteObject): {
|
|
619
624
|
hasErrorBoundary: boolean;
|
|
620
625
|
} & Record<string, any>;
|
|
621
626
|
}
|
|
@@ -1040,6 +1045,16 @@ declare class ErrorResponseImpl implements ErrorResponse {
|
|
|
1040
1045
|
*/
|
|
1041
1046
|
declare function isRouteErrorResponse(error: any): error is ErrorResponse;
|
|
1042
1047
|
|
|
1048
|
+
/**
|
|
1049
|
+
* An object of unknown type for route loaders and actions provided by the
|
|
1050
|
+
* server's `getLoadContext()` function. This is defined as an empty interface
|
|
1051
|
+
* specifically so apps can leverage declaration merging to augment this type
|
|
1052
|
+
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
|
1053
|
+
*/
|
|
1054
|
+
interface AppLoadContext {
|
|
1055
|
+
[key: string]: unknown;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1043
1058
|
/**
|
|
1044
1059
|
* A Router instance manages all navigation and data loading/mutations
|
|
1045
1060
|
*/
|
|
@@ -1324,6 +1339,7 @@ interface RouterInit {
|
|
|
1324
1339
|
history: History;
|
|
1325
1340
|
basename?: string;
|
|
1326
1341
|
getContext?: () => MaybePromise<RouterContextProvider>;
|
|
1342
|
+
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
|
1327
1343
|
mapRouteProperties?: MapRoutePropertiesFunction;
|
|
1328
1344
|
future?: Partial<FutureConfig>;
|
|
1329
1345
|
hydrationRouteProperties?: string[];
|
|
@@ -1597,6 +1613,7 @@ declare function createRouter(init: RouterInit): Router$1;
|
|
|
1597
1613
|
interface CreateStaticHandlerOptions {
|
|
1598
1614
|
basename?: string;
|
|
1599
1615
|
mapRouteProperties?: MapRoutePropertiesFunction;
|
|
1616
|
+
unstable_instrumentations?: Pick<unstable_ServerInstrumentation, "route">[];
|
|
1600
1617
|
future?: {};
|
|
1601
1618
|
}
|
|
1602
1619
|
|
|
@@ -1637,6 +1654,55 @@ interface MemoryRouterOpts {
|
|
|
1637
1654
|
* Index of `initialEntries` the application should initialize to
|
|
1638
1655
|
*/
|
|
1639
1656
|
initialIndex?: number;
|
|
1657
|
+
/**
|
|
1658
|
+
* Array of instrumentation objects allowing you to instrument the router and
|
|
1659
|
+
* individual routes prior to router initialization (and on any subsequently
|
|
1660
|
+
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
|
|
1661
|
+
* mostly useful for observability such as wrapping navigations, fetches,
|
|
1662
|
+
* as well as route loaders/actions/middlewares with logging and/or performance
|
|
1663
|
+
* tracing.
|
|
1664
|
+
*
|
|
1665
|
+
* ```tsx
|
|
1666
|
+
* let router = createBrowserRouter(routes, {
|
|
1667
|
+
* unstable_instrumentations: [logging]
|
|
1668
|
+
* });
|
|
1669
|
+
*
|
|
1670
|
+
*
|
|
1671
|
+
* let logging = {
|
|
1672
|
+
* router({ instrument }) {
|
|
1673
|
+
* instrument({
|
|
1674
|
+
* navigate: (impl, info) => logExecution(`navigate ${info.to}`, impl),
|
|
1675
|
+
* fetch: (impl, info) => logExecution(`fetch ${info.to}`, impl)
|
|
1676
|
+
* });
|
|
1677
|
+
* },
|
|
1678
|
+
* route({ instrument, id }) {
|
|
1679
|
+
* instrument({
|
|
1680
|
+
* middleware: (impl, info) => logExecution(
|
|
1681
|
+
* `middleware ${info.request.url} (route ${id})`,
|
|
1682
|
+
* impl
|
|
1683
|
+
* ),
|
|
1684
|
+
* loader: (impl, info) => logExecution(
|
|
1685
|
+
* `loader ${info.request.url} (route ${id})`,
|
|
1686
|
+
* impl
|
|
1687
|
+
* ),
|
|
1688
|
+
* action: (impl, info) => logExecution(
|
|
1689
|
+
* `action ${info.request.url} (route ${id})`,
|
|
1690
|
+
* impl
|
|
1691
|
+
* ),
|
|
1692
|
+
* })
|
|
1693
|
+
* }
|
|
1694
|
+
* };
|
|
1695
|
+
*
|
|
1696
|
+
* async function logExecution(label: string, impl: () => Promise<void>) {
|
|
1697
|
+
* let start = performance.now();
|
|
1698
|
+
* console.log(`start ${label}`);
|
|
1699
|
+
* await impl();
|
|
1700
|
+
* let duration = Math.round(performance.now() - start);
|
|
1701
|
+
* console.log(`end ${label} (${duration}ms)`);
|
|
1702
|
+
* }
|
|
1703
|
+
* ```
|
|
1704
|
+
*/
|
|
1705
|
+
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
|
1640
1706
|
/**
|
|
1641
1707
|
* Override the default data strategy of loading in parallel.
|
|
1642
1708
|
* Only intended for advanced usage.
|
|
@@ -1664,6 +1730,7 @@ interface MemoryRouterOpts {
|
|
|
1664
1730
|
* @param {MemoryRouterOpts.hydrationData} opts.hydrationData n/a
|
|
1665
1731
|
* @param {MemoryRouterOpts.initialEntries} opts.initialEntries n/a
|
|
1666
1732
|
* @param {MemoryRouterOpts.initialIndex} opts.initialIndex n/a
|
|
1733
|
+
* @param {MemoryRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
|
|
1667
1734
|
* @param {MemoryRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
|
|
1668
1735
|
* @returns An initialized {@link DataRouter} to pass to {@link RouterProvider | `<RouterProvider>`}
|
|
1669
1736
|
*/
|
|
@@ -1673,7 +1740,11 @@ declare function createMemoryRouter(routes: RouteObject[], opts?: MemoryRouterOp
|
|
|
1673
1740
|
* and rendering errors via `componentDidCatch`
|
|
1674
1741
|
*/
|
|
1675
1742
|
interface unstable_ClientOnErrorFunction {
|
|
1676
|
-
(error: unknown,
|
|
1743
|
+
(error: unknown, info: {
|
|
1744
|
+
location: Location;
|
|
1745
|
+
params: Params;
|
|
1746
|
+
errorInfo?: React.ErrorInfo;
|
|
1747
|
+
}): void;
|
|
1677
1748
|
}
|
|
1678
1749
|
/**
|
|
1679
1750
|
* @category Types
|
|
@@ -2676,16 +2747,6 @@ interface PageLinkDescriptor extends Omit<HtmlLinkDescriptor, "href" | "rel" | "
|
|
|
2676
2747
|
}
|
|
2677
2748
|
type LinkDescriptor = HtmlLinkDescriptor | PageLinkDescriptor;
|
|
2678
2749
|
|
|
2679
|
-
/**
|
|
2680
|
-
* An object of unknown type for route loaders and actions provided by the
|
|
2681
|
-
* server's `getLoadContext()` function. This is defined as an empty interface
|
|
2682
|
-
* specifically so apps can leverage declaration merging to augment this type
|
|
2683
|
-
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
|
2684
|
-
*/
|
|
2685
|
-
interface AppLoadContext {
|
|
2686
|
-
[key: string]: unknown;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
2750
|
type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {
|
|
2690
2751
|
[key: PropertyKey]: Serializable;
|
|
2691
2752
|
} | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
|
|
@@ -2761,6 +2822,11 @@ type ClientDataFunctionArgs<Params> = {
|
|
|
2761
2822
|
* }
|
|
2762
2823
|
**/
|
|
2763
2824
|
params: Params;
|
|
2825
|
+
/**
|
|
2826
|
+
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
|
|
2827
|
+
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
|
|
2828
|
+
*/
|
|
2829
|
+
unstable_pattern: string;
|
|
2764
2830
|
/**
|
|
2765
2831
|
* When `future.v8_middleware` is not enabled, this is undefined.
|
|
2766
2832
|
*
|
|
@@ -2789,6 +2855,11 @@ type ServerDataFunctionArgs<Params> = {
|
|
|
2789
2855
|
* }
|
|
2790
2856
|
**/
|
|
2791
2857
|
params: Params;
|
|
2858
|
+
/**
|
|
2859
|
+
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
|
|
2860
|
+
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
|
|
2861
|
+
*/
|
|
2862
|
+
unstable_pattern: string;
|
|
2792
2863
|
/**
|
|
2793
2864
|
* Without `future.v8_middleware` enabled, this is the context passed in
|
|
2794
2865
|
* to your server adapter's `getLoadContext` function. It's a way to bridge the
|
|
@@ -2914,7 +2985,7 @@ type LayoutComponent = ComponentType<{
|
|
|
2914
2985
|
* A function that defines `<link>` tags to be inserted into the `<head>` of
|
|
2915
2986
|
* the document on route transitions.
|
|
2916
2987
|
*
|
|
2917
|
-
* @see https://
|
|
2988
|
+
* @see https://reactrouter.com/start/framework/route-module#meta
|
|
2918
2989
|
*/
|
|
2919
2990
|
interface LinksFunction {
|
|
2920
2991
|
(): LinkDescriptor[];
|
|
@@ -3031,8 +3102,90 @@ type RouteComponent = ComponentType<{}>;
|
|
|
3031
3102
|
/**
|
|
3032
3103
|
* An arbitrary object that is associated with a route.
|
|
3033
3104
|
*
|
|
3034
|
-
* @see https://
|
|
3105
|
+
* @see https://reactrouter.com/how-to/using-handle
|
|
3035
3106
|
*/
|
|
3036
3107
|
type RouteHandle = unknown;
|
|
3037
3108
|
|
|
3038
|
-
|
|
3109
|
+
type unstable_ServerInstrumentation = {
|
|
3110
|
+
handler?: unstable_InstrumentRequestHandlerFunction;
|
|
3111
|
+
route?: unstable_InstrumentRouteFunction;
|
|
3112
|
+
};
|
|
3113
|
+
type unstable_ClientInstrumentation = {
|
|
3114
|
+
router?: unstable_InstrumentRouterFunction;
|
|
3115
|
+
route?: unstable_InstrumentRouteFunction;
|
|
3116
|
+
};
|
|
3117
|
+
type unstable_InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
|
|
3118
|
+
type unstable_InstrumentRouterFunction = (router: InstrumentableRouter) => void;
|
|
3119
|
+
type unstable_InstrumentRouteFunction = (route: InstrumentableRoute) => void;
|
|
3120
|
+
type unstable_InstrumentationHandlerResult = {
|
|
3121
|
+
status: "success";
|
|
3122
|
+
error: undefined;
|
|
3123
|
+
} | {
|
|
3124
|
+
status: "error";
|
|
3125
|
+
error: Error;
|
|
3126
|
+
};
|
|
3127
|
+
type InstrumentFunction<T> = (handler: () => Promise<unstable_InstrumentationHandlerResult>, info: T) => Promise<void>;
|
|
3128
|
+
type ReadonlyRequest = {
|
|
3129
|
+
method: string;
|
|
3130
|
+
url: string;
|
|
3131
|
+
headers: Pick<Headers, "get">;
|
|
3132
|
+
};
|
|
3133
|
+
type ReadonlyContext = MiddlewareEnabled extends true ? Pick<RouterContextProvider, "get"> : Readonly<AppLoadContext>;
|
|
3134
|
+
type InstrumentableRoute = {
|
|
3135
|
+
id: string;
|
|
3136
|
+
index: boolean | undefined;
|
|
3137
|
+
path: string | undefined;
|
|
3138
|
+
instrument(instrumentations: RouteInstrumentations): void;
|
|
3139
|
+
};
|
|
3140
|
+
type RouteInstrumentations = {
|
|
3141
|
+
lazy?: InstrumentFunction<RouteLazyInstrumentationInfo>;
|
|
3142
|
+
"lazy.loader"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
|
|
3143
|
+
"lazy.action"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
|
|
3144
|
+
"lazy.middleware"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
|
|
3145
|
+
middleware?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
|
|
3146
|
+
loader?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
|
|
3147
|
+
action?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
|
|
3148
|
+
};
|
|
3149
|
+
type RouteLazyInstrumentationInfo = undefined;
|
|
3150
|
+
type RouteHandlerInstrumentationInfo = Readonly<{
|
|
3151
|
+
request: ReadonlyRequest;
|
|
3152
|
+
params: LoaderFunctionArgs["params"];
|
|
3153
|
+
unstable_pattern: string;
|
|
3154
|
+
context: ReadonlyContext;
|
|
3155
|
+
}>;
|
|
3156
|
+
type InstrumentableRouter = {
|
|
3157
|
+
instrument(instrumentations: RouterInstrumentations): void;
|
|
3158
|
+
};
|
|
3159
|
+
type RouterInstrumentations = {
|
|
3160
|
+
navigate?: InstrumentFunction<RouterNavigationInstrumentationInfo>;
|
|
3161
|
+
fetch?: InstrumentFunction<RouterFetchInstrumentationInfo>;
|
|
3162
|
+
};
|
|
3163
|
+
type RouterNavigationInstrumentationInfo = Readonly<{
|
|
3164
|
+
to: string | number;
|
|
3165
|
+
currentUrl: string;
|
|
3166
|
+
formMethod?: HTMLFormMethod;
|
|
3167
|
+
formEncType?: FormEncType;
|
|
3168
|
+
formData?: FormData;
|
|
3169
|
+
body?: any;
|
|
3170
|
+
}>;
|
|
3171
|
+
type RouterFetchInstrumentationInfo = Readonly<{
|
|
3172
|
+
href: string;
|
|
3173
|
+
currentUrl: string;
|
|
3174
|
+
fetcherKey: string;
|
|
3175
|
+
formMethod?: HTMLFormMethod;
|
|
3176
|
+
formEncType?: FormEncType;
|
|
3177
|
+
formData?: FormData;
|
|
3178
|
+
body?: any;
|
|
3179
|
+
}>;
|
|
3180
|
+
type InstrumentableRequestHandler = {
|
|
3181
|
+
instrument(instrumentations: RequestHandlerInstrumentations): void;
|
|
3182
|
+
};
|
|
3183
|
+
type RequestHandlerInstrumentations = {
|
|
3184
|
+
request?: InstrumentFunction<RequestHandlerInstrumentationInfo>;
|
|
3185
|
+
};
|
|
3186
|
+
type RequestHandlerInstrumentationInfo = Readonly<{
|
|
3187
|
+
request: ReadonlyRequest;
|
|
3188
|
+
context: ReadonlyContext | undefined;
|
|
3189
|
+
}>;
|
|
3190
|
+
|
|
3191
|
+
export { type RouterState as $, type ActionFunction as A, type BlockerFunction as B, type ClientActionFunction as C, type DataStrategyResult as D, type PathMatch as E, type Func as F, type GetLoaderData as G, type HeadersFunction as H, type Navigation as I, Action as J, type RouteObject as K, type Location as L, type MetaFunction as M, type Normalize as N, type InitialEntry as O, type Params as P, type HydrationState as Q, type RouteModule$1 as R, type ShouldRevalidateFunction as S, type To as T, type UIMatch as U, type IndexRouteObject as V, type RouteComponentType as W, type HydrateFallbackType as X, type ErrorBoundaryType as Y, type NonIndexRouteObject as Z, type Equal as _, type ClientLoaderFunction as a, type RouterProviderProps as a$, type PatchRoutesOnNavigationFunction as a0, type DataRouteObject as a1, type StaticHandler as a2, type GetScrollPositionFunction as a3, type GetScrollRestorationKeyFunction as a4, type StaticHandlerContext as a5, type Fetcher as a6, type NavigationStates as a7, type RouterSubscriber as a8, type RouterNavigateOptions as a9, IDLE_FETCHER as aA, IDLE_BLOCKER as aB, data as aC, generatePath as aD, isRouteErrorResponse as aE, matchPath as aF, matchRoutes as aG, redirect as aH, redirectDocument as aI, replace as aJ, resolvePath as aK, type DataRouteMatch as aL, type Navigator as aM, type PatchRoutesOnNavigationFunctionArgs as aN, type RouteMatch as aO, AwaitContextProvider as aP, type AwaitProps as aQ, type IndexRouteProps as aR, type unstable_ClientOnErrorFunction as aS, type LayoutRouteProps as aT, type MemoryRouterOpts as aU, type MemoryRouterProps as aV, type NavigateProps as aW, type OutletProps as aX, type PathRouteProps as aY, type RouteProps as aZ, type RouterProps as a_, type RouterFetchOptions as aa, type RevalidationState as ab, type ActionFunctionArgs as ac, type DataStrategyFunctionArgs as ad, type DataStrategyMatch as ae, DataWithResponseInit as af, type ErrorResponse as ag, type FormEncType as ah, type FormMethod as ai, type HTMLFormMethod as aj, type LazyRouteFunction as ak, type LoaderFunctionArgs as al, type MiddlewareFunction as am, type PathParam as an, type RedirectFunction as ao, type RouterContext as ap, type ShouldRevalidateFunctionArgs as aq, createContext as ar, createPath as as, parsePath as at, type unstable_ServerInstrumentation as au, type unstable_InstrumentRequestHandlerFunction as av, type unstable_InstrumentRouterFunction as aw, type unstable_InstrumentRouteFunction as ax, type unstable_InstrumentationHandlerResult as ay, IDLE_NAVIGATION as az, type LinksFunction as b, type RoutesProps as b0, Await as b1, MemoryRouter as b2, Navigate as b3, Outlet as b4, Route as b5, Router as b6, RouterProvider as b7, Routes as b8, createMemoryRouter as b9, WithHydrateFallbackProps as bA, withHydrateFallbackProps as bB, WithErrorBoundaryProps as bC, withErrorBoundaryProps as bD, type RouteManifest as bE, type ServerRouteModule as bF, type History as bG, type FutureConfig as bH, type CreateStaticHandlerOptions as bI, createRoutesFromChildren as ba, createRoutesFromElements as bb, renderMatches as bc, type ClientActionFunctionArgs as bd, type ClientLoaderFunctionArgs as be, type HeadersArgs as bf, type MetaArgs as bg, type PageLinkDescriptor as bh, type HtmlLinkDescriptor as bi, type Future as bj, type unstable_SerializesTo as bk, createBrowserHistory as bl, invariant as bm, createRouter as bn, ErrorResponseImpl as bo, DataRouterContext as bp, DataRouterStateContext as bq, FetchersContext as br, LocationContext as bs, NavigationContext as bt, RouteContext as bu, ViewTransitionContext as bv, hydrationRouteProperties as bw, mapRouteProperties as bx, WithComponentProps as by, withComponentProps as bz, RouterContextProvider as c, type LoaderFunction as d, type RouterInit as e, type LinkDescriptor as f, type Pretty as g, type MetaDescriptor as h, type ServerDataFunctionArgs as i, type MiddlewareNextFunction as j, type ClientDataFunctionArgs as k, type ServerDataFrom as l, type GetActionData as m, type Router$1 as n, type RouteModules as o, type DataStrategyFunction as p, type MiddlewareEnabled as q, type AppLoadContext as r, type NavigateOptions as s, type Blocker as t, type unstable_ClientInstrumentation as u, type SerializeFrom as v, type RelativeRoutingType as w, type ParamParseKey as x, type Path as y, type PathPattern as z };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { R as RouteModule,
|
|
2
|
-
import {
|
|
3
|
-
import { R as RouteFiles, P as Pages } from '../../register-CI4bTprK.mjs';
|
|
1
|
+
import { R as RouteModule, h as LinkDescriptor, L as Location, F as Func, i as Pretty, j as MetaDescriptor, G as GetLoaderData, k as ServerDataFunctionArgs, l as MiddlewareNextFunction, m as ClientDataFunctionArgs, D as DataStrategyResult, n as ServerDataFrom, N as Normalize, o as GetActionData } from '../../router-CAvh_Drx.mjs';
|
|
2
|
+
import { R as RouteFiles, P as Pages } from '../../register-QkB3HGjm.mjs';
|
|
4
3
|
import 'react';
|
|
5
4
|
|
|
6
5
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteModule,
|
|
2
|
-
import { R as RouteFiles, P as Pages } from '../../register-
|
|
1
|
+
import { R as RouteModule, f as LinkDescriptor, L as Location, F as Func, g as Pretty, h as MetaDescriptor, G as GetLoaderData, i as ServerDataFunctionArgs, j as MiddlewareNextFunction, k as ClientDataFunctionArgs, D as DataStrategyResult, l as ServerDataFrom, N as Normalize, m as GetActionData } from '../../instrumentation-Unc20tLk.js';
|
|
2
|
+
import { R as RouteFiles, P as Pages } from '../../register-BpU9rFBJ.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RouteModule } from './
|
|
1
|
+
import { R as RouteModule } from './instrumentation-Unc20tLk.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
|