react-router 7.9.6-pre.1 → 7.10.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 +69 -4
- package/dist/development/{browser-C07r42Tt.d.mts → browser-BHySFrZ2.d.mts} +1 -1
- package/dist/development/{browser-BbBXFHbO.d.ts → browser-eL-tAN4R.d.ts} +1 -1
- package/dist/development/{chunk-HSVNPM3C.js → chunk-2VILFZWG.js} +167 -123
- package/dist/development/{chunk-DKSAHU2I.mjs → chunk-4BTFPFZR.mjs} +208 -221
- package/dist/development/{chunk-RGKEVI2W.mjs → chunk-CECIHG5K.mjs} +15 -5
- package/dist/development/{chunk-CYHICRRW.js → chunk-M4WLV5HP.js} +201 -258
- package/dist/development/{chunk-OLIKX45O.js → chunk-Z4R76DXJ.js} +7 -7
- package/dist/development/dom-export.d.mts +21 -2
- package/dist/development/dom-export.d.ts +21 -2
- package/dist/development/dom-export.js +158 -103
- package/dist/development/dom-export.mjs +133 -79
- package/dist/development/{index-react-server-client-Da3kmxNd.d.ts → index-react-server-client-CNrKUHDv.d.ts} +59 -7
- package/dist/{production/index-react-server-client-rcoGPJhU.d.mts → development/index-react-server-client-DYtvZPLT.d.mts} +59 -7
- 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-Dwf-sTWa.d.ts} +66 -8
- 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-BpU9rFBJ.d.ts → register-BnQsYkwj.d.ts} +1 -1
- package/dist/development/{register-QkB3HGjm.d.mts → register-C97Jz2jB.d.mts} +1 -1
- package/dist/development/{router-CAvh_Drx.d.mts → router-Dgz_Mh9m.d.mts} +66 -8
- package/dist/production/{browser-C07r42Tt.d.mts → browser-BHySFrZ2.d.mts} +1 -1
- package/dist/production/{browser-BbBXFHbO.d.ts → browser-eL-tAN4R.d.ts} +1 -1
- package/dist/production/{chunk-2DNJUQK6.js → chunk-55FFLVQP.js} +201 -258
- package/dist/production/{chunk-EDK3MRM6.js → chunk-5DTJHKF7.js} +167 -123
- package/dist/production/{chunk-LESYMMDQ.mjs → chunk-KJ5676BZ.mjs} +208 -221
- package/dist/production/{chunk-LC2OWLJG.mjs → chunk-QKAGOFED.mjs} +15 -5
- package/dist/production/{chunk-JLDESRHY.js → chunk-SGCRBGEM.js} +7 -7
- package/dist/production/dom-export.d.mts +21 -2
- package/dist/production/dom-export.d.ts +21 -2
- package/dist/production/dom-export.js +158 -103
- package/dist/production/dom-export.mjs +133 -79
- package/dist/production/{index-react-server-client-Da3kmxNd.d.ts → index-react-server-client-CNrKUHDv.d.ts} +59 -7
- package/dist/{development/index-react-server-client-rcoGPJhU.d.mts → production/index-react-server-client-DYtvZPLT.d.mts} +59 -7
- 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-Dwf-sTWa.d.ts} +66 -8
- 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-BpU9rFBJ.d.ts → register-BnQsYkwj.d.ts} +1 -1
- package/dist/production/{register-QkB3HGjm.d.mts → register-C97Jz2jB.d.mts} +1 -1
- package/dist/production/{router-CAvh_Drx.d.mts → router-Dgz_Mh9m.d.mts} +66 -8
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.10.0-pre.0
|
|
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-4BTFPFZR.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";
|