tempest-react-sdk 0.52.0 → 0.54.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 (507) hide show
  1. package/README.md +58 -7
  2. package/dist/access/Can.cjs +1 -1
  3. package/dist/access/Can.cjs.map +1 -1
  4. package/dist/access/Can.js +3 -3
  5. package/dist/access/Can.js.map +1 -1
  6. package/dist/audio/audio-bus.cjs +2 -0
  7. package/dist/audio/audio-bus.cjs.map +1 -0
  8. package/dist/audio/audio-bus.js +116 -0
  9. package/dist/audio/audio-bus.js.map +1 -0
  10. package/dist/audio/level-meter.cjs +1 -1
  11. package/dist/audio/level-meter.cjs.map +1 -1
  12. package/dist/audio/level-meter.js +15 -15
  13. package/dist/audio/level-meter.js.map +1 -1
  14. package/dist/audio/noise-floor.cjs +2 -0
  15. package/dist/audio/noise-floor.cjs.map +1 -0
  16. package/dist/audio/noise-floor.js +27 -0
  17. package/dist/audio/noise-floor.js.map +1 -0
  18. package/dist/audio/use-audio-bus.cjs +2 -0
  19. package/dist/audio/use-audio-bus.cjs.map +1 -0
  20. package/dist/audio/use-audio-bus.js +11 -0
  21. package/dist/audio/use-audio-bus.js.map +1 -0
  22. package/dist/audio/voice-activity.cjs +2 -0
  23. package/dist/audio/voice-activity.cjs.map +1 -0
  24. package/dist/audio/voice-activity.js +26 -0
  25. package/dist/audio/voice-activity.js.map +1 -0
  26. package/dist/audio/voice-chain-stages.cjs +2 -0
  27. package/dist/audio/voice-chain-stages.cjs.map +1 -0
  28. package/dist/audio/voice-chain-stages.js +82 -0
  29. package/dist/audio/voice-chain-stages.js.map +1 -0
  30. package/dist/audio/voice-chain.cjs +2 -0
  31. package/dist/audio/voice-chain.cjs.map +1 -0
  32. package/dist/audio/voice-chain.js +74 -0
  33. package/dist/audio/voice-chain.js.map +1 -0
  34. package/dist/auth/lazy-with-retry.cjs.map +1 -1
  35. package/dist/auth/lazy-with-retry.js.map +1 -1
  36. package/dist/auth/passkey.cjs.map +1 -1
  37. package/dist/auth/passkey.js.map +1 -1
  38. package/dist/br/BrazilStateCitySelect.cjs +1 -1
  39. package/dist/br/BrazilStateCitySelect.cjs.map +1 -1
  40. package/dist/br/BrazilStateCitySelect.js +36 -28
  41. package/dist/br/BrazilStateCitySelect.js.map +1 -1
  42. package/dist/br/data/br-centroids.cjs +1 -1
  43. package/dist/br/data/br-centroids.cjs.map +1 -1
  44. package/dist/br/data/br-centroids.js +11105 -11045
  45. package/dist/br/data/br-centroids.js.map +1 -1
  46. package/dist/br/data/br-locations.cjs +1 -1
  47. package/dist/br/data/br-locations.cjs.map +1 -1
  48. package/dist/br/data/br-locations.js +5803 -137
  49. package/dist/br/data/br-locations.js.map +1 -1
  50. package/dist/br/data/br-uf-geo.cjs +1 -1
  51. package/dist/br/data/br-uf-geo.cjs.map +1 -1
  52. package/dist/br/data/br-uf-geo.js +5721 -6777
  53. package/dist/br/data/br-uf-geo.js.map +1 -1
  54. package/dist/br/data/mun/AC.cjs +1 -1
  55. package/dist/br/data/mun/AC.cjs.map +1 -1
  56. package/dist/br/data/mun/AC.js +681 -689
  57. package/dist/br/data/mun/AC.js.map +1 -1
  58. package/dist/br/data/mun/AL.cjs +1 -1
  59. package/dist/br/data/mun/AL.cjs.map +1 -1
  60. package/dist/br/data/mun/AL.js +949 -844
  61. package/dist/br/data/mun/AL.js.map +1 -1
  62. package/dist/br/data/mun/AM.cjs +1 -1
  63. package/dist/br/data/mun/AM.cjs.map +1 -1
  64. package/dist/br/data/mun/AM.js +4337 -4218
  65. package/dist/br/data/mun/AM.js.map +1 -1
  66. package/dist/br/data/mun/AP.cjs +1 -1
  67. package/dist/br/data/mun/AP.cjs.map +1 -1
  68. package/dist/br/data/mun/AP.js +786 -780
  69. package/dist/br/data/mun/AP.js.map +1 -1
  70. package/dist/br/data/mun/BA.cjs +1 -1
  71. package/dist/br/data/mun/BA.cjs.map +1 -1
  72. package/dist/br/data/mun/BA.js +6329 -5633
  73. package/dist/br/data/mun/BA.js.map +1 -1
  74. package/dist/br/data/mun/CE.cjs +1 -1
  75. package/dist/br/data/mun/CE.cjs.map +1 -1
  76. package/dist/br/data/mun/CE.js +2544 -2487
  77. package/dist/br/data/mun/CE.js.map +1 -1
  78. package/dist/br/data/mun/DF.cjs +1 -1
  79. package/dist/br/data/mun/DF.cjs.map +1 -1
  80. package/dist/br/data/mun/DF.js +17 -16
  81. package/dist/br/data/mun/DF.js.map +1 -1
  82. package/dist/br/data/mun/ES.cjs +1 -1
  83. package/dist/br/data/mun/ES.cjs.map +1 -1
  84. package/dist/br/data/mun/ES.js +1101 -1070
  85. package/dist/br/data/mun/ES.js.map +1 -1
  86. package/dist/br/data/mun/GO.cjs +1 -1
  87. package/dist/br/data/mun/GO.cjs.map +1 -1
  88. package/dist/br/data/mun/GO.js +4632 -4636
  89. package/dist/br/data/mun/GO.js.map +1 -1
  90. package/dist/br/data/mun/MA.cjs +1 -1
  91. package/dist/br/data/mun/MA.cjs.map +1 -1
  92. package/dist/br/data/mun/MA.js +3603 -3457
  93. package/dist/br/data/mun/MA.js.map +1 -1
  94. package/dist/br/data/mun/MG.cjs +1 -1
  95. package/dist/br/data/mun/MG.cjs.map +1 -1
  96. package/dist/br/data/mun/MG.js +12716 -11739
  97. package/dist/br/data/mun/MG.js.map +1 -1
  98. package/dist/br/data/mun/MS.cjs +1 -1
  99. package/dist/br/data/mun/MS.cjs.map +1 -1
  100. package/dist/br/data/mun/MS.js +2182 -2335
  101. package/dist/br/data/mun/MS.js.map +1 -1
  102. package/dist/br/data/mun/MT.cjs +1 -1
  103. package/dist/br/data/mun/MT.cjs.map +1 -1
  104. package/dist/br/data/mun/MT.js +4808 -4896
  105. package/dist/br/data/mun/MT.js.map +1 -1
  106. package/dist/br/data/mun/PA.cjs +1 -1
  107. package/dist/br/data/mun/PA.cjs.map +1 -1
  108. package/dist/br/data/mun/PA.js +4981 -4901
  109. package/dist/br/data/mun/PA.js.map +1 -1
  110. package/dist/br/data/mun/PB.cjs +1 -1
  111. package/dist/br/data/mun/PB.cjs.map +1 -1
  112. package/dist/br/data/mun/PB.js +2418 -1956
  113. package/dist/br/data/mun/PB.js.map +1 -1
  114. package/dist/br/data/mun/PE.cjs +1 -1
  115. package/dist/br/data/mun/PE.cjs.map +1 -1
  116. package/dist/br/data/mun/PE.js +2164 -1987
  117. package/dist/br/data/mun/PE.js.map +1 -1
  118. package/dist/br/data/mun/PI.cjs +1 -1
  119. package/dist/br/data/mun/PI.cjs.map +1 -1
  120. package/dist/br/data/mun/PI.js +2982 -2844
  121. package/dist/br/data/mun/PI.js.map +1 -1
  122. package/dist/br/data/mun/PR.cjs +1 -1
  123. package/dist/br/data/mun/PR.cjs.map +1 -1
  124. package/dist/br/data/mun/PR.js +5425 -5240
  125. package/dist/br/data/mun/PR.js.map +1 -1
  126. package/dist/br/data/mun/RJ.cjs +1 -1
  127. package/dist/br/data/mun/RJ.cjs.map +1 -1
  128. package/dist/br/data/mun/RJ.js +1395 -1178
  129. package/dist/br/data/mun/RJ.js.map +1 -1
  130. package/dist/br/data/mun/RN.cjs +1 -1
  131. package/dist/br/data/mun/RN.cjs.map +1 -1
  132. package/dist/br/data/mun/RN.js +1608 -1382
  133. package/dist/br/data/mun/RN.js.map +1 -1
  134. package/dist/br/data/mun/RO.cjs +1 -1
  135. package/dist/br/data/mun/RO.cjs.map +1 -1
  136. package/dist/br/data/mun/RO.js +1392 -1470
  137. package/dist/br/data/mun/RO.js.map +1 -1
  138. package/dist/br/data/mun/RR.cjs +1 -1
  139. package/dist/br/data/mun/RR.cjs.map +1 -1
  140. package/dist/br/data/mun/RR.js +795 -778
  141. package/dist/br/data/mun/RR.js.map +1 -1
  142. package/dist/br/data/mun/RS.cjs +1 -1
  143. package/dist/br/data/mun/RS.cjs.map +1 -1
  144. package/dist/br/data/mun/RS.js +7579 -6424
  145. package/dist/br/data/mun/RS.js.map +1 -1
  146. package/dist/br/data/mun/SC.cjs +1 -1
  147. package/dist/br/data/mun/SC.cjs.map +1 -1
  148. package/dist/br/data/mun/SC.js +3979 -3357
  149. package/dist/br/data/mun/SC.js.map +1 -1
  150. package/dist/br/data/mun/SE.cjs +1 -1
  151. package/dist/br/data/mun/SE.cjs.map +1 -1
  152. package/dist/br/data/mun/SE.js +812 -625
  153. package/dist/br/data/mun/SE.js.map +1 -1
  154. package/dist/br/data/mun/SP.cjs +1 -1
  155. package/dist/br/data/mun/SP.cjs.map +1 -1
  156. package/dist/br/data/mun/SP.js +7866 -6803
  157. package/dist/br/data/mun/SP.js.map +1 -1
  158. package/dist/br/data/mun/TO.cjs +1 -1
  159. package/dist/br/data/mun/TO.cjs.map +1 -1
  160. package/dist/br/data/mun/TO.js +2763 -2817
  161. package/dist/br/data/mun/TO.js.map +1 -1
  162. package/dist/br/locations.cjs +1 -1
  163. package/dist/br/locations.cjs.map +1 -1
  164. package/dist/br/locations.js +97 -24
  165. package/dist/br/locations.js.map +1 -1
  166. package/dist/br/scales.cjs +1 -1
  167. package/dist/br/scales.cjs.map +1 -1
  168. package/dist/br/scales.js +8 -4
  169. package/dist/br/scales.js.map +1 -1
  170. package/dist/br/whatsapp.cjs +2 -0
  171. package/dist/br/whatsapp.cjs.map +1 -0
  172. package/dist/br/whatsapp.js +21 -0
  173. package/dist/br/whatsapp.js.map +1 -0
  174. package/dist/br.cjs +1 -1
  175. package/dist/br.cjs.map +1 -1
  176. package/dist/br.d.ts +188 -10
  177. package/dist/br.js +18 -17
  178. package/dist/br.js.map +1 -1
  179. package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
  180. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  181. package/dist/components/BottomSheet/BottomSheet.js +30 -27
  182. package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
  183. package/dist/components/Command/Command.cjs +1 -1
  184. package/dist/components/Command/Command.cjs.map +1 -1
  185. package/dist/components/Command/Command.js +78 -75
  186. package/dist/components/Command/Command.js.map +1 -1
  187. package/dist/components/Drawer/Drawer.cjs +1 -1
  188. package/dist/components/Drawer/Drawer.cjs.map +1 -1
  189. package/dist/components/Drawer/Drawer.js +42 -39
  190. package/dist/components/Drawer/Drawer.js.map +1 -1
  191. package/dist/components/DropdownMenu/DropdownMenu.cjs +1 -1
  192. package/dist/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
  193. package/dist/components/DropdownMenu/DropdownMenu.js +111 -67
  194. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
  195. package/dist/components/Modal/Modal.cjs +1 -1
  196. package/dist/components/Modal/Modal.cjs.map +1 -1
  197. package/dist/components/Modal/Modal.js +45 -42
  198. package/dist/components/Modal/Modal.js.map +1 -1
  199. package/dist/components/Money/Money.cjs +1 -1
  200. package/dist/components/Money/Money.cjs.map +1 -1
  201. package/dist/components/Money/Money.js +10 -9
  202. package/dist/components/Money/Money.js.map +1 -1
  203. package/dist/components/Pagination/Pagination.cjs +1 -1
  204. package/dist/components/Pagination/Pagination.cjs.map +1 -1
  205. package/dist/components/Pagination/Pagination.js +38 -31
  206. package/dist/components/Pagination/Pagination.js.map +1 -1
  207. package/dist/components/Pagination/Pagination.module.cjs +1 -1
  208. package/dist/components/Pagination/Pagination.module.cjs.map +1 -1
  209. package/dist/components/Pagination/Pagination.module.js +4 -4
  210. package/dist/components/Pagination/Pagination.module.js.map +1 -1
  211. package/dist/components/Portal/Portal.cjs +1 -1
  212. package/dist/components/Portal/Portal.cjs.map +1 -1
  213. package/dist/components/Portal/Portal.js +9 -6
  214. package/dist/components/Portal/Portal.js.map +1 -1
  215. package/dist/components/Portal/portal-host.cjs +2 -0
  216. package/dist/components/Portal/portal-host.cjs.map +1 -0
  217. package/dist/components/Portal/portal-host.js +11 -0
  218. package/dist/components/Portal/portal-host.js.map +1 -0
  219. package/dist/components/RangeSlider/RangeSlider.cjs +1 -1
  220. package/dist/components/RangeSlider/RangeSlider.cjs.map +1 -1
  221. package/dist/components/RangeSlider/RangeSlider.js +23 -23
  222. package/dist/components/RangeSlider/RangeSlider.js.map +1 -1
  223. package/dist/components/Scheduler/Scheduler.cjs +1 -1
  224. package/dist/components/Scheduler/Scheduler.cjs.map +1 -1
  225. package/dist/components/Scheduler/Scheduler.js +83 -82
  226. package/dist/components/Scheduler/Scheduler.js.map +1 -1
  227. package/dist/components/Slider/Slider.cjs +1 -1
  228. package/dist/components/Slider/Slider.cjs.map +1 -1
  229. package/dist/components/Slider/Slider.js +9 -9
  230. package/dist/components/Slider/Slider.js.map +1 -1
  231. package/dist/components/Toast/ToastProvider.cjs +1 -1
  232. package/dist/components/Toast/ToastProvider.cjs.map +1 -1
  233. package/dist/components/Toast/ToastProvider.js +55 -53
  234. package/dist/components/Toast/ToastProvider.js.map +1 -1
  235. package/dist/components/VirtualList/VirtualList.cjs +1 -1
  236. package/dist/components/VirtualList/VirtualList.cjs.map +1 -1
  237. package/dist/components/VirtualList/VirtualList.js +41 -31
  238. package/dist/components/VirtualList/VirtualList.js.map +1 -1
  239. package/dist/components/VirtualTable/VirtualTable.cjs +1 -1
  240. package/dist/components/VirtualTable/VirtualTable.cjs.map +1 -1
  241. package/dist/components/VirtualTable/VirtualTable.js +78 -68
  242. package/dist/components/VirtualTable/VirtualTable.js.map +1 -1
  243. package/dist/forms/FormField.cjs +1 -1
  244. package/dist/forms/FormField.cjs.map +1 -1
  245. package/dist/forms/FormField.js +23 -21
  246. package/dist/forms/FormField.js.map +1 -1
  247. package/dist/forms/masked-inputs.cjs +1 -1
  248. package/dist/forms/masked-inputs.cjs.map +1 -1
  249. package/dist/forms/masked-inputs.js +20 -19
  250. package/dist/forms/masked-inputs.js.map +1 -1
  251. package/dist/hooks/use-fullscreen-element.cjs +2 -0
  252. package/dist/hooks/use-fullscreen-element.cjs.map +1 -0
  253. package/dist/hooks/use-fullscreen-element.js +20 -0
  254. package/dist/hooks/use-fullscreen-element.js.map +1 -0
  255. package/dist/hooks/use-fullscreen.cjs +2 -0
  256. package/dist/hooks/use-fullscreen.cjs.map +1 -0
  257. package/dist/hooks/use-fullscreen.js +66 -0
  258. package/dist/hooks/use-fullscreen.js.map +1 -0
  259. package/dist/hooks/use-push-to-talk.cjs +2 -0
  260. package/dist/hooks/use-push-to-talk.cjs.map +1 -0
  261. package/dist/hooks/use-push-to-talk.js +61 -0
  262. package/dist/hooks/use-push-to-talk.js.map +1 -0
  263. package/dist/http/describe-api-error.cjs.map +1 -1
  264. package/dist/http/describe-api-error.js.map +1 -1
  265. package/dist/http/errors.cjs +1 -1
  266. package/dist/http/errors.cjs.map +1 -1
  267. package/dist/http/errors.js +34 -16
  268. package/dist/http/errors.js.map +1 -1
  269. package/dist/http/parse-response.cjs +2 -2
  270. package/dist/http/parse-response.cjs.map +1 -1
  271. package/dist/http/parse-response.js +9 -8
  272. package/dist/http/parse-response.js.map +1 -1
  273. package/dist/i18n/create-i18n.cjs +1 -1
  274. package/dist/i18n/create-i18n.cjs.map +1 -1
  275. package/dist/i18n/create-i18n.js +28 -27
  276. package/dist/i18n/create-i18n.js.map +1 -1
  277. package/dist/query/QueryProvider.cjs +1 -1
  278. package/dist/query/QueryProvider.cjs.map +1 -1
  279. package/dist/query/QueryProvider.js +13 -11
  280. package/dist/query/QueryProvider.js.map +1 -1
  281. package/dist/query/foreign-client-warning.cjs +2 -0
  282. package/dist/query/foreign-client-warning.cjs.map +1 -0
  283. package/dist/query/foreign-client-warning.js +12 -0
  284. package/dist/query/foreign-client-warning.js.map +1 -0
  285. package/dist/router/AppRouter.cjs +1 -1
  286. package/dist/router/AppRouter.cjs.map +1 -1
  287. package/dist/router/AppRouter.js +28 -21
  288. package/dist/router/AppRouter.js.map +1 -1
  289. package/dist/router/RouteGuard.cjs +1 -1
  290. package/dist/router/RouteGuard.cjs.map +1 -1
  291. package/dist/router/RouteGuard.js +4 -4
  292. package/dist/router/RouteGuard.js.map +1 -1
  293. package/dist/sse/create-event-stream.cjs +1 -1
  294. package/dist/sse/create-event-stream.cjs.map +1 -1
  295. package/dist/sse/create-event-stream.js +34 -38
  296. package/dist/sse/create-event-stream.js.map +1 -1
  297. package/dist/styles/AIChat.css +79 -0
  298. package/dist/styles/Accordion.css +12 -0
  299. package/dist/styles/Alert.css +32 -0
  300. package/dist/styles/AppBar.css +17 -0
  301. package/dist/styles/AppShell.css +8 -0
  302. package/dist/styles/AspectRatio.css +3 -0
  303. package/dist/styles/AudioPlayer.css +13 -0
  304. package/dist/styles/AudioRecorder.css +20 -0
  305. package/dist/styles/Avatar.css +13 -0
  306. package/dist/styles/AvatarGroup.css +18 -0
  307. package/dist/styles/Badge.css +25 -0
  308. package/dist/styles/Banner.css +13 -0
  309. package/dist/styles/BarList.css +10 -0
  310. package/dist/styles/BarcodeScanner.css +21 -0
  311. package/dist/styles/BottomNavigation.css +10 -0
  312. package/dist/styles/BottomSheet.css +11 -0
  313. package/dist/styles/BrazilMap.css +20 -0
  314. package/dist/styles/Breadcrumbs.css +8 -0
  315. package/dist/styles/Button.css +42 -0
  316. package/dist/styles/Calendar.css +16 -0
  317. package/dist/styles/Card.css +15 -0
  318. package/dist/styles/Carousel.css +17 -0
  319. package/dist/styles/Center.css +5 -0
  320. package/dist/styles/Chat.css +35 -0
  321. package/dist/styles/Checkbox.css +11 -0
  322. package/dist/styles/ChipInput.css +13 -0
  323. package/dist/styles/CodeBlock.css +25 -0
  324. package/dist/styles/Collapsible.css +6 -0
  325. package/dist/styles/Combobox.css +18 -0
  326. package/dist/styles/Command.css +20 -0
  327. package/dist/styles/ContextMenu.css +11 -0
  328. package/dist/styles/CopyButton.css +4 -0
  329. package/dist/styles/DataList.css +3 -0
  330. package/dist/styles/DataTable.css +19 -0
  331. package/dist/styles/DateRangePicker.css +22 -0
  332. package/dist/styles/DescriptionList.css +4 -0
  333. package/dist/styles/Divider.css +11 -0
  334. package/dist/styles/Drawer.css +22 -0
  335. package/dist/styles/DropdownMenu.css +16 -0
  336. package/dist/styles/Dropzone.css +7 -0
  337. package/dist/styles/EmptyState.css +6 -0
  338. package/dist/styles/ErrorState.css +6 -0
  339. package/dist/styles/ErrorText.css +2 -0
  340. package/dist/styles/FileUpload.css +17 -0
  341. package/dist/styles/FilterBar.css +19 -0
  342. package/dist/styles/FloatingActionButton.css +23 -0
  343. package/dist/styles/Form.css +21 -0
  344. package/dist/styles/HoverCard.css +11 -0
  345. package/dist/styles/IconPicker.css +6 -0
  346. package/dist/styles/Image.css +2 -0
  347. package/dist/styles/ImageCropper.css +16 -0
  348. package/dist/styles/Input.css +24 -0
  349. package/dist/styles/InstallBanner.css +8 -0
  350. package/dist/styles/Kanban.css +15 -0
  351. package/dist/styles/Kbd.css +5 -0
  352. package/dist/styles/Label.css +3 -0
  353. package/dist/styles/Layout.css +22 -0
  354. package/dist/styles/Lightbox.css +21 -0
  355. package/dist/styles/ListTile.css +14 -0
  356. package/dist/styles/MapLegend.css +9 -0
  357. package/dist/styles/Markdown.css +24 -0
  358. package/dist/styles/Masonry.css +4 -0
  359. package/dist/styles/Menubar.css +17 -0
  360. package/dist/styles/Modal.css +21 -0
  361. package/dist/styles/ModalsManager.css +2 -0
  362. package/dist/styles/MultiSelect.css +21 -0
  363. package/dist/styles/MunicipalitySearch.css +6 -0
  364. package/dist/styles/NProgress.css +2 -0
  365. package/dist/styles/Navbar.css +10 -0
  366. package/dist/styles/NavigationMenu.css +12 -0
  367. package/dist/styles/NavigationRail.css +14 -0
  368. package/dist/styles/NotificationCenter.css +21 -0
  369. package/dist/styles/OfflineIndicator.css +7 -0
  370. package/dist/styles/Page.css +13 -0
  371. package/dist/styles/Pagination.css +12 -0
  372. package/dist/styles/PasswordInput.css +21 -0
  373. package/dist/styles/PinInput.css +13 -0
  374. package/dist/styles/PixQRCode.css +9 -0
  375. package/dist/styles/Popover.css +10 -0
  376. package/dist/styles/Progress.css +11 -0
  377. package/dist/styles/QRCode.css +3 -0
  378. package/dist/styles/Radio.css +14 -0
  379. package/dist/styles/RangeSlider.css +15 -0
  380. package/dist/styles/RatingStars.css +11 -0
  381. package/dist/styles/RefreshIndicator.css +5 -0
  382. package/dist/styles/Resizable.css +13 -0
  383. package/dist/styles/RichTextEditor.css +19 -0
  384. package/dist/styles/SafeArea.css +7 -0
  385. package/dist/styles/Scheduler.css +24 -0
  386. package/dist/styles/ScrollArea.css +7 -0
  387. package/dist/styles/SearchBar.css +11 -0
  388. package/dist/styles/SegmentedControl.css +12 -0
  389. package/dist/styles/Select.css +14 -0
  390. package/dist/styles/Sidebar.css +19 -0
  391. package/dist/styles/SignaturePad.css +6 -0
  392. package/dist/styles/Skeleton.css +7 -0
  393. package/dist/styles/Slider.css +15 -0
  394. package/dist/styles/Spacer.css +4 -0
  395. package/dist/styles/Sparkline.css +4 -0
  396. package/dist/styles/Spinner.css +12 -0
  397. package/dist/styles/Stat.css +12 -0
  398. package/dist/styles/Stepper.css +17 -0
  399. package/dist/styles/StepperInput.css +15 -0
  400. package/dist/styles/Switch.css +11 -0
  401. package/dist/styles/SyncStatusBadge.css +13 -0
  402. package/dist/styles/Table.css +16 -0
  403. package/dist/styles/Tabs.css +14 -0
  404. package/dist/styles/Tag.css +14 -0
  405. package/dist/styles/Textarea.css +13 -0
  406. package/dist/styles/TimePicker.css +14 -0
  407. package/dist/styles/Timeline.css +17 -0
  408. package/dist/styles/Toast.css +21 -0
  409. package/dist/styles/Toggle.css +12 -0
  410. package/dist/styles/ToggleGroup.css +9 -0
  411. package/dist/styles/Tooltip.css +10 -0
  412. package/dist/styles/Tour.css +20 -0
  413. package/dist/styles/TrajectoryMap.css +16 -0
  414. package/dist/styles/Transfer.css +21 -0
  415. package/dist/styles/TreeView.css +17 -0
  416. package/dist/styles/TruncateText.css +2 -0
  417. package/dist/styles/UpdatePrompt.css +10 -0
  418. package/dist/styles/VirtualList.css +5 -0
  419. package/dist/styles/VirtualTable.css +17 -0
  420. package/dist/styles/VisuallyHidden.css +2 -0
  421. package/dist/styles/Wizard.css +4 -0
  422. package/dist/styles/actions.css +104 -0
  423. package/dist/styles/advanced.css +66 -0
  424. package/dist/styles/br.css +41 -0
  425. package/dist/styles/chat.css +113 -0
  426. package/dist/styles/core.css +40 -0
  427. package/dist/styles/data.css +222 -0
  428. package/dist/styles/editor.css +19 -0
  429. package/dist/styles/feedback.css +201 -0
  430. package/dist/styles/forms.css +321 -0
  431. package/dist/styles/geo.css +16 -0
  432. package/dist/styles/icons.css +6 -0
  433. package/dist/styles/identity.css +48 -0
  434. package/dist/styles/layout.css +122 -0
  435. package/dist/styles/media.css +52 -0
  436. package/dist/styles/navigation.css +167 -0
  437. package/dist/styles/overlay.css +73 -0
  438. package/dist/styles/utility.css +39 -0
  439. package/dist/styles.css +1 -1
  440. package/dist/sw/register-service-worker.cjs +1 -1
  441. package/dist/sw/register-service-worker.cjs.map +1 -1
  442. package/dist/sw/register-service-worker.js +21 -17
  443. package/dist/sw/register-service-worker.js.map +1 -1
  444. package/dist/sw.d.ts +17 -1
  445. package/dist/tempest-react-sdk.cjs +1 -1
  446. package/dist/tempest-react-sdk.d.ts +1382 -76
  447. package/dist/tempest-react-sdk.js +293 -281
  448. package/dist/utils/dev-mode.cjs.map +1 -1
  449. package/dist/utils/dev-mode.js.map +1 -1
  450. package/dist/utils/duplicate-instance.cjs +2 -0
  451. package/dist/utils/duplicate-instance.cjs.map +1 -0
  452. package/dist/utils/duplicate-instance.js +6 -0
  453. package/dist/utils/duplicate-instance.js.map +1 -0
  454. package/dist/utils/format.cjs +1 -1
  455. package/dist/utils/format.cjs.map +1 -1
  456. package/dist/utils/format.js +22 -14
  457. package/dist/utils/format.js.map +1 -1
  458. package/dist/utils/intl-cache.cjs +2 -0
  459. package/dist/utils/intl-cache.cjs.map +1 -0
  460. package/dist/utils/intl-cache.js +23 -0
  461. package/dist/utils/intl-cache.js.map +1 -0
  462. package/dist/utils/json-frame.cjs +2 -0
  463. package/dist/utils/json-frame.cjs.map +1 -0
  464. package/dist/utils/json-frame.js +30 -0
  465. package/dist/utils/json-frame.js.map +1 -0
  466. package/dist/utils/numbers.cjs +1 -1
  467. package/dist/utils/numbers.cjs.map +1 -1
  468. package/dist/utils/numbers.js +8 -7
  469. package/dist/utils/numbers.js.map +1 -1
  470. package/dist/vision/results.cjs +1 -1
  471. package/dist/vision/results.cjs.map +1 -1
  472. package/dist/vision/results.js +26 -17
  473. package/dist/vision/results.js.map +1 -1
  474. package/dist/vision.d.ts +29 -0
  475. package/dist/vite/tempest-icons.cjs +1 -1
  476. package/dist/vite/tempest-icons.cjs.map +1 -1
  477. package/dist/vite/tempest-icons.js +1 -1
  478. package/dist/vite/tempest-icons.js.map +1 -1
  479. package/dist/webrtc/link-stats.cjs +2 -0
  480. package/dist/webrtc/link-stats.cjs.map +1 -0
  481. package/dist/webrtc/link-stats.js +74 -0
  482. package/dist/webrtc/link-stats.js.map +1 -0
  483. package/dist/webrtc/opus-sdp.cjs +3 -0
  484. package/dist/webrtc/opus-sdp.cjs.map +1 -0
  485. package/dist/webrtc/opus-sdp.js +94 -0
  486. package/dist/webrtc/opus-sdp.js.map +1 -0
  487. package/dist/webrtc/sender-bitrate.cjs +2 -0
  488. package/dist/webrtc/sender-bitrate.cjs.map +1 -0
  489. package/dist/webrtc/sender-bitrate.js +15 -0
  490. package/dist/webrtc/sender-bitrate.js.map +1 -0
  491. package/dist/webrtc/use-link-stats.cjs +2 -0
  492. package/dist/webrtc/use-link-stats.cjs.map +1 -0
  493. package/dist/webrtc/use-link-stats.js +22 -0
  494. package/dist/webrtc/use-link-stats.js.map +1 -0
  495. package/dist/ws/create-web-socket.cjs +1 -1
  496. package/dist/ws/create-web-socket.cjs.map +1 -1
  497. package/dist/ws/create-web-socket.js +130 -58
  498. package/dist/ws/create-web-socket.js.map +1 -1
  499. package/dist/ws/resilience.cjs +2 -0
  500. package/dist/ws/resilience.cjs.map +1 -0
  501. package/dist/ws/resilience.js +21 -0
  502. package/dist/ws/resilience.js.map +1 -0
  503. package/dist/ws/use-web-socket.cjs +1 -1
  504. package/dist/ws/use-web-socket.cjs.map +1 -1
  505. package/dist/ws/use-web-socket.js +47 -39
  506. package/dist/ws/use-web-socket.js.map +1 -1
  507. package/package.json +5 -2
