@apple-pie/slice 0.1.42 → 0.1.44

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 (310) hide show
  1. package/dist/cjs/chunks/{AudioBubble-Cm9yHsXy.js → AudioBubble-DGXJI6fl.js} +3 -4
  2. package/dist/cjs/chunks/{Avatar-CX75jtaK.js → Avatar-C2REB8vr.js} +1 -1
  3. package/dist/cjs/chunks/{AvatarGroup-BREnvrjE.js → AvatarGroup-Dsqnnepg.js} +1 -1
  4. package/dist/cjs/chunks/{Badge-96jvuXhS.js → Badge-xReCD3qV.js} +1 -1
  5. package/dist/cjs/chunks/{Button-Ddtf_TCs.js → Button-7vW7Ut0n.js} +1 -1
  6. package/dist/cjs/chunks/{ButtonBar-DONvMqvY.js → ButtonBar-r8xaXQOT.js} +1 -1
  7. package/dist/cjs/chunks/{Camera-DnCDsNTQ.js → Camera-BbWi-vvW.js} +4 -5
  8. package/dist/cjs/chunks/{CheckBox-Cs1kMs8S.js → CheckBox-BCR1qSIr.js} +1 -1
  9. package/dist/cjs/chunks/{Chip-DykMwI0k.js → Chip-C6AbxC9I.js} +1 -1
  10. package/dist/cjs/chunks/{DivInput-BvsEXIa2.js → DivInput-D78kLm9s.js} +1 -1
  11. package/dist/cjs/chunks/{Dot-DhkLAHrQ.js → Dot-DlLlV88_.js} +1 -1
  12. package/dist/cjs/chunks/{DrggablePanel-CPtsIiK8.js → DrggablePanel-De4lmb_e.js} +3 -4
  13. package/dist/cjs/chunks/{DropDown-DPfxtssW.js → DropDown-Bp9MRUsG.js} +1 -1
  14. package/dist/cjs/chunks/{ErrorSummary-Dv6XJnlI.js → ErrorSummary-ChPbmIQ0.js} +3 -4
  15. package/dist/cjs/chunks/{FileIcon-B0duhy3c.js → FileIcon-Dv3uu2DC.js} +3 -5
  16. package/dist/cjs/chunks/{FileList--dYOsoCc.js → FileList-IgK1yREW.js} +1 -1
  17. package/dist/cjs/chunks/{FlexDiv-BNtiPqhw.js → FlexDiv-B5gf7V09.js} +1 -1
  18. package/dist/cjs/chunks/{Grouper-DZjzGTWU.js → Grouper-DGLV96Yg.js} +3 -4
  19. package/dist/cjs/chunks/{Icon--hX3u4Xq.js → Icon-Bmow374B.js} +3 -4
  20. package/dist/cjs/chunks/{IconButton-DQy0khcT.js → IconButton-BZttH51z.js} +1 -1
  21. package/dist/cjs/chunks/{IndexedDB-D33QVHZz.js → IndexedDB-BtHDgAwP.js} +1 -1
  22. package/dist/cjs/chunks/{Label-DVsWGQ5e.js → Label-CLiXfLhU.js} +1 -1
  23. package/dist/cjs/chunks/{Level-CAskubaS.js → Level-DM-3l-Bh.js} +1 -1
  24. package/dist/cjs/chunks/{Modal-DTmIHqut.js → Modal-D8OyooX8.js} +1 -1
  25. package/dist/cjs/chunks/{ModalController-Bymhb0p4.js → ModalController-BkREg0KG.js} +1 -6
  26. package/dist/cjs/chunks/{Overlay-CcGtZR5b.js → Overlay-CH2p-6HE.js} +1 -1
  27. package/dist/cjs/chunks/{Pager-DJ364W05.js → Pager-VWt-iYND.js} +1 -1
  28. package/dist/cjs/chunks/{ProgressIndicator-CzTIgSaR.js → ProgressIndicator-BBe5EJJB.js} +3 -4
  29. package/dist/cjs/chunks/{PromptInput-D8y5Kqdw.js → PromptInput-BaO3pCTO.js} +4 -5
  30. package/dist/cjs/chunks/{RadioButton-DGrFQ0HH.js → RadioButton-DP12R15W.js} +1 -1
  31. package/dist/cjs/chunks/{RadioButtonList-Bbr2brXz.js → RadioButtonList-D3aoXPWZ.js} +1 -1
  32. package/dist/cjs/chunks/{Slider-7mX9CMLj.js → Slider-C_iix5E1.js} +3 -4
  33. package/dist/cjs/chunks/{Spacer-ClDOx3_n.js → Spacer-CT8DAL00.js} +1 -1
  34. package/dist/cjs/chunks/{Switch-g0QOgH1C.js → Switch-CeMNFko_.js} +1 -1
  35. package/dist/cjs/chunks/{TabBar-BLhdRUIr.js → TabBar-C_qyZQub.js} +4 -5
  36. package/dist/cjs/chunks/{TextArea-CeCD7dvE.js → TextArea-0opB2WAt.js} +1 -1
  37. package/dist/cjs/chunks/{TextField-B5oNh53h.js → TextField-NU7k_acK.js} +4 -5
  38. package/dist/cjs/chunks/{Tip-CUlSqr0w.js → Tip-DrY3JwFE.js} +1 -1
  39. package/dist/cjs/chunks/{Toast-B21mzlsK.js → Toast-DF8qXdPO.js} +4 -5
  40. package/dist/cjs/chunks/{ToggleButton-n_9ddA24.js → ToggleButton-cntUrPlb.js} +1 -1
  41. package/dist/cjs/chunks/{UploadArea-DjPjWWyj.js → UploadArea-BxBisAJS.js} +1 -1
  42. package/dist/cjs/chunks/{Video-X8Hhs72_.js → Video-qiH56WvN.js} +1 -1
  43. package/dist/cjs/chunks/{VideoController-ConanUTi.js → VideoController-D4_El3jm.js} +1 -6
  44. package/dist/cjs/chunks/{WSConnection-rQmPln_G.js → WSConnection-DbdxZFOV.js} +1 -1
  45. package/dist/cjs/chunks/{WebRTCConnection-XKeWuX3F.js → WebRTCConnection-B9dd6VVp.js} +1 -1
  46. package/dist/cjs/chunks/{localDBStore-CjkEiNmM.js → localDBStore-BjxalVAJ.js} +1 -1
  47. package/dist/cjs/chunks/{microphoneStore-_Welo21Y.js → microphoneStore-DpUL8kt8.js} +1 -1
  48. package/dist/cjs/chunks/{misc-V6GDR-Ld.js → misc-Gs698ODr.js} +1 -1
  49. package/dist/cjs/chunks/{sseStore-B_znAGnz.js → sseStore-BNAfwXap.js} +2 -2
  50. package/dist/cjs/chunks/{uploads-worker-BcqbJ2XT.js → uploads-worker-fWbmHWKp.js} +1 -1
  51. package/dist/cjs/chunks/{uploadsStore-DmnLR5KV.js → uploadsStore-C-sGeJo9.js} +2 -2
  52. package/dist/cjs/chunks/viewState-X7EbUCin.js +413 -0
  53. package/dist/cjs/chunks/{volumeStore-BF1kyqiz.js → volumeStore--l8gb-3a.js} +1 -1
  54. package/dist/cjs/chunks/{webRTCStore-LftkLLjP.js → webRTCStore-DJjyW39y.js} +1 -1
  55. package/dist/cjs/chunks/{windowStore-BQUT0Esh.js → windowStore-nNT7HJqA.js} +1 -1
  56. package/dist/cjs/components/AudioBubble/index.js +4 -6
  57. package/dist/cjs/components/Avatar/index.js +3 -3
  58. package/dist/cjs/components/AvatarGroup/index.js +3 -3
  59. package/dist/cjs/components/Badge/index.js +2 -2
  60. package/dist/cjs/components/Button/index.js +7 -9
  61. package/dist/cjs/components/ButtonBar/index.js +4 -6
  62. package/dist/cjs/components/Camera/index.js +5 -7
  63. package/dist/cjs/components/CheckBox/index.js +4 -6
  64. package/dist/cjs/components/Chip/index.js +5 -7
  65. package/dist/cjs/components/DataTable/index.js +4 -6
  66. package/dist/cjs/components/DivInput/index.js +3 -3
  67. package/dist/cjs/components/Dot/index.js +2 -2
  68. package/dist/cjs/components/DraggablePanel/index.js +3 -5
  69. package/dist/cjs/components/DropDown/index.js +4 -6
  70. package/dist/cjs/components/ErrorSummary/index.js +3 -5
  71. package/dist/cjs/components/FileIcon/index.js +3 -5
  72. package/dist/cjs/components/FileList/index.js +5 -7
  73. package/dist/cjs/components/FlexDiv/index.js +2 -2
  74. package/dist/cjs/components/Grouper/index.js +5 -7
  75. package/dist/cjs/components/Icon/index.js +3 -5
  76. package/dist/cjs/components/IconButton/index.js +6 -8
  77. package/dist/cjs/components/Label/index.js +3 -3
  78. package/dist/cjs/components/Level/index.js +3 -3
  79. package/dist/cjs/components/Modal/index.js +8 -10
  80. package/dist/cjs/components/ModalController/index.js +4 -6
  81. package/dist/cjs/components/Overlay/index.js +2 -2
  82. package/dist/cjs/components/Pager/index.js +3 -3
  83. package/dist/cjs/components/Progress/index.js +3 -5
  84. package/dist/cjs/components/PromptInput/index.js +7 -10
  85. package/dist/cjs/components/RadioButton/index.js +4 -6
  86. package/dist/cjs/components/RadioButtonList/index.js +5 -7
  87. package/dist/cjs/components/Slider/index.js +3 -5
  88. package/dist/cjs/components/Spacer/index.js +2 -2
  89. package/dist/cjs/components/Switch/index.js +2 -2
  90. package/dist/cjs/components/TabBar/index.js +6 -8
  91. package/dist/cjs/components/TextArea/index.js +7 -9
  92. package/dist/cjs/components/Textfield/index.js +7 -9
  93. package/dist/cjs/components/Tip/index.js +3 -3
  94. package/dist/cjs/components/Toast/index.js +4 -6
  95. package/dist/cjs/components/ToggleButton/index.js +7 -9
  96. package/dist/cjs/components/UploadArea/index.js +6 -8
  97. package/dist/cjs/components/Video/index.js +9 -11
  98. package/dist/cjs/components/VideoController/index.js +7 -10
  99. package/dist/cjs/hooks/useAudioRecorder.js +1 -1
  100. package/dist/cjs/hooks/useBindWebRTC.js +2 -2
  101. package/dist/cjs/hooks/useMdStreamBuffer.js +1 -1
  102. package/dist/cjs/hooks/useMicrophone.js +1 -1
  103. package/dist/cjs/hooks/useTrackRenders.js +2 -2
  104. package/dist/cjs/hooks.js +3 -3
  105. package/dist/cjs/index.js +10 -10
  106. package/dist/cjs/stores/LocalDB.js +3 -3
  107. package/dist/cjs/stores/SSE.js +2 -2
  108. package/dist/cjs/stores/WS.js +2 -2
  109. package/dist/cjs/stores/WebRTC.js +2 -2
  110. package/dist/cjs/stores/microphone.js +2 -2
  111. package/dist/cjs/stores/modal.js +1 -1
  112. package/dist/cjs/stores/tip.js +1 -1
  113. package/dist/cjs/stores/toast.js +1 -1
  114. package/dist/cjs/stores/uploads.js +2 -2
  115. package/dist/cjs/stores/video.js +1 -1
  116. package/dist/cjs/stores/volume.js +2 -2
  117. package/dist/cjs/stores/window.js +2 -2
  118. package/dist/cjs/stores.js +31 -30
  119. package/dist/cjs/utils/index.js +2 -2
  120. package/dist/cjs/utils/objects/index.js +2 -2
  121. package/dist/cjs/workers/uploads/uploads.js +2 -2
  122. package/dist/esm/chunks/{AudioBubble-RmRIS-7d.mjs → AudioBubble-RS8y7dsg.mjs} +3 -9
  123. package/dist/esm/chunks/{Avatar-BFo6BjmH.mjs → Avatar-aAJORBJw.mjs} +2 -2
  124. package/dist/esm/chunks/{AvatarGroup-E3J2SSMv.mjs → AvatarGroup-De2PfopD.mjs} +2 -2
  125. package/dist/esm/chunks/{Badge-BNoFISPQ.mjs → Badge--3RVYqU8.mjs} +1 -1
  126. package/dist/esm/chunks/{Button-CZb74NLO.mjs → Button-BdZR6DjE.mjs} +6 -6
  127. package/dist/esm/chunks/{ButtonBar-CXmffNHp.mjs → ButtonBar-aXeHOw1R.mjs} +3 -3
  128. package/dist/esm/chunks/{Camera-DHgbAEUm.mjs → Camera-1ccvR8X_.mjs} +5 -11
  129. package/dist/esm/chunks/{CheckBox-BE4hgI7F.mjs → CheckBox-Dqzf1PRK.mjs} +3 -3
  130. package/dist/esm/chunks/{Chip-DYKWamdy.mjs → Chip-Czj1STPd.mjs} +4 -4
  131. package/dist/esm/chunks/{DivInput-Bc30Exwu.mjs → DivInput-jUEneium.mjs} +2 -2
  132. package/dist/esm/chunks/{Dot-DuRIiyRz.mjs → Dot-B4fdZ-qc.mjs} +1 -1
  133. package/dist/esm/chunks/{DrggablePanel-DqV1YwCg.mjs → DrggablePanel-Db0KZhaF.mjs} +2 -8
  134. package/dist/esm/chunks/{DropDown-BbJqhsYM.mjs → DropDown-B_CJwDGS.mjs} +3 -3
  135. package/dist/esm/chunks/{ErrorSummary-Cn4MRJmj.mjs → ErrorSummary-D6kTokzc.mjs} +2 -8
  136. package/dist/esm/chunks/{FileIcon-B4_BQFip.mjs → FileIcon-dId2Wu-m.mjs} +2 -8
  137. package/dist/esm/chunks/{FileList-Cj2CYY_9.mjs → FileList-rMjli1tu.mjs} +5 -5
  138. package/dist/esm/chunks/{FlexDiv-CbjmWBcR.mjs → FlexDiv-DqZwxOvB.mjs} +1 -1
  139. package/dist/esm/chunks/{Grouper-BKaJR-UM.mjs → Grouper-C648B8m9.mjs} +3 -9
  140. package/dist/esm/chunks/{Icon-CpLHegV5.mjs → Icon-BfSLuS2u.mjs} +2 -8
  141. package/dist/esm/chunks/{IconButton-h7T_ekPP.mjs → IconButton-4YlfRQap.mjs} +5 -5
  142. package/dist/esm/chunks/{IndexedDB-45_U7IIq.mjs → IndexedDB-DrgyB0PG.mjs} +1 -1
  143. package/dist/esm/chunks/{Label-lWzgZCMd.mjs → Label-oVWJfERc.mjs} +2 -2
  144. package/dist/esm/chunks/{Level-Bc9N_cNk.mjs → Level-B_tkn_tn.mjs} +3 -3
  145. package/dist/esm/chunks/{Modal-CUknCThX.mjs → Modal-BVg29B5N.mjs} +5 -5
  146. package/dist/esm/chunks/{ModalController-BmnFYsKG.mjs → ModalController-CCRe0HlG.mjs} +2 -8
  147. package/dist/esm/chunks/{Overlay-DQrbl0BZ.mjs → Overlay-DuGDfhI3.mjs} +1 -1
  148. package/dist/esm/chunks/{Pager-DKKSC9CS.mjs → Pager-DyaWNJMq.mjs} +2 -2
  149. package/dist/esm/chunks/{ProgressIndicator-hbzhNcoD.mjs → ProgressIndicator-Bv7actNC.mjs} +2 -8
  150. package/dist/esm/chunks/{PromptInput-BKehxzSs.mjs → PromptInput-C9eDiw2i.mjs} +4 -10
  151. package/dist/esm/chunks/{RadioButton-0t4fTzy4.mjs → RadioButton-Bob5MqKC.mjs} +3 -3
  152. package/dist/esm/chunks/{RadioButtonList-BS7eBkX2.mjs → RadioButtonList-BfCE3UGK.mjs} +3 -3
  153. package/dist/esm/chunks/{Slider-CO6SEixo.mjs → Slider-IqjVgxEE.mjs} +3 -9
  154. package/dist/esm/chunks/{Spacer-C6096P2f.mjs → Spacer-BA15uw0_.mjs} +1 -1
  155. package/dist/esm/chunks/{Switch-BOGvlWkI.mjs → Switch-Cns1adcy.mjs} +1 -1
  156. package/dist/esm/chunks/{TabBar-N9T4hzSr.mjs → TabBar-Dd4U3BPU.mjs} +6 -12
  157. package/dist/esm/chunks/{TextArea-ksbDlj56.mjs → TextArea-CFUXAGYz.mjs} +2 -2
  158. package/dist/esm/chunks/{TextField-35ptM83Q.mjs → TextField-BFDmFyx7.mjs} +5 -11
  159. package/dist/esm/chunks/{Tip-CqfBwJCT.mjs → Tip-BcStWxJN.mjs} +2 -2
  160. package/dist/esm/chunks/{Toast-B3IqrBpg.mjs → Toast-DQG2mzvy.mjs} +4 -10
  161. package/dist/esm/chunks/{ToggleButton-CEDmO_Bq.mjs → ToggleButton-Cp2K772X.mjs} +2 -2
  162. package/dist/esm/chunks/{UploadArea-CLSF8l5e.mjs → UploadArea-DEf5hbbR.mjs} +4 -4
  163. package/dist/esm/chunks/{Video-BZFEreEg.mjs → Video-CHmn9myN.mjs} +5 -5
  164. package/dist/esm/chunks/{VideoController-BabbcQji.mjs → VideoController-BvWVGSY-.mjs} +5 -11
  165. package/dist/esm/chunks/{WSConnection-CCW9XDFQ.mjs → WSConnection-gFHF2tW7.mjs} +1 -1
  166. package/dist/esm/chunks/{WebRTCConnection-Bj2D6Sa_.mjs → WebRTCConnection-C_MYSUKv.mjs} +1 -1
  167. package/dist/esm/chunks/{localDBStore-Cze9_elI.mjs → localDBStore-CeqAEGXO.mjs} +2 -2
  168. package/dist/esm/chunks/{microphoneStore-CO8-b4gt.mjs → microphoneStore-DGfGaTKO.mjs} +1 -1
  169. package/dist/esm/chunks/{misc-DBWrv8Kl.mjs → misc-B9d7ECMP.mjs} +1 -1
  170. package/dist/esm/chunks/{sseStore-BNjdKHmN.mjs → sseStore-PGCxQBZ-.mjs} +2 -2
  171. package/dist/esm/chunks/{tslib.es6-l-UorzsO.mjs → tslib.es6-C0yUTS6p.mjs} +1 -1
  172. package/dist/esm/chunks/{uploads-worker-BJooptoF.mjs → uploads-worker-SXS-_T5t.mjs} +1 -1
  173. package/dist/esm/chunks/{uploadsStore-Cp9U91kx.mjs → uploadsStore-CZQGe1-z.mjs} +1 -1
  174. package/dist/esm/chunks/viewState-po_PH0Tv.mjs +431 -0
  175. package/dist/esm/chunks/{volumeStore-DHoAeahx.mjs → volumeStore-BSE--DBm.mjs} +1 -1
  176. package/dist/esm/chunks/{webRTCStore-FL1z4Odf.mjs → webRTCStore-rzdk9ao2.mjs} +2 -2
  177. package/dist/esm/chunks/{windowStore-DdQixhs7.mjs → windowStore-CMPgwtfm.mjs} +1 -1
  178. package/dist/esm/components/AudioBubble/index.mjs +4 -14
  179. package/dist/esm/components/Avatar/index.mjs +3 -3
  180. package/dist/esm/components/AvatarGroup/index.mjs +4 -4
  181. package/dist/esm/components/Badge/index.mjs +2 -2
  182. package/dist/esm/components/Button/index.mjs +8 -18
  183. package/dist/esm/components/ButtonBar/index.mjs +4 -14
  184. package/dist/esm/components/Camera/index.mjs +6 -16
  185. package/dist/esm/components/CheckBox/index.mjs +4 -14
  186. package/dist/esm/components/Chip/index.mjs +5 -15
  187. package/dist/esm/components/DataTable/index.mjs +4 -14
  188. package/dist/esm/components/DivInput/index.mjs +3 -3
  189. package/dist/esm/components/Dot/index.mjs +2 -2
  190. package/dist/esm/components/DraggablePanel/index.mjs +3 -13
  191. package/dist/esm/components/DropDown/index.mjs +4 -14
  192. package/dist/esm/components/ErrorSummary/index.mjs +3 -13
  193. package/dist/esm/components/FileIcon/index.mjs +3 -13
  194. package/dist/esm/components/FileList/index.mjs +6 -16
  195. package/dist/esm/components/FlexDiv/index.mjs +2 -2
  196. package/dist/esm/components/Grouper/index.mjs +5 -15
  197. package/dist/esm/components/Icon/index.mjs +4 -14
  198. package/dist/esm/components/IconButton/index.mjs +7 -17
  199. package/dist/esm/components/Label/index.mjs +3 -3
  200. package/dist/esm/components/Level/index.mjs +4 -4
  201. package/dist/esm/components/Modal/index.mjs +10 -20
  202. package/dist/esm/components/ModalController/index.mjs +5 -13
  203. package/dist/esm/components/Overlay/index.mjs +2 -2
  204. package/dist/esm/components/Pager/index.mjs +3 -3
  205. package/dist/esm/components/Progress/index.mjs +4 -14
  206. package/dist/esm/components/PromptInput/index.mjs +11 -21
  207. package/dist/esm/components/RadioButton/index.mjs +4 -14
  208. package/dist/esm/components/RadioButtonList/index.mjs +5 -15
  209. package/dist/esm/components/Slider/index.mjs +4 -14
  210. package/dist/esm/components/Spacer/index.mjs +2 -2
  211. package/dist/esm/components/Switch/index.mjs +2 -2
  212. package/dist/esm/components/TabBar/index.mjs +8 -18
  213. package/dist/esm/components/TextArea/index.mjs +9 -19
  214. package/dist/esm/components/Textfield/index.mjs +10 -20
  215. package/dist/esm/components/Tip/index.mjs +3 -3
  216. package/dist/esm/components/Toast/index.mjs +5 -15
  217. package/dist/esm/components/ToggleButton/index.mjs +9 -19
  218. package/dist/esm/components/UploadArea/index.mjs +7 -17
  219. package/dist/esm/components/Video/index.mjs +12 -22
  220. package/dist/esm/components/VideoController/index.mjs +12 -20
  221. package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
  222. package/dist/esm/hooks/useBindWebRTC.mjs +5 -5
  223. package/dist/esm/hooks/useMdStreamBuffer.mjs +2 -2
  224. package/dist/esm/hooks/useMicrophone.mjs +1 -1
  225. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  226. package/dist/esm/hooks.mjs +6 -6
  227. package/dist/esm/index.mjs +57 -57
  228. package/dist/esm/stores/LocalDB.mjs +3 -3
  229. package/dist/esm/stores/SSE.mjs +3 -3
  230. package/dist/esm/stores/WS.mjs +2 -2
  231. package/dist/esm/stores/WebRTC.mjs +3 -3
  232. package/dist/esm/stores/microphone.mjs +2 -2
  233. package/dist/esm/stores/modal.mjs +1 -1
  234. package/dist/esm/stores/tip.mjs +1 -1
  235. package/dist/esm/stores/toast.mjs +1 -1
  236. package/dist/esm/stores/uploads.mjs +3 -3
  237. package/dist/esm/stores/video.mjs +1 -1
  238. package/dist/esm/stores/volume.mjs +2 -2
  239. package/dist/esm/stores/window.mjs +2 -2
  240. package/dist/esm/stores.mjs +18 -18
  241. package/dist/esm/utils/index.mjs +10 -10
  242. package/dist/esm/utils/objects/index.mjs +7 -7
  243. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  244. package/dist/styles.css +3481 -3389
  245. package/dist/types/components/AudioBubble/AudioBubble.d.ts +1 -1
  246. package/dist/types/components/Avatar/Avatar.d.ts +1 -1
  247. package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -1
  248. package/dist/types/components/Badge/Badge.d.ts +1 -1
  249. package/dist/types/components/Button/Button.d.ts +4 -4
  250. package/dist/types/components/Camera/Camera.d.ts +2 -2
  251. package/dist/types/components/CheckBox/CheckBox.d.ts +1 -1
  252. package/dist/types/components/Chip/Chip.d.ts +1 -1
  253. package/dist/types/components/DataTable/DataTable.d.ts +7 -2
  254. package/dist/types/components/DataTable/_data.d.ts +2 -1
  255. package/dist/types/components/DataTable/_types.d.ts +22 -2
  256. package/dist/types/components/DataTable/_useReorderColumns.d.ts +7 -0
  257. package/dist/types/components/DataTable/_useReorderColumns.test.d.ts +1 -0
  258. package/dist/types/components/DataTable/_useResizeColumn.d.ts +18 -0
  259. package/dist/types/components/DataTable/columnHelper.d.ts +9 -2
  260. package/dist/types/components/DivInput/DivInput.d.ts +1 -1
  261. package/dist/types/components/Dot/Dot.d.ts +1 -1
  262. package/dist/types/components/DraggablePanel/DrggablePanel.d.ts +2 -2
  263. package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +1 -1
  264. package/dist/types/components/FileIcon/FileIcon.d.ts +1 -1
  265. package/dist/types/components/FileList/FileList.d.ts +1 -1
  266. package/dist/types/components/FlexDiv/FlexDiv.d.ts +2 -2
  267. package/dist/types/components/Grouper/Grouper.d.ts +1 -1
  268. package/dist/types/components/Icon/Icon.d.ts +1 -1
  269. package/dist/types/components/IconButton/IconButton.d.ts +1 -1
  270. package/dist/types/components/Label/Label.d.ts +2 -1
  271. package/dist/types/components/Level/Level.d.ts +1 -1
  272. package/dist/types/components/ModalController/ModalController.d.ts +2 -1
  273. package/dist/types/components/Overlay/Overlay.d.ts +1 -1
  274. package/dist/types/components/Pager/Pager.d.ts +1 -1
  275. package/dist/types/components/Progress/DoneCheck/DoneCheck.d.ts +1 -1
  276. package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +3 -2
  277. package/dist/types/components/Slider/Slider.d.ts +1 -1
  278. package/dist/types/components/Spacer/Spacer.d.ts +1 -1
  279. package/dist/types/components/TabBar/TabBar.d.ts +1 -1
  280. package/dist/types/components/TextArea/TextArea.d.ts +1 -1
  281. package/dist/types/components/Textfield/TextField.d.ts +1 -1
  282. package/dist/types/components/ToggleButton/ToggleButton.d.ts +2 -1
  283. package/dist/types/components/VideoController/VideoController.d.ts +2 -1
  284. package/dist/types/providers/ThemeProvider.d.ts +1 -1
  285. package/package.json +1 -1
  286. package/dist/cjs/chunks/viewState-B08gdwcK.js +0 -232
  287. package/dist/esm/chunks/viewState-B7gxzYQl.mjs +0 -250
  288. /package/dist/cjs/chunks/{MdStreamBuffer-DctKEHC2.js → MdStreamBuffer-Bb8KtdxB.js} +0 -0
  289. /package/dist/cjs/chunks/{SSEConnection-DVbJx6fs.js → SSEConnection-Z24RvA6i.js} +0 -0
  290. /package/dist/cjs/chunks/{_types-DSsFQI29.js → _types-BUF4XqUe.js} +0 -0
  291. /package/dist/cjs/chunks/{audioVisualizer-CBL-tQio.js → audioVisualizer-Rueu5ZHV.js} +0 -0
  292. /package/dist/cjs/chunks/{colors-DBqXFbm2.js → colors-RoRQ4v1O.js} +0 -0
  293. /package/dist/cjs/chunks/{debounce-Dh4YSsmR.js → debounce-DQsYw8xJ.js} +0 -0
  294. /package/dist/cjs/chunks/{modalStore-Dldchkjx.js → modalStore-B3Dph5oQ.js} +0 -0
  295. /package/dist/cjs/chunks/{sharedTypes-dZCB5xs7.js → sharedTypes-CHfVI1zE.js} +0 -0
  296. /package/dist/cjs/chunks/{tipStore-DaRl8GmW.js → tipStore-70nY_RIN.js} +0 -0
  297. /package/dist/cjs/chunks/{toastStore-X9cAuAVw.js → toastStore-DN9EkaEV.js} +0 -0
  298. /package/dist/cjs/chunks/{tslib.es6-YdeGB_Pn.js → tslib.es6-DfmUmGCa.js} +0 -0
  299. /package/dist/cjs/chunks/{videoStore-Dl_OJzZ8.js → videoStore-sYfx70eD.js} +0 -0
  300. /package/dist/esm/chunks/{MdStreamBuffer-HPGHLqiC.mjs → MdStreamBuffer-9noAAJDG.mjs} +0 -0
  301. /package/dist/esm/chunks/{SSEConnection-kEyZEEEm.mjs → SSEConnection-BzSx2MVL.mjs} +0 -0
  302. /package/dist/esm/chunks/{_types-jQin_oWP.mjs → _types-8oqMW7QN.mjs} +0 -0
  303. /package/dist/esm/chunks/{audioVisualizer-DqfUbZLW.mjs → audioVisualizer-CKobQkae.mjs} +0 -0
  304. /package/dist/esm/chunks/{colors-oLvyNYnR.mjs → colors-DcRJdJ4W.mjs} +0 -0
  305. /package/dist/esm/chunks/{debounce-CaR2ZNWB.mjs → debounce-BAwoZhDR.mjs} +0 -0
  306. /package/dist/esm/chunks/{modalStore-XVfmmvlZ.mjs → modalStore-h4dkwTzK.mjs} +0 -0
  307. /package/dist/esm/chunks/{sharedTypes-B6V0j136.mjs → sharedTypes-DikFhWJ8.mjs} +0 -0
  308. /package/dist/esm/chunks/{tipStore-DQ2VwYLy.mjs → tipStore-CVuWvjq9.mjs} +0 -0
  309. /package/dist/esm/chunks/{toastStore-B-zw2Ba2.mjs → toastStore-DvBK8Lra.mjs} +0 -0
  310. /package/dist/esm/chunks/{videoStore-DpIm3vjz.mjs → videoStore-CmUM9swM.mjs} +0 -0
