byterover-cli 3.10.0 → 3.10.2

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 (843) hide show
  1. package/dist/agent/infra/agent/service-initializer.js +8 -2
  2. package/dist/agent/infra/llm/agent-llm-service.d.ts +9 -9
  3. package/dist/agent/infra/llm/agent-llm-service.js +28 -18
  4. package/dist/agent/infra/llm/generators/ai-sdk-content-generator.d.ts +10 -1
  5. package/dist/agent/infra/llm/generators/ai-sdk-content-generator.js +21 -4
  6. package/dist/agent/infra/llm/generators/ai-sdk-message-converter.d.ts +4 -0
  7. package/dist/agent/infra/llm/generators/ai-sdk-message-converter.js +8 -1
  8. package/dist/agent/infra/map/abstract-generator.d.ts +29 -0
  9. package/dist/agent/infra/map/abstract-generator.js +161 -0
  10. package/dist/agent/infra/map/abstract-queue.d.ts +7 -0
  11. package/dist/agent/infra/map/abstract-queue.js +100 -26
  12. package/dist/agent/infra/system-prompt/contributors/file-contributor.js +6 -2
  13. package/dist/agent/infra/tools/implementations/curate-tool-task-context.d.ts +2 -0
  14. package/dist/agent/infra/tools/implementations/curate-tool-task-context.js +28 -0
  15. package/dist/agent/infra/tools/implementations/curate-tool.js +57 -16
  16. package/dist/agent/infra/tools/tool-manager.d.ts +10 -1
  17. package/dist/agent/infra/tools/tool-manager.js +10 -1
  18. package/dist/oclif/commands/review.d.ts +16 -0
  19. package/dist/oclif/commands/review.js +96 -0
  20. package/dist/server/core/domain/entities/brv-config.d.ts +6 -0
  21. package/dist/server/core/domain/entities/brv-config.js +27 -0
  22. package/dist/server/core/domain/entities/provider-registry.js +0 -1
  23. package/dist/server/core/domain/transport/schemas.d.ts +8 -0
  24. package/dist/server/core/domain/transport/schemas.js +6 -0
  25. package/dist/server/core/domain/transport/task-info.d.ts +7 -0
  26. package/dist/server/core/interfaces/i-provider-config-store.d.ts +5 -1
  27. package/dist/server/infra/context-tree/propagate-summaries.d.ts +18 -0
  28. package/dist/server/infra/context-tree/propagate-summaries.js +52 -0
  29. package/dist/server/infra/daemon/agent-process.js +78 -8
  30. package/dist/server/infra/daemon/brv-server.js +23 -0
  31. package/dist/server/infra/daemon/post-work-registry.d.ts +45 -0
  32. package/dist/server/infra/daemon/post-work-registry.js +82 -0
  33. package/dist/server/infra/dream/dream-lock-service.d.ts +3 -4
  34. package/dist/server/infra/dream/dream-lock-service.js +3 -4
  35. package/dist/server/infra/dream/dream-state-schema.d.ts +35 -0
  36. package/dist/server/infra/dream/dream-state-schema.js +15 -0
  37. package/dist/server/infra/dream/dream-state-service.d.ts +22 -0
  38. package/dist/server/infra/dream/dream-state-service.js +62 -3
  39. package/dist/server/infra/dream/dream-trigger.js +6 -2
  40. package/dist/server/infra/executor/curate-executor.d.ts +33 -0
  41. package/dist/server/infra/executor/curate-executor.js +116 -36
  42. package/dist/server/infra/executor/dream-executor.d.ts +29 -0
  43. package/dist/server/infra/executor/dream-executor.js +70 -16
  44. package/dist/server/infra/executor/folder-pack-executor.d.ts +10 -0
  45. package/dist/server/infra/executor/folder-pack-executor.js +22 -24
  46. package/dist/server/infra/git/git-error-messages.d.ts +10 -0
  47. package/dist/server/infra/git/git-error-messages.js +12 -0
  48. package/dist/server/infra/git/isomorphic-git-service.js +24 -76
  49. package/dist/server/infra/git/status-row-classifier.d.ts +32 -0
  50. package/dist/server/infra/git/status-row-classifier.js +78 -0
  51. package/dist/server/infra/process/curate-log-handler.d.ts +3 -0
  52. package/dist/server/infra/process/curate-log-handler.js +6 -2
  53. package/dist/server/infra/process/feature-handlers.js +1 -0
  54. package/dist/server/infra/process/task-router.d.ts +29 -0
  55. package/dist/server/infra/process/task-router.js +43 -1
  56. package/dist/server/infra/process/transport-handlers.d.ts +4 -2
  57. package/dist/server/infra/process/transport-handlers.js +1 -0
  58. package/dist/server/infra/storage/file-provider-config-store.d.ts +4 -1
  59. package/dist/server/infra/storage/file-provider-config-store.js +5 -2
  60. package/dist/server/infra/transport/handlers/provider-handler.d.ts +9 -0
  61. package/dist/server/infra/transport/handlers/provider-handler.js +63 -2
  62. package/dist/server/infra/transport/handlers/review-handler.d.ts +5 -0
  63. package/dist/server/infra/transport/handlers/review-handler.js +22 -0
  64. package/dist/shared/transport/events/index.d.ts +2 -0
  65. package/dist/shared/transport/events/review-events.d.ts +11 -0
  66. package/dist/shared/transport/events/review-events.js +2 -0
  67. package/dist/shared/transport/types/dto.d.ts +2 -0
  68. package/dist/tui/features/auth/api/get-auth-state.js +6 -3
  69. package/dist/tui/features/auth/components/auth-initializer.js +4 -2
  70. package/dist/tui/features/provider/components/provider-flow.js +30 -5
  71. package/node_modules/@tanstack/query-core/LICENSE +21 -0
  72. package/node_modules/@tanstack/query-core/build/legacy/chunk-PXG64RU4.js +25 -0
  73. package/node_modules/@tanstack/query-core/build/legacy/chunk-PXG64RU4.js.map +1 -0
  74. package/node_modules/@tanstack/query-core/build/legacy/focusManager.cjs +108 -0
  75. package/node_modules/@tanstack/query-core/build/legacy/focusManager.cjs.map +1 -0
  76. package/node_modules/@tanstack/query-core/build/legacy/focusManager.d.cts +17 -0
  77. package/node_modules/@tanstack/query-core/build/legacy/focusManager.d.ts +17 -0
  78. package/node_modules/@tanstack/query-core/build/legacy/focusManager.js +81 -0
  79. package/node_modules/@tanstack/query-core/build/legacy/focusManager.js.map +1 -0
  80. package/node_modules/@tanstack/query-core/build/legacy/hydration-BlEVG2Lp.d.ts +1384 -0
  81. package/node_modules/@tanstack/query-core/build/legacy/hydration-uphG6M-i.d.cts +1384 -0
  82. package/node_modules/@tanstack/query-core/build/legacy/hydration.cjs +178 -0
  83. package/node_modules/@tanstack/query-core/build/legacy/hydration.cjs.map +1 -0
  84. package/node_modules/@tanstack/query-core/build/legacy/hydration.d.cts +3 -0
  85. package/node_modules/@tanstack/query-core/build/legacy/hydration.d.ts +3 -0
  86. package/node_modules/@tanstack/query-core/build/legacy/hydration.js +152 -0
  87. package/node_modules/@tanstack/query-core/build/legacy/hydration.js.map +1 -0
  88. package/node_modules/@tanstack/query-core/build/legacy/index.cjs +110 -0
  89. package/node_modules/@tanstack/query-core/build/legacy/index.cjs.map +1 -0
  90. package/node_modules/@tanstack/query-core/build/legacy/index.d.cts +10 -0
  91. package/node_modules/@tanstack/query-core/build/legacy/index.d.ts +10 -0
  92. package/node_modules/@tanstack/query-core/build/legacy/index.js +73 -0
  93. package/node_modules/@tanstack/query-core/build/legacy/index.js.map +1 -0
  94. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.cjs +146 -0
  95. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.cjs.map +1 -0
  96. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.d.cts +15 -0
  97. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.d.ts +15 -0
  98. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.js +126 -0
  99. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.js.map +1 -0
  100. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.cjs +93 -0
  101. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.cjs.map +1 -0
  102. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.d.cts +20 -0
  103. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.d.ts +20 -0
  104. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.js +74 -0
  105. package/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.js.map +1 -0
  106. package/node_modules/@tanstack/query-core/build/legacy/mutation.cjs +333 -0
  107. package/node_modules/@tanstack/query-core/build/legacy/mutation.cjs.map +1 -0
  108. package/node_modules/@tanstack/query-core/build/legacy/mutation.d.cts +3 -0
  109. package/node_modules/@tanstack/query-core/build/legacy/mutation.d.ts +3 -0
  110. package/node_modules/@tanstack/query-core/build/legacy/mutation.js +306 -0
  111. package/node_modules/@tanstack/query-core/build/legacy/mutation.js.map +1 -0
  112. package/node_modules/@tanstack/query-core/build/legacy/mutationCache.cjs +170 -0
  113. package/node_modules/@tanstack/query-core/build/legacy/mutationCache.cjs.map +1 -0
  114. package/node_modules/@tanstack/query-core/build/legacy/mutationCache.d.cts +3 -0
  115. package/node_modules/@tanstack/query-core/build/legacy/mutationCache.d.ts +3 -0
  116. package/node_modules/@tanstack/query-core/build/legacy/mutationCache.js +137 -0
  117. package/node_modules/@tanstack/query-core/build/legacy/mutationCache.js.map +1 -0
  118. package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs +190 -0
  119. package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs.map +1 -0
  120. package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.d.cts +3 -0
  121. package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.d.ts +3 -0
  122. package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.js +164 -0
  123. package/node_modules/@tanstack/query-core/build/legacy/mutationObserver.js.map +1 -0
  124. package/node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs +113 -0
  125. package/node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs.map +1 -0
  126. package/node_modules/@tanstack/query-core/build/legacy/notifyManager.d.cts +46 -0
  127. package/node_modules/@tanstack/query-core/build/legacy/notifyManager.d.ts +46 -0
  128. package/node_modules/@tanstack/query-core/build/legacy/notifyManager.js +88 -0
  129. package/node_modules/@tanstack/query-core/build/legacy/notifyManager.js.map +1 -0
  130. package/node_modules/@tanstack/query-core/build/legacy/onlineManager.cjs +97 -0
  131. package/node_modules/@tanstack/query-core/build/legacy/onlineManager.cjs.map +1 -0
  132. package/node_modules/@tanstack/query-core/build/legacy/onlineManager.d.cts +16 -0
  133. package/node_modules/@tanstack/query-core/build/legacy/onlineManager.d.ts +16 -0
  134. package/node_modules/@tanstack/query-core/build/legacy/onlineManager.js +70 -0
  135. package/node_modules/@tanstack/query-core/build/legacy/onlineManager.js.map +1 -0
  136. package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.cjs +260 -0
  137. package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.cjs.map +1 -0
  138. package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.d.cts +27 -0
  139. package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.d.ts +27 -0
  140. package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.js +234 -0
  141. package/node_modules/@tanstack/query-core/build/legacy/queriesObserver.js.map +1 -0
  142. package/node_modules/@tanstack/query-core/build/legacy/query.cjs +478 -0
  143. package/node_modules/@tanstack/query-core/build/legacy/query.cjs.map +1 -0
  144. package/node_modules/@tanstack/query-core/build/legacy/query.d.cts +3 -0
  145. package/node_modules/@tanstack/query-core/build/legacy/query.d.ts +3 -0
  146. package/node_modules/@tanstack/query-core/build/legacy/query.js +459 -0
  147. package/node_modules/@tanstack/query-core/build/legacy/query.js.map +1 -0
  148. package/node_modules/@tanstack/query-core/build/legacy/queryCache.cjs +131 -0
  149. package/node_modules/@tanstack/query-core/build/legacy/queryCache.cjs.map +1 -0
  150. package/node_modules/@tanstack/query-core/build/legacy/queryCache.d.cts +3 -0
  151. package/node_modules/@tanstack/query-core/build/legacy/queryCache.d.ts +3 -0
  152. package/node_modules/@tanstack/query-core/build/legacy/queryCache.js +105 -0
  153. package/node_modules/@tanstack/query-core/build/legacy/queryCache.js.map +1 -0
  154. package/node_modules/@tanstack/query-core/build/legacy/queryClient.cjs +349 -0
  155. package/node_modules/@tanstack/query-core/build/legacy/queryClient.cjs.map +1 -0
  156. package/node_modules/@tanstack/query-core/build/legacy/queryClient.d.cts +3 -0
  157. package/node_modules/@tanstack/query-core/build/legacy/queryClient.d.ts +3 -0
  158. package/node_modules/@tanstack/query-core/build/legacy/queryClient.js +324 -0
  159. package/node_modules/@tanstack/query-core/build/legacy/queryClient.js.map +1 -0
  160. package/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs +515 -0
  161. package/node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs.map +1 -0
  162. package/node_modules/@tanstack/query-core/build/legacy/queryObserver.d.cts +3 -0
  163. package/node_modules/@tanstack/query-core/build/legacy/queryObserver.d.ts +3 -0
  164. package/node_modules/@tanstack/query-core/build/legacy/queryObserver.js +498 -0
  165. package/node_modules/@tanstack/query-core/build/legacy/queryObserver.js.map +1 -0
  166. package/node_modules/@tanstack/query-core/build/legacy/removable.cjs +69 -0
  167. package/node_modules/@tanstack/query-core/build/legacy/removable.cjs.map +1 -0
  168. package/node_modules/@tanstack/query-core/build/legacy/removable.d.cts +11 -0
  169. package/node_modules/@tanstack/query-core/build/legacy/removable.d.ts +11 -0
  170. package/node_modules/@tanstack/query-core/build/legacy/removable.js +43 -0
  171. package/node_modules/@tanstack/query-core/build/legacy/removable.js.map +1 -0
  172. package/node_modules/@tanstack/query-core/build/legacy/retryer.cjs +165 -0
  173. package/node_modules/@tanstack/query-core/build/legacy/retryer.cjs.map +1 -0
  174. package/node_modules/@tanstack/query-core/build/legacy/retryer.d.cts +3 -0
  175. package/node_modules/@tanstack/query-core/build/legacy/retryer.d.ts +3 -0
  176. package/node_modules/@tanstack/query-core/build/legacy/retryer.js +139 -0
  177. package/node_modules/@tanstack/query-core/build/legacy/retryer.js.map +1 -0
  178. package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs +82 -0
  179. package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs.map +1 -0
  180. package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.d.cts +34 -0
  181. package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.d.ts +34 -0
  182. package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.js +59 -0
  183. package/node_modules/@tanstack/query-core/build/legacy/streamedQuery.js.map +1 -0
  184. package/node_modules/@tanstack/query-core/build/legacy/subscribable.cjs +51 -0
  185. package/node_modules/@tanstack/query-core/build/legacy/subscribable.cjs.map +1 -0
  186. package/node_modules/@tanstack/query-core/build/legacy/subscribable.d.cts +10 -0
  187. package/node_modules/@tanstack/query-core/build/legacy/subscribable.d.ts +10 -0
  188. package/node_modules/@tanstack/query-core/build/legacy/subscribable.js +28 -0
  189. package/node_modules/@tanstack/query-core/build/legacy/subscribable.js.map +1 -0
  190. package/node_modules/@tanstack/query-core/build/legacy/thenable.cjs +76 -0
  191. package/node_modules/@tanstack/query-core/build/legacy/thenable.cjs.map +1 -0
  192. package/node_modules/@tanstack/query-core/build/legacy/thenable.d.cts +47 -0
  193. package/node_modules/@tanstack/query-core/build/legacy/thenable.d.ts +47 -0
  194. package/node_modules/@tanstack/query-core/build/legacy/thenable.js +52 -0
  195. package/node_modules/@tanstack/query-core/build/legacy/thenable.js.map +1 -0
  196. package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.cjs +110 -0
  197. package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.cjs.map +1 -0
  198. package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.d.cts +58 -0
  199. package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.d.ts +58 -0
  200. package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.js +81 -0
  201. package/node_modules/@tanstack/query-core/build/legacy/timeoutManager.js.map +1 -0
  202. package/node_modules/@tanstack/query-core/build/legacy/types.cjs +37 -0
  203. package/node_modules/@tanstack/query-core/build/legacy/types.cjs.map +1 -0
  204. package/node_modules/@tanstack/query-core/build/legacy/types.d.cts +3 -0
  205. package/node_modules/@tanstack/query-core/build/legacy/types.d.ts +3 -0
  206. package/node_modules/@tanstack/query-core/build/legacy/types.js +12 -0
  207. package/node_modules/@tanstack/query-core/build/legacy/types.js.map +1 -0
  208. package/node_modules/@tanstack/query-core/build/legacy/utils.cjs +330 -0
  209. package/node_modules/@tanstack/query-core/build/legacy/utils.cjs.map +1 -0
  210. package/node_modules/@tanstack/query-core/build/legacy/utils.d.cts +3 -0
  211. package/node_modules/@tanstack/query-core/build/legacy/utils.d.ts +3 -0
  212. package/node_modules/@tanstack/query-core/build/legacy/utils.js +283 -0
  213. package/node_modules/@tanstack/query-core/build/legacy/utils.js.map +1 -0
  214. package/node_modules/@tanstack/query-core/build/modern/focusManager.cjs +94 -0
  215. package/node_modules/@tanstack/query-core/build/modern/focusManager.cjs.map +1 -0
  216. package/node_modules/@tanstack/query-core/build/modern/focusManager.d.cts +17 -0
  217. package/node_modules/@tanstack/query-core/build/modern/focusManager.d.ts +17 -0
  218. package/node_modules/@tanstack/query-core/build/modern/focusManager.js +68 -0
  219. package/node_modules/@tanstack/query-core/build/modern/focusManager.js.map +1 -0
  220. package/node_modules/@tanstack/query-core/build/modern/hydration-BlEVG2Lp.d.ts +1384 -0
  221. package/node_modules/@tanstack/query-core/build/modern/hydration-uphG6M-i.d.cts +1384 -0
  222. package/node_modules/@tanstack/query-core/build/modern/hydration.cjs +173 -0
  223. package/node_modules/@tanstack/query-core/build/modern/hydration.cjs.map +1 -0
  224. package/node_modules/@tanstack/query-core/build/modern/hydration.d.cts +3 -0
  225. package/node_modules/@tanstack/query-core/build/modern/hydration.d.ts +3 -0
  226. package/node_modules/@tanstack/query-core/build/modern/hydration.js +145 -0
  227. package/node_modules/@tanstack/query-core/build/modern/hydration.js.map +1 -0
  228. package/node_modules/@tanstack/query-core/build/modern/index.cjs +110 -0
  229. package/node_modules/@tanstack/query-core/build/modern/index.cjs.map +1 -0
  230. package/node_modules/@tanstack/query-core/build/modern/index.d.cts +10 -0
  231. package/node_modules/@tanstack/query-core/build/modern/index.d.ts +10 -0
  232. package/node_modules/@tanstack/query-core/build/modern/index.js +71 -0
  233. package/node_modules/@tanstack/query-core/build/modern/index.js.map +1 -0
  234. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +142 -0
  235. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs.map +1 -0
  236. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.cts +15 -0
  237. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.d.ts +15 -0
  238. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js +120 -0
  239. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js.map +1 -0
  240. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs +92 -0
  241. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs.map +1 -0
  242. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.cts +20 -0
  243. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.d.ts +20 -0
  244. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js +71 -0
  245. package/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js.map +1 -0
  246. package/node_modules/@tanstack/query-core/build/modern/mutation.cjs +307 -0
  247. package/node_modules/@tanstack/query-core/build/modern/mutation.cjs.map +1 -0
  248. package/node_modules/@tanstack/query-core/build/modern/mutation.d.cts +3 -0
  249. package/node_modules/@tanstack/query-core/build/modern/mutation.d.ts +3 -0
  250. package/node_modules/@tanstack/query-core/build/modern/mutation.js +281 -0
  251. package/node_modules/@tanstack/query-core/build/modern/mutation.js.map +1 -0
  252. package/node_modules/@tanstack/query-core/build/modern/mutationCache.cjs +149 -0
  253. package/node_modules/@tanstack/query-core/build/modern/mutationCache.cjs.map +1 -0
  254. package/node_modules/@tanstack/query-core/build/modern/mutationCache.d.cts +3 -0
  255. package/node_modules/@tanstack/query-core/build/modern/mutationCache.d.ts +3 -0
  256. package/node_modules/@tanstack/query-core/build/modern/mutationCache.js +124 -0
  257. package/node_modules/@tanstack/query-core/build/modern/mutationCache.js.map +1 -0
  258. package/node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs +165 -0
  259. package/node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs.map +1 -0
  260. package/node_modules/@tanstack/query-core/build/modern/mutationObserver.d.cts +3 -0
  261. package/node_modules/@tanstack/query-core/build/modern/mutationObserver.d.ts +3 -0
  262. package/node_modules/@tanstack/query-core/build/modern/mutationObserver.js +140 -0
  263. package/node_modules/@tanstack/query-core/build/modern/mutationObserver.js.map +1 -0
  264. package/node_modules/@tanstack/query-core/build/modern/notifyManager.cjs +113 -0
  265. package/node_modules/@tanstack/query-core/build/modern/notifyManager.cjs.map +1 -0
  266. package/node_modules/@tanstack/query-core/build/modern/notifyManager.d.cts +46 -0
  267. package/node_modules/@tanstack/query-core/build/modern/notifyManager.d.ts +46 -0
  268. package/node_modules/@tanstack/query-core/build/modern/notifyManager.js +86 -0
  269. package/node_modules/@tanstack/query-core/build/modern/notifyManager.js.map +1 -0
  270. package/node_modules/@tanstack/query-core/build/modern/onlineManager.cjs +84 -0
  271. package/node_modules/@tanstack/query-core/build/modern/onlineManager.cjs.map +1 -0
  272. package/node_modules/@tanstack/query-core/build/modern/onlineManager.d.cts +16 -0
  273. package/node_modules/@tanstack/query-core/build/modern/onlineManager.d.ts +16 -0
  274. package/node_modules/@tanstack/query-core/build/modern/onlineManager.js +58 -0
  275. package/node_modules/@tanstack/query-core/build/modern/onlineManager.js.map +1 -0
  276. package/node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs +237 -0
  277. package/node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs.map +1 -0
  278. package/node_modules/@tanstack/query-core/build/modern/queriesObserver.d.cts +27 -0
  279. package/node_modules/@tanstack/query-core/build/modern/queriesObserver.d.ts +27 -0
  280. package/node_modules/@tanstack/query-core/build/modern/queriesObserver.js +212 -0
  281. package/node_modules/@tanstack/query-core/build/modern/queriesObserver.js.map +1 -0
  282. package/node_modules/@tanstack/query-core/build/modern/query.cjs +452 -0
  283. package/node_modules/@tanstack/query-core/build/modern/query.cjs.map +1 -0
  284. package/node_modules/@tanstack/query-core/build/modern/query.d.cts +3 -0
  285. package/node_modules/@tanstack/query-core/build/modern/query.d.ts +3 -0
  286. package/node_modules/@tanstack/query-core/build/modern/query.js +434 -0
  287. package/node_modules/@tanstack/query-core/build/modern/query.js.map +1 -0
  288. package/node_modules/@tanstack/query-core/build/modern/queryCache.cjs +122 -0
  289. package/node_modules/@tanstack/query-core/build/modern/queryCache.cjs.map +1 -0
  290. package/node_modules/@tanstack/query-core/build/modern/queryCache.d.cts +3 -0
  291. package/node_modules/@tanstack/query-core/build/modern/queryCache.d.ts +3 -0
  292. package/node_modules/@tanstack/query-core/build/modern/queryCache.js +97 -0
  293. package/node_modules/@tanstack/query-core/build/modern/queryCache.js.map +1 -0
  294. package/node_modules/@tanstack/query-core/build/modern/queryClient.cjs +322 -0
  295. package/node_modules/@tanstack/query-core/build/modern/queryClient.cjs.map +1 -0
  296. package/node_modules/@tanstack/query-core/build/modern/queryClient.d.cts +3 -0
  297. package/node_modules/@tanstack/query-core/build/modern/queryClient.d.ts +3 -0
  298. package/node_modules/@tanstack/query-core/build/modern/queryClient.js +305 -0
  299. package/node_modules/@tanstack/query-core/build/modern/queryClient.js.map +1 -0
  300. package/node_modules/@tanstack/query-core/build/modern/queryObserver.cjs +488 -0
  301. package/node_modules/@tanstack/query-core/build/modern/queryObserver.cjs.map +1 -0
  302. package/node_modules/@tanstack/query-core/build/modern/queryObserver.d.cts +3 -0
  303. package/node_modules/@tanstack/query-core/build/modern/queryObserver.d.ts +3 -0
  304. package/node_modules/@tanstack/query-core/build/modern/queryObserver.js +472 -0
  305. package/node_modules/@tanstack/query-core/build/modern/queryObserver.js.map +1 -0
  306. package/node_modules/@tanstack/query-core/build/modern/removable.cjs +58 -0
  307. package/node_modules/@tanstack/query-core/build/modern/removable.cjs.map +1 -0
  308. package/node_modules/@tanstack/query-core/build/modern/removable.d.cts +11 -0
  309. package/node_modules/@tanstack/query-core/build/modern/removable.d.ts +11 -0
  310. package/node_modules/@tanstack/query-core/build/modern/removable.js +33 -0
  311. package/node_modules/@tanstack/query-core/build/modern/removable.js.map +1 -0
  312. package/node_modules/@tanstack/query-core/build/modern/retryer.cjs +161 -0
  313. package/node_modules/@tanstack/query-core/build/modern/retryer.cjs.map +1 -0
  314. package/node_modules/@tanstack/query-core/build/modern/retryer.d.cts +3 -0
  315. package/node_modules/@tanstack/query-core/build/modern/retryer.d.ts +3 -0
  316. package/node_modules/@tanstack/query-core/build/modern/retryer.js +133 -0
  317. package/node_modules/@tanstack/query-core/build/modern/retryer.js.map +1 -0
  318. package/node_modules/@tanstack/query-core/build/modern/streamedQuery.cjs +82 -0
  319. package/node_modules/@tanstack/query-core/build/modern/streamedQuery.cjs.map +1 -0
  320. package/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.cts +34 -0
  321. package/node_modules/@tanstack/query-core/build/modern/streamedQuery.d.ts +34 -0
  322. package/node_modules/@tanstack/query-core/build/modern/streamedQuery.js +57 -0
  323. package/node_modules/@tanstack/query-core/build/modern/streamedQuery.js.map +1 -0
  324. package/node_modules/@tanstack/query-core/build/modern/subscribable.cjs +51 -0
  325. package/node_modules/@tanstack/query-core/build/modern/subscribable.cjs.map +1 -0
  326. package/node_modules/@tanstack/query-core/build/modern/subscribable.d.cts +10 -0
  327. package/node_modules/@tanstack/query-core/build/modern/subscribable.d.ts +10 -0
  328. package/node_modules/@tanstack/query-core/build/modern/subscribable.js +26 -0
  329. package/node_modules/@tanstack/query-core/build/modern/subscribable.js.map +1 -0
  330. package/node_modules/@tanstack/query-core/build/modern/thenable.cjs +75 -0
  331. package/node_modules/@tanstack/query-core/build/modern/thenable.cjs.map +1 -0
  332. package/node_modules/@tanstack/query-core/build/modern/thenable.d.cts +47 -0
  333. package/node_modules/@tanstack/query-core/build/modern/thenable.d.ts +47 -0
  334. package/node_modules/@tanstack/query-core/build/modern/thenable.js +49 -0
  335. package/node_modules/@tanstack/query-core/build/modern/thenable.js.map +1 -0
  336. package/node_modules/@tanstack/query-core/build/modern/timeoutManager.cjs +98 -0
  337. package/node_modules/@tanstack/query-core/build/modern/timeoutManager.cjs.map +1 -0
  338. package/node_modules/@tanstack/query-core/build/modern/timeoutManager.d.cts +58 -0
  339. package/node_modules/@tanstack/query-core/build/modern/timeoutManager.d.ts +58 -0
  340. package/node_modules/@tanstack/query-core/build/modern/timeoutManager.js +70 -0
  341. package/node_modules/@tanstack/query-core/build/modern/timeoutManager.js.map +1 -0
  342. package/node_modules/@tanstack/query-core/build/modern/types.cjs +37 -0
  343. package/node_modules/@tanstack/query-core/build/modern/types.cjs.map +1 -0
  344. package/node_modules/@tanstack/query-core/build/modern/types.d.cts +3 -0
  345. package/node_modules/@tanstack/query-core/build/modern/types.d.ts +3 -0
  346. package/node_modules/@tanstack/query-core/build/modern/types.js +10 -0
  347. package/node_modules/@tanstack/query-core/build/modern/types.js.map +1 -0
  348. package/node_modules/@tanstack/query-core/build/modern/utils.cjs +330 -0
  349. package/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -0
  350. package/node_modules/@tanstack/query-core/build/modern/utils.d.cts +3 -0
  351. package/node_modules/@tanstack/query-core/build/modern/utils.d.ts +3 -0
  352. package/node_modules/@tanstack/query-core/build/modern/utils.js +281 -0
  353. package/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -0
  354. package/node_modules/@tanstack/query-core/package.json +65 -0
  355. package/node_modules/@tanstack/query-core/src/focusManager.ts +86 -0
  356. package/node_modules/@tanstack/query-core/src/hydration.ts +285 -0
  357. package/node_modules/@tanstack/query-core/src/index.ts +55 -0
  358. package/node_modules/@tanstack/query-core/src/infiniteQueryBehavior.ts +176 -0
  359. package/node_modules/@tanstack/query-core/src/infiniteQueryObserver.ts +190 -0
  360. package/node_modules/@tanstack/query-core/src/mutation.ts +419 -0
  361. package/node_modules/@tanstack/query-core/src/mutationCache.ts +244 -0
  362. package/node_modules/@tanstack/query-core/src/mutationObserver.ts +227 -0
  363. package/node_modules/@tanstack/query-core/src/notifyManager.ts +99 -0
  364. package/node_modules/@tanstack/query-core/src/onlineManager.ts +71 -0
  365. package/node_modules/@tanstack/query-core/src/queriesObserver.ts +315 -0
  366. package/node_modules/@tanstack/query-core/src/query.ts +756 -0
  367. package/node_modules/@tanstack/query-core/src/queryCache.ts +223 -0
  368. package/node_modules/@tanstack/query-core/src/queryClient.ts +648 -0
  369. package/node_modules/@tanstack/query-core/src/queryObserver.ts +828 -0
  370. package/node_modules/@tanstack/query-core/src/removable.ts +39 -0
  371. package/node_modules/@tanstack/query-core/src/retryer.ts +228 -0
  372. package/node_modules/@tanstack/query-core/src/streamedQuery.ts +122 -0
  373. package/node_modules/@tanstack/query-core/src/subscribable.ts +30 -0
  374. package/node_modules/@tanstack/query-core/src/thenable.ts +111 -0
  375. package/node_modules/@tanstack/query-core/src/timeoutManager.ts +135 -0
  376. package/node_modules/@tanstack/query-core/src/types.ts +1391 -0
  377. package/node_modules/@tanstack/query-core/src/utils.ts +499 -0
  378. package/node_modules/@tanstack/react-query/LICENSE +21 -0
  379. package/node_modules/@tanstack/react-query/README.md +48 -0
  380. package/node_modules/@tanstack/react-query/build/codemods/src/utils/index.cjs +208 -0
  381. package/node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-cache-transformer.cjs +124 -0
  382. package/node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-client-transformer.cjs +53 -0
  383. package/node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/use-query-like-transformer.cjs +38 -0
  384. package/node_modules/@tanstack/react-query/build/codemods/src/v4/key-transformation.cjs +181 -0
  385. package/node_modules/@tanstack/react-query/build/codemods/src/v4/replace-import-specifier.cjs +25 -0
  386. package/node_modules/@tanstack/react-query/build/codemods/src/v4/utils/replacers/key-replacer.cjs +164 -0
  387. package/node_modules/@tanstack/react-query/build/codemods/src/v5/is-loading/is-loading.cjs +244 -0
  388. package/node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/README.md +32 -0
  389. package/node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/keep-previous-data.cjs +271 -0
  390. package/node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/utils/already-has-placeholder-data-property.cjs +26 -0
  391. package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs +58 -0
  392. package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/filter-aware-usage-transformer.cjs +271 -0
  393. package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/query-fn-aware-usage-transformer.cjs +185 -0
  394. package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/index.cjs +123 -0
  395. package/node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/unknown-usage-error.cjs +27 -0
  396. package/node_modules/@tanstack/react-query/build/codemods/src/v5/rename-hydrate/rename-hydrate.cjs +55 -0
  397. package/node_modules/@tanstack/react-query/build/codemods/src/v5/rename-properties/rename-properties.cjs +41 -0
  398. package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs +91 -0
  399. package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs.map +1 -0
  400. package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.cts +14 -0
  401. package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.ts +14 -0
  402. package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js +57 -0
  403. package/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js.map +1 -0
  404. package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs +47 -0
  405. package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs.map +1 -0
  406. package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.cts +6 -0
  407. package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.ts +6 -0
  408. package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js +12 -0
  409. package/node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js.map +1 -0
  410. package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs +72 -0
  411. package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs.map +1 -0
  412. package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.cts +12 -0
  413. package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.ts +12 -0
  414. package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js +36 -0
  415. package/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js.map +1 -0
  416. package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs +67 -0
  417. package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs.map +1 -0
  418. package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.cts +19 -0
  419. package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.ts +19 -0
  420. package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js +32 -0
  421. package/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js.map +1 -0
  422. package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs +69 -0
  423. package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs.map +1 -0
  424. package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.cts +16 -0
  425. package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.ts +16 -0
  426. package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js +33 -0
  427. package/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js.map +1 -0
  428. package/node_modules/@tanstack/react-query/build/legacy/index.cjs +97 -0
  429. package/node_modules/@tanstack/react-query/build/legacy/index.cjs.map +1 -0
  430. package/node_modules/@tanstack/react-query/build/legacy/index.d.cts +22 -0
  431. package/node_modules/@tanstack/react-query/build/legacy/index.d.ts +22 -0
  432. package/node_modules/@tanstack/react-query/build/legacy/index.js +54 -0
  433. package/node_modules/@tanstack/react-query/build/legacy/index.js.map +1 -0
  434. package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs +33 -0
  435. package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs.map +1 -0
  436. package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.cts +23 -0
  437. package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.ts +23 -0
  438. package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js +8 -0
  439. package/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js.map +1 -0
  440. package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs +33 -0
  441. package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs.map +1 -0
  442. package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.cts +7 -0
  443. package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.ts +7 -0
  444. package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.js +8 -0
  445. package/node_modules/@tanstack/react-query/build/legacy/mutationOptions.js.map +1 -0
  446. package/node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs +33 -0
  447. package/node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs.map +1 -0
  448. package/node_modules/@tanstack/react-query/build/legacy/queryOptions.d.cts +24 -0
  449. package/node_modules/@tanstack/react-query/build/legacy/queryOptions.d.ts +24 -0
  450. package/node_modules/@tanstack/react-query/build/legacy/queryOptions.js +8 -0
  451. package/node_modules/@tanstack/react-query/build/legacy/queryOptions.js.map +1 -0
  452. package/node_modules/@tanstack/react-query/build/legacy/suspense.cjs +58 -0
  453. package/node_modules/@tanstack/react-query/build/legacy/suspense.cjs.map +1 -0
  454. package/node_modules/@tanstack/react-query/build/legacy/suspense.d.cts +12 -0
  455. package/node_modules/@tanstack/react-query/build/legacy/suspense.d.ts +12 -0
  456. package/node_modules/@tanstack/react-query/build/legacy/suspense.js +29 -0
  457. package/node_modules/@tanstack/react-query/build/legacy/suspense.js.map +1 -0
  458. package/node_modules/@tanstack/react-query/build/legacy/types.cjs +19 -0
  459. package/node_modules/@tanstack/react-query/build/legacy/types.cjs.map +1 -0
  460. package/node_modules/@tanstack/react-query/build/legacy/types.d.cts +52 -0
  461. package/node_modules/@tanstack/react-query/build/legacy/types.d.ts +52 -0
  462. package/node_modules/@tanstack/react-query/build/legacy/types.js +1 -0
  463. package/node_modules/@tanstack/react-query/build/legacy/types.js.map +1 -0
  464. package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs +133 -0
  465. package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs.map +1 -0
  466. package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.cts +6 -0
  467. package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.ts +6 -0
  468. package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js +108 -0
  469. package/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js.map +1 -0
  470. package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs +40 -0
  471. package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs.map +1 -0
  472. package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.cts +9 -0
  473. package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.ts +9 -0
  474. package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js +16 -0
  475. package/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js.map +1 -0
  476. package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs +56 -0
  477. package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs.map +1 -0
  478. package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.d.cts +5 -0
  479. package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.d.ts +5 -0
  480. package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.js +22 -0
  481. package/node_modules/@tanstack/react-query/build/legacy/useIsFetching.js.map +1 -0
  482. package/node_modules/@tanstack/react-query/build/legacy/useMutation.cjs +74 -0
  483. package/node_modules/@tanstack/react-query/build/legacy/useMutation.cjs.map +1 -0
  484. package/node_modules/@tanstack/react-query/build/legacy/useMutation.d.cts +6 -0
  485. package/node_modules/@tanstack/react-query/build/legacy/useMutation.d.ts +6 -0
  486. package/node_modules/@tanstack/react-query/build/legacy/useMutation.js +45 -0
  487. package/node_modules/@tanstack/react-query/build/legacy/useMutation.js.map +1 -0
  488. package/node_modules/@tanstack/react-query/build/legacy/useMutationState.cjs +86 -0
  489. package/node_modules/@tanstack/react-query/build/legacy/useMutationState.cjs.map +1 -0
  490. package/node_modules/@tanstack/react-query/build/legacy/useMutationState.d.cts +10 -0
  491. package/node_modules/@tanstack/react-query/build/legacy/useMutationState.d.ts +10 -0
  492. package/node_modules/@tanstack/react-query/build/legacy/useMutationState.js +51 -0
  493. package/node_modules/@tanstack/react-query/build/legacy/useMutationState.js.map +1 -0
  494. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.cjs +37 -0
  495. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -0
  496. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.d.cts +5 -0
  497. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.d.ts +5 -0
  498. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.js +12 -0
  499. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.js.map +1 -0
  500. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.cjs +37 -0
  501. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.cjs.map +1 -0
  502. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.d.cts +6 -0
  503. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.d.ts +6 -0
  504. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.js +12 -0
  505. package/node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.js.map +1 -0
  506. package/node_modules/@tanstack/react-query/build/legacy/useQueries.cjs +132 -0
  507. package/node_modules/@tanstack/react-query/build/legacy/useQueries.cjs.map +1 -0
  508. package/node_modules/@tanstack/react-query/build/legacy/useQueries.d.cts +76 -0
  509. package/node_modules/@tanstack/react-query/build/legacy/useQueries.d.ts +76 -0
  510. package/node_modules/@tanstack/react-query/build/legacy/useQueries.js +112 -0
  511. package/node_modules/@tanstack/react-query/build/legacy/useQueries.js.map +1 -0
  512. package/node_modules/@tanstack/react-query/build/legacy/useQuery.cjs +36 -0
  513. package/node_modules/@tanstack/react-query/build/legacy/useQuery.cjs.map +1 -0
  514. package/node_modules/@tanstack/react-query/build/legacy/useQuery.d.cts +9 -0
  515. package/node_modules/@tanstack/react-query/build/legacy/useQuery.d.ts +9 -0
  516. package/node_modules/@tanstack/react-query/build/legacy/useQuery.js +12 -0
  517. package/node_modules/@tanstack/react-query/build/legacy/useQuery.js.map +1 -0
  518. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.cjs +51 -0
  519. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.cjs.map +1 -0
  520. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.d.cts +6 -0
  521. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.d.ts +6 -0
  522. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.js +27 -0
  523. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.js.map +1 -0
  524. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.cjs +56 -0
  525. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.cjs.map +1 -0
  526. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.d.cts +79 -0
  527. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.d.ts +79 -0
  528. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.js +32 -0
  529. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.js.map +1 -0
  530. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.cjs +52 -0
  531. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.cjs.map +1 -0
  532. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.d.cts +6 -0
  533. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.d.ts +6 -0
  534. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.js +28 -0
  535. package/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.js.map +1 -0
  536. package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs +91 -0
  537. package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs.map +1 -0
  538. package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.d.cts +14 -0
  539. package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.d.ts +14 -0
  540. package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js +57 -0
  541. package/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js.map +1 -0
  542. package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.cjs +47 -0
  543. package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.cjs.map +1 -0
  544. package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.d.cts +6 -0
  545. package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.d.ts +6 -0
  546. package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js +12 -0
  547. package/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js.map +1 -0
  548. package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +72 -0
  549. package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs.map +1 -0
  550. package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.d.cts +12 -0
  551. package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.d.ts +12 -0
  552. package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +36 -0
  553. package/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js.map +1 -0
  554. package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs +67 -0
  555. package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs.map +1 -0
  556. package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.d.cts +19 -0
  557. package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.d.ts +19 -0
  558. package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js +32 -0
  559. package/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js.map +1 -0
  560. package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs +69 -0
  561. package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs.map +1 -0
  562. package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.d.cts +16 -0
  563. package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.d.ts +16 -0
  564. package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js +33 -0
  565. package/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js.map +1 -0
  566. package/node_modules/@tanstack/react-query/build/modern/index.cjs +97 -0
  567. package/node_modules/@tanstack/react-query/build/modern/index.cjs.map +1 -0
  568. package/node_modules/@tanstack/react-query/build/modern/index.d.cts +22 -0
  569. package/node_modules/@tanstack/react-query/build/modern/index.d.ts +22 -0
  570. package/node_modules/@tanstack/react-query/build/modern/index.js +54 -0
  571. package/node_modules/@tanstack/react-query/build/modern/index.js.map +1 -0
  572. package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs +33 -0
  573. package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs.map +1 -0
  574. package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.d.cts +23 -0
  575. package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.d.ts +23 -0
  576. package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js +8 -0
  577. package/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js.map +1 -0
  578. package/node_modules/@tanstack/react-query/build/modern/mutationOptions.cjs +33 -0
  579. package/node_modules/@tanstack/react-query/build/modern/mutationOptions.cjs.map +1 -0
  580. package/node_modules/@tanstack/react-query/build/modern/mutationOptions.d.cts +7 -0
  581. package/node_modules/@tanstack/react-query/build/modern/mutationOptions.d.ts +7 -0
  582. package/node_modules/@tanstack/react-query/build/modern/mutationOptions.js +8 -0
  583. package/node_modules/@tanstack/react-query/build/modern/mutationOptions.js.map +1 -0
  584. package/node_modules/@tanstack/react-query/build/modern/queryOptions.cjs +33 -0
  585. package/node_modules/@tanstack/react-query/build/modern/queryOptions.cjs.map +1 -0
  586. package/node_modules/@tanstack/react-query/build/modern/queryOptions.d.cts +24 -0
  587. package/node_modules/@tanstack/react-query/build/modern/queryOptions.d.ts +24 -0
  588. package/node_modules/@tanstack/react-query/build/modern/queryOptions.js +8 -0
  589. package/node_modules/@tanstack/react-query/build/modern/queryOptions.js.map +1 -0
  590. package/node_modules/@tanstack/react-query/build/modern/suspense.cjs +58 -0
  591. package/node_modules/@tanstack/react-query/build/modern/suspense.cjs.map +1 -0
  592. package/node_modules/@tanstack/react-query/build/modern/suspense.d.cts +12 -0
  593. package/node_modules/@tanstack/react-query/build/modern/suspense.d.ts +12 -0
  594. package/node_modules/@tanstack/react-query/build/modern/suspense.js +29 -0
  595. package/node_modules/@tanstack/react-query/build/modern/suspense.js.map +1 -0
  596. package/node_modules/@tanstack/react-query/build/modern/types.cjs +19 -0
  597. package/node_modules/@tanstack/react-query/build/modern/types.cjs.map +1 -0
  598. package/node_modules/@tanstack/react-query/build/modern/types.d.cts +52 -0
  599. package/node_modules/@tanstack/react-query/build/modern/types.d.ts +52 -0
  600. package/node_modules/@tanstack/react-query/build/modern/types.js +1 -0
  601. package/node_modules/@tanstack/react-query/build/modern/types.js.map +1 -0
  602. package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +130 -0
  603. package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -0
  604. package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.d.cts +6 -0
  605. package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.d.ts +6 -0
  606. package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +105 -0
  607. package/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -0
  608. package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs +40 -0
  609. package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs.map +1 -0
  610. package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.d.cts +9 -0
  611. package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.d.ts +9 -0
  612. package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js +16 -0
  613. package/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js.map +1 -0
  614. package/node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs +56 -0
  615. package/node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs.map +1 -0
  616. package/node_modules/@tanstack/react-query/build/modern/useIsFetching.d.cts +5 -0
  617. package/node_modules/@tanstack/react-query/build/modern/useIsFetching.d.ts +5 -0
  618. package/node_modules/@tanstack/react-query/build/modern/useIsFetching.js +22 -0
  619. package/node_modules/@tanstack/react-query/build/modern/useIsFetching.js.map +1 -0
  620. package/node_modules/@tanstack/react-query/build/modern/useMutation.cjs +74 -0
  621. package/node_modules/@tanstack/react-query/build/modern/useMutation.cjs.map +1 -0
  622. package/node_modules/@tanstack/react-query/build/modern/useMutation.d.cts +6 -0
  623. package/node_modules/@tanstack/react-query/build/modern/useMutation.d.ts +6 -0
  624. package/node_modules/@tanstack/react-query/build/modern/useMutation.js +45 -0
  625. package/node_modules/@tanstack/react-query/build/modern/useMutation.js.map +1 -0
  626. package/node_modules/@tanstack/react-query/build/modern/useMutationState.cjs +86 -0
  627. package/node_modules/@tanstack/react-query/build/modern/useMutationState.cjs.map +1 -0
  628. package/node_modules/@tanstack/react-query/build/modern/useMutationState.d.cts +10 -0
  629. package/node_modules/@tanstack/react-query/build/modern/useMutationState.d.ts +10 -0
  630. package/node_modules/@tanstack/react-query/build/modern/useMutationState.js +51 -0
  631. package/node_modules/@tanstack/react-query/build/modern/useMutationState.js.map +1 -0
  632. package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs +37 -0
  633. package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -0
  634. package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.d.cts +5 -0
  635. package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.d.ts +5 -0
  636. package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js +12 -0
  637. package/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js.map +1 -0
  638. package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs +37 -0
  639. package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs.map +1 -0
  640. package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.d.cts +6 -0
  641. package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.d.ts +6 -0
  642. package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js +12 -0
  643. package/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js.map +1 -0
  644. package/node_modules/@tanstack/react-query/build/modern/useQueries.cjs +132 -0
  645. package/node_modules/@tanstack/react-query/build/modern/useQueries.cjs.map +1 -0
  646. package/node_modules/@tanstack/react-query/build/modern/useQueries.d.cts +76 -0
  647. package/node_modules/@tanstack/react-query/build/modern/useQueries.d.ts +76 -0
  648. package/node_modules/@tanstack/react-query/build/modern/useQueries.js +112 -0
  649. package/node_modules/@tanstack/react-query/build/modern/useQueries.js.map +1 -0
  650. package/node_modules/@tanstack/react-query/build/modern/useQuery.cjs +36 -0
  651. package/node_modules/@tanstack/react-query/build/modern/useQuery.cjs.map +1 -0
  652. package/node_modules/@tanstack/react-query/build/modern/useQuery.d.cts +9 -0
  653. package/node_modules/@tanstack/react-query/build/modern/useQuery.d.ts +9 -0
  654. package/node_modules/@tanstack/react-query/build/modern/useQuery.js +12 -0
  655. package/node_modules/@tanstack/react-query/build/modern/useQuery.js.map +1 -0
  656. package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs +51 -0
  657. package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs.map +1 -0
  658. package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.d.cts +6 -0
  659. package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.d.ts +6 -0
  660. package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js +27 -0
  661. package/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js.map +1 -0
  662. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs +56 -0
  663. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs.map +1 -0
  664. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.d.cts +79 -0
  665. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.d.ts +79 -0
  666. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js +32 -0
  667. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js.map +1 -0
  668. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs +52 -0
  669. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs.map +1 -0
  670. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.d.cts +6 -0
  671. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.d.ts +6 -0
  672. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js +28 -0
  673. package/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js.map +1 -0
  674. package/node_modules/@tanstack/react-query/build/query-codemods/eslint.config.js +18 -0
  675. package/node_modules/@tanstack/react-query/build/query-codemods/package.json +38 -0
  676. package/node_modules/@tanstack/react-query/build/query-codemods/root.eslint.config.js +64 -0
  677. package/node_modules/@tanstack/react-query/build/query-codemods/tsconfig.json +8 -0
  678. package/node_modules/@tanstack/react-query/build/query-codemods/vite.config.ts +30 -0
  679. package/node_modules/@tanstack/react-query/package.json +87 -0
  680. package/node_modules/@tanstack/react-query/src/HydrationBoundary.tsx +111 -0
  681. package/node_modules/@tanstack/react-query/src/IsRestoringProvider.ts +7 -0
  682. package/node_modules/@tanstack/react-query/src/QueryClientProvider.tsx +45 -0
  683. package/node_modules/@tanstack/react-query/src/QueryErrorResetBoundary.tsx +56 -0
  684. package/node_modules/@tanstack/react-query/src/errorBoundaryUtils.ts +82 -0
  685. package/node_modules/@tanstack/react-query/src/index.ts +56 -0
  686. package/node_modules/@tanstack/react-query/src/infiniteQueryOptions.ts +149 -0
  687. package/node_modules/@tanstack/react-query/src/mutationOptions.ts +41 -0
  688. package/node_modules/@tanstack/react-query/src/queryOptions.ts +87 -0
  689. package/node_modules/@tanstack/react-query/src/suspense.ts +80 -0
  690. package/node_modules/@tanstack/react-query/src/types.ts +242 -0
  691. package/node_modules/@tanstack/react-query/src/useBaseQuery.ts +170 -0
  692. package/node_modules/@tanstack/react-query/src/useInfiniteQuery.ts +81 -0
  693. package/node_modules/@tanstack/react-query/src/useIsFetching.ts +24 -0
  694. package/node_modules/@tanstack/react-query/src/useMutation.ts +69 -0
  695. package/node_modules/@tanstack/react-query/src/useMutationState.ts +75 -0
  696. package/node_modules/@tanstack/react-query/src/usePrefetchInfiniteQuery.tsx +30 -0
  697. package/node_modules/@tanstack/react-query/src/usePrefetchQuery.tsx +19 -0
  698. package/node_modules/@tanstack/react-query/src/useQueries.ts +333 -0
  699. package/node_modules/@tanstack/react-query/src/useQuery.ts +52 -0
  700. package/node_modules/@tanstack/react-query/src/useSuspenseInfiniteQuery.ts +50 -0
  701. package/node_modules/@tanstack/react-query/src/useSuspenseQueries.ts +211 -0
  702. package/node_modules/@tanstack/react-query/src/useSuspenseQuery.ts +34 -0
  703. package/node_modules/react-router/CHANGELOG.md +2366 -0
  704. package/node_modules/react-router/LICENSE.md +23 -0
  705. package/node_modules/react-router/README.md +7 -0
  706. package/node_modules/react-router/dist/development/browser-BEPxnEBW.d.mts +313 -0
  707. package/node_modules/react-router/dist/development/browser-CJ9_du-U.d.ts +313 -0
  708. package/node_modules/react-router/dist/development/chunk-4LKRSAEJ.mjs +2508 -0
  709. package/node_modules/react-router/dist/development/chunk-7PAHGFS4.js +188 -0
  710. package/node_modules/react-router/dist/development/chunk-HMDR2CVH.js +1334 -0
  711. package/node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs +11009 -0
  712. package/node_modules/react-router/dist/development/chunk-WICQJKU6.js +9736 -0
  713. package/node_modules/react-router/dist/development/dom-export.d.mts +171 -0
  714. package/node_modules/react-router/dist/development/dom-export.d.ts +172 -0
  715. package/node_modules/react-router/dist/development/dom-export.js +987 -0
  716. package/node_modules/react-router/dist/development/dom-export.mjs +979 -0
  717. package/node_modules/react-router/dist/development/index-react-server-client-1TI9M9o1.d.ts +2534 -0
  718. package/node_modules/react-router/dist/development/index-react-server-client-MKTlCGL3.d.mts +2534 -0
  719. package/node_modules/react-router/dist/development/index-react-server-client.d.mts +3 -0
  720. package/node_modules/react-router/dist/development/index-react-server-client.d.ts +3 -0
  721. package/node_modules/react-router/dist/development/index-react-server-client.js +61 -0
  722. package/node_modules/react-router/dist/development/index-react-server-client.mjs +59 -0
  723. package/node_modules/react-router/dist/development/index-react-server.d.mts +2553 -0
  724. package/node_modules/react-router/dist/development/index-react-server.d.ts +2553 -0
  725. package/node_modules/react-router/dist/development/index-react-server.js +3708 -0
  726. package/node_modules/react-router/dist/development/index-react-server.mjs +3597 -0
  727. package/node_modules/react-router/dist/development/index.d.mts +1387 -0
  728. package/node_modules/react-router/dist/development/index.d.ts +1387 -0
  729. package/node_modules/react-router/dist/development/index.js +2551 -0
  730. package/node_modules/react-router/dist/development/index.mjs +275 -0
  731. package/node_modules/react-router/dist/development/instrumentation-DvHY1sgY.d.ts +3332 -0
  732. package/node_modules/react-router/dist/development/lib/types/internal.d.mts +184 -0
  733. package/node_modules/react-router/dist/development/lib/types/internal.d.ts +184 -0
  734. package/node_modules/react-router/dist/development/lib/types/internal.js +10 -0
  735. package/node_modules/react-router/dist/development/lib/types/internal.mjs +10 -0
  736. package/node_modules/react-router/dist/development/register-Bm80E9qL.d.ts +30 -0
  737. package/node_modules/react-router/dist/development/register-CS_tiXsm.d.mts +30 -0
  738. package/node_modules/react-router/dist/development/router-5iOvts3c.d.mts +3332 -0
  739. package/node_modules/react-router/dist/production/browser-BEPxnEBW.d.mts +313 -0
  740. package/node_modules/react-router/dist/production/browser-CJ9_du-U.d.ts +313 -0
  741. package/node_modules/react-router/dist/production/chunk-GSFLVUYQ.mjs +2508 -0
  742. package/node_modules/react-router/dist/production/chunk-N2HZAAIG.js +1334 -0
  743. package/node_modules/react-router/dist/production/chunk-NGWWS4QJ.js +188 -0
  744. package/node_modules/react-router/dist/production/chunk-QSNCZFX5.js +9736 -0
  745. package/node_modules/react-router/dist/production/chunk-Y3R63HEB.mjs +11009 -0
  746. package/node_modules/react-router/dist/production/dom-export.d.mts +171 -0
  747. package/node_modules/react-router/dist/production/dom-export.d.ts +172 -0
  748. package/node_modules/react-router/dist/production/dom-export.js +987 -0
  749. package/node_modules/react-router/dist/production/dom-export.mjs +979 -0
  750. package/node_modules/react-router/dist/production/index-react-server-client-1TI9M9o1.d.ts +2534 -0
  751. package/node_modules/react-router/dist/production/index-react-server-client-MKTlCGL3.d.mts +2534 -0
  752. package/node_modules/react-router/dist/production/index-react-server-client.d.mts +3 -0
  753. package/node_modules/react-router/dist/production/index-react-server-client.d.ts +3 -0
  754. package/node_modules/react-router/dist/production/index-react-server-client.js +61 -0
  755. package/node_modules/react-router/dist/production/index-react-server-client.mjs +59 -0
  756. package/node_modules/react-router/dist/production/index-react-server.d.mts +2553 -0
  757. package/node_modules/react-router/dist/production/index-react-server.d.ts +2553 -0
  758. package/node_modules/react-router/dist/production/index-react-server.js +3708 -0
  759. package/node_modules/react-router/dist/production/index-react-server.mjs +3597 -0
  760. package/node_modules/react-router/dist/production/index.d.mts +1387 -0
  761. package/node_modules/react-router/dist/production/index.d.ts +1387 -0
  762. package/node_modules/react-router/dist/production/index.js +2551 -0
  763. package/node_modules/react-router/dist/production/index.mjs +275 -0
  764. package/node_modules/react-router/dist/production/instrumentation-DvHY1sgY.d.ts +3332 -0
  765. package/node_modules/react-router/dist/production/lib/types/internal.d.mts +184 -0
  766. package/node_modules/react-router/dist/production/lib/types/internal.d.ts +184 -0
  767. package/node_modules/react-router/dist/production/lib/types/internal.js +10 -0
  768. package/node_modules/react-router/dist/production/lib/types/internal.mjs +10 -0
  769. package/node_modules/react-router/dist/production/register-Bm80E9qL.d.ts +30 -0
  770. package/node_modules/react-router/dist/production/register-CS_tiXsm.d.mts +30 -0
  771. package/node_modules/react-router/dist/production/router-5iOvts3c.d.mts +3332 -0
  772. package/node_modules/react-router/node_modules/cookie/LICENSE +24 -0
  773. package/node_modules/react-router/node_modules/cookie/README.md +295 -0
  774. package/node_modules/react-router/node_modules/cookie/dist/index.d.ts +148 -0
  775. package/node_modules/react-router/node_modules/cookie/dist/index.js +350 -0
  776. package/node_modules/react-router/node_modules/cookie/dist/index.js.map +1 -0
  777. package/node_modules/react-router/node_modules/cookie/package.json +47 -0
  778. package/node_modules/react-router/package.json +163 -0
  779. package/node_modules/react-router-dom/LICENSE.md +23 -0
  780. package/node_modules/react-router-dom/README.md +6 -0
  781. package/node_modules/react-router-dom/dist/index.d.mts +2 -0
  782. package/node_modules/react-router-dom/dist/index.d.ts +2 -0
  783. package/node_modules/react-router-dom/dist/index.js +45 -0
  784. package/node_modules/react-router-dom/dist/index.mjs +18 -0
  785. package/node_modules/react-router-dom/package.json +83 -0
  786. package/node_modules/set-cookie-parser/LICENSE +21 -0
  787. package/node_modules/set-cookie-parser/README.md +202 -0
  788. package/node_modules/set-cookie-parser/lib/set-cookie.js +242 -0
  789. package/node_modules/set-cookie-parser/package.json +45 -0
  790. package/node_modules/zustand/LICENSE +21 -0
  791. package/node_modules/zustand/README.md +512 -0
  792. package/node_modules/zustand/esm/index.d.mts +2 -0
  793. package/node_modules/zustand/esm/index.mjs +2 -0
  794. package/node_modules/zustand/esm/middleware/combine.d.mts +4 -0
  795. package/node_modules/zustand/esm/middleware/devtools.d.mts +58 -0
  796. package/node_modules/zustand/esm/middleware/immer.d.mts +29 -0
  797. package/node_modules/zustand/esm/middleware/immer.mjs +12 -0
  798. package/node_modules/zustand/esm/middleware/persist.d.mts +99 -0
  799. package/node_modules/zustand/esm/middleware/redux.d.mts +21 -0
  800. package/node_modules/zustand/esm/middleware/ssrSafe.d.mts +2 -0
  801. package/node_modules/zustand/esm/middleware/subscribeWithSelector.d.mts +25 -0
  802. package/node_modules/zustand/esm/middleware.d.mts +6 -0
  803. package/node_modules/zustand/esm/middleware.mjs +487 -0
  804. package/node_modules/zustand/esm/react/shallow.d.mts +1 -0
  805. package/node_modules/zustand/esm/react/shallow.mjs +12 -0
  806. package/node_modules/zustand/esm/react.d.mts +14 -0
  807. package/node_modules/zustand/esm/react.mjs +22 -0
  808. package/node_modules/zustand/esm/shallow.d.mts +2 -0
  809. package/node_modules/zustand/esm/shallow.mjs +2 -0
  810. package/node_modules/zustand/esm/traditional.d.mts +14 -0
  811. package/node_modules/zustand/esm/traditional.mjs +26 -0
  812. package/node_modules/zustand/esm/vanilla/shallow.d.mts +1 -0
  813. package/node_modules/zustand/esm/vanilla/shallow.mjs +55 -0
  814. package/node_modules/zustand/esm/vanilla.d.mts +31 -0
  815. package/node_modules/zustand/esm/vanilla.mjs +24 -0
  816. package/node_modules/zustand/index.d.ts +2 -0
  817. package/node_modules/zustand/index.js +19 -0
  818. package/node_modules/zustand/middleware/combine.d.ts +4 -0
  819. package/node_modules/zustand/middleware/devtools.d.ts +58 -0
  820. package/node_modules/zustand/middleware/immer.d.ts +29 -0
  821. package/node_modules/zustand/middleware/immer.js +14 -0
  822. package/node_modules/zustand/middleware/persist.d.ts +99 -0
  823. package/node_modules/zustand/middleware/redux.d.ts +21 -0
  824. package/node_modules/zustand/middleware/ssrSafe.d.ts +2 -0
  825. package/node_modules/zustand/middleware/subscribeWithSelector.d.ts +25 -0
  826. package/node_modules/zustand/middleware.d.ts +6 -0
  827. package/node_modules/zustand/middleware.js +495 -0
  828. package/node_modules/zustand/package.json +108 -0
  829. package/node_modules/zustand/react/shallow.d.ts +1 -0
  830. package/node_modules/zustand/react/shallow.js +14 -0
  831. package/node_modules/zustand/react.d.ts +14 -0
  832. package/node_modules/zustand/react.js +25 -0
  833. package/node_modules/zustand/shallow.d.ts +2 -0
  834. package/node_modules/zustand/shallow.js +15 -0
  835. package/node_modules/zustand/traditional.d.ts +14 -0
  836. package/node_modules/zustand/traditional.js +29 -0
  837. package/node_modules/zustand/ts_version_4.5_and_above_is_required.d.ts +0 -0
  838. package/node_modules/zustand/vanilla/shallow.d.ts +1 -0
  839. package/node_modules/zustand/vanilla/shallow.js +57 -0
  840. package/node_modules/zustand/vanilla.d.ts +31 -0
  841. package/node_modules/zustand/vanilla.js +26 -0
  842. package/oclif.manifest.json +516 -454
  843. package/package.json +5 -2