@@ -539,10 +539,41 @@ export declare function announce(message: string, politeness?: AnnouncePolitenes
539
539
  */
540
540
  export declare type AnnouncePoliteness = "polite" | "assertive";
541
541
 
542
+ /**
543
+ * Any React component, whatever props it declares.
544
+ *
545
+ * Props sit in a *parameter* position, so a bound over them is contravariant:
546
+ * `ComponentType<unknown>` reads as "a component that accepts every possible
547
+ * props object", and only a component that declares no props at all satisfies
548
+ * it. A page typed `({ mode }: Props) => …` is rejected, and so is one whose
549
+ * props are entirely optional. `any` is the only bound that admits every
550
+ * component — which is why React itself declares `lazy` and
551
+ * `LazyExoticComponent` as `ComponentType<any>`. `ComponentType<never>` is not
552
+ * an escape: it fails React's own bound through
553
+ * `ComponentClass.getDerivedStateFromProps`, where the props land back in a
554
+ * covariant position.
555
+ *
556
+ * This relaxes the *bound* only. `T` is still inferred as the concrete
557
+ * component, so the rendered element keeps checking its props and `preload()`
558
+ * still resolves to the concrete module.
559
+ */
560
+ declare type AnyComponent = ComponentType<any>;
561
+
542
562
  declare type AnyEventTarget = EventTarget | {
543
563
  current: EventTarget | null;
544
564
  } | null | undefined;
545
565
 
566
+ /**
567
+ * Any page component a route can point at, whatever props it declares.
568
+ *
569
+ * Same contravariance as `lazyWithRetry`, which this field is handed to:
570
+ * `ComponentType<unknown>` means "accepts every possible props object", so a
571
+ * route module default-exporting `({ id }: Props) => …` would not assign here —
572
+ * and neither would one whose props are all optional. React declares its own
573
+ * `lazy` as `ComponentType<any>` for the same reason.
574
+ */
575
+ declare type AnyRouteComponent = ComponentType<any>;
576
+
546
577
  /**
547
578
  * Translation key the {@link useDescribeApiError} hook looks up.
548
579
  *
@@ -717,13 +748,21 @@ export declare interface ApiError {
717
748
  retryAfter?: number;
718
749
  /**
719
750
  * Field-level messages from a validation response, keyed by the field path
720
- * the backend named (`"email"`, `"items.0.price"`).
751
+ * the backend named (`"email"`, `"items.0.price"`, `"phone"`).
752
+ *
753
+ * Present whenever the body named a field, through either shape a Tempest
754
+ * stack sends:
755
+ *
756
+ * - FastAPI's validation list — `detail: [{ loc, msg, type }]`, one entry per
757
+ * field, each keyed by its `loc` path.
758
+ * - The singular keys a `tempest-fastapi-sdk` backend uses once it owns the
759
+ * handler — `detail.field`, then top-level `field`, then `details.field`, in
760
+ * that order. There the single value is the same sentence as `detail`.
721
761
  *
722
- * Present only when the body carried a validation list a FastAPI `422`
723
- * answers with `detail: [{ loc, msg, type }]`. This is the shape a form
724
- * needs: `detail` is one line for a log or a developer, and pulling the
725
- * fields back out of it means parsing prose. The first message wins when a
726
- * field appears twice, because a field shows one error at a time.
762
+ * This is the shape a form needs: `detail` is one line for a log or a
763
+ * developer, and pulling the fields back out of it means parsing prose. The
764
+ * first message wins when a field appears twice, because a field shows one
765
+ * error at a time.
727
766
  */
728
767
  fields?: Record<string, string>;
729
768
  /** The raw parsed error body, when available. */
@@ -959,7 +998,12 @@ export declare interface AppRouterProps {
959
998
  basename?: string;
960
999
  /** Initial URLs for the `"memory"` router (tests / non-DOM hosts). */
961
1000
  initialEntries?: string[];
962
- /** Suspense fallback shown while a `lazy` route chunk loads. */
1001
+ /**
1002
+ * Suspense fallback shown while a `lazy` route chunk loads, and the default
1003
+ * for a route whose `guard` answers `"pending"` — one spinner covers both
1004
+ * kinds of "not ready yet". A route overrides it with its own
1005
+ * `guardFallback`.
1006
+ */
963
1007
  fallback?: ReactNode;
964
1008
  }
965
1009
 
@@ -1059,6 +1103,88 @@ export declare type AsyncStatus = "idle" | "pending" | "success" | "error";
1059
1103
  */
1060
1104
  export declare const AUDIO_MIME_CANDIDATES: readonly string[];
1061
1105
 
1106
+ /** A running mix. */
1107
+ export declare interface AudioBus {
1108
+ /**
1109
+ * Play a stream through the shared mix.
1110
+ *
1111
+ * @param stream - The stream to play. Only its first audio track is used.
1112
+ * @param options - `gain` is the initial multiplier, default `1`.
1113
+ * @returns A handle to adjust or detach this source.
1114
+ */
1115
+ attach: (stream: MediaStream, options?: {
1116
+ gain?: number;
1117
+ }) => AudioBusHandle;
1118
+ /** Scale every source, on top of its own gain. */
1119
+ setMasterGain: (gain: number) => void;
1120
+ /** Current master gain, after clamping. */
1121
+ readonly masterGain: number;
1122
+ /**
1123
+ * Route the whole mix to one output device.
1124
+ *
1125
+ * @param deviceId - Device id from `useMediaDevices().audioOutputs`, or `""`
1126
+ * for the system default.
1127
+ * @returns `false` when the engine cannot route audio, or the device is gone.
1128
+ */
1129
+ setOutputDevice: (deviceId: string) => Promise<boolean>;
1130
+ /** Device id the mix is routed to. `""` is the system default. */
1131
+ readonly outputDevice: string;
1132
+ /**
1133
+ * Resume a context the browser started suspended.
1134
+ *
1135
+ * Autoplay policy suspends a context created outside a user gesture, and a
1136
+ * suspended context is silent with no error anywhere. Call this from the
1137
+ * click that starts playback.
1138
+ */
1139
+ resume: () => Promise<void>;
1140
+ /**
1141
+ * Detach everything and close the context this bus created.
1142
+ *
1143
+ * Idempotent, and the bus stays callable afterwards: `attach` hands back an
1144
+ * inert handle instead of throwing. That is not politeness — creating a node
1145
+ * on a closed `AudioContext` throws `InvalidStateError`, and the stream that
1146
+ * arrives late is the normal case (a WebRTC `ontrack` firing after the
1147
+ * component that owned the bus went away).
1148
+ */
1149
+ close: () => void;
1150
+ /** Whether this browser gave us a Web Audio graph at all. */
1151
+ readonly supported: boolean;
1152
+ /** Whether this browser can route the mix to a chosen output device. */
1153
+ readonly canSelectOutput: boolean;
1154
+ }
1155
+
1156
+ /** One source attached to the bus. */
1157
+ export declare interface AudioBusHandle {
1158
+ /**
1159
+ * Set this source's gain, where `1` is the level it arrived at.
1160
+ *
1161
+ * Values above `1` are the point of the whole graph: `element.volume` is
1162
+ * clamped at `1`, so a quiet talker could only ever be attenuated — the one
1163
+ * correction nobody needs.
1164
+ */
1165
+ setGain: (gain: number) => void;
1166
+ /** Current gain, after clamping. */
1167
+ readonly gain: number;
1168
+ /** Detach this source and release its nodes. The bus stays up. */
1169
+ stop: () => void;
1170
+ }
1171
+
1172
+ /** Options for {@link createAudioBus}. */
1173
+ export declare interface AudioBusOptions {
1174
+ /** Ceiling for every gain on this bus. Default {@link DEFAULT_MAX_GAIN}. */
1175
+ maxGain?: number;
1176
+ /** Override the master limiter, or pass `false` to run without one. */
1177
+ limiter?: Partial<LimiterSettings> | false;
1178
+ /**
1179
+ * Reuse an existing `AudioContext` instead of creating one.
1180
+ *
1181
+ * Browsers cap the number of live contexts (Chrome allows around six), so a
1182
+ * page that already has one — a level meter, a player — should hand it over
1183
+ * rather than open a second.
1184
+ */
1185
+ context?: AudioContext;
1186
+ }
1187
+
1062
1188
  /**
1063
1189
  * Playback transport for one clip: play/pause, a seek bar, elapsed and total time.
1064
1190
  *
@@ -2048,8 +2174,8 @@ declare type CameraStreamStatus = "idle" | "loading" | "ready" | "error";
2048
2174
 
2049
2175
  /**
2050
2176
  * Conditionally render based on an access check. Renders `children` when the
2051
- * action is allowed, otherwise `fallback` (or nothing). While an async check is
2052
- * pending, nothing is rendered.
2177
+ * action is allowed and `fallback` when it is denied. While an async check is
2178
+ * pending it renders `pending`, which defaults to `fallback`.
2053
2179
  *
2054
2180
  * @example
2055
2181
  * ```tsx
@@ -2057,8 +2183,20 @@ declare type CameraStreamStatus = "idle" | "loading" | "ready" | "error";
2057
2183
  * <NewPostButton />
2058
2184
  * </Can>
2059
2185
  * ```
2186
+ *
2187
+ * @example
2188
+ * ```tsx
2189
+ * <Can
2190
+ * action="read"
2191
+ * resource="finance"
2192
+ * fallback={<p>No access</p>}
2193
+ * pending={<Spinner />}
2194
+ * >
2195
+ * <FinancePanel />
2196
+ * </Can>
2197
+ * ```
2060
2198
  */
2061
- export declare function Can({ action, resource, params, children, fallback }: CanProps): JSX.Element;
2199
+ export declare function Can({ action, resource, params, children, fallback, pending }: CanProps): JSX.Element;
2062
2200
 
2063
2201
  /**
2064
2202
  * Arguments describing the access check to perform.
@@ -2077,6 +2215,16 @@ export declare interface CanProps extends CanParams {
2077
2215
  children: ReactNode;
2078
2216
  /** Rendered when the action is denied. Defaults to nothing. */
2079
2217
  fallback?: ReactNode;
2218
+ /**
2219
+ * Rendered while an async check is still in flight. Defaults to
2220
+ * {@link fallback}, which keeps the pre-existing behaviour.
2221
+ *
2222
+ * Worth setting whenever `fallback` says something denial-shaped: without
2223
+ * it, a permission that resolves over the network flashes "no access" to
2224
+ * someone who has it. `pending={null}` renders nothing until the answer
2225
+ * lands; `pending={<Spinner />}` says why the screen is waiting.
2226
+ */
2227
+ pending?: ReactNode;
2080
2228
  }
