react-router 7.16.0 → 8.0.0-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/dist/development/dom-export.d.ts +6 -172
  3. package/dist/development/dom-export.js +12 -1007
  4. package/dist/development/index-react-server-client.d.ts +7 -4
  5. package/dist/development/index-react-server-client.js +8 -52
  6. package/dist/development/index-react-server.d.ts +1645 -1635
  7. package/dist/development/index-react-server.js +2880 -3642
  8. package/dist/development/index.d.ts +43 -1475
  9. package/dist/development/index.js +37 -2621
  10. package/dist/development/lib/actions.js +62 -0
  11. package/dist/development/lib/components.d.ts +1022 -0
  12. package/dist/development/lib/components.js +835 -0
  13. package/dist/development/lib/context.d.ts +83 -0
  14. package/dist/development/lib/context.js +41 -0
  15. package/dist/development/lib/dom/dom.d.ts +119 -0
  16. package/dist/development/lib/dom/dom.js +143 -0
  17. package/dist/development/lib/dom/lib.d.ts +2042 -0
  18. package/dist/development/lib/dom/lib.js +1259 -0
  19. package/dist/development/lib/dom/server.d.ts +138 -0
  20. package/dist/development/lib/dom/server.js +301 -0
  21. package/dist/development/lib/dom/ssr/components.d.ts +196 -0
  22. package/dist/development/lib/dom/ssr/components.js +579 -0
  23. package/dist/development/lib/dom/ssr/data.js +29 -0
  24. package/dist/development/lib/dom/ssr/entry.d.ts +59 -0
  25. package/dist/development/lib/dom/ssr/errorBoundaries.d.ts +27 -0
  26. package/dist/development/lib/dom/ssr/errorBoundaries.js +83 -0
  27. package/dist/development/lib/dom/ssr/errors.d.ts +7 -0
  28. package/dist/development/lib/dom/ssr/errors.js +36 -0
  29. package/dist/development/lib/dom/ssr/fallback.js +28 -0
  30. package/dist/development/lib/dom/ssr/fog-of-war.d.ts +12 -0
  31. package/dist/development/lib/dom/ssr/fog-of-war.js +170 -0
  32. package/dist/development/lib/dom/ssr/hydration.d.ts +32 -0
  33. package/dist/development/lib/dom/ssr/hydration.js +29 -0
  34. package/dist/development/lib/dom/ssr/invariant.js +16 -0
  35. package/dist/development/lib/dom/ssr/links.js +170 -0
  36. package/dist/development/lib/dom/ssr/markup.js +24 -0
  37. package/dist/development/lib/dom/ssr/routeModules.d.ts +206 -0
  38. package/dist/development/lib/dom/ssr/routeModules.js +31 -0
  39. package/dist/development/lib/dom/ssr/routes-test-stub.d.ts +62 -0
  40. package/dist/development/lib/dom/ssr/routes-test-stub.js +108 -0
  41. package/dist/development/lib/dom/ssr/routes.d.ts +33 -0
  42. package/dist/development/lib/dom/ssr/routes.js +303 -0
  43. package/dist/development/lib/dom/ssr/server.d.ts +45 -0
  44. package/dist/development/lib/dom/ssr/server.js +68 -0
  45. package/dist/development/lib/dom/ssr/single-fetch.d.ts +14 -0
  46. package/dist/development/lib/dom/ssr/single-fetch.js +346 -0
  47. package/dist/development/lib/dom-export/dom-router-provider.d.ts +9 -0
  48. package/dist/development/lib/dom-export/dom-router-provider.js +22 -0
  49. package/dist/development/lib/dom-export/hydrated-router.d.ts +125 -0
  50. package/dist/development/lib/dom-export/hydrated-router.js +153 -0
  51. package/dist/development/lib/errors.js +29 -0
  52. package/dist/development/lib/hooks.d.ts +947 -0
  53. package/dist/development/lib/hooks.js +1386 -0
  54. package/dist/development/lib/href.d.ts +20 -0
  55. package/dist/development/lib/href.js +50 -0
  56. package/dist/development/lib/router/history.d.ts +258 -0
  57. package/dist/development/lib/router/history.js +371 -0
  58. package/dist/development/lib/router/instrumentation.d.ts +86 -0
  59. package/dist/development/lib/router/instrumentation.js +213 -0
  60. package/dist/development/lib/router/links.d.ts +113 -0
  61. package/dist/development/lib/router/router.d.ts +663 -0
  62. package/dist/development/lib/router/router.js +2981 -0
  63. package/dist/development/lib/router/utils.d.ts +942 -0
  64. package/dist/development/lib/router/utils.js +791 -0
  65. package/dist/development/lib/rsc/browser.d.ts +137 -0
  66. package/dist/development/lib/rsc/browser.js +599 -0
  67. package/dist/development/lib/rsc/errorBoundaries.d.ts +11 -0
  68. package/dist/development/lib/rsc/errorBoundaries.js +90 -0
  69. package/dist/development/lib/rsc/html-stream/browser.d.ts +48 -0
  70. package/dist/development/lib/rsc/html-stream/browser.js +74 -0
  71. package/dist/development/lib/rsc/html-stream/server.js +78 -0
  72. package/dist/development/lib/rsc/route-modules.js +27 -0
  73. package/dist/development/lib/rsc/server.rsc.d.ts +219 -0
  74. package/dist/development/lib/rsc/server.ssr.d.ts +129 -0
  75. package/dist/development/lib/rsc/server.ssr.js +388 -0
  76. package/dist/development/lib/server-runtime/build.d.ts +66 -0
  77. package/dist/development/lib/server-runtime/cookies.d.ts +66 -0
  78. package/dist/development/lib/server-runtime/cookies.js +139 -0
  79. package/dist/development/lib/server-runtime/crypto.js +43 -0
  80. package/dist/development/lib/server-runtime/data.d.ts +13 -0
  81. package/dist/development/lib/server-runtime/data.js +25 -0
  82. package/dist/development/lib/server-runtime/dev.d.ts +9 -0
  83. package/dist/development/lib/server-runtime/dev.js +26 -0
  84. package/dist/development/lib/server-runtime/entry.js +20 -0
  85. package/dist/development/lib/server-runtime/errors.js +95 -0
  86. package/dist/development/lib/server-runtime/headers.js +73 -0
  87. package/dist/development/lib/server-runtime/invariant.js +19 -0
  88. package/dist/development/lib/server-runtime/mode.d.ts +12 -0
  89. package/dist/development/lib/server-runtime/mode.js +25 -0
  90. package/dist/development/lib/server-runtime/routeMatching.js +28 -0
  91. package/dist/development/lib/server-runtime/routes.d.ts +13 -0
  92. package/dist/development/lib/server-runtime/routes.js +74 -0
  93. package/dist/development/lib/server-runtime/server.d.ts +10 -0
  94. package/dist/development/lib/server-runtime/server.js +351 -0
  95. package/dist/development/lib/server-runtime/serverHandoff.js +17 -0
  96. package/dist/development/lib/server-runtime/sessions/cookieStorage.d.ts +25 -0
  97. package/dist/development/lib/server-runtime/sessions/cookieStorage.js +45 -0
  98. package/dist/development/lib/server-runtime/sessions/memoryStorage.d.ts +23 -0
  99. package/dist/development/lib/server-runtime/sessions/memoryStorage.js +52 -0
  100. package/dist/development/lib/server-runtime/sessions.d.ts +145 -0
  101. package/dist/development/lib/server-runtime/sessions.js +98 -0
  102. package/dist/development/lib/server-runtime/single-fetch.d.ts +7 -0
  103. package/dist/development/lib/server-runtime/single-fetch.js +215 -0
  104. package/dist/development/lib/server-runtime/urls.js +31 -0
  105. package/dist/development/lib/server-runtime/warnings.js +20 -0
  106. package/dist/development/lib/types/future.d.ts +9 -0
  107. package/dist/development/lib/types/internal.d.ts +26 -177
  108. package/dist/development/lib/types/internal.js +3 -2
  109. package/dist/{production/register-CNAx3TXj.d.ts → development/lib/types/register.d.ts} +9 -15
  110. package/dist/development/lib/types/route-data.d.ts +113 -0
  111. package/dist/development/lib/types/route-module-annotations.d.ts +149 -0
  112. package/dist/development/lib/types/route-module.d.ts +19 -0
  113. package/dist/development/lib/types/serializes-to.d.ts +13 -0
  114. package/dist/development/lib/types/utils.d.ts +11 -0
  115. package/dist/development/vendor/turbo-stream-v2/flatten.js +159 -0
  116. package/dist/development/vendor/turbo-stream-v2/turbo-stream.js +178 -0
  117. package/dist/development/vendor/turbo-stream-v2/unflatten.js +198 -0
  118. package/dist/development/vendor/turbo-stream-v2/utils.js +47 -0
  119. package/dist/production/dom-export.d.ts +6 -172
  120. package/dist/production/dom-export.js +12 -1007
  121. package/dist/production/index-react-server-client.d.ts +7 -4
  122. package/dist/production/index-react-server-client.js +8 -52
  123. package/dist/production/index-react-server.d.ts +1645 -1635
  124. package/dist/production/index-react-server.js +2871 -3642
  125. package/dist/production/index.d.ts +43 -1475
  126. package/dist/production/index.js +37 -2621
  127. package/dist/production/lib/actions.js +62 -0
  128. package/dist/production/lib/components.d.ts +1022 -0
  129. package/dist/production/lib/components.js +835 -0
  130. package/dist/production/lib/context.d.ts +83 -0
  131. package/dist/production/lib/context.js +41 -0
  132. package/dist/production/lib/dom/dom.d.ts +119 -0
  133. package/dist/production/lib/dom/dom.js +143 -0
  134. package/dist/production/lib/dom/lib.d.ts +2042 -0
  135. package/dist/production/lib/dom/lib.js +1259 -0
  136. package/dist/production/lib/dom/server.d.ts +138 -0
  137. package/dist/production/lib/dom/server.js +301 -0
  138. package/dist/production/lib/dom/ssr/components.d.ts +196 -0
  139. package/dist/production/lib/dom/ssr/components.js +579 -0
  140. package/dist/production/lib/dom/ssr/data.js +29 -0
  141. package/dist/production/lib/dom/ssr/entry.d.ts +59 -0
  142. package/dist/production/lib/dom/ssr/errorBoundaries.d.ts +27 -0
  143. package/dist/production/lib/dom/ssr/errorBoundaries.js +83 -0
  144. package/dist/production/lib/dom/ssr/errors.d.ts +7 -0
  145. package/dist/production/lib/dom/ssr/errors.js +36 -0
  146. package/dist/production/lib/dom/ssr/fallback.js +21 -0
  147. package/dist/production/lib/dom/ssr/fog-of-war.d.ts +12 -0
  148. package/dist/production/lib/dom/ssr/fog-of-war.js +170 -0
  149. package/dist/production/lib/dom/ssr/hydration.d.ts +32 -0
  150. package/dist/production/lib/dom/ssr/hydration.js +29 -0
  151. package/dist/production/lib/dom/ssr/invariant.js +16 -0
  152. package/dist/production/lib/dom/ssr/links.js +170 -0
  153. package/dist/production/lib/dom/ssr/markup.js +24 -0
  154. package/dist/production/lib/dom/ssr/routeModules.d.ts +206 -0
  155. package/dist/production/lib/dom/ssr/routeModules.js +31 -0
  156. package/dist/production/lib/dom/ssr/routes-test-stub.d.ts +62 -0
  157. package/dist/production/lib/dom/ssr/routes-test-stub.js +108 -0
  158. package/dist/production/lib/dom/ssr/routes.d.ts +33 -0
  159. package/dist/production/lib/dom/ssr/routes.js +303 -0
  160. package/dist/production/lib/dom/ssr/server.d.ts +45 -0
  161. package/dist/production/lib/dom/ssr/server.js +68 -0
  162. package/dist/production/lib/dom/ssr/single-fetch.d.ts +14 -0
  163. package/dist/production/lib/dom/ssr/single-fetch.js +346 -0
  164. package/dist/production/lib/dom-export/dom-router-provider.d.ts +9 -0
  165. package/dist/production/lib/dom-export/dom-router-provider.js +22 -0
  166. package/dist/production/lib/dom-export/hydrated-router.d.ts +125 -0
  167. package/dist/production/lib/dom-export/hydrated-router.js +153 -0
  168. package/dist/production/lib/errors.js +29 -0
  169. package/dist/production/lib/hooks.d.ts +947 -0
  170. package/dist/production/lib/hooks.js +1371 -0
  171. package/dist/production/lib/href.d.ts +20 -0
  172. package/dist/production/lib/href.js +50 -0
  173. package/dist/production/lib/router/history.d.ts +258 -0
  174. package/dist/production/lib/router/history.js +371 -0
  175. package/dist/production/lib/router/instrumentation.d.ts +86 -0
  176. package/dist/production/lib/router/instrumentation.js +213 -0
  177. package/dist/production/lib/router/links.d.ts +113 -0
  178. package/dist/production/lib/router/router.d.ts +663 -0
  179. package/dist/production/lib/router/router.js +2981 -0
  180. package/dist/production/lib/router/utils.d.ts +942 -0
  181. package/dist/production/lib/router/utils.js +782 -0
  182. package/dist/production/lib/rsc/browser.d.ts +137 -0
  183. package/dist/production/lib/rsc/browser.js +599 -0
  184. package/dist/production/lib/rsc/errorBoundaries.d.ts +11 -0
  185. package/dist/production/lib/rsc/errorBoundaries.js +90 -0
  186. package/dist/production/lib/rsc/html-stream/browser.d.ts +48 -0
  187. package/dist/production/lib/rsc/html-stream/browser.js +74 -0
  188. package/dist/production/lib/rsc/html-stream/server.js +78 -0
  189. package/dist/production/lib/rsc/route-modules.js +27 -0
  190. package/dist/production/lib/rsc/server.rsc.d.ts +219 -0
  191. package/dist/production/lib/rsc/server.ssr.d.ts +129 -0
  192. package/dist/production/lib/rsc/server.ssr.js +388 -0
  193. package/dist/production/lib/server-runtime/build.d.ts +66 -0
  194. package/dist/production/lib/server-runtime/cookies.d.ts +66 -0
  195. package/dist/production/lib/server-runtime/cookies.js +139 -0
  196. package/dist/production/lib/server-runtime/crypto.js +43 -0
  197. package/dist/production/lib/server-runtime/data.d.ts +13 -0
  198. package/dist/production/lib/server-runtime/data.js +25 -0
  199. package/dist/production/lib/server-runtime/dev.d.ts +9 -0
  200. package/dist/production/lib/server-runtime/dev.js +26 -0
  201. package/dist/production/lib/server-runtime/entry.js +20 -0
  202. package/dist/production/lib/server-runtime/errors.js +95 -0
  203. package/dist/production/lib/server-runtime/headers.js +73 -0
  204. package/dist/production/lib/server-runtime/invariant.js +19 -0
  205. package/dist/production/lib/server-runtime/mode.d.ts +12 -0
  206. package/dist/production/lib/server-runtime/mode.js +25 -0
  207. package/dist/production/lib/server-runtime/routeMatching.js +28 -0
  208. package/dist/production/lib/server-runtime/routes.d.ts +13 -0
  209. package/dist/production/lib/server-runtime/routes.js +74 -0
  210. package/dist/production/lib/server-runtime/server.d.ts +10 -0
  211. package/dist/production/lib/server-runtime/server.js +351 -0
  212. package/dist/production/lib/server-runtime/serverHandoff.js +17 -0
  213. package/dist/production/lib/server-runtime/sessions/cookieStorage.d.ts +25 -0
  214. package/dist/production/lib/server-runtime/sessions/cookieStorage.js +45 -0
  215. package/dist/production/lib/server-runtime/sessions/memoryStorage.d.ts +23 -0
  216. package/dist/production/lib/server-runtime/sessions/memoryStorage.js +52 -0
  217. package/dist/production/lib/server-runtime/sessions.d.ts +145 -0
  218. package/dist/production/lib/server-runtime/sessions.js +98 -0
  219. package/dist/production/lib/server-runtime/single-fetch.d.ts +7 -0
  220. package/dist/production/lib/server-runtime/single-fetch.js +215 -0
  221. package/dist/production/lib/server-runtime/urls.js +31 -0
  222. package/dist/production/lib/server-runtime/warnings.js +20 -0
  223. package/dist/production/lib/types/future.d.ts +9 -0
  224. package/dist/production/lib/types/internal.d.ts +26 -177
  225. package/dist/production/lib/types/internal.js +3 -2
  226. package/dist/{development/register-CNAx3TXj.d.ts → production/lib/types/register.d.ts} +9 -15
  227. package/dist/production/lib/types/route-data.d.ts +113 -0
  228. package/dist/production/lib/types/route-module-annotations.d.ts +149 -0
  229. package/dist/production/lib/types/route-module.d.ts +19 -0
  230. package/dist/production/lib/types/serializes-to.d.ts +13 -0
  231. package/dist/production/lib/types/utils.d.ts +11 -0
  232. package/dist/production/vendor/turbo-stream-v2/flatten.js +159 -0
  233. package/dist/production/vendor/turbo-stream-v2/turbo-stream.js +178 -0
  234. package/dist/production/vendor/turbo-stream-v2/unflatten.js +198 -0
  235. package/dist/production/vendor/turbo-stream-v2/utils.js +47 -0
  236. package/docs/explanation/backend-for-frontend.md +50 -0
  237. package/docs/explanation/code-splitting.md +77 -0
  238. package/docs/explanation/concurrency.md +135 -0
  239. package/docs/explanation/form-vs-fetcher.md +292 -0
  240. package/docs/explanation/hot-module-replacement.md +137 -0
  241. package/docs/explanation/hydration.md +14 -0
  242. package/docs/explanation/index-query-param.md +86 -0
  243. package/docs/explanation/index.md +4 -0
  244. package/docs/explanation/lazy-route-discovery.md +78 -0
  245. package/docs/explanation/location.md +6 -0
  246. package/docs/explanation/progressive-enhancement.md +150 -0
  247. package/docs/explanation/race-conditions.md +88 -0
  248. package/docs/explanation/react-transitions.md +160 -0
  249. package/docs/explanation/route-matching.md +7 -0
  250. package/docs/explanation/server-client-execution.md +4 -0
  251. package/docs/explanation/sessions-and-cookies.md +465 -0
  252. package/docs/explanation/special-files.md +16 -0
  253. package/docs/explanation/state-management.md +524 -0
  254. package/docs/explanation/styling.md +87 -0
  255. package/docs/explanation/type-safety.md +82 -0
  256. package/docs/how-to/accessibility.md +44 -0
  257. package/docs/how-to/client-data.md +199 -0
  258. package/docs/how-to/data-strategy.md +317 -0
  259. package/docs/how-to/error-boundary.md +231 -0
  260. package/docs/how-to/error-reporting.md +134 -0
  261. package/docs/how-to/fetchers.md +307 -0
  262. package/docs/how-to/file-route-conventions.md +410 -0
  263. package/docs/how-to/file-uploads.md +217 -0
  264. package/docs/how-to/form-validation.md +120 -0
  265. package/docs/how-to/headers.md +164 -0
  266. package/docs/how-to/index.md +4 -0
  267. package/docs/how-to/instrumentation.md +556 -0
  268. package/docs/how-to/meta.md +40 -0
  269. package/docs/how-to/middleware.md +728 -0
  270. package/docs/how-to/navigation-blocking.md +233 -0
  271. package/docs/how-to/optimize-revalidation.md +12 -0
  272. package/docs/how-to/pre-rendering.md +225 -0
  273. package/docs/how-to/presets.md +103 -0
  274. package/docs/how-to/react-server-components.md +899 -0
  275. package/docs/how-to/resource-routes.md +126 -0
  276. package/docs/how-to/route-module-type-safety.md +100 -0
  277. package/docs/how-to/search-params.md +4 -0
  278. package/docs/how-to/security.md +30 -0
  279. package/docs/how-to/server-bundles.md +66 -0
  280. package/docs/how-to/spa.md +120 -0
  281. package/docs/how-to/status.md +63 -0
  282. package/docs/how-to/suspense.md +132 -0
  283. package/docs/how-to/using-handle.md +117 -0
  284. package/docs/how-to/view-transitions.md +237 -0
  285. package/docs/how-to/webhook.md +50 -0
  286. package/docs/index.md +39 -0
  287. package/docs/start/data/actions.md +138 -0
  288. package/docs/start/data/custom.md +198 -0
  289. package/docs/start/data/data-loading.md +44 -0
  290. package/docs/start/data/index.md +4 -0
  291. package/docs/start/data/installation.md +52 -0
  292. package/docs/start/data/navigating.md +12 -0
  293. package/docs/start/data/pending-ui.md +12 -0
  294. package/docs/start/data/route-object.md +248 -0
  295. package/docs/start/data/routing.md +281 -0
  296. package/docs/start/data/testing.md +8 -0
  297. package/docs/start/declarative/index.md +4 -0
  298. package/docs/start/declarative/installation.md +43 -0
  299. package/docs/start/declarative/navigating.md +133 -0
  300. package/docs/start/declarative/routing.md +237 -0
  301. package/docs/start/declarative/url-values.md +65 -0
  302. package/docs/start/framework/actions.md +175 -0
  303. package/docs/start/framework/data-loading.md +201 -0
  304. package/docs/start/framework/deploying.md +96 -0
  305. package/docs/start/framework/index.md +4 -0
  306. package/docs/start/framework/installation.md +42 -0
  307. package/docs/start/framework/navigating.md +182 -0
  308. package/docs/start/framework/pending-ui.md +142 -0
  309. package/docs/start/framework/rendering.md +59 -0
  310. package/docs/start/framework/route-module.md +527 -0
  311. package/docs/start/framework/routing.md +362 -0
  312. package/docs/start/framework/testing.md +133 -0
  313. package/docs/start/index.md +4 -0
  314. package/docs/start/modes.md +201 -0
  315. package/docs/upgrading/component-routes.md +363 -0
  316. package/docs/upgrading/future.md +31 -0
  317. package/docs/upgrading/index.md +4 -0
  318. package/docs/upgrading/remix.md +403 -0
  319. package/docs/upgrading/router-provider.md +442 -0
  320. package/docs/upgrading/v6.md +379 -0
  321. package/package.json +44 -87
  322. package/dist/development/browser-D3uq9sI1.d.ts +0 -318
  323. package/dist/development/browser-nIQ4Nsyi.d.mts +0 -318
  324. package/dist/development/chunk-IBI7OMNB.js +0 -1363
  325. package/dist/development/chunk-QUQL4437.mjs +0 -11529
  326. package/dist/development/chunk-S54KXAEJ.mjs +0 -2585
  327. package/dist/development/chunk-SRID2YZ2.js +0 -10229
  328. package/dist/development/chunk-XEJDWL2B.js +0 -188
  329. package/dist/development/context-m8rizgnE.d.mts +0 -1771
  330. package/dist/development/data-D4xhSy90.d.ts +0 -1732
  331. package/dist/development/data-U8FS-wNn.d.mts +0 -1732
  332. package/dist/development/dom-export.d.mts +0 -172
  333. package/dist/development/dom-export.mjs +0 -1008
  334. package/dist/development/index-react-server-client-BLiUx67a.d.ts +0 -3655
  335. package/dist/development/index-react-server-client-CdKROblb.d.mts +0 -2600
  336. package/dist/development/index-react-server-client.d.mts +0 -4
  337. package/dist/development/index-react-server-client.mjs +0 -59
  338. package/dist/development/index-react-server.d.mts +0 -2703
  339. package/dist/development/index-react-server.mjs +0 -3780
  340. package/dist/development/index.d.mts +0 -1478
  341. package/dist/development/index.mjs +0 -277
  342. package/dist/development/instrumentation-1q4YhLGP.d.ts +0 -715
  343. package/dist/development/lib/types/internal.d.mts +0 -184
  344. package/dist/development/lib/types/internal.mjs +0 -10
  345. package/dist/development/register-CqK96Zfk.d.mts +0 -30
  346. package/dist/production/browser-D3uq9sI1.d.ts +0 -318
  347. package/dist/production/browser-nIQ4Nsyi.d.mts +0 -318
  348. package/dist/production/chunk-EAQNHM3N.js +0 -188
  349. package/dist/production/chunk-NALGHHKE.mjs +0 -2585
  350. package/dist/production/chunk-Q65P7S7Y.mjs +0 -11529
  351. package/dist/production/chunk-SKEDDLRM.js +0 -1363
  352. package/dist/production/chunk-Y7DNFQZP.js +0 -10229
  353. package/dist/production/context-m8rizgnE.d.mts +0 -1771
  354. package/dist/production/data-D4xhSy90.d.ts +0 -1732
  355. package/dist/production/data-U8FS-wNn.d.mts +0 -1732
  356. package/dist/production/dom-export.d.mts +0 -172
  357. package/dist/production/dom-export.mjs +0 -1008
  358. package/dist/production/index-react-server-client-BLiUx67a.d.ts +0 -3655
  359. package/dist/production/index-react-server-client-CdKROblb.d.mts +0 -2600
  360. package/dist/production/index-react-server-client.d.mts +0 -4
  361. package/dist/production/index-react-server-client.mjs +0 -59
  362. package/dist/production/index-react-server.d.mts +0 -2703
  363. package/dist/production/index-react-server.mjs +0 -3780
  364. package/dist/production/index.d.mts +0 -1478
  365. package/dist/production/index.mjs +0 -277
  366. package/dist/production/instrumentation-1q4YhLGP.d.ts +0 -715
  367. package/dist/production/lib/types/internal.d.mts +0 -184
  368. package/dist/production/lib/types/internal.mjs +0 -10
  369. package/dist/production/register-CqK96Zfk.d.mts +0 -30