@@ -0,0 +1,2366 @@
1
+ # `react-router`
2
+
3
+ ## 7.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add `crossOrigin` prop to `Links` component ([#14687](https://github.com/remix-run/react-router/pull/14687))
8
+
9
+ ### Patch Changes
10
+
11
+ - Fix double slash normalization for useNavigate colon urls ([#14718](https://github.com/remix-run/react-router/pull/14718))
12
+ - Update failed origin checks to return a 400 status instead of a 500 ([#14737](https://github.com/remix-run/react-router/pull/14737))
13
+ - Bugfix #14666: Inline criticalCss is missing nonce ([#14691](https://github.com/remix-run/react-router/pull/14691))
14
+ - Loosen `allowedActionOrigins` glob check so `**` matches all domains ([#14722](https://github.com/remix-run/react-router/pull/14722))
15
+
16
+ ## 7.12.0
17
+
18
+ ### Minor Changes
19
+
20
+ - Add additional layer of CSRF protection by rejecting submissions to UI routes from external origins. If you need to permit access to specific external origins, you can specify them in the `react-router.config.ts` config `allowedActionOrigins` field. ([#14708](https://github.com/remix-run/react-router/pull/14708))
21
+
22
+ ### Patch Changes
23
+
24
+ - Fix `generatePath` when used with suffixed params (i.e., "/books/:id.json") ([#14269](https://github.com/remix-run/react-router/pull/14269))
25
+
26
+ - Export `UNSAFE_createMemoryHistory` and `UNSAFE_createHashHistory` alongside `UNSAFE_createBrowserHistory` for consistency. These are not intended to be used for new apps but intended to help apps usiong `unstable_HistoryRouter` migrate from v6->v7 so they can adopt the newer APIs. ([#14663](https://github.com/remix-run/react-router/pull/14663))
27
+
28
+ - Escape HTML in scroll restoration keys ([#14705](https://github.com/remix-run/react-router/pull/14705))
29
+
30
+ - Validate redirect locations ([#14706](https://github.com/remix-run/react-router/pull/14706))
31
+
32
+ - \[UNSTABLE] Pass `<Scripts nonce>` value through to the underlying `importmap` `script` tag when using `future.unstable_subResourceIntegrity` ([#14675](https://github.com/remix-run/react-router/pull/14675))
33
+
34
+ - \[UNSTABLE] Add a new `future.unstable_trailingSlashAwareDataRequests` flag to provide consistent behavior of `request.pathname` inside `middleware`, `loader`, and `action` functions on document and data requests when a trailing slash is present in the browser URL. ([#14644](https://github.com/remix-run/react-router/pull/14644))
35
+
36
+ Currently, your HTTP and `request` pathnames would be as follows for `/a/b/c` and `/a/b/c/`
37
+
38
+ | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** |
39
+ | ------------ | ----------------- | ------------------------ |
40
+ | **Document** | `/a/b/c` | `/a/b/c` ✅ |
41
+ | **Data** | `/a/b/c.data` | `/a/b/c` ✅ |
42
+
43
+ | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** |
44
+ | ------------- | ----------------- | ------------------------ |
45
+ | **Document** | `/a/b/c/` | `/a/b/c/` ✅ |
46
+ | **Data** | `/a/b/c.data` | `/a/b/c` ⚠️ |
47
+
48
+ With this flag enabled, these pathnames will be made consistent though a new `_.data` format for client-side `.data` requests:
49
+
50
+ | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** |
51
+ | ------------ | ----------------- | ------------------------ |
52
+ | **Document** | `/a/b/c` | `/a/b/c` ✅ |
53
+ | **Data** | `/a/b/c.data` | `/a/b/c` ✅ |
54
+
55
+ | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** |
56
+ | ------------- | ------------------ | ------------------------ |
57
+ | **Document** | `/a/b/c/` | `/a/b/c/` ✅ |
58
+ | **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ |
59
+
60
+ This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic.
61
+
62
+ Enabling this flag also changes the format of client side `.data` requests from `/_root.data` to `/_.data` when navigating to `/` to align with the new format. This does not impact the `request` pathname which is still `/` in all cases.
63
+
64
+ - Preserve `clientLoader.hydrate=true` when using `<HydratedRouter unstable_instrumentations>` ([#14674](https://github.com/remix-run/react-router/pull/14674))
65
+
66
+ ## 7.11.0
67
+
68
+ ### Minor Changes
69
+
70
+ - Stabilize `<HydratedRouter onError>`/`<RouterProvider onError>` ([#14546](https://github.com/remix-run/react-router/pull/14546))
71
+
72
+ ### Patch Changes
73
+
74
+ - add support for throwing redirect Response's at RSC render time ([#14596](https://github.com/remix-run/react-router/pull/14596))
75
+
76
+ - Support for throwing `data()` and Response from server component render phase. Response body is not serialized as async work is not allowed as error encoding phase. If you wish to transmit data to the boundary, throw `data()` instead. ([#14632](https://github.com/remix-run/react-router/pull/14632))
77
+
78
+ - Fix `unstable_useTransitions` prop on `<Router>` component to permit omission for backewards compatibility ([#14646](https://github.com/remix-run/react-router/pull/14646))
79
+
80
+ - `routeRSCServerRequest` replace `fetchServer` with `serverResponse` ([#14597](https://github.com/remix-run/react-router/pull/14597))
81
+
82
+ - \[UNSTABLE] Add a new `unstable_defaultShouldRevalidate` flag to various APIs to allow opt-ing out of standard revalidation behaviors. ([#14542](https://github.com/remix-run/react-router/pull/14542))
83
+
84
+ If active routes include a `shouldRevalidate` function, then your value will be passed as `defaultShouldRevalidate` in those function so that the route always has the final revalidation determination.
85
+
86
+ - `<Form method="post" unstable_defaultShouldRevalidate={false}>`
87
+ - `submit(data, { method: "post", unstable_defaultShouldRevalidate: false })`
88
+ - `<fetcher.Form method="post" unstable_defaultShouldRevalidate={false}>`
89
+ - `fetcher.submit(data, { method: "post", unstable_defaultShouldRevalidate: false })`
90
+
91
+ This is also available on non-submission APIs that may trigger revalidations due to changing search params:
92
+
93
+ - `<Link to="/" unstable_defaultShouldRevalidate={false}>`
94
+ - `navigate("/?foo=bar", { unstable_defaultShouldRevalidate: false })`
95
+ - `setSearchParams(params, { unstable_defaultShouldRevalidate: false })`
96
+
97
+ - Allow redirects to be returned from client side middleware ([#14598](https://github.com/remix-run/react-router/pull/14598))
98
+
99
+ - Handle `dataStrategy` implementations that return insufficient result sets by adding errors for routes without any available result ([#14627](https://github.com/remix-run/react-router/pull/14627))
100
+
101
+ ## 7.10.1
102
+
103
+ ### Patch Changes
104
+
105
+ - Update the `useOptimistic` stub we provide for React 18 users to use a stable setter function to avoid potential `useEffect` loops - specifically when using `<Link viewTransition>` ([#14628](https://github.com/remix-run/react-router/pull/14628))
106
+
107
+ ## 7.10.0
108
+
109
+ ### Minor Changes
110
+
111
+ - Stabilize `fetcher.reset()` ([#14545](https://github.com/remix-run/react-router/pull/14545))
112
+ - ⚠️ This is a breaking change if you have begun using `fetcher.unstable_reset()`
113
+
114
+ - Stabilize the `dataStrategy` `match.shouldRevalidateArgs`/`match.shouldCallHandler()` APIs. ([#14592](https://github.com/remix-run/react-router/pull/14592))
115
+
116
+ - The `match.shouldLoad` API is now marked deprecated in favor of these more powerful alternatives
117
+
118
+ - If you're using this API in a custom `dataStrategy` today, you can swap to the new API at your convenience:
119
+
120
+ ```tsx
121
+ // Before
122
+ const matchesToLoad = matches.filter((m) => m.shouldLoad);
123
+
124
+ // After
125
+ const matchesToLoad = matches.filter((m) => m.shouldCallHandler());
126
+ ```
127
+
128
+ - `match.shouldRevalidateArgs` is the argument that will be passed to the route `shouldRevaliate` function
129
+
130
+ - Combined with the parameter accepted by `match.shouldCallHandler`, you can define a custom revalidation behavior for your `dataStrategy`:
131
+
132
+ ```tsx
133
+ const matchesToLoad = matches.filter((m) => {
134
+ const defaultShouldRevalidate = customRevalidationBehavior(
135
+ match.shouldRevalidateArgs,
136
+ );
137
+ return m.shouldCallHandler(defaultShouldRevalidate);
138
+ // The argument here will override the internal `defaultShouldRevalidate` value
139
+ });
140
+ ```
141
+
142
+ ### Patch Changes
143
+
144
+ - Fix a Framework Mode bug where the `defaultShouldRevalidate` parameter to `shouldRevalidate` would not be correct after `action` returned a 4xx/5xx response (`true` when it should have been `false`) ([#14592](https://github.com/remix-run/react-router/pull/14592))
145
+ - If your `shouldRevalidate` function relied on that parameter, you may have seen unintended revalidations
146
+
147
+ - Fix `fetcher.submit` failing with plain objects containing a `tagName` property ([#14534](https://github.com/remix-run/react-router/pull/14534))
148
+
149
+ - \[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))
150
+
151
+ - 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))
152
+ - Framework Mode + Data Mode:
153
+ - `<HydratedRouter unstable_transition>`/`<RouterProvider unstable_transition>`
154
+ - When left unset (current default behavior)
155
+ - Router state updates are wrapped in `React.startTransition`
156
+ - ⚠️ This can lead to buggy behaviors if you are wrapping your own navigations/fetchers in `React.startTransition`
157
+ - You should set the flag to `true` if you run into this scenario to get the enhanced `useOptimistic` behavior (requires React 19)
158
+ - When set to `true`
159
+ - Router state updates remain wrapped in `React.startTransition` (as they are without the flag)
160
+ - `Link`/`Form` navigations will be wrapped in `React.startTransition`
161
+ - A subset of router state info will be surfaced to the UI _during_ navigations via `React.useOptimistic` (i.e., `useNavigation()`, `useFetchers()`, etc.)
162
+ - ⚠️ This is a React 19 API so you must also be React 19 to opt into this flag for Framework/Data Mode
163
+ - When set to `false`
164
+ - The router will not leverage `React.startTransition` or `React.useOptimistic` on any navigations or state changes
165
+ - Declarative Mode
166
+ - `<BrowserRouter unstable_useTransitions>`
167
+ - When left unset
168
+ - Router state updates are wrapped in `React.startTransition`
169
+ - When set to `true`
170
+ - Router state updates remain wrapped in `React.startTransition` (as they are without the flag)
171
+ - `Link`/`Form` navigations will be wrapped in `React.startTransition`
172
+ - When set to `false`
173
+ - the router will not leverage `React.startTransition` on any navigations or state changes
174
+
175
+ - 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))
176
+
177
+ - Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled ([#14577](https://github.com/remix-run/react-router/pull/14577))
178
+
179
+ - Preserve `statusText` on the `ErrorResponse` instance when throwing `data()` from a route handler ([#14555](https://github.com/remix-run/react-router/pull/14555))
180
+
181
+ - Optimize href() to avoid backtracking regex on splat ([#14329](https://github.com/remix-run/react-router/pull/14329))
182
+
183
+ ## 7.9.6
184
+
185
+ ### Patch Changes
186
+
187
+ - \[UNSTABLE] Add `location`/`params` as arguments to client-side `unstable_onError` to permit enhanced error reporting. ([#14509](https://github.com/remix-run/react-router/pull/14509))
188
+
189
+ ⚠️ This is a breaking change if you've already adopted `unstable_onError`. The second `errorInfo` parameter is now an object with `location` and `params`:
190
+
191
+ ```tsx
192
+ // Before
193
+ function errorHandler(error: unknown, errorInfo?: React.errorInfo) {
194
+ /*...*/
195
+ }
196
+
197
+ // After
198
+ function errorHandler(
199
+ error: unknown,
200
+ info: {
201
+ location: Location;
202
+ params: Params;
203
+ errorInfo?: React.ErrorInfo;
204
+ },
205
+ ) {
206
+ /*...*/
207
+ }
208
+ ```
209
+
210
+ - Properly handle ancestor thrown middleware errors before `next()` on fetcher submissions ([#14517](https://github.com/remix-run/react-router/pull/14517))
211
+
212
+ - Fix issue with splat routes interfering with multiple calls to patchRoutesOnNavigation ([#14487](https://github.com/remix-run/react-router/pull/14487))
213
+
214
+ - Normalize double-slashes in `resolvePath` ([#14529](https://github.com/remix-run/react-router/pull/14529))
215
+
216
+ ## 7.9.5
217
+
218
+ ### Patch Changes
219
+
220
+ - Move RSCHydratedRouter and utils to `/dom` export. ([#14457](https://github.com/remix-run/react-router/pull/14457))
221
+
222
+ - useRoute: return type-safe `handle` ([#14462](https://github.com/remix-run/react-router/pull/14462))
223
+
224
+ For example:
225
+
226
+ ```ts
227
+ // app/routes/admin.tsx
228
+ const handle = { hello: "world" };
229
+ ```
230
+
231
+ ```ts
232
+ // app/routes/some-other-route.tsx
233
+ export default function Component() {
234
+ const admin = useRoute("routes/admin");
235
+ if (!admin) throw new Error("Not nested within 'routes/admin'");
236
+ console.log(admin.handle);
237
+ // ^? { hello: string }
238
+ }
239
+ ```
240
+
241
+ - Ensure action handlers run for routes with middleware even if no loader is present ([#14443](https://github.com/remix-run/react-router/pull/14443))
242
+
243
+ - Add `unstable_instrumentations` API to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches ([#14412](https://github.com/remix-run/react-router/pull/14412))
244
+
245
+ - Framework Mode:
246
+ - `entry.server.tsx`: `export const unstable_instrumentations = [...]`
247
+ - `entry.client.tsx`: `<HydratedRouter unstable_instrumentations={[...]} />`
248
+ - Data Mode
249
+ - `createBrowserRouter(routes, { unstable_instrumentations: [...] })`
250
+
251
+ This also adds a new `unstable_pattern` parameter to loaders/actions/middleware which contains the un-interpolated route pattern (i.e., `/blog/:slug`) which is useful for aggregating performance metrics by route
252
+
253
+ ## 7.9.4
254
+
255
+ ### Patch Changes
256
+
257
+ - handle external redirects in from server actions ([#14400](https://github.com/remix-run/react-router/pull/14400))
258
+ - New (unstable) `useRoute` hook for accessing data from specific routes ([#14407](https://github.com/remix-run/react-router/pull/14407))
259
+
260
+ For example, let's say you have an `admin` route somewhere in your app and you want any child routes of `admin` to all have access to the `loaderData` and `actionData` from `admin.`
261
+
262
+ ```tsx
263
+ // app/routes/admin.tsx
264
+ import { Outlet } from "react-router";
265
+
266
+ export const loader = () => ({ message: "Hello, loader!" });
267
+
268
+ export const action = () => ({ count: 1 });
269
+
270
+ export default function Component() {
271
+ return (
272
+ <div>
273
+ {/* ... */}
274
+ <Outlet />
275
+ {/* ... */}
276
+ </div>
277
+ );
278
+ }
279
+ ```
280
+
281
+ You might even want to create a reusable widget that all of the routes nested under `admin` could use:
282
+
283
+ ```tsx
284
+ import { unstable_useRoute as useRoute } from "react-router";
285
+
286
+ export function AdminWidget() {
287
+ // How to get `message` and `count` from `admin` route?
288
+ }
289
+ ```
290
+
291
+ In framework mode, `useRoute` knows all your app's routes and gives you TS errors when invalid route IDs are passed in:
292
+
293
+ ```tsx
294
+ export function AdminWidget() {
295
+ const admin = useRoute("routes/dmin");
296
+ // ^^^^^^^^^^^
297
+ }
298
+ ```
299
+
300
+ `useRoute` returns `undefined` if the route is not part of the current page:
301
+
302
+ ```tsx
303
+ export function AdminWidget() {
304
+ const admin = useRoute("routes/admin");
305
+ if (!admin) {
306
+ throw new Error(`AdminWidget used outside of "routes/admin"`);
307
+ }
308
+ }
309
+ ```
310
+
311
+ Note: the `root` route is the exception since it is guaranteed to be part of the current page.
312
+ As a result, `useRoute` never returns `undefined` for `root`.
313
+
314
+ `loaderData` and `actionData` are marked as optional since they could be accessed before the `action` is triggered or after the `loader` threw an error:
315
+
316
+ ```tsx
317
+ export function AdminWidget() {
318
+ const admin = useRoute("routes/admin");
319
+ if (!admin) {
320
+ throw new Error(`AdminWidget used outside of "routes/admin"`);
321
+ }
322
+ const { loaderData, actionData } = admin;
323
+ console.log(loaderData);
324
+ // ^? { message: string } | undefined
325
+ console.log(actionData);
326
+ // ^? { count: number } | undefined
327
+ }
328
+ ```
329
+
330
+ If instead of a specific route, you wanted access to the _current_ route's `loaderData` and `actionData`, you can call `useRoute` without arguments:
331
+
332
+ ```tsx
333
+ export function AdminWidget() {
334
+ const currentRoute = useRoute();
335
+ currentRoute.loaderData;
336
+ currentRoute.actionData;
337
+ }
338
+ ```
339
+
340
+ This usage is equivalent to calling `useLoaderData` and `useActionData`, but consolidates all route data access into one hook: `useRoute`.
341
+
342
+ Note: when calling `useRoute()` (without a route ID), TS has no way to know which route is the current route.
343
+ As a result, `loaderData` and `actionData` are typed as `unknown`.
344
+ If you want more type-safety, you can either narrow the type yourself with something like `zod` or you can refactor your app to pass down typed props to your `AdminWidget`:
345
+
346
+ ```tsx
347
+ export function AdminWidget({
348
+ message,
349
+ count,
350
+ }: {
351
+ message: string;
352
+ count: number;
353
+ }) {
354
+ /* ... */
355
+ }
356
+ ```
357
+
358
+ ## 7.9.3
359
+
360
+ ### Patch Changes
361
+
362
+ - Do not try to use `turbo-stream` to decode CDN errors that never reached the server ([#14385](https://github.com/remix-run/react-router/pull/14385))
363
+ - We used to do this but lost this check with the adoption of single fetch
364
+
365
+ - Fix Data Mode regression causing a 404 during initial load in when `middleware` exists without any `loader` functions ([#14393](https://github.com/remix-run/react-router/pull/14393))
366
+
367
+ ## 7.9.2
368
+
369
+ ### Patch Changes
370
+
371
+ - - Update client-side router to run client `middleware` on initial load even if no loaders exist ([#14348](https://github.com/remix-run/react-router/pull/14348))
372
+ - Update `createRoutesStub` to run route middleware
373
+ - You will need to set the `<RoutesStub future={{ v8_middleware: true }} />` flag to enable the proper `context` type
374
+
375
+ - Update Lazy Route Discovery manifest requests to use a singular comma-separated `paths` query param instead of repeated `p` query params ([#14321](https://github.com/remix-run/react-router/pull/14321))
376
+ - This is because Cloudflare has a hard limit of 100 URL search param key/value pairs when used as a key for caching purposes
377
+ - If more that 100 paths were included, the cache key would be incomplete and could produce false-positive cache hits
378
+
379
+ - \[UNSTABLE] Add `fetcher.unstable_reset()` API ([#14206](https://github.com/remix-run/react-router/pull/14206))
380
+
381
+ - Made useOutlet element reference have stable identity in-between route chages ([#13382](https://github.com/remix-run/react-router/pull/13382))
382
+
383
+ - feat: enable full transition support for the rsc router ([#14362](https://github.com/remix-run/react-router/pull/14362))
384
+
385
+ - In RSC Data Mode, handle SSR'd client errors and re-try in the browser ([#14342](https://github.com/remix-run/react-router/pull/14342))
386
+
387
+ - Support `middleware` prop on `<Route>` for usage with a data router via `createRoutesFromElements` ([#14357](https://github.com/remix-run/react-router/pull/14357))
388
+
389
+ - Handle encoded question mark and hash characters in ancestor splat routes ([#14249](https://github.com/remix-run/react-router/pull/14249))
390
+
391
+ - Fail gracefully on manifest version mismatch logic if `sessionStorage` access is blocked ([#14335](https://github.com/remix-run/react-router/pull/14335))
392
+
393
+ ## 7.9.1
394
+
395
+ ### Patch Changes
396
+
397
+ - Fix internal `Future` interface naming from `middleware` -> `v8_middleware` ([#14327](https://github.com/remix-run/react-router/pull/14327))
398
+
399
+ ## 7.9.0
400
+
401
+ ### Minor Changes
402
+
403
+ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
404
+
405
+ We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
406
+
407
+ - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
408
+ - [`createContext`](https://reactrouter.com/api/utils/createContext)
409
+ - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
410
+ - `<HydratedRouter>` [`getContext`](https://reactrouter.com/api/framework-routers/HydratedRouter#getcontext) prop
411
+
412
+ Please see the [Middleware Docs](https://reactrouter.com/how-to/middleware), the [Middleware RFC](https://github.com/remix-run/remix/discussions/7642), and the [Client-side Context RFC](https://github.com/remix-run/react-router/discussions/9856) for more information.
413
+
414
+ ### Patch Changes
415
+
416
+ - Escape HTML in `meta()` JSON-LD content ([#14316](https://github.com/remix-run/react-router/pull/14316))
417
+ - Add react-server Await component implementation ([#14261](https://github.com/remix-run/react-router/pull/14261))
418
+ - In RSC Data Mode when using a custom basename, fix hydration errors for routes that only have client loaders ([#14264](https://github.com/remix-run/react-router/pull/14264))
419
+ - Make `href` function available in a react-server context ([#14262](https://github.com/remix-run/react-router/pull/14262))
420
+ - decode each time `getPayload()` is called to allow for "in-context" decoding and hoisting of contextual assets ([#14248](https://github.com/remix-run/react-router/pull/14248))
421
+ - `href()` now correctly processes routes that have an extension after the parameter or are a single optional parameter. ([#13797](https://github.com/remix-run/react-router/pull/13797))
422
+
423
+ ## 7.8.2
424
+
425
+ ### Patch Changes
426
+
427
+ - \[UNSTABLE] Remove Data Mode `future.unstable_middleware` flag from `createBrowserRouter` ([#14213](https://github.com/remix-run/react-router/pull/14213))
428
+ - This is only needed as a Framework Mode flag because of the route modules and the `getLoadContext` type behavior change
429
+ - In Data Mode, it's an opt-in feature because it's just a new property on a route object, so there's no behavior changes that necessitate a flag
430
+
431
+ - \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
432
+
433
+ - server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
434
+
435
+ - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
436
+
437
+ - Maintain `ReadonlyMap` and `ReadonlySet` types in server response data. ([#13092](https://github.com/remix-run/react-router/pull/13092))
438
+
439
+ - \[UNSTABLE] Delay serialization of `.data` redirects to 202 responses until after middleware chain ([#14205](https://github.com/remix-run/react-router/pull/14205))
440
+
441
+ - Fix `TypeError` if you throw from `patchRoutesOnNavigation` when no partial matches exist ([#14198](https://github.com/remix-run/react-router/pull/14198))
442
+
443
+ - Fix `basename` usage without a leading slash in data routers ([#11671](https://github.com/remix-run/react-router/pull/11671))
444
+
445
+ - \[UNSTABLE] Update client middleware so it returns the data strategy results allowing for more advanced post-processing middleware ([#14151](https://github.com/remix-run/react-router/pull/14151))
446
+
447
+ ## 7.8.1
448
+
449
+ ### Patch Changes
450
+
451
+ - Fix usage of optional path segments in nested routes defined using absolute paths ([#14135](https://github.com/remix-run/react-router/pull/14135))
452
+ - Bubble client pre-next middleware error to the shallowest ancestor that needs to load, not strictly the shallowest ancestor with a loader ([#14150](https://github.com/remix-run/react-router/pull/14150))
453
+ - Fix optional static segment matching in `matchPath` ([#11813](https://github.com/remix-run/react-router/pull/11813))
454
+ - Fix prerendering when a `basename` is set with `ssr:false` ([#13791](https://github.com/remix-run/react-router/pull/13791))
455
+ - Provide `isRouteErrorResponse` utility in `react-server` environments ([#14166](https://github.com/remix-run/react-router/pull/14166))
456
+ - Propagate non-redirect Responses thrown from middleware to the error boundary on document/data requests ([#14182](https://github.com/remix-run/react-router/pull/14182))
457
+ - Handle `meta` and `links` Route Exports in RSC Data Mode ([#14136](https://github.com/remix-run/react-router/pull/14136))
458
+ - Properly convert returned/thrown `data()` values to `Response` instances via `Response.json()` in resource routes and middleware ([#14159](https://github.com/remix-run/react-router/pull/14159), [#14181](https://github.com/remix-run/react-router/pull/14181))
459
+
460
+ ## 7.8.0
461
+
462
+ ### Minor Changes
463
+
464
+ - Add `nonce` prop to `Links` & `PrefetchPageLinks` ([#14048](https://github.com/remix-run/react-router/pull/14048))
465
+ - Add `loaderData` arguments/properties alongside existing `data` arguments/properties to provide consistency and clarity between `loaderData` and `actionData` across the board ([#14047](https://github.com/remix-run/react-router/pull/14047))
466
+ - Updated types: `Route.MetaArgs`, `Route.MetaMatch`, `MetaArgs`, `MetaMatch`, `Route.ComponentProps.matches`, `UIMatch`
467
+ - `@deprecated` warnings have been added to the existing `data` properties to point users to new `loaderData` properties, in preparation for removing the `data` properties in a future major release
468
+
469
+ ### Patch Changes
470
+
471
+ - Prevent _"Did not find corresponding fetcher result"_ console error when navigating during a `fetcher.submit` revalidation ([#14114](https://github.com/remix-run/react-router/pull/14114))
472
+
473
+ - Bubble client-side middleware errors prior to `next` to the appropriate ancestor error boundary ([#14138](https://github.com/remix-run/react-router/pull/14138))
474
+
475
+ - Switch Lazy Route Discovery manifest URL generation to usea standalone `URLSearchParams` instance instead of `URL.searchParams` to avoid a major performance bottleneck in Chrome ([#14084](https://github.com/remix-run/react-router/pull/14084))
476
+
477
+ - Adjust internal RSC usage of `React.use` to avoid Webpack compilation errors when using React 18 ([#14113](https://github.com/remix-run/react-router/pull/14113))
478
+
479
+ - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
480
+
481
+ - Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/12206))
482
+
483
+ - When an `ErrorBoundary` is being rendered, not all active matches will have loader data available, since it may have been their `loader` that threw to trigger the boundary
484
+ - The `UIMatch.data` type was not correctly handing this and would always reflect the presence of data, leading to the unexpected runtime errors when an `ErrorBoundary` was rendered
485
+ - ⚠️ This may cause some type errors to show up in your code for unguarded `match.data` accesses - you should properly guard for `undefined` values in those scenarios.
486
+
487
+ ```tsx
488
+ // app/root.tsx
489
+ export function loader() {
490
+ someFunctionThatThrows(); // ❌ Throws an Error
491
+ return { title: "My Title" };
492
+ }
493
+
494
+ export function Layout({ children }: { children: React.ReactNode }) {
495
+ let matches = useMatches();
496
+ let rootMatch = matches[0] as UIMatch<Awaited<ReturnType<typeof loader>>>;
497
+ // ^ rootMatch.data is incorrectly typed here, so TypeScript does not
498
+ // complain if you do the following which throws an error at runtime:
499
+ let { title } = rootMatch.data; // 💥
500
+
501
+ return <html>...</html>;
502
+ }
503
+ ```
504
+
505
+ - \[UNSTABLE] Ensure resource route errors go through `handleError` w/middleware enabled ([#14078](https://github.com/remix-run/react-router/pull/14078))
506
+
507
+ - \[UNSTABLE] Propagate returned Response from server middleware if next wasn't called ([#14093](https://github.com/remix-run/react-router/pull/14093))
508
+
509
+ - \[UNSTABLE] Allow server middlewares to return `data()` values which will be converted into a `Response` ([#14093](https://github.com/remix-run/react-router/pull/14093))
510
+
511
+ - \[UNSTABLE] Update middleware error handling so that the `next` function never throws and instead handles any middleware errors at the proper `ErrorBoundary` and returns the `Response` up through the ancestor `next` function ([#14118](https://github.com/remix-run/react-router/pull/14118))
512
+
513
+ - \[UNSTABLE] When middleware is enabled, make the `context` parameter read-only (via `Readonly<unstable_RouterContextProvider>`) so that TypeScript will not allow you to write arbitrary fields to it in loaders, actions, or middleware. ([#14097](https://github.com/remix-run/react-router/pull/14097))
514
+
515
+ - \[UNSTABLE] Rename and alter the signature/functionality of the `unstable_respond` API in `staticHandler.query`/`staticHandler.queryRoute` ([#14103](https://github.com/remix-run/react-router/pull/14103))
516
+
517
+ - The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
518
+ - The main functional change is that instead of running the loaders/actions before calling `unstable_respond` and handing you the result, we now pass a `query`/`queryRoute` function as a parameter and you execute the loaders/actions inside your callback, giving you full access to pre-processing and error handling
519
+ - The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
520
+ - The `queryRoute` version of the API now has a signature of `(queryRoute: (r: Request) => Promise<Response>) => Promise<Response>`
521
+ - This allows for more advanced usages such as running logic before/after calling `query` and direct error handling of errors thrown from query
522
+ - ⚠️ This is a breaking change if you've adopted the `staticHandler` `unstable_respond` API
523
+
524
+ ```tsx
525
+ let response = await staticHandler.query(request, {
526
+ requestContext: new unstable_RouterContextProvider(),
527
+ async unstable_generateMiddlewareResponse(query) {
528
+ try {
529
+ // At this point we've run middleware top-down so we need to call the
530
+ // handlers and generate the Response to bubble back up the middleware
531
+ let result = await query(request);
532
+ if (isResponse(result)) {
533
+ return result; // Redirects, etc.
534
+ }
535
+ return await generateHtmlResponse(result);
536
+ } catch (error: unknown) {
537
+ return generateErrorResponse(error);
538
+ }
539
+ },
540
+ });
541
+ ```
542
+
543
+ - \[UNSTABLE] Convert internal middleware implementations to use the new `unstable_generateMiddlewareResponse` API ([#14103](https://github.com/remix-run/react-router/pull/14103))
544
+
545
+ - \[UNSTABLE] Change `getLoadContext` signature (`type GetLoadContextFunction`) when `future.unstable_middleware` is enabled so that it returns an `unstable_RouterContextProvider` instance instead of a `Map` used to contruct the instance internally ([#14097](https://github.com/remix-run/react-router/pull/14097))
546
+ - This also removes the `type unstable_InitialContext` export
547
+ - ⚠️ This is a breaking change if you have adopted middleware and are using a custom server with a `getLoadContext` function
548
+
549
+ - \[UNSTABLE] Run client middleware on client navigations even if no loaders exist ([#14106](https://github.com/remix-run/react-router/pull/14106))
550
+
551
+ - \[UNSTABLE] Change the `unstable_getContext` signature on `RouterProvider`/`HydratedRouter`/`unstable_RSCHydratedRouter` so that it returns an `unstable_RouterContextProvider` instance instead of a `Map` used to contruct the instance internally ([#14097](https://github.com/remix-run/react-router/pull/14097))
552
+ - ⚠️ This is a breaking change if you have adopted the `unstable_getContext` prop
553
+
554
+ - \[UNSTABLE] proxy server action side-effect redirects from actions for document and callServer requests ([#14131](https://github.com/remix-run/react-router/pull/14131))
555
+
556
+ - \[UNSTABLE] Fix RSC Data Mode issue where routes that return `false` from `shouldRevalidate` would be replaced by an `<Outlet />` ([#14071](https://github.com/remix-run/react-router/pull/14071))
557
+
558
+ ## 7.7.1
559
+
560
+ ### Patch Changes
561
+
562
+ - In RSC Data Mode, fix bug where routes with errors weren't forced to revalidate when `shouldRevalidate` returned false ([#14026](https://github.com/remix-run/react-router/pull/14026))
563
+ - In RSC Data Mode, fix `Matched leaf route at location "/..." does not have an element or Component` warnings when error boundaries are rendered. ([#14021](https://github.com/remix-run/react-router/pull/14021))
564
+
565
+ ## 7.7.0
566
+
567
+ ### Minor Changes
568
+
569
+ - Add unstable RSC support ([#13700](https://github.com/remix-run/react-router/pull/13700))
570
+
571
+ For more information, see the [RSC documentation](https://reactrouter.com/start/rsc/installation).
572
+
573
+ ### Patch Changes
574
+
575
+ - Handle `InvalidCharacterError` when validating cookie signature ([#13847](https://github.com/remix-run/react-router/pull/13847))
576
+
577
+ - Pass a copy of `searchParams` to the `setSearchParams` callback function to avoid muations of the internal `searchParams` instance. This was an issue when navigations were blocked because the internal instance be out of sync with `useLocation().search`. ([#12784](https://github.com/remix-run/react-router/pull/12784))
578
+
579
+ - Support invalid `Date` in `turbo-stream` v2 fork ([#13684](https://github.com/remix-run/react-router/pull/13684))
580
+
581
+ - In Framework Mode, clear critical CSS in development after initial render ([#13872](https://github.com/remix-run/react-router/pull/13872))
582
+
583
+ - Strip search parameters from `patchRoutesOnNavigation` `path` param for fetcher calls ([#13911](https://github.com/remix-run/react-router/pull/13911))
584
+
585
+ - Skip scroll restoration on useRevalidator() calls because they're not new locations ([#13671](https://github.com/remix-run/react-router/pull/13671))
586
+
587
+ - Support unencoded UTF-8 routes in prerender config with `ssr` set to `false` ([#13699](https://github.com/remix-run/react-router/pull/13699))
588
+
589
+ - Do not throw if the url hash is not a valid URI component ([#13247](https://github.com/remix-run/react-router/pull/13247))
590
+
591
+ - Fix a regression in `createRoutesStub` introduced with the middleware feature. ([#13946](https://github.com/remix-run/react-router/pull/13946))
592
+
593
+ As part of that work we altered the signature to align with the new middleware APIs without making it backwards compatible with the prior `AppLoadContext` API. This permitted `createRoutesStub` to work if you were opting into middleware and the updated `context` typings, but broke `createRoutesStub` for users not yet opting into middleware.
594
+
595
+ We've reverted this change and re-implemented it in such a way that both sets of users can leverage it.
596
+
597
+ ```tsx
598
+ // If you have not opted into middleware, the old API should work again
599
+ let context: AppLoadContext = {
600
+ /*...*/
601
+ };
602
+ let Stub = createRoutesStub(routes, context);
603
+
604
+ // If you have opted into middleware, you should now pass an instantiated `unstable_routerContextProvider` instead of a `getContext` factory function.
605
+ let context = new unstable_RouterContextProvider();
606
+ context.set(SomeContext, someValue);
607
+ let Stub = createRoutesStub(routes, context);
608
+ ```
609
+
610
+ ⚠️ This may be a breaking bug for if you have adopted the unstable Middleware feature and are using `createRoutesStub` with the updated API.
611
+
612
+ - Remove `Content-Length` header from Single Fetch responses ([#13902](https://github.com/remix-run/react-router/pull/13902))
613
+
614
+ ## 7.6.3
615
+
616
+ ### Patch Changes
617
+
618
+ - Do not serialize types for `useRouteLoaderData<typeof clientLoader>` ([#13752](https://github.com/remix-run/react-router/pull/13752))
619
+
620
+ For types to distinguish a `clientLoader` from a `serverLoader`, you MUST annotate `clientLoader` args:
621
+
622
+ ```ts
623
+ // 👇 annotation required to skip serializing types
624
+ export function clientLoader({}: Route.ClientLoaderArgs) {
625
+ return { fn: () => "earth" };
626
+ }
627
+
628
+ function SomeComponent() {
629
+ const data = useRouteLoaderData<typeof clientLoader>("routes/this-route");
630
+ const planet = data?.fn() ?? "world";
631
+ return <h1>Hello, {planet}!</h1>;
632
+ }
633
+ ```
634
+
635
+ ## 7.6.2
636
+
637
+ ### Patch Changes
638
+
639
+ - Avoid additional `with-props` chunk in Framework Mode by moving route module component prop logic from the Vite plugin to `react-router` ([#13650](https://github.com/remix-run/react-router/pull/13650))
640
+ - Slight refactor of internal `headers()` function processing for use with RSC ([#13639](https://github.com/remix-run/react-router/pull/13639))
641
+
642
+ ## 7.6.1
643
+
644
+ ### Patch Changes
645
+
646
+ - Update `Route.MetaArgs` to reflect that `data` can be potentially `undefined` ([#13563](https://github.com/remix-run/react-router/pull/13563))
647
+
648
+ This is primarily for cases where a route `loader` threw an error to it's own `ErrorBoundary`. but it also arises in the case of a 404 which renders the root `ErrorBoundary`/`meta` but the root loader did not run because not routes matched.
649
+
650
+ - Partially revert optimization added in `7.1.4` to reduce calls to `matchRoutes` because it surfaced other issues ([#13562](https://github.com/remix-run/react-router/pull/13562))
651
+
652
+ - Fix typegen when same route is used at multiple paths ([#13574](https://github.com/remix-run/react-router/pull/13574))
653
+
654
+ For example, `routes/route.tsx` is used at 4 different paths here:
655
+
656
+ ```ts
657
+ import { type RouteConfig, route } from "@react-router/dev/routes";
658
+ export default [
659
+ route("base/:base", "routes/base.tsx", [
660
+ route("home/:home", "routes/route.tsx", { id: "home" }),
661
+ route("changelog/:changelog", "routes/route.tsx", { id: "changelog" }),
662
+ route("splat/*", "routes/route.tsx", { id: "splat" }),
663
+ ]),
664
+ route("other/:other", "routes/route.tsx", { id: "other" }),
665
+ ] satisfies RouteConfig;
666
+ ```
667
+
668
+ Previously, typegen would arbitrarily pick one of these paths to be the "winner" and generate types for the route module based on that path.
669
+ Now, typegen creates unions as necessary for alternate paths for the same route file.
670
+
671
+ - Better types for `params` ([#13543](https://github.com/remix-run/react-router/pull/13543))
672
+
673
+ For example:
674
+
675
+ ```ts
676
+ // routes.ts
677
+ import { type RouteConfig, route } from "@react-router/dev/routes";
678
+
679
+ export default [
680
+ route("parent/:p", "routes/parent.tsx", [
681
+ route("layout/:l", "routes/layout.tsx", [
682
+ route("child1/:c1a/:c1b", "routes/child1.tsx"),
683
+ route("child2/:c2a/:c2b", "routes/child2.tsx"),
684
+ ]),
685
+ ]),
686
+ ] satisfies RouteConfig;
687
+ ```
688
+
689
+ Previously, `params` for the `routes/layout.tsx` route were calculated as `{ p: string, l: string }`.
690
+ This incorrectly ignores params that could come from child routes.
691
+ If visiting `/parent/1/layout/2/child1/3/4`, the actual params passed to `routes/layout.tsx` will have a type of `{ p: string, l: string, c1a: string, c1b: string }`.
692
+
693
+ Now, `params` are aware of child routes and autocompletion will include child params as optionals:
694
+
695
+ ```ts
696
+ params.|
697
+ // ^ cursor is here and you ask for autocompletion
698
+ // p: string
699
+ // l: string
700
+ // c1a?: string
701
+ // c1b?: string
702
+ // c2a?: string
703
+ // c2b?: string
704
+ ```
705
+
706
+ You can also narrow the types for `params` as it is implemented as a normalized union of params for each page that includes `routes/layout.tsx`:
707
+
708
+ ```ts
709
+ if (typeof params.c1a === 'string') {
710
+ params.|
711
+ // ^ cursor is here and you ask for autocompletion
712
+ // p: string
713
+ // l: string
714
+ // c1a: string
715
+ // c1b: string
716
+ }
717
+ ```
718
+
719
+ ***
720
+
721
+ UNSTABLE: renamed internal `react-router/route-module` export to `react-router/internal`
722
+ UNSTABLE: removed `Info` export from generated `+types/*` files
723
+
724
+ - Avoid initial fetcher execution 404 error when Lazy Route Discovery is interrupted by a navigation ([#13564](https://github.com/remix-run/react-router/pull/13564))
725
+
726
+ - href replaces splats `*` ([#13593](https://github.com/remix-run/react-router/pull/13593))
727
+
728
+ ```ts
729
+ const a = href("/products/*", { "*": "/1/edit" });
730
+ // -> /products/1/edit
731
+ ```
732
+
733
+ ## 7.6.0
734
+
735
+ ### Minor Changes
736
+
737
+ - Added a new `react-router.config.ts` `routeDiscovery` option to configure Lazy Route Discovery behavior. ([#13451](https://github.com/remix-run/react-router/pull/13451))
738
+ - By default, Lazy Route Discovery is enabled and makes manifest requests to the `/__manifest` path:
739
+ - `routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }`
740
+ - You can modify the manifest path used:
741
+ - `routeDiscovery: { mode: "lazy", manifestPath: "/custom-manifest" }`
742
+ - Or you can disable this feature entirely and include all routes in the manifest on initial document load:
743
+ - `routeDiscovery: { mode: "initial" }`
744
+
745
+ - Add support for route component props in `createRoutesStub`. This allows you to unit test your route components using the props instead of the hooks: ([#13528](https://github.com/remix-run/react-router/pull/13528))
746
+
747
+ ```tsx
748
+ let RoutesStub = createRoutesStub([
749
+ {
750
+ path: "/",
751
+ Component({ loaderData }) {
752
+ let data = loaderData as { message: string };
753
+ return <pre data-testid="data">Message: {data.message}</pre>;
754
+ },
755
+ loader() {
756
+ return { message: "hello" };
757
+ },
758
+ },
759
+ ]);
760
+
761
+ render(<RoutesStub />);
762
+
763
+ await waitFor(() => screen.findByText("Message: hello"));
764
+ ```
765
+
766
+ ### Patch Changes
767
+
768
+ - Fix `react-router` module augmentation for `NodeNext` ([#13498](https://github.com/remix-run/react-router/pull/13498))
769
+
770
+ - Don't bundle `react-router` in `react-router/dom` CJS export ([#13497](https://github.com/remix-run/react-router/pull/13497))
771
+
772
+ - Fix bug where a submitting `fetcher` would get stuck in a `loading` state if a revalidating `loader` redirected ([#12873](https://github.com/remix-run/react-router/pull/12873))
773
+
774
+ - Fix hydration error if a server `loader` returned `undefined` ([#13496](https://github.com/remix-run/react-router/pull/13496))
775
+
776
+ - Fix initial load 404 scenarios in data mode ([#13500](https://github.com/remix-run/react-router/pull/13500))
777
+
778
+ - Stabilize `useRevalidator`'s `revalidate` function ([#13542](https://github.com/remix-run/react-router/pull/13542))
779
+
780
+ - Preserve status code if a `clientAction` throws a `data()` result in framework mode ([#13522](https://github.com/remix-run/react-router/pull/13522))
781
+
782
+ - Be defensive against leading double slashes in paths to avoid `Invalid URL` errors from the URL constructor ([#13510](https://github.com/remix-run/react-router/pull/13510))
783
+ - Note we do not sanitize/normalize these paths - we only detect them so we can avoid the error that would be thrown by `new URL("//", window.location.origin)`
784
+
785
+ - Remove `Navigator` declaration for `navigator.connection.saveData` to avoid messing with any other types beyond `saveData` in userland ([#13512](https://github.com/remix-run/react-router/pull/13512))
786
+
787
+ - Fix `handleError` `params` values on `.data` requests for routes with a dynamic param as the last URL segment ([#13481](https://github.com/remix-run/react-router/pull/13481))
788
+
789
+ - Don't trigger an `ErrorBoundary` UI before the reload when we detect a manifest verison mismatch in Lazy Route Discovery ([#13480](https://github.com/remix-run/react-router/pull/13480))
790
+
791
+ - Inline `turbo-stream@2.4.1` dependency and fix decoding ordering of Map/Set instances ([#13518](https://github.com/remix-run/react-router/pull/13518))
792
+
793
+ - Only render dev warnings in DEV mode ([#13461](https://github.com/remix-run/react-router/pull/13461))
794
+
795
+ - UNSTABLE: Fix a few bugs with error bubbling in middleware use-cases ([#13538](https://github.com/remix-run/react-router/pull/13538))
796
+
797
+ - Short circuit post-processing on aborted `dataStrategy` requests ([#13521](https://github.com/remix-run/react-router/pull/13521))
798
+ - This resolves non-user-facing console errors of the form `Cannot read properties of undefined (reading 'result')`
799
+
800
+ ## 7.5.3
801
+
802
+ ### Patch Changes
803
+
804
+ - Fix bug where bubbled action errors would result in `loaderData` being cleared at the handling `ErrorBoundary` route ([#13476](https://github.com/remix-run/react-router/pull/13476))
805
+ - Handle redirects from `clientLoader.hydrate` initial load executions ([#13477](https://github.com/remix-run/react-router/pull/13477))
806
+
807
+ ## 7.5.2
808
+
809
+ ### Patch Changes
810
+
811
+ - Update Single Fetch to also handle the 204 redirects used in `?_data` requests in Remix v2 ([#13364](https://github.com/remix-run/react-router/pull/13364))
812
+ - This allows applications to return a redirect on `.data` requests from outside the scope of React Router (i.e., an `express`/`hono` middleware)
813
+ - ⚠️ Please note that doing so relies on implementation details that are subject to change without a SemVer major release
814
+ - This is primarily done to ease upgrading to Single Fetch for existing Remix v2 applications, but the recommended way to handle this is redirecting from a route middleware
815
+
816
+ - Adjust approach for Prerendering/SPA Mode via headers ([#13453](https://github.com/remix-run/react-router/pull/13453))
817
+
818
+ ## 7.5.1
819
+
820
+ ### Patch Changes
821
+
822
+ - Fix single fetch bug where no revalidation request would be made when navigating upwards to a reused parent route ([#13253](https://github.com/remix-run/react-router/pull/13253))
823
+
824
+ - When using the object-based `route.lazy` API, the `HydrateFallback` and `hydrateFallbackElement` properties are now skipped when lazy loading routes after hydration. ([#13376](https://github.com/remix-run/react-router/pull/13376))
825
+
826
+ If you move the code for these properties into a separate file, you can use this optimization to avoid downloading unused hydration code. For example:
827
+
828
+ ```ts
829
+ createBrowserRouter([
830
+ {
831
+ path: "/show/:showId",
832
+ lazy: {
833
+ loader: async () => (await import("./show.loader.js")).loader,
834
+ Component: async () => (await import("./show.component.js")).Component,
835
+ HydrateFallback: async () =>
836
+ (await import("./show.hydrate-fallback.js")).HydrateFallback,
837
+ },
838
+ },
839
+ ]);
840
+ ```
841
+
842
+ - Properly revalidate prerendered paths when param values change ([#13380](https://github.com/remix-run/react-router/pull/13380))
843
+
844
+ - UNSTABLE: Add a new `unstable_runClientMiddleware` argument to `dataStrategy` to enable middleware execution in custom `dataStrategy` implementations ([#13395](https://github.com/remix-run/react-router/pull/13395))
845
+
846
+ - UNSTABLE: Add better error messaging when `getLoadContext` is not updated to return a `Map`" ([#13242](https://github.com/remix-run/react-router/pull/13242))
847
+
848
+ - Do not automatically add `null` to `staticHandler.query()` `context.loaderData` if routes do not have loaders ([#13223](https://github.com/remix-run/react-router/pull/13223))
849
+ - This was a Remix v2 implementation detail inadvertently left in for React Router v7
850
+ - Now that we allow returning `undefined` from loaders, our prior check of `loaderData[routeId] !== undefined` was no longer sufficient and was changed to a `routeId in loaderData` check - these `null` values can cause issues for this new check
851
+ - ⚠️ This could be a "breaking bug fix" for you if you are doing manual SSR with `createStaticHandler()`/`<StaticRouterProvider>`, and using `context.loaderData` to control `<RouterProvider>` hydration behavior on the client
852
+
853
+ - Fix prerendering when a loader returns a redirect ([#13365](https://github.com/remix-run/react-router/pull/13365))
854
+
855
+ - UNSTABLE: Update context type for `LoaderFunctionArgs`/`ActionFunctionArgs` when middleware is enabled ([#13381](https://github.com/remix-run/react-router/pull/13381))
856
+
857
+ - Add support for the new `unstable_shouldCallHandler`/`unstable_shouldRevalidateArgs` APIs in `dataStrategy` ([#13253](https://github.com/remix-run/react-router/pull/13253))
858
+
859
+ ## 7.5.0
860
+
861
+ ### Minor Changes
862
+
863
+ - Add granular object-based API for `route.lazy` to support lazy loading of individual route properties, for example: ([#13294](https://github.com/remix-run/react-router/pull/13294))
864
+
865
+ ```ts
866
+ createBrowserRouter([
867
+ {
868
+ path: "/show/:showId",
869
+ lazy: {
870
+ loader: async () => (await import("./show.loader.js")).loader,
871
+ action: async () => (await import("./show.action.js")).action,
872
+ Component: async () => (await import("./show.component.js")).Component,
873
+ },
874
+ },
875
+ ]);
876
+ ```
877
+
878
+ **Breaking change for `route.unstable_lazyMiddleware` consumers**
879
+
880
+ The `route.unstable_lazyMiddleware` property is no longer supported. If you want to lazily load middleware, you must use the new object-based `route.lazy` API with `route.lazy.unstable_middleware`, for example:
881
+
882
+ ```ts
883
+ createBrowserRouter([
884
+ {
885
+ path: "/show/:showId",
886
+ lazy: {
887
+ unstable_middleware: async () =>
888
+ (await import("./show.middleware.js")).middleware,
889
+ // etc.
890
+ },
891
+ },
892
+ ]);
893
+ ```
894
+
895
+ ### Patch Changes
896
+
897
+ - Introduce `unstable_subResourceIntegrity` future flag that enables generation of an importmap with integrity for the scripts that will be loaded by the browser. ([#13163](https://github.com/remix-run/react-router/pull/13163))
898
+
899
+ ## 7.4.1
900
+
901
+ ### Patch Changes
902
+
903
+ - Fix types on `unstable_MiddlewareFunction` to avoid type errors when a middleware doesn't return a value ([#13311](https://github.com/remix-run/react-router/pull/13311))
904
+ - Dedupe calls to `route.lazy` functions ([#13260](https://github.com/remix-run/react-router/pull/13260))
905
+ - Add support for `route.unstable_lazyMiddleware` function to allow lazy loading of middleware logic. ([#13210](https://github.com/remix-run/react-router/pull/13210))
906
+
907
+ **Breaking change for `unstable_middleware` consumers**
908
+
909
+ The `route.unstable_middleware` property is no longer supported in the return value from `route.lazy`. If you want to lazily load middleware, you must use `route.unstable_lazyMiddleware`.
910
+
911
+ ## 7.4.0
912
+
913
+ ### Patch Changes
914
+
915
+ - Fix root loader data on initial load redirects in SPA mode ([#13222](https://github.com/remix-run/react-router/pull/13222))
916
+ - Load ancestor pathless/index routes in lazy route discovery for upwards non-eager-discoery routing ([#13203](https://github.com/remix-run/react-router/pull/13203))
917
+ - Fix `shouldRevalidate` behavior for `clientLoader`-only routes in `ssr:true` apps ([#13221](https://github.com/remix-run/react-router/pull/13221))
918
+ - UNSTABLE: Fix `RequestHandler` `loadContext` parameter type when middleware is enabled ([#13204](https://github.com/remix-run/react-router/pull/13204))
919
+ - UNSTABLE: Update `Route.unstable_MiddlewareFunction` to have a return value of `Response | undefined` instead of `Response | void` becaue you should not return anything if you aren't returning the `Response` ([#13199](https://github.com/remix-run/react-router/pull/13199))
920
+ - UNSTABLE(BREAKING): If a middleware throws an error, ensure we only bubble the error itself via `next()` and are no longer leaking the `MiddlewareError` implementation detail ([#13180](https://github.com/remix-run/react-router/pull/13180))
921
+
922
+ ## 7.3.0
923
+
924
+ ### Minor Changes
925
+
926
+ - Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#13061](https://github.com/remix-run/react-router/pull/13061))
927
+ - In framework mode, Lazy Route Discovery will now detect manifest version mismatches after a new deploy
928
+ - On navigations to undiscovered routes, this mismatch will trigger a document reload of the destination path
929
+ - On `fetcher` calls to undiscovered routes, this mismatch will trigger a document reload of the current path
930
+
931
+ ### Patch Changes
932
+
933
+ - Skip resource route flow in dev server in SPA mode ([#13113](https://github.com/remix-run/react-router/pull/13113))
934
+
935
+ - Support middleware on routes (unstable) ([#12941](https://github.com/remix-run/react-router/pull/12941))
936
+
937
+ Middleware is implemented behind a `future.unstable_middleware` flag. To enable, you must enable the flag and the types in your `react-router-config.ts` file:
938
+
939
+ ```ts
940
+ import type { Config } from "@react-router/dev/config";
941
+ import type { Future } from "react-router";
942
+
943
+ declare module "react-router" {
944
+ interface Future {
945
+ unstable_middleware: true; // 👈 Enable middleware types
946
+ }
947
+ }
948
+
949
+ export default {
950
+ future: {
951
+ unstable_middleware: true, // 👈 Enable middleware
952
+ },
953
+ } satisfies Config;
954
+ ```
955
+
956
+ ⚠️ Middleware is unstable and should not be adopted in production. There is at least one known de-optimization in route module loading for `clientMiddleware` that we will be addressing this before a stable release.
957
+
958
+ ⚠️ Enabling middleware contains a breaking change to the `context` parameter passed to your `loader`/`action` functions - see below for more information.
959
+
960
+ Once enabled, routes can define an array of middleware functions that will run sequentially before route handlers run. These functions accept the same parameters as `loader`/`action` plus an additional `next` parameter to run the remaining data pipeline. This allows middlewares to perform logic before and after handlers execute.
961
+
962
+ ```tsx
963
+ // Framework mode
964
+ export const unstable_middleware = [serverLogger, serverAuth]; // server
965
+ export const unstable_clientMiddleware = [clientLogger]; // client
966
+
967
+ // Library mode
968
+ const routes = [
969
+ {
970
+ path: "/",
971
+ // Middlewares are client-side for library mode SPA's
972
+ unstable_middleware: [clientLogger, clientAuth],
973
+ loader: rootLoader,
974
+ Component: Root,
975
+ },
976
+ ];
977
+ ```
978
+
979
+ Here's a simple example of a client-side logging middleware that can be placed on the root route:
980
+
981
+ ```tsx
982
+ const clientLogger: Route.unstable_ClientMiddlewareFunction = async (
983
+ { request },
984
+ next,
985
+ ) => {
986
+ let start = performance.now();
987
+
988
+ // Run the remaining middlewares and all route loaders
989
+ await next();
990
+
991
+ let duration = performance.now() - start;
992
+ console.log(`Navigated to ${request.url} (${duration}ms)`);
993
+ };
994
+ ```
995
+
996
+ Note that in the above example, the `next`/`middleware` functions don't return anything. This is by design as on the client there is no "response" to send over the network like there would be for middlewares running on the server. The data is all handled behind the scenes by the stateful `router`.
997
+
998
+ For a server-side middleware, the `next` function will return the HTTP `Response` that React Router will be sending across the wire, thus giving you a chance to make changes as needed. You may throw a new response to short circuit and respond immediately, or you may return a new or altered response to override the default returned by `next()`.
999
+
1000
+ ```tsx
1001
+ const serverLogger: Route.unstable_MiddlewareFunction = async (
1002
+ { request, params, context },
1003
+ next,
1004
+ ) => {
1005
+ let start = performance.now();
1006
+
1007
+ // 👇 Grab the response here
1008
+ let res = await next();
1009
+
1010
+ let duration = performance.now() - start;
1011
+ console.log(`Navigated to ${request.url} (${duration}ms)`);
1012
+
1013
+ // 👇 And return it here (optional if you don't modify the response)
1014
+ return res;
1015
+ };
1016
+ ```
1017
+
1018
+ You can throw a `redirect` from a middleware to short circuit any remaining processing:
1019
+
1020
+ ```tsx
1021
+ import { sessionContext } from "../context";
1022
+ const serverAuth: Route.unstable_MiddlewareFunction = (
1023
+ { request, params, context },
1024
+ next,
1025
+ ) => {
1026
+ let session = context.get(sessionContext);
1027
+ let user = session.get("user");
1028
+ if (!user) {
1029
+ session.set("returnTo", request.url);
1030
+ throw redirect("/login", 302);
1031
+ }
1032
+ };
1033
+ ```
1034
+
1035
+ _Note that in cases like this where you don't need to do any post-processing you don't need to call the `next` function or return a `Response`._
1036
+
1037
+ Here's another example of using a server middleware to detect 404s and check the CMS for a redirect:
1038
+
1039
+ ```tsx
1040
+ const redirects: Route.unstable_MiddlewareFunction = async ({
1041
+ request,
1042
+ next,
1043
+ }) => {
1044
+ // attempt to handle the request
1045
+ let res = await next();
1046
+
1047
+ // if it's a 404, check the CMS for a redirect, do it last
1048
+ // because it's expensive
1049
+ if (res.status === 404) {
1050
+ let cmsRedirect = await checkCMSRedirects(request.url);
1051
+ if (cmsRedirect) {
1052
+ throw redirect(cmsRedirect, 302);
1053
+ }
1054
+ }
1055
+
1056
+ return res;
1057
+ };
1058
+ ```
1059
+
1060
+ **`context` parameter**
1061
+
1062
+ When middleware is enabled, your application will use a different type of `context` parameter in your loaders and actions to provide better type safety. Instead of `AppLoadContext`, `context` will now be an instance of `ContextProvider` that you can use with type-safe contexts (similar to `React.createContext`):
1063
+
1064
+ ```ts
1065
+ import { unstable_createContext } from "react-router";
1066
+ import { Route } from "./+types/root";
1067
+ import type { Session } from "./sessions.server";
1068
+ import { getSession } from "./sessions.server";
1069
+
1070
+ let sessionContext = unstable_createContext<Session>();
1071
+
1072
+ const sessionMiddleware: Route.unstable_MiddlewareFunction = ({
1073
+ context,
1074
+ request,
1075
+ }) => {
1076
+ let session = await getSession(request);
1077
+ context.set(sessionContext, session);
1078
+ // ^ must be of type Session
1079
+ };
1080
+
1081
+ // ... then in some downstream middleware
1082
+ const loggerMiddleware: Route.unstable_MiddlewareFunction = ({
1083
+ context,
1084
+ request,
1085
+ }) => {
1086
+ let session = context.get(sessionContext);
1087
+ // ^ typeof Session
1088
+ console.log(session.get("userId"), request.method, request.url);
1089
+ };
1090
+
1091
+ // ... or some downstream loader
1092
+ export function loader({ context }: Route.LoaderArgs) {
1093
+ let session = context.get(sessionContext);
1094
+ let profile = await getProfile(session.get("userId"));
1095
+ return { profile };
1096
+ }
1097
+ ```
1098
+
1099
+ If you are using a custom server with a `getLoadContext` function, the return value for initial context values passed from the server adapter layer is no longer an object and should now return an `unstable_InitialContext` (`Map<RouterContext, unknown>`):
1100
+
1101
+ ```ts
1102
+ let adapterContext = unstable_createContext<MyAdapterContext>();
1103
+
1104
+ function getLoadContext(req, res): unstable_InitialContext {
1105
+ let map = new Map();
1106
+ map.set(adapterContext, getAdapterContext(req));
1107
+ return map;
1108
+ }
1109
+ ```
1110
+
1111
+ - Fix types for loaderData and actionData that contained `Record`s ([#13139](https://github.com/remix-run/react-router/pull/13139))
1112
+
1113
+ UNSTABLE(BREAKING):
1114
+
1115
+ `unstable_SerializesTo` added a way to register custom serialization types in Single Fetch for other library and framework authors like Apollo.
1116
+ It was implemented with branded type whose branded property that was made optional so that casting arbitrary values was easy:
1117
+
1118
+ ```ts
1119
+ // without the brand being marked as optional
1120
+ let x1 = 42 as unknown as unstable_SerializesTo<number>;
1121
+ // ^^^^^^^^^^
1122
+
1123
+ // with the brand being marked as optional
1124
+ let x2 = 42 as unstable_SerializesTo<number>;
1125
+ ```
1126
+
1127
+ However, this broke type inference in `loaderData` and `actionData` for any `Record` types as those would now (incorrectly) match `unstable_SerializesTo`.
1128
+ This affected all users, not just those that depended on `unstable_SerializesTo`.
1129
+ To fix this, the branded property of `unstable_SerializesTo` is marked as required instead of optional.
1130
+
1131
+ For library and framework authors using `unstable_SerializesTo`, you may need to add `as unknown` casts before casting to `unstable_SerializesTo`.
1132
+
1133
+ - Fix single fetch `_root.data` requests when a `basename` is used ([#12898](https://github.com/remix-run/react-router/pull/12898))
1134
+
1135
+ - Add `context` support to client side data routers (unstable) ([#12941](https://github.com/remix-run/react-router/pull/12941))
1136
+
1137
+ Your application `loader` and `action` functions on the client will now receive a `context` parameter. This is an instance of `unstable_RouterContextProvider` that you use with type-safe contexts (similar to `React.createContext`) and is most useful with the corresponding `middleware`/`clientMiddleware` API's:
1138
+
1139
+ ```ts
1140
+ import { unstable_createContext } from "react-router";
1141
+
1142
+ type User = {
1143
+ /*...*/
1144
+ };
1145
+
1146
+ let userContext = unstable_createContext<User>();
1147
+
1148
+ function sessionMiddleware({ context }) {
1149
+ let user = await getUser();
1150
+ context.set(userContext, user);
1151
+ }
1152
+
1153
+ // ... then in some downstream loader
1154
+ function loader({ context }) {
1155
+ let user = context.get(userContext);
1156
+ let profile = await getProfile(user.id);
1157
+ return { profile };
1158
+ }
1159
+ ```
1160
+
1161
+ Similar to server-side requests, a fresh `context` will be created per navigation (or `fetcher` call). If you have initial data you'd like to populate in the context for every request, you can provide an `unstable_getContext` function at the root of your app:
1162
+
1163
+ - Library mode - `createBrowserRouter(routes, { unstable_getContext })`
1164
+ - Framework mode - `<HydratedRouter unstable_getContext>`
1165
+
1166
+ This function should return an value of type `unstable_InitialContext` which is a `Map<unstable_RouterContext, unknown>` of context's and initial values:
1167
+
1168
+ ```ts
1169
+ const loggerContext = unstable_createContext<(...args: unknown[]) => void>();
1170
+
1171
+ function logger(...args: unknown[]) {
1172
+ console.log(new Date.toISOString(), ...args);
1173
+ }
1174
+
1175
+ function unstable_getContext() {
1176
+ let map = new Map();
1177
+ map.set(loggerContext, logger);
1178
+ return map;
1179
+ }
1180
+ ```
1181
+
1182
+ ## 7.2.0
1183
+
1184
+ ### Minor Changes
1185
+
1186
+ - New type-safe `href` utility that guarantees links point to actual paths in your app ([#13012](https://github.com/remix-run/react-router/pull/13012))
1187
+
1188
+ ```tsx
1189
+ import { href } from "react-router";
1190
+
1191
+ export default function Component() {
1192
+ const link = href("/blog/:slug", { slug: "my-first-post" });
1193
+ return (
1194
+ <main>
1195
+ <Link to={href("/products/:id", { id: "asdf" })} />
1196
+ <NavLink to={href("/:lang?/about", { lang: "en" })} />
1197
+ </main>
1198
+ );
1199
+ }
1200
+ ```
1201
+
1202
+ ### Patch Changes
1203
+
1204
+ - Fix typegen for repeated params ([#13012](https://github.com/remix-run/react-router/pull/13012))
1205
+
1206
+ In React Router, path parameters are keyed by their name.
1207
+ So for a path pattern like `/a/:id/b/:id?/c/:id`, the last `:id` will set the value for `id` in `useParams` and the `params` prop.
1208
+ For example, `/a/1/b/2/c/3` will result in the value `{ id: 3 }` at runtime.
1209
+
1210
+ Previously, generated types for params incorrectly modeled repeated params with an array.
1211
+ So `/a/1/b/2/c/3` generated a type like `{ id: [1,2,3] }`.
1212
+
1213
+ To be consistent with runtime behavior, the generated types now correctly model the "last one wins" semantics of path parameters.
1214
+ So `/a/1/b/2/c/3` now generates a type like `{ id: 3 }`.
1215
+
1216
+ - Don't apply Single Fetch revalidation de-optimization when in SPA mode since there is no server HTTP request ([#12948](https://github.com/remix-run/react-router/pull/12948))
1217
+
1218
+ - Properly handle revalidations to across a prerender/SPA boundary ([#13021](https://github.com/remix-run/react-router/pull/13021))
1219
+ - In "hybrid" applications where some routes are pre-rendered and some are served from a SPA fallback, we need to avoid making `.data` requests if the path wasn't pre-rendered because the request will 404
1220
+ - We don't know all the pre-rendered paths client-side, however:
1221
+ - All `loader` data in `ssr:false` mode is static because it's generated at build time
1222
+ - A route must use a `clientLoader` to do anything dynamic
1223
+ - Therefore, if a route only has a `loader` and not a `clientLoader`, we disable revalidation by default because there is no new data to retrieve
1224
+ - We short circuit and skip single fetch `.data` request logic if there are no server loaders with `shouldLoad=true` in our single fetch `dataStrategy`
1225
+ - This ensures that the route doesn't cause a `.data` request that would 404 after a submission
1226
+
1227
+ - Error at build time in `ssr:false` + `prerender` apps for the edge case scenario of: ([#13021](https://github.com/remix-run/react-router/pull/13021))
1228
+ - A parent route has only a `loader` (does not have a `clientLoader`)
1229
+ - The parent route is pre-rendered
1230
+ - The parent route has children routes which are not prerendered
1231
+ - This means that when the child paths are loaded via the SPA fallback, the parent won't have any `loaderData` because there is no server on which to run the `loader`
1232
+ - This can be resolved by either adding a parent `clientLoader` or pre-rendering the child paths
1233
+ - If you add a `clientLoader`, calling the `serverLoader()` on non-prerendered paths will throw a 404
1234
+
1235
+ - Add unstable support for splitting route modules in framework mode via `future.unstable_splitRouteModules` ([#11871](https://github.com/remix-run/react-router/pull/11871))
1236
+
1237
+ - Add `unstable_SerializesTo` brand type for library authors to register types serializable by React Router's streaming format (`turbo-stream`) ([`ab5b05b02`](https://github.com/remix-run/react-router/commit/ab5b05b02f99f062edb3c536c392197c88eb6c77))
1238
+
1239
+ - Align dev server behavior with static file server behavior when `ssr:false` is set ([#12948](https://github.com/remix-run/react-router/pull/12948))
1240
+ - When no `prerender` config exists, only SSR down to the root `HydrateFallback` (SPA Mode)
1241
+ - When a `prerender` config exists but the current path is not prerendered, only SSR down to the root `HydrateFallback` (SPA Fallback)
1242
+ - Return a 404 on `.data` requests to non-pre-rendered paths
1243
+
1244
+ - Improve prefetch performance of CSS side effects in framework mode ([#12889](https://github.com/remix-run/react-router/pull/12889))
1245
+
1246
+ - Disable Lazy Route Discovery for all `ssr:false` apps and not just "SPA Mode" because there is no runtime server to serve the search-param-configured `__manifest` requests ([#12894](https://github.com/remix-run/react-router/pull/12894))
1247
+ - We previously only disabled this for "SPA Mode" which is `ssr:false` and no `prerender` config but we realized it should apply to all `ssr:false` apps, including those prerendering multiple pages
1248
+ - In those `prerender` scenarios we would prerender the `/__manifest` file assuming the static file server would serve it but that makes some unneccesary assumptions about the static file server behaviors
1249
+
1250
+ - Properly handle interrupted manifest requests in lazy route discovery ([#12915](https://github.com/remix-run/react-router/pull/12915))
1251
+
1252
+ ## 7.1.5
1253
+
1254
+ ### Patch Changes
1255
+
1256
+ - Fix regression introduced in `7.1.4` via [#12800](https://github.com/remix-run/react-router/pull/12800) that caused issues navigating to hash routes inside splat routes for applications using Lazy Route Discovery (`patchRoutesOnNavigation`) ([#12927](https://github.com/remix-run/react-router/pull/12927))
1257
+
1258
+ ## 7.1.4
1259
+
1260
+ ### Patch Changes
1261
+
1262
+ - Internal reorg to clean up some duplicated route module types ([#12799](https://github.com/remix-run/react-router/pull/12799))
1263
+ - Properly handle status codes that cannot have a body in single fetch responses (204, etc.) ([#12760](https://github.com/remix-run/react-router/pull/12760))
1264
+ - Stop erroring on resource routes that return raw strings/objects and instead serialize them as `text/plain` or `application/json` responses ([#12848](https://github.com/remix-run/react-router/pull/12848))
1265
+ - This only applies when accessed as a resource route without the `.data` extension
1266
+ - When accessed from a Single Fetch `.data` request, they will still be encoded via `turbo-stream`
1267
+ - Optimize Lazy Route Discovery path discovery to favor a single `querySelectorAll` call at the `body` level instead of many calls at the sub-tree level ([#12731](https://github.com/remix-run/react-router/pull/12731))
1268
+ - Properly bubble headers as `errorHeaders` when throwing a `data()` result ([#12846](https://github.com/remix-run/react-router/pull/12846))
1269
+ - Avoid duplication of `Set-Cookie` headers could be duplicated if also returned from `headers`
1270
+ - Optimize route matching by skipping redundant `matchRoutes` calls when possible ([#12800](https://github.com/remix-run/react-router/pull/12800))
1271
+
1272
+ ## 7.1.3
1273
+
1274
+ _No changes_
1275
+
1276
+ ## 7.1.2
1277
+
1278
+ ### Patch Changes
1279
+
1280
+ - Fix issue with fetcher data cleanup in the data layer on fetcher unmount ([#12681](https://github.com/remix-run/react-router/pull/12681))
1281
+ - Do not rely on `symbol` for filtering out `redirect` responses from loader data ([#12694](https://github.com/remix-run/react-router/pull/12694))
1282
+
1283
+ Previously, some projects were getting type checking errors like:
1284
+
1285
+ ```ts
1286
+ error TS4058: Return type of exported function has or is using name 'redirectSymbol' from external module "node_modules/..." but cannot be named.
1287
+ ```
1288
+
1289
+ Now that `symbol`s are not used for the `redirect` response type, these errors should no longer be present.
1290
+
1291
+ ## 7.1.1
1292
+
1293
+ _No changes_
1294
+
1295
+ ## 7.1.0
1296
+
1297
+ ### Patch Changes
1298
+
1299
+ - Throw unwrapped single fetch redirect to align with pre-single fetch behavior ([#12506](https://github.com/remix-run/react-router/pull/12506))
1300
+ - Ignore redirects when inferring loader data types ([#12527](https://github.com/remix-run/react-router/pull/12527))
1301
+ - Remove `<Link prefetch>` warning which suffers from false positives in a lazy route discovery world ([#12485](https://github.com/remix-run/react-router/pull/12485))
1302
+
1303
+ ## 7.0.2
1304
+
1305
+ ### Patch Changes
1306
+
1307
+ - temporarily only use one build in export map so packages can have a peer dependency on react router ([#12437](https://github.com/remix-run/react-router/pull/12437))
1308
+ - Generate wide `matches` and `params` types for current route and child routes ([#12397](https://github.com/remix-run/react-router/pull/12397))
1309
+
1310
+ At runtime, `matches` includes child route matches and `params` include child route path parameters.
1311
+ But previously, we only generated types for parent routes in `matches`; for `params`, we only considered the parent routes and the current route.
1312
+ To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information.
1313
+
1314
+ ## 7.0.1
1315
+
1316
+ _No changes_
1317
+
1318
+ ## 7.0.0
1319
+
1320
+ ### Major Changes
1321
+
1322
+ - Remove the original `defer` implementation in favor of using raw promises via single fetch and `turbo-stream`. This removes these exports from React Router: ([#11744](https://github.com/remix-run/react-router/pull/11744))
1323
+ - `defer`
1324
+ - `AbortedDeferredError`
1325
+ - `type TypedDeferredData`
1326
+ - `UNSAFE_DeferredData`
1327
+ - `UNSAFE_DEFERRED_SYMBOL`,
1328
+
1329
+ - - Collapse `@remix-run/router` into `react-router` ([#11505](https://github.com/remix-run/react-router/pull/11505))
1330
+ - Collapse `react-router-dom` into `react-router`
1331
+ - Collapse `@remix-run/server-runtime` into `react-router`
1332
+ - Collapse `@remix-run/testing` into `react-router`
1333
+
1334
+ - Remove single fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
1335
+
1336
+ - Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391))
1337
+
1338
+ - Remove `future.v7_startTransition` flag ([#11696](https://github.com/remix-run/react-router/pull/11696))
1339
+
1340
+ - - Expose the underlying router promises from the following APIs for compsition in React 19 APIs: ([#11521](https://github.com/remix-run/react-router/pull/11521))
1341
+ - `useNavigate()`
1342
+ - `useSubmit`
1343
+ - `useFetcher().load`
1344
+ - `useFetcher().submit`
1345
+ - `useRevalidator.revalidate`
1346
+
1347
+ - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
1348
+
1349
+ - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))
1350
+
1351
+ - `createCookie`
1352
+ - `createCookieSessionStorage`
1353
+ - `createMemorySessionStorage`
1354
+ - `createSessionStorage`
1355
+
1356
+ For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)
1357
+
1358
+ Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
1359
+
1360
+ - `createCookieFactory`
1361
+ - `createSessionStorageFactory`
1362
+ - `createCookieSessionStorageFactory`
1363
+ - `createMemorySessionStorageFactory`
1364
+
1365
+ - Imports/Exports cleanup ([#11840](https://github.com/remix-run/react-router/pull/11840))
1366
+ - Removed the following exports that were previously public API from `@remix-run/router`
1367
+ - types
1368
+ - `AgnosticDataIndexRouteObject`
1369
+ - `AgnosticDataNonIndexRouteObject`
1370
+ - `AgnosticDataRouteMatch`
1371
+ - `AgnosticDataRouteObject`
1372
+ - `AgnosticIndexRouteObject`
1373
+ - `AgnosticNonIndexRouteObject`
1374
+ - `AgnosticRouteMatch`
1375
+ - `AgnosticRouteObject`
1376
+ - `TrackedPromise`
1377
+ - `unstable_AgnosticPatchRoutesOnMissFunction`
1378
+ - `Action` -> exported as `NavigationType` via `react-router`
1379
+ - `Router` exported as `DataRouter` to differentiate from RR's `<Router>`
1380
+ - API
1381
+ - `getToPathname` (`@private`)
1382
+ - `joinPaths` (`@private`)
1383
+ - `normalizePathname` (`@private`)
1384
+ - `resolveTo` (`@private`)
1385
+ - `stripBasename` (`@private`)
1386
+ - `createBrowserHistory` -> in favor of `createBrowserRouter`
1387
+ - `createHashHistory` -> in favor of `createHashRouter`
1388
+ - `createMemoryHistory` -> in favor of `createMemoryRouter`
1389
+ - `createRouter`
1390
+ - `createStaticHandler` -> in favor of wrapper `createStaticHandler` in RR Dom
1391
+ - `getStaticContextFromError`
1392
+ - Removed the following exports that were previously public API from `react-router`
1393
+ - `Hash`
1394
+ - `Pathname`
1395
+ - `Search`
1396
+
1397
+ - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690))
1398
+
1399
+ - Remove `future.v7_prependBasename` from the ionternalized `@remix-run/router` package ([#11726](https://github.com/remix-run/react-router/pull/11726))
1400
+
1401
+ - Migrate Remix type generics to React Router ([#12180](https://github.com/remix-run/react-router/pull/12180))
1402
+ - These generics are provided for Remix v2 migration purposes
1403
+ - These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types
1404
+ - Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types
1405
+ - For React Router v6 users, these generics are new and should not impact your app, with one exception
1406
+ - `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type
1407
+ - This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`)
1408
+ - Therefore, you should update your usages:
1409
+ - ❌ `useFetcher<LoaderData>()`
1410
+ - ✅ `useFetcher<typeof loader>()`
1411
+
1412
+ - Remove `future.v7_throwAbortReason` from internalized `@remix-run/router` package ([#11728](https://github.com/remix-run/react-router/pull/11728))
1413
+
1414
+ - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675))
1415
+
1416
+ - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702))
1417
+
1418
+ - renamed RemixContext to FrameworkContext ([#11705](https://github.com/remix-run/react-router/pull/11705))
1419
+
1420
+ - updates the minimum React version to 18 ([#11689](https://github.com/remix-run/react-router/pull/11689))
1421
+
1422
+ - PrefetchPageDescriptor replaced by PageLinkDescriptor ([#11960](https://github.com/remix-run/react-router/pull/11960))
1423
+
1424
+ - - 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))
1425
+ - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
1426
+ - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
1427
+ - `Record<string, Route> -> Record<string, Route | undefined>`
1428
+ - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used
1429
+ - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
1430
+
1431
+ - - Remove the `future.v7_partialHydration` flag ([#11725](https://github.com/remix-run/react-router/pull/11725))
1432
+ - This also removes the `<RouterProvider fallbackElement>` prop
1433
+ - To migrate, move the `fallbackElement` to a `hydrateFallbackElement`/`HydrateFallback` on your root route
1434
+ - Also worth nothing there is a related breaking changer with this future flag:
1435
+ - Without `future.v7_partialHydration` (when using `fallbackElement`), `state.navigation` was populated during the initial load
1436
+ - With `future.v7_partialHydration`, `state.navigation` remains in an `"idle"` state during the initial load
1437
+
1438
+ - Remove `v7_relativeSplatPath` future flag ([#11695](https://github.com/remix-run/react-router/pull/11695))
1439
+
1440
+ - Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171))
1441
+ - Remove `installGlobals()` as this should no longer be necessary
1442
+
1443
+ - Remove remaining future flags ([#11820](https://github.com/remix-run/react-router/pull/11820))
1444
+ - React Router `v7_skipActionErrorRevalidation`
1445
+ - Remix `v3_fetcherPersist`, `v3_relativeSplatPath`, `v3_throwAbortReason`
1446
+
1447
+ - rename createRemixStub to createRoutesStub ([#11692](https://github.com/remix-run/react-router/pull/11692))
1448
+
1449
+ - Remove `@remix-run/router` deprecated `detectErrorBoundary` option in favor of `mapRouteProperties` ([#11751](https://github.com/remix-run/react-router/pull/11751))
1450
+
1451
+ - Add `react-router/dom` subpath export to properly enable `react-dom` as an optional `peerDependency` ([#11851](https://github.com/remix-run/react-router/pull/11851))
1452
+ - This ensures that we don't blindly `import ReactDOM from "react-dom"` in `<RouterProvider>` in order to access `ReactDOM.flushSync()`, since that would break `createMemoryRouter` use cases in non-DOM environments
1453
+ - DOM environments should import from `react-router/dom` to get the proper component that makes `ReactDOM.flushSync()` available:
1454
+ - If you are using the Vite plugin, use this in your `entry.client.tsx`:
1455
+ - `import { HydratedRouter } from 'react-router/dom'`
1456
+ - If you are not using the Vite plugin and are manually calling `createBrowserRouter`/`createHashRouter`:
1457
+ - `import { RouterProvider } from "react-router/dom"`
1458
+
1459
+ - Remove `future.v7_fetcherPersist` flag ([#11731](https://github.com/remix-run/react-router/pull/11731))
1460
+
1461
+ - 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))
1462
+
1463
+ ### Minor Changes
1464
+
1465
+ - - Add support for `prerender` config in the React Router vite plugin, to support existing SSG use-cases ([#11539](https://github.com/remix-run/react-router/pull/11539))
1466
+ - You can use the `prerender` config to pre-render your `.html` and `.data` files at build time and then serve them statically at runtime (either from a running server or a CDN)
1467
+ - `prerender` can either be an array of string paths, or a function (sync or async) that returns an array of strings so that you can dynamically generate the paths by talking to your CMS, etc.
1468
+
1469
+ ```ts
1470
+ // react-router.config.ts
1471
+ import type { Config } from "@react-router/dev/config";
1472
+
1473
+ export default {
1474
+ async prerender() {
1475
+ let slugs = await fakeGetSlugsFromCms();
1476
+ // Prerender these paths into `.html` files at build time, and `.data`
1477
+ // files if they have loaders
1478
+ return ["/", "/about", ...slugs.map((slug) => `/product/${slug}`)];
1479
+ },
1480
+ } satisfies Config;
1481
+
1482
+ async function fakeGetSlugsFromCms() {
1483
+ await new Promise((r) => setTimeout(r, 1000));
1484
+ return ["shirt", "hat"];
1485
+ }
1486
+ ```
1487
+
1488
+ - Params, loader data, and action data as props for route component exports ([#11961](https://github.com/remix-run/react-router/pull/11961))
1489
+
1490
+ ```tsx
1491
+ export default function Component({ params, loaderData, actionData }) {}
1492
+
1493
+ export function HydrateFallback({ params }) {}
1494
+ export function ErrorBoundary({ params, loaderData, actionData }) {}
1495
+ ```
1496
+
1497
+ - Remove duplicate `RouterProvider` impliementations ([#11679](https://github.com/remix-run/react-router/pull/11679))
1498
+
1499
+ - ### Typesafety improvements ([#12019](https://github.com/remix-run/react-router/pull/12019))
1500
+
1501
+ React Router now generates types for each of your route modules.
1502
+ You can access those types by importing them from `./+types.<route filename without extension>`.
1503
+ For example:
1504
+
1505
+ ```ts
1506
+ // app/routes/product.tsx
1507
+ import type * as Route from "./+types.product";
1508
+
1509
+ export function loader({ params }: Route.LoaderArgs) {}
1510
+
1511
+ export default function Component({ loaderData }: Route.ComponentProps) {}
1512
+ ```
1513
+
1514
+ This initial implementation targets type inference for:
1515
+
1516
+ - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
1517
+ - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
1518
+ - `ActionData` : Action data from `action` and/or `clientAction` within your route module
1519
+
1520
+ In the future, we plan to add types for the rest of the route module exports: `meta`, `links`, `headers`, `shouldRevalidate`, etc.
1521
+ We also plan to generate types for typesafe `Link`s:
1522
+
1523
+ ```tsx
1524
+ <Link to="/products/:id" params={{ id: 1 }} />
1525
+ // ^^^^^^^^^^^^^ ^^^^^^^^^
1526
+ // typesafe `to` and `params` based on the available routes in your app
1527
+ ```
1528
+
1529
+ Check out our docs for more:
1530
+
1531
+ - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
1532
+ - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
1533
+
1534
+ - Stabilize `unstable_dataStrategy` ([#11969](https://github.com/remix-run/react-router/pull/11969))
1535
+
1536
+ - Stabilize `unstable_patchRoutesOnNavigation` ([#11970](https://github.com/remix-run/react-router/pull/11970))
1537
+
1538
+ ### Patch Changes
1539
+
1540
+ - No changes ([`506329c4e`](https://github.com/remix-run/react-router/commit/506329c4e2e7aba9837cbfa44df6103b49423745))
1541
+
1542
+ - chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269))
1543
+
1544
+ - Remove unstable upload handler. ([#12015](https://github.com/remix-run/react-router/pull/12015))
1545
+
1546
+ - Remove unneeded dependency on @web3-storage/multipart-parser ([#12274](https://github.com/remix-run/react-router/pull/12274))
1547
+
1548
+ - Fix redirects returned from loaders/actions using `data()` ([#12021](https://github.com/remix-run/react-router/pull/12021))
1549
+
1550
+ - fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161))
1551
+
1552
+ - Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080))
1553
+
1554
+ - Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146))
1555
+ - 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
1556
+
1557
+ - Remove unneeded dependency on source-map ([#12275](https://github.com/remix-run/react-router/pull/12275))
1558
+
1559
+ ## 6.28.0
1560
+
1561
+ ### Minor Changes
1562
+
1563
+ - - Log deprecation warnings for v7 flags ([#11750](https://github.com/remix-run/react-router/pull/11750))
1564
+ - Add deprecation warnings to `json`/`defer` in favor of returning raw objects
1565
+ - These methods will be removed in React Router v7
1566
+
1567
+ ### Patch Changes
1568
+
1569
+ - Update JSDoc URLs for new website structure (add /v6/ segment) ([#12141](https://github.com/remix-run/react-router/pull/12141))
1570
+ - Updated dependencies:
1571
+ - `@remix-run/router@1.21.0`
1572
+
1573
+ ## 6.27.0
1574
+
1575
+ ### Minor Changes
1576
+
1577
+ - Stabilize `unstable_patchRoutesOnNavigation` ([#11973](https://github.com/remix-run/react-router/pull/11973))
1578
+ - Add new `PatchRoutesOnNavigationFunctionArgs` type for convenience ([#11967](https://github.com/remix-run/react-router/pull/11967))
1579
+ - Stabilize `unstable_dataStrategy` ([#11974](https://github.com/remix-run/react-router/pull/11974))
1580
+ - Stabilize the `unstable_flushSync` option for navigations and fetchers ([#11989](https://github.com/remix-run/react-router/pull/11989))
1581
+ - Stabilize the `unstable_viewTransition` option for navigations and the corresponding `unstable_useViewTransitionState` hook ([#11989](https://github.com/remix-run/react-router/pull/11989))
1582
+
1583
+ ### Patch Changes
1584
+
1585
+ - Fix bug when submitting to the current contextual route (parent route with an index child) when an `?index` param already exists from a prior submission ([#12003](https://github.com/remix-run/react-router/pull/12003))
1586
+
1587
+ - Fix `useFormAction` bug - when removing `?index` param it would not keep other non-Remix `index` params ([#12003](https://github.com/remix-run/react-router/pull/12003))
1588
+
1589
+ - Fix types for `RouteObject` within `PatchRoutesOnNavigationFunction`'s `patch` method so it doesn't expect agnostic route objects passed to `patch` ([#11967](https://github.com/remix-run/react-router/pull/11967))
1590
+
1591
+ - Updated dependencies:
1592
+ - `@remix-run/router@1.20.0`
1593
+
1594
+ ## 6.26.2
1595
+
1596
+ ### Patch Changes
1597
+
1598
+ - Updated dependencies:
1599
+ - `@remix-run/router@1.19.2`
1600
+
1601
+ ## 6.26.1
1602
+
1603
+ ### Patch Changes
1604
+
1605
+ - Rename `unstable_patchRoutesOnMiss` to `unstable_patchRoutesOnNavigation` to match new behavior ([#11888](https://github.com/remix-run/react-router/pull/11888))
1606
+ - Updated dependencies:
1607
+ - `@remix-run/router@1.19.1`
1608
+
1609
+ ## 6.26.0
1610
+
1611
+ ### Minor Changes
1612
+
1613
+ - Add a new `replace(url, init?)` alternative to `redirect(url, init?)` that performs a `history.replaceState` instead of a `history.pushState` on client-side navigation redirects ([#11811](https://github.com/remix-run/react-router/pull/11811))
1614
+
1615
+ ### Patch Changes
1616
+
1617
+ - Fix initial hydration behavior when using `future.v7_partialHydration` along with `unstable_patchRoutesOnMiss` ([#11838](https://github.com/remix-run/react-router/pull/11838))
1618
+ - During initial hydration, `router.state.matches` will now include any partial matches so that we can render ancestor `HydrateFallback` components
1619
+ - Updated dependencies:
1620
+ - `@remix-run/router@1.19.0`
1621
+
1622
+ ## 6.25.1
1623
+
1624
+ No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md) for an overview of all changes in v6.25.1.
1625
+
1626
+ ## 6.25.0
1627
+
1628
+ ### Minor Changes
1629
+
1630
+ - Stabilize `future.unstable_skipActionErrorRevalidation` as `future.v7_skipActionErrorRevalidation` ([#11769](https://github.com/remix-run/react-router/pull/11769))
1631
+ - When this flag is enabled, actions will not automatically trigger a revalidation if they return/throw a `Response` with a `4xx`/`5xx` status code
1632
+ - You may still opt-into revalidation via `shouldRevalidate`
1633
+ - This also changes `shouldRevalidate`'s `unstable_actionStatus` parameter to `actionStatus`
1634
+
1635
+ ### Patch Changes
1636
+
1637
+ - Fix regression and properly decode paths inside `useMatch` so matches/params reflect decoded params ([#11789](https://github.com/remix-run/react-router/pull/11789))
1638
+ - Updated dependencies:
1639
+ - `@remix-run/router@1.18.0`
1640
+
1641
+ ## 6.24.1
1642
+
1643
+ ### Patch Changes
1644
+
1645
+ - When using `future.v7_relativeSplatPath`, properly resolve relative paths in splat routes that are children of pathless routes ([#11633](https://github.com/remix-run/react-router/pull/11633))
1646
+ - Updated dependencies:
1647
+ - `@remix-run/router@1.17.1`
1648
+
1649
+ ## 6.24.0
1650
+
1651
+ ### Minor Changes
1652
+
1653
+ - Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626))
1654
+ - RFC: <https://github.com/remix-run/react-router/discussions/11113>
1655
+ - `unstable_patchRoutesOnMiss` docs: <https://reactrouter.com/v6/routers/create-browser-router>
1656
+
1657
+ ### Patch Changes
1658
+
1659
+ - Updated dependencies:
1660
+ - `@remix-run/router@1.17.0`
1661
+
1662
+ ## 6.23.1
1663
+
1664
+ ### Patch Changes
1665
+
1666
+ - allow undefined to be resolved with `<Await>` ([#11513](https://github.com/remix-run/react-router/pull/11513))
1667
+ - Updated dependencies:
1668
+ - `@remix-run/router@1.16.1`
1669
+
1670
+ ## 6.23.0
1671
+
1672
+ ### Minor Changes
1673
+
1674
+ - Add a new `unstable_dataStrategy` configuration option ([#11098](https://github.com/remix-run/react-router/pull/11098))
1675
+ - This option allows Data Router applications to take control over the approach for executing route loaders and actions
1676
+ - The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix single-fetch, middleware/context APIs, automatic loader caching, and more
1677
+
1678
+ ### Patch Changes
1679
+
1680
+ - Updated dependencies:
1681
+ - `@remix-run/router@1.16.0`
1682
+
1683
+ ## 6.22.3
1684
+
1685
+ ### Patch Changes
1686
+
1687
+ - Updated dependencies:
1688
+ - `@remix-run/router@1.15.3`
1689
+
1690
+ ## 6.22.2
1691
+
1692
+ ### Patch Changes
1693
+
1694
+ - Updated dependencies:
1695
+ - `@remix-run/router@1.15.2`
1696
+
1697
+ ## 6.22.1
1698
+
1699
+ ### Patch Changes
1700
+
1701
+ - Fix encoding/decoding issues with pre-encoded dynamic parameter values ([#11199](https://github.com/remix-run/react-router/pull/11199))
1702
+ - Updated dependencies:
1703
+ - `@remix-run/router@1.15.1`
1704
+
1705
+ ## 6.22.0
1706
+
1707
+ ### Patch Changes
1708
+
1709
+ - Updated dependencies:
1710
+ - `@remix-run/router@1.15.0`
1711
+
1712
+ ## 6.21.3
1713
+
1714
+ ### Patch Changes
1715
+
1716
+ - Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))
1717
+
1718
+ ## 6.21.2
1719
+
1720
+ ### Patch Changes
1721
+
1722
+ - Updated dependencies:
1723
+ - `@remix-run/router@1.14.2`
1724
+
1725
+ ## 6.21.1
1726
+
1727
+ ### Patch Changes
1728
+
1729
+ - Fix bug with `route.lazy` not working correctly on initial SPA load when `v7_partialHydration` is specified ([#11121](https://github.com/remix-run/react-router/pull/11121))
1730
+ - Updated dependencies:
1731
+ - `@remix-run/router@1.14.1`
1732
+
1733
+ ## 6.21.0
1734
+
1735
+ ### Minor Changes
1736
+
1737
+ - Add a new `future.v7_relativeSplatPath` flag to implement a breaking bug fix to relative routing when inside a splat route. ([#11087](https://github.com/remix-run/react-router/pull/11087))
1738
+
1739
+ This fix was originally added in [#10983](https://github.com/remix-run/react-router/issues/10983) and was later reverted in [#11078](https://github.com/remix-run/react-router/pull/11078) because it was determined that a large number of existing applications were relying on the buggy behavior (see [#11052](https://github.com/remix-run/react-router/issues/11052))
1740
+
1741
+ **The Bug**
1742
+ The buggy behavior is that without this flag, the default behavior when resolving relative paths is to _ignore_ any splat (`*`) portion of the current route path.
1743
+
1744
+ **The Background**
1745
+ This decision was originally made thinking that it would make the concept of nested different sections of your apps in `<Routes>` easier if relative routing would _replace_ the current splat:
1746
+
1747
+ ```jsx
1748
+ <BrowserRouter>
1749
+ <Routes>
1750
+ <Route path="/" element={<Home />} />
1751
+ <Route path="dashboard/*" element={<Dashboard />} />
1752
+ </Routes>
1753
+ </BrowserRouter>
1754
+ ```
1755
+
1756
+ Any paths like `/dashboard`, `/dashboard/team`, `/dashboard/projects` will match the `Dashboard` route. The dashboard component itself can then render nested `<Routes>`:
1757
+
1758
+ ```jsx
1759
+ function Dashboard() {
1760
+ return (
1761
+ <div>
1762
+ <h2>Dashboard</h2>
1763
+ <nav>
1764
+ <Link to="/">Dashboard Home</Link>
1765
+ <Link to="team">Team</Link>
1766
+ <Link to="projects">Projects</Link>
1767
+ </nav>
1768
+
1769
+ <Routes>
1770
+ <Route path="/" element={<DashboardHome />} />
1771
+ <Route path="team" element={<DashboardTeam />} />
1772
+ <Route path="projects" element={<DashboardProjects />} />
1773
+ </Routes>
1774
+ </div>
1775
+ );
1776
+ }
1777
+ ```
1778
+
1779
+ Now, all links and route paths are relative to the router above them. This makes code splitting and compartmentalizing your app really easy. You could render the `Dashboard` as its own independent app, or embed it into your large app without making any changes to it.
1780
+
1781
+ **The Problem**
1782
+
1783
+ The problem is that this concept of ignoring part of a path breaks a lot of other assumptions in React Router - namely that `"."` always means the current location pathname for that route. When we ignore the splat portion, we start getting invalid paths when using `"."`:
1784
+
1785
+ ```jsx
1786
+ // If we are on URL /dashboard/team, and we want to link to /dashboard/team:
1787
+ function DashboardTeam() {
1788
+ // ❌ This is broken and results in <a href="/dashboard">
1789
+ return <Link to=".">A broken link to the Current URL</Link>;
1790
+
1791
+ // ✅ This is fixed but super unintuitive since we're already at /dashboard/team!
1792
+ return <Link to="./team">A broken link to the Current URL</Link>;
1793
+ }
1794
+ ```
1795
+
1796
+ We've also introduced an issue that we can no longer move our `DashboardTeam` component around our route hierarchy easily - since it behaves differently if we're underneath a non-splat route, such as `/dashboard/:widget`. Now, our `"."` links will, properly point to ourself _inclusive of the dynamic param value_ so behavior will break from it's corresponding usage in a `/dashboard/*` route.
1797
+
1798
+ Even worse, consider a nested splat route configuration:
1799
+
1800
+ ```jsx
1801
+ <BrowserRouter>
1802
+ <Routes>
1803
+ <Route path="dashboard">
1804
+ <Route path="*" element={<Dashboard />} />
1805
+ </Route>
1806
+ </Routes>
1807
+ </BrowserRouter>
1808
+ ```
1809
+
1810
+ Now, a `<Link to=".">` and a `<Link to="..">` inside the `Dashboard` component go to the same place! That is definitely not correct!
1811
+
1812
+ Another common issue arose in Data Routers (and Remix) where any `<Form>` should post to it's own route `action` if you the user doesn't specify a form action:
1813
+
1814
+ ```jsx
1815
+ let router = createBrowserRouter({
1816
+ path: "/dashboard",
1817
+ children: [
1818
+ {
1819
+ path: "*",
1820
+ action: dashboardAction,
1821
+ Component() {
1822
+ // ❌ This form is broken! It throws a 405 error when it submits because
1823
+ // it tries to submit to /dashboard (without the splat value) and the parent
1824
+ // `/dashboard` route doesn't have an action
1825
+ return <Form method="post">...</Form>;
1826
+ },
1827
+ },
1828
+ ],
1829
+ });
1830
+ ```
1831
+
1832
+ This is just a compounded issue from the above because the default location for a `Form` to submit to is itself (`"."`) - and if we ignore the splat portion, that now resolves to the parent route.
1833
+
1834
+ **The Solution**
1835
+ If you are leveraging this behavior, it's recommended to enable the future flag, move your splat to it's own route, and leverage `../` for any links to "sibling" pages:
1836
+
1837
+ ```jsx
1838
+ <BrowserRouter>
1839
+ <Routes>
1840
+ <Route path="dashboard">
1841
+ <Route index path="*" element={<Dashboard />} />
1842
+ </Route>
1843
+ </Routes>
1844
+ </BrowserRouter>
1845
+
1846
+ function Dashboard() {
1847
+ return (
1848
+ <div>
1849
+ <h2>Dashboard</h2>
1850
+ <nav>
1851
+ <Link to="..">Dashboard Home</Link>
1852
+ <Link to="../team">Team</Link>
1853
+ <Link to="../projects">Projects</Link>
1854
+ </nav>
1855
+
1856
+ <Routes>
1857
+ <Route path="/" element={<DashboardHome />} />
1858
+ <Route path="team" element={<DashboardTeam />} />
1859
+ <Route path="projects" element={<DashboardProjects />} />
1860
+ </Router>
1861
+ </div>
1862
+ );
1863
+ }
1864
+ ```
1865
+
1866
+ This way, `.` means "the full current pathname for my route" in all cases (including static, dynamic, and splat routes) and `..` always means "my parents pathname".
1867
+
1868
+ ### Patch Changes
1869
+
1870
+ - Properly handle falsy error values in ErrorBoundary's ([#11071](https://github.com/remix-run/react-router/pull/11071))
1871
+ - Updated dependencies:
1872
+ - `@remix-run/router@1.14.0`
1873
+
1874
+ ## 6.20.1
1875
+
1876
+ ### Patch Changes
1877
+
1878
+ - Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see <https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329>). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
1879
+ - Updated dependencies:
1880
+ - `@remix-run/router@1.13.1`
1881
+
1882
+ ## 6.20.0
1883
+
1884
+ ### Minor Changes
1885
+
1886
+ - Export the `PathParam` type from the public API ([#10719](https://github.com/remix-run/react-router/pull/10719))
1887
+
1888
+ ### Patch Changes
1889
+
1890
+ - Fix bug with `resolveTo` in splat routes ([#11045](https://github.com/remix-run/react-router/pull/11045))
1891
+ - This is a follow up to [#10983](https://github.com/remix-run/react-router/pull/10983) to handle the few other code paths using `getPathContributingMatches`
1892
+ - This removes the `UNSAFE_getPathContributingMatches` export from `@remix-run/router` since we no longer need this in the `react-router`/`react-router-dom` layers
1893
+ - Updated dependencies:
1894
+ - `@remix-run/router@1.13.0`
1895
+
1896
+ ## 6.19.0
1897
+
1898
+ ### Minor Changes
1899
+
1900
+ - Add `unstable_flushSync` option to `useNavigate`/`useSumbit`/`fetcher.load`/`fetcher.submit` to opt-out of `React.startTransition` and into `ReactDOM.flushSync` for state updates ([#11005](https://github.com/remix-run/react-router/pull/11005))
1901
+ - Remove the `unstable_` prefix from the [`useBlocker`](https://reactrouter.com/v6/hooks/use-blocker) hook as it's been in use for enough time that we are confident in the API. We do not plan to remove the prefix from `unstable_usePrompt` due to differences in how browsers handle `window.confirm` that prevent React Router from guaranteeing consistent/correct behavior. ([#10991](https://github.com/remix-run/react-router/pull/10991))
1902
+
1903
+ ### Patch Changes
1904
+
1905
+ - Fix `useActionData` so it returns proper contextual action data and not _any_ action data in the tree ([#11023](https://github.com/remix-run/react-router/pull/11023))
1906
+
1907
+ - Fix bug in `useResolvedPath` that would cause `useResolvedPath(".")` in a splat route to lose the splat portion of the URL path. ([#10983](https://github.com/remix-run/react-router/pull/10983))
1908
+ - ⚠️ This fixes a quite long-standing bug specifically for `"."` paths inside a splat route which incorrectly dropped the splat portion of the URL. If you are relative routing via `"."` inside a splat route in your application you should double check that your logic is not relying on this buggy behavior and update accordingly.
1909
+
1910
+ - Updated dependencies:
1911
+ - `@remix-run/router@1.12.0`
1912
+
1913
+ ## 6.18.0
1914
+
1915
+ ### Patch Changes
1916
+
1917
+ - Fix the `future` prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial<FutureConfig>` instead of requiring all flags to be included. ([#10962](https://github.com/remix-run/react-router/pull/10962))
1918
+ - Updated dependencies:
1919
+ - `@remix-run/router@1.11.0`
1920
+
1921
+ ## 6.17.0
1922
+
1923
+ ### Patch Changes
1924
+
1925
+ - Fix `RouterProvider` `future` prop type to be a `Partial<FutureConfig>` so that not all flags must be specified ([#10900](https://github.com/remix-run/react-router/pull/10900))
1926
+ - Updated dependencies:
1927
+ - `@remix-run/router@1.10.0`
1928
+
1929
+ ## 6.16.0
1930
+
1931
+ ### Minor Changes
1932
+
1933
+ - In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breaking change. ([#10843](https://github.com/remix-run/react-router/pull/10843))
1934
+ - `Location` now accepts a generic for the `location.state` value
1935
+ - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`)
1936
+ - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown`
1937
+ - Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811))
1938
+ - Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797))
1939
+ - Removed private/internal APIs only required for the Remix v1 backwards compatibility layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715))
1940
+
1941
+ ### Patch Changes
1942
+
1943
+ - Updated dependencies:
1944
+ - `@remix-run/router@1.9.0`
1945
+
1946
+ ## 6.15.0
1947
+
1948
+ ### Minor Changes
1949
+
1950
+ - Add's a new `redirectDocument()` function which allows users to specify that a redirect from a `loader`/`action` should trigger a document reload (via `window.location`) instead of attempting to navigate to the redirected location via React Router ([#10705](https://github.com/remix-run/react-router/pull/10705))
1951
+
1952
+ ### Patch Changes
1953
+
1954
+ - Ensure `useRevalidator` is referentially stable across re-renders if revalidations are not actively occurring ([#10707](https://github.com/remix-run/react-router/pull/10707))
1955
+ - Updated dependencies:
1956
+ - `@remix-run/router@1.8.0`
1957
+
1958
+ ## 6.14.2
1959
+
1960
+ ### Patch Changes
1961
+
1962
+ - Updated dependencies:
1963
+ - `@remix-run/router@1.7.2`
1964
+
1965
+ ## 6.14.1
1966
+
1967
+ ### Patch Changes
1968
+
1969
+ - Fix loop in `unstable_useBlocker` when used with an unstable blocker function ([#10652](https://github.com/remix-run/react-router/pull/10652))
1970
+ - Fix issues with reused blockers on subsequent navigations ([#10656](https://github.com/remix-run/react-router/pull/10656))
1971
+ - Updated dependencies:
1972
+ - `@remix-run/router@1.7.1`
1973
+
1974
+ ## 6.14.0
1975
+
1976
+ ### Patch Changes
1977
+
1978
+ - Strip `basename` from locations provided to `unstable_useBlocker` functions to match `useLocation` ([#10573](https://github.com/remix-run/react-router/pull/10573))
1979
+ - Fix `generatePath` when passed a numeric `0` value parameter ([#10612](https://github.com/remix-run/react-router/pull/10612))
1980
+ - Fix `unstable_useBlocker` key issues in `StrictMode` ([#10573](https://github.com/remix-run/react-router/pull/10573))
1981
+ - Fix `tsc --skipLibCheck:false` issues on React 17 ([#10622](https://github.com/remix-run/react-router/pull/10622))
1982
+ - Upgrade `typescript` to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
1983
+ - Updated dependencies:
1984
+ - `@remix-run/router@1.7.0`
1985
+
1986
+ ## 6.13.0
1987
+
1988
+ ### Minor Changes
1989
+
1990
+ - Move [`React.startTransition`](https://react.dev/reference/react/startTransition) usage behind a [future flag](https://reactrouter.com/v6/guides/api-development-strategy) to avoid issues with existing incompatible `Suspense` usages. We recommend folks adopting this flag to be better compatible with React concurrent mode, but if you run into issues you can continue without the use of `startTransition` until v7. Issues usually boils down to creating net-new promises during the render cycle, so if you run into issues you should either lift your promise creation out of the render cycle or put it behind a `useMemo`. ([#10596](https://github.com/remix-run/react-router/pull/10596))
1991
+
1992
+ Existing behavior will no longer include `React.startTransition`:
1993
+
1994
+ ```jsx
1995
+ <BrowserRouter>
1996
+ <Routes>{/*...*/}</Routes>
1997
+ </BrowserRouter>
1998
+
1999
+ <RouterProvider router={router} />
2000
+ ```
2001
+
2002
+ If you wish to enable `React.startTransition`, pass the future flag to your component:
2003
+
2004
+ ```jsx
2005
+ <BrowserRouter future={{ v7_startTransition: true }}>
2006
+ <Routes>{/*...*/}</Routes>
2007
+ </BrowserRouter>
2008
+
2009
+ <RouterProvider router={router} future={{ v7_startTransition: true }}/>
2010
+ ```
2011
+
2012
+ ### Patch Changes
2013
+
2014
+ - Work around webpack/terser `React.startTransition` minification bug in production mode ([#10588](https://github.com/remix-run/react-router/pull/10588))
2015
+
2016
+ ## 6.12.1
2017
+
2018
+ > \[!WARNING]
2019
+ > Please use version `6.13.0` or later instead of `6.12.1`. This version suffers from a `webpack`/`terser` minification issue resulting in invalid minified code in your resulting production bundles which can cause issues in your application. See [#10579](https://github.com/remix-run/react-router/issues/10579) for more details.
2020
+
2021
+ ### Patch Changes
2022
+
2023
+ - Adjust feature detection of `React.startTransition` to fix webpack + react 17 compilation error ([#10569](https://github.com/remix-run/react-router/pull/10569))
2024
+
2025
+ ## 6.12.0
2026
+
2027
+ ### Minor Changes
2028
+
2029
+ - Wrap internal router state updates with `React.startTransition` if it exists ([#10438](https://github.com/remix-run/react-router/pull/10438))
2030
+
2031
+ ### Patch Changes
2032
+
2033
+ - Updated dependencies:
2034
+ - `@remix-run/router@1.6.3`
2035
+
2036
+ ## 6.11.2
2037
+
2038
+ ### Patch Changes
2039
+
2040
+ - Fix `basename` duplication in descendant `<Routes>` inside a `<RouterProvider>` ([#10492](https://github.com/remix-run/react-router/pull/10492))
2041
+ - Updated dependencies:
2042
+ - `@remix-run/router@1.6.2`
2043
+
2044
+ ## 6.11.1
2045
+
2046
+ ### Patch Changes
2047
+
2048
+ - Fix usage of `Component` API within descendant `<Routes>` ([#10434](https://github.com/remix-run/react-router/pull/10434))
2049
+ - Fix bug when calling `useNavigate` from `<Routes>` inside a `<RouterProvider>` ([#10432](https://github.com/remix-run/react-router/pull/10432))
2050
+ - Fix usage of `<Navigate>` in strict mode when using a data router ([#10435](https://github.com/remix-run/react-router/pull/10435))
2051
+ - Updated dependencies:
2052
+ - `@remix-run/router@1.6.1`
2053
+
2054
+ ## 6.11.0
2055
+
2056
+ ### Patch Changes
2057
+
2058
+ - Log loader/action errors to the console in dev for easier stack trace evaluation ([#10286](https://github.com/remix-run/react-router/pull/10286))
2059
+ - Fix bug preventing rendering of descendant `<Routes>` when `RouterProvider` errors existed ([#10374](https://github.com/remix-run/react-router/pull/10374))
2060
+ - Fix inadvertent re-renders when using `Component` instead of `element` on a route definition ([#10287](https://github.com/remix-run/react-router/pull/10287))
2061
+ - Fix detection of `useNavigate` in the render cycle by setting the `activeRef` in a layout effect, allowing the `navigate` function to be passed to child components and called in a `useEffect` there. ([#10394](https://github.com/remix-run/react-router/pull/10394))
2062
+ - Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in `<RouterProvider>`. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. ([#10377](https://github.com/remix-run/react-router/pull/10377), [#10409](https://github.com/remix-run/react-router/pull/10409))
2063
+ - Allow `useRevalidator()` to resolve a loader-driven error boundary scenario ([#10369](https://github.com/remix-run/react-router/pull/10369))
2064
+ - Avoid unnecessary unsubscribe/resubscribes on router state changes ([#10409](https://github.com/remix-run/react-router/pull/10409))
2065
+ - When using a `RouterProvider`, `useNavigate`/`useSubmit`/`fetcher.submit` are now stable across location changes, since we can handle relative routing via the `@remix-run/router` instance and get rid of our dependence on `useLocation()`. When using `BrowserRouter`, these hooks remain unstable across location changes because they still rely on `useLocation()`. ([#10336](https://github.com/remix-run/react-router/pull/10336))
2066
+ - Updated dependencies:
2067
+ - `@remix-run/router@1.6.0`
2068
+
2069
+ ## 6.10.0
2070
+
2071
+ ### Minor Changes
2072
+
2073
+ - Added support for [**Future Flags**](https://reactrouter.com/v6/guides/api-development-strategy) in React Router. The first flag being introduced is `future.v7_normalizeFormMethod` which will normalize the exposed `useNavigation()/useFetcher()` `formMethod` fields as uppercase HTTP methods to align with the `fetch()` behavior. ([#10207](https://github.com/remix-run/react-router/pull/10207))
2074
+ - When `future.v7_normalizeFormMethod === false` (default v6 behavior),
2075
+ - `useNavigation().formMethod` is lowercase
2076
+ - `useFetcher().formMethod` is lowercase
2077
+ - When `future.v7_normalizeFormMethod === true`:
2078
+ - `useNavigation().formMethod` is uppercase
2079
+ - `useFetcher().formMethod` is uppercase
2080
+
2081
+ ### Patch Changes
2082
+
2083
+ - Fix route ID generation when using Fragments in `createRoutesFromElements` ([#10193](https://github.com/remix-run/react-router/pull/10193))
2084
+ - Updated dependencies:
2085
+ - `@remix-run/router@1.5.0`
2086
+
2087
+ ## 6.9.0
2088
+
2089
+ ### Minor Changes
2090
+
2091
+ - React Router now supports an alternative way to define your route `element` and `errorElement` fields as React Components instead of React Elements. You can instead pass a React Component to the new `Component` and `ErrorBoundary` fields if you choose. There is no functional difference between the two, so use whichever approach you prefer 😀. You shouldn't be defining both, but if you do `Component`/`ErrorBoundary` will "win". ([#10045](https://github.com/remix-run/react-router/pull/10045))
2092
+
2093
+ **Example JSON Syntax**
2094
+
2095
+ ```jsx
2096
+ // Both of these work the same:
2097
+ const elementRoutes = [{
2098
+ path: '/',
2099
+ element: <Home />,
2100
+ errorElement: <HomeError />,
2101
+ }]
2102
+
2103
+ const componentRoutes = [{
2104
+ path: '/',
2105
+ Component: Home,
2106
+ ErrorBoundary: HomeError,
2107
+ }]
2108
+
2109
+ function Home() { ... }
2110
+ function HomeError() { ... }
2111
+ ```
2112
+
2113
+ **Example JSX Syntax**
2114
+
2115
+ ```jsx
2116
+ // Both of these work the same:
2117
+ const elementRoutes = createRoutesFromElements(
2118
+ <Route path='/' element={<Home />} errorElement={<HomeError /> } />
2119
+ );
2120
+
2121
+ const componentRoutes = createRoutesFromElements(
2122
+ <Route path='/' Component={Home} ErrorBoundary={HomeError} />
2123
+ );
2124
+
2125
+ function Home() { ... }
2126
+ function HomeError() { ... }
2127
+ ```
2128
+
2129
+ - **Introducing Lazy Route Modules!** ([#10045](https://github.com/remix-run/react-router/pull/10045))
2130
+
2131
+ In order to keep your application bundles small and support code-splitting of your routes, we've introduced a new `lazy()` route property. This is an async function that resolves the non-route-matching portions of your route definition (`loader`, `action`, `element`/`Component`, `errorElement`/`ErrorBoundary`, `shouldRevalidate`, `handle`).
2132
+
2133
+ Lazy routes are resolved on initial load and during the `loading` or `submitting` phase of a navigation or fetcher call. You cannot lazily define route-matching properties (`path`, `index`, `children`) since we only execute your lazy route functions after we've matched known routes.
2134
+
2135
+ Your `lazy` functions will typically return the result of a dynamic import.
2136
+
2137
+ ```jsx
2138
+ // In this example, we assume most folks land on the homepage so we include that
2139
+ // in our critical-path bundle, but then we lazily load modules for /a and /b so
2140
+ // they don't load until the user navigates to those routes
2141
+ let routes = createRoutesFromElements(
2142
+ <Route path="/" element={<Layout />}>
2143
+ <Route index element={<Home />} />
2144
+ <Route path="a" lazy={() => import("./a")} />
2145
+ <Route path="b" lazy={() => import("./b")} />
2146
+ </Route>,
2147
+ );
2148
+ ```
2149
+
2150
+ Then in your lazy route modules, export the properties you want defined for the route:
2151
+
2152
+ ```jsx
2153
+ export async function loader({ request }) {
2154
+ let data = await fetchData(request);
2155
+ return json(data);
2156
+ }
2157
+
2158
+ // Export a `Component` directly instead of needing to create a React Element from it
2159
+ export function Component() {
2160
+ let data = useLoaderData();
2161
+
2162
+ return (
2163
+ <>
2164
+ <h1>You made it!</h1>
2165
+ <p>{data}</p>
2166
+ </>
2167
+ );
2168
+ }
2169
+
2170
+ // Export an `ErrorBoundary` directly instead of needing to create a React Element from it
2171
+ export function ErrorBoundary() {
2172
+ let error = useRouteError();
2173
+ return isRouteErrorResponse(error) ? (
2174
+ <h1>
2175
+ {error.status} {error.statusText}
2176
+ </h1>
2177
+ ) : (
2178
+ <h1>{error.message || error}</h1>
2179
+ );
2180
+ }
2181
+ ```
2182
+
2183
+ An example of this in action can be found in the [`examples/lazy-loading-router-provider`](https://github.com/remix-run/react-router/tree/main/examples/lazy-loading-router-provider) directory of the repository.
2184
+
2185
+ 🙌 Huge thanks to @rossipedia for the [Initial Proposal](https://github.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://github.com/remix-run/react-router/pull/9830).
2186
+
2187
+ - Updated dependencies:
2188
+ - `@remix-run/router@1.4.0`
2189
+
2190
+ ### Patch Changes
2191
+
2192
+ - Fix `generatePath` incorrectly applying parameters in some cases ([#10078](https://github.com/remix-run/react-router/pull/10078))
2193
+ - Improve memoization for context providers to avoid unnecessary re-renders ([#9983](https://github.com/remix-run/react-router/pull/9983))
2194
+
2195
+ ## 6.8.2
2196
+
2197
+ ### Patch Changes
2198
+
2199
+ - Updated dependencies:
2200
+ - `@remix-run/router@1.3.3`
2201
+
2202
+ ## 6.8.1
2203
+
2204
+ ### Patch Changes
2205
+
2206
+ - Remove inaccurate console warning for POP navigations and update active blocker logic ([#10030](https://github.com/remix-run/react-router/pull/10030))
2207
+ - Updated dependencies:
2208
+ - `@remix-run/router@1.3.2`
2209
+
2210
+ ## 6.8.0
2211
+
2212
+ ### Patch Changes
2213
+
2214
+ - Updated dependencies:
2215
+ - `@remix-run/router@1.3.1`
2216
+
2217
+ ## 6.7.0
2218
+
2219
+ ### Minor Changes
2220
+
2221
+ - Add `unstable_useBlocker` hook for blocking navigations within the app's location origin ([#9709](https://github.com/remix-run/react-router/pull/9709))
2222
+
2223
+ ### Patch Changes
2224
+
2225
+ - Fix `generatePath` when optional params are present ([#9764](https://github.com/remix-run/react-router/pull/9764))
2226
+ - Update `<Await>` to accept `ReactNode` as children function return result ([#9896](https://github.com/remix-run/react-router/pull/9896))
2227
+ - Updated dependencies:
2228
+ - `@remix-run/router@1.3.0`
2229
+
2230
+ ## 6.6.2
2231
+
2232
+ ### Patch Changes
2233
+
2234
+ - Ensure `useId` consistency during SSR ([#9805](https://github.com/remix-run/react-router/pull/9805))
2235
+
2236
+ ## 6.6.1
2237
+
2238
+ ### Patch Changes
2239
+
2240
+ - Updated dependencies:
2241
+ - `@remix-run/router@1.2.1`
2242
+
2243
+ ## 6.6.0
2244
+
2245
+ ### Patch Changes
2246
+
2247
+ - Prevent `useLoaderData` usage in `errorElement` ([#9735](https://github.com/remix-run/react-router/pull/9735))
2248
+ - Updated dependencies:
2249
+ - `@remix-run/router@1.2.0`
2250
+
2251
+ ## 6.5.0
2252
+
2253
+ This release introduces support for [Optional Route Segments](https://github.com/remix-run/react-router/issues/9546). Now, adding a `?` to the end of any path segment will make that entire segment optional. This works for both static segments and dynamic parameters.
2254
+
2255
+ **Optional Params Examples**
2256
+
2257
+ - `<Route path=":lang?/about>` will match:
2258
+ - `/:lang/about`
2259
+ - `/about`
2260
+ - `<Route path="/multistep/:widget1?/widget2?/widget3?">` will match:
2261
+ - `/multistep`
2262
+ - `/multistep/:widget1`
2263
+ - `/multistep/:widget1/:widget2`
2264
+ - `/multistep/:widget1/:widget2/:widget3`
2265
+
2266
+ **Optional Static Segment Example**
2267
+
2268
+ - `<Route path="/home?">` will match:
2269
+ - `/`
2270
+ - `/home`
2271
+ - `<Route path="/fr?/about">` will match:
2272
+ - `/about`
2273
+ - `/fr/about`
2274
+
2275
+ ### Minor Changes
2276
+
2277
+ - Allows optional routes and optional static segments ([#9650](https://github.com/remix-run/react-router/pull/9650))
2278
+
2279
+ ### Patch Changes
2280
+
2281
+ - Stop incorrectly matching on partial named parameters, i.e. `<Route path="prefix-:param">`, to align with how splat parameters work. If you were previously relying on this behavior then it's recommended to extract the static portion of the path at the `useParams` call site: ([#9506](https://github.com/remix-run/react-router/pull/9506))
2282
+
2283
+ ```jsx
2284
+ // Old behavior at URL /prefix-123
2285
+ <Route path="prefix-:id" element={<Comp /> }>
2286
+
2287
+ function Comp() {
2288
+ let params = useParams(); // { id: '123' }
2289
+ let id = params.id; // "123"
2290
+ ...
2291
+ }
2292
+
2293
+ // New behavior at URL /prefix-123
2294
+ <Route path=":id" element={<Comp /> }>
2295
+
2296
+ function Comp() {
2297
+ let params = useParams(); // { id: 'prefix-123' }
2298
+ let id = params.id.replace(/^prefix-/, ''); // "123"
2299
+ ...
2300
+ }
2301
+ ```
2302
+
2303
+ - Updated dependencies:
2304
+ - `@remix-run/router@1.1.0`
2305
+
2306
+ ## 6.4.5
2307
+
2308
+ ### Patch Changes
2309
+
2310
+ - Updated dependencies:
2311
+ - `@remix-run/router@1.0.5`
2312
+
2313
+ ## 6.4.4
2314
+
2315
+ ### Patch Changes
2316
+
2317
+ - Updated dependencies:
2318
+ - `@remix-run/router@1.0.4`
2319
+
2320
+ ## 6.4.3
2321
+
2322
+ ### Patch Changes
2323
+
2324
+ - `useRoutes` should be able to return `null` when passing `locationArg` ([#9485](https://github.com/remix-run/react-router/pull/9485))
2325
+ - fix `initialEntries` type in `createMemoryRouter` ([#9498](https://github.com/remix-run/react-router/pull/9498))
2326
+ - Updated dependencies:
2327
+ - `@remix-run/router@1.0.3`
2328
+
2329
+ ## 6.4.2
2330
+
2331
+ ### Patch Changes
2332
+
2333
+ - Fix `IndexRouteObject` and `NonIndexRouteObject` types to make `hasErrorElement` optional ([#9394](https://github.com/remix-run/react-router/pull/9394))
2334
+ - Enhance console error messages for invalid usage of data router hooks ([#9311](https://github.com/remix-run/react-router/pull/9311))
2335
+ - If an index route has children, it will result in a runtime error. We have strengthened our `RouteObject`/`RouteProps` types to surface the error in TypeScript. ([#9366](https://github.com/remix-run/react-router/pull/9366))
2336
+ - Updated dependencies:
2337
+ - `@remix-run/router@1.0.2`
2338
+
2339
+ ## 6.4.1
2340
+
2341
+ ### Patch Changes
2342
+
2343
+ - Preserve state from `initialEntries` ([#9288](https://github.com/remix-run/react-router/pull/9288))
2344
+ - Updated dependencies:
2345
+ - `@remix-run/router@1.0.1`
2346
+
2347
+ ## 6.4.0
2348
+
2349
+ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs](https://reactrouter.com), especially the [feature overview](https://reactrouter.com/en/6.4.0/start/overview) and the [tutorial](https://reactrouter.com/en/6.4.0/start/tutorial).
2350
+
2351
+ **New APIs**
2352
+
2353
+ - Create your router with `createMemoryRouter`
2354
+ - Render your router with `<RouterProvider>`
2355
+ - Load data with a Route `loader` and mutate with a Route `action`
2356
+ - Handle errors with Route `errorElement`
2357
+ - Defer non-critical data with `defer` and `Await`
2358
+
2359
+ **Bug Fixes**
2360
+
2361
+ - Path resolution is now trailing slash agnostic (#8861)
2362
+ - `useLocation` returns the scoped location inside a `<Routes location>` component (#9094)
2363
+
2364
+ **Updated Dependencies**
2365
+
2366
+ - `@remix-run/router@1.0.0`