react-router 7.14.2 → 7.15.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 +99 -0
- package/dist/development/{browser-I6n6wVSO.d.mts → browser-3AnU12UI.d.mts} +2 -2
- package/dist/{production/browser-I6n6wVSO.d.mts → development/browser-BOdXz9dK.d.ts} +2 -2
- package/dist/development/{chunk-EVOBXE3Y.mjs → chunk-4N6VE7H7.mjs} +567 -317
- package/dist/{production/chunk-PQL4HLVQ.js → development/chunk-4YRVXM2U.js} +7 -7
- package/dist/{production/chunk-UJQ4OJF4.js → development/chunk-66UKHEGQ.js} +153 -143
- package/dist/development/{chunk-ZZNWZ5Q3.js → chunk-D6LUOGOQ.js} +550 -310
- package/dist/development/{chunk-YQSHRJWW.mjs → chunk-RJYABSBD.mjs} +100 -80
- package/dist/{production/context-DGGUoDIu.d.mts → development/context-ByvtofY2.d.mts} +100 -42
- package/dist/development/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
- package/dist/development/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
- package/dist/development/dom-export.d.mts +8 -8
- package/dist/development/dom-export.d.ts +8 -8
- package/dist/development/dom-export.js +57 -62
- package/dist/development/dom-export.mjs +32 -37
- package/dist/{production/index-react-server-client-BBd0A0TL.d.ts → development/index-react-server-client-BS5F89FR.d.ts} +132 -122
- package/dist/{production/index-react-server-client-BjhKIe3u.d.mts → development/index-react-server-client-DY04-103.d.mts} +111 -101
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +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.d.mts +113 -36
- package/dist/development/index-react-server.d.ts +113 -36
- package/dist/development/index-react-server.js +63 -36
- package/dist/development/index-react-server.mjs +63 -36
- package/dist/development/index.d.mts +94 -12
- package/dist/development/index.d.ts +94 -12
- package/dist/development/index.js +193 -171
- package/dist/development/index.mjs +5 -3
- package/dist/{production/instrumentation-g0dG8UL0.d.ts → development/instrumentation-cRWWLfsU.d.ts} +79 -21
- 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-DcBltf5q.d.ts → register-Bsscfj79.d.ts} +1 -1
- package/dist/{production/register-DcBltf5q.d.ts → development/register-Df8okEea.d.mts} +1 -1
- package/dist/production/{browser-C-UvoYvi.d.ts → browser-3AnU12UI.d.mts} +2 -2
- package/dist/{development/browser-C-UvoYvi.d.ts → production/browser-BOdXz9dK.d.ts} +2 -2
- package/dist/production/{chunk-2WLZNCK5.mjs → chunk-6S4627ZB.mjs} +100 -80
- package/dist/production/{chunk-X5SKXJ4A.js → chunk-HUBUW7R3.js} +550 -310
- package/dist/production/{chunk-LK6U7ULH.mjs → chunk-JAKZPQZC.mjs} +567 -317
- package/dist/{development/chunk-YZKCRDTN.js → production/chunk-PNZCCTKT.js} +153 -143
- package/dist/{development/chunk-PZFPF4X7.js → production/chunk-Y6IFXO7V.js} +7 -7
- package/dist/{development/context-DGGUoDIu.d.mts → production/context-ByvtofY2.d.mts} +100 -42
- package/dist/production/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
- package/dist/production/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
- package/dist/production/dom-export.d.mts +8 -8
- package/dist/production/dom-export.d.ts +8 -8
- package/dist/production/dom-export.js +57 -62
- package/dist/production/dom-export.mjs +32 -37
- package/dist/{development/index-react-server-client-BBd0A0TL.d.ts → production/index-react-server-client-BS5F89FR.d.ts} +132 -122
- package/dist/{development/index-react-server-client-BjhKIe3u.d.mts → production/index-react-server-client-DY04-103.d.mts} +111 -101
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +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.d.mts +113 -36
- package/dist/production/index-react-server.d.ts +113 -36
- package/dist/production/index-react-server.js +63 -36
- package/dist/production/index-react-server.mjs +63 -36
- package/dist/production/index.d.mts +94 -12
- package/dist/production/index.d.ts +94 -12
- package/dist/production/index.js +193 -171
- package/dist/production/index.mjs +5 -3
- package/dist/{development/instrumentation-g0dG8UL0.d.ts → production/instrumentation-cRWWLfsU.d.ts} +79 -21
- 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/{development/register-D9d2sMQ7.d.mts → production/register-Bsscfj79.d.ts} +1 -1
- package/dist/production/{register-D9d2sMQ7.d.mts → register-Df8okEea.d.mts} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.15.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
deserializeErrors,
|
|
15
15
|
getHydrationData,
|
|
16
16
|
populateRSCRouteModules
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RJYABSBD.mjs";
|
|
18
18
|
import {
|
|
19
19
|
CRITICAL_CSS_DATA_ATTRIBUTE,
|
|
20
20
|
ErrorResponseImpl,
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
RSCRouterContext,
|
|
23
23
|
RemixErrorBoundary,
|
|
24
24
|
RouterProvider,
|
|
25
|
+
URL_LIMIT,
|
|
25
26
|
createBrowserHistory,
|
|
26
27
|
createClientRoutes,
|
|
27
28
|
createClientRoutesWithHMRRevalidationOptOut,
|
|
@@ -43,7 +44,7 @@ import {
|
|
|
43
44
|
singleFetchUrl,
|
|
44
45
|
stripIndexParam,
|
|
45
46
|
useFogOFWarDiscovery
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-4N6VE7H7.mjs";
|
|
47
48
|
|
|
48
49
|
// lib/dom-export/dom-router-provider.tsx
|
|
49
50
|
import * as React from "react";
|
|
@@ -82,7 +83,7 @@ function initSsrInfo() {
|
|
|
82
83
|
}
|
|
83
84
|
function createHydratedRouter({
|
|
84
85
|
getContext,
|
|
85
|
-
|
|
86
|
+
instrumentations
|
|
86
87
|
}) {
|
|
87
88
|
initSsrInfo();
|
|
88
89
|
if (!ssrInfo) {
|
|
@@ -155,10 +156,10 @@ function createHydratedRouter({
|
|
|
155
156
|
getContext,
|
|
156
157
|
hydrationData,
|
|
157
158
|
hydrationRouteProperties,
|
|
158
|
-
|
|
159
|
+
instrumentations,
|
|
159
160
|
mapRouteProperties,
|
|
160
161
|
future: {
|
|
161
|
-
|
|
162
|
+
v8_passThroughRequests: ssrInfo.context.future.v8_passThroughRequests
|
|
162
163
|
},
|
|
163
164
|
dataStrategy: getTurboStreamSingleFetchDataStrategy(
|
|
164
165
|
() => router2,
|
|
@@ -192,7 +193,7 @@ function HydratedRouter(props) {
|
|
|
192
193
|
if (!router) {
|
|
193
194
|
router = createHydratedRouter({
|
|
194
195
|
getContext: props.getContext,
|
|
195
|
-
|
|
196
|
+
instrumentations: props.instrumentations
|
|
196
197
|
});
|
|
197
198
|
}
|
|
198
199
|
let [criticalCss, setCriticalCss] = React2.useState(
|
|
@@ -253,7 +254,7 @@ function HydratedRouter(props) {
|
|
|
253
254
|
RouterProvider2,
|
|
254
255
|
{
|
|
255
256
|
router,
|
|
256
|
-
|
|
257
|
+
useTransitions: props.useTransitions,
|
|
257
258
|
onError: props.onError
|
|
258
259
|
}
|
|
259
260
|
))
|
|
@@ -538,8 +539,7 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
538
539
|
hasClientLoader: M.route.hasClientLoader,
|
|
539
540
|
hasComponent: M.route.hasComponent,
|
|
540
541
|
hasAction: M.route.hasAction,
|
|
541
|
-
hasClientAction: M.route.hasClientAction
|
|
542
|
-
hasShouldRevalidate: M.route.hasShouldRevalidate
|
|
542
|
+
hasClientAction: M.route.hasClientAction
|
|
543
543
|
};
|
|
544
544
|
},
|
|
545
545
|
// pass map into fetchAndDecode so it can add payloads
|
|
@@ -742,10 +742,9 @@ function RSCHydratedRouter({
|
|
|
742
742
|
// These flags have no runtime impact so can always be false. If we add
|
|
743
743
|
// flags that drive runtime behavior they'll need to be proxied through.
|
|
744
744
|
v8_middleware: false,
|
|
745
|
-
unstable_subResourceIntegrity: false,
|
|
746
745
|
unstable_trailingSlashAwareDataRequests: true,
|
|
747
746
|
// always on for RSC
|
|
748
|
-
|
|
747
|
+
v8_passThroughRequests: true
|
|
749
748
|
// always on for RSC
|
|
750
749
|
},
|
|
751
750
|
isSpaMode: false,
|
|
@@ -794,30 +793,28 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
794
793
|
hydrateFallbackElement: match.hydrateFallbackElement,
|
|
795
794
|
index: match.index,
|
|
796
795
|
loader: match.clientLoader ? async (args, singleFetch) => {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
796
|
+
let _isHydrationRequest = isHydrationRequest;
|
|
797
|
+
isHydrationRequest = false;
|
|
798
|
+
let result = await match.clientLoader({
|
|
799
|
+
...args,
|
|
800
|
+
serverLoader: () => {
|
|
801
|
+
preventInvalidServerHandlerCall(
|
|
802
|
+
"loader",
|
|
803
|
+
match.id,
|
|
804
|
+
match.hasLoader
|
|
805
|
+
);
|
|
806
|
+
if (_isHydrationRequest) {
|
|
807
|
+
if (hasInitialData) {
|
|
808
|
+
return initialData;
|
|
809
|
+
}
|
|
810
|
+
if (hasInitialError) {
|
|
811
|
+
throw initialError;
|
|
813
812
|
}
|
|
814
|
-
return callSingleFetch(singleFetch);
|
|
815
813
|
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
}
|
|
814
|
+
return callSingleFetch(singleFetch);
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
return result;
|
|
821
818
|
} : (
|
|
822
819
|
// We always make the call in this RSC world since even if we don't
|
|
823
820
|
// have a `loader` we may need to get the `element` implementation
|
|
@@ -843,8 +840,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
843
840
|
hasLoader: true,
|
|
844
841
|
hasClientLoader: match.clientLoader != null,
|
|
845
842
|
hasAction: match.hasAction,
|
|
846
|
-
hasClientAction: match.clientAction != null
|
|
847
|
-
hasShouldRevalidate: match.shouldRevalidate != null
|
|
843
|
+
hasClientAction: match.clientAction != null
|
|
848
844
|
};
|
|
849
845
|
if (typeof dataRoute.loader === "function") {
|
|
850
846
|
dataRoute.loader.hydrate = shouldHydrateRouteLoader(
|
|
@@ -871,7 +867,6 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
871
867
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
872
868
|
var discoveredPathsMaxSize = 1e3;
|
|
873
869
|
var discoveredPaths = /* @__PURE__ */ new Set();
|
|
874
|
-
var URL_LIMIT = 7680;
|
|
875
870
|
function getManifestUrl(paths) {
|
|
876
871
|
if (paths.length === 0) {
|
|
877
872
|
return null;
|