2081
2229
 
2082
2230
  /**
@@ -2910,6 +3058,34 @@ export declare const CPFInput: ForwardRefExoticComponent<Omit<InputProps, "value
2910
3058
  */
2911
3059
  export declare function createApiClient(config: ApiClientConfig): ApiClient;
2912
3060
 
3061
+ /**
3062
+ * Mix several streams into one output, with gain above 100% and a master limiter.
3063
+ *
3064
+ * Three things make this a graph instead of a few `<audio>` elements:
3065
+ *
3066
+ * 1. **`element.volume` is clamped at `1`.** A participant who speaks too quietly
3067
+ * can only be turned *down* — the one correction nobody needs. A `GainNode`
3068
+ * has no ceiling, so this bus takes one (`maxGain`, default 3).
3069
+ * 2. **Clipping is a property of the sum.** Three sources at 200% each are clean
3070
+ * alone and distort the instant they play together. A per-source limiter
3071
+ * cannot see that; the one after the mix can, which is where this puts it.
3072
+ * 3. **`setSinkId` lives on the element, not on the context.** Sending the mix to
3073
+ * a headset while the rest of the system keeps the speakers is only reachable
3074
+ * by leaving through a `MediaStreamAudioDestinationNode` into a real
3075
+ * `<audio>`. `AudioContext.setSinkId` has far thinner support.
3076
+ *
3077
+ * @param options - See {@link AudioBusOptions}.
3078
+ * @returns The bus. On an engine with no Web Audio it is inert but callable, and
3079
+ * `supported` is `false` — a page without sound beats a page that throws.
3080
+ *
3081
+ * @example
3082
+ * const bus = createAudioBus({ maxGain: 3 });
3083
+ * const handle = bus.attach(remoteStream, { gain: 1 });
3084
+ * handle.setGain(2.4); // above 1 — the point of the whole thing
3085
+ * await bus.setOutputDevice(headsetId);
3086
+ */
3087
+ export declare function createAudioBus({ maxGain, limiter: limiterOptions, context: injectedContext, }?: AudioBusOptions): AudioBus;
3088
+
2913
3089
  /**
2914
3090
  * Create an isolated audio player that tracks a single "current" clip.
2915
3091
  * Multiple players coexist independently; use this when several layers of UI
@@ -3045,6 +3221,16 @@ export declare interface CreateEventStreamOptions<T> {
3045
3221
  maxBackoff?: number;
3046
3222
  /** Parse `event.data`. Defaults to JSON with raw-string fallback. */
3047
3223
  parser?: (raw: string) => T;
3224
+ /**
3225
+ * A frame arrived that is not valid JSON, and no `parser` was supplied.
3226
+ *
3227
+ * Registering this drops the frame instead of delivering it: the previous
3228
+ * behaviour handed `onMessage` the raw `string` announced as your message
3229
+ * type, so the failure surfaced later, at the first property access, with
3230
+ * nothing left pointing at the parse. Leave it out and that behaviour is
3231
+ * kept, with a one-time warning in development builds.
3232
+ */
3233
+ onParseError?: (error: unknown, raw: string) => void;
3048
3234
  onOpen?: () => void;
3049
3235
  onMessage?: (message: EventStreamMessage<T>) => void;
3050
3236
  onError?: (error: Event) => void;
