react-router 7.13.0 → 7.13.1-pre.0
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 -20
- package/dist/development/{browser-BEPxnEBW.d.mts → browser-DzsJABDQ.d.mts} +3 -2
- package/dist/{production/browser-BEPxnEBW.d.mts → development/browser-sPQ7eaK4.d.ts} +3 -2
- package/dist/{production/chunk-GSFLVUYQ.mjs → development/chunk-BPFEYQ6M.mjs} +13 -4
- package/dist/{production/chunk-NGWWS4QJ.js → development/chunk-CGPAOPIJ.js} +7 -7
- package/dist/development/{chunk-WICQJKU6.js → chunk-LF5SS6XE.js} +203 -128
- package/dist/development/{chunk-HMDR2CVH.js → chunk-TC44ITIJ.js} +124 -107
- package/dist/development/{chunk-JZWAC4HX.mjs → chunk-WQZSGSJA.mjs} +153 -63
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +34 -27
- package/dist/development/dom-export.mjs +10 -3
- package/dist/development/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
- package/dist/development/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
- package/dist/development/index-react-server-client.d.mts +2 -2
- 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 +12 -1
- package/dist/development/index-react-server.d.ts +12 -1
- package/dist/development/index-react-server.js +80 -44
- package/dist/development/index-react-server.mjs +80 -45
- package/dist/development/index.d.mts +11 -10
- package/dist/development/index.d.ts +11 -10
- package/dist/development/index.js +94 -85
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-DvHY1sgY.d.ts → development/instrumentation--6Pioq_G.d.ts} +14 -2
- package/dist/development/lib/types/internal.d.mts +4 -4
- package/dist/development/lib/types/internal.d.ts +4 -4
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
- package/dist/development/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
- package/dist/{production/router-5iOvts3c.d.mts → development/router-cLsU7kHk.d.mts} +14 -2
- package/dist/{development/browser-CJ9_du-U.d.ts → production/browser-DzsJABDQ.d.mts} +3 -2
- package/dist/production/{browser-CJ9_du-U.d.ts → browser-sPQ7eaK4.d.ts} +3 -2
- package/dist/production/{chunk-Y3R63HEB.mjs → chunk-2K4LVAAG.mjs} +153 -63
- package/dist/{development/chunk-7PAHGFS4.js → production/chunk-I63A6YSE.js} +7 -7
- package/dist/{development/chunk-4LKRSAEJ.mjs → production/chunk-ROHSFSEU.mjs} +13 -4
- package/dist/production/{chunk-QSNCZFX5.js → chunk-XCKC4VBJ.js} +203 -128
- package/dist/production/{chunk-N2HZAAIG.js → chunk-ZXYVKLN7.js} +124 -107
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +34 -27
- package/dist/production/dom-export.mjs +10 -3
- package/dist/production/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
- package/dist/production/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
- package/dist/production/index-react-server-client.d.mts +2 -2
- 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 +12 -1
- package/dist/production/index-react-server.d.ts +12 -1
- package/dist/production/index-react-server.js +80 -44
- package/dist/production/index-react-server.mjs +80 -45
- package/dist/production/index.d.mts +11 -10
- package/dist/production/index.d.ts +11 -10
- package/dist/production/index.js +94 -85
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-DvHY1sgY.d.ts → production/instrumentation--6Pioq_G.d.ts} +14 -2
- package/dist/production/lib/types/internal.d.mts +4 -4
- package/dist/production/lib/types/internal.d.ts +4 -4
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
- package/dist/production/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
- package/dist/{development/router-5iOvts3c.d.mts → production/router-cLsU7kHk.d.mts} +14 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.13.0
|
|
2
|
+
* react-router v7.13.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
isSession,
|
|
29
29
|
routeRSCServerRequest,
|
|
30
30
|
setDevServerHooks
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ROHSFSEU.mjs";
|
|
32
32
|
import {
|
|
33
33
|
Action,
|
|
34
34
|
Await,
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
withComponentProps,
|
|
142
142
|
withErrorBoundaryProps,
|
|
143
143
|
withHydrateFallbackProps
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-2K4LVAAG.mjs";
|
|
145
145
|
export {
|
|
146
146
|
Await,
|
|
147
147
|
BrowserRouter,
|
package/dist/{development/instrumentation-DvHY1sgY.d.ts → production/instrumentation--6Pioq_G.d.ts}
RENAMED
|
@@ -68,6 +68,11 @@ interface Location<State = any> extends Path {
|
|
|
68
68
|
* Note: This value is always "default" on the initial location.
|
|
69
69
|
*/
|
|
70
70
|
key: string;
|
|
71
|
+
/**
|
|
72
|
+
* The masked location displayed in the URL bar, which differs from the URL the
|
|
73
|
+
* router is operating on
|
|
74
|
+
*/
|
|
75
|
+
unstable_mask: Path | undefined;
|
|
71
76
|
}
|
|
72
77
|
/**
|
|
73
78
|
* A change to the current location.
|
|
@@ -1339,6 +1344,10 @@ interface RouterState {
|
|
|
1339
1344
|
* Tracks whether we've completed our initial data load
|
|
1340
1345
|
*/
|
|
1341
1346
|
initialized: boolean;
|
|
1347
|
+
/**
|
|
1348
|
+
* Tracks whether we should be rendering a HydrateFallback during hydration
|
|
1349
|
+
*/
|
|
1350
|
+
renderFallback: boolean;
|
|
1342
1351
|
/**
|
|
1343
1352
|
* Current scroll position we should start at for a new view
|
|
1344
1353
|
* - number -> scroll position to restore to
|
|
@@ -1491,6 +1500,7 @@ type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
|
|
1491
1500
|
state?: any;
|
|
1492
1501
|
fromRouteId?: string;
|
|
1493
1502
|
viewTransition?: boolean;
|
|
1503
|
+
unstable_mask?: To;
|
|
1494
1504
|
};
|
|
1495
1505
|
type BaseSubmissionOptions = {
|
|
1496
1506
|
formMethod?: HTMLFormMethod;
|
|
@@ -2729,15 +2739,17 @@ declare const AwaitContextProvider: (props: React.ComponentProps<typeof AwaitCon
|
|
|
2729
2739
|
interface NavigateOptions {
|
|
2730
2740
|
/** Replace the current entry in the history stack instead of pushing a new one */
|
|
2731
2741
|
replace?: boolean;
|
|
2742
|
+
/** Masked URL */
|
|
2743
|
+
unstable_mask?: To;
|
|
2732
2744
|
/** Adds persistent client side routing state to the next location */
|
|
2733
2745
|
state?: any;
|
|
2734
|
-
/** If you are using {@link
|
|
2746
|
+
/** If you are using {@link ScrollRestoration `<ScrollRestoration>`}, prevent the scroll position from being reset to the top of the window when navigating */
|
|
2735
2747
|
preventScrollReset?: boolean;
|
|
2736
2748
|
/** Defines the relative path behavior for the link. "route" will use the route hierarchy so ".." will remove all URL segments of the current route pattern while "path" will use the URL path so ".." will remove one URL segment. */
|
|
2737
2749
|
relative?: RelativeRoutingType;
|
|
2738
2750
|
/** Wraps the initial state update for this navigation in a {@link https://react.dev/reference/react-dom/flushSync ReactDOM.flushSync} call instead of the default {@link https://react.dev/reference/react/startTransition React.startTransition} */
|
|
2739
2751
|
flushSync?: boolean;
|
|
2740
|
-
/** Enables a {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API View Transition} for this navigation by wrapping the final state update in `document.startViewTransition()`. If you need to apply specific styles for this view transition, you will also need to leverage the {@link
|
|
2752
|
+
/** Enables a {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API View Transition} for this navigation by wrapping the final state update in `document.startViewTransition()`. If you need to apply specific styles for this view transition, you will also need to leverage the {@link useViewTransitionState `useViewTransitionState()`} hook. */
|
|
2741
2753
|
viewTransition?: boolean;
|
|
2742
2754
|
/** Specifies the default revalidation behavior after this submission */
|
|
2743
2755
|
unstable_defaultShouldRevalidate?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { R as RouteFiles, P as Pages } from '../../register-
|
|
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-cLsU7kHk.mjs';
|
|
2
|
+
import { R as RouteFiles, P as Pages } from '../../register-cRYJ3CjG.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -46,7 +46,7 @@ type CreateMetaArgs<T extends RouteInfo> = {
|
|
|
46
46
|
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
|
47
47
|
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
|
48
48
|
error?: unknown;
|
|
49
|
-
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/
|
|
49
|
+
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
|
|
50
50
|
matches: MetaMatches<T["matches"]>;
|
|
51
51
|
};
|
|
52
52
|
type MetaDescriptors = MetaDescriptor[];
|
|
@@ -110,7 +110,7 @@ type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
|
|
110
110
|
* }
|
|
111
111
|
**/
|
|
112
112
|
params: T["params"];
|
|
113
|
-
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/
|
|
113
|
+
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
|
|
114
114
|
matches: Matches<T["matches"]>;
|
|
115
115
|
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
|
116
116
|
/** The data returned from the `loader` */
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
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--6Pioq_G.js';
|
|
2
|
+
import { R as RouteFiles, P as Pages } from '../../register-CBoanF80.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -46,7 +46,7 @@ type CreateMetaArgs<T extends RouteInfo> = {
|
|
|
46
46
|
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
|
47
47
|
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
|
48
48
|
error?: unknown;
|
|
49
|
-
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/
|
|
49
|
+
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
|
|
50
50
|
matches: MetaMatches<T["matches"]>;
|
|
51
51
|
};
|
|
52
52
|
type MetaDescriptors = MetaDescriptor[];
|
|
@@ -110,7 +110,7 @@ type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
|
|
110
110
|
* }
|
|
111
111
|
**/
|
|
112
112
|
params: T["params"];
|
|
113
|
-
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/
|
|
113
|
+
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
|
|
114
114
|
matches: Matches<T["matches"]>;
|
|
115
115
|
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
|
116
116
|
/** The data returned from the `loader` */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RouteModule } from './instrumentation
|
|
1
|
+
import { R as RouteModule } from './instrumentation--6Pioq_G.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.
|
|
@@ -58,6 +58,11 @@ interface Location<State = any> extends Path {
|
|
|
58
58
|
* Note: This value is always "default" on the initial location.
|
|
59
59
|
*/
|
|
60
60
|
key: string;
|
|
61
|
+
/**
|
|
62
|
+
* The masked location displayed in the URL bar, which differs from the URL the
|
|
63
|
+
* router is operating on
|
|
64
|
+
*/
|
|
65
|
+
unstable_mask: Path | undefined;
|
|
61
66
|
}
|
|
62
67
|
/**
|
|
63
68
|
* A change to the current location.
|
|
@@ -2165,15 +2170,17 @@ declare const AwaitContextProvider: (props: React.ComponentProps<typeof AwaitCon
|
|
|
2165
2170
|
interface NavigateOptions {
|
|
2166
2171
|
/** Replace the current entry in the history stack instead of pushing a new one */
|
|
2167
2172
|
replace?: boolean;
|
|
2173
|
+
/** Masked URL */
|
|
2174
|
+
unstable_mask?: To;
|
|
2168
2175
|
/** Adds persistent client side routing state to the next location */
|
|
2169
2176
|
state?: any;
|
|
2170
|
-
/** If you are using {@link
|
|
2177
|
+
/** If you are using {@link ScrollRestoration `<ScrollRestoration>`}, prevent the scroll position from being reset to the top of the window when navigating */
|
|
2171
2178
|
preventScrollReset?: boolean;
|
|
2172
2179
|
/** Defines the relative path behavior for the link. "route" will use the route hierarchy so ".." will remove all URL segments of the current route pattern while "path" will use the URL path so ".." will remove one URL segment. */
|
|
2173
2180
|
relative?: RelativeRoutingType;
|
|
2174
2181
|
/** Wraps the initial state update for this navigation in a {@link https://react.dev/reference/react-dom/flushSync ReactDOM.flushSync} call instead of the default {@link https://react.dev/reference/react/startTransition React.startTransition} */
|
|
2175
2182
|
flushSync?: boolean;
|
|
2176
|
-
/** Enables a {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API View Transition} for this navigation by wrapping the final state update in `document.startViewTransition()`. If you need to apply specific styles for this view transition, you will also need to leverage the {@link
|
|
2183
|
+
/** Enables a {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API View Transition} for this navigation by wrapping the final state update in `document.startViewTransition()`. If you need to apply specific styles for this view transition, you will also need to leverage the {@link useViewTransitionState `useViewTransitionState()`} hook. */
|
|
2177
2184
|
viewTransition?: boolean;
|
|
2178
2185
|
/** Specifies the default revalidation behavior after this submission */
|
|
2179
2186
|
unstable_defaultShouldRevalidate?: boolean;
|
|
@@ -2991,6 +2998,10 @@ interface RouterState {
|
|
|
2991
2998
|
* Tracks whether we've completed our initial data load
|
|
2992
2999
|
*/
|
|
2993
3000
|
initialized: boolean;
|
|
3001
|
+
/**
|
|
3002
|
+
* Tracks whether we should be rendering a HydrateFallback during hydration
|
|
3003
|
+
*/
|
|
3004
|
+
renderFallback: boolean;
|
|
2994
3005
|
/**
|
|
2995
3006
|
* Current scroll position we should start at for a new view
|
|
2996
3007
|
* - number -> scroll position to restore to
|
|
@@ -3143,6 +3154,7 @@ type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
|
|
3143
3154
|
state?: any;
|
|
3144
3155
|
fromRouteId?: string;
|
|
3145
3156
|
viewTransition?: boolean;
|
|
3157
|
+
unstable_mask?: To;
|
|
3146
3158
|
};
|
|
3147
3159
|
type BaseSubmissionOptions = {
|
|
3148
3160
|
formMethod?: HTMLFormMethod;
|