react-router 7.9.6 → 7.10.0-pre.1
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 +75 -10
- package/dist/development/{browser-BbBXFHbO.d.ts → browser-BpxEZgZC.d.ts} +1 -1
- package/dist/development/{browser-C07r42Tt.d.mts → browser-C5z6FZmz.d.mts} +1 -1
- package/dist/development/{chunk-4WY6JWTD.mjs → chunk-GIMUO62I.mjs} +208 -221
- package/dist/development/{chunk-AMVS5XVJ.js → chunk-KQLPIZ7E.js} +201 -258
- package/dist/development/{chunk-PZWDWJAY.js → chunk-RHWHYDYZ.js} +7 -7
- package/dist/development/{chunk-G3INQAYP.mjs → chunk-V5RTLP6E.mjs} +15 -5
- package/dist/development/{chunk-O4JVZSOY.js → chunk-XHWAND4X.js} +167 -123
- package/dist/development/dom-export.d.mts +29 -10
- package/dist/development/dom-export.d.ts +29 -10
- package/dist/development/dom-export.js +158 -103
- package/dist/development/dom-export.mjs +133 -79
- package/dist/{production/index-react-server-client-Da3kmxNd.d.ts → development/index-react-server-client-CCjKYJTH.d.ts} +75 -180
- package/dist/development/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-CipGfVBI.d.mts} +75 -180
- 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 +19 -4
- package/dist/development/index-react-server.d.ts +19 -4
- package/dist/development/index-react-server.js +30 -24
- package/dist/development/index-react-server.mjs +30 -24
- package/dist/development/index.d.mts +19 -15
- package/dist/development/index.d.ts +19 -15
- package/dist/development/index.js +92 -82
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-Unc20tLk.d.ts → development/instrumentation-BB0wRuqz.d.ts} +93 -11
- 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-QkB3HGjm.d.mts → register-C1RwVJAt.d.mts} +1 -1
- package/dist/development/{register-BpU9rFBJ.d.ts → register-ODDAAYlf.d.ts} +1 -1
- package/dist/development/{router-CAvh_Drx.d.mts → router-CwNp5l9u.d.mts} +93 -11
- package/dist/production/{browser-BbBXFHbO.d.ts → browser-BpxEZgZC.d.ts} +1 -1
- package/dist/production/{browser-C07r42Tt.d.mts → browser-C5z6FZmz.d.mts} +1 -1
- package/dist/production/{chunk-QN64DHI4.js → chunk-3MVZKESN.js} +167 -123
- package/dist/production/{chunk-FUSXQSWG.mjs → chunk-7F5XUDXM.mjs} +208 -221
- package/dist/production/{chunk-EAIF67OW.js → chunk-C7S4I3K5.js} +201 -258
- package/dist/production/{chunk-FDUMZGKM.mjs → chunk-ISOIFGFA.mjs} +15 -5
- package/dist/production/{chunk-G5A35OQU.js → chunk-YU3WNS3T.js} +7 -7
- package/dist/production/dom-export.d.mts +29 -10
- package/dist/production/dom-export.d.ts +29 -10
- package/dist/production/dom-export.js +158 -103
- package/dist/production/dom-export.mjs +133 -79
- package/dist/{development/index-react-server-client-Da3kmxNd.d.ts → production/index-react-server-client-CCjKYJTH.d.ts} +75 -180
- package/dist/production/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-CipGfVBI.d.mts} +75 -180
- 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 +19 -4
- package/dist/production/index-react-server.d.ts +19 -4
- package/dist/production/index-react-server.js +30 -24
- package/dist/production/index-react-server.mjs +30 -24
- package/dist/production/index.d.mts +19 -15
- package/dist/production/index.d.ts +19 -15
- package/dist/production/index.js +92 -82
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-Unc20tLk.d.ts → production/instrumentation-BB0wRuqz.d.ts} +93 -11
- 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-QkB3HGjm.d.mts → register-C1RwVJAt.d.mts} +1 -1
- package/dist/production/{register-BpU9rFBJ.d.ts → register-ODDAAYlf.d.ts} +1 -1
- package/dist/production/{router-CAvh_Drx.d.mts → router-CwNp5l9u.d.mts} +93 -11
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.10.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkKQLPIZ7Ejs = require('./chunk-KQLPIZ7E.js');
|
|
18
18
|
|
|
19
19
|
// lib/dom/ssr/hydration.tsx
|
|
20
20
|
function getHydrationData({
|
|
@@ -29,12 +29,12 @@ function getHydrationData({
|
|
|
29
29
|
...state,
|
|
30
30
|
loaderData: { ...state.loaderData }
|
|
31
31
|
};
|
|
32
|
-
let initialMatches =
|
|
32
|
+
let initialMatches = _chunkKQLPIZ7Ejs.matchRoutes.call(void 0, routes, location, basename);
|
|
33
33
|
if (initialMatches) {
|
|
34
34
|
for (let match of initialMatches) {
|
|
35
35
|
let routeId = match.route.id;
|
|
36
36
|
let routeInfo = getRouteInfo(routeId);
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkKQLPIZ7Ejs.shouldHydrateRouteLoader.call(void 0,
|
|
38
38
|
routeId,
|
|
39
39
|
routeInfo.clientLoader,
|
|
40
40
|
routeInfo.hasLoader,
|
|
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
if (
|
|
115
|
+
if (_chunkKQLPIZ7Ejs.isRouteErrorResponse.call(void 0, error)) {
|
|
116
116
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
117
117
|
ErrorWrapper,
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
120
120
|
title: "Unhandled Thrown Response!"
|
|
121
121
|
},
|
|
122
122
|
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
123
|
-
|
|
123
|
+
_chunkKQLPIZ7Ejs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
let errorInstance;
|
|
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
146
146
|
function RSCDefaultRootErrorBoundary({
|
|
147
147
|
hasRootLayout
|
|
148
148
|
}) {
|
|
149
|
-
let error =
|
|
149
|
+
let error = _chunkKQLPIZ7Ejs.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.10.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
withComponentProps,
|
|
50
50
|
withErrorBoundaryProps,
|
|
51
51
|
withHydrateFallbackProps
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-GIMUO62I.mjs";
|
|
53
53
|
|
|
54
54
|
// lib/dom/ssr/server.tsx
|
|
55
55
|
import * as React from "react";
|
|
@@ -1655,12 +1655,12 @@ function createMemorySessionStorage({ cookie } = {}) {
|
|
|
1655
1655
|
// lib/href.ts
|
|
1656
1656
|
function href(path, ...args) {
|
|
1657
1657
|
let params = args[0];
|
|
1658
|
-
let result = path
|
|
1658
|
+
let result = trimTrailingSplat(path).replace(
|
|
1659
1659
|
/\/:([\w-]+)(\?)?/g,
|
|
1660
1660
|
// same regex as in .\router\utils.ts: compilePath().
|
|
1661
1661
|
(_, param, questionMark) => {
|
|
1662
1662
|
const isRequired = questionMark === void 0;
|
|
1663
|
-
const value = params
|
|
1663
|
+
const value = params?.[param];
|
|
1664
1664
|
if (isRequired && value === void 0) {
|
|
1665
1665
|
throw new Error(
|
|
1666
1666
|
`Path '${path}' requires param '${param}' but it was not provided`
|
|
@@ -1670,13 +1670,23 @@ function href(path, ...args) {
|
|
|
1670
1670
|
}
|
|
1671
1671
|
);
|
|
1672
1672
|
if (path.endsWith("*")) {
|
|
1673
|
-
const value = params
|
|
1673
|
+
const value = params?.["*"];
|
|
1674
1674
|
if (value !== void 0) {
|
|
1675
1675
|
result += "/" + value;
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
return result || "/";
|
|
1679
1679
|
}
|
|
1680
|
+
function trimTrailingSplat(path) {
|
|
1681
|
+
let i = path.length - 1;
|
|
1682
|
+
let char = path[i];
|
|
1683
|
+
if (char !== "*" && char !== "/") return path;
|
|
1684
|
+
i--;
|
|
1685
|
+
for (; i >= 0; i--) {
|
|
1686
|
+
if (path[i] !== "/") break;
|
|
1687
|
+
}
|
|
1688
|
+
return path.slice(0, i + 1);
|
|
1689
|
+
}
|
|
1680
1690
|
|
|
1681
1691
|
// lib/rsc/server.ssr.tsx
|
|
1682
1692
|
import * as React4 from "react";
|