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.
Files changed (72) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/dist/development/{browser-I6n6wVSO.d.mts → browser-3AnU12UI.d.mts} +2 -2
  3. package/dist/{production/browser-I6n6wVSO.d.mts → development/browser-BOdXz9dK.d.ts} +2 -2
  4. package/dist/development/{chunk-EVOBXE3Y.mjs → chunk-4N6VE7H7.mjs} +567 -317
  5. package/dist/{production/chunk-PQL4HLVQ.js → development/chunk-4YRVXM2U.js} +7 -7
  6. package/dist/{production/chunk-UJQ4OJF4.js → development/chunk-66UKHEGQ.js} +153 -143
  7. package/dist/development/{chunk-ZZNWZ5Q3.js → chunk-D6LUOGOQ.js} +550 -310
  8. package/dist/development/{chunk-YQSHRJWW.mjs → chunk-RJYABSBD.mjs} +100 -80
  9. package/dist/{production/context-DGGUoDIu.d.mts → development/context-ByvtofY2.d.mts} +100 -42
  10. package/dist/development/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
  11. package/dist/development/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
  12. package/dist/development/dom-export.d.mts +8 -8
  13. package/dist/development/dom-export.d.ts +8 -8
  14. package/dist/development/dom-export.js +57 -62
  15. package/dist/development/dom-export.mjs +32 -37
  16. package/dist/{production/index-react-server-client-BBd0A0TL.d.ts → development/index-react-server-client-BS5F89FR.d.ts} +132 -122
  17. package/dist/{production/index-react-server-client-BjhKIe3u.d.mts → development/index-react-server-client-DY04-103.d.mts} +111 -101
  18. package/dist/development/index-react-server-client.d.mts +3 -3
  19. package/dist/development/index-react-server-client.d.ts +3 -3
  20. package/dist/development/index-react-server-client.js +4 -4
  21. package/dist/development/index-react-server-client.mjs +2 -2
  22. package/dist/development/index-react-server.d.mts +113 -36
  23. package/dist/development/index-react-server.d.ts +113 -36
  24. package/dist/development/index-react-server.js +63 -36
  25. package/dist/development/index-react-server.mjs +63 -36
  26. package/dist/development/index.d.mts +94 -12
  27. package/dist/development/index.d.ts +94 -12
  28. package/dist/development/index.js +193 -171
  29. package/dist/development/index.mjs +5 -3
  30. package/dist/{production/instrumentation-g0dG8UL0.d.ts → development/instrumentation-cRWWLfsU.d.ts} +79 -21
  31. package/dist/development/lib/types/internal.d.mts +2 -2
  32. package/dist/development/lib/types/internal.d.ts +2 -2
  33. package/dist/development/lib/types/internal.js +1 -1
  34. package/dist/development/lib/types/internal.mjs +1 -1
  35. package/dist/development/{register-DcBltf5q.d.ts → register-Bsscfj79.d.ts} +1 -1
  36. package/dist/{production/register-DcBltf5q.d.ts → development/register-Df8okEea.d.mts} +1 -1
  37. package/dist/production/{browser-C-UvoYvi.d.ts → browser-3AnU12UI.d.mts} +2 -2
  38. package/dist/{development/browser-C-UvoYvi.d.ts → production/browser-BOdXz9dK.d.ts} +2 -2
  39. package/dist/production/{chunk-2WLZNCK5.mjs → chunk-6S4627ZB.mjs} +100 -80
  40. package/dist/production/{chunk-X5SKXJ4A.js → chunk-HUBUW7R3.js} +550 -310
  41. package/dist/production/{chunk-LK6U7ULH.mjs → chunk-JAKZPQZC.mjs} +567 -317
  42. package/dist/{development/chunk-YZKCRDTN.js → production/chunk-PNZCCTKT.js} +153 -143
  43. package/dist/{development/chunk-PZFPF4X7.js → production/chunk-Y6IFXO7V.js} +7 -7
  44. package/dist/{development/context-DGGUoDIu.d.mts → production/context-ByvtofY2.d.mts} +100 -42
  45. package/dist/production/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
  46. package/dist/production/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
  47. package/dist/production/dom-export.d.mts +8 -8
  48. package/dist/production/dom-export.d.ts +8 -8
  49. package/dist/production/dom-export.js +57 -62
  50. package/dist/production/dom-export.mjs +32 -37
  51. package/dist/{development/index-react-server-client-BBd0A0TL.d.ts → production/index-react-server-client-BS5F89FR.d.ts} +132 -122
  52. package/dist/{development/index-react-server-client-BjhKIe3u.d.mts → production/index-react-server-client-DY04-103.d.mts} +111 -101
  53. package/dist/production/index-react-server-client.d.mts +3 -3
  54. package/dist/production/index-react-server-client.d.ts +3 -3
  55. package/dist/production/index-react-server-client.js +4 -4
  56. package/dist/production/index-react-server-client.mjs +2 -2
  57. package/dist/production/index-react-server.d.mts +113 -36
  58. package/dist/production/index-react-server.d.ts +113 -36
  59. package/dist/production/index-react-server.js +63 -36
  60. package/dist/production/index-react-server.mjs +63 -36
  61. package/dist/production/index.d.mts +94 -12
  62. package/dist/production/index.d.ts +94 -12
  63. package/dist/production/index.js +193 -171
  64. package/dist/production/index.mjs +5 -3
  65. package/dist/{development/instrumentation-g0dG8UL0.d.ts → production/instrumentation-cRWWLfsU.d.ts} +79 -21
  66. package/dist/production/lib/types/internal.d.mts +2 -2
  67. package/dist/production/lib/types/internal.d.ts +2 -2
  68. package/dist/production/lib/types/internal.js +1 -1
  69. package/dist/production/lib/types/internal.mjs +1 -1
  70. package/dist/{development/register-D9d2sMQ7.d.mts → production/register-Bsscfj79.d.ts} +1 -1
  71. package/dist/production/{register-D9d2sMQ7.d.mts → register-Df8okEea.d.mts} +1 -1
  72. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.2
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-YQSHRJWW.mjs";
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-EVOBXE3Y.mjs";
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
- unstable_instrumentations
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
- unstable_instrumentations,
159
+ instrumentations,
159
160
  mapRouteProperties,
160
161
  future: {
161
- unstable_passThroughRequests: ssrInfo.context.future.unstable_passThroughRequests
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
- unstable_instrumentations: props.unstable_instrumentations
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
- unstable_useTransitions: props.unstable_useTransitions,
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
- unstable_passThroughRequests: true
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
- try {
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;
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
- return result;
818
- } finally {
819
- isHydrationRequest = false;
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;