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
|
"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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
|
*
|
|
@@ -4148,7 +4148,10 @@ function getDataStrategyMatch(mapRouteProperties, manifest, request, match, lazy
|
|
|
4148
4148
|
return shouldRevalidateLoader(match, unstable_shouldRevalidateArgs);
|
|
4149
4149
|
},
|
|
4150
4150
|
resolve(handlerOverride) {
|
|
4151
|
-
|
|
4151
|
+
let { lazy, loader, middleware } = match.route;
|
|
4152
|
+
let callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader);
|
|
4153
|
+
let isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;
|
|
4154
|
+
if (callHandler && !isMiddlewareOnlyRoute) {
|
|
4152
4155
|
return callLoaderOrAction({
|
|
4153
4156
|
request,
|
|
4154
4157
|
match,
|
|
@@ -5954,8 +5957,8 @@ async function fetchAndDecodeViaTurboStream(args, basename, targetRoutes) {
|
|
|
5954
5957
|
}
|
|
5955
5958
|
}
|
|
5956
5959
|
let res = await fetch(url, await createRequestInit(request));
|
|
5957
|
-
if (res.status
|
|
5958
|
-
throw new ErrorResponseImpl(
|
|
5960
|
+
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
5961
|
+
throw new ErrorResponseImpl(res.status, res.statusText, await res.text());
|
|
5959
5962
|
}
|
|
5960
5963
|
if (res.status === 204 && res.headers.has("X-Remix-Redirect")) {
|
|
5961
5964
|
return {
|
|
@@ -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
|
*
|
|
@@ -4148,7 +4148,10 @@ function getDataStrategyMatch(mapRouteProperties2, manifest, request, match, laz
|
|
|
4148
4148
|
return shouldRevalidateLoader(match, unstable_shouldRevalidateArgs);
|
|
4149
4149
|
},
|
|
4150
4150
|
resolve(handlerOverride) {
|
|
4151
|
-
|
|
4151
|
+
let { lazy, loader, middleware } = match.route;
|
|
4152
|
+
let callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader);
|
|
4153
|
+
let isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;
|
|
4154
|
+
if (callHandler && !isMiddlewareOnlyRoute) {
|
|
4152
4155
|
return callLoaderOrAction({
|
|
4153
4156
|
request,
|
|
4154
4157
|
match,
|
|
@@ -7468,8 +7471,8 @@ async function fetchAndDecodeViaTurboStream(args, basename, targetRoutes) {
|
|
|
7468
7471
|
}
|
|
7469
7472
|
}
|
|
7470
7473
|
let res = await fetch(url, await createRequestInit(request));
|
|
7471
|
-
if (res.status
|
|
7472
|
-
throw new ErrorResponseImpl(
|
|
7474
|
+
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
7475
|
+
throw new ErrorResponseImpl(res.status, res.statusText, await res.text());
|
|
7473
7476
|
}
|
|
7474
7477
|
if (res.status === 204 && res.headers.has("X-Remix-Redirect")) {
|
|
7475
7478
|
return {
|
|
@@ -9110,7 +9113,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
|
|
|
9110
9113
|
try {
|
|
9111
9114
|
if (isBrowser) {
|
|
9112
9115
|
window.__reactRouterVersion = // @ts-expect-error
|
|
9113
|
-
"7.9.
|
|
9116
|
+
"7.9.3-pre.0";
|
|
9114
9117
|
}
|
|
9115
9118
|
} catch (e) {
|
|
9116
9119
|
}
|
|
@@ -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 _chunkOUSD3CXGjs = require('./chunk-OUSD3CXG.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(`[${_chunkOUSD3CXGjs.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-HHJJZWWP.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-TZREDCP7.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 _chunkMREZ7GBSjs = require('./chunk-MREZ7GBS.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkOUSD3CXGjs = require('./chunk-OUSD3CXG.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunk665FWGERjs = require('./chunk-665FWGER.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunkMREZ7GBSjs.BrowserRouter; exports.Form = _chunkMREZ7GBSjs.Form; exports.HashRouter = _chunkMREZ7GBSjs.HashRouter; exports.Link = _chunkMREZ7GBSjs.Link; exports.Links = _chunkOUSD3CXGjs.Links; exports.MemoryRouter = _chunkMREZ7GBSjs.MemoryRouter; exports.Meta = _chunkOUSD3CXGjs.Meta; exports.NavLink = _chunkMREZ7GBSjs.NavLink; exports.Navigate = _chunkMREZ7GBSjs.Navigate; exports.Outlet = _chunkMREZ7GBSjs.Outlet; exports.Route = _chunkMREZ7GBSjs.Route; exports.Router = _chunkMREZ7GBSjs.Router; exports.RouterProvider = _chunkMREZ7GBSjs.RouterProvider; exports.Routes = _chunkMREZ7GBSjs.Routes; exports.ScrollRestoration = _chunkMREZ7GBSjs.ScrollRestoration; exports.StaticRouter = _chunkMREZ7GBSjs.StaticRouter; exports.StaticRouterProvider = _chunkMREZ7GBSjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkOUSD3CXGjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkMREZ7GBSjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkMREZ7GBSjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkMREZ7GBSjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkMREZ7GBSjs.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-TZREDCP7.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,
|