react-router 7.0.0-pre.1 → 7.0.0-pre.3

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 (91) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/chunk-3AAHPOYG.mjs +9617 -0
  3. package/dist/dom-export.d.mts +13 -0
  4. package/dist/dom-export.d.ts +13 -3
  5. package/dist/dom-export.js +5502 -0
  6. package/dist/dom-export.mjs +112 -118
  7. package/dist/{lib/dom/lib.d.ts → fog-of-war-BijhfqFM.d.ts} +700 -45
  8. package/dist/fog-of-war-Bz_EDtxF.d.mts +1595 -0
  9. package/dist/index.d.mts +839 -0
  10. package/dist/index.d.ts +839 -74
  11. package/dist/index.js +9763 -0
  12. package/dist/index.mjs +225 -11533
  13. package/dist/lib/types.d.mts +2 -0
  14. package/dist/lib/types.d.ts +2 -76
  15. package/dist/lib/types.js +28 -0
  16. package/dist/lib/types.mjs +1 -1
  17. package/dist/types-BlYP8xpH.d.mts +1620 -0
  18. package/dist/types-BlYP8xpH.d.ts +1620 -0
  19. package/package.json +54 -14
  20. package/dist/dom-export.mjs.map +0 -1
  21. package/dist/index.mjs.map +0 -1
  22. package/dist/lib/components.d.ts +0 -372
  23. package/dist/lib/context.d.ts +0 -115
  24. package/dist/lib/dom/dom.d.ts +0 -123
  25. package/dist/lib/dom/global.d.ts +0 -40
  26. package/dist/lib/dom/server.d.ts +0 -41
  27. package/dist/lib/dom/ssr/components.d.ts +0 -123
  28. package/dist/lib/dom/ssr/data.d.ts +0 -7
  29. package/dist/lib/dom/ssr/entry.d.ts +0 -47
  30. package/dist/lib/dom/ssr/errorBoundaries.d.ts +0 -36
  31. package/dist/lib/dom/ssr/errors.d.ts +0 -2
  32. package/dist/lib/dom/ssr/fallback.d.ts +0 -2
  33. package/dist/lib/dom/ssr/fog-of-war.d.ts +0 -28
  34. package/dist/lib/dom/ssr/invariant.d.ts +0 -2
  35. package/dist/lib/dom/ssr/links.d.ts +0 -25
  36. package/dist/lib/dom/ssr/markup.d.ts +0 -5
  37. package/dist/lib/dom/ssr/routeModules.d.ts +0 -141
  38. package/dist/lib/dom/ssr/routes-test-stub.d.ts +0 -59
  39. package/dist/lib/dom/ssr/routes.d.ts +0 -32
  40. package/dist/lib/dom/ssr/server.d.ts +0 -16
  41. package/dist/lib/dom/ssr/single-fetch.d.ts +0 -37
  42. package/dist/lib/dom-export/dom-router-provider.d.ts +0 -5
  43. package/dist/lib/dom-export/hydrated-router.d.ts +0 -5
  44. package/dist/lib/dom-export.d.ts +0 -3
  45. package/dist/lib/hooks.d.ts +0 -410
  46. package/dist/lib/router/history.d.ts +0 -253
  47. package/dist/lib/router/links.d.ts +0 -104
  48. package/dist/lib/router/router.d.ts +0 -540
  49. package/dist/lib/router/utils.d.ts +0 -505
  50. package/dist/lib/server-runtime/build.d.ts +0 -38
  51. package/dist/lib/server-runtime/cookies.d.ts +0 -62
  52. package/dist/lib/server-runtime/crypto.d.ts +0 -2
  53. package/dist/lib/server-runtime/data.d.ts +0 -15
  54. package/dist/lib/server-runtime/dev.d.ts +0 -8
  55. package/dist/lib/server-runtime/entry.d.ts +0 -3
  56. package/dist/lib/server-runtime/errors.d.ts +0 -51
  57. package/dist/lib/server-runtime/headers.d.ts +0 -3
  58. package/dist/lib/server-runtime/invariant.d.ts +0 -2
  59. package/dist/lib/server-runtime/jsonify.d.ts +0 -33
  60. package/dist/lib/server-runtime/markup.d.ts +0 -1
  61. package/dist/lib/server-runtime/mode.d.ts +0 -9
  62. package/dist/lib/server-runtime/responses.d.ts +0 -37
  63. package/dist/lib/server-runtime/routeMatching.d.ts +0 -8
  64. package/dist/lib/server-runtime/routeModules.d.ts +0 -212
  65. package/dist/lib/server-runtime/routes.d.ts +0 -31
  66. package/dist/lib/server-runtime/server.d.ts +0 -5
  67. package/dist/lib/server-runtime/serverHandoff.d.ts +0 -11
  68. package/dist/lib/server-runtime/sessions/cookieStorage.d.ts +0 -19
  69. package/dist/lib/server-runtime/sessions/memoryStorage.d.ts +0 -17
  70. package/dist/lib/server-runtime/sessions.d.ts +0 -140
  71. package/dist/lib/server-runtime/single-fetch.d.ts +0 -30
  72. package/dist/lib/server-runtime/typecheck.d.ts +0 -4
  73. package/dist/lib/server-runtime/warnings.d.ts +0 -1
  74. package/dist/main-dom-export.js +0 -19
  75. package/dist/main.js +0 -19
  76. package/dist/react-router-dom.development.js +0 -199
  77. package/dist/react-router-dom.development.js.map +0 -1
  78. package/dist/react-router-dom.production.min.js +0 -12
  79. package/dist/react-router-dom.production.min.js.map +0 -1
  80. package/dist/react-router.development.js +0 -12503
  81. package/dist/react-router.development.js.map +0 -1
  82. package/dist/react-router.production.min.js +0 -12
  83. package/dist/react-router.production.min.js.map +0 -1
  84. package/dist/umd/react-router-dom.development.js +0 -241
  85. package/dist/umd/react-router-dom.development.js.map +0 -1
  86. package/dist/umd/react-router-dom.production.min.js +0 -12
  87. package/dist/umd/react-router-dom.production.min.js.map +0 -1
  88. package/dist/umd/react-router.development.js +0 -12818
  89. package/dist/umd/react-router.development.js.map +0 -1
  90. package/dist/umd/react-router.production.min.js +0 -12
  91. package/dist/umd/react-router.production.min.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # `react-router`