@@ -3255,7 +3441,35 @@ export declare interface CreateLaunchDarklyFeatureFlagsAdapterOptions {
3255
3441
  * const meter = createLevelMeter(stream);
3256
3442
  * const tick = () => { bar.style.transform = `scaleX(${meter.level()})`; raf = requestAnimationFrame(tick); };
3257
3443
  */
3258
- export declare function createLevelMeter(stream: MediaStream, { fftSize, decay }?: LevelMeterOptions): LevelMeter;
3444
+ export declare function createLevelMeter(stream: MediaStream, { fftSize, decay, context: injectedContext }?: LevelMeterOptions): LevelMeter;
3445
+
3446
+ /**
3447
+ * Track one link's throughput, resolution and round trip across samples.
3448
+ *
3449
+ * Every rate here is a **delta**. `bytesSent` is cumulative since the connection
3450
+ * opened, so dividing it by the session length gives the historical average —
3451
+ * a number that only ever falls and never shows what is happening now. The
3452
+ * previous reading is kept on the sampler and subtracted, which is the part
3453
+ * every hand-rolled copy of this ends up rewriting.
3454
+ *
3455
+ * Bytes are summed across every matching sender, because a peer publishing a
3456
+ * camera and a screen at once occupies one uplink with both — and the uplink is
3457
+ * what runs out. Resolution and frame rate come from the **largest** stream by
3458
+ * area, which is the one that dominates that bandwidth and the one somebody
3459
+ * watching the call is looking at.
3460
+ *
3461
+ * @param options - See {@link LinkStatsSamplerOptions}.
3462
+ * @returns A sampler. Use one per `RTCPeerConnection`.
3463
+ *
3464
+ * @example
3465
+ * const sampler = createLinkStatsSampler();
3466
+ *
3467
+ * setInterval(async () => {
3468
+ * const stats = await sampler.sample(pc);
3469
+ * badge.textContent = `${stats.kbps} kbps · ${stats.rttMs ?? "—"} ms`;
3470
+ * }, 2000);
3471
+ */
3472
+ export declare function createLinkStatsSampler(options?: LinkStatsSamplerOptions): LinkStatsSampler;
3259
3473
 
3260
3474
  /**
3261
3475
  * `localStorage`-backed resume storage — the default.
@@ -4015,12 +4229,64 @@ export declare interface CreateThemeOptions {
4015
4229
  export declare function createVideoRecorder(stream: MediaStream, options?: VideoRecorderOptions): VideoRecorderHandle;
4016
4230
 
4017
4231
  /**
4018
- * Open a WebSocket with automatic exponential-backoff reconnect, optional
4019
- * heartbeat pings, and typed JSON parsing.
4232
+ * Build the processing a microphone is published through.
4233
+ *
4234
+ * Ordered the way a console is: cut what is not speech, gate what is left, level
4235
+ * it, shape it, set how loud it goes out, then hold a ceiling. **The order is not
4236
+ * cosmetic.** Gating before the high-pass lets a rumble hold the gate open;
4237
+ * compressing before the gate lifts the noise floor up to meet the threshold; and
4238
+ * a limiter placed before the output gain is a ceiling the gain then walks
4239
+ * straight through.
4240
+ *
4241
+ * This sits *after* the browser's own echo cancellation and noise suppression,
4242
+ * which stay on: the two solve different problems. The browser's is trained on
4243
+ * stationary noise inside the capture pipeline; this cuts what it leaves behind
4244
+ * and decides when the line should be silent at all.
4245
+ *
4246
+ * @param source - The captured microphone track.
4247
+ * @param settings - Which stages to build. Default {@link DEFAULT_VOICE_CHAIN}.
4248
+ * @param options - See {@link VoiceChainOptions}.
4249
+ * @returns The track to publish plus its teardown. On an engine with no Web Audio,
4250
+ * and when every stage is off, the source track is handed back untouched and
4251
+ * `supported` is `false` — a call without processing beats a call that throws.
4252
+ * The idle case is decided **before** a context is opened, because browsers cap
4253
+ * how many can be live and one built for a chain that does nothing still counts.
4254
+ *
4255
+ * @example
4256
+ * const floor = await measureNoiseFloor(stream);
4257
+ * const chain = createVoiceChain(micTrack, {
4258
+ * ...DEFAULT_VOICE_CHAIN,
4259
+ * gate: true,
4260
+ * gateThreshold: suggestGateThreshold(floor),
4261
+ * }, { gain: 1.4 });
4262
+ * await mesh.setLocalTrack("mic", chain.track);
4263
+ */
4264
+ export declare function createVoiceChain(source: MediaStreamTrack, settings?: VoiceChainSettings, { gain, context: injectedContext, ownsSource }?: VoiceChainOptions): VoiceChain;
4265
+
4266
+ /**
4267
+ * Open a WebSocket that survives a bad network: exponential backoff with jitter,
4268
+ * a handshake timeout, a silence watchdog, optional heartbeat pings and typed
4269
+ * JSON parsing.
4270
+ *
4271
+ * Three failure modes are covered that an event-driven retry loop misses on its
4272
+ * own, because none of them fire an event: a handshake that hangs instead of
4273
+ * failing, an open socket whose link died mid-flight, and a device with its
4274
+ * radio off burning the retry budget. See `handshakeTimeout`, `silenceTimeout`
4275
+ * and `waitForOnline`.
4020
4276
  *
4021
4277
  * @param url - Full ws:// or wss:// URL.
4022
4278
  * @param options - Connection configuration and callbacks.
4023
- * @returns Controller exposing `send`, `close`, `reconnect`, and `status`.
4279
+ * @returns Controller exposing `send`, `close`, `reconnect`, `setSilenceTimeout`,
4280
+ * `opened` and `status`.
4281
+ *
4282
+ * @example
4283
+ * const socket = createWebSocket(url, {
4284
+ * silenceTimeout: 75_000,
4285
+ * onReconnecting: (n, total) => setBanner(`Reconectando ${n}/${total}…`),
4286
+ * onReconnected: () => refetchEverything(),
4287
+ * onLost: (reason) => setBanner(reason === "rejected" ? "Acesso negado" : "Sem conexão"),
4288
+ * });
4289
+ * await socket.opened;
4024
4290
  */
4025
4291
  export declare function createWebSocket<T = unknown>(url: string, options?: CreateWebSocketOptions<T>): WebSocketController;
4026
4292
 
@@ -4033,6 +4299,50 @@ export declare interface CreateWebSocketOptions<T> {
4033
4299
  initialBackoff?: number;
4034
4300
  /** Maximum backoff (ms). Default: 30000. */
4035
4301
  maxBackoff?: number;
4302
+ /**
4303
+ * Fraction of each backoff delay added at random, 0–1. Default: 0.3.
4304
+ *
4305
+ * Matters when the *server* is what went down: every client retries on the
4306
+ * same schedule, so the box comes back up into a synchronized stampede. Pass
4307
+ * `0` for a fixed schedule.
4308
+ */
4309
+ jitter?: number;
4310
+ /**
4311
+ * How long one handshake may stay in `CONNECTING` before the attempt is
4312
+ * abandoned and retried (ms). Default: 8000. Pass 0 to disable.
4313
+ *
4314
+ * A `WebSocket` that cannot reach its server does not necessarily fail: it
4315
+ * sits in `CONNECTING` firing neither `open` nor `close` nor `error`. A retry
4316
+ * chain built only on those events stops on its first hung attempt and never
4317
+ * moves again — and hung, rather than refused, is precisely how a bad mobile
4318
+ * link behaves, which is the case reconnection exists for.
4319
+ */
4320
+ handshakeTimeout?: number;
4321
+ /**
4322
+ * Silence tolerated on an open socket before the link is treated as dead (ms).
4323
+ * Default: 0 (off).
4324
+ *
4325
+ * The socket only reports a connection that closes cleanly. A link that dies
4326
+ * mid-flight leaves `readyState` at `OPEN` on this side with nothing ever
4327
+ * arriving again, so silence is the only symptom available. The timer is
4328
+ * re-armed by **any** inbound frame, not just by pings — traffic is traffic.
4329
+ *
4330
+ * Set it to a comfortable multiple of the server's ping interval (2.5× is a
4331
+ * good default) so one dropped ping is not mistaken for an outage. When the
4332
+ * server announces its own interval in the handshake, feed that back with
4333
+ * {@link WebSocketController.setSilenceTimeout} instead of hard-coding the
4334
+ * value on both ends.
4335
+ */
4336
+ silenceTimeout?: number;
4337
+ /**
4338
+ * Suspend the retry schedule while `navigator.onLine` is false, and resume on
4339
+ * the `online` event. Default: true.
4340
+ *
4341
+ * Burning retries against a radio that is switched off is how a phone
4342
+ * exhausts its budget inside a tunnel and gives up exactly when it comes out
4343
+ * the other side.
4344
+ */
4345
+ waitForOnline?: boolean;
4036
4346
  /**
4037
4347
  * Ping interval (ms). When set, the client sends `pingPayload` periodically
4038
4348
  * to keep the socket alive. Default: 0 (disabled).
@@ -4068,11 +4378,49 @@ export declare interface CreateWebSocketOptions<T> {
4068
4378
  maxQueuedMessages?: number;
4069
4379
  /** Parse incoming frames. Default: JSON with raw-string fallback. */
4070
4380
  parser?: (raw: string) => T;
4381
+ /**
4382
+ * A frame arrived that is not valid JSON, and no `parser` was supplied.
4383
+ *
4384
+ * Registering this drops the frame instead of delivering it: the previous
4385
+ * behaviour handed `onMessage` the raw `string` announced as your message
4386
+ * type, so the failure surfaced later, at the first property access, with
4387
+ * nothing left pointing at the parse. Leave it out and that behaviour is
4388
+ * kept, with a one-time warning in development builds.
4389
+ */
4390
+ onParseError?: (error: unknown, raw: string) => void;
4071
4391
  onOpen?: (event: Event) => void;
4072
4392
  onMessage?: (message: WebSocketMessage<T>) => void;
4073
4393
  onClose?: (event: CloseEvent) => void;
4074
4394
  onError?: (event: Event) => void;
4075
4395
  onStatusChange?: (status: WebSocketStatus) => void;
4396
+ /**
4397
+ * A retry has been scheduled. `attempt` is 1-based, `total` is `maxRetries`.
4398
+ *
4399
+ * Reconnecting is not an error and reads badly as one: announcing every
4400
+ * attempt puts a fresh "the connection dropped" in front of someone whose
4401
+ * session is in the middle of coming back on its own. Show a quiet
4402
+ * reconnecting state here and treat {@link CreateWebSocketOptions.onLost} as
4403
+ * the failure.
4404
+ */
4405
+ onReconnecting?: (attempt: number, total: number) => void;
4406
+ /**
4407
+ * The socket is back up after at least one retry.
4408
+ *
4409
+ * Nothing is resumed for you: a server that keys state by connection sees a
4410
+ * brand-new client, so this is where the caller re-subscribes, re-joins or
4411
+ * refetches whatever the gap invalidated.
4412
+ */
4413
+ onReconnected?: () => void;
4414
+ /**
4415
+ * No further attempt will be made — `"rejected"` when the server refused the
4416
+ * client outright (close code 4400–4499, minus the 4408 heartbeat timeout),
4417
+ * `"exhausted"` when the schedule ran out.
4418
+ *
4419
+ * This is the one that deserves UI, because it is the only state the caller
4420
+ * can act on: offer a "try again" that calls
4421
+ * {@link WebSocketController.reconnect}.
4422
+ */
4423
+ onLost?: (reason: WebSocketLostReason) => void;
4076
4424
  }
4077
4425
 
4078
4426
  /**
@@ -4700,6 +5048,9 @@ export declare const DEFAULT_CHUNK_SIZE: number;
4700
5048
  */
4701
5049
  export declare const DEFAULT_CIRCUITY_FACTOR = 1.3;
4702
5050
 
5051
+ /** Default ceiling for a per-source or master gain, as a multiplier. */
5052
+ export declare const DEFAULT_MAX_GAIN = 3;
5053
+
4703
5054
  /**
4704
5055
  * Per-mode multipliers applied to the car duration. Mirrors
4705
5056
  * `DEFAULT_MODE_DURATION_FACTORS` from `tempest-fastapi-sdk` — motorcycles are
@@ -4722,6 +5073,19 @@ export declare const DEFAULT_PUB_KEY_CRED_PARAMS: {
4722
5073
  alg: number;
4723
5074
  }[];
4724
5075
 
5076
+ /** The key a caller gets when it does not choose one. */
5077
+ export declare const DEFAULT_PUSH_TO_TALK_KEY = "Space";
5078
+
5079
+ /**
5080
+ * What a call wants before anybody touches a slider.
5081
+ *
5082
+ * High-pass, leveller and limiter only. Gate, presence, hiss cut and de-esser are
5083
+ * off because each has an audible cost when it is not needed — a gate set for the
5084
+ * wrong room clips words, presence on a bright microphone is harsh, and a de-esser
5085
+ * on a voice that does not hiss just dulls it.
5086
+ */
5087
+ export declare const DEFAULT_VOICE_CHAIN: VoiceChainSettings;
5088
+
4725
5089
  /**
4726
5090
  * Identity helper that types a declarative route tree. Use it so editors give
4727
5091
  * autocomplete and type-checking on every node; the array is returned as-is.
@@ -4750,12 +5114,20 @@ export declare function defineRoutes(routes: TempestRouteObject[]): TempestRoute
4750
5114
  * offline sentence. This is the step apps skip, and skipping it renders
4751
5115
  * "erro 0" or a raw `TypeError` at the user.
4752
5116
  * 2. A validation rejection — `error.fields` is set — produces the validation
4753
- * sentence, **not** `detail`. On a `422` the `detail` line is assembled from
4754
- * the backend's field paths and the validator's own wording
5117
+ * sentence, **not** `detail`. On a FastAPI `422` the `detail` line is assembled
5118
+ * from the backend's field paths and the validator's own wording
4755
5119
  * (`"items.0.price: Input should be greater than 0"`), which is right for a
4756
5120
  * log and wrong for a person: it is half English in a pt-BR screen and it
4757
5121
  * names internals. The per-field messages stay on `fields`, where a form can
4758
5122
  * attach them to the inputs that failed.
5123
+ *
5124
+ * This step also catches a business error that named a single field, whose
5125
+ * `detail` **was** a finished sentence ("Cidade não encontrada para o estado
5126
+ * informado."). The trade is deliberate: that sentence is now on `fields`,
5127
+ * against the input it is about, which is where it does the most good. Three
5128
+ * ways back, in order of preference: `codes: { VALIDATION_ERROR: "…" }` (step 0,
5129
+ * which still wins), `validation: error.detail` at the call site, or reading
5130
+ * `error.detail` yourself — it is untouched.
4759
5131
  * 3. The backend's own `detail`, which is the most specific thing available and
4760
5132
  * is already written for a person — unless `useDetail: false` says that text
4761
5133
  * is for developers.
@@ -5002,11 +5374,21 @@ export declare interface DrawerProps {
5002
5374
  }
5003
5375
 
5004
5376
  /**
5005
- * Dropdown menu — list of selectable actions anchored to a trigger.
5377
+ * Dropdown menu — a list of actions anchored to a trigger, following the
5378
+ * [APG menu button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).
5379
+ *
5380
+ * `role="menu"` is a promise about the keyboard, and this component keeps it:
5006
5381
  *
5007
- * - Toggle on trigger click.
5008
- * - Close on outside click / Escape / item selection.
5009
- * - Arrow keys navigate, Enter activates focused item.
5382
+ * - `Enter`, `Space` or `ArrowDown` on the trigger opens and focuses the first
5383
+ * entry; `ArrowUp` opens and focuses the last.
5384
+ * - `ArrowUp` / `ArrowDown` move with wrap, `Home` / `End` jump to the ends.
5385
+ * - `Escape` closes and returns focus to the trigger, so the next `Tab` continues
5386
+ * from where the user was rather than from the top of the document.
5387
+ * - `Tab` closes the menu and lets the page's own tab order take over.
5388
+ * - Focus is managed: entries carry `tabIndex={-1}` and only the active one is
5389
+ * `0`, which is what stops `Tab` from walking the menu one entry at a time.
5390
+ *
5391
+ * Disabled entries, separators and labels are skipped by every movement.
5010
5392
  */
5011
5393
  export declare function DropdownMenu({ trigger, items, placement, className, }: DropdownMenuProps): JSX.Element;
5012
5394
 
@@ -5018,6 +5400,23 @@ export declare type DropdownMenuEntry = {
5018
5400
  danger?: boolean;
5019
5401
  disabled?: boolean;
5020
5402
  onSelect: () => void;
5403
+ } | {
5404
+ /**
5405
+ * An entry that carries on/off state.
5406
+ *
5407
+ * Rendered as `role="menuitemcheckbox"` with `aria-checked`, which is how
5408
+ * a screen reader announces "checked" instead of leaving the state
5409
+ * invisible. Selecting it does **not** close the menu: toggling two
5410
+ * settings in a row is the ordinary case, and closing after the first
5411
+ * would make the second a second trip.
5412
+ */
5413
+ type: "checkbox";
5414
+ id: string;
5415
+ label: ReactNode;
5416
+ icon?: ReactNode;
5417
+ checked: boolean;
5418
+ disabled?: boolean;
5419
+ onSelect: () => void;
5021
5420
  } | {
5022
5421
  type: "separator";
5023
5422
  id: string;
@@ -5032,6 +5431,7 @@ export declare type DropdownMenuPlacement = "bottom-start" | "bottom-end" | "top
5032
5431
  export declare interface DropdownMenuProps {
5033
5432
  trigger: ReactElement<{
5034
5433
  onClick?: (e: React.MouseEvent) => void;
5434
+ onKeyDown?: (e: KeyboardEvent_2) => void;
5035
5435
  "aria-expanded"?: boolean;
5036
5436
  "aria-controls"?: string;
5037
5437
  "aria-haspopup"?: boolean | "menu";
@@ -5281,11 +5681,6 @@ export declare interface EventStreamMessage<T> {
5281
5681
  raw: MessageEvent;
5282
5682
  }
5283
5683
 
5284
- /**
5285
- * @tempest-limits function-lines — the body is the SSE line protocol — accumulate
5286
- * `data:` lines until a blank line, track `id:` for Last-Event-ID, honour `retry:` —
5287
- * plus the reconnect that uses the id it just tracked.
5288
- */
5289
5684
  export declare type EventStreamStatus = "idle" | "connecting" | "open" | "closed" | "error";
5290
5685
 
5291
5686
  /**
@@ -5760,6 +6155,38 @@ export declare function formatDateForInput(value: string | Date): string;
5760
6155
  */
5761
6156
  export declare function formatDateTime(value: string | Date): string;
5762
6157
 
6158
+ /**
6159
+ * Format an ISO date or Date instance as `yyyy-MM-ddTHH:mm`, the value an
6160
+ * `<input type="datetime-local">` accepts.
6161
+ *
6162
+ * The sibling of {@link formatDateForInput}, and it exists for the same reason:
6163
+ * `toISOString().slice(0, 16)` is the reflex and it is wrong. `toISOString`
6164
+ * converts to UTC first, so a 22:00 appointment in UTC-3 opens the form on the
6165
+ * next day at 01:00 — here the trap costs the hour as well as the date.
6166
+ *
6167
+ * A value already in `yyyy-MM-ddTHH:mm` is returned untouched. A value carrying
6168
+ * a zone (`...Z`, `...-03:00`) deliberately does **not** take that shortcut: it
6169
+ * is a different instant from the naive string that looks like it, so it is
6170
+ * converted to the local calendar parts the input has to show.
6171
+ *
6172
+ * Seconds are dropped. A `datetime-local` steps by the minute unless the app
6173
+ * sets `step`, so a `:ss` the field cannot represent would be silently discarded
6174
+ * on the first edit anyway — truncating here keeps the rendered value and the
6175
+ * submitted value the same.
6176
+ *
6177
+ * @example
6178
+ * <input
6179
+ * type="datetime-local"
6180
+ * defaultValue={formatDateTimeForInput(appointment.startsAt)}
6181
+ * />
6182
+ *
6183
+ * @param value - ISO string or Date.
6184
+ * @returns The `yyyy-MM-ddTHH:mm` value, or an empty string when the input is
6185
+ * invalid — which is what a datetime input reads as "no value", unlike
6186
+ * `"Invalid Date"`.
6187
+ */
6188
+ export declare function formatDateTimeForInput(value: string | Date): string;
6189
+
5763
6190
  /**
5764
6191
  * Rendering helpers for the numbers a profiler produces.
5765
6192
  */
@@ -5831,25 +6258,6 @@ export declare interface FormatPhoneOptions {
5831
6258
  mobile?: boolean;
5832
6259
  }
5833
6260
 
5834
- /**
5835
- * Glue between `react-hook-form` `Controller` and the SDK's controlled
5836
- * components. Wraps any control that accepts `{ value, onChange, label,
5837
- * error }` and routes RHF state into it — eliminating the per-field
5838
- * `<Controller render={...} />` boilerplate.
5839
- *
5840
- * @example
5841
- * const form = useZodForm(schema);
5842
- * <FormProvider {...form}>
5843
- * <Form>
5844
- * <FormField name="email" label="Email" required>
5845
- * <Input type="email" />
5846
- * </FormField>
5847
- * <FormField name="cep" label="CEP">
5848
- * <CEPInput />
5849
- * </FormField>
5850
- * </Form>
5851
- * </FormProvider>;
5852
- */
5853
6261
  export declare function FormField<TValues extends FieldValues = FieldValues, TName extends FieldPath<TValues> = FieldPath<TValues>>({ name, label, helperText, required, control, children }: FormFieldProps<TValues, TName>): JSX.Element;
5854
6262
 
5855
6263
  export declare interface FormFieldChildProps {
@@ -6165,6 +6573,17 @@ export { HashRouter }
6165
6573
  */
6166
6574
  export declare function haversineKm(origin: Coordinate, destination: Coordinate): number;
6167
6575
 
6576
+ /**
6577
+ * Heartbeat timeout, which sits inside the rejection range but is not one.
6578
+ *
6579
+ * `tempest-fastapi-sdk` closes with 4408 when no `pong` arrived within
6580
+ * `WS_HEARTBEAT_TIMEOUT_SECONDS`. That is the *link* failing, not the server
6581
+ * refusing the peer — exactly the case reconnection exists for. Treating the
6582
+ * whole 4400–4499 range as fatal, which is the obvious reading, makes one
6583
+ * missed pong permanent.
6584
+ */
6585
+ export declare const HEARTBEAT_CLOSE_CODE = 4408;
6586
+
6168
6587
  /** Convert a hex color to OKLCH. */
6169
6588
  export declare function hexToOklch(hex: string): Oklch;
6170
6589
 
@@ -6806,6 +7225,23 @@ export declare function isDefined<T>(value: T | null | undefined): value is T;
6806
7225
  */
6807
7226
  export declare function isEmpty(value: unknown): boolean;
6808
7227
 
7228
+ /**
7229
+ * Whether this environment can present anything fullscreen at all.
7230
+ *
7231
+ * Two independent reasons for `false`, and skipping either one ships a button
7232
+ * that does nothing when pressed: the API can be missing (older WebKit, and every
7233
+ * browser on iOS for non-`<video>` elements), or present and **disabled** — a
7234
+ * document inside an `<iframe>` without the `allowfullscreen` attribute exposes
7235
+ * `requestFullscreen` and rejects every call to it, which `fullscreenEnabled`
7236
+ * reports up front.
7237
+ *
7238
+ * An engine that exposes the methods and no flag at all is treated as capable:
7239
+ * the flag is the newer half of the API, so its absence says nothing.
7240
+ *
7241
+ * @returns `true` when a fullscreen request stands a chance of being honoured.
7242
+ */
7243
+ export declare function isFullscreenSupported(): boolean;
7244
+
6809
7245
  /** Whether any turn in the thread is still streaming. */
6810
7246
  export declare function isGenerating(messages: readonly AIChatMessage[]): boolean;
6811
7247
 
@@ -6895,6 +7331,18 @@ export declare function isPlatformAuthenticatorAvailable(): Promise<boolean>;
6895
7331
  */
6896
7332
  export declare function isPushSupported(): boolean;
6897
7333
 
7334
+ /**
7335
+ * Whether a close code means the server refused this client for good.
7336
+ *
7337
+ * @param code - The `CloseEvent.code`.
7338
+ * @returns `true` when reconnecting can only reproduce the refusal.
7339
+ *
7340
+ * @example
7341
+ * isRejectionCloseCode(4401); // true — unauthorized
7342
+ * isRejectionCloseCode(4408); // false — heartbeat timeout, retry it
7343
+ */
7344
+ export declare function isRejectionCloseCode(code: number): boolean;
7345
+
6898
7346
  /**
6899
7347
  * Whether an HTTP status describes a condition a replay can plausibly fix.
6900
7348
  *
@@ -6956,6 +7404,20 @@ export declare function isValidLongitude(value: number): boolean;
6956
7404
  /** Whether `MediaRecorder` exists and can produce at least one video container. */
6957
7405
  export declare function isVideoRecordingSupported(): boolean;
6958
7406
 
7407
+ /**
7408
+ * Whether any of this would change the signal.
7409
+ *
7410
+ * A chain that only passes audio through still costs a re-encode and a handful of
7411
+ * nodes, so a caller that rebuilds on every settings change should ask first —
7412
+ * and {@link createVoiceChain} asks too, handing back `source` rather than
7413
+ * building a graph that does nothing.
7414
+ *
7415
+ * @param settings - The stages under consideration.
7416
+ * @param gain - The output multiplier that would be applied. Default `1`.
7417
+ * @returns `true` when the chain would be audibly transparent.
7418
+ */
7419
+ export declare function isVoiceChainIdle(settings: VoiceChainSettings, gain?: number): boolean;
7420
+
6959
7421
  /** The surface every store built by {@link createJsonStorage} exposes. */
6960
7422
  export declare interface JsonStorage {
6961
7423
  /**
@@ -7189,13 +7651,22 @@ declare interface LayoutProps {
7189
7651
  * up the new bundle; a final `location.reload()` recovers from stale
7190
7652
  * `index.html`.
7191
7653
  *
7654
+ * The wrapped component keeps its own props: `T` is inferred from the module
7655
+ * the factory resolves to, so a page declaring required, optional or no props
7656
+ * all pass through and the rendered element is still checked against them. See
7657
+ * {@link AnyComponent} for why the constraint has to be written the way it is.
7658
+ *
7659
+ * @param factory Dynamic import of the module whose `default` is the component.
7660
+ * @param options Retry count, initial backoff and the final-failure reload.
7661
+ * @returns The lazy component, carrying an extra `preload()`.
7662
+ *
7192
7663
  * @example
7193
7664
  * const Settings = lazyWithRetry(() => import("./Settings"));
7194
7665
  *
7195
7666
  * // Warm the chunk when the route becomes likely, not when it is needed.
7196
7667
  * <a href="/settings" onMouseEnter={() => void Settings.preload()}>Settings</a>
7197
7668
  */
7198
- export declare function lazyWithRetry<T extends ComponentType<unknown>>(factory: () => Promise<{
7669
+ export declare function lazyWithRetry<T extends AnyComponent>(factory: () => Promise<{
7199
7670
  default: T;
7200
7671
  }>, options?: LazyWithRetryOptions): PreloadableLazy<T>;
7201
7672
 
@@ -7243,8 +7714,21 @@ export declare interface LevelMeterOptions {
7243
7714
  * A raw RMS reading is jittery enough to make a meter look broken. Attack is left
7244
7715
  * instant — a meter that lags the voice going *up* reads as "not recording" —
7245
7716
  * while the decay is eased, which is how every hardware meter behaves.
7717
+ *
7718
+ * `0` turns the smoothing off and reports the window's RMS as measured, which is
7719
+ * what a detector wants: {@link monitorVoiceActivity} applies its own release,
7720
+ * and two of them stacked would hold the indicator open long past the speech.
7246
7721
  */
7247
7722
  decay?: number;
7723
+ /**
7724
+ * Reuse an existing `AudioContext` instead of creating one.
7725
+ *
7726
+ * Browsers cap live contexts (Chrome allows around six), and a meter per remote
7727
+ * participant reaches that in a five-person call. A caller measuring several
7728
+ * streams should open one context and hand it to every meter. `stop()` closes
7729
+ * only a context this meter created — an injected one belongs to the caller.
7730
+ */
7731
+ context?: AudioContext;
7248
7732
  }
7249
7733
 
7250
7734
  /**
@@ -7308,8 +7792,94 @@ export declare interface LightboxProps {
7308
7792
  className?: string;
7309
7793
  }
7310
7794
 
7795
+ /** Shape of the master limiter. Matches `DynamicsCompressorNode`'s params. */
7796
+ export declare interface LimiterSettings {
7797
+ /** dBFS above which the compressor starts working. */
7798
+ threshold: number;
7799
+ /** dB range over which the curve bends. `0` is a hard knee. */
7800
+ knee: number;
7801
+ /** Input/output ratio above the threshold. 20 is limiting, not compression. */
7802
+ ratio: number;
7803
+ /** Seconds to clamp a peak. */
7804
+ attack: number;
7805
+ /** Seconds to let go. */
7806
+ release: number;
7807
+ }
7808
+
7311
7809
  export { Link }
7312
7810
 
7811
+ /**
7812
+ * One link's outbound picture, in the shape a call UI actually renders.
7813
+ *
7814
+ * Everything here is derived, not reported: WebRTC hands out cumulative
7815
+ * counters and a graph of candidate pairs, and turning that into
7816
+ * `"1,2 Mbps · 42 ms · 1080p60"` is the work {@link createLinkStatsSampler}
7817
+ * does.
7818
+ */
7819
+ export declare interface LinkStats {
7820
+ /** Throughput since the previous sample. `0` on the first one — there is no delta yet. */
7821
+ kbps: number;
7822
+ /** Width of the largest stream being sent, or `0` before one is reported. */
7823
+ width: number;
7824
+ /** Height of the largest stream being sent, or `0` before one is reported. */
7825
+ height: number;
7826
+ /** Frame rate of the largest stream being sent, or `0` when the browser omits it. */
7827
+ fps: number;
7828
+ /** Round trip to the peer in milliseconds, or `null` before the first reading. */
7829
+ rttMs: number | null;
7830
+ }
7831
+
7832
+ /** Which media a sampler counts. */
7833
+ export declare type LinkStatsKind = "video" | "audio" | "all";
7834
+
7835
+ /**
7836
+ * A sampler bound to one connection.
7837
+ *
7838
+ * Holds the previous byte counter and timestamp, which is the whole reason this
7839
+ * is an object rather than a function: the rate is a delta, so somebody has to
7840
+ * remember the last reading. One sampler per link — sharing one across peers
7841
+ * subtracts one connection's counter from another's and reports nonsense.
7842
+ */
7843
+ export declare interface LinkStatsSampler {
7844
+ /**
7845
+ * Reduce a report you already have.
7846
+ *
7847
+ * @param report - A report from `RTCPeerConnection.getStats()`.
7848
+ * @returns The stats for this sample.
7849
+ */
7850
+ read: (report: RTCStatsReport) => LinkStats;
7851
+ /**
7852
+ * Fetch a report and reduce it.
7853
+ *
7854
+ * @param connection - The connection to sample.
7855
+ * @returns The stats for this sample.
7856
+ */
7857
+ sample: (connection: RTCPeerConnection) => Promise<LinkStats>;
7858
+ /**
7859
+ * Drop the baseline the rate is derived from.
7860
+ *
7861
+ * Call it after an ICE restart, a reconnect, or a pause — otherwise the next
7862
+ * sample divides the bytes of the whole gap by the whole gap and reports the
7863
+ * average of a period nobody is asking about. The next reading comes back at
7864
+ * `0` kbps and starts a fresh baseline; the resolution and round trip already
7865
+ * on screen are kept, so the badge does not blank out.
7866
+ */
7867
+ reset: () => void;
7868
+ }
7869
+
7870
+ /** Options for {@link createLinkStatsSampler}. */
7871
+ export declare interface LinkStatsSamplerOptions {
7872
+ /**
7873
+ * Which media the throughput counts. Default `"video"`.
7874
+ *
7875
+ * Video is the default because it is what saturates an uplink — audio is an
7876
+ * order of magnitude cheaper, and mixing it in moves the number by less than
7877
+ * the noise between two samples. Use `"all"` when the figure is meant to be
7878
+ * the connection's real cost rather than the picture's.
7879
+ */
7880
+ kind?: LinkStatsKind;
7881
+ }
7882
+
7313
7883
  export declare interface ListOptions<TItem> {
7314
7884
  /** Property to order by. Default: `keyPath`. */
7315
7885
  orderBy?: keyof TItem & string;
@@ -7580,6 +8150,29 @@ export declare interface MasonryProps<T> extends Omit<HTMLAttributes<HTMLDivElem
7580
8150
  */
7581
8151
  export declare function matrixToPath(matrix: QRMatrix, margin?: number): string;
7582
8152
 
8153
+ /**
8154
+ * Listen to a room at rest and report how loud its silence is.
8155
+ *
8156
+ * The number a person cannot guess. Setting a gate by ear means switching it on
8157
+ * and hearing what disappeared, which only works if you already know what should
8158
+ * have disappeared — so the usual outcome is leaving it at a default that is
8159
+ * wrong for that room. Measuring replaces the guess.
8160
+ *
8161
+ * The result is the **peak** RMS window observed, not the average: a threshold
8162
+ * under the loudest thing the quiet room did will be opened by that thing.
8163
+ *
8164
+ * @param stream - A live capture of the room while nobody speaks.
8165
+ * @param options - See {@link NoiseFloorOptions}.
8166
+ * @returns The peak RMS observed, `0..1`. `0` when this engine has no Web Audio
8167
+ * or the stream carries no audio track — which {@link suggestGateThreshold}
8168
+ * turns into its own floor rather than into a gate that never opens.
8169
+ *
8170
+ * @example
8171
+ * const floor = await measureNoiseFloor(stream, { onProgress: setProgress });
8172
+ * setThreshold(suggestGateThreshold(floor));
8173
+ */
8174
+ export declare function measureNoiseFloor(stream: MediaStream, { onProgress, durationMs, context: injectedContext, }?: NoiseFloorOptions): Promise<number>;
8175
+
7583
8176
  /** A classified capture error with a human-readable, English message. */
7584
8177
  export declare interface MediaAccessError {
7585
8178
  kind: MediaAccessErrorKind;
@@ -7876,6 +8469,56 @@ export declare interface MoneyProps extends HTMLAttributes<HTMLSpanElement> {
7876
8469
  locale?: string;
7877
8470
  }
7878
8471
 
8472
+ /**
8473
+ * Report when a track is carrying speech.
8474
+ *
8475
+ * Runs entirely on the **receiving** side, over a track the connection already
8476
+ * delivers, and that is the whole point: a speaking indicator changes several
8477
+ * times per second, so signalling it through a server floods the room with
8478
+ * messages carrying information every client can derive for free.
8479
+ *
8480
+ * Two details separate this from a threshold on a level meter:
8481
+ *
8482
+ * 1. **The release.** RMS drops to nothing in the gaps between words, so a bare
8483
+ * comparison strobes on every syllable. The state only falls after
8484
+ * `releaseMs` of quiet.
8485
+ * 2. **`onChange` fires on the flip, not on the sample.** A callback per poll
8486
+ * would re-render a participant list ten times a second to say the same thing.
8487
+ *
8488
+ * The meter underneath runs with smoothing off: its eased decay plus this release
8489
+ * would hold the indicator open long after the speech stopped.
8490
+ *
8491
+ * @param stream - The stream whose first audio track is measured.
8492
+ * @param onChange - Called only when the speaking state actually flips.
8493
+ * @param options - See {@link VoiceActivityOptions}.
8494
+ * @returns A handle carrying the current state and the teardown.
8495
+ *
8496
+ * @example
8497
+ * const vad = monitorVoiceActivity(remoteStream, (speaking) => setSpeaking(speaking));
8498
+ * // later
8499
+ * vad.stop();
8500
+ */
8501
+ export declare function monitorVoiceActivity(stream: MediaStream, onChange: (speaking: boolean) => void, { threshold, releaseMs, pollMs, context, }?: VoiceActivityOptions): VoiceActivityMonitor;
8502
+
8503
+ /**
8504
+ * Play your own processed microphone back to you.
8505
+ *
8506
+ * The only way to hear what these filters do without a second person on the call.
8507
+ * Every number the chain is tuned by — how deep the de-esser cuts, where the gate
8508
+ * sits, how much presence is too much — is a judgement made by ear, and without
8509
+ * this the only available ear belongs to somebody else.
8510
+ *
8511
+ * **Feedback is the hazard, and the reason this is a held, explicit action rather
8512
+ * than a setting:** without headphones the speakers feed the microphone that feeds
8513
+ * the speakers. Say so in the UI that offers it.
8514
+ *
8515
+ * @param source - The raw captured track to listen to. It is never stopped here.
8516
+ * @param settings - The stages to hear it through. Default {@link DEFAULT_VOICE_CHAIN}.
8517
+ * @param options - See {@link VoiceChainOptions}; `ownsSource` is forced to `false`.
8518
+ * @returns A handle that stops the monitor.
8519
+ */
8520
+ export declare function monitorVoiceChain(source: MediaStreamTrack, settings?: VoiceChainSettings, options?: Omit<VoiceChainOptions, "ownsSource">): VoiceMonitor;
8521
+
7879
8522
  /** Reorder helper: move `from` to `to`, returning a new array. */
7880
8523
  export declare function moveItem<T>(items: T[], from: number, to: number): T[];
7881
8524
 
@@ -8044,6 +8687,16 @@ export declare interface NavigationRailProps extends Omit<HTMLAttributes<HTMLEle
8044
8687
 
8045
8688
  export { NavLink }
8046
8689
 
8690
+ /** Options for {@link measureNoiseFloor}. */
8691
+ export declare interface NoiseFloorOptions {
8692
+ /** Called with `0..1` so a dialog can show the wait. */
8693
+ onProgress?: (fraction: number) => void;
8694
+ /** How long to listen. Default `3000`. */
8695
+ durationMs?: number;
8696
+ /** Reuse an existing `AudioContext` rather than opening one. */
8697
+ context?: AudioContext;
8698
+ }
8699
+
8047
8700
  /**
8048
8701
  * Turn one raw detection into a {@link BarcodeScanResult}.
8049
8702
  *
@@ -8603,6 +9256,68 @@ export declare interface OpenModalOptions {
8603
9256
  /** The operators a field offers. */
8604
9257
  export declare function operatorsFor(field: FilterField): FilterOperator[];
8605
9258
 
9259
+ /**
9260
+ * @tempest-limits file-lines — parsing a session description, merging one
9261
+ * `fmtp` line and inserting a missing one are the same pass over the same
9262
+ * grammar; split apart, each half is a parser of half an SDP.
9263
+ */
9264
+ /** What an Opus `fmtp` line can be asked to carry. Every field is optional. */
9265
+ export declare interface OpusProfile {
9266
+ /**
9267
+ * Ceiling the encoder is asked to respect, in bits per second.
9268
+ *
9269
+ * This describes what we want **to receive**. To cap what we *send*, use
9270
+ * `setSenderBitrate` — in a mesh that is the one that matters, because the
9271
+ * uplink carries one copy per participant.
9272
+ */
9273
+ maxAverageBitrate?: number;
9274
+ /** Highest sample rate worth decoding, in Hz. `48000` for full band. */
9275
+ maxPlaybackRate?: number;
9276
+ /**
9277
+ * Two channels instead of one.
9278
+ *
9279
+ * Sets `stereo` **and** `sprop-stereo`, which point in opposite directions:
9280
+ * `stereo=1` asks the *remote* to send two channels, `sprop-stereo=1`
9281
+ * announces that *we* will. Setting only one leaves the link asymmetric,
9282
+ * which is the recurring reason "I asked for stereo and got mono".
9283
+ */
9284
+ stereo?: boolean;
9285
+ /**
9286
+ * In-band forward error correction (`useinbandfec`).
9287
+ *
9288
+ * Rebuilds a lost packet from the next one, which keeps speech intelligible
9289
+ * on a lossy link — and smears music, since it spends bitrate on redundancy
9290
+ * instead of detail.
9291
+ */
9292
+ fec?: boolean;
9293
+ /**
9294
+ * Discontinuous transmission (`usedtx`): stop sending during silence.
9295
+ *
9296
+ * Saves uplink in a mesh, at the cost of clipping the first instant after a
9297
+ * pause. Wrong for music and for a shared screen, where the quiet passages
9298
+ * are content.
9299
+ */
9300
+ dtx?: boolean;
9301
+ /** Constant bitrate (`cbr`). Off by default, as Opus intends. */
9302
+ cbr?: boolean;
9303
+ /**
9304
+ * Any other `fmtp` key, merged verbatim.
9305
+ *
9306
+ * The escape hatch for a parameter this type does not model. Values are
9307
+ * written as given; a key with an empty string is emitted as a bare flag.
9308
+ */
9309
+ extra?: Record<string, string>;
9310
+ }
9311
+
9312
+ /**
9313
+ * Profiles to apply, keyed by audio m-line index (`0`, `1`, …) or by `mid`.
9314
+ *
9315
+ * Position and `mid` can be mixed in one object. A key that matches nothing is
9316
+ * ignored rather than an error — an SDP is negotiated, and a slot that was not
9317
+ * offered this time is normal.
9318
+ */
9319
+ export declare type OpusProfileMap = Record<string | number, OpusProfile>;
9320
+
8606
9321
  /**
8607
9322
  * First sequential step that clears 2:1 against the chart surface.
8608
9323
  *
@@ -8750,8 +9465,19 @@ export declare interface PageProps extends Omit<HTMLAttributes<HTMLElement>, "ti
8750
9465
 
8751
9466
  /**
8752
9467
  * Numeric pagination controls. Pair with {@link usePagination} for state.
9468
+ *
9469
+ * Narrow screens collapse to `‹` / `›` plus the summary by default, which turns
9470
+ * random access into sequential access — fine for a desktop-first app, wrong for
9471
+ * one whose traffic is phones. `compactOnMobile={false}` keeps the numbers at
9472
+ * every width: the row scrolls on its own instead of widening the page, and the
9473
+ * effect below keeps the current page inside the visible part of that row.
9474
+ *
9475
+ * The scroll is why this is one boolean rather than a `variant`. Simply
9476
+ * un-hiding the buttons would push a nine-button row past a 360px viewport and
9477
+ * give the whole document a horizontal scrollbar — the opt-out has to carry its
9478
+ * own layout, so it does.
8753
9479
  */
8754
- export declare function Pagination({ page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, totalItems, siblingCount, className, }: PaginationProps): JSX.Element | null;
9480
+ export declare function Pagination({ page, totalPages, onPageChange, pageSize, onPageSizeChange, pageSizeOptions, totalItems, siblingCount, compactOnMobile, className, }: PaginationProps): JSX.Element | null;
8755
9481
 
8756
9482
  export declare interface PaginationProps {
8757
9483
  page: number;
@@ -8762,8 +9488,20 @@ export declare interface PaginationProps {
8762
9488
  pageSizeOptions?: number[];
8763
9489
  /** Total items count; if provided, renders the summary text. */
8764
9490
  totalItems?: number;
8765
- /** Max number of numbered page buttons to show. Default 7. */
9491
+ /** Pages kept around the current one; ~`siblingCount + 4` buttons render. Default 3. */
8766
9492
  siblingCount?: number;
9493
+ /**
9494
+ * Below 640px, drop to `‹` / `›` plus the summary and hide the numbered
9495
+ * buttons and the size select. Default `true`.
9496
+ *
9497
+ * The default suits a desktop-first app, and costs the thing pagination is
9498
+ * for on a phone: reaching page 7 becomes six taps on "next" instead of one
9499
+ * tap on `7`. Pass `false` in a mobile-first app and the numbers stay at
9500
+ * every width — the row scrolls horizontally by itself rather than pushing
9501
+ * the page wider, and the current page is scrolled into view when it
9502
+ * changes.
9503
+ */
9504
+ compactOnMobile?: boolean;
8767
9505
  className?: string;
8768
9506
  }
8769
9507
 
@@ -8775,13 +9513,28 @@ declare type ParamValue = string | number | boolean | undefined | null;
8775
9513
  /**
8776
9514
  * Validate an unknown response payload against a zod schema.
8777
9515
  *
8778
- * In development, throws a detailed error pointing at the divergent field.
8779
- * In production, throws a generic error so internals do not leak to users.
9516
+ * A development build throws a detailed error naming every divergent field path
9517
+ * and embedding the raw payload; every other build throws a generic sentence, so
9518
+ * server internals never reach a user's screen or an error tracker.
9519
+ *
9520
+ * Which one you get comes from `isDevBuild()`, the SDK's single answer to that
9521
+ * question, rather than from a check written here. This function used to ask
9522
+ * `typeof process !== "undefined" && process.env?.NODE_ENV === "development"`,
9523
+ * and a browser has no `process` identifier at all — so the guard short-circuited
9524
+ * and the detailed branch was dead in exactly the build it was written for, no
9525
+ * matter what the bundler substituted behind it.
9526
+ *
9527
+ * The rule `isDevBuild()` applies is `NODE_ENV !== "production"`, which is wider
9528
+ * than the old `"development" || "test"`: a staging build that never sets
9529
+ * `NODE_ENV=production` gets the drift report, raw payload included.
8780
9530
  *
8781
9531
  * @param schema - The zod schema to parse against.
8782
9532
  * @param raw - The raw response payload.
8783
9533
  * @param context - A label used in error messages, e.g. "POST /auth/login".
8784
9534
  * @returns The parsed, typed payload.
9535
+ * @throws Error When the payload does not match the schema: `[parseResponse]
9536
+ * Contract drift on <context>` with the field paths and the raw payload in a
9537
+ * development build, `Resposta inválida do servidor (<context>).` otherwise.
8785
9538
  */
8786
9539
  export declare function parseResponse<TSchema extends z.ZodTypeAny>(schema: TSchema, raw: unknown, context: string): z.infer<TSchema>;
8787
9540
 
@@ -9315,8 +10068,13 @@ export declare interface PopoverProps {
9315
10068
  * Renders its children into a different part of the DOM tree via a React portal.
9316
10069
  *
9317
10070
  * Useful for overlays (modals, tooltips, dropdowns) that must escape parent
9318
- * overflow/stacking contexts. Defaults to `document.body` when no `container`
9319
- * is provided.
10071
+ * overflow/stacking contexts.
10072
+ *
10073
+ * Without `container` the target is the element currently presented fullscreen,
10074
+ * and `document.body` the rest of the time. `body` alone would be wrong during
10075
+ * fullscreen: the browser paints only the fullscreen element's subtree, so an
10076
+ * overlay mounted outside it is invisible and unclickable while looking perfectly
10077
+ * healthy in the DOM. Passing `container` opts out of that and pins the target.
9320
10078
  *
9321
10079
  * SSR-safe: renders `null` on the server and on the first client render, then
9322
10080
  * mounts the portal after hydration (when `document` is available).
@@ -9329,7 +10087,12 @@ export declare function Portal({ children, container }: PortalProps): ReactNode;
9329
10087
  export declare interface PortalProps {
9330
10088
  /** Content rendered through the portal. */
9331
10089
  children: ReactNode;
9332
- /** Target DOM node to render into. Defaults to `document.body`. */
10090
+ /**
10091
+ * Target DOM node to render into.
10092
+ *
10093
+ * Defaults to the fullscreen element while one is presented, and to
10094
+ * `document.body` otherwise.
10095
+ */
9333
10096
  container?: Element | null;
9334
10097
  }
9335
10098
 
@@ -9363,7 +10126,7 @@ export declare interface PostHogLike {
9363
10126
  }
9364
10127
 
9365
10128
  /** A lazy component that can also be fetched ahead of being rendered. */
9366
- export declare type PreloadableLazy<T extends ComponentType<unknown>> = ReturnType<typeof lazy<T>> & {
10129
+ export declare type PreloadableLazy<T extends AnyComponent> = ReturnType<typeof lazy<T>> & {
9367
10130
  /**
9368
10131
  * Start fetching the chunk now, before anything renders it.
9369
10132
  *
@@ -9461,6 +10224,20 @@ export declare interface PullPage<TRemote> {
9461
10224
  serverTime: string | null;
9462
10225
  }
9463
10226
 
10227
+ /**
10228
+ * The keys worth offering for push-to-talk.
10229
+ *
10230
+ * Identified by `code` rather than `key` so a binding survives a layout change:
10231
+ * on an ABNT2 keyboard the `key` reported for the backquote position is not what
10232
+ * a US layout reports, while `Backquote` is the same physical key everywhere.
10233
+ *
10234
+ * Left-hand modifiers only. The right-hand ones sit under the hand that is
10235
+ * usually on the mouse, and a modifier that is also a shortcut prefix
10236
+ * (`ControlLeft` with a browser shortcut) is a deliberate trade the caller makes
10237
+ * by choosing it.
10238
+ */
10239
+ export declare const PUSH_TO_TALK_KEYS: readonly PushToTalkKey[];
10240
+
9464
10241
  /**
9465
10242
  * Service-worker context helpers for handling `push` and `notificationclick`
9466
10243
  * events. Import these inside your own `sw.ts` — they expect to run in the
@@ -9485,6 +10262,23 @@ export declare interface PushPayload {
9485
10262
  data?: Record<string, unknown>;
9486
10263
  }
9487
10264
 
10265
+ /** A key offered for push-to-talk, with the label a settings screen shows. */
10266
+ export declare interface PushToTalkKey {
10267
+ /** `KeyboardEvent.code`, which is layout-independent. */
10268
+ code: string;
10269
+ /** What to show a person. `code` itself is not a label. */
10270
+ label: string;
10271
+ }
10272
+
10273
+ /**
10274
+ * The label to show for a `KeyboardEvent.code`.
10275
+ *
10276
+ * @param code - The bound key's code.
10277
+ * @returns Its label, or the code itself for a key this list does not name —
10278
+ * showing `"F13"` beats showing nothing.
10279
+ */
10280
+ export declare function pushToTalkKeyLabel(code: string): string;
10281
+
9488
10282
  /** Raised when a payload cannot be encoded at the requested level. */
9489
10283
  export declare class QRCapacityError extends Error {
9490
10284
  readonly length: number;
@@ -9675,7 +10469,7 @@ export declare function range(start: number, end: number, step?: number): number
9675
10469
  * stays accessible and works with keyboards/screen readers without
9676
10470
  * heavyweight positioning libs. The active fill is positioned via percentages.
9677
10471
  */
9678
- export declare function RangeSlider({ value, onChange, min, max, step, label, helperText, disabled, formatValue, className, }: RangeSliderProps): JSX.Element;
10472
+ export declare function RangeSlider({ value, onChange, min, max, step, label, helperText, disabled, formatValue, "aria-label": ariaLabel, className, }: RangeSliderProps): JSX.Element;
9679
10473
 
9680
10474
  export declare interface RangeSliderProps {
9681
10475
  value: RangeValue;
@@ -9688,6 +10482,14 @@ export declare interface RangeSliderProps {
9688
10482
  disabled?: boolean;
9689
10483
  /** Formatter for the value badge next to the label. Defaults to `min – max`. */
9690
10484
  formatValue?: (value: RangeValue) => string;
10485
+ /**
10486
+ * Accessible name for the pair, for when the visible `label` block does not fit.
10487
+ *
10488
+ * Each thumb still gets its own suffixed name — `"Preço (mínimo)"` and
10489
+ * `"Preço (máximo)"` — because a screen reader user moving between the two
10490
+ * needs to know which end they are on. Takes precedence over `label`.
10491
+ */
10492
+ "aria-label"?: string;
9691
10493
  className?: string;
9692
10494
  }
9693
10495
 
@@ -9740,6 +10542,29 @@ export declare function readableForeground(background: string, light?: string, d
9740
10542
  */
9741
10543
  export declare function readDeviceProfile(): DeviceProfile;
9742
10544
 
10545
+ /**
10546
+ * Read the round trip of the candidate pair actually carrying the link.
10547
+ *
10548
+ * A connection routinely keeps several viable pairs alive at once — host,
10549
+ * server-reflexive, relayed — and only one of them carries traffic. Reading the
10550
+ * first `succeeded` pair makes the number jump between paths that are not being
10551
+ * travelled: 8 ms on an idle host pair alternating with 180 ms on the TURN pair
10552
+ * doing the work. The pair the transport names in `selectedCandidatePairId` is
10553
+ * the one being used.
10554
+ *
10555
+ * A succeeded pair is kept as a fallback because not every browser fills that
10556
+ * field in — losing the reading entirely is worse than an occasionally
10557
+ * optimistic one.
10558
+ *
10559
+ * @param report - A report from `RTCPeerConnection.getStats()`.
10560
+ * @returns Round trip in milliseconds, rounded, or `null` when nothing reported
10561
+ * one — which is the normal state before the connection settles.
10562
+ *
10563
+ * @example
10564
+ * const rttMs = readRoundTripMs(await pc.getStats());
10565
+ */
10566
+ export declare function readRoundTripMs(report: RTCStatsReport): number | null;
10567
+
9743
10568
  /**
9744
10569
  * Read a token's computed value from an element (default: `<html>`).
9745
10570
  *
@@ -9826,7 +10651,19 @@ export declare interface RegisterPeriodicSyncOptions {
9826
10651
  *
9827
10652
  * Skips silently when the runtime has no `serviceWorker` support. The host
9828
10653
  * app keeps full control over the SW file — this helper only handles the
9829
- * boilerplate around `register()` and `updatefound`.
10654
+ * boilerplate around `register()` and update detection.
10655
+ *
10656
+ * Two things can mean "an update is ready", and only one of them is an event.
10657
+ * `updatefound` covers the worker that installs while this tab is open. The
10658
+ * commoner case has no event at all: the user visited after a deploy, the new
10659
+ * worker installed and went to `waiting`, they closed the tab, and they are back
10660
+ * now. `install` already happened, so nothing fires — which is why `waiting` is
10661
+ * read directly once the registration resolves. Both routes go through the same
10662
+ * dedupe, so a worker is announced once even when both apply.
10663
+ *
10664
+ * Neither route fires without `navigator.serviceWorker.controller`: no
10665
+ * controller means this is the first install, which is `onReady` territory, not
10666
+ * an update the user should be prompted about.
9830
10667
  *
9831
10668
  * With `autoUpdate` enabled it additionally polls `registration.update()` on
9832
10669
  * an interval and (by default) reloads the page when a freshly activated worker
@@ -9848,6 +10685,10 @@ export declare interface RegisterServiceWorkerOptions {
9848
10685
  * Called when a new worker has finished installing while another worker
9849
10686
  * still controls the page. The host app typically prompts the user to
9850
10687
  * reload and then calls {@link skipWaiting} on the returned worker.
10688
+ *
10689
+ * Fires for a worker that was already `waiting` when `register()` resolved
10690
+ * — the state a user returning after a deploy actually finds — as well as
10691
+ * for one that installs during this session, and at most once per worker.
9851
10692
  */
9852
10693
  onUpdate?: (waiting: ServiceWorker, registration: ServiceWorkerRegistration) => void;
9853
10694
  /** Called on registration failure. */
@@ -10194,22 +11035,40 @@ export { Route }
10194
11035
 
10195
11036
  /**
10196
11037
  * Declarative route guard built on React Router's `<Navigate>`. Renders its
10197
- * children when `when` is truthy, otherwise redirects. Pairs naturally with
10198
- * `createAuthStore` for protected areas.
11038
+ * children when `when` is `true`, redirects when it is `false`, and holds on
11039
+ * `"pending"`. Pairs naturally with `createAuthStore` for protected areas, and
11040
+ * with `useCan` for permissions that resolve over the network.
10199
11041
  *
10200
11042
  * @example
10201
11043
  * <RouteGuard when={useAuthStore((s) => s.isAuthenticated)} redirectTo="/login">
10202
11044
  * <Outlet />
10203
11045
  * </RouteGuard>
11046
+ *
11047
+ * @example
11048
+ * const { allowed, isLoading } = useCan({ action: "read", resource: "finance" });
11049
+ *
11050
+ * <RouteGuard when={isLoading ? "pending" : allowed} fallback={<Spinner />}>
11051
+ * <Outlet />
11052
+ * </RouteGuard>
10204
11053
  */
10205
- export declare function RouteGuard({ when, redirectTo, replace, children }: RouteGuardProps): JSX.Element;
11054
+ export declare function RouteGuard({ when, fallback, redirectTo, replace, children, }: RouteGuardProps): JSX.Element;
10206
11055
 
10207
11056
  export declare interface RouteGuardProps {
10208
11057
  /**
10209
- * Whether access is allowed. Pass a boolean or anything truthy/falsy —
10210
- * typically `useAuthStore((s) => s.isAuthenticated)`.
11058
+ * Whether access is allowed typically
11059
+ * `useAuthStore((s) => s.isAuthenticated)`.
11060
+ *
11061
+ * `"pending"` is the third answer, for a permission that has not resolved
11062
+ * yet: it holds the decision and renders {@link fallback} instead of
11063
+ * choosing between two wrong moves — redirecting someone who does have
11064
+ * access, or showing the screen to someone who does not.
10211
11065
  */
10212
- when: boolean;
11066
+ when: RouteGuardResult;
11067
+ /**
11068
+ * Rendered while `when` is `"pending"`. Defaults to nothing, which is a
11069
+ * blank screen — pass the same spinner the rest of the app uses.
11070
+ */
11071
+ fallback?: ReactNode;
10213
11072
  /** Where to redirect when `when` is falsy (default: `"/"`). */
10214
11073
  redirectTo?: string;
10215
11074
  /** Replace history entry on redirect instead of pushing (default: true). */
@@ -10218,6 +11077,19 @@ export declare interface RouteGuardProps {
10218
11077
  children: ReactNode;
10219
11078
  }
10220
11079
 
11080
+ /**
11081
+ * What a route guard can answer.
11082
+ *
11083
+ * `true` renders the route, `false` redirects — and `"pending"` is the third
11084
+ * answer a two-state guard cannot give. Without it, a permission that resolves
11085
+ * asynchronously has to lie while it is in flight, and both lies are wrong:
11086
+ * answering `false` redirects the person who **does** have the permission,
11087
+ * every time the route is opened cold (F5 on the URL, an external link);
11088
+ * answering `true` renders the screen for someone who does not, until the
11089
+ * answer lands.
11090
+ */
11091
+ export declare type RouteGuardResult = boolean | "pending";
11092
+
10221
11093
  /** Router history strategy used by {@link AppRouter}. */
10222
11094
  export declare type RouterKind = "browser" | "hash" | "memory";
10223
11095
 
@@ -10578,6 +11450,56 @@ export declare interface SequentialScaleOptions {
10578
11450
  */
10579
11451
  export declare function setAudioOutput(element: HTMLMediaElement | null, sinkId: string): Promise<boolean>;
10580
11452
 
11453
+ /**
11454
+ * Cap what one sender transmits, in bits per second.
11455
+ *
11456
+ * This is the other half of the pair that confuses people: an Opus `fmtp` line
11457
+ * describes what we want **to receive**, while this is what limits what we
11458
+ * **send**. Both are needed, and in a mesh topology this one matters more,
11459
+ * because the uplink carries one copy of the stream per participant.
11460
+ *
11461
+ * The read-modify-write is not ceremony. `setParameters` only accepts the very
11462
+ * object `getParameters` handed back — a freshly built one is rejected — and a
11463
+ * sender that has not negotiated yet reports **no** encodings at all, so writing
11464
+ * to `encodings[0]` without checking throws on exactly the call that sets the
11465
+ * cap before the first offer.
11466
+ *
11467
+ * @param sender - The `RTCRtpSender` to cap, from `pc.getSenders()` or
11468
+ * `transceiver.sender`.
11469
+ * @param maxBitrate - Ceiling in bits per second, or `null` to lift the cap.
11470
+ * @returns `false` when the browser refused the change, which happens when the
11471
+ * sender has no track or the transceiver is gone. Playback continues
11472
+ * uncapped — a call that keeps running beats one that throws over a bitrate.
11473
+ *
11474
+ * @example
11475
+ * const sender = pc.getSenders().find((s) => s.track?.kind === "audio");
11476
+ * if (sender) await setSenderBitrate(sender, 48_000);
11477
+ */
11478
+ export declare function setSenderBitrate(sender: RTCRtpSender, maxBitrate: number | null): Promise<boolean>;
11479
+
11480
+ /**
11481
+ * Set a local description, falling back to the untouched one if it is refused.
11482
+ *
11483
+ * Chrome has been tightening what `setLocalDescription` accepts from edited SDP,
11484
+ * and there is no way to know in advance. Without a fallback the call dies
11485
+ * instead of merely losing the profile — which is the wrong trade by a wide
11486
+ * margin: worse audio beats no audio.
11487
+ *
11488
+ * @param connection - The peer connection.
11489
+ * @param description - The description from `createOffer` / `createAnswer`.
11490
+ * @param profiles - Passed straight to {@link tuneOpus}.
11491
+ * @returns `"tuned"` when the rewritten SDP was accepted, `"original"` when the
11492
+ * fallback was used — worth reporting, because it means the profile silently
11493
+ * did not apply.
11494
+ * @throws Whatever `setLocalDescription` throws for the original description: at
11495
+ * that point the failure is not about the rewrite and the caller has to know.
11496
+ *
11497
+ * @example
11498
+ * const applied = await setTunedLocalDescription(pc, await pc.createOffer(), profiles);
11499
+ * if (applied === "original") logger.warn("opus profile refused by the browser");
11500
+ */
11501
+ export declare function setTunedLocalDescription(connection: RTCPeerConnection, description: RTCSessionDescriptionInit, profiles: OpusProfile | OpusProfileMap): Promise<TunedDescriptionResult>;
11502
+
10581
11503
  /** Imperative handle over a pool of short sound effects. */
10582
11504
  export declare interface SfxPool {
10583
11505
  /** Play a clip, allocating and caching its element on first use. */
@@ -10920,7 +11842,7 @@ export declare function sleep(ms: number): Promise<void>;
10920
11842
  * accessible (keyboard + screen reader) with no positioning libs. The active
10921
11843
  * fill is a percentage-width bar. For a two-thumb range, use `RangeSlider`.
10922
11844
  */
10923
- export declare function Slider({ value, onChange, min, max, step, label, helperText, disabled, formatValue, className, }: SliderProps): JSX.Element;
11845
+ export declare function Slider({ value, onChange, min, max, step, label, helperText, disabled, formatValue, "aria-label": ariaLabel, className, }: SliderProps): JSX.Element;
10924
11846
 
10925
11847
  export declare interface SliderProps {
10926
11848
  /** Current value. */
@@ -10935,6 +11857,17 @@ export declare interface SliderProps {
10935
11857
  disabled?: boolean;
10936
11858
  /** Formatter for the value badge next to the label. Defaults to the raw number. */
10937
11859
  formatValue?: (value: number) => string;
11860
+ /**
11861
+ * Accessible name, for when the visible `label` block does not fit.
11862
+ *
11863
+ * A slider in a one-line footer, a table cell or a toolbar has no room for the
11864
+ * label row above the track, and without this every such control announces
11865
+ * itself as "Slider" — several on the same screen become indistinguishable to a
11866
+ * screen reader. Takes precedence over `label`; wrapping the field in an outer
11867
+ * `<label>` does not work, because an explicit `aria-label` on the input wins
11868
+ * the accessible-name precedence order.
11869
+ */
11870
+ "aria-label"?: string;
10938
11871
  className?: string;
10939
11872
  }
10940
11873
 
@@ -11298,6 +12231,19 @@ export { StorageEstimate_2 as StorageEstimate }
11298
12231
 
11299
12232
  export { SubmitHandler }
11300
12233
 
12234
+ /**
12235
+ * Turn a measured noise floor into a threshold worth using.
12236
+ *
12237
+ * Sits above the floor by a margin rather than on it, and is clamped at both
12238
+ * ends: a room measured as perfectly silent (or not measured at all) would
12239
+ * otherwise get a threshold of zero, which is a gate that never closes, and a
12240
+ * room measured while somebody talked would get one nothing opens.
12241
+ *
12242
+ * @param noiseFloor - Peak RMS measured while nobody spoke.
12243
+ * @returns A threshold for {@link VoiceChainSettings.gateThreshold}, `0.004..0.12`.
12244
+ */
12245
+ export declare function suggestGateThreshold(noiseFloor: number): number;
12246
+
11301
12247
  /** Toggle switch backed by a checkbox input. Accessible via keyboard. */
11302
12248
  export declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTMLInputElement>>;
11303
12249
 
@@ -11659,15 +12605,30 @@ export declare interface TempestRouteObject {
11659
12605
  * under the {@link AppRouter} `<Suspense>` boundary.
11660
12606
  */
11661
12607
  lazy?: () => Promise<{
11662
- default: ComponentType<unknown>;
12608
+ default: AnyRouteComponent;
11663
12609
  }>;
11664
12610
  /** Nested child routes (rendered through this route's `<Outlet />`). */
11665
12611
  children?: TempestRouteObject[];
11666
12612
  /**
11667
12613
  * Access guard. When `false` (or a function returning `false`), the route
11668
- * renders a redirect to {@link redirectTo} instead of its element.
12614
+ * renders a redirect to {@link redirectTo} instead of its element. When the
12615
+ * function returns `"pending"`, the decision is held and {@link guardFallback}
12616
+ * renders instead — see {@link RouteGuardResult}.
12617
+ *
12618
+ * The function runs inside the guard component's render, so it **may call
12619
+ * hooks** — which is what lets an async permission check like `useCan` plug
12620
+ * straight in. The usual rule applies: call the same hooks on every render
12621
+ * of that route. Guarded routes are keyed per route object, so navigating
12622
+ * between two routes whose guards call different hooks remounts rather than
12623
+ * breaking hook order.
11669
12624
  */
11670
- guard?: boolean | (() => boolean);
12625
+ guard?: boolean | (() => RouteGuardResult);
12626
+ /**
12627
+ * Rendered while {@link guard} answers `"pending"`. Defaults to the
12628
+ * {@link AppRouter} `fallback`, so a route tree that already passes a
12629
+ * spinner for `lazy` chunks reuses it here with no extra wiring.
12630
+ */
12631
+ guardFallback?: ReactNode;
11671
12632
  /** Destination used when `guard` fails (default: `"/"`). */
11672
12633
  redirectTo?: string;
11673
12634
  /** Match the path case-sensitively. */
@@ -12380,6 +13341,42 @@ export declare interface TruncateTextProps extends HTMLAttributes<HTMLDivElement
12380
13341
  children: ReactNode;
12381
13342
  }
12382
13343
 
13344
+ /** Which description a peer connection actually accepted. */
13345
+ export declare type TunedDescriptionResult = "tuned" | "original";
13346
+
13347
+ /**
13348
+ * Apply Opus profiles to the audio m-lines of a session description.
13349
+ *
13350
+ * Audio over WebRTC is mono and narrow by default, and the only place that is
13351
+ * corrected is the SDP — which is why shared-screen audio famously sounds like a
13352
+ * telephone: music and video inherit the speech profile (mono, ~32 kbps, FEC on,
13353
+ * DTX gating the quiet passages) and no high-level API lets you change it.
13354
+ *
13355
+ * Deliberately **without** built-in presets: which values to use is the
13356
+ * consumer's call — voice in a mesh does not want what system audio wants — and
13357
+ * a preset table is the kind of thing that has no business inside a dependency.
13358
+ * What lives here is the parsing, merging and insertion, which is where the long
13359
+ * tail is. Getting any of it wrong degrades silently: nobody sees an exception,
13360
+ * the audio is just worse.
13361
+ *
13362
+ * @param sdp - The description from `createOffer` or `createAnswer`.
13363
+ * @param profiles - One {@link OpusProfile} for every audio m-line, or an
13364
+ * {@link OpusProfileMap} keyed by audio m-line index or by `mid`.
13365
+ * @returns The rewritten SDP, with CRLF line endings as RFC 4566 requires.
13366
+ * Untouched when there is no Opus, when no profile matches, or when a profile
13367
+ * asks for nothing.
13368
+ *
13369
+ * @example
13370
+ * const tuned = tuneOpus(offer.sdp, {
13371
+ * 0: { maxAverageBitrate: 48_000, stereo: false, fec: true, dtx: true },
13372
+ * 1: { maxAverageBitrate: 192_000, stereo: true, fec: false, dtx: false },
13373
+ * });
13374
+ *
13375
+ * @example
13376
+ * const tuned = tuneOpus(offer.sdp, { stereo: true, dtx: false });
13377
+ */
13378
+ export declare function tuneOpus(sdp: string, profiles: OpusProfile | OpusProfileMap): string;
13379
+
12383
13380
  /**
12384
13381
  * Clock label for a turn — the time, not a relative phrase.
12385
13382
  *
@@ -12640,6 +13637,31 @@ export declare interface UseAsyncResult<T> {
12640
13637
  */
12641
13638
  export declare function useAudio(): UseAudioResult;
12642
13639
 
13640
+ /**
13641
+ * Keep one {@link AudioBus} alive for as long as the component is mounted.
13642
+ *
13643
+ * The bus is built on the first render and closed on unmount, which matters more
13644
+ * than it looks: browsers cap the number of live `AudioContext`s (Chrome allows
13645
+ * around six), so a bus leaked on unmount eventually breaks every later one on
13646
+ * the page.
13647
+ *
13648
+ * Options are read once. A bus is a device route and a mixing graph, not a
13649
+ * render output — rebuilding it because a prop changed would drop every attached
13650
+ * source mid-sentence. Change gain and output through the bus itself.
13651
+ *
13652
+ * @param options - See {@link AudioBusOptions}. Read on the first render only.
13653
+ * @returns The bus, stable for the component's lifetime.
13654
+ *
13655
+ * @example
13656
+ * const bus = useAudioBus({ maxGain: 3 });
13657
+ *
13658
+ * useEffect(() => {
13659
+ * const handle = bus.attach(stream, { gain: 1 });
13660
+ * return () => handle.stop();
13661
+ * }, [bus, stream]);
13662
+ */
13663
+ export declare function useAudioBus(options?: AudioBusOptions): AudioBus;
13664
+
12643
13665
  /**
12644
13666
  * Record the given stream, with a clock, a level meter and a state machine.
12645
13667
  *
@@ -13187,6 +14209,71 @@ export { UseFormReturn }
13187
14209
 
13188
14210
  export { useFormState }
13189
14211
 
14212
+ /**
14213
+ * Drive an immersive mode whose state stays true to the browser.
14214
+ *
14215
+ * The mistake this exists to remove is storing `isFullscreen` in state and
14216
+ * flipping it inside your own `enter()` / `exit()`. Fullscreen ends in ways your
14217
+ * code never sees — `Esc`, the browser's own exit affordance, F11 pressed while an
14218
+ * API fullscreen is active — and each of those leaves the flag saying "sair" over
14219
+ * a page that is already windowed. The only honest source is the
14220
+ * `fullscreenchange` event, which fires for every one of them, so that is what
14221
+ * this hook reads and what the returned `isFullscreen` reflects. The action
14222
+ * callbacks never touch it.
14223
+ *
14224
+ * The subscription is not this hook's own: it lives in `useFullscreenElement`,
14225
+ * shared with `usePortalHost`, which needs the same fact to decide where an
14226
+ * overlay mounts while fullscreen is on. Two independent listeners for one event
14227
+ * would mean two copies of the WebKit prefix dance and two places to fix the next
14228
+ * quirk, so the primitive answers "which element is presented" once and each
14229
+ * consumer asks its own question of the answer.
14230
+ *
14231
+ * WebKit's prefixed members are handled throughout — `webkitfullscreenchange`,
14232
+ * `webkitFullscreenElement`, `webkitRequestFullscreen`, `webkitExitFullscreen` —
14233
+ * because Safari on iPad still ships them and nothing else.
14234
+ *
14235
+ * `isFullscreen` is identity against the target, not containment: a `<video>`
14236
+ * inside your element going fullscreen on its own is not your element being
14237
+ * presented, and reporting `true` there would put your exit control inside a
14238
+ * subtree the browser is not painting.
14239
+ *
14240
+ * @param ref - The element to present. Omit it to present the whole page
14241
+ * (`document.documentElement`).
14242
+ * @returns `{ isFullscreen, supported, enter, exit, toggle }`.
14243
+ * @throws Nothing during render. `enter()` and `toggle()` reject with the
14244
+ * browser's own error when the request is refused — most often a `TypeError`
14245
+ * because the call did not come from a user gesture — and with an `Error` when
14246
+ * there is no element to present or the environment ships no Fullscreen API.
14247
+ *
14248
+ * @example
14249
+ * const stage = useRef<HTMLDivElement>(null);
14250
+ * const { isFullscreen, supported, toggle } = useFullscreen(stage);
14251
+ *
14252
+ * <div ref={stage}>
14253
+ * <video src="/aula.mp4" controls />
14254
+ * {supported ? (
14255
+ * <button onClick={() => void toggle().catch(() => setRefused(true))}>
14256
+ * {isFullscreen ? "Sair da tela cheia" : "Tela cheia"}
14257
+ * </button>
14258
+ * ) : null}
14259
+ * </div>
14260
+ */
14261
+ export declare function useFullscreen(ref?: RefObject<HTMLElement | null>): UseFullscreenResult;
14262
+
14263
+ /** Value returned by {@link useFullscreen}. */
14264
+ export declare interface UseFullscreenResult {
14265
+ /** Whether the target element is the one the browser is presenting right now. */
14266
+ isFullscreen: boolean;
14267
+ /** Whether a request stands a chance at all — hide the control when `false`. */
14268
+ supported: boolean;
14269
+ /** Present the target. Must be called from a user gesture. Rejects if refused. */
14270
+ enter: () => Promise<void>;
14271
+ /** Leave fullscreen. Resolves immediately when nothing is presented. */
14272
+ exit: () => Promise<void>;
14273
+ /** Leave if the target is presented, otherwise enter. Same gesture rule as `enter`. */
14274
+ toggle: () => Promise<void>;
14275
+ }
14276
+
13190
14277
  /**
13191
14278
  * React hook around the Geolocation API.
13192
14279
  *
@@ -13401,6 +14488,51 @@ export declare interface UseKeyboardShortcutOptions {
13401
14488
  */
13402
14489
  export declare function useLatestRef<T>(value: T): RefObject<T>;
13403
14490
 
14491
+ /**
14492
+ * Poll one connection's throughput, resolution and round trip.
14493
+ *
14494
+ * Sampling runs only while the connection is `"connected"`, so a link that is
14495
+ * still negotiating or already gone costs nothing. The last reading is kept
14496
+ * across pauses rather than cleared, because a badge that blanks every time the
14497
+ * tab loses focus reads as a broken connection.
14498
+ *
14499
+ * Coming back from a pause resets the baseline first. Without that, the sample
14500
+ * after a five-minute background stretch divides five minutes of bytes by five
14501
+ * minutes and reports the average of a period the person is not asking about.
14502
+ *
14503
+ * @param connection - The connection to watch, or `null` before one exists.
14504
+ * @param options - See {@link UseLinkStatsOptions}.
14505
+ * @returns The latest reading, or `null` before the first sample lands.
14506
+ *
14507
+ * @example
14508
+ * const stats = useLinkStats(pc);
14509
+ *
14510
+ * return <span>{stats ? `${stats.kbps} kbps · ${stats.rttMs ?? "—"} ms` : "medindo…"}</span>;
14511
+ */
14512
+ export declare function useLinkStats(connection: RTCPeerConnection | null, options?: UseLinkStatsOptions): LinkStats | null;
14513
+
14514
+ /** Options for {@link useLinkStats}. */
14515
+ export declare interface UseLinkStatsOptions {
14516
+ /**
14517
+ * How often to sample, in milliseconds. Default `2000`.
14518
+ *
14519
+ * `getStats()` walks every report a connection holds, and a mesh runs one
14520
+ * per participant — on the device least able to pay for it. The numbers feed
14521
+ * a latency badge and a throughput figure nobody reads at 1 Hz, so the
14522
+ * default is deliberately slower than a frame budget suggests.
14523
+ */
14524
+ intervalMs?: number;
14525
+ /**
14526
+ * Stop sampling while the tab is in the background. Default `true`.
14527
+ *
14528
+ * The audio path is untouched by this — people in a backgrounded call still
14529
+ * expect to hear it. What stops is the measuring, which nobody can see.
14530
+ */
14531
+ pauseWhenHidden?: boolean;
14532
+ /** Which media the throughput counts. Default `"video"`. */
14533
+ kind?: LinkStatsKind;
14534
+ }
14535
+
13404
14536
  /**
13405
14537
  * Query a paginated list of a resource through the active {@link useDataProvider}.
13406
14538
  *
@@ -14346,6 +15478,57 @@ export declare interface UsePushSubscriptionResult {
14346
15478
  refresh: () => Promise<void>;
14347
15479
  }
14348
15480
 
15481
+ /**
15482
+ * Hold a key to transmit; release it to go silent again.
15483
+ *
15484
+ * Looks like `keydown`/`keyup` and is not, because three things go wrong:
15485
+ *
15486
+ * 1. **`blur` has to release.** Alt-tabbing away while holding the key means the
15487
+ * browser never sees the `keyup`, and the microphone stays open for as long as
15488
+ * the person is looking at another window — exactly what push-to-talk exists
15489
+ * to prevent.
15490
+ * 2. **Auto-repeat has to be ignored.** A held key repeats at the keyboard's rate,
15491
+ * and without the `repeat` check `onDown` fires on every one of them.
15492
+ * 3. **A text field has to win.** Space bound to push-to-talk with the focus in an
15493
+ * `<input>` means the space never reaches the message being written.
15494
+ *
15495
+ * Unmounting releases too, for the same reason `blur` does: the callback that
15496
+ * stops transmitting has to run even when the component holding it goes away
15497
+ * mid-press.
15498
+ *
15499
+ * The callbacks are read through a ref that a commit-time effect refreshes, so
15500
+ * passing inline arrows neither tears the listeners down on every render nor
15501
+ * writes to the ref during one — a render React discards would leave the ref
15502
+ * pointing at callbacks that never became the UI.
15503
+ *
15504
+ * @param options - See {@link UsePushToTalkOptions}.
15505
+ *
15506
+ * @example
15507
+ * usePushToTalk({
15508
+ * code: "Space",
15509
+ * onDown: () => setMicEnabled(true),
15510
+ * onUp: () => setMicEnabled(false),
15511
+ * });
15512
+ */
15513
+ export declare function usePushToTalk({ code, onDown, onUp, enabled, }: UsePushToTalkOptions): void;
15514
+
15515
+ /** Options for {@link usePushToTalk}. */
15516
+ export declare interface UsePushToTalkOptions {
15517
+ /** `KeyboardEvent.code` to hold. Default {@link DEFAULT_PUSH_TO_TALK_KEY}. */
15518
+ code?: string;
15519
+ /** Called once when the key goes down. */
15520
+ onDown: () => void;
15521
+ /** Called when the key comes up, the window blurs, or the hook unmounts. */
15522
+ onUp: () => void;
15523
+ /**
15524
+ * Whether the binding is live. Default `true`.
15525
+ *
15526
+ * Turning it off releases first, so flipping a call from push-to-talk to an
15527
+ * open microphone while the key is held does not leave `onUp` unfired.
15528
+ */
15529
+ enabled?: boolean;
15530
+ }
15531
+
14349
15532
  /**
14350
15533
  * FIFO queue with an optional `limit`. When more items are added than `limit`
14351
15534
  * allows, the surplus is kept in an internal overflow buffer and surfaces into
@@ -15105,11 +16288,13 @@ export { useWatch }
15105
16288
  * for the host component and tears it down on unmount.
15106
16289
  *
15107
16290
  * Every callback is read through a ref, so `onOpen` / `onMessage` / `onClose` /
15108
- * `onError` always run the latest closure an inline arrow function is fine
15109
- * and never reopens the socket. Connection-shaping options (`protocols`,
15110
- * `maxRetries`, `initialBackoff`, `maxBackoff`, `pingInterval`,
15111
- * `queueWhileClosed`) are baked into the connection, so changing one reopens
15112
- * it with the new value rather than being silently ignored.
16291
+ * `onError` / `onReconnecting` / `onReconnected` / `onLost` always run the
16292
+ * latest closure — an inline arrow function is fine and never reopens the
16293
+ * socket. Connection-shaping options (`protocols`, `maxRetries`,
16294
+ * `initialBackoff`, `maxBackoff`, `jitter`, `handshakeTimeout`,
16295
+ * `silenceTimeout`, `waitForOnline`, `pingInterval`, `queueWhileClosed`) are
16296
+ * baked into the connection, so changing one reopens it with the new value
16297
+ * rather than being silently ignored.
15113
16298
  *
15114
16299
  * @param url - Full ws:// or wss:// URL.
15115
16300
  * @param options - Connection configuration and callbacks.
@@ -15138,6 +16323,13 @@ export declare interface UseWebSocketResult<T> {
15138
16323
  send: (payload: string | Blob | BufferSource) => boolean;
15139
16324
  /** Force a reconnect, resetting the retry counter. */
15140
16325
  reconnect: () => void;
16326
+ /**
16327
+ * Change the silence watchdog at runtime, in ms. `0` disables it.
16328
+ *
16329
+ * For a server that announces its own heartbeat interval in the first frame,
16330
+ * so the tolerated silence is not hard-coded on both ends.
16331
+ */
16332
+ setSilenceTimeout: (ms: number) => void;
15141
16333
  }
15142
16334
 
15143
16335
  /**
@@ -15690,6 +16882,98 @@ export declare interface VisuallyHiddenProps extends HTMLAttributes<HTMLElement>
15690
16882
  as?: keyof JSX.IntrinsicElements;
15691
16883
  }
15692
16884
 
16885
+ /** A running voice-activity monitor. */
16886
+ export declare interface VoiceActivityMonitor {
16887
+ /** Whether the track is currently carrying speech. */
16888
+ readonly speaking: boolean;
16889
+ /** Stop sampling and release the analysis graph. */
16890
+ stop: () => void;
16891
+ }
16892
+
16893
+ /** Options for {@link monitorVoiceActivity}. */
16894
+ export declare interface VoiceActivityOptions {
16895
+ /** RMS at or above which a window counts as speech. Default `0.045`. */
16896
+ threshold?: number;
16897
+ /** How long the state stays `true` after the level drops. Default `350`. */
16898
+ releaseMs?: number;
16899
+ /** How often the level is sampled, in ms. Default `100`. */
16900
+ pollMs?: number;
16901
+ /**
16902
+ * Reuse an existing `AudioContext` instead of creating one.
16903
+ *
16904
+ * A monitor per remote participant hits the browser's cap on live contexts
16905
+ * (Chrome allows around six) in a five-person call. Open one and share it.
16906
+ */
16907
+ context?: AudioContext;
16908
+ }
16909
+
16910
+ /** A running voice chain. */
16911
+ export declare interface VoiceChain {
16912
+ /** The processed track to publish. */
16913
+ track: MediaStreamTrack;
16914
+ /** Stop the detectors, disconnect the graph, and release the track. */
16915
+ release: () => void;
16916
+ /**
16917
+ * Whether a graph was actually built.
16918
+ *
16919
+ * `false` when this engine has no Web Audio, and also when the settings asked
16920
+ * for nothing — in both cases `track` is `source`, untouched.
16921
+ */
16922
+ readonly supported: boolean;
16923
+ }
16924
+
16925
+ /** Options for {@link createVoiceChain}. */
16926
+ export declare interface VoiceChainOptions {
16927
+ /** Output multiplier, applied after every stage and before the limiter. Default `1`. */
16928
+ gain?: number;
16929
+ /**
16930
+ * Reuse an existing `AudioContext` instead of creating one.
16931
+ *
16932
+ * Browsers cap live contexts (Chrome allows around six), so a page that already
16933
+ * has one — a level meter, an audio bus — should hand it over.
16934
+ */
16935
+ context?: AudioContext;
16936
+ /**
16937
+ * Whether `release()` also stops `source`. Default `true`.
16938
+ *
16939
+ * Pass `false` when the track belongs to somebody else: a settings dialog
16940
+ * building a second chain over its live preview would otherwise kill the meter
16941
+ * the person is watching while they listen.
16942
+ */
16943
+ ownsSource?: boolean;
16944
+ }
16945
+
16946
+ /** Which stages a voice chain builds. */
16947
+ export declare interface VoiceChainSettings {
16948
+ /** Cut everything below speech: fans, traffic rumble, desk knocks, plosives. */
16949
+ highPass: boolean;
16950
+ /** Silence the line when nobody is talking. */
16951
+ gate: boolean;
16952
+ /** RMS below which the gate closes, 0..1. See {@link suggestGateThreshold}. */
16953
+ gateThreshold: number;
16954
+ /** Even out the distance between a whisper and a shout. */
16955
+ compressor: boolean;
16956
+ /** Lift the consonant band so speech reads without getting louder. */
16957
+ presence: boolean;
16958
+ /** Roll off hiss above what speech uses. */
16959
+ hissCut: boolean;
16960
+ /** Ride down harsh S and CH sounds. */
16961
+ deEsser: boolean;
16962
+ /**
16963
+ * Hard ceiling before the signal leaves.
16964
+ *
16965
+ * On by default and worth leaving on: the leveller is 3:1, which controls the
16966
+ * average and lets a peak through, and `gain` can reach well above 1.
16967
+ */
16968
+ limiter: boolean;
16969
+ }
16970
+
16971
+ /** A running monitor. */
16972
+ export declare interface VoiceMonitor {
16973
+ /** Stop listening and release the graph. Does **not** stop the source track. */
16974
+ stop: () => void;
16975
+ }
16976
+
15693
16977
  /**
15694
16978
  * Pluggable persistence for the pull watermark (the "changed since" cursor).
15695
16979
  * Pass an object with a `storageKey` to use a `localStorage`-backed default.
@@ -15797,10 +17081,38 @@ export declare interface WebSocketController {
15797
17081
  close: (code?: number, reason?: string) => void;
15798
17082
  /** Force an immediate reconnect, resetting the retry counter. */
15799
17083
  reconnect: () => void;
17084
+ /**
17085
+ * Change the silence watchdog at runtime, in ms. `0` disables it.
17086
+ *
17087
+ * For the common case where the server announces its heartbeat interval in
17088
+ * the first frame, so the tolerated silence is not hard-coded on both ends:
17089
+ *
17090
+ * ```ts
17091
+ * onMessage: ({ data }) => {
17092
+ * if (data.type === "welcome") socket.setSilenceTimeout(data.heartbeat_seconds * 2500);
17093
+ * }
17094
+ * ```
17095
+ */
17096
+ setSilenceTimeout: (ms: number) => void;
17097
+ /**
17098
+ * Resolves on the first successful open, rejects when the socket is lost
17099
+ * before ever opening.
17100
+ *
17101
+ * Joining and dropping are different events: a call that never connected has
17102
+ * to be reported, while one that dropped mid-session should reconnect
17103
+ * quietly. Await this for the join, handle
17104
+ * {@link CreateWebSocketOptions.onLost} for the drop. Pair it with
17105
+ * `maxRetries: 0` when the first attempt should fail fast instead of
17106
+ * spending the whole schedule on a server that is not there.
17107
+ */
17108
+ opened: Promise<void>;
15800
17109
  /** Current connection status. */
15801
17110
  readonly status: WebSocketStatus;
15802
17111
  }
15803
17112
 
17113
+ /** Why a socket stopped trying to come back. */
17114
+ export declare type WebSocketLostReason = "rejected" | "exhausted";
17115
+
15804
17116
  export declare interface WebSocketMessage<T> {
15805
17117
  /** Parsed payload — JSON-decoded when possible, raw string otherwise. */
15806
17118
  data: T;
@@ -15808,12 +17120,6 @@ export declare interface WebSocketMessage<T> {
15808
17120
  raw: MessageEvent;
15809
17121
  }
15810
17122
 
15811
- /**
15812
- * @tempest-limits file-lines, function-lines — reconnect with backoff, heartbeat,
15813
- * the send queue that survives a disconnect and the listener set that must be re-
15814
- * attached to each new socket — one connection's lifetime, one closure. The queue
15815
- * and the reconnect timer are the same decision seen twice.
15816
- */
15817
17123
  export declare type WebSocketStatus = "idle" | "connecting" | "open" | "closing" | "closed" | "error";
15818
17124
 
15819
17125
  export declare type WeekStart = 0 | 1;