react-router 7.10.0-pre.0 → 7.10.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 (64) hide show
  1. package/CHANGELOG.md +9 -2
  2. package/dist/development/{browser-eL-tAN4R.d.ts → browser-BpxEZgZC.d.ts} +1 -1
  3. package/dist/development/{browser-BHySFrZ2.d.mts → browser-C5z6FZmz.d.mts} +1 -1
  4. package/dist/development/{chunk-Z4R76DXJ.js → chunk-26EFLBGX.js} +7 -7
  5. package/dist/development/{chunk-M4WLV5HP.js → chunk-54KWOGSJ.js} +1 -1
  6. package/dist/{production/chunk-5DTJHKF7.js → development/chunk-AWUYHSQU.js} +94 -94
  7. package/dist/development/{chunk-4BTFPFZR.mjs → chunk-FGUA77HG.mjs} +2 -2
  8. package/dist/development/{chunk-CECIHG5K.mjs → chunk-INCZGKXY.mjs} +2 -2
  9. package/dist/development/dom-export.d.mts +10 -10
  10. package/dist/development/dom-export.d.ts +10 -10
  11. package/dist/development/dom-export.js +27 -27
  12. package/dist/development/dom-export.mjs +3 -3
  13. package/dist/{production/index-react-server-client-CNrKUHDv.d.ts → development/index-react-server-client-CCjKYJTH.d.ts} +17 -174
  14. package/dist/development/{index-react-server-client-DYtvZPLT.d.mts → index-react-server-client-CipGfVBI.d.mts} +17 -174
  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.js +1 -1
  20. package/dist/development/index-react-server.mjs +1 -1
  21. package/dist/development/index.d.mts +8 -8
  22. package/dist/development/index.d.ts +8 -8
  23. package/dist/development/index.js +76 -76
  24. package/dist/development/index.mjs +3 -3
  25. package/dist/{production/instrumentation-Dwf-sTWa.d.ts → development/instrumentation-BB0wRuqz.d.ts} +27 -3
  26. package/dist/development/lib/types/internal.d.mts +2 -2
  27. package/dist/development/lib/types/internal.d.ts +2 -2
  28. package/dist/development/lib/types/internal.js +1 -1
  29. package/dist/development/lib/types/internal.mjs +1 -1
  30. package/dist/development/{register-C97Jz2jB.d.mts → register-C1RwVJAt.d.mts} +1 -1
  31. package/dist/development/{register-BnQsYkwj.d.ts → register-ODDAAYlf.d.ts} +1 -1
  32. package/dist/development/{router-Dgz_Mh9m.d.mts → router-CwNp5l9u.d.mts} +27 -3
  33. package/dist/production/{browser-eL-tAN4R.d.ts → browser-BpxEZgZC.d.ts} +1 -1
  34. package/dist/production/{browser-BHySFrZ2.d.mts → browser-C5z6FZmz.d.mts} +1 -1
  35. package/dist/production/{chunk-SGCRBGEM.js → chunk-EKXDIDQN.js} +7 -7
  36. package/dist/{development/chunk-2VILFZWG.js → production/chunk-J25F7BL4.js} +94 -94
  37. package/dist/production/{chunk-QKAGOFED.mjs → chunk-MFC2CGJA.mjs} +2 -2
  38. package/dist/production/{chunk-KJ5676BZ.mjs → chunk-RNH4J7KQ.mjs} +2 -2
  39. package/dist/production/{chunk-55FFLVQP.js → chunk-SKXBY33F.js} +1 -1
  40. package/dist/production/dom-export.d.mts +10 -10
  41. package/dist/production/dom-export.d.ts +10 -10
  42. package/dist/production/dom-export.js +27 -27
  43. package/dist/production/dom-export.mjs +3 -3
  44. package/dist/{development/index-react-server-client-CNrKUHDv.d.ts → production/index-react-server-client-CCjKYJTH.d.ts} +17 -174
  45. package/dist/production/{index-react-server-client-DYtvZPLT.d.mts → index-react-server-client-CipGfVBI.d.mts} +17 -174
  46. package/dist/production/index-react-server-client.d.mts +2 -2
  47. package/dist/production/index-react-server-client.d.ts +2 -2
  48. package/dist/production/index-react-server-client.js +4 -4
  49. package/dist/production/index-react-server-client.mjs +2 -2
  50. package/dist/production/index-react-server.js +1 -1
  51. package/dist/production/index-react-server.mjs +1 -1
  52. package/dist/production/index.d.mts +8 -8
  53. package/dist/production/index.d.ts +8 -8
  54. package/dist/production/index.js +76 -76
  55. package/dist/production/index.mjs +3 -3
  56. package/dist/{development/instrumentation-Dwf-sTWa.d.ts → production/instrumentation-BB0wRuqz.d.ts} +27 -3
  57. package/dist/production/lib/types/internal.d.mts +2 -2
  58. package/dist/production/lib/types/internal.d.ts +2 -2
  59. package/dist/production/lib/types/internal.js +1 -1
  60. package/dist/production/lib/types/internal.mjs +1 -1
  61. package/dist/production/{register-C97Jz2jB.d.mts → register-C1RwVJAt.d.mts} +1 -1
  62. package/dist/production/{register-BnQsYkwj.d.ts → register-ODDAAYlf.d.ts} +1 -1
  63. package/dist/production/{router-Dgz_Mh9m.d.mts → router-CwNp5l9u.d.mts} +27 -3
  64. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.10.0-pre.0
