react-router 7.13.0 → 7.13.1-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.
Files changed (68) hide show
  1. package/CHANGELOG.md +70 -20
  2. package/dist/development/{browser-BEPxnEBW.d.mts → browser-DzsJABDQ.d.mts} +3 -2
  3. package/dist/{production/browser-BEPxnEBW.d.mts → development/browser-sPQ7eaK4.d.ts} +3 -2
  4. package/dist/{production/chunk-GSFLVUYQ.mjs → development/chunk-BPFEYQ6M.mjs} +13 -4
  5. package/dist/{production/chunk-NGWWS4QJ.js → development/chunk-CGPAOPIJ.js} +7 -7
  6. package/dist/development/{chunk-WICQJKU6.js → chunk-LF5SS6XE.js} +203 -128
  7. package/dist/development/{chunk-HMDR2CVH.js → chunk-TC44ITIJ.js} +124 -107
  8. package/dist/development/{chunk-JZWAC4HX.mjs → chunk-WQZSGSJA.mjs} +153 -63
  9. package/dist/development/dom-export.d.mts +2 -2
  10. package/dist/development/dom-export.d.ts +2 -2
  11. package/dist/development/dom-export.js +34 -27
  12. package/dist/development/dom-export.mjs +10 -3
  13. package/dist/development/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
  14. package/dist/development/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
  15. package/dist/development/index-react-server-client.d.mts +2 -2
  16. package/dist/development/index-react-server-client.d.ts +2 -2
  17. package/dist/development/index-react-server-client.js +4 -4
  18. package/dist/development/index-react-server-client.mjs +2 -2
  19. package/dist/development/index-react-server.d.mts +12 -1
  20. package/dist/development/index-react-server.d.ts +12 -1
  21. package/dist/development/index-react-server.js +80 -44
  22. package/dist/development/index-react-server.mjs +80 -45
  23. package/dist/development/index.d.mts +11 -10
  24. package/dist/development/index.d.ts +11 -10
  25. package/dist/development/index.js +94 -85
  26. package/dist/development/index.mjs +3 -3
  27. package/dist/{production/instrumentation-DvHY1sgY.d.ts → development/instrumentation--6Pioq_G.d.ts} +14 -2
  28. package/dist/development/lib/types/internal.d.mts +4 -4
  29. package/dist/development/lib/types/internal.d.ts +4 -4
  30. package/dist/development/lib/types/internal.js +1 -1
  31. package/dist/development/lib/types/internal.mjs +1 -1
  32. package/dist/development/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
  33. package/dist/development/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
  34. package/dist/{production/router-5iOvts3c.d.mts → development/router-cLsU7kHk.d.mts} +14 -2
  35. package/dist/{development/browser-CJ9_du-U.d.ts → production/browser-DzsJABDQ.d.mts} +3 -2
  36. package/dist/production/{browser-CJ9_du-U.d.ts → browser-sPQ7eaK4.d.ts} +3 -2
  37. package/dist/production/{chunk-Y3R63HEB.mjs → chunk-2K4LVAAG.mjs} +153 -63
  38. package/dist/{development/chunk-7PAHGFS4.js → production/chunk-I63A6YSE.js} +7 -7
  39. package/dist/{development/chunk-4LKRSAEJ.mjs → production/chunk-ROHSFSEU.mjs} +13 -4
  40. package/dist/production/{chunk-QSNCZFX5.js → chunk-XCKC4VBJ.js} +203 -128
  41. package/dist/production/{chunk-N2HZAAIG.js → chunk-ZXYVKLN7.js} +124 -107
  42. package/dist/production/dom-export.d.mts +2 -2
  43. package/dist/production/dom-export.d.ts +2 -2
  44. package/dist/production/dom-export.js +34 -27
  45. package/dist/production/dom-export.mjs +10 -3
  46. package/dist/production/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
  47. package/dist/production/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
  48. package/dist/production/index-react-server-client.d.mts +2 -2
  49. package/dist/production/index-react-server-client.d.ts +2 -2
  50. package/dist/production/index-react-server-client.js +4 -4
  51. package/dist/production/index-react-server-client.mjs +2 -2
  52. package/dist/production/index-react-server.d.mts +12 -1
  53. package/dist/production/index-react-server.d.ts +12 -1
  54. package/dist/production/index-react-server.js +80 -44
  55. package/dist/production/index-react-server.mjs +80 -45
  56. package/dist/production/index.d.mts +11 -10
  57. package/dist/production/index.d.ts +11 -10
  58. package/dist/production/index.js +94 -85
  59. package/dist/production/index.mjs +3 -3
  60. package/dist/{development/instrumentation-DvHY1sgY.d.ts → production/instrumentation--6Pioq_G.d.ts} +14 -2
  61. package/dist/production/lib/types/internal.d.mts +4 -4
  62. package/dist/production/lib/types/internal.d.ts +4 -4
  63. package/dist/production/lib/types/internal.js +1 -1
  64. package/dist/production/lib/types/internal.mjs +1 -1
  65. package/dist/production/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
  66. package/dist/production/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
  67. package/dist/{development/router-5iOvts3c.d.mts → production/router-cLsU7kHk.d.mts} +14 -2
  68. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.13.0
2
+ * react-router v7.13.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -51,7 +51,7 @@ import {
51
51
  withComponentProps,
52
52
  withErrorBoundaryProps,
53
53
  withHydrateFallbackProps
54
- } from "./chunk-JZWAC4HX.mjs";
54
+ } from "./chunk-2K4LVAAG.mjs";
55
55
 
56
56
  // lib/dom/ssr/server.tsx
57
57
  import * as React from "react";
@@ -758,7 +758,14 @@ function prependCookies(parentHeaders, childHeaders) {
758
758
  // lib/actions.ts
759
759
  function throwIfPotentialCSRFAttack(headers, allowedActionOrigins) {
760
760
  let originHeader = headers.get("origin");
761
- let originDomain = typeof originHeader === "string" && originHeader !== "null" ? new URL(originHeader).host : originHeader;
761
+ let originDomain = null;
762
+ try {
763
+ originDomain = typeof originHeader === "string" && originHeader !== "null" ? new URL(originHeader).host : originHeader;
764
+ } catch {
765
+ throw new Error(
766
+ `\`origin\` header is not a valid URL. Aborting the action.`
767
+ );
768
+ }
762
769
  let host = parseHostHeader(headers);
763
770
  if (originDomain && (!host || originDomain !== host.value)) {
764
771
  if (!isAllowedOrigin(originDomain, allowedActionOrigins)) {
@@ -1049,9 +1056,11 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
1049
1056
  () => controller.abort(new Error("Server Timeout")),
1050
1057
  typeof streamTimeout === "number" ? streamTimeout : 4950
1051
1058
  );
1052
- requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
1059
+ let clearStreamTimeout = () => clearTimeout(timeoutId);
1060
+ requestSignal.addEventListener("abort", clearStreamTimeout);
1053
1061
  return encode(data2, {
1054
1062
  signal: controller.signal,
1063
+ onComplete: clearStreamTimeout,
1055
1064
  plugins: [
1056
1065
  (value) => {
1057
1066
  if (value instanceof Error) {