@@ -1,715 +0,0 @@
1
- import { e as RouteObject, f as History, g as MaybePromise, c as RouterContextProvider, h as MapRoutePropertiesFunction, i as Action, L as Location, D as DataRouteMatch, j as Submission, k as RouteData, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, n as DataRouteObject, o as RouteBranch, p as RouteManifest, U as UIMatch, T as To, q as HTMLFormMethod, F as FormEncType, r as Path, s as LoaderFunctionArgs, t as MiddlewareEnabled, u as AppLoadContext } from './data-D4xhSy90.js';
2
-
3
- /**
4
- * A Router instance manages all navigation and data loading/mutations
5
- */
6
- interface Router {
7
- /**
8
- * @private
9
- * PRIVATE - DO NOT USE
10
- *
11
- * Return the basename for the router
12
- */
13
- get basename(): RouterInit["basename"];
14
- /**
15
- * @private
16
- * PRIVATE - DO NOT USE
17
- *
18
- * Return the future config for the router
19
- */
20
- get future(): FutureConfig;
21
- /**
22
- * @private
23
- * PRIVATE - DO NOT USE
24
- *
25
- * Return the current state of the router
26
- */
27
- get state(): RouterState;
28
- /**
29
- * @private
30
- * PRIVATE - DO NOT USE
31
- *
32
- * Return the routes for this router instance
33
- */
34
- get routes(): DataRouteObject[];
35
- /**
36
- * @private
37
- * PRIVATE - DO NOT USE
38
- *
39
- * Return the route branches for this router instance
40
- */
41
- get branches(): RouteBranch<DataRouteObject>[] | undefined;
42
- /**
43
- * @private
44
- * PRIVATE - DO NOT USE
45
- *
46
- * Return the manifest for this router instance
47
- */
48
- get manifest(): RouteManifest;
49
- /**
50
- * @private
51
- * PRIVATE - DO NOT USE
52
- *
53
- * Return the window associated with the router
54
- */
55
- get window(): RouterInit["window"];
56
- /**
57
- * @private
58
- * PRIVATE - DO NOT USE
59
- *
60
- * Initialize the router, including adding history listeners and kicking off
61
- * initial data fetches. Returns a function to cleanup listeners and abort
62
- * any in-progress loads
63
- */
64
- initialize(): Router;
65
- /**
66
- * @private
67
- * PRIVATE - DO NOT USE
68
- *
69
- * Subscribe to router.state updates
70
- *
71
- * @param fn function to call with the new state
72
- */
73
- subscribe(fn: RouterSubscriber): () => void;
74
- /**
75
- * @private
76
- * PRIVATE - DO NOT USE
77
- *
78
- * Enable scroll restoration behavior in the router
79
- *
80
- * @param savedScrollPositions Object that will manage positions, in case
81
- * it's being restored from sessionStorage
82
- * @param getScrollPosition Function to get the active Y scroll position
83
- * @param getKey Function to get the key to use for restoration
84
- */
85
- enableScrollRestoration(savedScrollPositions: Record<string, number>, getScrollPosition: GetScrollPositionFunction, getKey?: GetScrollRestorationKeyFunction): () => void;
86
- /**
87
- * @private
88
- * PRIVATE - DO NOT USE
89
- *
90
- * Navigate forward/backward in the history stack
91
- * @param to Delta to move in the history stack
92
- */
93
- navigate(to: number): Promise<void>;
94
- /**
95
- * Navigate to the given path
96
- * @param to Path to navigate to
97
- * @param opts Navigation options (method, submission, etc.)
98
- */
99
- navigate(to: To | null, opts?: RouterNavigateOptions): Promise<void>;
100
- /**
101
- * @private
102
- * PRIVATE - DO NOT USE
103
- *
104
- * Trigger a fetcher load/submission
105
- *
106
- * @param key Fetcher key
107
- * @param routeId Route that owns the fetcher
108
- * @param href href to fetch
109
- * @param opts Fetcher options, (method, submission, etc.)
110
- */
111
- fetch(key: string, routeId: string, href: string | null, opts?: RouterFetchOptions): Promise<void>;
112
- /**
113
- * @private
114
- * PRIVATE - DO NOT USE
115
- *
116
- * Trigger a revalidation of all current route loaders and fetcher loads
117
- */
118
- revalidate(): Promise<void>;
119
- /**
120
- * @private
121
- * PRIVATE - DO NOT USE
122
- *
123
- * Utility function to create an href for the given location
124
- * @param location
125
- */
126
- createHref(location: Location | URL): string;
127
- /**
128
- * @private
129
- * PRIVATE - DO NOT USE
130
- *
131
- * Utility function to URL encode a destination path according to the internal
132
- * history implementation
133
- * @param to
134
- */
135
- encodeLocation(to: To): Path;
136
- /**
137
- * @private
138
- * PRIVATE - DO NOT USE
139
- *
140
- * Get/create a fetcher for the given key
141
- * @param key
142
- */
143
- getFetcher<TData = any>(key: string): Fetcher<TData>;
144
- /**
145
- * @internal
146
- * PRIVATE - DO NOT USE
147
- *
148
- * Reset the fetcher for a given key
149
- * @param key
150
- */
151
- resetFetcher(key: string, opts?: {
152
- reason?: unknown;
153
- }): void;
154
- /**
155
- * @private
156
- * PRIVATE - DO NOT USE
157
- *
158
- * Delete the fetcher for a given key
159
- * @param key
160
- */
161
- deleteFetcher(key: string): void;
162
- /**
163
- * @private
164
- * PRIVATE - DO NOT USE
165
- *
166
- * Cleanup listeners and abort any in-progress loads
167
- */
168
- dispose(): void;
169
- /**
170
- * @private
171
- * PRIVATE - DO NOT USE
172
- *
173
- * Get a navigation blocker
174
- * @param key The identifier for the blocker
175
- * @param fn The blocker function implementation
176
- */
177
- getBlocker(key: string, fn: BlockerFunction): Blocker;
178
- /**
179
- * @private
180
- * PRIVATE - DO NOT USE
181
- *
182
- * Delete a navigation blocker
183
- * @param key The identifier for the blocker
184
- */
185
- deleteBlocker(key: string): void;
186
- /**
187
- * @private
188
- * PRIVATE DO NOT USE
189
- *
190
- * Patch additional children routes into an existing parent route
191
- * @param routeId The parent route id or a callback function accepting `patch`
192
- * to perform batch patching
193
- * @param children The additional children routes
194
- * @param unstable_allowElementMutations Allow mutation or route elements on
195
- * existing routes. Intended for RSC-usage
196
- * only.
197
- */
198
- patchRoutes(routeId: string | null, children: RouteObject[], unstable_allowElementMutations?: boolean): void;
199
- /**
200
- * @private
201
- * PRIVATE - DO NOT USE
202
- *
203
- * HMR needs to pass in-flight route updates to React Router
204
- * TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)
205
- */
206
- _internalSetRoutes(routes: RouteObject[]): void;
207
- /**
208
- * @private
209
- * PRIVATE - DO NOT USE
210
- *
211
- * Cause subscribers to re-render. This is used to force a re-render.
212
- */
213
- _internalSetStateDoNotUseOrYouWillBreakYourApp(state: Partial<RouterState>): void;
214
- /**
215
- * @private
216
- * PRIVATE - DO NOT USE
217
- *
218
- * Internal fetch AbortControllers accessed by unit tests
219
- */
220
- _internalFetchControllers: Map<string, AbortController>;
221
- }
222
- /**
223
- * State maintained internally by the router. During a navigation, all states
224
- * reflect the "old" location unless otherwise noted.
225
- */
226
- interface RouterState {
227
- /**
228
- * The action of the most recent navigation
229
- */
230
- historyAction: Action;
231
- /**
232
- * The current location reflected by the router
233
- */
234
- location: Location;
235
- /**
236
- * The current set of route matches
237
- */
238
- matches: DataRouteMatch[];
239
- /**
240
- * Tracks whether we've completed our initial data load
241
- */
242
- initialized: boolean;
243
- /**
244
- * Tracks whether we should be rendering a HydrateFallback during hydration
245
- */
246
- renderFallback: boolean;
247
- /**
248
- * Current scroll position we should start at for a new view
249
- * - number -> scroll position to restore to
250
- * - false -> do not restore scroll at all (used during submissions/revalidations)
251
- * - null -> don't have a saved position, scroll to hash or top of page
252
- */
253
- restoreScrollPosition: number | false | null;
254
- /**
255
- * Indicate whether this navigation should skip resetting the scroll position
256
- * if we are unable to restore the scroll position
257
- */
258
- preventScrollReset: boolean;
259
- /**
260
- * Tracks the state of the current navigation
261
- */
262
- navigation: Navigation;
263
- /**
264
- * Tracks any in-progress revalidations
265
- */
266
- revalidation: RevalidationState;
267
- /**
268
- * Data from the loaders for the current matches
269
- */
270
- loaderData: RouteData;
271
- /**
272
- * Data from the action for the current matches
273
- */
274
- actionData: RouteData | null;
275
- /**
276
- * Errors caught from loaders for the current matches
277
- */
278
- errors: RouteData | null;
279
- /**
280
- * Map of current fetchers
281
- */
282
- fetchers: Map<string, Fetcher>;
283
- /**
284
- * Map of current blockers
285
- */
286
- blockers: Map<string, Blocker>;
287
- }
288
- /**
289
- * Data that can be passed into hydrate a Router from SSR
290
- */
291
- type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
292
- /**
293
- * Future flags to toggle new feature behavior
294
- */
295
- interface FutureConfig {
296
- }
297
- /**
298
- * Initialization options for createRouter
299
- */
300
- interface RouterInit {
301
- routes: RouteObject[];
302
- history: History;
303
- basename?: string;
304
- getContext?: () => MaybePromise<RouterContextProvider>;
305
- instrumentations?: ClientInstrumentation[];
306
- mapRouteProperties?: MapRoutePropertiesFunction;
307
- future?: Partial<FutureConfig>;
308
- hydrationRouteProperties?: string[];
309
- hydrationData?: HydrationState;
310
- window?: Window;
311
- dataStrategy?: DataStrategyFunction;
312
- patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
313
- }
314
- /**
315
- * State returned from a server-side query() call
316
- */
317
- interface StaticHandlerContext {
318
- basename: Router["basename"];
319
- location: RouterState["location"];
320
- matches: RouterState["matches"];
321
- loaderData: RouterState["loaderData"];
322
- actionData: RouterState["actionData"];
323
- errors: RouterState["errors"];
324
- statusCode: number;
325
- loaderHeaders: Record<string, Headers>;
326
- actionHeaders: Record<string, Headers>;
327
- _deepestRenderedBoundaryId?: string | null;
328
- }
329
- /**
330
- * A StaticHandler instance manages a singular SSR navigation/fetch event
331
- */
332
- interface StaticHandler {
333
- /**
334
- * The set of data routes managed by this handler
335
- */
336
- dataRoutes: DataRouteObject[];
337
- /**
338
- * @private
339
- * PRIVATE - DO NOT USE
340
- *
341
- * The route branches derived from the data routes, used for internal route
342
- * matching in Framework Mode
343
- */
344
- _internalRouteBranches: RouteBranch<DataRouteObject>[];
345
- /**
346
- * Perform a query for a given request - executing all matched route
347
- * loaders/actions. Used for document requests.
348
- *
349
- * @param request The request to query
350
- * @param opts Optional query options
351
- * @param opts.dataStrategy Alternate dataStrategy implementation
352
- * @param opts.filterMatchesToLoad Predicate function to filter which matches should be loaded
353
- * @param opts.generateMiddlewareResponse To enable middleware, provide a function
354
- * to generate a response to bubble back up the middleware chain
355
- * @param opts.requestContext Context object to pass to loaders/actions
356
- * @param opts.skipLoaderErrorBubbling Skip loader error bubbling
357
- * @param opts.skipRevalidation Skip revalidation after action submission
358
- * @param opts.normalizePath Normalize the request path
359
- */
360
- query(request: Request, opts?: {
361
- requestContext?: unknown;
362
- filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
363
- skipLoaderErrorBubbling?: boolean;
364
- skipRevalidation?: boolean;
365
- dataStrategy?: DataStrategyFunction<unknown>;
366
- generateMiddlewareResponse?: (query: (r: Request, args?: {
367
- filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
368
- }) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
369
- normalizePath?: (request: Request) => Path;
370
- }): Promise<StaticHandlerContext | Response>;
371
- /**
372
- * Perform a query for a specific route. Used for resource requests.
373
- *
374
- * @param request The request to query
375
- * @param opts Optional queryRoute options
376
- * @param opts.dataStrategy Alternate dataStrategy implementation
377
- * @param opts.generateMiddlewareResponse To enable middleware, provide a function
378
- * to generate a response to bubble back up the middleware chain
379
- * @param opts.requestContext Context object to pass to loaders/actions
380
- * @param opts.routeId The ID of the route to query
381
- * @param opts.normalizePath Normalize the request path
382
-
383
- */
384
- queryRoute(request: Request, opts?: {
385
- routeId?: string;
386
- requestContext?: unknown;
387
- dataStrategy?: DataStrategyFunction<unknown>;
388
- generateMiddlewareResponse?: (queryRoute: (r: Request) => Promise<Response>) => MaybePromise<Response>;
389
- normalizePath?: (request: Request) => Path;
390
- }): Promise<any>;
391
- }
392
- type ViewTransitionOpts = {
393
- currentLocation: Location;
394
- nextLocation: Location;
395
- };
396
- /**
397
- * Subscriber function signature for changes to router state
398
- */
399
- interface RouterSubscriber {
400
- (state: RouterState, opts: {
401
- deletedFetchers: string[];
402
- newErrors: RouteData | null;
403
- viewTransitionOpts?: ViewTransitionOpts;
404
- flushSync: boolean;
405
- }): void;
406
- }
407
- /**
408
- * Function signature for determining the key to be used in scroll restoration
409
- * for a given location
410
- */
411
- interface GetScrollRestorationKeyFunction {
412
- (location: Location, matches: UIMatch[]): string | null;
413
- }
414
- /**
415
- * Function signature for determining the current scroll position
416
- */
417
- interface GetScrollPositionFunction {
418
- (): number;
419
- }
420
- /**
421
- * - "route": relative to the route hierarchy so `..` means remove all segments
422
- * of the current route even if it has many. For example, a `route("posts/:id")`
423
- * would have both `:id` and `posts` removed from the url.
424
- * - "path": relative to the pathname so `..` means remove one segment of the
425
- * pathname. For example, a `route("posts/:id")` would have only `:id` removed
426
- * from the url.
427
- */
428
- type RelativeRoutingType = "route" | "path";
429
- type BaseNavigateOrFetchOptions = {
430
- preventScrollReset?: boolean;
431
- relative?: RelativeRoutingType;
432
- flushSync?: boolean;
433
- defaultShouldRevalidate?: boolean;
434
- };
435
- type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
436
- replace?: boolean;
437
- state?: any;
438
- fromRouteId?: string;
439
- viewTransition?: boolean;
440
- mask?: To;
441
- };
442
- type BaseSubmissionOptions = {
443
- formMethod?: HTMLFormMethod;
444
- formEncType?: FormEncType;
445
- } & ({
446
- formData: FormData;
447
- body?: undefined;
448
- } | {
449
- formData?: undefined;
450
- body: any;
451
- });
452
- /**
453
- * Options for a navigate() call for a normal (non-submission) navigation
454
- */
455
- type LinkNavigateOptions = BaseNavigateOptions;
456
- /**
457
- * Options for a navigate() call for a submission navigation
458
- */
459
- type SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;
460
- /**
461
- * Options to pass to navigate() for a navigation
462
- */
463
- type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
464
- /**
465
- * Options for a fetch() load
466
- */
467
- type LoadFetchOptions = BaseNavigateOrFetchOptions;
468
- /**
469
- * Options for a fetch() submission
470
- */
471
- type SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;
472
- /**
473
- * Options to pass to fetch()
474
- */
475
- type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;
476
- /**
477
- * Potential states for state.navigation
478
- */
479
- type NavigationStates = {
480
- Idle: {
481
- state: "idle";
482
- location: undefined;
483
- matches: undefined;
484
- historyAction: undefined;
485
- formMethod: undefined;
486
- formAction: undefined;
487
- formEncType: undefined;
488
- formData: undefined;
489
- json: undefined;
490
- text: undefined;
491
- };
492
- Loading: {
493
- state: "loading";
494
- location: Location;
495
- matches: DataRouteMatch[];
496
- historyAction: Action;
497
- formMethod: Submission["formMethod"] | undefined;
498
- formAction: Submission["formAction"] | undefined;
499
- formEncType: Submission["formEncType"] | undefined;
500
- formData: Submission["formData"] | undefined;
501
- json: Submission["json"] | undefined;
502
- text: Submission["text"] | undefined;
503
- };
504
- Submitting: {
505
- state: "submitting";
506
- location: Location;
507
- matches: DataRouteMatch[];
508
- historyAction: Action;
509
- formMethod: Submission["formMethod"];
510
- formAction: Submission["formAction"];
511
- formEncType: Submission["formEncType"];
512
- formData: Submission["formData"];
513
- json: Submission["json"];
514
- text: Submission["text"];
515
- };
516
- };
517
- type Navigation = NavigationStates[keyof NavigationStates];
518
- type RevalidationState = "idle" | "loading";
519
- /**
520
- * Potential states for fetchers
521
- */
522
- type FetcherStates<TData = any> = {
523
- /**
524
- * The fetcher is not calling a loader or action
525
- *
526
- * ```tsx
527
- * fetcher.state === "idle"
528
- * ```
529
- */
530
- Idle: {
531
- state: "idle";
532
- formMethod: undefined;
533
- formAction: undefined;
534
- formEncType: undefined;
535
- text: undefined;
536
- formData: undefined;
537
- json: undefined;
538
- /**
539
- * If the fetcher has never been called, this will be undefined.
540
- */
541
- data: TData | undefined;
542
- };
543
- /**
544
- * The fetcher is loading data from a {@link LoaderFunction | loader} from a
545
- * call to {@link FetcherWithComponents.load | `fetcher.load`}.
546
- *
547
- * ```tsx
548
- * // somewhere
549
- * <button onClick={() => fetcher.load("/some/route") }>Load</button>
550
- *
551
- * // the state will update
552
- * fetcher.state === "loading"
553
- * ```
554
- */
555
- Loading: {
556
- state: "loading";
557
- formMethod: Submission["formMethod"] | undefined;
558
- formAction: Submission["formAction"] | undefined;
559
- formEncType: Submission["formEncType"] | undefined;
560
- text: Submission["text"] | undefined;
561
- formData: Submission["formData"] | undefined;
562
- json: Submission["json"] | undefined;
563
- data: TData | undefined;
564
- };
565
- /**
566
- The fetcher is submitting to a {@link LoaderFunction} (GET) or {@link ActionFunction} (POST) from a {@link FetcherWithComponents.Form | `fetcher.Form`} or {@link FetcherWithComponents.submit | `fetcher.submit`}.
567
-
568
- ```tsx
569
- // somewhere
570
- <input
571
- onChange={e => {
572
- fetcher.submit(event.currentTarget.form, { method: "post" });
573
- }}
574
- />
575
-
576
- // the state will update
577
- fetcher.state === "submitting"
578
-
579
- // and formData will be available
580
- fetcher.formData
581
- ```
582
- */
583
- Submitting: {
584
- state: "submitting";
585
- formMethod: Submission["formMethod"];
586
- formAction: Submission["formAction"];
587
- formEncType: Submission["formEncType"];
588
- text: Submission["text"];
589
- formData: Submission["formData"];
590
- json: Submission["json"];
591
- data: TData | undefined;
592
- };
593
- };
594
- type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
595
- interface BlockerBlocked {
596
- state: "blocked";
597
- reset: () => void;
598
- proceed: () => void;
599
- location: Location;
600
- }
601
- interface BlockerUnblocked {
602
- state: "unblocked";
603
- reset: undefined;
604
- proceed: undefined;
605
- location: undefined;
606
- }
607
- interface BlockerProceeding {
608
- state: "proceeding";
609
- reset: undefined;
610
- proceed: undefined;
611
- location: Location;
612
- }
613
- type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
614
- type BlockerFunction = (args: {
615
- currentLocation: Location;
616
- nextLocation: Location;
617
- historyAction: Action;
618
- }) => boolean;
619
- declare const IDLE_NAVIGATION: NavigationStates["Idle"];
620
- declare const IDLE_FETCHER: FetcherStates["Idle"];
621
- declare const IDLE_BLOCKER: BlockerUnblocked;
622
- /**
623
- * Create a router and listen to history POP navigations
624
- */
625
- declare function createRouter(init: RouterInit): Router;
626
- interface CreateStaticHandlerOptions {
627
- basename?: string;
628
- mapRouteProperties?: MapRoutePropertiesFunction;
629
- instrumentations?: Pick<ServerInstrumentation, "route">[];
630
- future?: Partial<FutureConfig>;
631
- }
632
-
633
- type ServerInstrumentation = {
634
- handler?: InstrumentRequestHandlerFunction;
635
- route?: InstrumentRouteFunction;
636
- };
637
- type ClientInstrumentation = {
638
- router?: InstrumentRouterFunction;
639
- route?: InstrumentRouteFunction;
640
- };
641
- type InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
642
- type InstrumentRouterFunction = (router: InstrumentableRouter) => void;
643
- type InstrumentRouteFunction = (route: InstrumentableRoute) => void;
644
- type InstrumentationHandlerResult = {
645
- status: "success";
646
- error: undefined;
647
- } | {
648
- status: "error";
649
- error: Error;
650
- };
651
- type InstrumentFunction<T> = (handler: () => Promise<InstrumentationHandlerResult>, info: T) => Promise<void>;
652
- type ReadonlyRequest = {
653
- method: string;
654
- url: string;
655
- headers: Pick<Headers, "get">;
656
- };
657
- type ReadonlyContext = MiddlewareEnabled extends true ? Pick<RouterContextProvider, "get"> : Readonly<AppLoadContext>;
658
- type InstrumentableRoute = {
659
- id: string;
660
- index: boolean | undefined;
661
- path: string | undefined;
662
- instrument(instrumentations: RouteInstrumentations): void;
663
- };
664
- type RouteInstrumentations = {
665
- lazy?: InstrumentFunction<RouteLazyInstrumentationInfo>;
666
- "lazy.loader"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
667
- "lazy.action"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
668
- "lazy.middleware"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
669
- middleware?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
670
- loader?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
671
- action?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
672
- };
673
- type RouteLazyInstrumentationInfo = undefined;
674
- type RouteHandlerInstrumentationInfo = Readonly<{
675
- request: ReadonlyRequest;
676
- params: LoaderFunctionArgs["params"];
677
- pattern: string;
678
- context: ReadonlyContext;
679
- }>;
680
- type InstrumentableRouter = {
681
- instrument(instrumentations: RouterInstrumentations): void;
682
- };
683
- type RouterInstrumentations = {
684
- navigate?: InstrumentFunction<RouterNavigationInstrumentationInfo>;
685
- fetch?: InstrumentFunction<RouterFetchInstrumentationInfo>;
686
- };
687
- type RouterNavigationInstrumentationInfo = Readonly<{
688
- to: string | number;
689
- currentUrl: string;
690
- formMethod?: HTMLFormMethod;
691
- formEncType?: FormEncType;
692
- formData?: FormData;
693
- body?: any;
694
- }>;
695
- type RouterFetchInstrumentationInfo = Readonly<{
696
- href: string;
697
- currentUrl: string;
698
- fetcherKey: string;
699
- formMethod?: HTMLFormMethod;
700
- formEncType?: FormEncType;
701
- formData?: FormData;
702
- body?: any;
703
- }>;
704
- type InstrumentableRequestHandler = {
705
- instrument(instrumentations: RequestHandlerInstrumentations): void;
706
- };
707
- type RequestHandlerInstrumentations = {
708
- request?: InstrumentFunction<RequestHandlerInstrumentationInfo>;
709
- };
710
- type RequestHandlerInstrumentationInfo = Readonly<{
711
- request: ReadonlyRequest;
712
- context: ReadonlyContext | undefined;
713
- }>;
714
-
715
- export { type BlockerFunction as B, type ClientInstrumentation as C, type Fetcher as F, type GetScrollPositionFunction as G, type HydrationState as H, type InstrumentRequestHandlerFunction as I, type NavigationStates as N, type RouterInit as R, type StaticHandler as S, type Router as a, type Blocker as b, type RelativeRoutingType as c, type RouterState as d, type GetScrollRestorationKeyFunction as e, type StaticHandlerContext as f, type Navigation as g, type RouterSubscriber as h, type RouterNavigateOptions as i, type RouterFetchOptions as j, type RevalidationState as k, type ServerInstrumentation as l, type InstrumentRouterFunction as m, type InstrumentRouteFunction as n, type InstrumentationHandlerResult as o, IDLE_NAVIGATION as p, IDLE_FETCHER as q, IDLE_BLOCKER as r, createRouter as s, type FutureConfig as t, type CreateStaticHandlerOptions as u };