@apple-pie/slice 0.1.29 → 0.1.31

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 (312) hide show
  1. package/README.md +174 -4
  2. package/dist/cjs/chunks/{AudioBubble-DisHuKIC.js → AudioBubble-k7qS53g6.js} +3 -5
  3. package/dist/cjs/chunks/Avatar-hP8GuwvD.js +82 -0
  4. package/dist/cjs/chunks/{AvatarGroup-DYN73N5x.js → AvatarGroup-DMy34q7_.js} +1 -3
  5. package/dist/cjs/chunks/Badge-D2TbyfJS.js +22 -0
  6. package/dist/cjs/chunks/{Button-B1qbfQgN.js → Button-CTsHZBEB.js} +1 -3
  7. package/dist/cjs/chunks/{ButtonBar-zpC3sClM.js → ButtonBar-BRb1PTmw.js} +1 -3
  8. package/dist/cjs/chunks/{Camera-CCzynmXT.js → Camera-CKv087kr.js} +3 -5
  9. package/dist/cjs/chunks/CheckBox-VRIL1FHh.js +51 -0
  10. package/dist/cjs/chunks/Chip-Dr3vKvRY.js +77 -0
  11. package/dist/cjs/chunks/{DivInput-932r3bvF.js → DivInput-Ci0gaCWL.js} +1 -3
  12. package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-C0MvSJOl.js} +1 -3
  13. package/dist/cjs/chunks/{DrggablePanel-u8C-Y4dA.js → DrggablePanel-DflouLUs.js} +3 -5
  14. package/dist/cjs/chunks/DropDown-BS1H62yj.js +104 -0
  15. package/dist/cjs/chunks/ErrorSummary-B3tof7ir.js +85 -0
  16. package/dist/cjs/chunks/{FileIcon-Dxn9OL10.js → FileIcon-Te8MaqTs.js} +2 -2
  17. package/dist/cjs/chunks/FileList-CDcfKIV6.js +222 -0
  18. package/dist/cjs/chunks/{FlexDiv-D4aSJC_G.js → FlexDiv-wO8IY0Zf.js} +2 -3
  19. package/dist/cjs/chunks/Grouper-DyGkzdvz.js +61 -0
  20. package/dist/cjs/chunks/{Icon-BFiN8Wzm.js → Icon-BFZ_5Qv3.js} +4 -7
  21. package/dist/cjs/chunks/IconButton-CgsuJIuF.js +82 -0
  22. package/dist/cjs/chunks/{IndexedDB-BaVmQgkK.js → IndexedDB-Dgwal8na.js} +1 -1
  23. package/dist/cjs/chunks/Label-BuyhcJbF.js +102 -0
  24. package/dist/cjs/chunks/Modal-ByRyv3wy.js +101 -0
  25. package/dist/cjs/chunks/ModalController-xjflFsjF.js +68 -0
  26. package/dist/cjs/chunks/Overlay-FooE9M_s.js +41 -0
  27. package/dist/cjs/chunks/Pager-B-cuwffo.js +36 -0
  28. package/dist/cjs/chunks/ProgressIndicator-ByZ_aYAZ.js +138 -0
  29. package/dist/cjs/chunks/{PromptInput-C8-V67sS.js → PromptInput--grtHPvy.js} +2 -4
  30. package/dist/cjs/chunks/RadioButton-DP2X1dA_.js +55 -0
  31. package/dist/cjs/chunks/{RadioButtonList-DvJV6Qdg.js → RadioButtonList-COGNW5y3.js} +1 -2
  32. package/dist/cjs/chunks/{Slider-D8OYGFsN.js → Slider-G1a8UKef.js} +2 -6
  33. package/dist/cjs/chunks/{Spacer-CyZAUR5N.js → Spacer-CsRCleXv.js} +1 -1
  34. package/dist/cjs/chunks/{Switch-Crm-nHYI.js → Switch-OBVHKn_D.js} +1 -2
  35. package/dist/cjs/chunks/{TabBar-VzxuAesC.js → TabBar-C1HkBaxE.js} +2 -4
  36. package/dist/cjs/chunks/TextArea-BEmNI_HZ.js +74 -0
  37. package/dist/cjs/chunks/{TextField-BpoLF6pZ.js → TextField-D9_COA9H.js} +3 -5
  38. package/dist/cjs/chunks/Tip-2W0u_oQN.js +88 -0
  39. package/dist/cjs/chunks/Toast-B9jX6ioq.js +177 -0
  40. package/dist/cjs/chunks/ToggleButton-C_Gu5dYR.js +39 -0
  41. package/dist/cjs/chunks/UploadArea-ENFAf4tE.js +127 -0
  42. package/dist/cjs/chunks/{WSConnection-DrOC8Z0R.js → WSConnection-CZ22tcLz.js} +1 -1
  43. package/dist/cjs/chunks/{localDBStore-zyDhaEiP.js → localDBStore-Ca73jeFf.js} +1 -1
  44. package/dist/cjs/chunks/{microphoneStore-D1fV_8QQ.js → microphoneStore-lxYIvhN8.js} +1 -1
  45. package/dist/cjs/chunks/{misc-CTl4GDxI.js → misc-DZAbObFp.js} +16 -19
  46. package/dist/cjs/chunks/modalStore-D4bOjuWd.js +70 -0
  47. package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Bq7sVvyA.js} +2 -2
  48. package/dist/cjs/chunks/{uploads-worker-mD8pcsGP.js → uploads-worker-CD-annza.js} +2 -2
  49. package/dist/cjs/chunks/{uploadsStore-CxWIctvI.js → uploadsStore-CUeB10zx.js} +2 -2
  50. package/dist/cjs/chunks/{volumeStore-oYwlRVN0.js → volumeStore-roYTyKJ2.js} +3 -3
  51. package/dist/cjs/chunks/{windowStore-CCxCOUqa.js → windowStore-BdJv-RF0.js} +1 -1
  52. package/dist/cjs/components/AudioBubble/index.js +7 -7
  53. package/dist/cjs/components/Avatar/index.js +3 -4
  54. package/dist/cjs/components/AvatarGroup/index.js +4 -4
  55. package/dist/cjs/components/Badge/index.js +3 -3
  56. package/dist/cjs/components/Button/index.js +7 -8
  57. package/dist/cjs/components/ButtonBar/index.js +7 -7
  58. package/dist/cjs/components/Camera/index.js +8 -8
  59. package/dist/cjs/components/CheckBox/index.js +7 -7
  60. package/dist/cjs/components/Chip/index.js +7 -8
  61. package/dist/cjs/components/DivInput/index.js +3 -4
  62. package/dist/cjs/components/Dot/index.js +3 -3
  63. package/dist/cjs/components/DraggablePanel/index.js +6 -6
  64. package/dist/cjs/components/DropDown/index.js +7 -7
  65. package/dist/cjs/components/ErrorSummary/index.js +6 -7
  66. package/dist/cjs/components/FileIcon/index.js +6 -7
  67. package/dist/cjs/components/FileList/index.js +7 -7
  68. package/dist/cjs/components/FlexDiv/index.js +3 -4
  69. package/dist/cjs/components/Grouper/index.js +7 -8
  70. package/dist/cjs/components/Icon/index.js +6 -7
  71. package/dist/cjs/components/IconButton/index.js +6 -7
  72. package/dist/cjs/components/Label/index.js +3 -4
  73. package/dist/cjs/components/Modal/index.js +13 -0
  74. package/dist/cjs/components/ModalController/index.js +7 -0
  75. package/dist/cjs/components/Overlay/index.js +3 -3
  76. package/dist/cjs/components/Pager/index.js +3 -4
  77. package/dist/cjs/components/Progress/index.js +5 -6
  78. package/dist/cjs/components/PromptInput/index.js +9 -10
  79. package/dist/cjs/components/RadioButton/index.js +7 -7
  80. package/dist/cjs/components/RadioButtonList/index.js +8 -8
  81. package/dist/cjs/components/Slider/index.js +4 -5
  82. package/dist/cjs/components/Spacer/index.js +2 -2
  83. package/dist/cjs/components/Switch/index.js +3 -3
  84. package/dist/cjs/components/TabBar/index.js +9 -9
  85. package/dist/cjs/components/TextArea/index.js +8 -8
  86. package/dist/cjs/components/Textfield/index.js +9 -9
  87. package/dist/cjs/components/Tip/index.js +3 -4
  88. package/dist/cjs/components/Toast/index.js +6 -6
  89. package/dist/cjs/components/ToggleButton/index.js +8 -8
  90. package/dist/cjs/components/UploadArea/index.js +7 -7
  91. package/dist/cjs/hooks/useAudioRecorder.js +4 -5
  92. package/dist/cjs/hooks/useLocalStore.js +3 -9
  93. package/dist/cjs/hooks/useMdStreamBuffer.js +2 -2
  94. package/dist/cjs/hooks/useMicrophone.js +7 -11
  95. package/dist/cjs/hooks/useObserveTheme.js +3 -3
  96. package/dist/cjs/hooks/useTheme.js +2 -3
  97. package/dist/cjs/hooks/useTrackRenders.js +2 -2
  98. package/dist/cjs/hooks.js +3 -3
  99. package/dist/cjs/index.js +9 -7
  100. package/dist/cjs/providers/ThemeProvider.js +1 -13
  101. package/dist/cjs/providers.js +4 -5
  102. package/dist/cjs/stores/LocalDB.js +3 -3
  103. package/dist/cjs/stores/SSE.js +2 -2
  104. package/dist/cjs/stores/WS.js +2 -2
  105. package/dist/cjs/stores/microphone.js +2 -2
  106. package/dist/cjs/stores/modal.js +7 -0
  107. package/dist/cjs/stores/tip.js +1 -1
  108. package/dist/cjs/stores/toast.js +1 -1
  109. package/dist/cjs/stores/uploads.js +2 -2
  110. package/dist/cjs/stores/volume.js +2 -2
  111. package/dist/cjs/stores/window.js +2 -2
  112. package/dist/cjs/stores.js +18 -15
  113. package/dist/cjs/theme/colors.js +1 -1
  114. package/dist/cjs/theme/type.js +1 -1
  115. package/dist/cjs/utils/index.js +2 -2
  116. package/dist/cjs/utils/objects/index.js +2 -2
  117. package/dist/cjs/workers/uploads/uploads.js +2 -2
  118. package/dist/esm/chunks/{AudioBubble-D052QyPH.mjs → AudioBubble-DfrxyTX_.mjs} +3 -7
  119. package/dist/esm/chunks/Avatar-pA41Pcyl.mjs +88 -0
  120. package/dist/esm/chunks/{AvatarGroup-CBGi99eo.mjs → AvatarGroup-CZBtWjnj.mjs} +2 -6
  121. package/dist/esm/chunks/Badge-pLwG0zm7.mjs +26 -0
  122. package/dist/esm/chunks/{Button-CYFpitCp.mjs → Button-BJoMLZIs.mjs} +6 -10
  123. package/dist/esm/chunks/{ButtonBar-ieMA0SHi.mjs → ButtonBar-BO2RUJ8R.mjs} +3 -7
  124. package/dist/esm/chunks/{Camera-jn9CcaD0.mjs → Camera-4MNA52HG.mjs} +5 -9
  125. package/dist/esm/chunks/CheckBox-7KAsvZld.mjs +61 -0
  126. package/dist/esm/chunks/Chip-BuGvCLLU.mjs +87 -0
  127. package/dist/esm/chunks/{DivInput-BVhcU0y0.mjs → DivInput-D0YzSWjJ.mjs} +2 -6
  128. package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-h26m47Z-.mjs} +1 -5
  129. package/dist/esm/chunks/{DrggablePanel-G5HHlntD.mjs → DrggablePanel-Bh6HLPMX.mjs} +2 -6
  130. package/dist/esm/chunks/DropDown-NgMYjjXn.mjs +112 -0
  131. package/dist/esm/chunks/ErrorSummary-nNm9qymE.mjs +90 -0
  132. package/dist/esm/chunks/{FileIcon-fJV_Cl6v.mjs → FileIcon-BqyV1wut.mjs} +2 -2
  133. package/dist/esm/chunks/FileList-C1tOvoc0.mjs +230 -0
  134. package/dist/esm/chunks/{FlexDiv-DnY1_qk4.mjs → FlexDiv-CkK-DAyg.mjs} +3 -6
  135. package/dist/esm/chunks/Grouper-CyrOkuu2.mjs +73 -0
  136. package/dist/esm/chunks/{Icon-BOJAk-hM.mjs → Icon-DjW0Krm8.mjs} +3 -8
  137. package/dist/esm/chunks/IconButton-DdLhTUl0.mjs +96 -0
  138. package/dist/esm/chunks/{IndexedDB-Dk7a4fPS.mjs → IndexedDB-DVoDikoA.mjs} +1 -1
  139. package/dist/esm/chunks/Label-DhmJ_Sln.mjs +113 -0
  140. package/dist/esm/chunks/Modal-FztrJsQo.mjs +113 -0
  141. package/dist/esm/chunks/ModalController-C1BnM5Dz.mjs +76 -0
  142. package/dist/esm/chunks/Overlay-Dsy55Bxm.mjs +47 -0
  143. package/dist/esm/chunks/Pager-BqSdwL0L.mjs +42 -0
  144. package/dist/esm/chunks/ProgressIndicator-BnqZFATV.mjs +146 -0
  145. package/dist/esm/chunks/{PromptInput-COJnOFZf.mjs → PromptInput-CRkcPXJu.mjs} +3 -7
  146. package/dist/esm/chunks/RadioButton-DXq3yniV.mjs +63 -0
  147. package/dist/esm/chunks/{RadioButtonList-XqlqadYn.mjs → RadioButtonList-BgOskHCP.mjs} +3 -6
  148. package/dist/esm/chunks/{Slider-CU0Zdlpu.mjs → Slider-DPOy9uNI.mjs} +4 -10
  149. package/dist/esm/chunks/{Spacer-C5651N0N.mjs → Spacer-BJd_D0Fn.mjs} +1 -1
  150. package/dist/esm/chunks/{Switch-RfA431T4.mjs → Switch-DHqlyizo.mjs} +1 -4
  151. package/dist/esm/chunks/{TabBar-v8Dp4dr-.mjs → TabBar-RBXExqMK.mjs} +5 -9
  152. package/dist/esm/chunks/TextArea-CIlx_P26.mjs +80 -0
  153. package/dist/esm/chunks/{TextField-j4q0RUzH.mjs → TextField-CX72ybwH.mjs} +5 -9
  154. package/dist/esm/chunks/Tip-COBSyEjm.mjs +96 -0
  155. package/dist/esm/chunks/Toast-BTm3HxDD.mjs +189 -0
  156. package/dist/esm/chunks/ToggleButton-DujsCKF3.mjs +47 -0
  157. package/dist/esm/chunks/UploadArea-D--Nt8Ed.mjs +135 -0
  158. package/dist/esm/chunks/{WSConnection-DV7k84B4.mjs → WSConnection-BMXcuW3f.mjs} +1 -1
  159. package/dist/esm/chunks/{localDBStore-Dnpo5nSv.mjs → localDBStore-36E3160Z.mjs} +2 -2
  160. package/dist/esm/chunks/{microphoneStore-Dr3lxoWX.mjs → microphoneStore-Cexu82zH.mjs} +1 -1
  161. package/dist/esm/chunks/{misc-Bjbro8Xe.mjs → misc-CTGTuM2J.mjs} +16 -19
  162. package/dist/esm/chunks/modalStore-Crg_QmSJ.mjs +68 -0
  163. package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-Dow4NXkZ.mjs} +2 -2
  164. package/dist/esm/chunks/{uploads-worker-7X9EwX9N.mjs → uploads-worker-Dhyp4ot3.mjs} +2 -2
  165. package/dist/esm/chunks/{uploadsStore-B7VECR5Q.mjs → uploadsStore-DT4lFybE.mjs} +1 -1
  166. package/dist/esm/chunks/{volumeStore-GZnCDBMU.mjs → volumeStore-RAxdmQ60.mjs} +3 -3
  167. package/dist/esm/chunks/{windowStore-CAzx2-QV.mjs → windowStore-C4AZexIa.mjs} +1 -1
  168. package/dist/esm/components/AudioBubble/index.mjs +4 -6
  169. package/dist/esm/components/Avatar/index.mjs +3 -5
  170. package/dist/esm/components/AvatarGroup/index.mjs +4 -6
  171. package/dist/esm/components/Badge/index.mjs +2 -4
  172. package/dist/esm/components/Button/index.mjs +8 -10
  173. package/dist/esm/components/ButtonBar/index.mjs +4 -6
  174. package/dist/esm/components/Camera/index.mjs +6 -8
  175. package/dist/esm/components/CheckBox/index.mjs +4 -6
  176. package/dist/esm/components/Chip/index.mjs +5 -7
  177. package/dist/esm/components/DivInput/index.mjs +3 -5
  178. package/dist/esm/components/Dot/index.mjs +2 -4
  179. package/dist/esm/components/DraggablePanel/index.mjs +3 -5
  180. package/dist/esm/components/DropDown/index.mjs +4 -6
  181. package/dist/esm/components/ErrorSummary/index.mjs +3 -5
  182. package/dist/esm/components/FileIcon/index.mjs +3 -5
  183. package/dist/esm/components/FileList/index.mjs +6 -8
  184. package/dist/esm/components/FlexDiv/index.mjs +2 -4
  185. package/dist/esm/components/Grouper/index.mjs +5 -7
  186. package/dist/esm/components/Icon/index.mjs +4 -6
  187. package/dist/esm/components/IconButton/index.mjs +7 -9
  188. package/dist/esm/components/Label/index.mjs +3 -5
  189. package/dist/esm/components/Modal/index.mjs +45 -0
  190. package/dist/esm/components/ModalController/index.mjs +15 -0
  191. package/dist/esm/components/Overlay/index.mjs +2 -4
  192. package/dist/esm/components/Pager/index.mjs +3 -5
  193. package/dist/esm/components/Progress/index.mjs +4 -6
  194. package/dist/esm/components/PromptInput/index.mjs +11 -13
  195. package/dist/esm/components/RadioButton/index.mjs +4 -6
  196. package/dist/esm/components/RadioButtonList/index.mjs +5 -7
  197. package/dist/esm/components/Slider/index.mjs +4 -6
  198. package/dist/esm/components/Spacer/index.mjs +2 -2
  199. package/dist/esm/components/Switch/index.mjs +2 -4
  200. package/dist/esm/components/TabBar/index.mjs +8 -10
  201. package/dist/esm/components/TextArea/index.mjs +9 -11
  202. package/dist/esm/components/Textfield/index.mjs +10 -12
  203. package/dist/esm/components/Tip/index.mjs +3 -5
  204. package/dist/esm/components/Toast/index.mjs +6 -6
  205. package/dist/esm/components/ToggleButton/index.mjs +9 -11
  206. package/dist/esm/components/UploadArea/index.mjs +9 -11
  207. package/dist/esm/hooks/useAudioRecorder.mjs +4 -5
  208. package/dist/esm/hooks/useLocalStore.mjs +3 -9
  209. package/dist/esm/hooks/useMdStreamBuffer.mjs +2 -2
  210. package/dist/esm/hooks/useMicrophone.mjs +7 -11
  211. package/dist/esm/hooks/useObserveTheme.mjs +0 -2
  212. package/dist/esm/hooks/useTheme.mjs +0 -2
  213. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  214. package/dist/esm/hooks.mjs +2 -4
  215. package/dist/esm/index.mjs +53 -47
  216. package/dist/esm/providers/ThemeProvider.mjs +0 -14
  217. package/dist/esm/providers.mjs +0 -2
  218. package/dist/esm/stores/LocalDB.mjs +3 -3
  219. package/dist/esm/stores/SSE.mjs +3 -3
  220. package/dist/esm/stores/WS.mjs +2 -2
  221. package/dist/esm/stores/microphone.mjs +2 -2
  222. package/dist/esm/stores/modal.mjs +3 -0
  223. package/dist/esm/stores/tip.mjs +1 -1
  224. package/dist/esm/stores/toast.mjs +1 -1
  225. package/dist/esm/stores/uploads.mjs +3 -3
  226. package/dist/esm/stores/volume.mjs +2 -2
  227. package/dist/esm/stores/window.mjs +2 -2
  228. package/dist/esm/stores.mjs +14 -12
  229. package/dist/esm/theme/colors.mjs +1 -1
  230. package/dist/esm/theme/type.mjs +1 -1
  231. package/dist/esm/utils/index.mjs +9 -9
  232. package/dist/esm/utils/objects/index.mjs +6 -6
  233. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  234. package/dist/styles.css +8436 -0
  235. package/dist/types/components/Modal/Modal.d.ts +3 -0
  236. package/dist/types/components/Modal/_types.d.ts +46 -0
  237. package/dist/types/components/Modal/index.d.ts +2 -0
  238. package/dist/types/components/ModalController/ModalController.d.ts +2 -0
  239. package/dist/types/components/ModalController/_types.d.ts +13 -0
  240. package/dist/types/components/ModalController/index.d.ts +2 -0
  241. package/dist/types/components/Overlay/_types.d.ts +4 -0
  242. package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  243. package/dist/types/components/Progress/ProgressIndicator/_types.d.ts +2 -1
  244. package/dist/types/components/Toast/_types.d.ts +2 -0
  245. package/dist/types/index.d.ts +5 -0
  246. package/dist/types/providers/ThemeProvider.d.ts +0 -6
  247. package/dist/types/stores/index.d.ts +1 -0
  248. package/dist/types/stores/modal/_types.d.ts +27 -0
  249. package/dist/types/stores/modal/index.d.ts +2 -0
  250. package/dist/types/stores/modal/modalStore.d.ts +20 -0
  251. package/dist/types/stores/toast/_types.d.ts +3 -1
  252. package/package.json +8 -3
  253. package/dist/cjs/chunks/Avatar-vIquH-Uk.js +0 -84
  254. package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
  255. package/dist/cjs/chunks/CheckBox-DNctUlTA.js +0 -53
  256. package/dist/cjs/chunks/Chip-BN4qBz6w.js +0 -79
  257. package/dist/cjs/chunks/DropDown-BZbrZOkx.js +0 -105
  258. package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
  259. package/dist/cjs/chunks/FileList-D5_igVaC.js +0 -225
  260. package/dist/cjs/chunks/Grouper-D6rSl9nK.js +0 -63
  261. package/dist/cjs/chunks/IconButton-Cv-po19M.js +0 -84
  262. package/dist/cjs/chunks/Label-BQ6flU4-.js +0 -103
  263. package/dist/cjs/chunks/Overlay-DDOvMM6L.js +0 -37
  264. package/dist/cjs/chunks/Pager-GH2y7l5h.js +0 -38
  265. package/dist/cjs/chunks/ProgressIndicator-7pLk4Dvn.js +0 -138
  266. package/dist/cjs/chunks/RadioButton-3CzhKBn6.js +0 -56
  267. package/dist/cjs/chunks/TextArea-CBNHvcK3.js +0 -76
  268. package/dist/cjs/chunks/Tip-CUKFhP9K.js +0 -90
  269. package/dist/cjs/chunks/Toast-CKqGjsEk.js +0 -169
  270. package/dist/cjs/chunks/ToggleButton-BdCsChJM.js +0 -40
  271. package/dist/cjs/chunks/UploadArea-M9oc-No2.js +0 -129
  272. package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
  273. package/dist/esm/chunks/Avatar-Ds6MWC2c.mjs +0 -92
  274. package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
  275. package/dist/esm/chunks/CheckBox-CoOmnGWD.mjs +0 -65
  276. package/dist/esm/chunks/Chip-ClG6cUX0.mjs +0 -91
  277. package/dist/esm/chunks/DropDown-AuQW_DWv.mjs +0 -115
  278. package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
  279. package/dist/esm/chunks/FileList-CxHaEEUi.mjs +0 -235
  280. package/dist/esm/chunks/Grouper-CyWZ8tfm.mjs +0 -77
  281. package/dist/esm/chunks/IconButton-Ck0IMn4i.mjs +0 -100
  282. package/dist/esm/chunks/Label-DSfCcKtQ.mjs +0 -116
  283. package/dist/esm/chunks/Overlay-DiSvgIQP.mjs +0 -45
  284. package/dist/esm/chunks/Pager-ByJ2Cr0n.mjs +0 -46
  285. package/dist/esm/chunks/ProgressIndicator-d2JGUDW_.mjs +0 -148
  286. package/dist/esm/chunks/RadioButton-BB73OY2a.mjs +0 -66
  287. package/dist/esm/chunks/TextArea-DGF43RON.mjs +0 -84
  288. package/dist/esm/chunks/Tip-Bj9d-230.mjs +0 -100
  289. package/dist/esm/chunks/Toast-CoioLlEG.mjs +0 -181
  290. package/dist/esm/chunks/ToggleButton-CwTm8Yx0.mjs +0 -51
  291. package/dist/esm/chunks/UploadArea-DAwoJxtr.mjs +0 -139
  292. package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
  293. /package/dist/cjs/chunks/{MdStreamBuffer-CvLO7CVi.js → MdStreamBuffer-CbG_VeRI.js} +0 -0
  294. /package/dist/cjs/chunks/{SSEConnection-C-1OzEOp.js → SSEConnection-ACoOeeTO.js} +0 -0
  295. /package/dist/cjs/chunks/{_types-Bdqd2vHh.js → _types-k-3V1fz_.js} +0 -0
  296. /package/dist/cjs/chunks/{audioVisualizer-EIfIjWH7.js → audioVisualizer-MOSbvvnZ.js} +0 -0
  297. /package/dist/cjs/chunks/{colors-njquvHkx.js → colors-B0_3srZN.js} +0 -0
  298. /package/dist/cjs/chunks/{debounce-BF4i6uIC.js → debounce-CaoYvh12.js} +0 -0
  299. /package/dist/cjs/chunks/{sharedTypes-gCECyn2N.js → sharedTypes-CthHPjrO.js} +0 -0
  300. /package/dist/cjs/chunks/{tipStore-Ck4NLvml.js → tipStore-CPB7RHKY.js} +0 -0
  301. /package/dist/cjs/chunks/{toastStore-CSStgB9d.js → toastStore-6eHe6esp.js} +0 -0
  302. /package/dist/cjs/chunks/{tslib.es6-C8dZW5nY.js → tslib.es6-CzpRaW14.js} +0 -0
  303. /package/dist/esm/chunks/{MdStreamBuffer-By7pHJQL.mjs → MdStreamBuffer-4AJH8WaN.mjs} +0 -0
  304. /package/dist/esm/chunks/{SSEConnection-DcA3wFsO.mjs → SSEConnection-qNnkZUOe.mjs} +0 -0
  305. /package/dist/esm/chunks/{_types-BVrr_Khp.mjs → _types-CEStVWlB.mjs} +0 -0
  306. /package/dist/esm/chunks/{audioVisualizer-ZgT77nUw.mjs → audioVisualizer-BUNbarKP.mjs} +0 -0
  307. /package/dist/esm/chunks/{colors-FQ0uNQcW.mjs → colors-D-qeA9gU.mjs} +0 -0
  308. /package/dist/esm/chunks/{debounce-Bst1jxMS.mjs → debounce-D5b6tZ5a.mjs} +0 -0
  309. /package/dist/esm/chunks/{sharedTypes-tn9-uJvb.mjs → sharedTypes-U5H1I85x.mjs} +0 -0
  310. /package/dist/esm/chunks/{tipStore-CL5a95Bl.mjs → tipStore-pvswaezx.mjs} +0 -0
  311. /package/dist/esm/chunks/{toastStore-D2PEIqCo.mjs → toastStore-80oOTYsj.mjs} +0 -0
  312. /package/dist/esm/chunks/{tslib.es6-C-olHjXV.mjs → tslib.es6-BX2F90pK.mjs} +0 -0
@@ -0,0 +1,189 @@
1
+ 'use client';
2
+ import { a as __rest } from "./tslib.es6-BX2F90pK.mjs";
3
+
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ import { AnimatePresence, motion } from "motion/react";
7
+
8
+ import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
9
+
10
+ import { useTheme } from "../hooks/useTheme.mjs";
11
+
12
+ import "../theme/colors.mjs";
13
+
14
+ import { s as setStyle, f as filterClasses, a as accessibleKeyDown } from "./misc-CTGTuM2J.mjs";
15
+
16
+ import "../hooks/useWindow.mjs";
17
+
18
+ import { I as Icon } from "./Icon-DjW0Krm8.mjs";
19
+
20
+ import { P as ProgressIndicator } from "./ProgressIndicator-BnqZFATV.mjs";
21
+
22
+ var ToastType, css = {
23
+ wrapper: "Toast-module_wrapper__1uj9O flexBox-module_rowBetween__5FEvi",
24
+ close: "Toast-module_close__i10-s flexBox-module_row__z24tF",
25
+ message: "Toast-module_message__3dP0P flexBox-module_rowStart__4tcxS",
26
+ progress: "Toast-module_progress__SWsbA flexBox-module_row__z24tF",
27
+ s: "Toast-module_s__kc5Ef type-module_body-s-regular__vRHSP",
28
+ m: "Toast-module_m__JtmLz type-module_body-m-regular__LuQBA",
29
+ l: "Toast-module_l__-W0PD type-module_body-l-regular__lOYbg"
30
+ };
31
+
32
+ !function(ToastType) {
33
+ ToastType.Success = "success", ToastType.Error = "error", ToastType.Warning = "warning",
34
+ ToastType.Info = "info";
35
+ }(ToastType || (ToastType = {}));
36
+
37
+ const ToastBase = React.forwardRef((props, ref) => {
38
+ const {message: message = null, size: size = "m", border: border = !0, padding: padding, radius: radius = 8, container: container = "window", showDelay: showDelay = 0, duration: duration = 5e3, position: position = "bottom", offset: offset = 24, close: close = !0, progress: progress, type: type = ToastType.Info, didHide: didHide = () => null} = props, divAttributes = __rest(props, [ "message", "size", "border", "padding", "radius", "container", "showDelay", "duration", "position", "offset", "close", "progress", "type", "didHide" ]), theme = useTheme(), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? `${className}` : "", [ready, setReady] = useState(!1), [content, setContent] = useState(null), timer = useRef(null);
39
+ useEffect(() => {
40
+ timer.current && clearTimeout(timer.current);
41
+ return message && message.length > 0 ? timer.current = setTimeout(() => {
42
+ setContent(message), timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
43
+ setReady(!1);
44
+ }, duration));
45
+ }, showDelay) : setContent(null), () => {
46
+ timer.current && clearTimeout(timer.current);
47
+ };
48
+ }, [ message, showDelay, duration ]), useEffect(() => setReady(null !== content), [ content ]);
49
+ const defaultPadding = useMemo(() => close ? "10px 12px 10px 16px" : "10px 16px", [ close ]), colorScheme = useMemo(() => {
50
+ switch (type) {
51
+ case "success":
52
+ return {
53
+ border: "var(--array-land-label)",
54
+ bg: "var(--array-land)",
55
+ text: "var(--array-land-label)"
56
+ };
57
+
58
+ case "warning":
59
+ return {
60
+ border: "var(--array-orange-label)",
61
+ bg: "var(--array-orange)",
62
+ text: "var(--array-orange-label)"
63
+ };
64
+
65
+ case "error":
66
+ return {
67
+ border: "var(--feedback-warning)",
68
+ bg: "var(--array-magenta)",
69
+ text: "var(--feedback-warning)"
70
+ };
71
+
72
+ default:
73
+ return {
74
+ border: "var(--core-outline-primary)",
75
+ bg: "var(--core-surface-secondary)",
76
+ text: "var(--core-text-primary)"
77
+ };
78
+ }
79
+ }, [ type ]), cssVars = useMemo(() => ({
80
+ "--toast-padding": setStyle(padding, defaultPadding),
81
+ "--toast-background": colorScheme.bg,
82
+ "--toast-color": colorScheme.text,
83
+ "--toast-border": border ? `1px solid ${colorScheme.border}` : "unset",
84
+ "--toast-border-radius": setStyle(radius, 4),
85
+ "--toast-position": "window" === container ? "fixed" : "absolute"
86
+ }), [ padding, border, colorScheme, radius, defaultPadding, container ]), variants = useMemo(() => {
87
+ const positionShow = "bottom" === position ? {
88
+ bottom: offset
89
+ } : {
90
+ top: offset
91
+ }, positionHide = "bottom" === position ? {
92
+ bottom: -offset
93
+ } : {
94
+ top: -offset
95
+ }, transition = {
96
+ ease: "easeInOut",
97
+ duration: .25
98
+ };
99
+ return {
100
+ initial: Object.assign({
101
+ opacity: 0
102
+ }, positionHide),
103
+ animate: Object.assign(Object.assign({
104
+ opacity: 1
105
+ }, positionShow), {
106
+ transition: transition
107
+ }),
108
+ exit: Object.assign(Object.assign({
109
+ opacity: 0
110
+ }, positionHide), {
111
+ transition: transition
112
+ })
113
+ };
114
+ }, [ position, offset ]), classNames = useMemo(() => filterClasses([ css.wrapper, css[size], divClass ]), [ size, divClass ]), handleClose = useCallback(() => {
115
+ setReady(!1);
116
+ }, []), handleMouseOver = useCallback(() => {
117
+ timer.current && clearTimeout(timer.current);
118
+ }, []), handleMouseOut = useCallback(() => {
119
+ timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
120
+ setContent(null);
121
+ }, duration));
122
+ }, [ duration ]), showProgress = useMemo(() => void 0 !== progress ? progress : "Infinite" === duration, [ progress, duration ]), iconColor = useMemo(() => {
123
+ switch (type) {
124
+ case ToastType.Error:
125
+ return theme.current.colors["feedback-warning"];
126
+
127
+ case ToastType.Success:
128
+ return theme.current.colors["array-land-label"];
129
+
130
+ case ToastType.Warning:
131
+ return theme.current.colors["array-orange-label"];
132
+
133
+ default:
134
+ return theme.current.colors["core-text-primary"];
135
+ }
136
+ }, [ type, theme ]);
137
+ return jsx(AnimatePresence, {
138
+ onExitComplete: () => didHide(),
139
+ initial: !1,
140
+ children: ready && jsxs(motion.div, Object.assign({
141
+ ref: ref,
142
+ id: divId,
143
+ className: classNames
144
+ }, rest, {
145
+ onMouseEnter: handleMouseOver,
146
+ onMouseLeave: handleMouseOut,
147
+ onFocus: handleMouseOver,
148
+ onBlur: handleMouseOut,
149
+ style: Object.assign(Object.assign(Object.assign({}, divStyle), cssVars), {
150
+ visibility: ready ? "visible" : "hidden"
151
+ }),
152
+ variants: variants,
153
+ initial: "initial",
154
+ animate: "animate",
155
+ exit: "exit",
156
+ children: [ jsxs("div", {
157
+ role: "status",
158
+ "aria-live": "polite",
159
+ className: css.message,
160
+ children: [ showProgress && jsx("div", {
161
+ className: css.progress,
162
+ children: jsx(ProgressIndicator, {
163
+ show: !0,
164
+ inline: !0,
165
+ color: iconColor
166
+ })
167
+ }), content ]
168
+ }), ("Infinite" === duration || close) && jsx("div", {
169
+ className: css.close,
170
+ tabIndex: 0,
171
+ role: "button",
172
+ "aria-label": "dismiss message",
173
+ onKeyDown: e => accessibleKeyDown(e, handleClose),
174
+ onClick: handleClose,
175
+ children: jsx(Icon, {
176
+ name: "x",
177
+ size: 20,
178
+ strokeColor: iconColor
179
+ })
180
+ }) ]
181
+ }))
182
+ });
183
+ });
184
+
185
+ ToastBase.displayName = "Toast";
186
+
187
+ const Toast = React.memo(ToastBase);
188
+
189
+ export { Toast as T, ToastType as a };
@@ -0,0 +1,47 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+
3
+ import { useMemo } from "react";
4
+
5
+ import { I as IconButton } from "./IconButton-DdLhTUl0.mjs";
6
+
7
+ import { L as Label } from "./Label-DhmJ_Sln.mjs";
8
+
9
+ var css_toggleButton = "ToggleButton-module_toggleButton__H7KgI flexBox-module_rowStart__4tcxS";
10
+
11
+ function ToggleButton(props) {
12
+ const {label: label, textSize: textSize, icon: icon, selected: selected = !1, iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-surface-primary)", bgColor: bgColor = "var(--core-surface-secondary)", bgColorOn: bgColorOn = "var(--core-text-special)", iconSize: iconSize = 20, buttonSize: buttonSize = "m", tooltip: tooltip, gap: gap = 4, unselect: unselect = !0, fill: fill = !1, disabled: disabled = !1, onChange: onChange, onSelect: onSelect, onToolTip: onToolTip, children: children} = props, handleClick = () => {
13
+ if (!unselect && selected) return;
14
+ const newState = !selected;
15
+ null == onChange || onChange(newState), newState && (null == onSelect || onSelect());
16
+ }, cssVars = useMemo(() => ({
17
+ "--tb-gap": `${gap}px`
18
+ }), [ gap ]);
19
+ return jsxs("div", {
20
+ className: css_toggleButton,
21
+ style: cssVars,
22
+ children: [ icon && jsx(IconButton, {
23
+ icon: icon,
24
+ buttonSize: buttonSize,
25
+ tooltip: tooltip,
26
+ toggle: !selected,
27
+ isToggled: selected,
28
+ bgColorOn: bgColorOn,
29
+ bgColor: bgColor,
30
+ iconColor: iconColor,
31
+ iconColorOn: iconColorOn,
32
+ onClick: handleClick,
33
+ iconSize: iconSize,
34
+ iconFill: fill,
35
+ disabled: disabled,
36
+ onToolTip: onToolTip
37
+ }), (children || label) && jsx(Label, {
38
+ textSize: textSize,
39
+ borderSize: 0,
40
+ padding: 0,
41
+ onClick: handleClick,
42
+ children: null != children ? children : label
43
+ }) ]
44
+ });
45
+ }
46
+
47
+ export { ToggleButton as T };
@@ -0,0 +1,135 @@
1
+ 'use client';
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
+
4
+ import React, { useState, useRef, useId, useCallback, useMemo } from "react";
5
+
6
+ import { s as setStyle, a as accessibleKeyDown } from "./misc-CTGTuM2J.mjs";
7
+
8
+ import { I as Icon } from "./Icon-DjW0Krm8.mjs";
9
+
10
+ import { P as ProgressIndicator } from "./ProgressIndicator-BnqZFATV.mjs";
11
+
12
+ import { F as FileList } from "./FileList-C1tOvoc0.mjs";
13
+
14
+ var css = {
15
+ wrapper: "UploadArea-module_wrapper__aircC flexBox-module_column__ezvMq",
16
+ icon: "UploadArea-module_icon__M7n-m flexBox-module_row__z24tF",
17
+ title: "UploadArea-module_title__VbNGq type-module_body-l-bold__Fh2dt",
18
+ message: "UploadArea-module_message__U1ZVM flexBox-module_row__z24tF",
19
+ files: "UploadArea-module_files__Q796x flexBox-module_column__ezvMq",
20
+ xs: "UploadArea-module_xs__-AoM7 type-module_body-xs-regular__ZAFft",
21
+ s: "UploadArea-module_s__wy1zN type-module_body-s-regular__vRHSP",
22
+ m: "UploadArea-module_m__bKuFN type-module_body-m-regular__LuQBA",
23
+ l: "UploadArea-module_l__KG9YN type-module_body-l-regular__lOYbg"
24
+ };
25
+
26
+ const imageTypes = [ "png", "jpg", "jpeg", "gif", "svg", "heic", "heif" ], videoTypes = [ "mp4", "avi", "mov", "wmv", "flv" ], documentTypes = [ "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx" ], audioTypes = [ "mp3", "wav", "ogg", "aac", "flac" ], textTypes = [ "txt", "rtf", "md", "csv", "json", "xml" ], allTypes = [ ...imageTypes, ...videoTypes, ...documentTypes, ...audioTypes, ...textTypes ];
27
+
28
+ var FileTypes;
29
+
30
+ !function(FileTypes) {
31
+ FileTypes.images = "images", FileTypes.videos = "videos", FileTypes.documents = "documents",
32
+ FileTypes.audio = "audio", FileTypes.text = "text", FileTypes.all = "all", FileTypes.custom = "custom";
33
+ }(FileTypes || (FileTypes = {}));
34
+
35
+ const UploadAreaBase = React.forwardRef((props, ref) => {
36
+ const {icon: icon = "upload", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", title: title = "Upload Files", width: width = "100%", height: height = "auto", message: message = "Drag and drop files here or click to upload", busyMessage: busyMessage = "Uploading in progress", iconSize: iconSize = 24, textSize: textSize = "m", borderWidth: borderWidth, border: border = 1, borderStyle: borderStyle = "dashed", borderColor: borderColor = "var(--core-outline-primary)", borderColorHover: borderColorHover = "var(--core-outline-special)", borderRadius: borderRadius, radius: radius = 8, padding: padding = 32, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-surface-special)", acceptedTypes: acceptedTypes = allTypes, multiple: multiple = !0, busy: busy = !1, canRemove: canRemove = !0, showProgress: showProgress = !0, files: files = [], onUpload: onUpload} = props, [hovered, setHovered] = useState(!1), inputRef = useRef(null), dragDepth = useRef(0), inputId = useId(), titleId = useId(), messageId = useId(), isInteractive = !busy && files.length < 1, resolvedBorderWidth = null != borderWidth ? borderWidth : border, resolvedBorderRadius = null != borderRadius ? borderRadius : radius, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, handleClickUpload = useCallback(() => {
37
+ var _a;
38
+ isInteractive && (null == inputRef ? void 0 : inputRef.current) && (inputRef.current.value = "",
39
+ null === (_a = inputRef.current) || void 0 === _a || _a.click());
40
+ }, [ isInteractive ]), handleFileInputChange = useCallback(e => {
41
+ busy || e.target.files && (null == onUpload || onUpload(Array.from(e.target.files)));
42
+ }, [ busy, onUpload ]), hasFilesInDrag = useCallback(e => {
43
+ var _a, _b;
44
+ return Array.from(null !== (_b = null === (_a = e.dataTransfer) || void 0 === _a ? void 0 : _a.types) && void 0 !== _b ? _b : []).includes("Files");
45
+ }, []), handleDragEnter = useCallback(e => {
46
+ e.preventDefault(), !busy && hasFilesInDrag(e) && (dragDepth.current += 1, 1 === dragDepth.current && setHovered(!0));
47
+ }, [ busy, hasFilesInDrag ]), handleDragLeave = useCallback(e => {
48
+ e.preventDefault(), busy || (dragDepth.current = Math.max(0, dragDepth.current - 1),
49
+ 0 === dragDepth.current && setHovered(!1));
50
+ }, [ busy ]), handleDrop = useCallback(e => {
51
+ var _a;
52
+ if (e.preventDefault(), busy) return;
53
+ dragDepth.current = 0, setHovered(!1);
54
+ const files = Array.from(null !== (_a = e.dataTransfer.files) && void 0 !== _a ? _a : []);
55
+ null == onUpload || onUpload(files);
56
+ }, [ busy, onUpload ]), iconStrokeColor = useMemo(() => hovered ? iconColorHover : iconColor, [ hovered, iconColor, iconColorHover ]), cssVars = useMemo(() => ({
57
+ "--ua-border": `${resolvedBorderWidth}px`,
58
+ "--ua-border-style": borderStyle,
59
+ "--ua-border-color": hovered || busy ? borderColorHover : borderColor,
60
+ "--ua-radius": `${resolvedBorderRadius}px`,
61
+ "--ua-padding": setStyle(padding),
62
+ "--ua-bg-color": hovered ? resolvedBackgroundColorHover : resolvedBackgroundColor,
63
+ "--ua-icon-size": `${iconSize}px`,
64
+ "--ua-cursor": busy || files.length > 0 ? "default" : "pointer",
65
+ "--ua-width": setStyle(width),
66
+ "--ua-height": setStyle(height)
67
+ }), [ resolvedBorderWidth, borderStyle, borderColor, borderColorHover, resolvedBorderRadius, padding, resolvedBackgroundColor, resolvedBackgroundColorHover, iconSize, busy, hovered, height, files.length, width ]);
68
+ return jsxs("div", {
69
+ className: css.wrapper,
70
+ style: cssVars,
71
+ ref: ref,
72
+ role: isInteractive ? "button" : void 0,
73
+ "aria-label": isInteractive ? "Click to upload files" : void 0,
74
+ "aria-describedby": `${titleId} ${messageId}`,
75
+ "aria-disabled": !isInteractive,
76
+ tabIndex: isInteractive ? 0 : -1,
77
+ onClick: isInteractive ? handleClickUpload : void 0,
78
+ onKeyDown: isInteractive ? e => accessibleKeyDown(e, () => handleClickUpload()) : void 0,
79
+ onDragEnter: handleDragEnter,
80
+ onDragOver: e => {
81
+ e.preventDefault();
82
+ },
83
+ onDragLeave: handleDragLeave,
84
+ onDrop: handleDrop,
85
+ children: [ jsx("div", {
86
+ className: css.icon,
87
+ children: jsx(Icon, {
88
+ size: iconSize,
89
+ name: icon,
90
+ strokeColor: iconStrokeColor,
91
+ pointer: !1
92
+ })
93
+ }), jsx("div", {
94
+ id: titleId,
95
+ className: css.title,
96
+ children: title
97
+ }), jsxs("div", {
98
+ id: messageId,
99
+ className: `${css.message} ${css[textSize]}`,
100
+ children: [ busy && showProgress && jsx(ProgressIndicator, {
101
+ show: !0,
102
+ size: 20,
103
+ inline: !0,
104
+ color: iconStrokeColor
105
+ }), busy ? busyMessage : message ]
106
+ }), files.length > 0 && jsx("div", {
107
+ className: css.files,
108
+ children: jsx(FileList, {
109
+ files: files,
110
+ bgColor: "var(--core-surface-primary)",
111
+ size: "m",
112
+ direction: "column",
113
+ gap: 8,
114
+ iconSize: 24,
115
+ padding: "10px",
116
+ canRemove: canRemove
117
+ })
118
+ }), jsx("input", {
119
+ id: inputId,
120
+ ref: inputRef,
121
+ type: "file",
122
+ hidden: !0,
123
+ disabled: busy,
124
+ multiple: multiple,
125
+ accept: acceptedTypes ? acceptedTypes.join(", ") : void 0,
126
+ onChange: handleFileInputChange
127
+ }) ]
128
+ });
129
+ });
130
+
131
+ UploadAreaBase.displayName = "UploadArea";
132
+
133
+ const UploadArea = React.memo(UploadAreaBase);
134
+
135
+ export { UploadArea as U, allTypes as a, audioTypes as b, documentTypes as d, imageTypes as i, textTypes as t, videoTypes as v };
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-BX2F90pK.mjs";
2
2
 
3
3
  /**
4
4
  * Manage a WebSocket connection with optional unified events, retries, and keep-alive pings.
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter, a as __rest } from "./tslib.es6-C-olHjXV.mjs";
1
+ import { _ as __awaiter, a as __rest } from "./tslib.es6-BX2F90pK.mjs";
2
2
 
3
3
  import { useMemo } from "react";
4
4
 
@@ -6,7 +6,7 @@ import { create } from "zustand";
6
6
 
7
7
  import { useShallow } from "zustand/react/shallow";
8
8
 
9
- import { I as IndexedDB } from "./IndexedDB-Dk7a4fPS.mjs";
9
+ import { I as IndexedDB } from "./IndexedDB-DVoDikoA.mjs";
10
10
 
11
11
  function isValidIDBKey(key) {
12
12
  return "string" == typeof key || "number" == typeof key || key instanceof Date || key instanceof ArrayBuffer || (Array.isArray(key) ? key.every(entry => isValidIDBKey(entry)) : ArrayBuffer.isView(key));
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
2
+ import { _ as __awaiter } from "./tslib.es6-BX2F90pK.mjs";
3
3
 
4
4
  import { useEffect } from "react";
5
5
 
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-BX2F90pK.mjs";
2
2
 
3
3
  /**
4
4
  * Remove scripts, invisible characters, and optional HTML tags from a string.
@@ -21,27 +21,24 @@ import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
21
21
  */ function debug(previous, updated, name = "component") {
22
22
  if ("test" === process.env.NODE_ENV) return;
23
23
  const props = previous.current.props, mount = previous.current.mount, unmount = previous.current.unmount;
24
- if (mount) ; else if (unmount) ; else {
25
- (
26
- /**
24
+ return mount || unmount ||
25
+ /**
27
26
  * Build a readable list of prop changes between two prop snapshots.
28
27
  */
29
- function(props, updated) {
30
- const reasons = [];
31
- for (const key of Object.keys(updated)) if (updated[key] !== props[key]) try {
32
- const propName = `${key}:`, prev = JSON.stringify(props[key]), valueChanged = `${prev} > ${JSON.stringify(updated[key])}`;
33
- reasons.push(`${propName} ${valueChanged}`);
34
- } catch (error) {
35
- let message = "Unknown error";
36
- error instanceof Error && (message = error.message), "string" == typeof error && (message = error),
37
- reasons.push(`${key} ${message}`);
38
- }
28
+ function(props, updated) {
29
+ const reasons = [];
30
+ for (const key of Object.keys(updated)) if (updated[key] !== props[key]) try {
31
+ const propName = `${key}:`, prev = JSON.stringify(props[key]), valueChanged = `${prev} > ${JSON.stringify(updated[key])}`;
32
+ reasons.push(`${propName} ${valueChanged}`);
33
+ } catch (error) {
34
+ let message = "Unknown error";
35
+ error instanceof Error && (message = error.message), "string" == typeof error && (message = error),
36
+ reasons.push(`${key} ${message}`);
39
37
  }
40
- /**
41
- * Convert a hex color into an RGB string literal.
42
- */)(props, updated);
43
38
  }
44
- return {
39
+ /**
40
+ * Convert a hex color into an RGB string literal.
41
+ */ (props, updated), {
45
42
  props: updated,
46
43
  mount: !1,
47
44
  unmount: !1
@@ -90,7 +87,7 @@ const hexToRgb = (hex, opacity) => {
90
87
  document.body.appendChild(textArea), textArea.focus(), textArea.select(), document.execCommand("copy"),
91
88
  textArea.remove(), !0;
92
89
  } catch (error) {
93
- return console.warn("Unable to copy to clipboard:", error), !1;
90
+ return !1;
94
91
  }
95
92
  });
96
93
 
@@ -0,0 +1,68 @@
1
+ import { create } from "zustand";
2
+
3
+ function rejectPendingModal(modal, reason) {
4
+ var _a;
5
+ null === (_a = null == modal ? void 0 : modal.reject) || void 0 === _a || _a.call(modal, reason);
6
+ }
7
+
8
+ const useModalStore = create((set, get) => ({
9
+ modal: null,
10
+ actions: {
11
+ show: modal => {
12
+ const currentModal = get().modal;
13
+ currentModal !== modal && (rejectPendingModal(currentModal, new Error("Modal replaced.")),
14
+ set({
15
+ modal: modal ? Object.assign(Object.assign({}, modal), {
16
+ resolve: void 0,
17
+ reject: void 0
18
+ }) : null
19
+ }));
20
+ },
21
+ modalResponse: modal => (rejectPendingModal(get().modal, new Error("Modal replaced.")),
22
+ new Promise((resolve, reject) => {
23
+ set({
24
+ modal: Object.assign(Object.assign({}, modal), {
25
+ resolve: value => {
26
+ resolve(value), set({
27
+ modal: null
28
+ });
29
+ },
30
+ reject: reason => {
31
+ reject(reason), set({
32
+ modal: null
33
+ });
34
+ }
35
+ })
36
+ });
37
+ })),
38
+ hide: reason => {
39
+ rejectPendingModal(get().modal, null != reason ? reason : new Error("Modal dismissed.")),
40
+ set({
41
+ modal: null
42
+ });
43
+ },
44
+ resolve: value => {
45
+ var _a;
46
+ const currentModal = get().modal;
47
+ null === (_a = null == currentModal ? void 0 : currentModal.resolve) || void 0 === _a || _a.call(currentModal, value),
48
+ set({
49
+ modal: null
50
+ });
51
+ },
52
+ reject: reason => {
53
+ var _a;
54
+ const currentModal = get().modal;
55
+ null === (_a = null == currentModal ? void 0 : currentModal.reject) || void 0 === _a || _a.call(currentModal, reason),
56
+ set({
57
+ modal: null
58
+ });
59
+ },
60
+ clear: () => {
61
+ rejectPendingModal(get().modal, new Error("Modal cleared.")), set({
62
+ modal: null
63
+ });
64
+ }
65
+ }
66
+ })), useModal = () => useModalStore(state => state.modal), useModalActions = () => useModalStore(state => state.actions), modalActions = useModalStore.getState().actions, getModal = () => useModalStore.getState().modal;
67
+
68
+ export { useModalActions as a, useModalStore as b, getModal as g, modalActions as m, useModal as u };
@@ -1,8 +1,8 @@
1
1
  import { create } from "zustand";
2
2
 
3
- import "./tslib.es6-C-olHjXV.mjs";
3
+ import "./tslib.es6-BX2F90pK.mjs";
4
4
 
5
- import { S as SSEConnection } from "./SSEConnection-DcA3wFsO.mjs";
5
+ import { S as SSEConnection } from "./SSEConnection-qNnkZUOe.mjs";
6
6
 
7
7
  const useSSEStore = create((set, get) => ({
8
8
  connections: [],
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-BX2F90pK.mjs";
2
2
 
3
3
  var FileUploadStatus, UploadError, WorkerStatus;
4
4
 
@@ -102,7 +102,7 @@ class UploadsWorker {
102
102
  break;
103
103
 
104
104
  default:
105
- console.warn(error), upload.error = UploadError.Other;
105
+ upload.error = UploadError.Other;
106
106
  }
107
107
  upload.status = FileUploadStatus.failed, this.updateUploadStatus(upload), this.failed.set(upload.id, upload),
108
108
  this.notifyStatus();
@@ -1,6 +1,6 @@
1
1
  import { create } from "zustand";
2
2
 
3
- import { W as WorkerStatus } from "./uploads-worker-7X9EwX9N.mjs";
3
+ import { W as WorkerStatus } from "./uploads-worker-Dhyp4ot3.mjs";
4
4
 
5
5
  let uploadsWorker = null;
6
6
 
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-BX2F90pK.mjs";
2
2
 
3
3
  import { create } from "zustand";
4
4
 
@@ -78,9 +78,9 @@ function adjustMediaVolume(media, volume) {
78
78
 
79
79
  function playFeedbackSound(element, volume) {
80
80
  return __awaiter(this, void 0, void 0, function*() {
81
- if (Number(volume.toFixed(2)), element) {
81
+ if (element) {
82
82
  !element.paused && !element.ended && element.readyState > 2 && (element.pause(),
83
- element.currentTime = 0), element.volume = Number(volume.toFixed(2)), yield element.play().catch(err => console.warn(err));
83
+ element.currentTime = 0), element.volume = Number(volume.toFixed(2)), yield element.play().catch(() => null);
84
84
  }
85
85
  });
86
86
  }
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter } from "./tslib.es6-C-olHjXV.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-BX2F90pK.mjs";
2
2
 
3
3
  import { create } from "zustand";
4
4
 
@@ -1,6 +1,6 @@
1
- export { A as AudioBubble } from "../../chunks/AudioBubble-D052QyPH.mjs";
1
+ export { A as AudioBubble } from "../../chunks/AudioBubble-DfrxyTX_.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-C-olHjXV.mjs";
3
+ import "../../chunks/tslib.es6-BX2F90pK.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
@@ -10,8 +10,6 @@ import "../../hooks/useTheme.mjs";
10
10
 
11
11
  import "../../providers/ThemeProvider.mjs";
12
12
 
13
- import "../../chunks/style-inject.es-D0BjEaN8.mjs";
14
-
15
13
  import "../../theme/themes.mjs";
16
14
 
17
15
  import "../../theme/colors.mjs";
@@ -26,8 +24,8 @@ import "../../theme/type.mjs";
26
24
 
27
25
  import "../../hooks/useObserveTheme.mjs";
28
26
 
29
- import "../../chunks/colors-FQ0uNQcW.mjs";
27
+ import "../../chunks/colors-D-qeA9gU.mjs";
30
28
 
31
- import "../../chunks/audioVisualizer-ZgT77nUw.mjs";
29
+ import "../../chunks/audioVisualizer-BUNbarKP.mjs";
32
30
 
33
31
  import "../../hooks/useWindow.mjs";
@@ -1,11 +1,9 @@
1
- export { A as Avatar } from "../../chunks/Avatar-Ds6MWC2c.mjs";
1
+ export { A as Avatar } from "../../chunks/Avatar-pA41Pcyl.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-C-olHjXV.mjs";
3
+ import "../../chunks/tslib.es6-BX2F90pK.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
7
7
  import "react";
8
8
 
9
- import "../../chunks/misc-Bjbro8Xe.mjs";
10
-
11
- import "../../chunks/style-inject.es-D0BjEaN8.mjs";
9
+ import "../../chunks/misc-CTGTuM2J.mjs";
@@ -1,13 +1,11 @@
1
- export { A as AvatarGroup } from "../../chunks/AvatarGroup-CBGi99eo.mjs";
1
+ export { A as AvatarGroup } from "../../chunks/AvatarGroup-CZBtWjnj.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-C-olHjXV.mjs";
3
+ import "../../chunks/tslib.es6-BX2F90pK.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
7
7
  import "react";
8
8
 
9
- import "../../chunks/Avatar-Ds6MWC2c.mjs";
9
+ import "../../chunks/Avatar-pA41Pcyl.mjs";
10
10
 
11
- import "../../chunks/misc-Bjbro8Xe.mjs";
12
-
13
- import "../../chunks/style-inject.es-D0BjEaN8.mjs";
11
+ import "../../chunks/misc-CTGTuM2J.mjs";