react-router 7.10.1 → 7.11.0-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 +29 -11
- package/dist/development/{browser-BpxEZgZC.d.ts → browser-Cv4JZyZ5.d.mts} +4 -3
- package/dist/{production/browser-BpxEZgZC.d.ts → development/browser-o-qhcuhA.d.ts} +4 -3
- package/dist/{production/chunk-B3F6YMOF.js → development/chunk-JKMHOZYW.js} +111 -121
- package/dist/development/{chunk-WWGJGFF6.mjs → chunk-KRMLYMWA.mjs} +231 -74
- package/dist/{production/chunk-YO5R3LGQ.js → development/chunk-OVG6YSZ5.js} +7 -7
- package/dist/development/{chunk-PMGK554W.mjs → chunk-QMKP6CC3.mjs} +147 -38
- package/dist/development/{chunk-RBZI3ZHD.js → chunk-UO7KGW2U.js} +279 -110
- package/dist/development/dom-export.d.mts +11 -10
- package/dist/development/dom-export.d.ts +12 -11
- package/dist/development/dom-export.js +30 -31
- package/dist/development/dom-export.mjs +6 -7
- package/dist/{production/index-react-server-client-CCjKYJTH.d.ts → development/index-react-server-client-Cv5Q9lf0.d.ts} +60 -14
- package/dist/development/{index-react-server-client-CipGfVBI.d.mts → index-react-server-client-P7VgYu6T.d.mts} +60 -14
- 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 +4 -2
- package/dist/development/index-react-server.d.ts +4 -2
- package/dist/development/index-react-server.js +72 -19
- package/dist/development/index-react-server.mjs +72 -19
- package/dist/development/index.d.mts +17 -16
- package/dist/development/index.d.ts +17 -16
- package/dist/development/index.js +220 -111
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-BB0wRuqz.d.ts → development/instrumentation-BlrVzjbg.d.ts} +30 -15
- package/dist/development/lib/types/internal.d.mts +2 -2
- 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/development/{register-ODDAAYlf.d.ts → register-BGQUMCK4.d.ts} +1 -1
- package/dist/development/{register-C1RwVJAt.d.mts → register-DTJJbt1o.d.mts} +1 -1
- package/dist/development/{router-CwNp5l9u.d.mts → router-5fbeEIMQ.d.mts} +30 -15
- package/dist/{development/browser-C5z6FZmz.d.mts → production/browser-Cv4JZyZ5.d.mts} +4 -3
- package/dist/production/{browser-C5z6FZmz.d.mts → browser-o-qhcuhA.d.ts} +4 -3
- package/dist/production/{chunk-UQPBOMFP.js → chunk-AO22ZXHI.js} +279 -110
- package/dist/production/{chunk-ANIOYBQK.mjs → chunk-IDHO4Q57.mjs} +231 -74
- package/dist/production/{chunk-TDCOAFPJ.mjs → chunk-J4JITZ76.mjs} +147 -38
- package/dist/{development/chunk-HMTWJNYB.js → production/chunk-M5W3Q3T5.js} +111 -121
- package/dist/{development/chunk-FKYGG5Z2.js → production/chunk-YGB3JEIP.js} +7 -7
- package/dist/production/dom-export.d.mts +11 -10
- package/dist/production/dom-export.d.ts +12 -11
- package/dist/production/dom-export.js +30 -31
- package/dist/production/dom-export.mjs +6 -7
- package/dist/{development/index-react-server-client-CCjKYJTH.d.ts → production/index-react-server-client-Cv5Q9lf0.d.ts} +60 -14
- package/dist/production/{index-react-server-client-CipGfVBI.d.mts → index-react-server-client-P7VgYu6T.d.mts} +60 -14
- 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 +4 -2
- package/dist/production/index-react-server.d.ts +4 -2
- package/dist/production/index-react-server.js +72 -19
- package/dist/production/index-react-server.mjs +72 -19
- package/dist/production/index.d.mts +17 -16
- package/dist/production/index.d.ts +17 -16
- package/dist/production/index.js +220 -111
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-BB0wRuqz.d.ts → production/instrumentation-BlrVzjbg.d.ts} +30 -15
- package/dist/production/lib/types/internal.d.mts +2 -2
- 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/production/{register-ODDAAYlf.d.ts → register-BGQUMCK4.d.ts} +1 -1
- package/dist/production/{register-C1RwVJAt.d.mts → register-DTJJbt1o.d.mts} +1 -1
- package/dist/production/{router-CwNp5l9u.d.mts → router-5fbeEIMQ.d.mts} +30 -15
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bE as RouteManifest, q as RouteModules, W as HydrationState, a3 as DataRouteObject, a as ClientLoaderFunction, a7 as StaticHandlerContext, bF as ServerRouteModule, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, an as LoaderFunctionArgs, ae as ActionFunctionArgs, aw as unstable_ServerInstrumentation, al as HTMLFormMethod, aj as FormEncType, y as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bG as History, a6 as GetScrollRestorationKeyFunction, e as RouterInit, bH as FutureConfig$1, u as unstable_ClientInstrumentation, r as DataStrategyFunction, a2 as PatchRoutesOnNavigationFunction, v as NavigateOptions, a8 as Fetcher, Q as RouteObject, p as Router, x as SerializeFrom, B as BlockerFunction, L as Location, bI as CreateStaticHandlerOptions$1, a4 as StaticHandler } from './router-
|
|
1
|
+
import { bE as RouteManifest, q as RouteModules, W as HydrationState, a3 as DataRouteObject, a as ClientLoaderFunction, a7 as StaticHandlerContext, bF as ServerRouteModule, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, an as LoaderFunctionArgs, ae as ActionFunctionArgs, aw as unstable_ServerInstrumentation, al as HTMLFormMethod, aj as FormEncType, y as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bG as History, a6 as GetScrollRestorationKeyFunction, e as RouterInit, bH as FutureConfig$1, u as unstable_ClientInstrumentation, r as DataStrategyFunction, a2 as PatchRoutesOnNavigationFunction, v as NavigateOptions, a8 as Fetcher, Q as RouteObject, p as Router, x as SerializeFrom, B as BlockerFunction, L as Location, bI as CreateStaticHandlerOptions$1, a4 as StaticHandler } from './router-5fbeEIMQ.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
interface Route {
|
|
@@ -215,6 +215,18 @@ interface SharedSubmitOptions {
|
|
|
215
215
|
* Enable flushSync for this submission's state updates
|
|
216
216
|
*/
|
|
217
217
|
flushSync?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Specify the default revalidation behavior after this submission
|
|
220
|
+
*
|
|
221
|
+
* If no `shouldRevalidate` functions are present on the active routes, then this
|
|
222
|
+
* value will be used directly. Otherwise it will be passed into `shouldRevalidate`
|
|
223
|
+
* so the route can make the final determination on revalidation. This can be
|
|
224
|
+
* useful when updating search params and you don't want to trigger a revalidation.
|
|
225
|
+
*
|
|
226
|
+
* By default (when not specified), loaders will revalidate according to the routers
|
|
227
|
+
* standard revalidation behavior.
|
|
228
|
+
*/
|
|
229
|
+
unstable_defaultShouldRevalidate?: boolean;
|
|
218
230
|
}
|
|
219
231
|
/**
|
|
220
232
|
* Submit options available to fetchers
|
|
@@ -251,7 +263,8 @@ interface SubmitOptions extends FetcherSubmitOptions {
|
|
|
251
263
|
|
|
252
264
|
declare const FrameworkContext: React.Context<FrameworkContextObject | undefined>;
|
|
253
265
|
/**
|
|
254
|
-
* Defines the
|
|
266
|
+
* Defines the [lazy route discovery](../../explanation/lazy-route-discovery)
|
|
267
|
+
* behavior of the link/form:
|
|
255
268
|
*
|
|
256
269
|
* - "render" - default, discover the route when the link renders
|
|
257
270
|
* - "none" - don't eagerly discover, only discover if the link is clicked
|
|
@@ -1112,16 +1125,16 @@ declare namespace HistoryRouter {
|
|
|
1112
1125
|
*/
|
|
1113
1126
|
interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
|
|
1114
1127
|
/**
|
|
1115
|
-
* Defines the link discovery behavior
|
|
1128
|
+
* Defines the link [lazy route discovery](../../explanation/lazy-route-discovery) behavior.
|
|
1129
|
+
*
|
|
1130
|
+
* - **render** — default, discover the route when the link renders
|
|
1131
|
+
* - **none** — don't eagerly discover, only discover if the link is clicked
|
|
1116
1132
|
*
|
|
1117
1133
|
* ```tsx
|
|
1118
1134
|
* <Link /> // default ("render")
|
|
1119
1135
|
* <Link discover="render" />
|
|
1120
1136
|
* <Link discover="none" />
|
|
1121
1137
|
* ```
|
|
1122
|
-
*
|
|
1123
|
-
* - **render** — default, discover the route when the link renders
|
|
1124
|
-
* - **none** — don't eagerly discover, only discover if the link is clicked
|
|
1125
1138
|
*/
|
|
1126
1139
|
discover?: DiscoverBehavior;
|
|
1127
1140
|
/**
|
|
@@ -1266,6 +1279,22 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
1266
1279
|
* To apply specific styles for the transition, see {@link useViewTransitionState}
|
|
1267
1280
|
*/
|
|
1268
1281
|
viewTransition?: boolean;
|
|
1282
|
+
/**
|
|
1283
|
+
* Specify the default revalidation behavior for the navigation.
|
|
1284
|
+
*
|
|
1285
|
+
* ```tsx
|
|
1286
|
+
* <Link to="/some/path" unstable_defaultShouldRevalidate={false} />
|
|
1287
|
+
* ```
|
|
1288
|
+
*
|
|
1289
|
+
* If no `shouldRevalidate` functions are present on the active routes, then this
|
|
1290
|
+
* value will be used directly. Otherwise it will be passed into `shouldRevalidate`
|
|
1291
|
+
* so the route can make the final determination on revalidation. This can be
|
|
1292
|
+
* useful when updating search params and you don't want to trigger a revalidation.
|
|
1293
|
+
*
|
|
1294
|
+
* By default (when not specified), loaders will revalidate according to the routers
|
|
1295
|
+
* standard revalidation behavior.
|
|
1296
|
+
*/
|
|
1297
|
+
unstable_defaultShouldRevalidate?: boolean;
|
|
1269
1298
|
}
|
|
1270
1299
|
/**
|
|
1271
1300
|
* A progressively enhanced [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
|
|
@@ -1295,6 +1324,7 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
1295
1324
|
* @param {LinkProps.state} props.state n/a
|
|
1296
1325
|
* @param {LinkProps.to} props.to n/a
|
|
1297
1326
|
* @param {LinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a
|
|
1327
|
+
* @param {LinkProps.unstable_defaultShouldRevalidate} props.unstable_defaultShouldRevalidate n/a
|
|
1298
1328
|
*/
|
|
1299
1329
|
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
1300
1330
|
/**
|
|
@@ -1524,6 +1554,18 @@ interface SharedFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
|
1524
1554
|
* then this form will not do anything.
|
|
1525
1555
|
*/
|
|
1526
1556
|
onSubmit?: React.FormEventHandler<HTMLFormElement>;
|
|
1557
|
+
/**
|
|
1558
|
+
* Specify the default revalidation behavior after this submission
|
|
1559
|
+
*
|
|
1560
|
+
* If no `shouldRevalidate` functions are present on the active routes, then this
|
|
1561
|
+
* value will be used directly. Otherwise it will be passed into `shouldRevalidate`
|
|
1562
|
+
* so the route can make the final determination on revalidation. This can be
|
|
1563
|
+
* useful when updating search params and you don't want to trigger a revalidation.
|
|
1564
|
+
*
|
|
1565
|
+
* By default (when not specified), loaders will revalidate according to the routers
|
|
1566
|
+
* standard revalidation behavior.
|
|
1567
|
+
*/
|
|
1568
|
+
unstable_defaultShouldRevalidate?: boolean;
|
|
1527
1569
|
}
|
|
1528
1570
|
/**
|
|
1529
1571
|
* Form props available to fetchers
|
|
@@ -1537,16 +1579,16 @@ interface FetcherFormProps extends SharedFormProps {
|
|
|
1537
1579
|
*/
|
|
1538
1580
|
interface FormProps extends SharedFormProps {
|
|
1539
1581
|
/**
|
|
1540
|
-
* Defines the
|
|
1582
|
+
* Defines the form [lazy route discovery](../../explanation/lazy-route-discovery) behavior.
|
|
1583
|
+
*
|
|
1584
|
+
* - **render** — default, discover the route when the form renders
|
|
1585
|
+
* - **none** — don't eagerly discover, only discover if the form is submitted
|
|
1541
1586
|
*
|
|
1542
1587
|
* ```tsx
|
|
1543
|
-
* <
|
|
1544
|
-
* <
|
|
1545
|
-
* <
|
|
1588
|
+
* <Form /> // default ("render")
|
|
1589
|
+
* <Form discover="render" />
|
|
1590
|
+
* <Form discover="none" />
|
|
1546
1591
|
* ```
|
|
1547
|
-
*
|
|
1548
|
-
* - **render** — default, discover the route when the link renders
|
|
1549
|
-
* - **none** — don't eagerly discover, only discover if the link is clicked
|
|
1550
1592
|
*/
|
|
1551
1593
|
discover?: DiscoverBehavior;
|
|
1552
1594
|
/**
|
|
@@ -1631,6 +1673,7 @@ interface FormProps extends SharedFormProps {
|
|
|
1631
1673
|
* @param {FormProps.replace} replace n/a
|
|
1632
1674
|
* @param {FormProps.state} state n/a
|
|
1633
1675
|
* @param {FormProps.viewTransition} viewTransition n/a
|
|
1676
|
+
* @param {FormProps.unstable_defaultShouldRevalidate} unstable_defaultShouldRevalidate n/a
|
|
1634
1677
|
* @returns A progressively enhanced [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) component
|
|
1635
1678
|
*/
|
|
1636
1679
|
declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
|
|
@@ -1721,18 +1764,21 @@ declare namespace ScrollRestoration {
|
|
|
1721
1764
|
* @param options.viewTransition Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)
|
|
1722
1765
|
* for this navigation. To apply specific styles during the transition, see
|
|
1723
1766
|
* {@link useViewTransitionState}. Defaults to `false`.
|
|
1767
|
+
* @param options.unstable_defaultShouldRevalidate Specify the default revalidation
|
|
1768
|
+
* behavior for the navigation. Defaults to `true`.
|
|
1724
1769
|
* @param options.unstable_useTransitions Wraps the navigation in
|
|
1725
1770
|
* [`React.startTransition`](https://react.dev/reference/react/startTransition)
|
|
1726
1771
|
* for concurrent rendering. Defaults to `false`.
|
|
1727
1772
|
* @returns A click handler function that can be used in a custom {@link Link} component.
|
|
1728
1773
|
*/
|
|
1729
|
-
declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, unstable_useTransitions, }?: {
|
|
1774
|
+
declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions, }?: {
|
|
1730
1775
|
target?: React.HTMLAttributeAnchorTarget;
|
|
1731
1776
|
replace?: boolean;
|
|
1732
1777
|
state?: any;
|
|
1733
1778
|
preventScrollReset?: boolean;
|
|
1734
1779
|
relative?: RelativeRoutingType;
|
|
1735
1780
|
viewTransition?: boolean;
|
|
1781
|
+
unstable_defaultShouldRevalidate?: boolean;
|
|
1736
1782
|
unstable_useTransitions?: boolean;
|
|
1737
1783
|
}): (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
1738
1784
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aR as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './router-
|
|
2
|
-
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-
|
|
1
|
+
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aR as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './router-5fbeEIMQ.mjs';
|
|
2
|
+
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-P7VgYu6T.mjs';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aP as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './instrumentation-
|
|
2
|
-
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-
|
|
1
|
+
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aP as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './instrumentation-BlrVzjbg.js';
|
|
2
|
+
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-Cv5Q9lf0.js';
|
|
3
3
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.11.0-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkJKMHOZYWjs = require('./chunk-JKMHOZYW.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -34,7 +34,7 @@ var _chunkHMTWJNYBjs = require('./chunk-HMTWJNYB.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkUO7KGW2Ujs = require('./chunk-UO7KGW2U.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkRBZI3ZHDjs = require('./chunk-RBZI3ZHD.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunkJKMHOZYWjs.BrowserRouter; exports.Form = _chunkJKMHOZYWjs.Form; exports.HashRouter = _chunkJKMHOZYWjs.HashRouter; exports.Link = _chunkJKMHOZYWjs.Link; exports.Links = _chunkUO7KGW2Ujs.Links; exports.MemoryRouter = _chunkUO7KGW2Ujs.MemoryRouter; exports.Meta = _chunkUO7KGW2Ujs.Meta; exports.NavLink = _chunkJKMHOZYWjs.NavLink; exports.Navigate = _chunkUO7KGW2Ujs.Navigate; exports.Outlet = _chunkUO7KGW2Ujs.Outlet; exports.Route = _chunkUO7KGW2Ujs.Route; exports.Router = _chunkUO7KGW2Ujs.Router; exports.RouterProvider = _chunkUO7KGW2Ujs.RouterProvider; exports.Routes = _chunkUO7KGW2Ujs.Routes; exports.ScrollRestoration = _chunkJKMHOZYWjs.ScrollRestoration; exports.StaticRouter = _chunkJKMHOZYWjs.StaticRouter; exports.StaticRouterProvider = _chunkJKMHOZYWjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkUO7KGW2Ujs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkUO7KGW2Ujs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkUO7KGW2Ujs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkUO7KGW2Ujs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkJKMHOZYWjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.11.0-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
WithComponentProps,
|
|
33
33
|
WithErrorBoundaryProps,
|
|
34
34
|
WithHydrateFallbackProps
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KRMLYMWA.mjs";
|
|
36
36
|
export {
|
|
37
37
|
BrowserRouter,
|
|
38
38
|
Form,
|
|
@@ -1369,6 +1369,7 @@ type BaseNavigateOrFetchOptions = {
|
|
|
1369
1369
|
preventScrollReset?: boolean;
|
|
1370
1370
|
relative?: RelativeRoutingType;
|
|
1371
1371
|
flushSync?: boolean;
|
|
1372
|
+
unstable_defaultShouldRevalidate?: boolean;
|
|
1372
1373
|
};
|
|
1373
1374
|
type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
|
1374
1375
|
replace?: boolean;
|
|
@@ -2192,7 +2193,7 @@ type RSCMatch = {
|
|
|
2192
2193
|
};
|
|
2193
2194
|
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
|
|
2194
2195
|
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
|
|
2195
|
-
type DecodeReplyFunction = (reply: FormData | string,
|
|
2196
|
+
type DecodeReplyFunction = (reply: FormData | string, options: {
|
|
2196
2197
|
temporaryReferences: unknown;
|
|
2197
2198
|
}) => Promise<unknown[]>;
|
|
2198
2199
|
type LoadServerActionFunction = (id: string) => Promise<Function>;
|
|
@@ -2277,7 +2278,8 @@ declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename,
|
|
|
2277
2278
|
onError?: (error: unknown) => void;
|
|
2278
2279
|
request: Request;
|
|
2279
2280
|
routes: RSCRouteConfigEntry[];
|
|
2280
|
-
generateResponse: (match: RSCMatch, { temporaryReferences, }: {
|
|
2281
|
+
generateResponse: (match: RSCMatch, { onError, temporaryReferences, }: {
|
|
2282
|
+
onError(error: unknown): string | undefined;
|
|
2281
2283
|
temporaryReferences: unknown;
|
|
2282
2284
|
}) => Response;
|
|
2283
2285
|
}): Promise<Response>;
|
|
@@ -1369,6 +1369,7 @@ type BaseNavigateOrFetchOptions = {
|
|
|
1369
1369
|
preventScrollReset?: boolean;
|
|
1370
1370
|
relative?: RelativeRoutingType;
|
|
1371
1371
|
flushSync?: boolean;
|
|
1372
|
+
unstable_defaultShouldRevalidate?: boolean;
|
|
1372
1373
|
};
|
|
1373
1374
|
type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
|
1374
1375
|
replace?: boolean;
|
|
@@ -2192,7 +2193,7 @@ type RSCMatch = {
|
|
|
2192
2193
|
};
|
|
2193
2194
|
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
|
|
2194
2195
|
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
|
|
2195
|
-
type DecodeReplyFunction = (reply: FormData | string,
|
|
2196
|
+
type DecodeReplyFunction = (reply: FormData | string, options: {
|
|
2196
2197
|
temporaryReferences: unknown;
|
|
2197
2198
|
}) => Promise<unknown[]>;
|
|
2198
2199
|
type LoadServerActionFunction = (id: string) => Promise<Function>;
|
|
@@ -2277,7 +2278,8 @@ declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename,
|
|
|
2277
2278
|
onError?: (error: unknown) => void;
|
|
2278
2279
|
request: Request;
|
|
2279
2280
|
routes: RSCRouteConfigEntry[];
|
|
2280
|
-
generateResponse: (match: RSCMatch, { temporaryReferences, }: {
|
|
2281
|
+
generateResponse: (match: RSCMatch, { onError, temporaryReferences, }: {
|
|
2282
|
+
onError(error: unknown): string | undefined;
|
|
2281
2283
|
temporaryReferences: unknown;
|
|
2282
2284
|
}) => Response;
|
|
2283
2285
|
}): Promise<Response>;
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v7.
|
|
30
|
+
* react-router v7.11.0-pre.0
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -1850,7 +1850,7 @@ function getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request,
|
|
|
1850
1850
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
1851
1851
|
};
|
|
1852
1852
|
}
|
|
1853
|
-
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null) {
|
|
1853
|
+
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null, callSiteDefaultShouldRevalidate) {
|
|
1854
1854
|
let isUsingNewApi = false;
|
|
1855
1855
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
1856
1856
|
mapRouteProperties,
|
|
@@ -2393,6 +2393,43 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
2395
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
2396
|
+
|
|
2397
|
+
// lib/errors.ts
|
|
2398
|
+
var ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR";
|
|
2399
|
+
var ERROR_DIGEST_REDIRECT = "REDIRECT";
|
|
2400
|
+
var ERROR_DIGEST_ROUTE_ERROR_RESPONSE = "ROUTE_ERROR_RESPONSE";
|
|
2401
|
+
function createRedirectErrorDigest(response) {
|
|
2402
|
+
return `${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:${JSON.stringify({
|
|
2403
|
+
status: response.status,
|
|
2404
|
+
statusText: response.statusText,
|
|
2405
|
+
location: response.headers.get("Location"),
|
|
2406
|
+
reloadDocument: response.headers.get("X-Remix-Reload-Document") === "true",
|
|
2407
|
+
replace: response.headers.get("X-Remix-Replace") === "true"
|
|
2408
|
+
})}`;
|
|
2409
|
+
}
|
|
2410
|
+
function createRouteErrorResponseDigest(response) {
|
|
2411
|
+
let status = 500;
|
|
2412
|
+
let statusText = "";
|
|
2413
|
+
let data2;
|
|
2414
|
+
if (isDataWithResponseInit(response)) {
|
|
2415
|
+
status = response.init?.status ?? status;
|
|
2416
|
+
statusText = response.init?.statusText ?? statusText;
|
|
2417
|
+
data2 = response.data;
|
|
2418
|
+
} else {
|
|
2419
|
+
status = response.status;
|
|
2420
|
+
statusText = response.statusText;
|
|
2421
|
+
data2 = void 0;
|
|
2422
|
+
}
|
|
2423
|
+
return `${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:${JSON.stringify(
|
|
2424
|
+
{
|
|
2425
|
+
status,
|
|
2426
|
+
statusText,
|
|
2427
|
+
data: data2
|
|
2428
|
+
}
|
|
2429
|
+
)}`;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
// lib/rsc/server.rsc.ts
|
|
2396
2433
|
var Outlet = reactServerClient.Outlet;
|
|
2397
2434
|
var WithComponentProps = reactServerClient.UNSAFE_WithComponentProps;
|
|
2398
2435
|
var WithErrorBoundaryProps = reactServerClient.UNSAFE_WithErrorBoundaryProps;
|
|
@@ -2464,8 +2501,28 @@ async function matchRSCServerRequest({
|
|
|
2464
2501
|
routes,
|
|
2465
2502
|
generateResponse
|
|
2466
2503
|
}) {
|
|
2467
|
-
let
|
|
2504
|
+
let url = new URL(request.url);
|
|
2505
|
+
basename = basename || "/";
|
|
2506
|
+
let normalizedPath = url.pathname;
|
|
2507
|
+
if (stripBasename(normalizedPath, basename) === "/_root.rsc") {
|
|
2508
|
+
normalizedPath = basename;
|
|
2509
|
+
} else if (normalizedPath.endsWith(".rsc")) {
|
|
2510
|
+
normalizedPath = normalizedPath.replace(/\.rsc$/, "");
|
|
2511
|
+
}
|
|
2512
|
+
if (stripBasename(normalizedPath, basename) !== "/" && normalizedPath.endsWith("/")) {
|
|
2513
|
+
normalizedPath = normalizedPath.slice(0, -1);
|
|
2514
|
+
}
|
|
2515
|
+
url.pathname = normalizedPath;
|
|
2516
|
+
basename = basename.length > normalizedPath.length ? normalizedPath : basename;
|
|
2517
|
+
let routerRequest = new Request(url.toString(), {
|
|
2518
|
+
method: request.method,
|
|
2519
|
+
headers: request.headers,
|
|
2520
|
+
body: request.body,
|
|
2521
|
+
signal: request.signal,
|
|
2522
|
+
duplex: request.body ? "half" : void 0
|
|
2523
|
+
});
|
|
2468
2524
|
const temporaryReferences = createTemporaryReferenceSet();
|
|
2525
|
+
const requestUrl = new URL(request.url);
|
|
2469
2526
|
if (isManifestRequest(requestUrl)) {
|
|
2470
2527
|
let response2 = await generateManifestResponse(
|
|
2471
2528
|
routes,
|
|
@@ -2477,18 +2534,6 @@ async function matchRSCServerRequest({
|
|
|
2477
2534
|
return response2;
|
|
2478
2535
|
}
|
|
2479
2536
|
let isDataRequest = isReactServerRequest(requestUrl);
|
|
2480
|
-
const url = new URL(request.url);
|
|
2481
|
-
let routerRequest = request;
|
|
2482
|
-
if (isDataRequest) {
|
|
2483
|
-
url.pathname = url.pathname.replace(/(_root)?\.rsc$/, "");
|
|
2484
|
-
routerRequest = new Request(url.toString(), {
|
|
2485
|
-
method: request.method,
|
|
2486
|
-
headers: request.headers,
|
|
2487
|
-
body: request.body,
|
|
2488
|
-
signal: request.signal,
|
|
2489
|
-
duplex: request.body ? "half" : void 0
|
|
2490
|
-
});
|
|
2491
|
-
}
|
|
2492
2537
|
let matches = matchRoutes(routes, url.pathname, basename);
|
|
2493
2538
|
if (matches) {
|
|
2494
2539
|
await Promise.all(matches.map((m) => explodeLazyRoute(m.route)));
|
|
@@ -2560,7 +2605,7 @@ async function generateManifestResponse(routes, basename, request, generateRespo
|
|
|
2560
2605
|
}),
|
|
2561
2606
|
payload
|
|
2562
2607
|
},
|
|
2563
|
-
{ temporaryReferences }
|
|
2608
|
+
{ temporaryReferences, onError: defaultOnError }
|
|
2564
2609
|
);
|
|
2565
2610
|
}
|
|
2566
2611
|
function prependBasenameToRedirectResponse(response, basename = "/") {
|
|
@@ -2838,7 +2883,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
|
|
|
2838
2883
|
headers,
|
|
2839
2884
|
payload
|
|
2840
2885
|
},
|
|
2841
|
-
{ temporaryReferences }
|
|
2886
|
+
{ temporaryReferences, onError: defaultOnError }
|
|
2842
2887
|
);
|
|
2843
2888
|
}
|
|
2844
2889
|
async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders) {
|
|
@@ -2868,7 +2913,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
2868
2913
|
headers.delete("Content-Length");
|
|
2869
2914
|
const baseRenderPayload = {
|
|
2870
2915
|
type: "render",
|
|
2871
|
-
basename,
|
|
2916
|
+
basename: staticContext.basename,
|
|
2872
2917
|
actionData: staticContext.actionData,
|
|
2873
2918
|
errors: staticContext.errors,
|
|
2874
2919
|
loaderData: staticContext.loaderData,
|
|
@@ -2905,7 +2950,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
2905
2950
|
headers,
|
|
2906
2951
|
payload
|
|
2907
2952
|
},
|
|
2908
|
-
{ temporaryReferences }
|
|
2953
|
+
{ temporaryReferences, onError: defaultOnError }
|
|
2909
2954
|
);
|
|
2910
2955
|
}
|
|
2911
2956
|
async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext) {
|
|
@@ -3116,6 +3161,14 @@ function isReactServerRequest(url) {
|
|
|
3116
3161
|
function isManifestRequest(url) {
|
|
3117
3162
|
return url.pathname.endsWith(".manifest");
|
|
3118
3163
|
}
|
|
3164
|
+
function defaultOnError(error) {
|
|
3165
|
+
if (isRedirectResponse(error)) {
|
|
3166
|
+
return createRedirectErrorDigest(error);
|
|
3167
|
+
}
|
|
3168
|
+
if (isResponse(error) || isDataWithResponseInit(error)) {
|
|
3169
|
+
return createRouteErrorResponseDigest(error);
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3119
3172
|
function isClientReference(x) {
|
|
3120
3173
|
try {
|
|
3121
3174
|
return x.$$typeof === Symbol.for("react.client.reference");
|
|
@@ -6,7 +6,7 @@ export { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLi
|
|
|
6
6
|
import { serialize, parse } from 'cookie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* react-router v7.
|
|
9
|
+
* react-router v7.11.0-pre.0
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -1829,7 +1829,7 @@ function getDataStrategyMatchLazyPromises(mapRouteProperties, manifest, request,
|
|
|
1829
1829
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null) {
|
|
1832
|
+
function getDataStrategyMatch(mapRouteProperties, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null, callSiteDefaultShouldRevalidate) {
|
|
1833
1833
|
let isUsingNewApi = false;
|
|
1834
1834
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
1835
1835
|
mapRouteProperties,
|
|
@@ -2372,6 +2372,43 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
2372
2372
|
}
|
|
2373
2373
|
}
|
|
2374
2374
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
2375
|
+
|
|
2376
|
+
// lib/errors.ts
|
|
2377
|
+
var ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR";
|
|
2378
|
+
var ERROR_DIGEST_REDIRECT = "REDIRECT";
|
|
2379
|
+
var ERROR_DIGEST_ROUTE_ERROR_RESPONSE = "ROUTE_ERROR_RESPONSE";
|
|
2380
|
+
function createRedirectErrorDigest(response) {
|
|
2381
|
+
return `${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:${JSON.stringify({
|
|
2382
|
+
status: response.status,
|
|
2383
|
+
statusText: response.statusText,
|
|
2384
|
+
location: response.headers.get("Location"),
|
|
2385
|
+
reloadDocument: response.headers.get("X-Remix-Reload-Document") === "true",
|
|
2386
|
+
replace: response.headers.get("X-Remix-Replace") === "true"
|
|
2387
|
+
})}`;
|
|
2388
|
+
}
|
|
2389
|
+
function createRouteErrorResponseDigest(response) {
|
|
2390
|
+
let status = 500;
|
|
2391
|
+
let statusText = "";
|
|
2392
|
+
let data2;
|
|
2393
|
+
if (isDataWithResponseInit(response)) {
|
|
2394
|
+
status = response.init?.status ?? status;
|
|
2395
|
+
statusText = response.init?.statusText ?? statusText;
|
|
2396
|
+
data2 = response.data;
|
|
2397
|
+
} else {
|
|
2398
|
+
status = response.status;
|
|
2399
|
+
statusText = response.statusText;
|
|
2400
|
+
data2 = void 0;
|
|
2401
|
+
}
|
|
2402
|
+
return `${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:${JSON.stringify(
|
|
2403
|
+
{
|
|
2404
|
+
status,
|
|
2405
|
+
statusText,
|
|
2406
|
+
data: data2
|
|
2407
|
+
}
|
|
2408
|
+
)}`;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
// lib/rsc/server.rsc.ts
|
|
2375
2412
|
var Outlet = Outlet$1;
|
|
2376
2413
|
var WithComponentProps = UNSAFE_WithComponentProps;
|
|
2377
2414
|
var WithErrorBoundaryProps = UNSAFE_WithErrorBoundaryProps;
|
|
@@ -2443,8 +2480,28 @@ async function matchRSCServerRequest({
|
|
|
2443
2480
|
routes,
|
|
2444
2481
|
generateResponse
|
|
2445
2482
|
}) {
|
|
2446
|
-
let
|
|
2483
|
+
let url = new URL(request.url);
|
|
2484
|
+
basename = basename || "/";
|
|
2485
|
+
let normalizedPath = url.pathname;
|
|
2486
|
+
if (stripBasename(normalizedPath, basename) === "/_root.rsc") {
|
|
2487
|
+
normalizedPath = basename;
|
|
2488
|
+
} else if (normalizedPath.endsWith(".rsc")) {
|
|
2489
|
+
normalizedPath = normalizedPath.replace(/\.rsc$/, "");
|
|
2490
|
+
}
|
|
2491
|
+
if (stripBasename(normalizedPath, basename) !== "/" && normalizedPath.endsWith("/")) {
|
|
2492
|
+
normalizedPath = normalizedPath.slice(0, -1);
|
|
2493
|
+
}
|
|
2494
|
+
url.pathname = normalizedPath;
|
|
2495
|
+
basename = basename.length > normalizedPath.length ? normalizedPath : basename;
|
|
2496
|
+
let routerRequest = new Request(url.toString(), {
|
|
2497
|
+
method: request.method,
|
|
2498
|
+
headers: request.headers,
|
|
2499
|
+
body: request.body,
|
|
2500
|
+
signal: request.signal,
|
|
2501
|
+
duplex: request.body ? "half" : void 0
|
|
2502
|
+
});
|
|
2447
2503
|
const temporaryReferences = createTemporaryReferenceSet();
|
|
2504
|
+
const requestUrl = new URL(request.url);
|
|
2448
2505
|
if (isManifestRequest(requestUrl)) {
|
|
2449
2506
|
let response2 = await generateManifestResponse(
|
|
2450
2507
|
routes,
|
|
@@ -2456,18 +2513,6 @@ async function matchRSCServerRequest({
|
|
|
2456
2513
|
return response2;
|
|
2457
2514
|
}
|
|
2458
2515
|
let isDataRequest = isReactServerRequest(requestUrl);
|
|
2459
|
-
const url = new URL(request.url);
|
|
2460
|
-
let routerRequest = request;
|
|
2461
|
-
if (isDataRequest) {
|
|
2462
|
-
url.pathname = url.pathname.replace(/(_root)?\.rsc$/, "");
|
|
2463
|
-
routerRequest = new Request(url.toString(), {
|
|
2464
|
-
method: request.method,
|
|
2465
|
-
headers: request.headers,
|
|
2466
|
-
body: request.body,
|
|
2467
|
-
signal: request.signal,
|
|
2468
|
-
duplex: request.body ? "half" : void 0
|
|
2469
|
-
});
|
|
2470
|
-
}
|
|
2471
2516
|
let matches = matchRoutes(routes, url.pathname, basename);
|
|
2472
2517
|
if (matches) {
|
|
2473
2518
|
await Promise.all(matches.map((m) => explodeLazyRoute(m.route)));
|
|
@@ -2539,7 +2584,7 @@ async function generateManifestResponse(routes, basename, request, generateRespo
|
|
|
2539
2584
|
}),
|
|
2540
2585
|
payload
|
|
2541
2586
|
},
|
|
2542
|
-
{ temporaryReferences }
|
|
2587
|
+
{ temporaryReferences, onError: defaultOnError }
|
|
2543
2588
|
);
|
|
2544
2589
|
}
|
|
2545
2590
|
function prependBasenameToRedirectResponse(response, basename = "/") {
|
|
@@ -2817,7 +2862,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
|
|
|
2817
2862
|
headers,
|
|
2818
2863
|
payload
|
|
2819
2864
|
},
|
|
2820
|
-
{ temporaryReferences }
|
|
2865
|
+
{ temporaryReferences, onError: defaultOnError }
|
|
2821
2866
|
);
|
|
2822
2867
|
}
|
|
2823
2868
|
async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders) {
|
|
@@ -2847,7 +2892,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
2847
2892
|
headers.delete("Content-Length");
|
|
2848
2893
|
const baseRenderPayload = {
|
|
2849
2894
|
type: "render",
|
|
2850
|
-
basename,
|
|
2895
|
+
basename: staticContext.basename,
|
|
2851
2896
|
actionData: staticContext.actionData,
|
|
2852
2897
|
errors: staticContext.errors,
|
|
2853
2898
|
loaderData: staticContext.loaderData,
|
|
@@ -2884,7 +2929,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
|
|
|
2884
2929
|
headers,
|
|
2885
2930
|
payload
|
|
2886
2931
|
},
|
|
2887
|
-
{ temporaryReferences }
|
|
2932
|
+
{ temporaryReferences, onError: defaultOnError }
|
|
2888
2933
|
);
|
|
2889
2934
|
}
|
|
2890
2935
|
async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext) {
|
|
@@ -3095,6 +3140,14 @@ function isReactServerRequest(url) {
|
|
|
3095
3140
|
function isManifestRequest(url) {
|
|
3096
3141
|
return url.pathname.endsWith(".manifest");
|
|
3097
3142
|
}
|
|
3143
|
+
function defaultOnError(error) {
|
|
3144
|
+
if (isRedirectResponse(error)) {
|
|
3145
|
+
return createRedirectErrorDigest(error);
|
|
3146
|
+
}
|
|
3147
|
+
if (isResponse(error) || isDataWithResponseInit(error)) {
|
|
3148
|
+
return createRouteErrorResponseDigest(error);
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3098
3151
|
function isClientReference(x) {
|
|
3099
3152
|
try {
|
|
3100
3153
|
return x.$$typeof === Symbol.for("react.client.reference");
|