react-router 7.10.0-pre.1 → 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 (32) hide show
  1. package/CHANGELOG.md +9 -8
  2. package/dist/{production/chunk-YU3WNS3T.js → development/chunk-26EFLBGX.js} +7 -7
  3. package/dist/development/{chunk-KQLPIZ7E.js → chunk-54KWOGSJ.js} +1 -1
  4. package/dist/development/{chunk-XHWAND4X.js → chunk-AWUYHSQU.js} +94 -94
  5. package/dist/development/{chunk-GIMUO62I.mjs → chunk-FGUA77HG.mjs} +2 -2
  6. package/dist/{production/chunk-ISOIFGFA.mjs → development/chunk-INCZGKXY.mjs} +2 -2
  7. package/dist/development/dom-export.js +27 -27
  8. package/dist/development/dom-export.mjs +3 -3
  9. package/dist/development/index-react-server-client.js +4 -4
  10. package/dist/development/index-react-server-client.mjs +2 -2
  11. package/dist/development/index-react-server.js +1 -1
  12. package/dist/development/index-react-server.mjs +1 -1
  13. package/dist/development/index.js +76 -76
  14. package/dist/development/index.mjs +3 -3
  15. package/dist/development/lib/types/internal.js +1 -1
  16. package/dist/development/lib/types/internal.mjs +1 -1
  17. package/dist/{development/chunk-RHWHYDYZ.js → production/chunk-EKXDIDQN.js} +7 -7
  18. package/dist/production/{chunk-3MVZKESN.js → chunk-J25F7BL4.js} +94 -94
  19. package/dist/{development/chunk-V5RTLP6E.mjs → production/chunk-MFC2CGJA.mjs} +2 -2
  20. package/dist/production/{chunk-7F5XUDXM.mjs → chunk-RNH4J7KQ.mjs} +2 -2
  21. package/dist/production/{chunk-C7S4I3K5.js → chunk-SKXBY33F.js} +1 -1
  22. package/dist/production/dom-export.js +27 -27
  23. package/dist/production/dom-export.mjs +3 -3
  24. package/dist/production/index-react-server-client.js +4 -4
  25. package/dist/production/index-react-server-client.mjs +2 -2
  26. package/dist/production/index-react-server.js +1 -1
  27. package/dist/production/index-react-server.mjs +1 -1
  28. package/dist/production/index.js +76 -76
  29. package/dist/production/index.mjs +3 -3
  30. package/dist/production/lib/types/internal.js +1 -1
  31. package/dist/production/lib/types/internal.mjs +1 -1
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,12 +1,6 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.10.0-pre.1
4
-
5
- ### Patch Changes
6
-
7
- - [REMOVE] Update source code docs ([`1f8fee408`](https://github.com/remix-run/react-router/commit/1f8fee408db2f74dcc4b04eeb51009da5d51d8a6))
8
-
9
- ## 7.10.0-pre.0
3
+ ## 7.10.0
10
4
 
11
5
  ### Minor Changes
12
6
 
@@ -15,6 +9,7 @@
15
9
 
16
10
  - Stabilize the `dataStrategy` `match.shouldRevalidateArgs`/`match.shouldCallHandler()` APIs. ([#14592](https://github.com/remix-run/react-router/pull/14592))
17
11
  - The `match.shouldLoad` API is now marked deprecated in favor of these more powerful alternatives
12
+
18
13
  - If you're using this API in a custom `dataStrategy` today, you can swap to the new API at your convenience:
19
14
 
20
15
  ```tsx
@@ -26,6 +21,7 @@
26
21
  ```
27
22
 
28
23
  - `match.shouldRevalidateArgs` is the argument that will be passed to the route `shouldRevaliate` function
24
+
29
25
  - Combined with the parameter accepted by `match.shouldCallHandler`, you can define a custom revalidation behavior for your `dataStrategy`:
30
26
 
31
27
  ```tsx
@@ -44,7 +40,9 @@
44
40
  - If your `shouldRevalidate` function relied on that parameter, you may have seen unintended revalidations
45
41
 
46
42
  - Fix `fetcher.submit` failing with plain objects containing a `tagName` property ([#14534](https://github.com/remix-run/react-router/pull/14534))
47
- - [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
+
48
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))
49
47
  - Framework Mode + Data Mode:
50
48
  - `<HydratedRouter unstable_transition>`/`<RouterProvider unstable_transition>`
@@ -70,8 +68,11 @@
70
68
  - the router will not leverage `React.startTransition` on any navigations or state changes
71
69
 
72
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
+
73
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
+
74
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
+
75
76
  - Optimize href() to avoid backtracking regex on splat ([#14329](https://github.com/remix-run/react-router/pull/14329))
76
77
 
77
78
  ## 7.9.6
@@ -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.1
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 _chunkC7S4I3K5js = require('./chunk-C7S4I3K5.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 = _chunkC7S4I3K5js.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 (_chunkC7S4I3K5js.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 (_chunkC7S4I3K5js.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
- _chunkC7S4I3K5js.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 = _chunkC7S4I3K5js.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.1
2
+ * react-router v7.10.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *