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,2534 @@
1
+ import { bG as RouteManifest, q as RouteModules, W as HydrationState, a3 as DataRouteObject, a as ClientLoaderFunction, a7 as StaticHandlerContext, bH as ServerRouteModule, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, an as LoaderFunctionArgs, ae as ActionFunctionArgs, aw as unstable_ServerInstrumentation, al as HTMLFormMethod, aj as FormEncType, y as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bI as History, a6 as GetScrollRestorationKeyFunction, e as RouterInit, bJ as FutureConfig$1, u as unstable_ClientInstrumentation, r as DataStrategyFunction, a2 as PatchRoutesOnNavigationFunction, v as NavigateOptions, a8 as Fetcher, Q as RouteObject, p as Router, x as SerializeFrom, B as BlockerFunction, L as Location, bK as CreateStaticHandlerOptions$1, a4 as StaticHandler } from './router-5iOvts3c.mjs';
2
+ import * as React from 'react';
3
+
4
+ interface Route {
5
+ index?: boolean;
6
+ caseSensitive?: boolean;
7
+ id: string;
8
+ parentId?: string;
9
+ path?: string;
10
+ }
11
+ interface EntryRoute extends Route {
12
+ hasAction: boolean;
13
+ hasLoader: boolean;
14
+ hasClientAction: boolean;
15
+ hasClientLoader: boolean;
16
+ hasClientMiddleware: boolean;
17
+ hasErrorBoundary: boolean;
18
+ imports?: string[];
19
+ css?: string[];
20
+ module: string;
21
+ clientActionModule: string | undefined;
22
+ clientLoaderModule: string | undefined;
23
+ clientMiddlewareModule: string | undefined;
24
+ hydrateFallbackModule: string | undefined;
25
+ parentId?: string;
26
+ }
27
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
28
+ declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
29
+ declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean;
30
+
31
+ type SerializedError = {
32
+ message: string;
33
+ stack?: string;
34
+ };
35
+ interface FrameworkContextObject {
36
+ manifest: AssetsManifest;
37
+ routeModules: RouteModules;
38
+ criticalCss?: CriticalCss;
39
+ serverHandoffString?: string;
40
+ future: FutureConfig;
41
+ ssr: boolean;
42
+ isSpaMode: boolean;
43
+ routeDiscovery: ServerBuild["routeDiscovery"];
44
+ serializeError?(error: Error): SerializedError;
45
+ renderMeta?: {
46
+ didRenderScripts?: boolean;
47
+ streamCache?: Record<number, Promise<void> & {
48
+ result?: {
49
+ done: boolean;
50
+ value: string;
51
+ };
52
+ error?: unknown;
53
+ }>;
54
+ };
55
+ }
56
+ interface EntryContext extends FrameworkContextObject {
57
+ staticHandlerContext: StaticHandlerContext;
58
+ serverHandoffStream?: ReadableStream<Uint8Array>;
59
+ }
60
+ interface FutureConfig {
61
+ unstable_subResourceIntegrity: boolean;
62
+ unstable_trailingSlashAwareDataRequests: boolean;
63
+ v8_middleware: boolean;
64
+ }
65
+ type CriticalCss = string | {
66
+ rel: "stylesheet";
67
+ href: string;
68
+ };
69
+ interface AssetsManifest {
70
+ entry: {
71
+ imports: string[];
72
+ module: string;
73
+ };
74
+ routes: RouteManifest<EntryRoute>;
75
+ url: string;
76
+ version: string;
77
+ hmr?: {
78
+ timestamp?: number;
79
+ runtime: string;
80
+ };
81
+ sri?: Record<string, string> | true;
82
+ }
83
+
84
+ type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
85
+ interface ServerRoute extends Route {
86
+ children: ServerRoute[];
87
+ module: ServerRouteModule;
88
+ }
89
+
90
+ type OptionalCriticalCss = CriticalCss | undefined;
91
+ /**
92
+ * The output of the compiler for the server build.
93
+ */
94
+ interface ServerBuild {
95
+ entry: {
96
+ module: ServerEntryModule;
97
+ };
98
+ routes: ServerRouteManifest;
99
+ assets: AssetsManifest;
100
+ basename?: string;
101
+ publicPath: string;
102
+ assetsBuildDirectory: string;
103
+ future: FutureConfig;
104
+ ssr: boolean;
105
+ unstable_getCriticalCss?: (args: {
106
+ pathname: string;
107
+ }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
108
+ /**
109
+ * @deprecated This is now done via a custom header during prerendering
110
+ */
111
+ isSpaMode: boolean;
112
+ prerender: string[];
113
+ routeDiscovery: {
114
+ mode: "lazy" | "initial";
115
+ manifestPath: string;
116
+ };
117
+ allowedActionOrigins?: string[] | false;
118
+ }
119
+ interface HandleDocumentRequestFunction {
120
+ (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
121
+ }
122
+ interface HandleDataRequestFunction {
123
+ (response: Response, args: {
124
+ request: LoaderFunctionArgs["request"] | ActionFunctionArgs["request"];
125
+ context: LoaderFunctionArgs["context"] | ActionFunctionArgs["context"];
126
+ params: LoaderFunctionArgs["params"] | ActionFunctionArgs["params"];
127
+ }): Promise<Response> | Response;
128
+ }
129
+ interface HandleErrorFunction {
130
+ (error: unknown, args: {
131
+ request: LoaderFunctionArgs["request"] | ActionFunctionArgs["request"];
132
+ context: LoaderFunctionArgs["context"] | ActionFunctionArgs["context"];
133
+ params: LoaderFunctionArgs["params"] | ActionFunctionArgs["params"];
134
+ }): void;
135
+ }
136
+ /**
137
+ * A module that serves as the entry point for a Remix app during server
138
+ * rendering.
139
+ */
140
+ interface ServerEntryModule {
141
+ default: HandleDocumentRequestFunction;
142
+ handleDataRequest?: HandleDataRequestFunction;
143
+ handleError?: HandleErrorFunction;
144
+ unstable_instrumentations?: unstable_ServerInstrumentation[];
145
+ streamTimeout?: number;
146
+ }
147
+
148
+ type ParamKeyValuePair = [string, string];
149
+ type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
150
+ /**
151
+ Creates a URLSearchParams object using the given initializer.
152
+
153
+ This is identical to `new URLSearchParams(init)` except it also
154
+ supports arrays as values in the object form of the initializer
155
+ instead of just strings. This is convenient when you need multiple
156
+ values for a given key, but don't want to use an array initializer.
157
+
158
+ For example, instead of:
159
+
160
+ ```tsx
161
+ let searchParams = new URLSearchParams([
162
+ ['sort', 'name'],
163
+ ['sort', 'price']
164
+ ]);
165
+ ```
166
+ you can do:
167
+
168
+ ```
169
+ let searchParams = createSearchParams({
170
+ sort: ['name', 'price']
171
+ });
172
+ ```
173
+
174
+ @category Utils
175
+ */
176
+ declare function createSearchParams(init?: URLSearchParamsInit): URLSearchParams;
177
+ type JsonObject = {
178
+ [Key in string]: JsonValue;
179
+ } & {
180
+ [Key in string]?: JsonValue | undefined;
181
+ };
182
+ type JsonArray = JsonValue[] | readonly JsonValue[];
183
+ type JsonPrimitive = string | number | boolean | null;
184
+ type JsonValue = JsonPrimitive | JsonObject | JsonArray;
185
+ type SubmitTarget = HTMLFormElement | HTMLButtonElement | HTMLInputElement | FormData | URLSearchParams | JsonValue | null;
186
+ /**
187
+ * Submit options shared by both navigations and fetchers
188
+ */
189
+ interface SharedSubmitOptions {
190
+ /**
191
+ * The HTTP method used to submit the form. Overrides `<form method>`.
192
+ * Defaults to "GET".
193
+ */
194
+ method?: HTMLFormMethod;
195
+ /**
196
+ * The action URL path used to submit the form. Overrides `<form action>`.
197
+ * Defaults to the path of the current route.
198
+ */
199
+ action?: string;
200
+ /**
201
+ * The encoding used to submit the form. Overrides `<form encType>`.
202
+ * Defaults to "application/x-www-form-urlencoded".
203
+ */
204
+ encType?: FormEncType;
205
+ /**
206
+ * Determines whether the form action is relative to the route hierarchy or
207
+ * the pathname. Use this if you want to opt out of navigating the route
208
+ * hierarchy and want to instead route based on /-delimited URL segments
209
+ */
210
+ relative?: RelativeRoutingType;
211
+ /**
212
+ * In browser-based environments, prevent resetting scroll after this
213
+ * navigation when using the <ScrollRestoration> component
214
+ */
215
+ preventScrollReset?: boolean;
216
+ /**
217
+ * Enable flushSync for this submission's state updates
218
+ */
219
+ flushSync?: boolean;
220
+ /**
221
+ * Specify the default revalidation behavior after this submission
222
+ *
223
+ * If no `shouldRevalidate` functions are present on the active routes, then this
224
+ * value will be used directly. Otherwise it will be passed into `shouldRevalidate`
225
+ * so the route can make the final determination on revalidation. This can be
226
+ * useful when updating search params and you don't want to trigger a revalidation.
227
+ *
228
+ * By default (when not specified), loaders will revalidate according to the routers
229
+ * standard revalidation behavior.
230
+ */
231
+ unstable_defaultShouldRevalidate?: boolean;
232
+ }
233
+ /**
234
+ * Submit options available to fetchers
235
+ */
236
+ interface FetcherSubmitOptions extends SharedSubmitOptions {
237
+ }
238
+ /**
239
+ * Submit options available to navigations
240
+ */
241
+ interface SubmitOptions extends FetcherSubmitOptions {
242
+ /**
243
+ * Set `true` to replace the current entry in the browser's history stack
244
+ * instead of creating a new one (i.e. stay on "the same page"). Defaults
245
+ * to `false`.
246
+ */
247
+ replace?: boolean;
248
+ /**
249
+ * State object to add to the history stack entry for this navigation
250
+ */
251
+ state?: any;
252
+ /**
253
+ * Indicate a specific fetcherKey to use when using navigate=false
254
+ */
255
+ fetcherKey?: string;
256
+ /**
257
+ * navigate=false will use a fetcher instead of a navigation
258
+ */
259
+ navigate?: boolean;
260
+ /**
261
+ * Enable view transitions on this submission navigation
262
+ */
263
+ viewTransition?: boolean;
264
+ }
265
+
266
+ declare const FrameworkContext: React.Context<FrameworkContextObject | undefined>;
267
+ /**
268
+ * Defines the [lazy route discovery](../../explanation/lazy-route-discovery)
269
+ * behavior of the link/form:
270
+ *
271
+ * - "render" - default, discover the route when the link renders
272
+ * - "none" - don't eagerly discover, only discover if the link is clicked
273
+ */
274
+ type DiscoverBehavior = "render" | "none";
275
+ /**
276
+ * Defines the prefetching behavior of the link:
277
+ *
278
+ * - "none": Never fetched
279
+ * - "intent": Fetched when the user focuses or hovers the link
280
+ * - "render": Fetched when the link is rendered
281
+ * - "viewport": Fetched when the link is in the viewport
282
+ */
283
+ type PrefetchBehavior = "intent" | "render" | "none" | "viewport";
284
+ /**
285
+ * Props for the {@link Links} component.
286
+ *
287
+ * @category Types
288
+ */
289
+ interface LinksProps {
290
+ /**
291
+ * A [`nonce`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/nonce)
292
+ * attribute to render on the [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
293
+ * element
294
+ */
295
+ nonce?: string | undefined;
296
+ /**
297
+ * A [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin)
298
+ * attribute to render on the [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
299
+ * element
300
+ */
301
+ crossOrigin?: "anonymous" | "use-credentials";
302
+ }
303
+ /**
304
+ * Renders all the [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
305
+ * tags created by the route module's [`links`](../../start/framework/route-module#links)
306
+ * export. You should render it inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head)
307
+ * of your document.
308
+ *
309
+ * @example
310
+ * import { Links } from "react-router";
311
+ *
312
+ * export default function Root() {
313
+ * return (
314
+ * <html>
315
+ * <head>
316
+ * <Links />
317
+ * </head>
318
+ * <body></body>
319
+ * </html>
320
+ * );
321
+ * }
322
+ *
323
+ * @public
324
+ * @category Components
325
+ * @mode framework
326
+ * @param props Props
327
+ * @param {LinksProps.nonce} props.nonce n/a
328
+ * @param {LinksProps.crossOrigin} props.crossOrigin n/a
329
+ * @returns A collection of React elements for [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
330
+ * tags
331
+ */
332
+ declare function Links({ nonce, crossOrigin }: LinksProps): React.JSX.Element;
333
+ /**
334
+ * Renders [`<link rel=prefetch|modulepreload>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/rel)
335
+ * tags for modules and data of another page to enable an instant navigation to
336
+ * that page. [`<Link prefetch>`](./Link#prefetch) uses this internally, but you
337
+ * can render it to prefetch a page for any other reason.
338
+ *
339
+ * For example, you may render one of this as the user types into a search field
340
+ * to prefetch search results before they click through to their selection.
341
+ *
342
+ * @example
343
+ * import { PrefetchPageLinks } from "react-router";
344
+ *
345
+ * <PrefetchPageLinks page="/absolute/path" />
346
+ *
347
+ * @public
348
+ * @category Components
349
+ * @mode framework
350
+ * @param props Props
351
+ * @param {PageLinkDescriptor.page} props.page n/a
352
+ * @param props.linkProps Additional props to spread onto the [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
353
+ * tags, such as [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/crossOrigin),
354
+ * [`integrity`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/integrity),
355
+ * [`rel`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/rel),
356
+ * etc.
357
+ * @returns A collection of React elements for [`<link>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
358
+ * tags
359
+ */
360
+ declare function PrefetchPageLinks({ page, ...linkProps }: PageLinkDescriptor): React.JSX.Element | null;
361
+ /**
362
+ * Renders all the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta)
363
+ * tags created by the route module's [`meta`](../../start/framework/route-module#meta)
364
+ * export. You should render it inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head)
365
+ * of your document.
366
+ *
367
+ * @example
368
+ * import { Meta } from "react-router";
369
+ *
370
+ * export default function Root() {
371
+ * return (
372
+ * <html>
373
+ * <head>
374
+ * <Meta />
375
+ * </head>
376
+ * </html>
377
+ * );
378
+ * }
379
+ *
380
+ * @public
381
+ * @category Components
382
+ * @mode framework
383
+ * @returns A collection of React elements for [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta)
384
+ * tags
385
+ */
386
+ declare function Meta(): React.JSX.Element;
387
+ /**
388
+ * A couple common attributes:
389
+ *
390
+ * - `<Scripts crossOrigin>` for hosting your static assets on a different
391
+ * server than your app.
392
+ * - `<Scripts nonce>` to support a [content security policy for scripts](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src)
393
+ * with [nonce-sources](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources)
394
+ * for your [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
395
+ * tags.
396
+ *
397
+ * You cannot pass through attributes such as [`async`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/async),
398
+ * [`defer`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/defer),
399
+ * [`noModule`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/noModule),
400
+ * [`src`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/src),
401
+ * or [`type`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/type),
402
+ * because they are managed by React Router internally.
403
+ *
404
+ * @category Types
405
+ */
406
+ type ScriptsProps = Omit<React.HTMLProps<HTMLScriptElement>, "async" | "children" | "dangerouslySetInnerHTML" | "defer" | "noModule" | "src" | "suppressHydrationWarning" | "type"> & {
407
+ /**
408
+ * A [`nonce`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/nonce)
409
+ * attribute to render on the [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
410
+ * element
411
+ */
412
+ nonce?: string | undefined;
413
+ };
414
+ /**
415
+ * Renders the client runtime of your app. It should be rendered inside the
416
+ * [`<body>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body)
417
+ * of the document.
418
+ *
419
+ * If server rendering, you can omit `<Scripts/>` and the app will work as a
420
+ * traditional web app without JavaScript, relying solely on HTML and browser
421
+ * behaviors.
422
+ *
423
+ * @example
424
+ * import { Scripts } from "react-router";
425
+ *
426
+ * export default function Root() {
427
+ * return (
428
+ * <html>
429
+ * <head />
430
+ * <body>
431
+ * <Scripts />
432
+ * </body>
433
+ * </html>
434
+ * );
435
+ * }
436
+ *
437
+ * @public
438
+ * @category Components
439
+ * @mode framework
440
+ * @param scriptProps Additional props to spread onto the [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
441
+ * tags, such as [`crossOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/crossOrigin),
442
+ * [`nonce`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/nonce),
443
+ * etc.
444
+ * @returns A collection of React elements for [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
445
+ * tags
446
+ */
447
+ declare function Scripts(scriptProps: ScriptsProps): React.JSX.Element | null;
448
+
449
+ /**
450
+ * @category Data Routers
451
+ */
452
+ interface DOMRouterOpts {
453
+ /**
454
+ * Basename path for the application.
455
+ */
456
+ basename?: string;
457
+ /**
458
+ * A function that returns an {@link RouterContextProvider} instance
459
+ * which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
460
+ * [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
461
+ * This function is called to generate a fresh `context` instance on each
462
+ * navigation or fetcher call.
463
+ *
464
+ * ```tsx
465
+ * import {
466
+ * createContext,
467
+ * RouterContextProvider,
468
+ * } from "react-router";
469
+ *
470
+ * const apiClientContext = createContext<APIClient>();
471
+ *
472
+ * function createBrowserRouter(routes, {
473
+ * getContext() {
474
+ * let context = new RouterContextProvider();
475
+ * context.set(apiClientContext, getApiClient());
476
+ * return context;
477
+ * }
478
+ * })
479
+ * ```
480
+ */
481
+ getContext?: RouterInit["getContext"];
482
+ /**
483
+ * Future flags to enable for the router.
484
+ */
485
+ future?: Partial<FutureConfig$1>;
486
+ /**
487
+ * When Server-Rendering and opting-out of automatic hydration, the
488
+ * `hydrationData` option allows you to pass in hydration data from your
489
+ * server-render. This will almost always be a subset of data from the
490
+ * {@link StaticHandlerContext} value you get back from the {@link StaticHandler}'s
491
+ * `query` method:
492
+ *
493
+ * ```tsx
494
+ * const router = createBrowserRouter(routes, {
495
+ * hydrationData: {
496
+ * loaderData: {
497
+ * // [routeId]: serverLoaderData
498
+ * },
499
+ * // may also include `errors` and/or `actionData`
500
+ * },
501
+ * });
502
+ * ```
503
+ *
504
+ * **Partial Hydration Data**
505
+ *
506
+ * You will almost always include a complete set of `loaderData` to hydrate a
507
+ * server-rendered app. But in advanced use-cases (such as Framework Mode's
508
+ * [`clientLoader`](../../start/framework/route-module#clientLoader)), you may
509
+ * want to include `loaderData` for only some routes that were loaded/rendered
510
+ * on the server. This allows you to hydrate _some_ of the routes (such as the
511
+ * app layout/shell) while showing a `HydrateFallback` component and running
512
+ * the [`loader`](../../start/data/route-object#loader)s for other routes
513
+ * during hydration.
514
+ *
515
+ * A route [`loader`](../../start/data/route-object#loader) will run during
516
+ * hydration in two scenarios:
517
+ *
518
+ * 1. No hydration data is provided
519
+ * In these cases the `HydrateFallback` component will render on initial
520
+ * hydration
521
+ * 2. The `loader.hydrate` property is set to `true`
522
+ * This allows you to run the [`loader`](../../start/data/route-object#loader)
523
+ * even if you did not render a fallback on initial hydration (i.e., to
524
+ * prime a cache with hydration data)
525
+ *
526
+ * ```tsx
527
+ * const router = createBrowserRouter(
528
+ * [
529
+ * {
530
+ * id: "root",
531
+ * loader: rootLoader,
532
+ * Component: Root,
533
+ * children: [
534
+ * {
535
+ * id: "index",
536
+ * loader: indexLoader,
537
+ * HydrateFallback: IndexSkeleton,
538
+ * Component: Index,
539
+ * },
540
+ * ],
541
+ * },
542
+ * ],
543
+ * {
544
+ * hydrationData: {
545
+ * loaderData: {
546
+ * root: "ROOT DATA",
547
+ * // No index data provided
548
+ * },
549
+ * },
550
+ * }
551
+ * );
552
+ * ```
553
+ */
554
+ hydrationData?: HydrationState;
555
+ /**
556
+ * Array of instrumentation objects allowing you to instrument the router and
557
+ * individual routes prior to router initialization (and on any subsequently
558
+ * added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
559
+ * mostly useful for observability such as wrapping navigations, fetches,
560
+ * as well as route loaders/actions/middlewares with logging and/or performance
561
+ * tracing. See the [docs](../../how-to/instrumentation) for more information.
562
+ *
563
+ * ```tsx
564
+ * let router = createBrowserRouter(routes, {
565
+ * unstable_instrumentations: [logging]
566
+ * });
567
+ *
568
+ *
569
+ * let logging = {
570
+ * router({ instrument }) {
571
+ * instrument({
572
+ * navigate: (impl, info) => logExecution(`navigate ${info.to}`, impl),
573
+ * fetch: (impl, info) => logExecution(`fetch ${info.to}`, impl)
574
+ * });
575
+ * },
576
+ * route({ instrument, id }) {
577
+ * instrument({
578
+ * middleware: (impl, info) => logExecution(
579
+ * `middleware ${info.request.url} (route ${id})`,
580
+ * impl
581
+ * ),
582
+ * loader: (impl, info) => logExecution(
583
+ * `loader ${info.request.url} (route ${id})`,
584
+ * impl
585
+ * ),
586
+ * action: (impl, info) => logExecution(
587
+ * `action ${info.request.url} (route ${id})`,
588
+ * impl
589
+ * ),
590
+ * })
591
+ * }
592
+ * };
593
+ *
594
+ * async function logExecution(label: string, impl: () => Promise<void>) {
595
+ * let start = performance.now();
596
+ * console.log(`start ${label}`);
597
+ * await impl();
598
+ * let duration = Math.round(performance.now() - start);
599
+ * console.log(`end ${label} (${duration}ms)`);
600
+ * }
601
+ * ```
602
+ */
603
+ unstable_instrumentations?: unstable_ClientInstrumentation[];
604
+ /**
605
+ * Override the default data strategy of running loaders in parallel -
606
+ * see the [docs](../../how-to/data-strategy) for more information.
607
+ *
608
+ * ```tsx
609
+ * let router = createBrowserRouter(routes, {
610
+ * async dataStrategy({
611
+ * matches,
612
+ * request,
613
+ * runClientMiddleware,
614
+ * }) {
615
+ * const matchesToLoad = matches.filter((m) =>
616
+ * m.shouldCallHandler(),
617
+ * );
618
+ *
619
+ * const results: Record<string, DataStrategyResult> = {};
620
+ * await runClientMiddleware(() =>
621
+ * Promise.all(
622
+ * matchesToLoad.map(async (match) => {
623
+ * results[match.route.id] = await match.resolve();
624
+ * }),
625
+ * ),
626
+ * );
627
+ * return results;
628
+ * },
629
+ * });
630
+ * ```
631
+ */
632
+ dataStrategy?: DataStrategyFunction;
633
+ /**
634
+ * Lazily define portions of the route tree on navigations.
635
+ * See {@link PatchRoutesOnNavigationFunction}.
636
+ *
637
+ * By default, React Router wants you to provide a full route tree up front via
638
+ * `createBrowserRouter(routes)`. This allows React Router to perform synchronous
639
+ * route matching, execute loaders, and then render route components in the most
640
+ * optimistic manner without introducing waterfalls. The tradeoff is that your
641
+ * initial JS bundle is larger by definition — which may slow down application
642
+ * start-up times as your application grows.
643
+ *
644
+ * To combat this, we introduced [`route.lazy`](../../start/data/route-object#lazy)
645
+ * in [v6.9.0](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v690)
646
+ * which lets you lazily load the route _implementation_ ([`loader`](../../start/data/route-object#loader),
647
+ * [`Component`](../../start/data/route-object#Component), etc.) while still
648
+ * providing the route _definition_ aspects up front (`path`, `index`, etc.).
649
+ * This is a good middle ground. React Router still knows about your route
650
+ * definitions (the lightweight part) up front and can perform synchronous
651
+ * route matching, but then delay loading any of the route implementation
652
+ * aspects (the heavier part) until the route is actually navigated to.
653
+ *
654
+ * In some cases, even this doesn't go far enough. For huge applications,
655
+ * providing all route definitions up front can be prohibitively expensive.
656
+ * Additionally, it might not even be possible to provide all route definitions
657
+ * up front in certain Micro-Frontend or Module-Federation architectures.
658
+ *
659
+ * This is where `patchRoutesOnNavigation` comes in ([RFC](https://github.com/remix-run/react-router/discussions/11113)).
660
+ * This API is for advanced use-cases where you are unable to provide the full
661
+ * route tree up-front and need a way to lazily "discover" portions of the route
662
+ * tree at runtime. This feature is often referred to as ["Fog of War"](https://en.wikipedia.org/wiki/Fog_of_war),
663
+ * because similar to how video games expand the "world" as you move around -
664
+ * the router would be expanding its routing tree as the user navigated around
665
+ * the app - but would only ever end up loading portions of the tree that the
666
+ * user visited.
667
+ *
668
+ * `patchRoutesOnNavigation` will be called anytime React Router is unable to
669
+ * match a `path`. The arguments include the `path`, any partial `matches`,
670
+ * and a `patch` function you can call to patch new routes into the tree at a
671
+ * specific location. This method is executed during the `loading` portion of
672
+ * the navigation for `GET` requests and during the `submitting` portion of
673
+ * the navigation for non-`GET` requests.
674
+ *
675
+ * <details>
676
+ * <summary><b>Example <code>patchRoutesOnNavigation</code> Use Cases</b></summary>
677
+ *
678
+ * **Patching children into an existing route**
679
+ *
680
+ * ```tsx
681
+ * const router = createBrowserRouter(
682
+ * [
683
+ * {
684
+ * id: "root",
685
+ * path: "/",
686
+ * Component: RootComponent,
687
+ * },
688
+ * ],
689
+ * {
690
+ * async patchRoutesOnNavigation({ patch, path }) {
691
+ * if (path === "/a") {
692
+ * // Load/patch the `a` route as a child of the route with id `root`
693
+ * let route = await getARoute();
694
+ * // ^ { path: 'a', Component: A }
695
+ * patch("root", [route]);
696
+ * }
697
+ * },
698
+ * }
699
+ * );
700
+ * ```
701
+ *
702
+ * In the above example, if the user clicks a link to `/a`, React Router
703
+ * won't match any routes initially and will call `patchRoutesOnNavigation`
704
+ * with a `path = "/a"` and a `matches` array containing the root route
705
+ * match. By calling `patch('root', [route])`, the new route will be added
706
+ * to the route tree as a child of the `root` route and React Router will
707
+ * perform matching on the updated routes. This time it will successfully
708
+ * match the `/a` path and the navigation will complete successfully.
709
+ *
710
+ * **Patching new root-level routes**
711
+ *
712
+ * If you need to patch a new route to the top of the tree (i.e., it doesn't
713
+ * have a parent), you can pass `null` as the `routeId`:
714
+ *
715
+ * ```tsx
716
+ * const router = createBrowserRouter(
717
+ * [
718
+ * {
719
+ * id: "root",
720
+ * path: "/",
721
+ * Component: RootComponent,
722
+ * },
723
+ * ],
724
+ * {
725
+ * async patchRoutesOnNavigation({ patch, path }) {
726
+ * if (path === "/root-sibling") {
727
+ * // Load/patch the `/root-sibling` route as a sibling of the root route
728
+ * let route = await getRootSiblingRoute();
729
+ * // ^ { path: '/root-sibling', Component: RootSibling }
730
+ * patch(null, [route]);
731
+ * }
732
+ * },
733
+ * }
734
+ * );
735
+ * ```
736
+ *
737
+ * **Patching subtrees asynchronously**
738
+ *
739
+ * You can also perform asynchronous matching to lazily fetch entire sections
740
+ * of your application:
741
+ *
742
+ * ```tsx
743
+ * let router = createBrowserRouter(
744
+ * [
745
+ * {
746
+ * path: "/",
747
+ * Component: Home,
748
+ * },
749
+ * ],
750
+ * {
751
+ * async patchRoutesOnNavigation({ patch, path }) {
752
+ * if (path.startsWith("/dashboard")) {
753
+ * let children = await import("./dashboard");
754
+ * patch(null, children);
755
+ * }
756
+ * if (path.startsWith("/account")) {
757
+ * let children = await import("./account");
758
+ * patch(null, children);
759
+ * }
760
+ * },
761
+ * }
762
+ * );
763
+ * ```
764
+ *
765
+ * <docs-info>If in-progress execution of `patchRoutesOnNavigation` is
766
+ * interrupted by a later navigation, then any remaining `patch` calls in
767
+ * the interrupted execution will not update the route tree because the
768
+ * operation was cancelled.</docs-info>
769
+ *
770
+ * **Co-locating route discovery with route definition**
771
+ *
772
+ * If you don't wish to perform your own pseudo-matching, you can leverage
773
+ * the partial `matches` array and the [`handle`](../../start/data/route-object#handle)
774
+ * field on a route to keep the children definitions co-located:
775
+ *
776
+ * ```tsx
777
+ * let router = createBrowserRouter(
778
+ * [
779
+ * {
780
+ * path: "/",
781
+ * Component: Home,
782
+ * },
783
+ * {
784
+ * path: "/dashboard",
785
+ * children: [
786
+ * {
787
+ * // If we want to include /dashboard in the critical routes, we need to
788
+ * // also include it's index route since patchRoutesOnNavigation will not be
789
+ * // called on a navigation to `/dashboard` because it will have successfully
790
+ * // matched the `/dashboard` parent route
791
+ * index: true,
792
+ * // ...
793
+ * },
794
+ * ],
795
+ * handle: {
796
+ * lazyChildren: () => import("./dashboard"),
797
+ * },
798
+ * },
799
+ * {
800
+ * path: "/account",
801
+ * children: [
802
+ * {
803
+ * index: true,
804
+ * // ...
805
+ * },
806
+ * ],
807
+ * handle: {
808
+ * lazyChildren: () => import("./account"),
809
+ * },
810
+ * },
811
+ * ],
812
+ * {
813
+ * async patchRoutesOnNavigation({ matches, patch }) {
814
+ * let leafRoute = matches[matches.length - 1]?.route;
815
+ * if (leafRoute?.handle?.lazyChildren) {
816
+ * let children =
817
+ * await leafRoute.handle.lazyChildren();
818
+ * patch(leafRoute.id, children);
819
+ * }
820
+ * },
821
+ * }
822
+ * );
823
+ * ```
824
+ *
825
+ * **A note on routes with parameters**
826
+ *
827
+ * Because React Router uses ranked routes to find the best match for a
828
+ * given path, there is an interesting ambiguity introduced when only a
829
+ * partial route tree is known at any given point in time. If we match a
830
+ * fully static route such as `path: "/about/contact-us"` then we know we've
831
+ * found the right match since it's composed entirely of static URL segments.
832
+ * Thus, we do not need to bother asking for any other potentially
833
+ * higher-scoring routes.
834
+ *
835
+ * However, routes with parameters (dynamic or splat) can't make this
836
+ * assumption because there might be a not-yet-discovered route that scores
837
+ * higher. Consider a full route tree such as:
838
+ *
839
+ * ```tsx
840
+ * // Assume this is the full route tree for your app
841
+ * const routes = [
842
+ * {
843
+ * path: "/",
844
+ * Component: Home,
845
+ * },
846
+ * {
847
+ * id: "blog",
848
+ * path: "/blog",
849
+ * Component: BlogLayout,
850
+ * children: [
851
+ * { path: "new", Component: NewPost },
852
+ * { path: ":slug", Component: BlogPost },
853
+ * ],
854
+ * },
855
+ * ];
856
+ * ```
857
+ *
858
+ * And then assume we want to use `patchRoutesOnNavigation` to fill this in
859
+ * as the user navigates around:
860
+ *
861
+ * ```tsx
862
+ * // Start with only the index route
863
+ * const router = createBrowserRouter(
864
+ * [
865
+ * {
866
+ * path: "/",
867
+ * Component: Home,
868
+ * },
869
+ * ],
870
+ * {
871
+ * async patchRoutesOnNavigation({ patch, path }) {
872
+ * if (path === "/blog/new") {
873
+ * patch("blog", [
874
+ * {
875
+ * path: "new",
876
+ * Component: NewPost,
877
+ * },
878
+ * ]);
879
+ * } else if (path.startsWith("/blog")) {
880
+ * patch("blog", [
881
+ * {
882
+ * path: ":slug",
883
+ * Component: BlogPost,
884
+ * },
885
+ * ]);
886
+ * }
887
+ * },
888
+ * }
889
+ * );
890
+ * ```
891
+ *
892
+ * If the user were to a blog post first (i.e., `/blog/my-post`) we would
893
+ * patch in the `:slug` route. Then, if the user navigated to `/blog/new` to
894
+ * write a new post, we'd match `/blog/:slug` but it wouldn't be the _right_
895
+ * match! We need to call `patchRoutesOnNavigation` just in case there
896
+ * exists a higher-scoring route we've not yet discovered, which in this
897
+ * case there is.
898
+ *
899
+ * So, anytime React Router matches a path that contains at least one param,
900
+ * it will call `patchRoutesOnNavigation` and match routes again just to
901
+ * confirm it has found the best match.
902
+ *
903
+ * If your `patchRoutesOnNavigation` implementation is expensive or making
904
+ * side effect [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch)
905
+ * calls to a backend server, you may want to consider tracking previously
906
+ * seen routes to avoid over-fetching in cases where you know the proper
907
+ * route has already been found. This can usually be as simple as
908
+ * maintaining a small cache of prior `path` values for which you've already
909
+ * patched in the right routes:
910
+ *
911
+ * ```tsx
912
+ * let discoveredRoutes = new Set();
913
+ *
914
+ * const router = createBrowserRouter(routes, {
915
+ * async patchRoutesOnNavigation({ patch, path }) {
916
+ * if (discoveredRoutes.has(path)) {
917
+ * // We've seen this before so nothing to patch in and we can let the router
918
+ * // use the routes it already knows about
919
+ * return;
920
+ * }
921
+ *
922
+ * discoveredRoutes.add(path);
923
+ *
924
+ * // ... patch routes in accordingly
925
+ * },
926
+ * });
927
+ * ```
928
+ * </details>
929
+ */
930
+ patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
931
+ /**
932
+ * [`Window`](https://developer.mozilla.org/en-US/docs/Web/API/Window) object
933
+ * override. Defaults to the global `window` instance.
934
+ */
935
+ window?: Window;
936
+ }
937
+ /**
938
+ * Create a new {@link DataRouter| data router} that manages the application
939
+ * path via [`history.pushState`](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState)
940
+ * and [`history.replaceState`](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState).
941
+ *
942
+ * @public
943
+ * @category Data Routers
944
+ * @mode data
945
+ * @param routes Application routes
946
+ * @param opts Options
947
+ * @param {DOMRouterOpts.basename} opts.basename n/a
948
+ * @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
949
+ * @param {DOMRouterOpts.future} opts.future n/a
950
+ * @param {DOMRouterOpts.getContext} opts.getContext n/a
951
+ * @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
952
+ * @param {DOMRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
953
+ * @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
954
+ * @param {DOMRouterOpts.window} opts.window n/a
955
+ * @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}
956
+ */
957
+ declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts): Router;
958
+ /**
959
+ * Create a new {@link DataRouter| data router} that manages the application
960
+ * path via the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash).
961
+ *
962
+ * @public
963
+ * @category Data Routers
964
+ * @mode data
965
+ * @param routes Application routes
966
+ * @param opts Options
967
+ * @param {DOMRouterOpts.basename} opts.basename n/a
968
+ * @param {DOMRouterOpts.future} opts.future n/a
969
+ * @param {DOMRouterOpts.getContext} opts.getContext n/a
970
+ * @param {DOMRouterOpts.hydrationData} opts.hydrationData n/a
971
+ * @param {DOMRouterOpts.unstable_instrumentations} opts.unstable_instrumentations n/a
972
+ * @param {DOMRouterOpts.dataStrategy} opts.dataStrategy n/a
973
+ * @param {DOMRouterOpts.patchRoutesOnNavigation} opts.patchRoutesOnNavigation n/a
974
+ * @param {DOMRouterOpts.window} opts.window n/a
975
+ * @returns An initialized {@link DataRouter| data router} to pass to {@link RouterProvider | `<RouterProvider>`}
976
+ */
977
+ declare function createHashRouter(routes: RouteObject[], opts?: DOMRouterOpts): Router;
978
+ /**
979
+ * @category Types
980
+ */
981
+ interface BrowserRouterProps {
982
+ /**
983
+ * Application basename
984
+ */
985
+ basename?: string;
986
+ /**
987
+ * {@link Route | `<Route>`} components describing your route configuration
988
+ */
989
+ children?: React.ReactNode;
990
+ /**
991
+ * Control whether router state updates are internally wrapped in
992
+ * [`React.startTransition`](https://react.dev/reference/react/startTransition).
993
+ *
994
+ * - When left `undefined`, all router state updates are wrapped in
995
+ * `React.startTransition`
996
+ * - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
997
+ * in `React.startTransition` and all router state updates are wrapped in
998
+ * `React.startTransition`
999
+ * - When set to `false`, the router will not leverage `React.startTransition`
1000
+ * on any navigations or state changes.
1001
+ *
1002
+ * For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
1003
+ */
1004
+ unstable_useTransitions?: boolean;
1005
+ /**
1006
+ * [`Window`](https://developer.mozilla.org/en-US/docs/Web/API/Window) object
1007
+ * override. Defaults to the global `window` instance
1008
+ */
1009
+ window?: Window;
1010
+ }
1011
+ /**
1012
+ * A declarative {@link Router | `<Router>`} using the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1013
+ * API for client-side routing.
1014
+ *
1015
+ * @public
1016
+ * @category Declarative Routers
1017
+ * @mode declarative
1018
+ * @param props Props
1019
+ * @param {BrowserRouterProps.basename} props.basename n/a
1020
+ * @param {BrowserRouterProps.children} props.children n/a
1021
+ * @param {BrowserRouterProps.unstable_useTransitions} props.unstable_useTransitions n/a
1022
+ * @param {BrowserRouterProps.window} props.window n/a
1023
+ * @returns A declarative {@link Router | `<Router>`} using the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1024
+ * API for client-side routing.
1025
+ */
1026
+ declare function BrowserRouter({ basename, children, unstable_useTransitions, window, }: BrowserRouterProps): React.JSX.Element;
1027
+ /**
1028
+ * @category Types
1029
+ */
1030
+ interface HashRouterProps {
1031
+ /**
1032
+ * Application basename
1033
+ */
1034
+ basename?: string;
1035
+ /**
1036
+ * {@link Route | `<Route>`} components describing your route configuration
1037
+ */
1038
+ children?: React.ReactNode;
1039
+ /**
1040
+ * Control whether router state updates are internally wrapped in
1041
+ * [`React.startTransition`](https://react.dev/reference/react/startTransition).
1042
+ *
1043
+ * - When left `undefined`, all router state updates are wrapped in
1044
+ * `React.startTransition`
1045
+ * - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
1046
+ * in `React.startTransition` and all router state updates are wrapped in
1047
+ * `React.startTransition`
1048
+ * - When set to `false`, the router will not leverage `React.startTransition`
1049
+ * on any navigations or state changes.
1050
+ *
1051
+ * For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
1052
+ */
1053
+ unstable_useTransitions?: boolean;
1054
+ /**
1055
+ * [`Window`](https://developer.mozilla.org/en-US/docs/Web/API/Window) object
1056
+ * override. Defaults to the global `window` instance
1057
+ */
1058
+ window?: Window;
1059
+ }
1060
+ /**
1061
+ * A declarative {@link Router | `<Router>`} that stores the location in the
1062
+ * [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash) portion
1063
+ * of the URL so it is not sent to the server.
1064
+ *
1065
+ * @public
1066
+ * @category Declarative Routers
1067
+ * @mode declarative
1068
+ * @param props Props
1069
+ * @param {HashRouterProps.basename} props.basename n/a
1070
+ * @param {HashRouterProps.children} props.children n/a
1071
+ * @param {HashRouterProps.unstable_useTransitions} props.unstable_useTransitions n/a
1072
+ * @param {HashRouterProps.window} props.window n/a
1073
+ * @returns A declarative {@link Router | `<Router>`} using the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash)
1074
+ * for client-side routing.
1075
+ */
1076
+ declare function HashRouter({ basename, children, unstable_useTransitions, window, }: HashRouterProps): React.JSX.Element;
1077
+ /**
1078
+ * @category Types
1079
+ */
1080
+ interface HistoryRouterProps {
1081
+ /**
1082
+ * Application basename
1083
+ */
1084
+ basename?: string;
1085
+ /**
1086
+ * {@link Route | `<Route>`} components describing your route configuration
1087
+ */
1088
+ children?: React.ReactNode;
1089
+ /**
1090
+ * A {@link History} implementation for use by the router
1091
+ */
1092
+ history: History;
1093
+ /**
1094
+ * Control whether router state updates are internally wrapped in
1095
+ * [`React.startTransition`](https://react.dev/reference/react/startTransition).
1096
+ *
1097
+ * - When left `undefined`, all router state updates are wrapped in
1098
+ * `React.startTransition`
1099
+ * - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
1100
+ * in `React.startTransition` and all router state updates are wrapped in
1101
+ * `React.startTransition`
1102
+ * - When set to `false`, the router will not leverage `React.startTransition`
1103
+ * on any navigations or state changes.
1104
+ *
1105
+ * For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
1106
+ */
1107
+ unstable_useTransitions?: boolean;
1108
+ }
1109
+ /**
1110
+ * A declarative {@link Router | `<Router>`} that accepts a pre-instantiated
1111
+ * `history` object.
1112
+ * It's important to note that using your own `history` object is highly discouraged
1113
+ * and may add two versions of the `history` library to your bundles unless you use
1114
+ * the same version of the `history` library that React Router uses internally.
1115
+ *
1116
+ * @name unstable_HistoryRouter
1117
+ * @public
1118
+ * @category Declarative Routers
1119
+ * @mode declarative
1120
+ * @param props Props
1121
+ * @param {HistoryRouterProps.basename} props.basename n/a
1122
+ * @param {HistoryRouterProps.children} props.children n/a
1123
+ * @param {HistoryRouterProps.history} props.history n/a
1124
+ * @param {HistoryRouterProps.unstable_useTransitions} props.unstable_useTransitions n/a
1125
+ * @returns A declarative {@link Router | `<Router>`} using the provided history
1126
+ * implementation for client-side routing.
1127
+ */
1128
+ declare function HistoryRouter({ basename, children, history, unstable_useTransitions, }: HistoryRouterProps): React.JSX.Element;
1129
+ declare namespace HistoryRouter {
1130
+ var displayName: string;
1131
+ }
1132
+ /**
1133
+ * @category Types
1134
+ */
1135
+ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
1136
+ /**
1137
+ * Defines the link [lazy route discovery](../../explanation/lazy-route-discovery) behavior.
1138
+ *
1139
+ * - **render** — default, discover the route when the link renders
1140
+ * - **none** — don't eagerly discover, only discover if the link is clicked
1141
+ *
1142
+ * ```tsx
1143
+ * <Link /> // default ("render")
1144
+ * <Link discover="render" />
1145
+ * <Link discover="none" />
1146
+ * ```
1147
+ */
1148
+ discover?: DiscoverBehavior;
1149
+ /**
1150
+ * Defines the data and module prefetching behavior for the link.
1151
+ *
1152
+ * ```tsx
1153
+ * <Link /> // default
1154
+ * <Link prefetch="none" />
1155
+ * <Link prefetch="intent" />
1156
+ * <Link prefetch="render" />
1157
+ * <Link prefetch="viewport" />
1158
+ * ```
1159
+ *
1160
+ * - **none** — default, no prefetching
1161
+ * - **intent** — prefetches when the user hovers or focuses the link
1162
+ * - **render** — prefetches when the link renders
1163
+ * - **viewport** — prefetches when the link is in the viewport, very useful for mobile
1164
+ *
1165
+ * Prefetching is done with HTML [`<link rel="prefetch">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
1166
+ * tags. They are inserted after the link.
1167
+ *
1168
+ * ```tsx
1169
+ * <a href="..." />
1170
+ * <a href="..." />
1171
+ * <link rel="prefetch" /> // might conditionally render
1172
+ * ```
1173
+ *
1174
+ * Because of this, if you are using `nav :last-child` you will need to use
1175
+ * `nav :last-of-type` so the styles don't conditionally fall off your last link
1176
+ * (and any other similar selectors).
1177
+ */
1178
+ prefetch?: PrefetchBehavior;
1179
+ /**
1180
+ * Will use document navigation instead of client side routing when the link is
1181
+ * clicked: the browser will handle the transition normally (as if it were an
1182
+ * [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)).
1183
+ *
1184
+ * ```tsx
1185
+ * <Link to="/logout" reloadDocument />
1186
+ * ```
1187
+ */
1188
+ reloadDocument?: boolean;
1189
+ /**
1190
+ * Replaces the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1191
+ * stack instead of pushing a new one onto it.
1192
+ *
1193
+ * ```tsx
1194
+ * <Link replace />
1195
+ * ```
1196
+ *
1197
+ * ```
1198
+ * # with a history stack like this
1199
+ * A -> B
1200
+ *
1201
+ * # normal link click pushes a new entry
1202
+ * A -> B -> C
1203
+ *
1204
+ * # but with `replace`, B is replaced by C
1205
+ * A -> C
1206
+ * ```
1207
+ */
1208
+ replace?: boolean;
1209
+ /**
1210
+ * Adds persistent client side routing state to the next location.
1211
+ *
1212
+ * ```tsx
1213
+ * <Link to="/somewhere/else" state={{ some: "value" }} />
1214
+ * ```
1215
+ *
1216
+ * The location state is accessed from the `location`.
1217
+ *
1218
+ * ```tsx
1219
+ * function SomeComp() {
1220
+ * const location = useLocation();
1221
+ * location.state; // { some: "value" }
1222
+ * }
1223
+ * ```
1224
+ *
1225
+ * This state is inaccessible on the server as it is implemented on top of
1226
+ * [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state)
1227
+ */
1228
+ state?: any;
1229
+ /**
1230
+ * Prevents the scroll position from being reset to the top of the window when
1231
+ * the link is clicked and the app is using {@link ScrollRestoration}. This only
1232
+ * prevents new locations resetting scroll to the top, scroll position will be
1233
+ * restored for back/forward button navigation.
1234
+ *
1235
+ * ```tsx
1236
+ * <Link to="?tab=one" preventScrollReset />
1237
+ * ```
1238
+ */
1239
+ preventScrollReset?: boolean;
1240
+ /**
1241
+ * Defines the relative path behavior for the link.
1242
+ *
1243
+ * ```tsx
1244
+ * <Link to=".." /> // default: "route"
1245
+ * <Link relative="route" />
1246
+ * <Link relative="path" />
1247
+ * ```
1248
+ *
1249
+ * Consider a route hierarchy where a parent route pattern is `"blog"` and a child
1250
+ * route pattern is `"blog/:slug/edit"`.
1251
+ *
1252
+ * - **route** — default, resolves the link relative to the route pattern. In the
1253
+ * example above, a relative link of `"..."` will remove both `:slug/edit` segments
1254
+ * back to `"/blog"`.
1255
+ * - **path** — relative to the path so `"..."` will only remove one URL segment up
1256
+ * to `"/blog/:slug"`
1257
+ *
1258
+ * Note that index routes and layout routes do not have paths so they are not
1259
+ * included in the relative path calculation.
1260
+ */
1261
+ relative?: RelativeRoutingType;
1262
+ /**
1263
+ * Can be a string or a partial {@link Path}:
1264
+ *
1265
+ * ```tsx
1266
+ * <Link to="/some/path" />
1267
+ *
1268
+ * <Link
1269
+ * to={{
1270
+ * pathname: "/some/path",
1271
+ * search: "?query=string",
1272
+ * hash: "#hash",
1273
+ * }}
1274
+ * />
1275
+ * ```
1276
+ */
1277
+ to: To;
1278
+ /**
1279
+ * Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)
1280
+ * for this navigation.
1281
+ *
1282
+ * ```jsx
1283
+ * <Link to={to} viewTransition>
1284
+ * Click me
1285
+ * </Link>
1286
+ * ```
1287
+ *
1288
+ * To apply specific styles for the transition, see {@link useViewTransitionState}
1289
+ */
1290
+ viewTransition?: boolean;
1291
+ /**
1292
+ * Specify the default revalidation behavior for the navigation.
1293
+ *
1294
+ * ```tsx
1295
+ * <Link to="/some/path" unstable_defaultShouldRevalidate={false} />
1296
+ * ```
1297
+ *
1298
+ * If no `shouldRevalidate` functions are present on the active routes, then this
1299
+ * value will be used directly. Otherwise it will be passed into `shouldRevalidate`
1300
+ * so the route can make the final determination on revalidation. This can be
1301
+ * useful when updating search params and you don't want to trigger a revalidation.
1302
+ *
1303
+ * By default (when not specified), loaders will revalidate according to the routers
1304
+ * standard revalidation behavior.
1305
+ */
1306
+ unstable_defaultShouldRevalidate?: boolean;
1307
+ }
1308
+ /**
1309
+ * A progressively enhanced [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
1310
+ * wrapper to enable navigation with client-side routing.
1311
+ *
1312
+ * @example
1313
+ * import { Link } from "react-router";
1314
+ *
1315
+ * <Link to="/dashboard">Dashboard</Link>;
1316
+ *
1317
+ * <Link
1318
+ * to={{
1319
+ * pathname: "/some/path",
1320
+ * search: "?query=string",
1321
+ * hash: "#hash",
1322
+ * }}
1323
+ * />;
1324
+ *
1325
+ * @public
1326
+ * @category Components
1327
+ * @param {LinkProps.discover} props.discover [modes: framework] n/a
1328
+ * @param {LinkProps.prefetch} props.prefetch [modes: framework] n/a
1329
+ * @param {LinkProps.preventScrollReset} props.preventScrollReset [modes: framework, data] n/a
1330
+ * @param {LinkProps.relative} props.relative n/a
1331
+ * @param {LinkProps.reloadDocument} props.reloadDocument n/a
1332
+ * @param {LinkProps.replace} props.replace n/a
1333
+ * @param {LinkProps.state} props.state n/a
1334
+ * @param {LinkProps.to} props.to n/a
1335
+ * @param {LinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a
1336
+ * @param {LinkProps.unstable_defaultShouldRevalidate} props.unstable_defaultShouldRevalidate n/a
1337
+ */
1338
+ declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
1339
+ /**
1340
+ * The object passed to {@link NavLink} `children`, `className`, and `style` prop
1341
+ * callbacks to render and style the link based on its state.
1342
+ *
1343
+ * ```
1344
+ * // className
1345
+ * <NavLink
1346
+ * to="/messages"
1347
+ * className={({ isActive, isPending }) =>
1348
+ * isPending ? "pending" : isActive ? "active" : ""
1349
+ * }
1350
+ * >
1351
+ * Messages
1352
+ * </NavLink>
1353
+ *
1354
+ * // style
1355
+ * <NavLink
1356
+ * to="/messages"
1357
+ * style={({ isActive, isPending }) => {
1358
+ * return {
1359
+ * fontWeight: isActive ? "bold" : "",
1360
+ * color: isPending ? "red" : "black",
1361
+ * }
1362
+ * )}
1363
+ * />
1364
+ *
1365
+ * // children
1366
+ * <NavLink to="/tasks">
1367
+ * {({ isActive, isPending }) => (
1368
+ * <span className={isActive ? "active" : ""}>Tasks</span>
1369
+ * )}
1370
+ * </NavLink>
1371
+ * ```
1372
+ *
1373
+ */
1374
+ type NavLinkRenderProps = {
1375
+ /**
1376
+ * Indicates if the link's URL matches the current {@link Location}.
1377
+ */
1378
+ isActive: boolean;
1379
+ /**
1380
+ * Indicates if the pending {@link Location} matches the link's URL. Only
1381
+ * available in Framework/Data modes.
1382
+ */
1383
+ isPending: boolean;
1384
+ /**
1385
+ * Indicates if a view transition to the link's URL is in progress.
1386
+ * See {@link useViewTransitionState}
1387
+ */
1388
+ isTransitioning: boolean;
1389
+ };
1390
+ /**
1391
+ * @category Types
1392
+ */
1393
+ interface NavLinkProps extends Omit<LinkProps, "className" | "style" | "children"> {
1394
+ /**
1395
+ * Can be regular React children or a function that receives an object with the
1396
+ * `active` and `pending` states of the link.
1397
+ *
1398
+ * ```tsx
1399
+ * <NavLink to="/tasks">
1400
+ * {({ isActive }) => (
1401
+ * <span className={isActive ? "active" : ""}>Tasks</span>
1402
+ * )}
1403
+ * </NavLink>
1404
+ * ```
1405
+ */
1406
+ children?: React.ReactNode | ((props: NavLinkRenderProps) => React.ReactNode);
1407
+ /**
1408
+ * Changes the matching logic to make it case-sensitive:
1409
+ *
1410
+ * | Link | URL | isActive |
1411
+ * | -------------------------------------------- | ------------- | -------- |
1412
+ * | `<NavLink to="/SpOnGe-bOB" />` | `/sponge-bob` | true |
1413
+ * | `<NavLink to="/SpOnGe-bOB" caseSensitive />` | `/sponge-bob` | false |
1414
+ */
1415
+ caseSensitive?: boolean;
1416
+ /**
1417
+ * Classes are automatically applied to `NavLink` that correspond to the state.
1418
+ *
1419
+ * ```css
1420
+ * a.active {
1421
+ * color: red;
1422
+ * }
1423
+ * a.pending {
1424
+ * color: blue;
1425
+ * }
1426
+ * a.transitioning {
1427
+ * view-transition-name: my-transition;
1428
+ * }
1429
+ * ```
1430
+ *
1431
+ * Or you can specify a function that receives {@link NavLinkRenderProps} and
1432
+ * returns the `className`:
1433
+ *
1434
+ * ```tsx
1435
+ * <NavLink className={({ isActive, isPending }) => (
1436
+ * isActive ? "my-active-class" :
1437
+ * isPending ? "my-pending-class" :
1438
+ * ""
1439
+ * )} />
1440
+ * ```
1441
+ */
1442
+ className?: string | ((props: NavLinkRenderProps) => string | undefined);
1443
+ /**
1444
+ * Changes the matching logic for the `active` and `pending` states to only match
1445
+ * to the "end" of the {@link NavLinkProps.to}. If the URL is longer, it will no
1446
+ * longer be considered active.
1447
+ *
1448
+ * | Link | URL | isActive |
1449
+ * | ----------------------------- | ------------ | -------- |
1450
+ * | `<NavLink to="/tasks" />` | `/tasks` | true |
1451
+ * | `<NavLink to="/tasks" />` | `/tasks/123` | true |
1452
+ * | `<NavLink to="/tasks" end />` | `/tasks` | true |
1453
+ * | `<NavLink to="/tasks" end />` | `/tasks/123` | false |
1454
+ *
1455
+ * `<NavLink to="/">` is an exceptional case because _every_ URL matches `/`.
1456
+ * To avoid this matching every single route by default, it effectively ignores
1457
+ * the `end` prop and only matches when you're at the root route.
1458
+ */
1459
+ end?: boolean;
1460
+ /**
1461
+ * Styles can also be applied dynamically via a function that receives
1462
+ * {@link NavLinkRenderProps} and returns the styles:
1463
+ *
1464
+ * ```tsx
1465
+ * <NavLink to="/tasks" style={{ color: "red" }} />
1466
+ * <NavLink to="/tasks" style={({ isActive, isPending }) => ({
1467
+ * color:
1468
+ * isActive ? "red" :
1469
+ * isPending ? "blue" : "black"
1470
+ * })} />
1471
+ * ```
1472
+ */
1473
+ style?: React.CSSProperties | ((props: NavLinkRenderProps) => React.CSSProperties | undefined);
1474
+ }
1475
+ /**
1476
+ * Wraps {@link Link | `<Link>`} with additional props for styling active and
1477
+ * pending states.
1478
+ *
1479
+ * - Automatically applies classes to the link based on its `active` and `pending`
1480
+ * states, see {@link NavLinkProps.className}
1481
+ * - Note that `pending` is only available with Framework and Data modes.
1482
+ * - Automatically applies `aria-current="page"` to the link when the link is active.
1483
+ * See [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
1484
+ * on MDN.
1485
+ * - States are additionally available through the className, style, and children
1486
+ * render props. See {@link NavLinkRenderProps}.
1487
+ *
1488
+ * @example
1489
+ * <NavLink to="/message">Messages</NavLink>
1490
+ *
1491
+ * // Using render props
1492
+ * <NavLink
1493
+ * to="/messages"
1494
+ * className={({ isActive, isPending }) =>
1495
+ * isPending ? "pending" : isActive ? "active" : ""
1496
+ * }
1497
+ * >
1498
+ * Messages
1499
+ * </NavLink>
1500
+ *
1501
+ * @public
1502
+ * @category Components
1503
+ * @param {NavLinkProps.caseSensitive} props.caseSensitive n/a
1504
+ * @param {NavLinkProps.children} props.children n/a
1505
+ * @param {NavLinkProps.className} props.className n/a
1506
+ * @param {NavLinkProps.discover} props.discover [modes: framework] n/a
1507
+ * @param {NavLinkProps.end} props.end n/a
1508
+ * @param {NavLinkProps.prefetch} props.prefetch [modes: framework] n/a
1509
+ * @param {NavLinkProps.preventScrollReset} props.preventScrollReset [modes: framework, data] n/a
1510
+ * @param {NavLinkProps.relative} props.relative n/a
1511
+ * @param {NavLinkProps.reloadDocument} props.reloadDocument n/a
1512
+ * @param {NavLinkProps.replace} props.replace n/a
1513
+ * @param {NavLinkProps.state} props.state n/a
1514
+ * @param {NavLinkProps.style} props.style n/a
1515
+ * @param {NavLinkProps.to} props.to n/a
1516
+ * @param {NavLinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a
1517
+ */
1518
+ declare const NavLink: React.ForwardRefExoticComponent<NavLinkProps & React.RefAttributes<HTMLAnchorElement>>;
1519
+ /**
1520
+ * Form props shared by navigations and fetchers
1521
+ */
1522
+ interface SharedFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
1523
+ /**
1524
+ * The HTTP verb to use when the form is submitted. Supports `"delete"`,
1525
+ * `"get"`, `"patch"`, `"post"`, and `"put"`.
1526
+ *
1527
+ * Native [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)
1528
+ * only supports `"get"` and `"post"`, avoid the other verbs if you'd like to
1529
+ * support progressive enhancement
1530
+ */
1531
+ method?: HTMLFormMethod;
1532
+ /**
1533
+ * The encoding type to use for the form submission.
1534
+ *
1535
+ * ```tsx
1536
+ * <Form encType="application/x-www-form-urlencoded"/> // Default
1537
+ * <Form encType="multipart/form-data"/>
1538
+ * <Form encType="text/plain"/>
1539
+ * ```
1540
+ */
1541
+ encType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
1542
+ /**
1543
+ * The URL to submit the form data to. If `undefined`, this defaults to the
1544
+ * closest route in context.
1545
+ */
1546
+ action?: string;
1547
+ /**
1548
+ * Determines whether the form action is relative to the route hierarchy or
1549
+ * the pathname. Use this if you want to opt out of navigating the route
1550
+ * hierarchy and want to instead route based on slash-delimited URL segments.
1551
+ * See {@link RelativeRoutingType}.
1552
+ */
1553
+ relative?: RelativeRoutingType;
1554
+ /**
1555
+ * Prevent the scroll position from resetting to the top of the viewport on
1556
+ * completion of the navigation when using the
1557
+ * {@link ScrollRestoration | `<ScrollRestoration>`} component
1558
+ */
1559
+ preventScrollReset?: boolean;
1560
+ /**
1561
+ * A function to call when the form is submitted. If you call
1562
+ * [`event.preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
1563
+ * then this form will not do anything.
1564
+ */
1565
+ onSubmit?: React.FormEventHandler<HTMLFormElement>;
1566
+ /**
1567
+ * Specify the default revalidation behavior after this submission
1568
+ *
1569
+ * If no `shouldRevalidate` functions are present on the active routes, then this
1570
+ * value will be used directly. Otherwise it will be passed into `shouldRevalidate`
1571
+ * so the route can make the final determination on revalidation. This can be
1572
+ * useful when updating search params and you don't want to trigger a revalidation.
1573
+ *
1574
+ * By default (when not specified), loaders will revalidate according to the routers
1575
+ * standard revalidation behavior.
1576
+ */
1577
+ unstable_defaultShouldRevalidate?: boolean;
1578
+ }
1579
+ /**
1580
+ * Form props available to fetchers
1581
+ * @category Types
1582
+ */
1583
+ interface FetcherFormProps extends SharedFormProps {
1584
+ }
1585
+ /**
1586
+ * Form props available to navigations
1587
+ * @category Types
1588
+ */
1589
+ interface FormProps extends SharedFormProps {
1590
+ /**
1591
+ * Defines the form [lazy route discovery](../../explanation/lazy-route-discovery) behavior.
1592
+ *
1593
+ * - **render** — default, discover the route when the form renders
1594
+ * - **none** — don't eagerly discover, only discover if the form is submitted
1595
+ *
1596
+ * ```tsx
1597
+ * <Form /> // default ("render")
1598
+ * <Form discover="render" />
1599
+ * <Form discover="none" />
1600
+ * ```
1601
+ */
1602
+ discover?: DiscoverBehavior;
1603
+ /**
1604
+ * Indicates a specific fetcherKey to use when using `navigate={false}` so you
1605
+ * can pick up the fetcher's state in a different component in a {@link useFetcher}.
1606
+ */
1607
+ fetcherKey?: string;
1608
+ /**
1609
+ * When `false`, skips the navigation and submits via a fetcher internally.
1610
+ * This is essentially a shorthand for {@link useFetcher} + `<fetcher.Form>` where
1611
+ * you don't care about the resulting data in this component.
1612
+ */
1613
+ navigate?: boolean;
1614
+ /**
1615
+ * Forces a full document navigation instead of client side routing and data
1616
+ * fetch.
1617
+ */
1618
+ reloadDocument?: boolean;
1619
+ /**
1620
+ * Replaces the current entry in the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1621
+ * stack when the form navigates. Use this if you don't want the user to be
1622
+ * able to click "back" to the page with the form on it.
1623
+ */
1624
+ replace?: boolean;
1625
+ /**
1626
+ * State object to add to the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1627
+ * stack entry for this navigation
1628
+ */
1629
+ state?: any;
1630
+ /**
1631
+ * Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)
1632
+ * for this navigation. To apply specific styles during the transition, see
1633
+ * {@link useViewTransitionState}.
1634
+ */
1635
+ viewTransition?: boolean;
1636
+ }
1637
+ /**
1638
+ * A progressively enhanced HTML [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)
1639
+ * that submits data to actions via [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch),
1640
+ * activating pending states in {@link useNavigation} which enables advanced
1641
+ * user interfaces beyond a basic HTML [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form).
1642
+ * After a form's `action` completes, all data on the page is automatically
1643
+ * revalidated to keep the UI in sync with the data.
1644
+ *
1645
+ * Because it uses the HTML form API, server rendered pages are interactive at a
1646
+ * basic level before JavaScript loads. Instead of React Router managing the
1647
+ * submission, the browser manages the submission as well as the pending states
1648
+ * (like the spinning favicon). After JavaScript loads, React Router takes over
1649
+ * enabling web application user experiences.
1650
+ *
1651
+ * `Form` is most useful for submissions that should also change the URL or
1652
+ * otherwise add an entry to the browser history stack. For forms that shouldn't
1653
+ * manipulate the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1654
+ * stack, use {@link FetcherWithComponents.Form | `<fetcher.Form>`}.
1655
+ *
1656
+ * @example
1657
+ * import { Form } from "react-router";
1658
+ *
1659
+ * function NewEvent() {
1660
+ * return (
1661
+ * <Form action="/events" method="post">
1662
+ * <input name="title" type="text" />
1663
+ * <input name="description" type="text" />
1664
+ * </Form>
1665
+ * );
1666
+ * }
1667
+ *
1668
+ * @public
1669
+ * @category Components
1670
+ * @mode framework
1671
+ * @mode data
1672
+ * @param {FormProps.action} action n/a
1673
+ * @param {FormProps.discover} discover n/a
1674
+ * @param {FormProps.encType} encType n/a
1675
+ * @param {FormProps.fetcherKey} fetcherKey n/a
1676
+ * @param {FormProps.method} method n/a
1677
+ * @param {FormProps.navigate} navigate n/a
1678
+ * @param {FormProps.onSubmit} onSubmit n/a
1679
+ * @param {FormProps.preventScrollReset} preventScrollReset n/a
1680
+ * @param {FormProps.relative} relative n/a
1681
+ * @param {FormProps.reloadDocument} reloadDocument n/a
1682
+ * @param {FormProps.replace} replace n/a
1683
+ * @param {FormProps.state} state n/a
1684
+ * @param {FormProps.viewTransition} viewTransition n/a
1685
+ * @param {FormProps.unstable_defaultShouldRevalidate} unstable_defaultShouldRevalidate n/a
1686
+ * @returns A progressively enhanced [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) component
1687
+ */
1688
+ declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
1689
+ type ScrollRestorationProps = ScriptsProps & {
1690
+ /**
1691
+ * A function that returns a key to use for scroll restoration. This is useful
1692
+ * for custom scroll restoration logic, such as using only the pathname so
1693
+ * that later navigations to prior paths will restore the scroll. Defaults to
1694
+ * `location.key`. See {@link GetScrollRestorationKeyFunction}.
1695
+ *
1696
+ * ```tsx
1697
+ * <ScrollRestoration
1698
+ * getKey={(location, matches) => {
1699
+ * // Restore based on a unique location key (default behavior)
1700
+ * return location.key
1701
+ *
1702
+ * // Restore based on pathname
1703
+ * return location.pathname
1704
+ * }}
1705
+ * />
1706
+ * ```
1707
+ */
1708
+ getKey?: GetScrollRestorationKeyFunction;
1709
+ /**
1710
+ * The key to use for storing scroll positions in [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage).
1711
+ * Defaults to `"react-router-scroll-positions"`.
1712
+ */
1713
+ storageKey?: string;
1714
+ };
1715
+ /**
1716
+ * Emulates the browser's scroll restoration on location changes. Apps should only render one of these, right before the {@link Scripts} component.
1717
+ *
1718
+ * ```tsx
1719
+ * import { ScrollRestoration } from "react-router";
1720
+ *
1721
+ * export default function Root() {
1722
+ * return (
1723
+ * <html>
1724
+ * <body>
1725
+ * <ScrollRestoration />
1726
+ * <Scripts />
1727
+ * </body>
1728
+ * </html>
1729
+ * );
1730
+ * }
1731
+ * ```
1732
+ *
1733
+ * This component renders an inline `<script>` to prevent scroll flashing. The `nonce` prop will be passed down to the script tag to allow CSP nonce usage.
1734
+ *
1735
+ * ```tsx
1736
+ * <ScrollRestoration nonce={cspNonce} />
1737
+ * ```
1738
+ *
1739
+ * @public
1740
+ * @category Components
1741
+ * @mode framework
1742
+ * @mode data
1743
+ * @param props Props
1744
+ * @param {ScrollRestorationProps.getKey} props.getKey n/a
1745
+ * @param {ScriptsProps.nonce} props.nonce n/a
1746
+ * @param {ScrollRestorationProps.storageKey} props.storageKey n/a
1747
+ * @returns A [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
1748
+ * tag that restores scroll positions on navigation.
1749
+ */
1750
+ declare function ScrollRestoration({ getKey, storageKey, ...props }: ScrollRestorationProps): React.JSX.Element | null;
1751
+ declare namespace ScrollRestoration {
1752
+ var displayName: string;
1753
+ }
1754
+ /**
1755
+ * Handles the click behavior for router {@link Link | `<Link>`} components.This
1756
+ * is useful if you need to create custom {@link Link | `<Link>`} components with
1757
+ * the same click behavior we use in our exported {@link Link | `<Link>`}.
1758
+ *
1759
+ * @public
1760
+ * @category Hooks
1761
+ * @param to The URL to navigate to, can be a string or a partial {@link Path}.
1762
+ * @param options Options
1763
+ * @param options.preventScrollReset Whether to prevent the scroll position from
1764
+ * being reset to the top of the viewport on completion of the navigation when
1765
+ * using the {@link ScrollRestoration} component. Defaults to `false`.
1766
+ * @param options.relative The {@link RelativeRoutingType | relative routing type}
1767
+ * to use for the link. Defaults to `"route"`.
1768
+ * @param options.replace Whether to replace the current [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1769
+ * entry instead of pushing a new one. Defaults to `false`.
1770
+ * @param options.state The state to add to the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)
1771
+ * entry for this navigation. Defaults to `undefined`.
1772
+ * @param options.target The target attribute for the link. Defaults to `undefined`.
1773
+ * @param options.viewTransition Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)
1774
+ * for this navigation. To apply specific styles during the transition, see
1775
+ * {@link useViewTransitionState}. Defaults to `false`.
1776
+ * @param options.unstable_defaultShouldRevalidate Specify the default revalidation
1777
+ * behavior for the navigation. Defaults to `true`.
1778
+ * @param options.unstable_useTransitions Wraps the navigation in
1779
+ * [`React.startTransition`](https://react.dev/reference/react/startTransition)
1780
+ * for concurrent rendering. Defaults to `false`.
1781
+ * @returns A click handler function that can be used in a custom {@link Link} component.
1782
+ */
1783
+ declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions, }?: {
1784
+ target?: React.HTMLAttributeAnchorTarget;
1785
+ replace?: boolean;
1786
+ state?: any;
1787
+ preventScrollReset?: boolean;
1788
+ relative?: RelativeRoutingType;
1789
+ viewTransition?: boolean;
1790
+ unstable_defaultShouldRevalidate?: boolean;
1791
+ unstable_useTransitions?: boolean;
1792
+ }): (event: React.MouseEvent<E, MouseEvent>) => void;
1793
+ /**
1794
+ * Returns a tuple of the current URL's [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
1795
+ * and a function to update them. Setting the search params causes a navigation.
1796
+ *
1797
+ * ```tsx
1798
+ * import { useSearchParams } from "react-router";
1799
+ *
1800
+ * export function SomeComponent() {
1801
+ * const [searchParams, setSearchParams] = useSearchParams();
1802
+ * // ...
1803
+ * }
1804
+ * ```
1805
+ *
1806
+ * ### `setSearchParams` function
1807
+ *
1808
+ * The second element of the tuple is a function that can be used to update the
1809
+ * search params. It accepts the same types as `defaultInit` and will cause a
1810
+ * navigation to the new URL.
1811
+ *
1812
+ * ```tsx
1813
+ * let [searchParams, setSearchParams] = useSearchParams();
1814
+ *
1815
+ * // a search param string
1816
+ * setSearchParams("?tab=1");
1817
+ *
1818
+ * // a shorthand object
1819
+ * setSearchParams({ tab: "1" });
1820
+ *
1821
+ * // object keys can be arrays for multiple values on the key
1822
+ * setSearchParams({ brand: ["nike", "reebok"] });
1823
+ *
1824
+ * // an array of tuples
1825
+ * setSearchParams([["tab", "1"]]);
1826
+ *
1827
+ * // a `URLSearchParams` object
1828
+ * setSearchParams(new URLSearchParams("?tab=1"));
1829
+ * ```
1830
+ *
1831
+ * It also supports a function callback like React's
1832
+ * [`setState`](https://react.dev/reference/react/useState#setstate):
1833
+ *
1834
+ * ```tsx
1835
+ * setSearchParams((searchParams) => {
1836
+ * searchParams.set("tab", "2");
1837
+ * return searchParams;
1838
+ * });
1839
+ * ```
1840
+ *
1841
+ * <docs-warning>The function callback version of `setSearchParams` does not support
1842
+ * the [queueing](https://react.dev/reference/react/useState#setstate-parameters)
1843
+ * logic that React's `setState` implements. Multiple calls to `setSearchParams`
1844
+ * in the same tick will not build on the prior value. If you need this behavior,
1845
+ * you can use `setState` manually.</docs-warning>
1846
+ *
1847
+ * ### Notes
1848
+ *
1849
+ * Note that `searchParams` is a stable reference, so you can reliably use it
1850
+ * as a dependency in React's [`useEffect`](https://react.dev/reference/react/useEffect)
1851
+ * hooks.
1852
+ *
1853
+ * ```tsx
1854
+ * useEffect(() => {
1855
+ * console.log(searchParams.get("tab"));
1856
+ * }, [searchParams]);
1857
+ * ```
1858
+ *
1859
+ * However, this also means it's mutable. If you change the object without
1860
+ * calling `setSearchParams`, its values will change between renders if some
1861
+ * other state causes the component to re-render and URL will not reflect the
1862
+ * values.
1863
+ *
1864
+ * @public
1865
+ * @category Hooks
1866
+ * @param defaultInit
1867
+ * You can initialize the search params with a default value, though it **will
1868
+ * not** change the URL on the first render.
1869
+ *
1870
+ * ```tsx
1871
+ * // a search param string
1872
+ * useSearchParams("?tab=1");
1873
+ *
1874
+ * // a shorthand object
1875
+ * useSearchParams({ tab: "1" });
1876
+ *
1877
+ * // object keys can be arrays for multiple values on the key
1878
+ * useSearchParams({ brand: ["nike", "reebok"] });
1879
+ *
1880
+ * // an array of tuples
1881
+ * useSearchParams([["tab", "1"]]);
1882
+ *
1883
+ * // a `URLSearchParams` object
1884
+ * useSearchParams(new URLSearchParams("?tab=1"));
1885
+ * ```
1886
+ * @returns A tuple of the current [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
1887
+ * and a function to update them.
1888
+ */
1889
+ declare function useSearchParams(defaultInit?: URLSearchParamsInit): [URLSearchParams, SetURLSearchParams];
1890
+ /**
1891
+ * Sets new search params and causes a navigation when called.
1892
+ *
1893
+ * ```tsx
1894
+ * <button
1895
+ * onClick={() => {
1896
+ * const params = new URLSearchParams();
1897
+ * params.set("someKey", "someValue");
1898
+ * setSearchParams(params, {
1899
+ * preventScrollReset: true,
1900
+ * });
1901
+ * }}
1902
+ * />
1903
+ * ```
1904
+ *
1905
+ * It also supports a function for setting new search params.
1906
+ *
1907
+ * ```tsx
1908
+ * <button
1909
+ * onClick={() => {
1910
+ * setSearchParams((prev) => {
1911
+ * prev.set("someKey", "someValue");
1912
+ * return prev;
1913
+ * });
1914
+ * }}
1915
+ * />
1916
+ * ```
1917
+ */
1918
+ type SetURLSearchParams = (nextInit?: URLSearchParamsInit | ((prev: URLSearchParams) => URLSearchParamsInit), navigateOpts?: NavigateOptions) => void;
1919
+ /**
1920
+ * Submits a HTML [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)
1921
+ * to the server without reloading the page.
1922
+ */
1923
+ interface SubmitFunction {
1924
+ (
1925
+ /**
1926
+ * Can be multiple types of elements and objects
1927
+ *
1928
+ * **[`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement)**
1929
+ *
1930
+ * ```tsx
1931
+ * <Form
1932
+ * onSubmit={(event) => {
1933
+ * submit(event.currentTarget);
1934
+ * }}
1935
+ * />
1936
+ * ```
1937
+ *
1938
+ * **[`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)**
1939
+ *
1940
+ * ```tsx
1941
+ * const formData = new FormData();
1942
+ * formData.append("myKey", "myValue");
1943
+ * submit(formData, { method: "post" });
1944
+ * ```
1945
+ *
1946
+ * **Plain object that will be serialized as [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)**
1947
+ *
1948
+ * ```tsx
1949
+ * submit({ myKey: "myValue" }, { method: "post" });
1950
+ * ```
1951
+ *
1952
+ * **Plain object that will be serialized as JSON**
1953
+ *
1954
+ * ```tsx
1955
+ * submit(
1956
+ * { myKey: "myValue" },
1957
+ * { method: "post", encType: "application/json" }
1958
+ * );
1959
+ * ```
1960
+ */
1961
+ target: SubmitTarget,
1962
+ /**
1963
+ * Options that override the [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)'s
1964
+ * own attributes. Required when submitting arbitrary data without a backing
1965
+ * [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form).
1966
+ */
1967
+ options?: SubmitOptions): Promise<void>;
1968
+ }
1969
+ /**
1970
+ * Submits a fetcher [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) to the server without reloading the page.
1971
+ */
1972
+ interface FetcherSubmitFunction {
1973
+ (
1974
+ /**
1975
+ * Can be multiple types of elements and objects
1976
+ *
1977
+ * **[`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement)**
1978
+ *
1979
+ * ```tsx
1980
+ * <fetcher.Form
1981
+ * onSubmit={(event) => {
1982
+ * fetcher.submit(event.currentTarget);
1983
+ * }}
1984
+ * />
1985
+ * ```
1986
+ *
1987
+ * **[`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)**
1988
+ *
1989
+ * ```tsx
1990
+ * const formData = new FormData();
1991
+ * formData.append("myKey", "myValue");
1992
+ * fetcher.submit(formData, { method: "post" });
1993
+ * ```
1994
+ *
1995
+ * **Plain object that will be serialized as [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)**
1996
+ *
1997
+ * ```tsx
1998
+ * fetcher.submit({ myKey: "myValue" }, { method: "post" });
1999
+ * ```
2000
+ *
2001
+ * **Plain object that will be serialized as JSON**
2002
+ *
2003
+ * ```tsx
2004
+ * fetcher.submit(
2005
+ * { myKey: "myValue" },
2006
+ * { method: "post", encType: "application/json" }
2007
+ * );
2008
+ * ```
2009
+ */
2010
+ target: SubmitTarget, options?: FetcherSubmitOptions): Promise<void>;
2011
+ }
2012
+ /**
2013
+ * The imperative version of {@link Form | `<Form>`} that lets you submit a form
2014
+ * from code instead of a user interaction.
2015
+ *
2016
+ * @example
2017
+ * import { useSubmit } from "react-router";
2018
+ *
2019
+ * function SomeComponent() {
2020
+ * const submit = useSubmit();
2021
+ * return (
2022
+ * <Form onChange={(event) => submit(event.currentTarget)} />
2023
+ * );
2024
+ * }
2025
+ *
2026
+ * @public
2027
+ * @category Hooks
2028
+ * @mode framework
2029
+ * @mode data
2030
+ * @returns A function that can be called to submit a {@link Form} imperatively.
2031
+ */
2032
+ declare function useSubmit(): SubmitFunction;
2033
+ /**
2034
+ * Resolves the URL to the closest route in the component hierarchy instead of
2035
+ * the current URL of the app.
2036
+ *
2037
+ * This is used internally by {@link Form} to resolve the `action` to the closest
2038
+ * route, but can be used generically as well.
2039
+ *
2040
+ * @example
2041
+ * import { useFormAction } from "react-router";
2042
+ *
2043
+ * function SomeComponent() {
2044
+ * // closest route URL
2045
+ * let action = useFormAction();
2046
+ *
2047
+ * // closest route URL + "destroy"
2048
+ * let destroyAction = useFormAction("destroy");
2049
+ * }
2050
+ *
2051
+ * @public
2052
+ * @category Hooks
2053
+ * @mode framework
2054
+ * @mode data
2055
+ * @param action The action to append to the closest route URL. Defaults to the
2056
+ * closest route URL.
2057
+ * @param options Options
2058
+ * @param options.relative The relative routing type to use when resolving the
2059
+ * action. Defaults to `"route"`.
2060
+ * @returns The resolved action URL.
2061
+ */
2062
+ declare function useFormAction(action?: string, { relative }?: {
2063
+ relative?: RelativeRoutingType;
2064
+ }): string;
2065
+ /**
2066
+ * The return value {@link useFetcher} that keeps track of the state of a fetcher.
2067
+ *
2068
+ * ```tsx
2069
+ * let fetcher = useFetcher();
2070
+ * ```
2071
+ */
2072
+ type FetcherWithComponents<TData> = Fetcher<TData> & {
2073
+ /**
2074
+ * Just like {@link Form} except it doesn't cause a navigation.
2075
+ *
2076
+ * ```tsx
2077
+ * function SomeComponent() {
2078
+ * const fetcher = useFetcher()
2079
+ * return (
2080
+ * <fetcher.Form method="post" action="/some/route">
2081
+ * <input type="text" />
2082
+ * </fetcher.Form>
2083
+ * )
2084
+ * }
2085
+ * ```
2086
+ */
2087
+ Form: React.ForwardRefExoticComponent<FetcherFormProps & React.RefAttributes<HTMLFormElement>>;
2088
+ /**
2089
+ * Loads data from a route. Useful for loading data imperatively inside user
2090
+ * events outside a normal button or form, like a combobox or search input.
2091
+ *
2092
+ * ```tsx
2093
+ * let fetcher = useFetcher()
2094
+ *
2095
+ * <input onChange={e => {
2096
+ * fetcher.load(`/search?q=${e.target.value}`)
2097
+ * }} />
2098
+ * ```
2099
+ */
2100
+ load: (href: string, opts?: {
2101
+ /**
2102
+ * Wraps the initial state update for this `fetcher.load` in a
2103
+ * [`ReactDOM.flushSync`](https://react.dev/reference/react-dom/flushSync)
2104
+ * call instead of the default [`React.startTransition`](https://react.dev/reference/react/startTransition).
2105
+ * This allows you to perform synchronous DOM actions immediately after the
2106
+ * update is flushed to the DOM.
2107
+ */
2108
+ flushSync?: boolean;
2109
+ }) => Promise<void>;
2110
+ /**
2111
+ * Reset a fetcher back to an empty/idle state.
2112
+ *
2113
+ * If the fetcher is currently in-flight, the
2114
+ * [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)
2115
+ * will be aborted with the `reason`, if provided.
2116
+ *
2117
+ * @param reason Optional `reason` to provide to [`AbortController.abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort)
2118
+ * @returns void
2119
+ */
2120
+ reset: (opts?: {
2121
+ reason?: unknown;
2122
+ }) => void;
2123
+ /**
2124
+ * Submits form data to a route. While multiple nested routes can match a URL, only the leaf route will be called.
2125
+ *
2126
+ * The `formData` can be multiple types:
2127
+ *
2128
+ * - [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
2129
+ * A `FormData` instance.
2130
+ * - [`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement)
2131
+ * A [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) DOM element.
2132
+ * - `Object`
2133
+ * An object of key/value-pairs that will be converted to a [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
2134
+ * instance by default. You can pass a more complex object and serialize it
2135
+ * as JSON by specifying `encType: "application/json"`. See
2136
+ * {@link useSubmit} for more details.
2137
+ *
2138
+ * If the method is `GET`, then the route [`loader`](../../start/framework/route-module#loader)
2139
+ * is being called and with the `formData` serialized to the url as [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
2140
+ * If `DELETE`, `PATCH`, `POST`, or `PUT`, then the route [`action`](../../start/framework/route-module#action)
2141
+ * is being called with `formData` as the body.
2142
+ *
2143
+ * ```tsx
2144
+ * // Submit a FormData instance (GET request)
2145
+ * const formData = new FormData();
2146
+ * fetcher.submit(formData);
2147
+ *
2148
+ * // Submit the HTML form element
2149
+ * fetcher.submit(event.currentTarget.form, {
2150
+ * method: "POST",
2151
+ * });
2152
+ *
2153
+ * // Submit key/value JSON as a FormData instance
2154
+ * fetcher.submit(
2155
+ * { serialized: "values" },
2156
+ * { method: "POST" }
2157
+ * );
2158
+ *
2159
+ * // Submit raw JSON
2160
+ * fetcher.submit(
2161
+ * {
2162
+ * deeply: {
2163
+ * nested: {
2164
+ * json: "values",
2165
+ * },
2166
+ * },
2167
+ * },
2168
+ * {
2169
+ * method: "POST",
2170
+ * encType: "application/json",
2171
+ * }
2172
+ * );
2173
+ * ```
2174
+ */
2175
+ submit: FetcherSubmitFunction;
2176
+ };
2177
+ /**
2178
+ * Useful for creating complex, dynamic user interfaces that require multiple,
2179
+ * concurrent data interactions without causing a navigation.
2180
+ *
2181
+ * Fetchers track their own, independent state and can be used to load data, submit
2182
+ * forms, and generally interact with [`action`](../../start/framework/route-module#action)
2183
+ * and [`loader`](../../start/framework/route-module#loader) functions.
2184
+ *
2185
+ * @example
2186
+ * import { useFetcher } from "react-router"
2187
+ *
2188
+ * function SomeComponent() {
2189
+ * let fetcher = useFetcher()
2190
+ *
2191
+ * // states are available on the fetcher
2192
+ * fetcher.state // "idle" | "loading" | "submitting"
2193
+ * fetcher.data // the data returned from the action or loader
2194
+ *
2195
+ * // render a form
2196
+ * <fetcher.Form method="post" />
2197
+ *
2198
+ * // load data
2199
+ * fetcher.load("/some/route")
2200
+ *
2201
+ * // submit data
2202
+ * fetcher.submit(someFormRef, { method: "post" })
2203
+ * fetcher.submit(someData, {
2204
+ * method: "post",
2205
+ * encType: "application/json"
2206
+ * })
2207
+ *
2208
+ * // reset fetcher
2209
+ * fetcher.reset()
2210
+ * }
2211
+ *
2212
+ * @public
2213
+ * @category Hooks
2214
+ * @mode framework
2215
+ * @mode data
2216
+ * @param options Options
2217
+ * @param options.key A unique key to identify the fetcher.
2218
+ *
2219
+ *
2220
+ * By default, `useFetcher` generates a unique fetcher scoped to that component.
2221
+ * If you want to identify a fetcher with your own key such that you can access
2222
+ * it from elsewhere in your app, you can do that with the `key` option:
2223
+ *
2224
+ * ```tsx
2225
+ * function SomeComp() {
2226
+ * let fetcher = useFetcher({ key: "my-key" })
2227
+ * // ...
2228
+ * }
2229
+ *
2230
+ * // Somewhere else
2231
+ * function AnotherComp() {
2232
+ * // this will be the same fetcher, sharing the state across the app
2233
+ * let fetcher = useFetcher({ key: "my-key" });
2234
+ * // ...
2235
+ * }
2236
+ * ```
2237
+ * @returns A {@link FetcherWithComponents} object that contains the fetcher's state, data, and components for submitting forms and loading data.
2238
+ */
2239
+ declare function useFetcher<T = any>({ key, }?: {
2240
+ key?: string;
2241
+ }): FetcherWithComponents<SerializeFrom<T>>;
2242
+ /**
2243
+ * Returns an array of all in-flight {@link Fetcher}s. This is useful for components
2244
+ * throughout the app that didn't create the fetchers but want to use their submissions
2245
+ * to participate in optimistic UI.
2246
+ *
2247
+ * @example
2248
+ * import { useFetchers } from "react-router";
2249
+ *
2250
+ * function SomeComponent() {
2251
+ * const fetchers = useFetchers();
2252
+ * fetchers[0].formData; // FormData
2253
+ * fetchers[0].state; // etc.
2254
+ * // ...
2255
+ * }
2256
+ *
2257
+ * @public
2258
+ * @category Hooks
2259
+ * @mode framework
2260
+ * @mode data
2261
+ * @returns An array of all in-flight {@link Fetcher}s, each with a unique `key`
2262
+ * property.
2263
+ */
2264
+ declare function useFetchers(): (Fetcher & {
2265
+ key: string;
2266
+ })[];
2267
+ /**
2268
+ * When rendered inside a {@link RouterProvider}, will restore scroll positions
2269
+ * on navigations
2270
+ *
2271
+ * <!--
2272
+ * Not marked `@public` because we only export as UNSAFE_ and therefore we don't
2273
+ * maintain an .md file for this hook
2274
+ * -->
2275
+ *
2276
+ * @name UNSAFE_useScrollRestoration
2277
+ * @category Hooks
2278
+ * @mode framework
2279
+ * @mode data
2280
+ * @param options Options
2281
+ * @param options.getKey A function that returns a key to use for scroll restoration.
2282
+ * This is useful for custom scroll restoration logic, such as using only the pathname
2283
+ * so that subsequent navigations to prior paths will restore the scroll. Defaults
2284
+ * to `location.key`.
2285
+ * @param options.storageKey The key to use for storing scroll positions in
2286
+ * `sessionStorage`. Defaults to `"react-router-scroll-positions"`.
2287
+ * @returns {void}
2288
+ */
2289
+ declare function useScrollRestoration({ getKey, storageKey, }?: {
2290
+ getKey?: GetScrollRestorationKeyFunction;
2291
+ storageKey?: string;
2292
+ }): void;
2293
+ /**
2294
+ * Set up a callback to be fired on [Window's `beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event).
2295
+ *
2296
+ * @public
2297
+ * @category Hooks
2298
+ * @param callback The callback to be called when the [`beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event)
2299
+ * is fired.
2300
+ * @param options Options
2301
+ * @param options.capture If `true`, the event will be captured during the capture
2302
+ * phase. Defaults to `false`.
2303
+ * @returns {void}
2304
+ */
2305
+ declare function useBeforeUnload(callback: (event: BeforeUnloadEvent) => any, options?: {
2306
+ capture?: boolean;
2307
+ }): void;
2308
+ /**
2309
+ * Wrapper around {@link useBlocker} to show a [`window.confirm`](https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm)
2310
+ * prompt to users instead of building a custom UI with {@link useBlocker}.
2311
+ *
2312
+ * The `unstable_` flag will not be removed because this technique has a lot of
2313
+ * rough edges and behaves very differently (and incorrectly sometimes) across
2314
+ * browsers if users click addition back/forward navigations while the
2315
+ * confirmation is open. Use at your own risk.
2316
+ *
2317
+ * @example
2318
+ * function ImportantForm() {
2319
+ * let [value, setValue] = React.useState("");
2320
+ *
2321
+ * // Block navigating elsewhere when data has been entered into the input
2322
+ * unstable_usePrompt({
2323
+ * message: "Are you sure?",
2324
+ * when: ({ currentLocation, nextLocation }) =>
2325
+ * value !== "" &&
2326
+ * currentLocation.pathname !== nextLocation.pathname,
2327
+ * });
2328
+ *
2329
+ * return (
2330
+ * <Form method="post">
2331
+ * <label>
2332
+ * Enter some important data:
2333
+ * <input
2334
+ * name="data"
2335
+ * value={value}
2336
+ * onChange={(e) => setValue(e.target.value)}
2337
+ * />
2338
+ * </label>
2339
+ * <button type="submit">Save</button>
2340
+ * </Form>
2341
+ * );
2342
+ * }
2343
+ *
2344
+ * @name unstable_usePrompt
2345
+ * @public
2346
+ * @category Hooks
2347
+ * @mode framework
2348
+ * @mode data
2349
+ * @param options Options
2350
+ * @param options.message The message to show in the confirmation dialog.
2351
+ * @param options.when A boolean or a function that returns a boolean indicating
2352
+ * whether to block the navigation. If a function is provided, it will receive an
2353
+ * object with `currentLocation` and `nextLocation` properties.
2354
+ * @returns {void}
2355
+ */
2356
+ declare function usePrompt({ when, message, }: {
2357
+ when: boolean | BlockerFunction;
2358
+ message: string;
2359
+ }): void;
2360
+ /**
2361
+ * This hook returns `true` when there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)
2362
+ * to the specified location. This can be used to apply finer-grained styles to
2363
+ * elements to further customize the view transition. This requires that view
2364
+ * transitions have been enabled for the given navigation via {@link LinkProps.viewTransition}
2365
+ * (or the `Form`, `submit`, or `navigate` call)
2366
+ *
2367
+ * @public
2368
+ * @category Hooks
2369
+ * @mode framework
2370
+ * @mode data
2371
+ * @param to The {@link To} location to check for an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API).
2372
+ * @param options Options
2373
+ * @param options.relative The relative routing type to use when resolving the
2374
+ * `to` location, defaults to `"route"`. See {@link RelativeRoutingType} for
2375
+ * more details.
2376
+ * @returns `true` if there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)
2377
+ * to the specified {@link Location}, otherwise `false`.
2378
+ */
2379
+ declare function useViewTransitionState(to: To, { relative }?: {
2380
+ relative?: RelativeRoutingType;
2381
+ }): boolean;
2382
+
2383
+ /**
2384
+ * @category Types
2385
+ */
2386
+ interface StaticRouterProps {
2387
+ /**
2388
+ * The base URL for the static router (default: `/`)
2389
+ */
2390
+ basename?: string;
2391
+ /**
2392
+ * The child elements to render inside the static router
2393
+ */
2394
+ children?: React.ReactNode;
2395
+ /**
2396
+ * The {@link Location} to render the static router at (default: `/`)
2397
+ */
2398
+ location: Partial<Location> | string;
2399
+ }
2400
+ /**
2401
+ * A {@link Router | `<Router>`} that may not navigate to any other {@link Location}.
2402
+ * This is useful on the server where there is no stateful UI.
2403
+ *
2404
+ * @public
2405
+ * @category Declarative Routers
2406
+ * @mode declarative
2407
+ * @param props Props
2408
+ * @param {StaticRouterProps.basename} props.basename n/a
2409
+ * @param {StaticRouterProps.children} props.children n/a
2410
+ * @param {StaticRouterProps.location} props.location n/a
2411
+ * @returns A React element that renders the static {@link Router | `<Router>`}
2412
+ */
2413
+ declare function StaticRouter({ basename, children, location: locationProp, }: StaticRouterProps): React.JSX.Element;
2414
+ /**
2415
+ * @category Types
2416
+ */
2417
+ interface StaticRouterProviderProps {
2418
+ /**
2419
+ * The {@link StaticHandlerContext} returned from {@link StaticHandler}'s
2420
+ * `query`
2421
+ */
2422
+ context: StaticHandlerContext;
2423
+ /**
2424
+ * The static {@link DataRouter} from {@link createStaticRouter}
2425
+ */
2426
+ router: Router;
2427
+ /**
2428
+ * Whether to hydrate the router on the client (default `true`)
2429
+ */
2430
+ hydrate?: boolean;
2431
+ /**
2432
+ * The [`nonce`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/nonce)
2433
+ * to use for the hydration [`<script>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
2434
+ * tag
2435
+ */
2436
+ nonce?: string;
2437
+ }
2438
+ /**
2439
+ * A {@link DataRouter} that may not navigate to any other {@link Location}.
2440
+ * This is useful on the server where there is no stateful UI.
2441
+ *
2442
+ * @example
2443
+ * export async function handleRequest(request: Request) {
2444
+ * let { query, dataRoutes } = createStaticHandler(routes);
2445
+ * let context = await query(request));
2446
+ *
2447
+ * if (context instanceof Response) {
2448
+ * return context;
2449
+ * }
2450
+ *
2451
+ * let router = createStaticRouter(dataRoutes, context);
2452
+ * return new Response(
2453
+ * ReactDOMServer.renderToString(<StaticRouterProvider ... />),
2454
+ * { headers: { "Content-Type": "text/html" } }
2455
+ * );
2456
+ * }
2457
+ *
2458
+ * @public
2459
+ * @category Data Routers
2460
+ * @mode data
2461
+ * @param props Props
2462
+ * @param {StaticRouterProviderProps.context} props.context n/a
2463
+ * @param {StaticRouterProviderProps.hydrate} props.hydrate n/a
2464
+ * @param {StaticRouterProviderProps.nonce} props.nonce n/a
2465
+ * @param {StaticRouterProviderProps.router} props.router n/a
2466
+ * @returns A React element that renders the static router provider
2467
+ */
2468
+ declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
2469
+ type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRouteProperties">;
2470
+ /**
2471
+ * Create a static handler to perform server-side data loading
2472
+ *
2473
+ * @example
2474
+ * export async function handleRequest(request: Request) {
2475
+ * let { query, dataRoutes } = createStaticHandler(routes);
2476
+ * let context = await query(request);
2477
+ *
2478
+ * if (context instanceof Response) {
2479
+ * return context;
2480
+ * }
2481
+ *
2482
+ * let router = createStaticRouter(dataRoutes, context);
2483
+ * return new Response(
2484
+ * ReactDOMServer.renderToString(<StaticRouterProvider ... />),
2485
+ * { headers: { "Content-Type": "text/html" } }
2486
+ * );
2487
+ * }
2488
+ *
2489
+ * @public
2490
+ * @category Data Routers
2491
+ * @mode data
2492
+ * @param routes The {@link RouteObject | route objects} to create a static
2493
+ * handler for
2494
+ * @param opts Options
2495
+ * @param opts.basename The base URL for the static handler (default: `/`)
2496
+ * @param opts.future Future flags for the static handler
2497
+ * @returns A static handler that can be used to query data for the provided
2498
+ * routes
2499
+ */
2500
+ declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
2501
+ /**
2502
+ * Create a static {@link DataRouter} for server-side rendering
2503
+ *
2504
+ * @example
2505
+ * export async function handleRequest(request: Request) {
2506
+ * let { query, dataRoutes } = createStaticHandler(routes);
2507
+ * let context = await query(request);
2508
+ *
2509
+ * if (context instanceof Response) {
2510
+ * return context;
2511
+ * }
2512
+ *
2513
+ * let router = createStaticRouter(dataRoutes, context);
2514
+ * return new Response(
2515
+ * ReactDOMServer.renderToString(<StaticRouterProvider ... />),
2516
+ * { headers: { "Content-Type": "text/html" } }
2517
+ * );
2518
+ * }
2519
+ *
2520
+ * @public
2521
+ * @category Data Routers
2522
+ * @mode data
2523
+ * @param routes The route objects to create a static {@link DataRouter} for
2524
+ * @param context The {@link StaticHandlerContext} returned from {@link StaticHandler}'s
2525
+ * `query`
2526
+ * @param opts Options
2527
+ * @param opts.future Future flags for the static {@link DataRouter}
2528
+ * @returns A static {@link DataRouter} that can be used to render the provided routes
2529
+ */
2530
+ declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
2531
+ future?: Partial<FutureConfig$1>;
2532
+ }): Router;
2533
+
2534
+ export { type ScriptsProps as $, type AssetsManifest as A, type BrowserRouterProps as B, useViewTransitionState as C, type DOMRouterOpts as D, type EntryContext as E, type FutureConfig as F, type FetcherSubmitOptions as G, type HashRouterProps as H, type SubmitOptions as I, type SubmitTarget as J, createSearchParams as K, type LinkProps as L, type StaticRouterProps as M, type NavLinkProps as N, type StaticRouterProviderProps as O, type ParamKeyValuePair as P, createStaticHandler as Q, createStaticRouter as R, type ServerBuild as S, StaticRouter as T, type URLSearchParamsInit as U, StaticRouterProvider as V, Meta as W, Links as X, Scripts as Y, PrefetchPageLinks as Z, type LinksProps as _, type HistoryRouterProps as a, type PrefetchBehavior as a0, type DiscoverBehavior as a1, type HandleDataRequestFunction as a2, type HandleDocumentRequestFunction as a3, type HandleErrorFunction as a4, type ServerEntryModule as a5, FrameworkContext as a6, createClientRoutes as a7, createClientRoutesWithHMRRevalidationOptOut as a8, shouldHydrateRouteLoader as a9, useScrollRestoration as aa, type NavLinkRenderProps as b, type FetcherFormProps as c, type FormProps as d, type ScrollRestorationProps as e, type SetURLSearchParams as f, type SubmitFunction as g, type FetcherSubmitFunction as h, type FetcherWithComponents as i, createBrowserRouter as j, createHashRouter as k, BrowserRouter as l, HashRouter as m, Link as n, HistoryRouter as o, NavLink as p, Form as q, ScrollRestoration as r, useSearchParams as s, useSubmit as t, useLinkClickHandler as u, useFormAction as v, useFetcher as w, useFetchers as x, useBeforeUnload as y, usePrompt as z };