@@ -0,0 +1,431 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+
3
+ import React, { useCallback, useEffect, useState, useRef, useMemo } from "react";
4
+
5
+ import { s as setStyle, a as accessibleKeyDown } from "./misc-B9d7ECMP.mjs";
6
+
7
+ import { I as Icon } from "./Icon-BfSLuS2u.mjs";
8
+
9
+ var styles = {
10
+ tableWrapper: "DataTable-module_tableWrapper__BzoJE",
11
+ resizeBar: "DataTable-module_resizeBar__LmzEF",
12
+ table: "DataTable-module_table__oL4Dz",
13
+ baseCell: "DataTable-module_baseCell__DQl-z",
14
+ baseCellWrapper: "DataTable-module_baseCellWrapper__WMgNm",
15
+ headerCellWrapper: "DataTable-module_headerCellWrapper__ytVYY",
16
+ colResizeHandle: "DataTable-module_colResizeHandle__dF5Es",
17
+ header: "DataTable-module_header__QgdCY",
18
+ headerRight: "DataTable-module_headerRight__QHHxv",
19
+ headerLeft: "DataTable-module_headerLeft__OAzLv",
20
+ headerTitle: "DataTable-module_headerTitle__K0pmX",
21
+ m: "DataTable-module_m__G9QOp type-module_body-m-regular__LuQBA",
22
+ scroll: "DataTable-module_scroll__grEU0 scrollBars-module_scrollbars__c-ZPl"
23
+ };
24
+
25
+ function createColumnHelper() {
26
+ return {
27
+ accessor: (accessor, def) => Object.assign({
28
+ accessor: accessor
29
+ }, def)
30
+ };
31
+ }
32
+
33
+ const resolveAlignValue = value => {
34
+ switch (value) {
35
+ case "start":
36
+ return "flex-start";
37
+
38
+ case "center":
39
+ default:
40
+ return "center";
41
+
42
+ case "end":
43
+ return "flex-end";
44
+ }
45
+ }, resolveDragHandleXPos = elements => {
46
+ const {cell: cell, handle: handle, parent: parent, position: position = "right"} = null != elements ? elements : {};
47
+ if (!cell || !parent || !handle) return;
48
+ const {left: left, width: width} = cell.getBoundingClientRect(), x = left - parent.getBoundingClientRect().left - parent.clientLeft + parent.scrollLeft;
49
+ handle.style.left = "right" === position ? `${x + width}px` : `${x}px`;
50
+ };
51
+
52
+ function DataTable(props) {
53
+ const {backgroundColor: backgroundColor = "var(--core-surface-primary)", headerBackgroundColor: headerBackgroundColor = "var(--core-surface-secondary)", candyStripeBackgroundColor: candyStripeBackgroundColor = "var(--core-surface-primary-tint)", backgroundColorHoverRow: backgroundColorHoverRow = "var(--core-surface-primary-tint)", handleHoverColor: handleHoverColor = "var(--core-outline-special)", freezeColumn: freezeColumn = !1, headerSticky: headerSticky = !0, height: height = "auto", width: width = "100%", colResize: colResize = !0, borderColor: borderColor = "var(--core-outline-primary)", borderStyle: borderStyle = "box", columnDefinitions: columnDefinitions = [], tableData: tableData = [], getRowId: getRowId, filter: filter, caption: caption = "Data Table", onDoubleClick: onDoubleClick, onClick: onClick, onMouseOut: onMouseOut, onMouseOver: onMouseOver, sort: sort, onSortChange: onSortChange, onColumnResize: onColumnResize, onColumnReorder: onColumnReorder, borderRadius: borderRadius = 8} = props, [hScroll, setHScroll] = useState(!1), [vScroll, setVScroll] = useState(!1), [hoveredRow, setHoveredRow] = useState(null), [sortKey, setSortKey] = useState(sort), [columnWidths, setColumnWidths] = useState({}), [columnOrder, setColumnOrder] = useState(null), [draggedColId, setDraggedColId] = useState(null), wrapperRef = React.useRef(null), resizeBarRef = React.useRef(null), colRefs = React.useRef({}), elements = {
54
+ handle: resizeBarRef,
55
+ parent: wrapperRef
56
+ }, cornerBoxShadow = useMemo(() => {
57
+ const shadows = [];
58
+ return hScroll && freezeColumn && shadows.push("1px 0 0 var(--core-outline-primary)", "5px 0 0 rgba(0,0,0,0.1)"),
59
+ vScroll && headerSticky && shadows.push("0 1px 0 var(--core-outline-primary)"),
60
+ vScroll && headerSticky && !hScroll && shadows.push("0 5px 0 rgba(0,0,0,0.1)"),
61
+ shadows.length > 0 ? shadows.join(",") : "none";
62
+ }, [ hScroll, vScroll, freezeColumn, headerSticky ]), columnBoxShadow = useMemo(() => {
63
+ const shadows = [];
64
+ return hScroll && freezeColumn && shadows.push("1px 0 0 var(--core-outline-primary)", "5px 0 0 rgba(0,0,0,0.1)"),
65
+ shadows.length > 0 ? shadows.join(",") : "none";
66
+ }, [ hScroll, freezeColumn ]), headerBoxShadow = useMemo(() => {
67
+ const shadows = [];
68
+ return vScroll && headerSticky && shadows.push("0 1px 0 var(--core-outline-primary)", "0 5px 0 rgba(0,0,0,0.1)"),
69
+ shadows.length > 0 ? shadows.join(",") : "none";
70
+ }, [ vScroll, headerSticky ]), cssVars = useMemo(() => ({
71
+ "--table-width": setStyle(width),
72
+ "--table-height": setStyle(height),
73
+ "--table-background-color": backgroundColor,
74
+ "--table-column-box-shadow": columnBoxShadow,
75
+ "--table-header-box-shadow": headerBoxShadow,
76
+ "--table-corner-box-shadow": cornerBoxShadow,
77
+ "--table-header-background-color": headerBackgroundColor,
78
+ "--table-candy-stripe-background-color": candyStripeBackgroundColor,
79
+ "--table-freeze-column-position": freezeColumn ? "sticky" : "relative",
80
+ "--table-header-sticky-position": headerSticky ? "sticky" : "relative",
81
+ "--table-border-color": borderColor,
82
+ "--table-corner-position": freezeColumn || headerSticky ? "sticky" : "relative",
83
+ "--table-corner-left": freezeColumn ? "0px" : "unset",
84
+ "--table-border-width": "none" === borderStyle ? "0" : "1px",
85
+ "--table-border-sides": "box" === borderStyle ? "1px" : "0",
86
+ "--table-handle-hover-color": handleHoverColor,
87
+ "--table-border-radius": "box" === borderStyle ? setStyle(borderRadius) : 0
88
+ }), [ backgroundColor, headerBackgroundColor, candyStripeBackgroundColor, cornerBoxShadow, columnBoxShadow, headerBoxShadow, freezeColumn, headerSticky, width, height, borderColor, borderStyle, handleHoverColor, borderRadius ]), handleCreateRefs = useCallback((el, id) => {
89
+ colRefs.current[id] = el;
90
+ }, []), orderedColumns = useMemo(() => {
91
+ if (!columnOrder) return columnDefinitions;
92
+ const byId = new Map(columnDefinitions.map(column => [ column.id, column ])), ordered = columnOrder.map(id => byId.get(id)).filter(column => !!column), seen = new Set(columnOrder);
93
+ return [ ...ordered, ...columnDefinitions.filter(column => !seen.has(column.id)) ];
94
+ }, [ columnDefinitions, columnOrder ]), {dragResize: dragResize, hoverResize: hoverResize} = function(elements, colResize, setColumnWidths, onColumnResize) {
95
+ const [resizeCol, setResizeCol] = useState(null), [client, setClient] = useState(null), [resizing, setResizing] = useState(!1), didSetListenersRef = useRef(!1), colStartX = useRef(0), lastWidthRef = useRef(0), hasMovedRef = useRef(!1), resolveStartingXPos = useCallback(() => (null == resizeCol ? void 0 : resizeCol.cell) ? resizeCol.cell.getBoundingClientRect().left : 0, [ resizeCol ]), applyHandlePos = useCallback(show => {
96
+ var _a, _b;
97
+ const {cell: cell} = null != resizeCol ? resizeCol : {}, handle = null === (_a = elements.handle) || void 0 === _a ? void 0 : _a.current, parent = null === (_b = elements.parent) || void 0 === _b ? void 0 : _b.current;
98
+ !show && handle ? handle.style.left = "-500px" : resolveDragHandleXPos({
99
+ cell: cell,
100
+ handle: handle,
101
+ parent: parent
102
+ });
103
+ }, [ resizeCol, elements ]), applyWidth = useCallback(clientX => {
104
+ if (!(null == resizeCol ? void 0 : resizeCol.col)) return;
105
+ const newWidth = Math.max(0, clientX - colStartX.current);
106
+ resizeCol.col.style.width = `${newWidth}px`, lastWidthRef.current = newWidth, hasMovedRef.current = !0;
107
+ }, [ resizeCol ]), handleMouseMove = useCallback(e => {
108
+ e.stopPropagation(), e.preventDefault(), setResizing(!0);
109
+ const nextClientPos = (e => {
110
+ if (e.type.startsWith("touch")) {
111
+ const touchEvent = e;
112
+ return {
113
+ x: touchEvent.touches[0].clientX,
114
+ y: touchEvent.touches[0].clientY
115
+ };
116
+ }
117
+ const mouseEvent = e;
118
+ return {
119
+ x: mouseEvent.clientX,
120
+ y: mouseEvent.clientY
121
+ };
122
+ })(e);
123
+ setClient(nextClientPos), applyWidth(nextClientPos.x), applyHandlePos(!0);
124
+ }, [ applyWidth, applyHandlePos ]), handleMouseUp = useCallback(e => {
125
+ if (e.stopPropagation(), e.preventDefault(), resizeCol && hasMovedRef.current) {
126
+ const colId = resizeCol.id, width = lastWidthRef.current;
127
+ setColumnWidths(prev => Object.assign(Object.assign({}, prev), {
128
+ [colId]: width
129
+ })), null == onColumnResize || onColumnResize(colId, width);
130
+ }
131
+ setResizing(!1), setClient(null), applyHandlePos(!1), setResizeCol(null);
132
+ }, [ resizeCol, applyHandlePos, setColumnWidths, onColumnResize ]), initListeners = useCallback(() => {
133
+ didSetListenersRef.current || (document.documentElement.addEventListener("mousemove", handleMouseMove, !1),
134
+ document.documentElement.addEventListener("mouseup", handleMouseUp, !1), document.documentElement.addEventListener("touchmove", handleMouseMove, !1),
135
+ document.documentElement.addEventListener("touchend", handleMouseUp, !1), document.documentElement.style.userSelect = "none",
136
+ document.documentElement.style.webkitUserSelect = "none", document.documentElement.style.cursor = "col-resize",
137
+ colStartX.current = resolveStartingXPos(), didSetListenersRef.current = !0);
138
+ }, [ handleMouseMove, handleMouseUp, resolveStartingXPos ]), clearListeners = useCallback(() => {
139
+ didSetListenersRef.current && (document.documentElement.removeEventListener("mousemove", handleMouseMove),
140
+ document.documentElement.removeEventListener("mouseup", handleMouseUp), document.documentElement.removeEventListener("touchmove", handleMouseMove, !1),
141
+ document.documentElement.removeEventListener("touchend", handleMouseUp, !1), document.documentElement.style.userSelect = "auto",
142
+ document.documentElement.style.webkitUserSelect = "auto", document.documentElement.style.cursor = "default",
143
+ colStartX.current = 0, lastWidthRef.current = 0, hasMovedRef.current = !1, didSetListenersRef.current = !1);
144
+ }, [ handleMouseMove, handleMouseUp ]), dragResize = useCallback((id, e, colRefs) => {
145
+ if (e.stopPropagation(), e.preventDefault(), !colResize) return;
146
+ const cell = e.currentTarget.parentElement, col = colRefs.current[id];
147
+ cell && col && setResizeCol({
148
+ id: id,
149
+ cell: cell,
150
+ col: col
151
+ });
152
+ }, [ colResize ]), hoverResize = useCallback((show, e) => {
153
+ var _a, _b;
154
+ if (!colResize || resizeCol) return;
155
+ const cell = e.currentTarget.parentElement, handle = null === (_a = elements.handle) || void 0 === _a ? void 0 : _a.current, parent = null === (_b = elements.parent) || void 0 === _b ? void 0 : _b.current;
156
+ !show && handle ? handle.style.left = "-500px" : resolveDragHandleXPos({
157
+ cell: cell,
158
+ handle: handle,
159
+ parent: parent
160
+ });
161
+ }, [ resizeCol, colResize, elements ]);
162
+ return useEffect(() => (resizeCol ? initListeners() : clearListeners(), () => clearListeners()), [ resizeCol, initListeners, clearListeners ]),
163
+ {
164
+ clientX: null == client ? void 0 : client.x,
165
+ clientY: null == client ? void 0 : client.y,
166
+ resizing: resizing,
167
+ dragResize: dragResize,
168
+ hoverResize: hoverResize
169
+ };
170
+ }(elements, colResize, setColumnWidths, onColumnResize), {dragStart: dragStart, dragOver: dragOver, dragDrop: dragDrop} = function(columnDefinitions, setColumnOrder, setDraggedColId, onColumnReorder, freezeColumn) {
171
+ const [isDragging, setIsDragging] = React.useState(!1), draggedColId = React.useRef(null), draggedColIndex = React.useRef(null), draggedOverColId = React.useRef(null), initialColumnOrder = React.useRef(null), moveColumn = useCallback((draggedId, targetId) => {
172
+ draggedId !== targetId && setColumnOrder(prev => {
173
+ const currentOrder = null != prev ? prev : columnDefinitions.map(column => column.id), draggedIndex = currentOrder.indexOf(draggedId), targetIndex = currentOrder.indexOf(targetId);
174
+ if (-1 === draggedIndex || -1 === targetIndex) return prev;
175
+ if (freezeColumn && (0 === draggedIndex || 0 === targetIndex)) return prev;
176
+ let next, insertAt;
177
+ return initialColumnOrder.current || (initialColumnOrder.current = currentOrder),
178
+ targetIndex < draggedIndex ? (next = currentOrder.filter(id => id !== draggedId),
179
+ insertAt = next.indexOf(targetId)) : (next = currentOrder.filter(id => id !== draggedId),
180
+ insertAt = next.indexOf(targetId) + 1), next.splice(insertAt, 0, draggedId), null == onColumnReorder || onColumnReorder(next),
181
+ next;
182
+ });
183
+ }, [ columnDefinitions, freezeColumn, onColumnReorder, setColumnOrder ]), dragStart = useCallback((col, e) => {
184
+ e.dataTransfer.setData("text/plain", col.id), draggedColId.current = col.id, setDraggedColId(col.id),
185
+ setIsDragging(!0), initialColumnOrder.current = null;
186
+ }, [ setDraggedColId ]), dragOver = useCallback((col, colIndex, e) => {
187
+ e.preventDefault(), e.stopPropagation(), draggedColIndex.current = colIndex, freezeColumn && 0 === colIndex || draggedOverColId.current !== col.id && draggedColId.current !== col.id && (draggedOverColId.current = col.id,
188
+ draggedColId.current && moveColumn(draggedColId.current, col.id));
189
+ }, [ freezeColumn, moveColumn ]), dragDrop = useCallback((e, global = !1) => {
190
+ e.preventDefault(), initialColumnOrder.current && (global || freezeColumn && 0 === draggedColIndex.current) && (setColumnOrder(initialColumnOrder.current),
191
+ null == onColumnReorder || onColumnReorder(initialColumnOrder.current)), setDraggedColId(null),
192
+ setIsDragging(!1), draggedOverColId.current = null, draggedColId.current = null,
193
+ draggedColIndex.current = null, initialColumnOrder.current = null;
194
+ }, [ setColumnOrder, setDraggedColId, freezeColumn, onColumnReorder ]), handleGlobalOver = useCallback(e => {
195
+ e.preventDefault(), draggedOverColId.current = null, draggedColIndex.current = null;
196
+ }, []), handleGlobalDrop = useCallback(e => dragDrop(e, !0), [ dragDrop ]);
197
+ return useEffect(() => {
198
+ if (isDragging) return document.addEventListener("drop", handleGlobalDrop), document.addEventListener("dragover", handleGlobalOver),
199
+ () => {
200
+ document.removeEventListener("drop", handleGlobalDrop), document.removeEventListener("dragover", handleGlobalOver);
201
+ };
202
+ }, [ isDragging, handleGlobalDrop, handleGlobalOver ]), {
203
+ dragStart: dragStart,
204
+ dragOver: dragOver,
205
+ dragDrop: dragDrop
206
+ };
207
+ }(columnDefinitions, setColumnOrder, setDraggedColId, onColumnReorder, freezeColumn), handleScroll = useCallback(() => {
208
+ var _a, _b, _c, _d;
209
+ const hScrollAmount = null !== (_b = null === (_a = wrapperRef.current) || void 0 === _a ? void 0 : _a.scrollLeft) && void 0 !== _b ? _b : 0, vScrollAmount = null !== (_d = null === (_c = wrapperRef.current) || void 0 === _c ? void 0 : _c.scrollTop) && void 0 !== _d ? _d : 0;
210
+ setHScroll(hScrollAmount > 0), setVScroll(vScrollAmount > 0);
211
+ }, []), rows = useMemo(() => [ ...filter ? tableData.filter((row, index, array) => filter(row, index, array)) : tableData ].sort((a, b) => {
212
+ if (!(null == sortKey ? void 0 : sortKey.key)) return 0;
213
+ const {key: key, dir: dir} = sortKey;
214
+ if (a[key] === b[key]) return 0;
215
+ return (a[key] > b[key] ? 1 : -1) * ("desc" === dir ? -1 : 1);
216
+ }), [ tableData, filter, sortKey ]), handleCellHover = useCallback((col, colId, row, rowId, over) => {
217
+ over ? (setHoveredRow(rowId), onMouseOver && onMouseOver(col, colId, row, rowId)) : (setHoveredRow(prev => prev === rowId ? null : prev),
218
+ onMouseOut && onMouseOut(col, colId, row, rowId));
219
+ }, [ onMouseOut, onMouseOver ]), handleClick = useCallback((col, colId, row, rowId, dbl) => {
220
+ dbl && onDoubleClick ? onDoubleClick(col, colId, row, rowId) : onClick && onClick(col, colId, row, rowId);
221
+ }, [ onDoubleClick, onClick ]), resolveCellBG = useCallback(rowId => backgroundColorHoverRow && hoveredRow === rowId ? backgroundColorHoverRow : !!candyStripeBackgroundColor && rowId % 2 != 0 ? candyStripeBackgroundColor : backgroundColor, [ hoveredRow, backgroundColorHoverRow, candyStripeBackgroundColor, backgroundColor ]), handleSort = useCallback(key => {
222
+ if (!key) return;
223
+ const next = (null == sortKey ? void 0 : sortKey.key) === key ? {
224
+ key: key,
225
+ dir: "asc" === (null == sortKey ? void 0 : sortKey.dir) ? "desc" : "asc"
226
+ } : {
227
+ key: key,
228
+ dir: "asc"
229
+ };
230
+ let didChange = !0;
231
+ (null == sortKey ? void 0 : sortKey.key) === (null == next ? void 0 : next.key) && (null == sortKey ? void 0 : sortKey.dir) === (null == next ? void 0 : next.dir) && (didChange = !1),
232
+ didChange && (setSortKey(next), null == onSortChange || onSortChange(next));
233
+ }, [ sortKey, onSortChange ]), resolveAriaSort = useCallback(column => {
234
+ const sortable = void 0 !== column.sort, isSortedColumn = sortable && (null == sortKey ? void 0 : sortKey.key) === column.sort;
235
+ if (sortable) return isSortedColumn ? "asc" === (null == sortKey ? void 0 : sortKey.dir) ? "ascending" : "descending" : void 0;
236
+ }, [ sortKey ]), renderCellResizeHandle = useCallback((last, col) => last || !colResize ? null : jsx("div", {
237
+ className: styles.colResizeHandle,
238
+ onMouseDown: e => dragResize(col.id, e, colRefs),
239
+ onMouseOver: e => hoverResize(!0, e),
240
+ onFocus: e => hoverResize(!0, e),
241
+ onMouseOut: e => hoverResize(!1, e),
242
+ onBlur: e => hoverResize(!1, e)
243
+ }), [ colResize, dragResize, hoverResize ]), renderHeader = useCallback((col, sortKey) => {
244
+ if (col.renderHeader) {
245
+ return (0, col.renderHeader)({
246
+ column: col,
247
+ sortKey: sortKey
248
+ });
249
+ }
250
+ return jsx(DefaultHeaderRenderer, {
251
+ col: col,
252
+ sortKey: sortKey
253
+ });
254
+ }, []), renderBodyCell = useCallback((col, row, rowIndex) => {
255
+ const value = function(col, row) {
256
+ return col.accessor ? col.accessor(row) : void 0 !== col.key ? row[col.key] : void 0;
257
+ }(col, row);
258
+ if (col.renderCell) {
259
+ return (0, col.renderCell)({
260
+ row: row,
261
+ value: value,
262
+ rowIndex: rowIndex
263
+ });
264
+ }
265
+ return jsx(DefaultCellRenderer, {
266
+ value: value
267
+ });
268
+ }, []);
269
+ return useEffect(() => {
270
+ setSortKey(prev => (null == prev ? void 0 : prev.key) === (null == sort ? void 0 : sort.key) && (null == prev ? void 0 : prev.dir) === (null == sort ? void 0 : sort.dir) ? prev : sort);
271
+ }, [ sort ]), jsxs("div", {
272
+ ref: wrapperRef,
273
+ className: `${styles.tableWrapper} ${styles.scroll}`,
274
+ style: cssVars,
275
+ onScroll: handleScroll,
276
+ children: [ jsxs("table", {
277
+ className: styles.table,
278
+ children: [ jsx("caption", {
279
+ children: caption
280
+ }), jsx("colgroup", {
281
+ children: orderedColumns.map(column => {
282
+ var _a;
283
+ return jsx("col", {
284
+ ref: el => handleCreateRefs(el, column.id),
285
+ style: {
286
+ width: setStyle(null !== (_a = columnWidths[column.id]) && void 0 !== _a ? _a : column.width)
287
+ }
288
+ }, column.id);
289
+ })
290
+ }), jsx("thead", {
291
+ children: jsx("tr", {
292
+ children: orderedColumns.map((col, colIndex) => {
293
+ const padding = setStyle(col.padding, 16), sortable = void 0 !== col.sort, cursor = sortable ? "pointer" : "default", last = colIndex === orderedColumns.length - 1, opacity = draggedColId === col.id ? .2 : 1;
294
+ return jsxs("th", {
295
+ "data-column-id": col.id,
296
+ className: `${styles.baseCell} ${styles.headerCell} ${styles.m}`,
297
+ onClick: () => handleSort(col.sort),
298
+ onKeyDown: e => accessibleKeyDown(e, () => handleSort(col.sort)),
299
+ style: {
300
+ cursor: cursor,
301
+ opacity: opacity
302
+ },
303
+ tabIndex: sortable ? 0 : void 0,
304
+ role: sortable ? "columnheader" : void 0,
305
+ "aria-sort": resolveAriaSort(col),
306
+ draggable: !(freezeColumn && 0 === colIndex),
307
+ onDragStart: e => dragStart(col, e),
308
+ onDragOver: e => dragOver(col, colIndex, e),
309
+ onDrop: e => dragDrop(e),
310
+ onDragEnd: e => dragDrop(e, !0),
311
+ children: [ renderCellResizeHandle(last, col), jsx("div", {
312
+ className: styles.headerCellWrapper,
313
+ style: {
314
+ padding: padding
315
+ },
316
+ children: renderHeader(col, sortKey)
317
+ }) ]
318
+ }, col.id);
319
+ })
320
+ })
321
+ }), jsx("tbody", {
322
+ children: rows.map((row, rowIndex) => jsx("tr", {
323
+ children: orderedColumns.map((col, colIndex) => {
324
+ const justifyContent = resolveAlignValue(col.justify), alignItems = resolveAlignValue(col.align), padding = setStyle(col.padding, 16), whiteSpace = col.nowrap ? "nowrap" : "", background = resolveCellBG(rowIndex), last = colIndex === orderedColumns.length - 1, opacity = draggedColId === col.id ? .2 : 1;
325
+ return jsxs("td", {
326
+ "data-column-id": `${colIndex}.${rowIndex}`,
327
+ className: `${styles.baseCell} ${styles.m}`,
328
+ onClick: () => handleClick(col, colIndex, row, rowIndex, !1),
329
+ onDoubleClick: () => handleClick(col, colIndex, row, rowIndex, !0),
330
+ onKeyDown: e => accessibleKeyDown(e, () => handleClick(col, colIndex, row, rowIndex, !1)),
331
+ onMouseOver: () => handleCellHover(col, colIndex, row, rowIndex, !0),
332
+ onFocus: () => handleCellHover(col, colIndex, row, rowIndex, !0),
333
+ onMouseOut: () => handleCellHover(col, colIndex, row, rowIndex, !1),
334
+ onBlur: () => handleCellHover(col, colIndex, row, rowIndex, !1),
335
+ style: {
336
+ background: background,
337
+ opacity: opacity
338
+ },
339
+ children: [ renderCellResizeHandle(last, col), jsx("div", {
340
+ className: styles.baseCellWrapper,
341
+ style: {
342
+ justifyContent: justifyContent,
343
+ alignItems: alignItems,
344
+ padding: padding,
345
+ whiteSpace: whiteSpace
346
+ },
347
+ children: renderBodyCell(col, row, rowIndex)
348
+ }) ]
349
+ }, col.id);
350
+ })
351
+ }, getRowId ? getRowId(row, rowIndex) : rowIndex))
352
+ }) ]
353
+ }), jsx("div", {
354
+ className: styles.resizeBar,
355
+ ref: resizeBarRef
356
+ }) ]
357
+ });
358
+ }
359
+
360
+ function DefaultHeaderRenderer(props) {
361
+ const {col: col, sortKey: sortKey} = props, sortable = !!col.sort, sorted = !(!(null == sortKey ? void 0 : sortKey.key) || sortKey.key !== col.sort), sortIcon = "asc" === (null == sortKey ? void 0 : sortKey.dir) ? "arrow up" : "arrow down";
362
+ return jsxs("div", {
363
+ className: styles.header,
364
+ children: [ jsx("div", {
365
+ className: styles.headerLeft
366
+ }), jsx("div", {
367
+ className: styles.headerTitle,
368
+ children: col.title
369
+ }), jsx("div", {
370
+ className: styles.headerRight,
371
+ children: sortable && jsx(Icon, {
372
+ name: sorted ? sortIcon : "blank",
373
+ pointerEvents: "none",
374
+ size: 16
375
+ })
376
+ }) ]
377
+ });
378
+ }
379
+
380
+ function DefaultCellRenderer(props) {
381
+ var _a;
382
+ const {value: value} = props;
383
+ return null !== (_a = null == value ? void 0 : value.toString()) && void 0 !== _a ? _a : "";
384
+ }
385
+
386
+ function createDefaultViewState(columns) {
387
+ return {
388
+ columnOrder: columns.map(column => column.id)
389
+ };
390
+ }
391
+
392
+ function applyDataTableViewState(columns, state) {
393
+ var _a;
394
+ if (!state) return columns;
395
+ const byId = new Map(columns.map(column => [ column.id, column ])), hidden = new Set(null !== (_a = state.hiddenColumns) && void 0 !== _a ? _a : []), seen = new Set, ordered = [];
396
+ for (const id of state.columnOrder) {
397
+ if (seen.has(id) || hidden.has(id)) continue;
398
+ const column = byId.get(id);
399
+ column && (seen.add(id), ordered.push(column));
400
+ }
401
+ for (const column of columns) seen.has(column.id) || hidden.has(column.id) || (seen.add(column.id),
402
+ ordered.push(column));
403
+ if (!state.columnWidths) return ordered;
404
+ const widths = state.columnWidths;
405
+ return ordered.map(column => column.id in widths ? Object.assign(Object.assign({}, column), {
406
+ width: widths[column.id]
407
+ }) : column);
408
+ }
409
+
410
+ function resolveSortFromViewState(columns, state) {
411
+ if (!(null == state ? void 0 : state.sort)) return;
412
+ const column = columns.find(c => {
413
+ var _a;
414
+ return c.id === (null === (_a = state.sort) || void 0 === _a ? void 0 : _a.columnId);
415
+ });
416
+ return (null == column ? void 0 : column.sort) ? {
417
+ key: column.sort,
418
+ dir: state.sort.dir
419
+ } : void 0;
420
+ }
421
+
422
+ function captureSortToViewState(columns, sort) {
423
+ if (!(null == sort ? void 0 : sort.key)) return;
424
+ const column = columns.find(c => c.sort === sort.key);
425
+ return column ? {
426
+ columnId: column.id,
427
+ dir: sort.dir
428
+ } : void 0;
429
+ }
430
+
431
+ export { DataTable as D, applyDataTableViewState as a, createColumnHelper as b, captureSortToViewState as c, createDefaultViewState as d, resolveSortFromViewState as r };
@@ -1,4 +1,4 @@
1
- import { a as __awaiter } from "./tslib.es6-l-UorzsO.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-C0yUTS6p.mjs";
2
2
 
3
3
  import { create } from "zustand";
4
4
 
@@ -1,8 +1,8 @@
1
- import { a as __awaiter } from "./tslib.es6-l-UorzsO.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-C0yUTS6p.mjs";
2
2
 
3
3
  import { create } from "zustand";
4
4
 
5
- import { W as WebRTCConnection } from "./WebRTCConnection-Bj2D6Sa_.mjs";
5
+ import { W as WebRTCConnection } from "./WebRTCConnection-C_MYSUKv.mjs";
6
6
 
7
7
  const useWebRTCStore = create((set, get) => ({
8
8
  connections: [],
@@ -1,4 +1,4 @@
1
- import { a as __awaiter } from "./tslib.es6-l-UorzsO.mjs";
1
+ import { _ as __awaiter } from "./tslib.es6-C0yUTS6p.mjs";
2
2
 
3
3
  import { create } from "zustand";
4
4
 
@@ -1,6 +1,6 @@
1
- export { A as AudioBubble } from "../../chunks/AudioBubble-RmRIS-7d.mjs";
1
+ export { A as AudioBubble } from "../../chunks/AudioBubble-RS8y7dsg.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-l-UorzsO.mjs";
3
+ import "../../chunks/tslib.es6-C0yUTS6p.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
@@ -24,18 +24,8 @@ import "../../theme/type.mjs";
24
24
 
25
25
  import "../../hooks/useObserveTheme.mjs";
26
26
 
27
- import "../../chunks/colors-oLvyNYnR.mjs";
27
+ import "../../chunks/colors-DcRJdJ4W.mjs";
28
28
 
29
- import "../../chunks/audioVisualizer-DqfUbZLW.mjs";
30
-
31
- import "../../chunks/webRTCStore-FL1z4Odf.mjs";
32
-
33
- import "zustand";
34
-
35
- import "../../chunks/WebRTCConnection-Bj2D6Sa_.mjs";
36
-
37
- import "../../chunks/microphoneStore-CO8-b4gt.mjs";
38
-
39
- import "../../chunks/volumeStore-DHoAeahx.mjs";
29
+ import "../../chunks/audioVisualizer-CKobQkae.mjs";
40
30
 
41
31
  import "../../hooks/useWindow.mjs";
@@ -1,9 +1,9 @@
1
- export { A as Avatar } from "../../chunks/Avatar-BFo6BjmH.mjs";
1
+ export { A as Avatar } from "../../chunks/Avatar-aAJORBJw.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-l-UorzsO.mjs";
3
+ import "../../chunks/tslib.es6-C0yUTS6p.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
7
7
  import "react";
8
8
 
9
- import "../../chunks/misc-DBWrv8Kl.mjs";
9
+ import "../../chunks/misc-B9d7ECMP.mjs";
@@ -1,11 +1,11 @@
1
- export { A as AvatarGroup } from "../../chunks/AvatarGroup-E3J2SSMv.mjs";
1
+ export { A as AvatarGroup } from "../../chunks/AvatarGroup-De2PfopD.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-l-UorzsO.mjs";
3
+ import "../../chunks/tslib.es6-C0yUTS6p.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
7
7
  import "react";
8
8
 
9
- import "../../chunks/Avatar-BFo6BjmH.mjs";
9
+ import "../../chunks/Avatar-aAJORBJw.mjs";
10
10
 
11
- import "../../chunks/misc-DBWrv8Kl.mjs";
11
+ import "../../chunks/misc-B9d7ECMP.mjs";
@@ -1,6 +1,6 @@
1
- export { B as Badge } from "../../chunks/Badge-BNoFISPQ.mjs";
1
+ export { B as Badge } from "../../chunks/Badge--3RVYqU8.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-l-UorzsO.mjs";
3
+ import "../../chunks/tslib.es6-C0yUTS6p.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
@@ -1,6 +1,6 @@
1
- export { B as Button } from "../../chunks/Button-CZb74NLO.mjs";
1
+ export { B as Button } from "../../chunks/Button-BdZR6DjE.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-l-UorzsO.mjs";
3
+ import "../../chunks/tslib.es6-C0yUTS6p.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
@@ -8,11 +8,11 @@ import "motion/react";
8
8
 
9
9
  import "react";
10
10
 
11
- import "../../chunks/Badge-BNoFISPQ.mjs";
11
+ import "../../chunks/Badge--3RVYqU8.mjs";
12
12
 
13
- import "../../chunks/Dot-DuRIiyRz.mjs";
13
+ import "../../chunks/Dot-B4fdZ-qc.mjs";
14
14
 
15
- import "../../chunks/Icon-CpLHegV5.mjs";
15
+ import "../../chunks/Icon-BfSLuS2u.mjs";
16
16
 
17
17
  import "../../hooks/useTheme.mjs";
18
18
 
@@ -32,20 +32,10 @@ import "../../theme/type.mjs";
32
32
 
33
33
  import "../../hooks/useObserveTheme.mjs";
34
34
 
35
- import "../../chunks/misc-DBWrv8Kl.mjs";
36
-
37
- import "../../chunks/webRTCStore-FL1z4Odf.mjs";
38
-
39
- import "zustand";
40
-
41
- import "../../chunks/WebRTCConnection-Bj2D6Sa_.mjs";
42
-
43
- import "../../chunks/microphoneStore-CO8-b4gt.mjs";
44
-
45
- import "../../chunks/volumeStore-DHoAeahx.mjs";
35
+ import "../../chunks/misc-B9d7ECMP.mjs";
46
36
 
47
37
  import "../../hooks/useWindow.mjs";
48
38
 
49
- import "../../chunks/ProgressIndicator-hbzhNcoD.mjs";
39
+ import "../../chunks/ProgressIndicator-Bv7actNC.mjs";
50
40
 
51
- import "../../chunks/sharedTypes-B6V0j136.mjs";
41
+ import "../../chunks/sharedTypes-DikFhWJ8.mjs";
@@ -1,14 +1,14 @@
1
- export { B as ButtonBar } from "../../chunks/ButtonBar-CXmffNHp.mjs";
1
+ export { B as ButtonBar } from "../../chunks/ButtonBar-aXeHOw1R.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-l-UorzsO.mjs";
3
+ import "../../chunks/tslib.es6-C0yUTS6p.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
7
7
  import "react";
8
8
 
9
- import "../../chunks/misc-DBWrv8Kl.mjs";
9
+ import "../../chunks/misc-B9d7ECMP.mjs";
10
10
 
11
- import "../../chunks/Icon-CpLHegV5.mjs";
11
+ import "../../chunks/Icon-BfSLuS2u.mjs";
12
12
 
13
13
  import "../../hooks/useTheme.mjs";
14
14
 
@@ -28,14 +28,4 @@ import "../../theme/type.mjs";
28
28
 
29
29
  import "../../hooks/useObserveTheme.mjs";
30
30
 
31
- import "../../chunks/webRTCStore-FL1z4Odf.mjs";
32
-
33
- import "zustand";
34
-
35
- import "../../chunks/WebRTCConnection-Bj2D6Sa_.mjs";
36
-
37
- import "../../chunks/microphoneStore-CO8-b4gt.mjs";
38
-
39
- import "../../chunks/volumeStore-DHoAeahx.mjs";
40
-
41
31
  import "../../hooks/useWindow.mjs";
@@ -1,6 +1,6 @@
1
- export { C as Camera } from "../../chunks/Camera-DHgbAEUm.mjs";
1
+ export { C as Camera } from "../../chunks/Camera-1ccvR8X_.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-l-UorzsO.mjs";
3
+ import "../../chunks/tslib.es6-C0yUTS6p.mjs";
4
4
 
5
5
  import "react/jsx-runtime";
6
6
 
@@ -24,22 +24,12 @@ import "../../theme/type.mjs";
24
24
 
25
25
  import "../../hooks/useObserveTheme.mjs";
26
26
 
27
- import "../../chunks/misc-DBWrv8Kl.mjs";
27
+ import "../../chunks/misc-B9d7ECMP.mjs";
28
28
 
29
- import "../../chunks/colors-oLvyNYnR.mjs";
30
-
31
- import "../../chunks/webRTCStore-FL1z4Odf.mjs";
32
-
33
- import "zustand";
34
-
35
- import "../../chunks/WebRTCConnection-Bj2D6Sa_.mjs";
36
-
37
- import "../../chunks/microphoneStore-CO8-b4gt.mjs";
38
-
39
- import "../../chunks/volumeStore-DHoAeahx.mjs";
29
+ import "../../chunks/colors-DcRJdJ4W.mjs";
40
30
 
41
31
  import "../../hooks/useWindow.mjs";
42
32
 
43
- import "../../chunks/Avatar-BFo6BjmH.mjs";
33
+ import "../../chunks/Avatar-aAJORBJw.mjs";
44
34
 
45
- import "../../chunks/Icon-CpLHegV5.mjs";
35
+ import "../../chunks/Icon-BfSLuS2u.mjs";