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
@@ -0,0 +1,663 @@
1
+
2
+ import { Action, History, Location, Path, To } from "./history.js";
3
+ import { DataRouteMatch, DataRouteObject, DataStrategyFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, MaybePromise, PatchRoutesOnNavigationFunction, RouteBranch, RouteData, RouteManifest, RouteObject, RouterContextProvider, Submission, UIMatch } from "./utils.js";
4
+ import { ClientInstrumentation, ServerInstrumentation } from "./instrumentation.js";
5
+
6
+ //#region lib/router/router.d.ts
7
+ /**
8
+ * A Router instance manages all navigation and data loading/mutations
9
+ */
10
+ interface Router {
11
+ /**
12
+ * @private
13
+ * PRIVATE - DO NOT USE
14
+ *
15
+ * Return the basename for the router
16
+ */
17
+ get basename(): RouterInit["basename"];
18
+ /**
19
+ * @private
20
+ * PRIVATE - DO NOT USE
21
+ *
22
+ * Return the future config for the router
23
+ */
24
+ get future(): FutureConfig;
25
+ /**
26
+ * @private
27
+ * PRIVATE - DO NOT USE
28
+ *
29
+ * Return the current state of the router
30
+ */
31
+ get state(): RouterState;
32
+ /**
33
+ * @private
34
+ * PRIVATE - DO NOT USE
35
+ *
36
+ * Return the routes for this router instance
37
+ */
38
+ get routes(): DataRouteObject[];
39
+ /**
40
+ * @private
41
+ * PRIVATE - DO NOT USE
42
+ *
43
+ * Return the route branches for this router instance
44
+ */
45
+ get branches(): RouteBranch<DataRouteObject>[] | undefined;
46
+ /**
47
+ * @private
48
+ * PRIVATE - DO NOT USE
49
+ *
50
+ * Return the manifest for this router instance
51
+ */
52
+ get manifest(): RouteManifest;
53
+ /**
54
+ * @private
55
+ * PRIVATE - DO NOT USE
56
+ *
57
+ * Return the window associated with the router
58
+ */
59
+ get window(): RouterInit["window"];
60
+ /**
61
+ * @private
62
+ * PRIVATE - DO NOT USE
63
+ *
64
+ * Initialize the router, including adding history listeners and kicking off
65
+ * initial data fetches. Returns a function to cleanup listeners and abort
66
+ * any in-progress loads
67
+ */
68
+ initialize(): Router;
69
+ /**
70
+ * @private
71
+ * PRIVATE - DO NOT USE
72
+ *
73
+ * Subscribe to router.state updates
74
+ *
75
+ * @param fn function to call with the new state
76
+ */
77
+ subscribe(fn: RouterSubscriber): () => void;
78
+ /**
79
+ * @private
80
+ * PRIVATE - DO NOT USE
81
+ *
82
+ * Enable scroll restoration behavior in the router
83
+ *
84
+ * @param savedScrollPositions Object that will manage positions, in case
85
+ * it's being restored from sessionStorage
86
+ * @param getScrollPosition Function to get the active Y scroll position
87
+ * @param getKey Function to get the key to use for restoration
88
+ */
89
+ enableScrollRestoration(savedScrollPositions: Record<string, number>, getScrollPosition: GetScrollPositionFunction, getKey?: GetScrollRestorationKeyFunction): () => void;
90
+ /**
91
+ * @private
92
+ * PRIVATE - DO NOT USE
93
+ *
94
+ * Navigate forward/backward in the history stack
95
+ * @param to Delta to move in the history stack
96
+ */
97
+ navigate(to: number): Promise<void>;
98
+ /**
99
+ * Navigate to the given path
100
+ * @param to Path to navigate to
101
+ * @param opts Navigation options (method, submission, etc.)
102
+ */
103
+ navigate(to: To | null, opts?: RouterNavigateOptions): Promise<void>;
104
+ /**
105
+ * @private
106
+ * PRIVATE - DO NOT USE
107
+ *
108
+ * Trigger a fetcher load/submission
109
+ *
110
+ * @param key Fetcher key
111
+ * @param routeId Route that owns the fetcher
112
+ * @param href href to fetch
113
+ * @param opts Fetcher options, (method, submission, etc.)
114
+ */
115
+ fetch(key: string, routeId: string, href: string | null, opts?: RouterFetchOptions): Promise<void>;
116
+ /**
117
+ * @private
118
+ * PRIVATE - DO NOT USE
119
+ *
120
+ * Trigger a revalidation of all current route loaders and fetcher loads
121
+ */
122
+ revalidate(): Promise<void>;
123
+ /**
124
+ * @private
125
+ * PRIVATE - DO NOT USE
126
+ *
127
+ * Utility function to create an href for the given location
128
+ * @param location
129
+ */
130
+ createHref(location: Location | URL): string;
131
+ /**
132
+ * @private
133
+ * PRIVATE - DO NOT USE
134
+ *
135
+ * Utility function to URL encode a destination path according to the internal
136
+ * history implementation
137
+ * @param to
138
+ */
139
+ encodeLocation(to: To): Path;
140
+ /**
141
+ * @private
142
+ * PRIVATE - DO NOT USE
143
+ *
144
+ * Get/create a fetcher for the given key
145
+ * @param key
146
+ */
147
+ getFetcher<TData = any>(key: string): Fetcher<TData>;
148
+ /**
149
+ * @internal
150
+ * PRIVATE - DO NOT USE
151
+ *
152
+ * Reset the fetcher for a given key
153
+ * @param key
154
+ */
155
+ resetFetcher(key: string, opts?: {
156
+ reason?: unknown;
157
+ }): void;
158
+ /**
159
+ * @private
160
+ * PRIVATE - DO NOT USE
161
+ *
162
+ * Delete the fetcher for a given key
163
+ * @param key
164
+ */
165
+ deleteFetcher(key: string): void;
166
+ /**
167
+ * @private
168
+ * PRIVATE - DO NOT USE
169
+ *
170
+ * Cleanup listeners and abort any in-progress loads
171
+ */
172
+ dispose(): void;
173
+ /**
174
+ * @private
175
+ * PRIVATE - DO NOT USE
176
+ *
177
+ * Get a navigation blocker
178
+ * @param key The identifier for the blocker
179
+ * @param fn The blocker function implementation
180
+ */
181
+ getBlocker(key: string, fn: BlockerFunction): Blocker;
182
+ /**
183
+ * @private
184
+ * PRIVATE - DO NOT USE
185
+ *
186
+ * Delete a navigation blocker
187
+ * @param key The identifier for the blocker
188
+ */
189
+ deleteBlocker(key: string): void;
190
+ /**
191
+ * @private
192
+ * PRIVATE DO NOT USE
193
+ *
194
+ * Patch additional children routes into an existing parent route
195
+ * @param routeId The parent route id or a callback function accepting `patch`
196
+ * to perform batch patching
197
+ * @param children The additional children routes
198
+ * @param unstable_allowElementMutations Allow mutation or route elements on
199
+ * existing routes. Intended for RSC-usage
200
+ * only.
201
+ */
202
+ patchRoutes(routeId: string | null, children: RouteObject[], unstable_allowElementMutations?: boolean): void;
203
+ /**
204
+ * @private
205
+ * PRIVATE - DO NOT USE
206
+ *
207
+ * HMR needs to pass in-flight route updates to React Router
208
+ * TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)
209
+ */
210
+ _internalSetRoutes(routes: RouteObject[]): void;
211
+ /**
212
+ * @private
213
+ * PRIVATE - DO NOT USE
214
+ *
215
+ * Cause subscribers to re-render. This is used to force a re-render.
216
+ */
217
+ _internalSetStateDoNotUseOrYouWillBreakYourApp(state: Partial<RouterState>): void;
218
+ /**
219
+ * @private
220
+ * PRIVATE - DO NOT USE
221
+ *
222
+ * Internal fetch AbortControllers accessed by unit tests
223
+ */
224
+ _internalFetchControllers: Map<string, AbortController>;
225
+ }
226
+ /**
227
+ * State maintained internally by the router. During a navigation, all states
228
+ * reflect the "old" location unless otherwise noted.
229
+ */
230
+ interface RouterState {
231
+ /**
232
+ * The action of the most recent navigation
233
+ */
234
+ historyAction: Action;
235
+ /**
236
+ * The current location reflected by the router
237
+ */
238
+ location: Location;
239
+ /**
240
+ * The current set of route matches
241
+ */
242
+ matches: DataRouteMatch[];
243
+ /**
244
+ * Tracks whether we've completed our initial data load
245
+ */
246
+ initialized: boolean;
247
+ /**
248
+ * Tracks whether we should be rendering a HydrateFallback during hydration
249
+ */
250
+ renderFallback: boolean;
251
+ /**
252
+ * Current scroll position we should start at for a new view
253
+ * - number -> scroll position to restore to
254
+ * - false -> do not restore scroll at all (used during submissions/revalidations)
255
+ * - null -> don't have a saved position, scroll to hash or top of page
256
+ */
257
+ restoreScrollPosition: number | false | null;
258
+ /**
259
+ * Indicate whether this navigation should skip resetting the scroll position
260
+ * if we are unable to restore the scroll position
261
+ */
262
+ preventScrollReset: boolean;
263
+ /**
264
+ * Tracks the state of the current navigation
265
+ */
266
+ navigation: Navigation;
267
+ /**
268
+ * Tracks any in-progress revalidations
269
+ */
270
+ revalidation: RevalidationState;
271
+ /**
272
+ * Data from the loaders for the current matches
273
+ */
274
+ loaderData: RouteData;
275
+ /**
276
+ * Data from the action for the current matches
277
+ */
278
+ actionData: RouteData | null;
279
+ /**
280
+ * Errors caught from loaders for the current matches
281
+ */
282
+ errors: RouteData | null;
283
+ /**
284
+ * Map of current fetchers
285
+ */
286
+ fetchers: Map<string, Fetcher>;
287
+ /**
288
+ * Map of current blockers
289
+ */
290
+ blockers: Map<string, Blocker>;
291
+ }
292
+ /**
293
+ * Data that can be passed into hydrate a Router from SSR
294
+ */
295
+ type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
296
+ /**
297
+ * Future flags to toggle new feature behavior
298
+ */
299
+ interface FutureConfig {}
300
+ /**
301
+ * Initialization options for createRouter
302
+ */
303
+ interface RouterInit {
304
+ routes: RouteObject[];
305
+ history: History;
306
+ basename?: string;
307
+ getContext?: () => MaybePromise<RouterContextProvider>;
308
+ instrumentations?: ClientInstrumentation[];
309
+ mapRouteProperties?: MapRoutePropertiesFunction;
310
+ future?: Partial<FutureConfig>;
311
+ hydrationRouteProperties?: string[];
312
+ hydrationData?: HydrationState;
313
+ window?: Window;
314
+ dataStrategy?: DataStrategyFunction;
315
+ patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
316
+ }
317
+ /**
318
+ * State returned from a server-side query() call
319
+ */
320
+ interface StaticHandlerContext {
321
+ basename: Router["basename"];
322
+ location: RouterState["location"];
323
+ matches: RouterState["matches"];
324
+ loaderData: RouterState["loaderData"];
325
+ actionData: RouterState["actionData"];
326
+ errors: RouterState["errors"];
327
+ statusCode: number;
328
+ loaderHeaders: Record<string, Headers>;
329
+ actionHeaders: Record<string, Headers>;
330
+ _deepestRenderedBoundaryId?: string | null;
331
+ }
332
+ /**
333
+ * A StaticHandler instance manages a singular SSR navigation/fetch event
334
+ */
335
+ interface StaticHandler {
336
+ /**
337
+ * The set of data routes managed by this handler
338
+ */
339
+ dataRoutes: DataRouteObject[];
340
+ /**
341
+ * @private
342
+ * PRIVATE - DO NOT USE
343
+ *
344
+ * The route branches derived from the data routes, used for internal route
345
+ * matching in Framework Mode
346
+ */
347
+ _internalRouteBranches: RouteBranch<DataRouteObject>[];
348
+ /**
349
+ * Perform a query for a given request - executing all matched route
350
+ * loaders/actions. Used for document requests.
351
+ *
352
+ * @param request The request to query
353
+ * @param opts Optional query options
354
+ * @param opts.dataStrategy Alternate dataStrategy implementation
355
+ * @param opts.filterMatchesToLoad Predicate function to filter which matches should be loaded
356
+ * @param opts.generateMiddlewareResponse To enable middleware, provide a function
357
+ * to generate a response to bubble back up the middleware chain
358
+ * @param opts.requestContext Context object to pass to loaders/actions
359
+ * @param opts.skipLoaderErrorBubbling Skip loader error bubbling
360
+ * @param opts.skipRevalidation Skip revalidation after action submission
361
+ * @param opts.normalizePath Normalize the request path
362
+ */
363
+ query(request: Request, opts?: {
364
+ requestContext?: unknown;
365
+ filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
366
+ skipLoaderErrorBubbling?: boolean;
367
+ skipRevalidation?: boolean;
368
+ dataStrategy?: DataStrategyFunction<unknown>;
369
+ generateMiddlewareResponse?: (query: (r: Request, args?: {
370
+ filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
371
+ }) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
372
+ normalizePath?: (request: Request) => Path;
373
+ }): Promise<StaticHandlerContext | Response>;
374
+ /**
375
+ * Perform a query for a specific route. Used for resource requests.
376
+ *
377
+ * @param request The request to query
378
+ * @param opts Optional queryRoute options
379
+ * @param opts.dataStrategy Alternate dataStrategy implementation
380
+ * @param opts.generateMiddlewareResponse To enable middleware, provide a function
381
+ * to generate a response to bubble back up the middleware chain
382
+ * @param opts.requestContext Context object to pass to loaders/actions
383
+ * @param opts.routeId The ID of the route to query
384
+ * @param opts.normalizePath Normalize the request path
385
+ */
386
+ queryRoute(request: Request, opts?: {
387
+ routeId?: string;
388
+ requestContext?: unknown;
389
+ dataStrategy?: DataStrategyFunction<unknown>;
390
+ generateMiddlewareResponse?: (queryRoute: (r: Request) => Promise<Response>) => MaybePromise<Response>;
391
+ normalizePath?: (request: Request) => Path;
392
+ }): Promise<any>;
393
+ }
394
+ type ViewTransitionOpts = {
395
+ currentLocation: Location;
396
+ nextLocation: Location;
397
+ };
398
+ /**
399
+ * Subscriber function signature for changes to router state
400
+ */
401
+ interface RouterSubscriber {
402
+ (state: RouterState, opts: {
403
+ deletedFetchers: string[];
404
+ newErrors: RouteData | null;
405
+ viewTransitionOpts?: ViewTransitionOpts;
406
+ flushSync: boolean;
407
+ }): void;
408
+ }
409
+ /**
410
+ * Function signature for determining the key to be used in scroll restoration
411
+ * for a given location
412
+ */
413
+ interface GetScrollRestorationKeyFunction {
414
+ (location: Location, matches: UIMatch[]): string | null;
415
+ }
416
+ /**
417
+ * Function signature for determining the current scroll position
418
+ */
419
+ interface GetScrollPositionFunction {
420
+ (): number;
421
+ }
422
+ /**
423
+ * - "route": relative to the route hierarchy so `..` means remove all segments
424
+ * of the current route even if it has many. For example, a `route("posts/:id")`
425
+ * would have both `:id` and `posts` removed from the url.
426
+ * - "path": relative to the pathname so `..` means remove one segment of the
427
+ * pathname. For example, a `route("posts/:id")` would have only `:id` removed
428
+ * from the url.
429
+ */
430
+ type RelativeRoutingType = "route" | "path";
431
+ type BaseNavigateOrFetchOptions = {
432
+ preventScrollReset?: boolean;
433
+ relative?: RelativeRoutingType;
434
+ flushSync?: boolean;
435
+ defaultShouldRevalidate?: boolean;
436
+ };
437
+ type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
438
+ replace?: boolean;
439
+ state?: any;
440
+ fromRouteId?: string;
441
+ viewTransition?: boolean;
442
+ mask?: To;
443
+ };
444
+ type BaseSubmissionOptions = {
445
+ formMethod?: HTMLFormMethod;
446
+ formEncType?: FormEncType;
447
+ } & ({
448
+ formData: FormData;
449
+ body?: undefined;
450
+ } | {
451
+ formData?: undefined;
452
+ body: any;
453
+ });
454
+ /**
455
+ * Options for a navigate() call for a normal (non-submission) navigation
456
+ */
457
+ type LinkNavigateOptions = BaseNavigateOptions;
458
+ /**
459
+ * Options for a navigate() call for a submission navigation
460
+ */
461
+ type SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;
462
+ /**
463
+ * Options to pass to navigate() for a navigation
464
+ */
465
+ type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
466
+ /**
467
+ * Options for a fetch() load
468
+ */
469
+ type LoadFetchOptions = BaseNavigateOrFetchOptions;
470
+ /**
471
+ * Options for a fetch() submission
472
+ */
473
+ type SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;
474
+ /**
475
+ * Options to pass to fetch()
476
+ */
477
+ type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;
478
+ /**
479
+ * Potential states for state.navigation
480
+ */
481
+ type NavigationStates = {
482
+ Idle: {
483
+ state: "idle";
484
+ location: undefined;
485
+ matches: undefined;
486
+ historyAction: undefined;
487
+ formMethod: undefined;
488
+ formAction: undefined;
489
+ formEncType: undefined;
490
+ formData: undefined;
491
+ json: undefined;
492
+ text: undefined;
493
+ };
494
+ Loading: {
495
+ state: "loading";
496
+ location: Location;
497
+ matches: DataRouteMatch[];
498
+ historyAction: Action;
499
+ formMethod: Submission["formMethod"] | undefined;
500
+ formAction: Submission["formAction"] | undefined;
501
+ formEncType: Submission["formEncType"] | undefined;
502
+ formData: Submission["formData"] | undefined;
503
+ json: Submission["json"] | undefined;
504
+ text: Submission["text"] | undefined;
505
+ };
506
+ Submitting: {
507
+ state: "submitting";
508
+ location: Location;
509
+ matches: DataRouteMatch[];
510
+ historyAction: Action;
511
+ formMethod: Submission["formMethod"];
512
+ formAction: Submission["formAction"];
513
+ formEncType: Submission["formEncType"];
514
+ formData: Submission["formData"];
515
+ json: Submission["json"];
516
+ text: Submission["text"];
517
+ };
518
+ };
519
+ type Navigation = NavigationStates[keyof NavigationStates];
520
+ type RevalidationState = "idle" | "loading";
521
+ /**
522
+ * Potential states for fetchers
523
+ */
524
+ type FetcherStates<TData = any> = {
525
+ /**
526
+ * The fetcher is not calling a loader or action
527
+ *
528
+ * ```tsx
529
+ * fetcher.state === "idle"
530
+ * ```
531
+ */
532
+ Idle: {
533
+ state: "idle";
534
+ formMethod: undefined;
535
+ formAction: undefined;
536
+ formEncType: undefined;
537
+ text: undefined;
538
+ formData: undefined;
539
+ json: undefined;
540
+ /**
541
+ * If the fetcher has never been called, this will be undefined.
542
+ */
543
+ data: TData | undefined;
544
+ };
545
+ /**
546
+ * The fetcher is loading data from a {@link LoaderFunction | loader} from a
547
+ * call to {@link FetcherWithComponents.load | `fetcher.load`}.
548
+ *
549
+ * ```tsx
550
+ * // somewhere
551
+ * <button onClick={() => fetcher.load("/some/route") }>Load</button>
552
+ *
553
+ * // the state will update
554
+ * fetcher.state === "loading"
555
+ * ```
556
+ */
557
+ Loading: {
558
+ state: "loading";
559
+ formMethod: Submission["formMethod"] | undefined;
560
+ formAction: Submission["formAction"] | undefined;
561
+ formEncType: Submission["formEncType"] | undefined;
562
+ text: Submission["text"] | undefined;
563
+ formData: Submission["formData"] | undefined;
564
+ json: Submission["json"] | undefined;
565
+ data: TData | undefined;
566
+ };
567
+ /**
568
+ 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`}.
569
+ ```tsx
570
+ // somewhere
571
+ <input
572
+ onChange={e => {
573
+ fetcher.submit(event.currentTarget.form, { method: "post" });
574
+ }}
575
+ />
576
+ // the state will update
577
+ fetcher.state === "submitting"
578
+ // and formData will be available
579
+ fetcher.formData
580
+ ```
581
+ */
582
+ Submitting: {
583
+ state: "submitting";
584
+ formMethod: Submission["formMethod"];
585
+ formAction: Submission["formAction"];
586
+ formEncType: Submission["formEncType"];
587
+ text: Submission["text"];
588
+ formData: Submission["formData"];
589
+ json: Submission["json"];
590
+ data: TData | undefined;
591
+ };
592
+ };
593
+ type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
594
+ interface BlockerBlocked {
595
+ state: "blocked";
596
+ reset: () => void;
597
+ proceed: () => void;
598
+ location: Location;
599
+ }
600
+ interface BlockerUnblocked {
601
+ state: "unblocked";
602
+ reset: undefined;
603
+ proceed: undefined;
604
+ location: undefined;
605
+ }
606
+ interface BlockerProceeding {
607
+ state: "proceeding";
608
+ reset: undefined;
609
+ proceed: undefined;
610
+ location: Location;
611
+ }
612
+ type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
613
+ type BlockerFunction = (args: {
614
+ currentLocation: Location;
615
+ nextLocation: Location;
616
+ historyAction: Action;
617
+ }) => boolean;
618
+ declare const IDLE_NAVIGATION: NavigationStates["Idle"];
619
+ declare const IDLE_FETCHER: FetcherStates["Idle"];
620
+ declare const IDLE_BLOCKER: BlockerUnblocked;
621
+ /**
622
+ * Create a router and listen to history POP navigations
623
+ */
624
+ declare function createRouter(init: RouterInit): Router;
625
+ interface CreateStaticHandlerOptions {
626
+ basename?: string;
627
+ mapRouteProperties?: MapRoutePropertiesFunction;
628
+ instrumentations?: Pick<ServerInstrumentation, "route">[];
629
+ future?: Partial<FutureConfig>;
630
+ }
631
+ /**
632
+ * Create a static handler to perform server-side data loading
633
+ *
634
+ * @example
635
+ * export async function handleRequest(request: Request) {
636
+ * let { query, dataRoutes } = createStaticHandler(routes);
637
+ * let context = await query(request);
638
+ *
639
+ * if (context instanceof Response) {
640
+ * return context;
641
+ * }
642
+ *
643
+ * let router = createStaticRouter(dataRoutes, context);
644
+ * return new Response(
645
+ * ReactDOMServer.renderToString(<StaticRouterProvider ... />),
646
+ * { headers: { "Content-Type": "text/html" } }
647
+ * );
648
+ * }
649
+ *
650
+ * @public
651
+ * @category Data Routers
652
+ * @mode data
653
+ * @param routes The {@link RouteObject | route objects} to create a static
654
+ * handler for
655
+ * @param opts Options
656
+ * @param opts.basename The base URL for the static handler (default: `/`)
657
+ * @param opts.future Future flags for the static handler
658
+ * @returns A static handler that can be used to query data for the provided
659
+ * routes
660
+ */
661
+ declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
662
+ //#endregion
663
+ export { Blocker, BlockerFunction, Fetcher, FutureConfig, GetScrollPositionFunction, GetScrollRestorationKeyFunction, HydrationState, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, Navigation, NavigationStates, RelativeRoutingType, RevalidationState, Router, RouterFetchOptions, RouterInit, RouterNavigateOptions, RouterState, RouterSubscriber, StaticHandler, StaticHandlerContext, createRouter, createStaticHandler };