3
+ ## 7.10.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -9,6 +9,7 @@
9
9
 
10
10
  - Stabilize the `dataStrategy` `match.shouldRevalidateArgs`/`match.shouldCallHandler()` APIs. ([#14592](https://github.com/remix-run/react-router/pull/14592))
11
11
  - The `match.shouldLoad` API is now marked deprecated in favor of these more powerful alternatives
12
+
12
13
  - If you're using this API in a custom `dataStrategy` today, you can swap to the new API at your convenience:
13
14
 
14
15
  ```tsx
@@ -20,6 +21,7 @@
20
21
  ```
21
22
 
22
23
  - `match.shouldRevalidateArgs` is the argument that will be passed to the route `shouldRevaliate` function
24
+
23
25
  - Combined with the parameter accepted by `match.shouldCallHandler`, you can define a custom revalidation behavior for your `dataStrategy`:
24
26
 
25
27
  ```tsx
@@ -38,7 +40,9 @@
38
40
  - If your `shouldRevalidate` function relied on that parameter, you may have seen unintended revalidations
39
41
 
40
42
  - Fix `fetcher.submit` failing with plain objects containing a `tagName` property ([#14534](https://github.com/remix-run/react-router/pull/14534))
41
- - [UNSTABLE] Add `unstable_pattern` to the parameters for client side `unstable_onError`, refactor how it's called by `RouterProvider` to avoid potential strict mode issues ([#14573](https://github.com/remix-run/react-router/pull/14573))
43
+
44
+ - \[UNSTABLE] Add `unstable_pattern` to the parameters for client side `unstable_onError`, refactor how it's called by `RouterProvider` to avoid potential strict mode issues ([#14573](https://github.com/remix-run/react-router/pull/14573))
45
+
42
46
  - Add new `unstable_useTransitions` flag to routers to give users control over the usage of [`React.startTransition`](https://react.dev/reference/react/startTransition) and [`React.useOptimistic`](https://react.dev/reference/react/useOptimistic). ([#14524](https://github.com/remix-run/react-router/pull/14524))
43
47
  - Framework Mode + Data Mode:
44
48
  - `<HydratedRouter unstable_transition>`/`<RouterProvider unstable_transition>`
@@ -64,8 +68,11 @@
64
68
  - the router will not leverage `React.startTransition` on any navigations or state changes
65
69
 
66
70
  - Fix the promise returned from `useNavigate` in Framework/Data Mode so that it properly tracks the duration of `popstate` navigations (i.e., `navigate(-1)`) ([#14524](https://github.com/remix-run/react-router/pull/14524))
71
+
67
72
  - Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled ([#14577](https://github.com/remix-run/react-router/pull/14577))
73
+
68
74
  - Preserve `statusText` on the `ErrorResponse` instance when throwing `data()` from a route handler ([#14555](https://github.com/remix-run/react-router/pull/14555))
75
+
69
76
  - Optimize href() to avoid backtracking regex on splat ([#14329](https://github.com/remix-run/react-router/pull/14329))
70
77
 
71
78
  ## 7.9.6
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-Dwf-sTWa.js';
2
+ import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-BB0wRuqz.js';
3
3
 
4
4
  type RSCRouteConfigEntryBase = {
5
5
  action?: ActionFunction;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-Dgz_Mh9m.mjs';
2
+ import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-CwNp5l9u.mjs';
3
3
 
4
4
  type RSCRouteConfigEntryBase = {
5
5
  action?: ActionFunction;
@@ -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.10.0-pre.0
2
+ * react-router v7.10.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- var _chunkM4WLV5HPjs = require('./chunk-M4WLV5HP.js');
17
+ var _chunk54KWOGSJjs = require('./chunk-54KWOGSJ.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 = _chunkM4WLV5HPjs.matchRoutes.call(void 0, routes, location, basename);
32
+ let initialMatches = _chunk54KWOGSJjs.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 (_chunkM4WLV5HPjs.shouldHydrateRouteLoader.call(void 0,
37
+ if (_chunk54KWOGSJjs.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 (_chunkM4WLV5HPjs.isRouteErrorResponse.call(void 0, error)) {
115
+ if (_chunk54KWOGSJjs.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
- _chunkM4WLV5HPjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
123
+ _chunk54KWOGSJjs.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 = _chunkM4WLV5HPjs.useRouteError.call(void 0, );
149
+ let error = _chunk54KWOGSJjs.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
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
2
- * react-router v7.10.0-pre.0
2
+ * react-router v7.10.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *