react-router 7.9.2-pre.3 → 7.9.3-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 +15 -8
- package/dist/{production/chunk-W5PNW5ME.mjs → development/chunk-HHJJZWWP.mjs} +6 -10
- package/dist/{production/chunk-NQKLZ2ZX.js → development/chunk-MREZ7GBS.js} +134 -134
- package/dist/development/{chunk-665FWGER.js → chunk-OUSD3CXG.js} +7 -4
- package/dist/development/{chunk-2WPYM2VW.mjs → chunk-TZREDCP7.mjs} +8 -5
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- 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.js +5 -2
- package/dist/development/index-react-server.mjs +5 -2
- package/dist/development/index.js +100 -104
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-ADN7TWEK.js → chunk-AR4BV4G2.js} +7 -4
- package/dist/production/{chunk-R53WSUO7.mjs → chunk-RX77WZIY.mjs} +8 -5
- package/dist/{development/chunk-QWBW4WZW.js → production/chunk-YE2RU2Y2.js} +134 -134
- package/dist/{development/chunk-AQYUIXYF.mjs → production/chunk-ZS4K3BVQ.mjs} +6 -10
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- 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.js +5 -2
- package/dist/production/index-react-server.mjs +5 -2
- package/dist/production/index.js +100 -104
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.
|
|
2
|
+
* react-router v7.9.3-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
withComponentProps,
|
|
61
61
|
withErrorBoundaryProps,
|
|
62
62
|
withHydrateFallbackProps
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-RX77WZIY.mjs";
|
|
64
64
|
|
|
65
65
|
// lib/dom/ssr/server.tsx
|
|
66
66
|
import * as React from "react";
|
|
@@ -1459,7 +1459,6 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1459
1459
|
}
|
|
1460
1460
|
function handleQueryRouteError(error) {
|
|
1461
1461
|
if (isResponse(error)) {
|
|
1462
|
-
error.headers.set("X-Remix-Catch", "yes");
|
|
1463
1462
|
return error;
|
|
1464
1463
|
}
|
|
1465
1464
|
if (isRouteErrorResponse(error)) {
|
|
@@ -1486,10 +1485,7 @@ function errorResponseToJson(errorResponse, serverMode) {
|
|
|
1486
1485
|
),
|
|
1487
1486
|
{
|
|
1488
1487
|
status: errorResponse.status,
|
|
1489
|
-
statusText: errorResponse.statusText
|
|
1490
|
-
headers: {
|
|
1491
|
-
"X-Remix-Error": "yes"
|
|
1492
|
-
}
|
|
1488
|
+
statusText: errorResponse.statusText
|
|
1493
1489
|
}
|
|
1494
1490
|
);
|
|
1495
1491
|
}
|
|
@@ -2160,8 +2156,8 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2160
2156
|
let res = await fetchImplementation(
|
|
2161
2157
|
new Request(url, await createRequestInit(request))
|
|
2162
2158
|
);
|
|
2163
|
-
if (res.status
|
|
2164
|
-
throw new ErrorResponseImpl(
|
|
2159
|
+
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
2160
|
+
throw new ErrorResponseImpl(res.status, res.statusText, await res.text());
|
|
2165
2161
|
}
|
|
2166
2162
|
invariant(res.body, "No response body to decode");
|
|
2167
2163
|
try {
|
|
@@ -2649,7 +2645,7 @@ async function routeRSCServerRequest({
|
|
|
2649
2645
|
headers2.delete("Content-Encoding");
|
|
2650
2646
|
headers2.delete("Content-Length");
|
|
2651
2647
|
headers2.delete("Content-Type");
|
|
2652
|
-
headers2.delete("
|
|
2648
|
+
headers2.delete("X-Remix-Response");
|
|
2653
2649
|
headers2.set("Location", payload.location);
|
|
2654
2650
|
return new Response(serverResponseB?.body || "", {
|
|
2655
2651
|
headers: headers2,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v7.9.
|
|
2
|
+
* react-router v7.9.3-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"use client";
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkAR4BV4G2js = require('./chunk-AR4BV4G2.js');
|
|
15
15
|
|
|
16
16
|
// lib/dom-export/dom-router-provider.tsx
|
|
17
17
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react);
|
|
@@ -180,7 +180,7 @@ function HydratedRouter(props) {
|
|
|
180
180
|
}, []);
|
|
181
181
|
React2.useEffect(() => {
|
|
182
182
|
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
|
|
183
|
-
document.querySelectorAll(`[${
|
|
183
|
+
document.querySelectorAll(`[${_chunkAR4BV4G2js.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
|
|
184
184
|
}
|
|
185
185
|
}, [criticalCss]);
|
|
186
186
|
let [location, setLocation] = React2.useState(router.state.location);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.
|
|
2
|
+
* react-router v7.9.3-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import {
|
|
13
13
|
deserializeErrors,
|
|
14
14
|
getHydrationData
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZS4K3BVQ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
CRITICAL_CSS_DATA_ATTRIBUTE,
|
|
18
18
|
FrameworkContext,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
invariant,
|
|
30
30
|
mapRouteProperties,
|
|
31
31
|
useFogOFWarDiscovery
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-RX77WZIY.mjs";
|
|
33
33
|
|
|
34
34
|
// lib/dom-export/dom-router-provider.tsx
|
|
35
35
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.9.
|
|
2
|
+
* react-router v7.9.3-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkYE2RU2Y2js = require('./chunk-YE2RU2Y2.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkAR4BV4G2js = require('./chunk-AR4BV4G2.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkADN7TWEKjs = require('./chunk-ADN7TWEK.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunkYE2RU2Y2js.BrowserRouter; exports.Form = _chunkYE2RU2Y2js.Form; exports.HashRouter = _chunkYE2RU2Y2js.HashRouter; exports.Link = _chunkYE2RU2Y2js.Link; exports.Links = _chunkAR4BV4G2js.Links; exports.MemoryRouter = _chunkYE2RU2Y2js.MemoryRouter; exports.Meta = _chunkAR4BV4G2js.Meta; exports.NavLink = _chunkYE2RU2Y2js.NavLink; exports.Navigate = _chunkYE2RU2Y2js.Navigate; exports.Outlet = _chunkYE2RU2Y2js.Outlet; exports.Route = _chunkYE2RU2Y2js.Route; exports.Router = _chunkYE2RU2Y2js.Router; exports.RouterProvider = _chunkYE2RU2Y2js.RouterProvider; exports.Routes = _chunkYE2RU2Y2js.Routes; exports.ScrollRestoration = _chunkYE2RU2Y2js.ScrollRestoration; exports.StaticRouter = _chunkYE2RU2Y2js.StaticRouter; exports.StaticRouterProvider = _chunkYE2RU2Y2js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkAR4BV4G2js.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkYE2RU2Y2js.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkYE2RU2Y2js.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkYE2RU2Y2js.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkYE2RU2Y2js.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.
|
|
2
|
+
* react-router v7.9.3-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-RX77WZIY.mjs";
|
|
36
36
|
export {
|
|
37
37
|
BrowserRouter,
|
|
38
38
|
Form,
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v7.9.
|
|
30
|
+
* react-router v7.9.3-pre.0
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -1637,7 +1637,10 @@ function getDataStrategyMatch(mapRouteProperties, manifest, request, match, lazy
|
|
|
1637
1637
|
return shouldRevalidateLoader(match, unstable_shouldRevalidateArgs);
|
|
1638
1638
|
},
|
|
1639
1639
|
resolve(handlerOverride) {
|
|
1640
|
-
|
|
1640
|
+
let { lazy, loader, middleware } = match.route;
|
|
1641
|
+
let callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader);
|
|
1642
|
+
let isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;
|
|
1643
|
+
if (callHandler && !isMiddlewareOnlyRoute) {
|
|
1641
1644
|
return callLoaderOrAction({
|
|
1642
1645
|
request,
|
|
1643
1646
|
match,
|
|
@@ -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.
|
|
9
|
+
* react-router v7.9.3-pre.0
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -1616,7 +1616,10 @@ function getDataStrategyMatch(mapRouteProperties, manifest, request, match, lazy
|
|
|
1616
1616
|
return shouldRevalidateLoader(match, unstable_shouldRevalidateArgs);
|
|
1617
1617
|
},
|
|
1618
1618
|
resolve(handlerOverride) {
|
|
1619
|
-
|
|
1619
|
+
let { lazy, loader, middleware } = match.route;
|
|
1620
|
+
let callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader);
|
|
1621
|
+
let isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;
|
|
1622
|
+
if (callHandler && !isMiddlewareOnlyRoute) {
|
|
1620
1623
|
return callLoaderOrAction({
|
|
1621
1624
|
request,
|
|
1622
1625
|
match,
|