2
2
 
3
+ ## 7.0.0-pre.3
4
+
5
+ ## 7.0.0-pre.2
6
+
7
+ ### Major Changes
8
+
9
+ - Migrate Remix type generics to React Router ([#12180](https://github.com/remix-run/react-router/pull/12180))
10
+
11
+ - These generics are provided for Remix v2 migration purposes
12
+ - These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types
13
+ - Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types
14
+ - For React Router v6 users, these generics are new and should not impact your app, with one exception
15
+ - `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type
16
+ - This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`)
17
+ - Therefore, you should update your usages:
18
+ - ❌ `useFetcher<LoaderData>()`
19
+ - ✅ `useFetcher<typeof loader>()`
20
+
21
+ - - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177))
22
+ - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
23
+ - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
24
+ - `Record<string, Route> -> Record<string, Route | undefined>`
25
+ - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used
26
+ - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
27
+ - Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171))
28
+
29
+ - Remove `installGlobals()` as this should no longer be necessary
30
+
31
+ - Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes ([#12172](https://github.com/remix-run/react-router/pull/12172))
32
+
33
+ ### Patch Changes
34
+
35
+ - Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080))
36
+ - Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146))
37
+
38
+ - You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app
39
+
40
+ - Updated dependencies:
41
+ - `react-router@7.0.0-pre.2`
42
+
3
43
  ## 7.0.0-pre.1
4
44
 
5
45
  ### Patch Changes