@apple-pie/slice 0.1.45 → 0.1.47

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 (292) hide show
  1. package/dist/cjs/chunks/{AudioBubble-DSKLRflw.js → AudioBubble-7MRDr6oW.js} +5 -3
  2. package/dist/cjs/chunks/{Avatar-CFcsdTuN.js → Avatar-BEQvuKXB.js} +1 -1
  3. package/dist/cjs/chunks/{AvatarGroup-CMd6AE9B.js → AvatarGroup-BBigZoAv.js} +1 -1
  4. package/dist/cjs/chunks/{Badge-C__w6y3X.js → Badge-BvSSeAAt.js} +1 -1
  5. package/dist/cjs/chunks/{Button-BLdW3YU9.js → Button-DXQNFBaZ.js} +1 -1
  6. package/dist/cjs/chunks/{ButtonBar-CL4kiqgc.js → ButtonBar-BXo6dNuf.js} +1 -1
  7. package/dist/cjs/chunks/{Camera-BmLMOBRg.js → Camera-BPQ1yF3e.js} +6 -4
  8. package/dist/cjs/chunks/{CheckBox-Cihl0IrF.js → CheckBox-OnTqLOoy.js} +1 -1
  9. package/dist/cjs/chunks/{Chip-BfD_0Cig.js → Chip-ekl1KQ93.js} +1 -1
  10. package/dist/cjs/chunks/{DivInput-LIJ7zv8H.js → DivInput-D3SEX8J9.js} +1 -1
  11. package/dist/cjs/chunks/{Dot-Bj2a76Ta.js → Dot-03FuwY2T.js} +1 -1
  12. package/dist/cjs/chunks/{DrggablePanel-CqzMpyGs.js → DrggablePanel-CzMav9ix.js} +5 -3
  13. package/dist/cjs/chunks/{DropDown-pWYMxruM.js → DropDown-DZmhSeRX.js} +1 -1
  14. package/dist/cjs/chunks/{ErrorSummary-ClLL68U3.js → ErrorSummary-DWQIY4M8.js} +5 -3
  15. package/dist/cjs/chunks/{FileIcon-z21zrEc2.js → FileIcon-CtEGJMf1.js} +5 -4
  16. package/dist/cjs/chunks/{FileList-qY-irjP-.js → FileList-31XpLMih.js} +1 -1
  17. package/dist/cjs/chunks/{FlexDiv-DgR6u9Jv.js → FlexDiv-CC6KADWm.js} +1 -1
  18. package/dist/cjs/chunks/{Grouper-DeYMKA1T.js → Grouper-B9qnrP-4.js} +4 -3
  19. package/dist/cjs/chunks/{Icon-tc6LQovS.js → Icon-CiZuv_Ch.js} +5 -3
  20. package/dist/cjs/chunks/{IconButton-LoaWO9zY.js → IconButton-C6ZUdM8z.js} +1 -1
  21. package/dist/cjs/chunks/{IndexedDB-CYqvMLuZ.js → IndexedDB-DFFn9mqX.js} +1 -1
  22. package/dist/cjs/chunks/{Label-T84i3rWo.js → Label-B7bBplmn.js} +1 -1
  23. package/dist/cjs/chunks/{Level-OEsy5yT2.js → Level-DwSesAi0.js} +5 -1
  24. package/dist/cjs/chunks/{Modal-DqXuXPge.js → Modal-BPPojCas.js} +1 -1
  25. package/dist/cjs/chunks/{ModalController-C91kCSxO.js → ModalController-BGEq6nZW.js} +3 -2
  26. package/dist/cjs/chunks/{Overlay-D3QPWT8O.js → Overlay-BTyVHmZi.js} +1 -1
  27. package/dist/cjs/chunks/{Pager-CLtuO3Sv.js → Pager-CyJRXuXt.js} +1 -1
  28. package/dist/cjs/chunks/{ProgressIndicator-DI1fY8vp.js → ProgressIndicator-DywiCVkO.js} +5 -3
  29. package/dist/cjs/chunks/{PromptInput-BMnpfTXt.js → PromptInput-Cg5z8XMK.js} +6 -4
  30. package/dist/cjs/chunks/{RadioButton-CzkQTfqG.js → RadioButton-3LQ__XHx.js} +1 -1
  31. package/dist/cjs/chunks/{RadioButtonList-CVkww1_P.js → RadioButtonList-CCmGGzhD.js} +1 -1
  32. package/dist/cjs/chunks/{Slider-9ze6h-KZ.js → Slider-DEvyBgim.js} +5 -3
  33. package/dist/cjs/chunks/{Spacer-DuipTdw1.js → Spacer-DzKg1JZN.js} +1 -1
  34. package/dist/cjs/chunks/{Switch-Bug1jQu4.js → Switch-BCnrGlFd.js} +1 -1
  35. package/dist/cjs/chunks/{TabBar-CLDId1LR.js → TabBar-tawvDdQ9.js} +6 -4
  36. package/dist/cjs/chunks/{TextArea-DyQZBTPs.js → TextArea-BCmck_Bu.js} +1 -1
  37. package/dist/cjs/chunks/{TextField-BR-pQK87.js → TextField-D0ig3i5Z.js} +6 -4
  38. package/dist/cjs/chunks/{Tip-BvGX_YgV.js → Tip-DPAa_tZz.js} +1 -1
  39. package/dist/cjs/chunks/{Toast-D7pGWE3h.js → Toast-CjSm6wKq.js} +6 -4
  40. package/dist/cjs/chunks/{ToggleButton-8NaB4UUl.js → ToggleButton-cNIopPE-.js} +1 -1
  41. package/dist/cjs/chunks/{UploadArea-G-mBqjb7.js → UploadArea-DoJuVudV.js} +1 -1
  42. package/dist/cjs/chunks/{Video-Ba3wg6jb.js → Video-M1-jtah8.js} +1 -1
  43. package/dist/cjs/chunks/{VideoController-BKzIJmMa.js → VideoController-Cghf-ihF.js} +4 -3
  44. package/dist/cjs/chunks/{WSConnection-DMrqNo3k.js → WSConnection-BERcrJfr.js} +1 -1
  45. package/dist/cjs/chunks/{WebRTCConnection-DNnDh6-M.js → WebRTCConnection-Dd5i5Vsn.js} +1 -1
  46. package/dist/cjs/chunks/broadcastChannel-D1XhG6Q1.js +75 -0
  47. package/dist/cjs/chunks/browserChannelsStore-CPJhMFtD.js +96 -0
  48. package/dist/cjs/chunks/{localDBStore-BTA4H5xb.js → localDBStore-CzLeudjH.js} +4 -2
  49. package/dist/cjs/chunks/{microphoneStore-Gd9Pi7xk.js → microphoneStore-BkaENcMx.js} +1 -1
  50. package/dist/cjs/chunks/{misc-DwqTFwbJ.js → misc-BzvE_9R_.js} +1 -1
  51. package/dist/cjs/chunks/{sseStore-BLzihLI9.js → sseStore-C9XlDamt.js} +4 -2
  52. package/dist/cjs/chunks/{uploads-worker-b6jenaeT.js → uploads-worker-ZLJR3WZA.js} +1 -1
  53. package/dist/cjs/chunks/{uploadsStore-BdD0blGO.js → uploadsStore-xzGjSmYP.js} +2 -2
  54. package/dist/cjs/chunks/{viewState-DgJIoERG.js → viewState-6P26uORS.js} +6 -4
  55. package/dist/cjs/chunks/{volumeStore-BU9B-kDV.js → volumeStore-D5uQzCPQ.js} +1 -1
  56. package/dist/cjs/chunks/{webRTCStore-U1mlk90q.js → webRTCStore-CgLUjMDH.js} +3 -1
  57. package/dist/cjs/chunks/{windowStore-qDiDW4v-.js → windowStore-De7LtHFd.js} +1 -1
  58. package/dist/cjs/components/AudioBubble/index.js +6 -5
  59. package/dist/cjs/components/Avatar/index.js +3 -3
  60. package/dist/cjs/components/AvatarGroup/index.js +3 -3
  61. package/dist/cjs/components/Badge/index.js +2 -2
  62. package/dist/cjs/components/Button/index.js +9 -8
  63. package/dist/cjs/components/ButtonBar/index.js +6 -5
  64. package/dist/cjs/components/Camera/index.js +8 -7
  65. package/dist/cjs/components/CheckBox/index.js +6 -5
  66. package/dist/cjs/components/Chip/index.js +7 -6
  67. package/dist/cjs/components/DataTable/index.js +7 -6
  68. package/dist/cjs/components/DivInput/index.js +3 -3
  69. package/dist/cjs/components/Dot/index.js +2 -2
  70. package/dist/cjs/components/DraggablePanel/index.js +6 -5
  71. package/dist/cjs/components/DropDown/index.js +6 -5
  72. package/dist/cjs/components/ErrorSummary/index.js +6 -5
  73. package/dist/cjs/components/FileIcon/index.js +6 -5
  74. package/dist/cjs/components/FileList/index.js +7 -6
  75. package/dist/cjs/components/FlexDiv/index.js +2 -2
  76. package/dist/cjs/components/Grouper/index.js +7 -6
  77. package/dist/cjs/components/Icon/index.js +6 -5
  78. package/dist/cjs/components/IconButton/index.js +9 -8
  79. package/dist/cjs/components/Label/index.js +3 -3
  80. package/dist/cjs/components/Level/index.js +4 -4
  81. package/dist/cjs/components/Modal/index.js +10 -9
  82. package/dist/cjs/components/ModalController/index.js +6 -5
  83. package/dist/cjs/components/Overlay/index.js +2 -2
  84. package/dist/cjs/components/Pager/index.js +3 -3
  85. package/dist/cjs/components/Progress/index.js +6 -5
  86. package/dist/cjs/components/PromptInput/index.js +10 -9
  87. package/dist/cjs/components/RadioButton/index.js +6 -5
  88. package/dist/cjs/components/RadioButtonList/index.js +7 -6
  89. package/dist/cjs/components/Slider/index.js +6 -5
  90. package/dist/cjs/components/Spacer/index.js +2 -2
  91. package/dist/cjs/components/Switch/index.js +2 -2
  92. package/dist/cjs/components/TabBar/index.js +9 -8
  93. package/dist/cjs/components/TextArea/index.js +9 -8
  94. package/dist/cjs/components/Textfield/index.js +10 -9
  95. package/dist/cjs/components/Tip/index.js +3 -3
  96. package/dist/cjs/components/Toast/index.js +7 -6
  97. package/dist/cjs/components/ToggleButton/index.js +9 -8
  98. package/dist/cjs/components/UploadArea/index.js +8 -7
  99. package/dist/cjs/components/Video/index.js +12 -11
  100. package/dist/cjs/components/VideoController/index.js +10 -9
  101. package/dist/cjs/hooks/useAudioRecorder.js +1 -1
  102. package/dist/cjs/hooks/useBindWebRTC.js +3 -2
  103. package/dist/cjs/hooks/useClipboard.js +127 -0
  104. package/dist/cjs/hooks/useMdStreamBuffer.js +2 -2
  105. package/dist/cjs/hooks/useMicrophone.js +1 -1
  106. package/dist/cjs/hooks/useTrackRenders.js +2 -2
  107. package/dist/cjs/hooks.js +7 -5
  108. package/dist/cjs/index.js +14 -12
  109. package/dist/cjs/stores/LocalDB.js +6 -6
  110. package/dist/cjs/stores/SSE.js +6 -5
  111. package/dist/cjs/stores/WS.js +4 -2
  112. package/dist/cjs/stores/WebRTC.js +6 -6
  113. package/dist/cjs/stores/browserChannel.js +10 -0
  114. package/dist/cjs/stores/microphone.js +2 -2
  115. package/dist/cjs/stores/modal.js +1 -1
  116. package/dist/cjs/stores/tip.js +1 -1
  117. package/dist/cjs/stores/toast.js +1 -1
  118. package/dist/cjs/stores/uploads.js +2 -2
  119. package/dist/cjs/stores/video.js +1 -1
  120. package/dist/cjs/stores/volume.js +2 -2
  121. package/dist/cjs/stores/window.js +2 -2
  122. package/dist/cjs/stores.js +47 -41
  123. package/dist/cjs/utils/index.js +9 -3
  124. package/dist/cjs/utils/objects/index.js +9 -3
  125. package/dist/cjs/workers/uploads/uploads.js +2 -2
  126. package/dist/esm/chunks/{AudioBubble-C8RHNRZ_.mjs → AudioBubble-sDq1KbG4.mjs} +9 -5
  127. package/dist/esm/chunks/{Avatar-B5dBNLzt.mjs → Avatar-CgH69dGS.mjs} +2 -2
  128. package/dist/esm/chunks/{AvatarGroup-CXIojYDR.mjs → AvatarGroup-CVcONno4.mjs} +2 -2
  129. package/dist/esm/chunks/{Badge-CMEuRMVe.mjs → Badge-V0fkzlfk.mjs} +1 -1
  130. package/dist/esm/chunks/{Button-DvW5z2Fy.mjs → Button-CL0LKJDc.mjs} +6 -6
  131. package/dist/esm/chunks/{ButtonBar-CFxfVpe3.mjs → ButtonBar-BPLc12tE.mjs} +3 -3
  132. package/dist/esm/chunks/{Camera-BV_CFREh.mjs → Camera-D6KBmxd_.mjs} +11 -7
  133. package/dist/esm/chunks/{CheckBox-DHFFL-Jq.mjs → CheckBox-iVGppX1l.mjs} +3 -3
  134. package/dist/esm/chunks/{Chip-Cuh20guW.mjs → Chip-DO5g84bY.mjs} +4 -4
  135. package/dist/esm/chunks/{DivInput-BxW5ri5Q.mjs → DivInput-D5m-4myl.mjs} +2 -2
  136. package/dist/esm/chunks/{Dot-zriuPgn8.mjs → Dot-sfjq9c6Z.mjs} +1 -1
  137. package/dist/esm/chunks/{DrggablePanel-hAxQGwCH.mjs → DrggablePanel-IO_BrX30.mjs} +8 -4
  138. package/dist/esm/chunks/{DropDown-B0CYM8o5.mjs → DropDown-BBLh_fWy.mjs} +3 -3
  139. package/dist/esm/chunks/{ErrorSummary-I17C5u75.mjs → ErrorSummary-B0YJ3i5i.mjs} +8 -4
  140. package/dist/esm/chunks/{FileIcon-CuIzwDJs.mjs → FileIcon-hM81mI8u.mjs} +8 -4
  141. package/dist/esm/chunks/{FileList-DhitNTMJ.mjs → FileList-BCkq2RDu.mjs} +5 -5
  142. package/dist/esm/chunks/{FlexDiv-DMXeGSEr.mjs → FlexDiv-DXMUnFLf.mjs} +1 -1
  143. package/dist/esm/chunks/{Grouper-BfkNOB5K.mjs → Grouper-16TyXy09.mjs} +9 -5
  144. package/dist/esm/chunks/{Icon-QUVzyYBt.mjs → Icon-DfeRt_ez.mjs} +8 -4
  145. package/dist/esm/chunks/{IconButton-DIodt9r2.mjs → IconButton-VzkyqbvH.mjs} +5 -5
  146. package/dist/esm/chunks/{IndexedDB-DHk5y9UO.mjs → IndexedDB-Dr5zANnZ.mjs} +1 -1
  147. package/dist/esm/chunks/{Label-DlYEhytS.mjs → Label-D1Z4Zouo.mjs} +2 -2
  148. package/dist/esm/chunks/{Level-BpxVLm1m.mjs → Level-ChdkPG6_.mjs} +5 -3
  149. package/dist/esm/chunks/{Modal-Dg3jWsON.mjs → Modal-C7n04R_z.mjs} +5 -5
  150. package/dist/esm/chunks/{ModalController-CDaKXxq3.mjs → ModalController-oB5b930d.mjs} +6 -4
  151. package/dist/esm/chunks/{Overlay-DfkhMYtD.mjs → Overlay-DX_g-1OP.mjs} +1 -1
  152. package/dist/esm/chunks/{Pager-C4aHLVBY.mjs → Pager-Bz0p-nkX.mjs} +2 -2
  153. package/dist/esm/chunks/{ProgressIndicator-BrLB_HEn.mjs → ProgressIndicator-Cx1alCaM.mjs} +8 -4
  154. package/dist/esm/chunks/{PromptInput-BLs3B_Um.mjs → PromptInput-Cw7w2DJk.mjs} +10 -6
  155. package/dist/esm/chunks/{RadioButton-lGkQ2BjR.mjs → RadioButton-DNi4HZSs.mjs} +3 -3
  156. package/dist/esm/chunks/{RadioButtonList-Dwdbj7oq.mjs → RadioButtonList-DuOqut1l.mjs} +3 -3
  157. package/dist/esm/chunks/{Slider-C5FcSmsD.mjs → Slider-DESg64FR.mjs} +9 -5
  158. package/dist/esm/chunks/{Spacer-CUub-zd9.mjs → Spacer-yLr4JhRb.mjs} +1 -1
  159. package/dist/esm/chunks/{Switch-BZx31_TC.mjs → Switch-B8SOJBXI.mjs} +1 -1
  160. package/dist/esm/chunks/{TabBar-BUlSi-mM.mjs → TabBar-CON4mLhp.mjs} +12 -8
  161. package/dist/esm/chunks/{TextArea-CrTPPqPj.mjs → TextArea-CDTEvkGd.mjs} +2 -2
  162. package/dist/esm/chunks/{TextField-DJqLzBpE.mjs → TextField-CMNdOgk6.mjs} +11 -7
  163. package/dist/esm/chunks/{Tip-6Frqfzpi.mjs → Tip-B0Ue8ayH.mjs} +2 -2
  164. package/dist/esm/chunks/{Toast-CphE3OkY.mjs → Toast-1VODwuQo.mjs} +10 -6
  165. package/dist/esm/chunks/{ToggleButton-BXB_VtB3.mjs → ToggleButton-DhiHk_eR.mjs} +2 -2
  166. package/dist/esm/chunks/{UploadArea-B4jM32ER.mjs → UploadArea-OzgNd37z.mjs} +4 -4
  167. package/dist/esm/chunks/{Video-DgkfQgi8.mjs → Video-Cgq5CCI3.mjs} +5 -5
  168. package/dist/esm/chunks/{VideoController-M3g4Pwtc.mjs → VideoController-FZ_rT2N8.mjs} +9 -7
  169. package/dist/esm/chunks/{WSConnection-M552mwWy.mjs → WSConnection-Bg5A_R4Y.mjs} +1 -1
  170. package/dist/esm/chunks/{WebRTCConnection-BZNdtUKO.mjs → WebRTCConnection-DwhXmF5N.mjs} +1 -1
  171. package/dist/esm/chunks/broadcastChannel-_OaC_OdO.mjs +76 -0
  172. package/dist/esm/chunks/browserChannelsStore-Dn8RLoFP.mjs +94 -0
  173. package/dist/esm/chunks/{localDBStore-GmKJfODp.mjs → localDBStore-CbMyWyUR.mjs} +4 -2
  174. package/dist/esm/chunks/{microphoneStore-CvhusEyi.mjs → microphoneStore-tq5JJf5k.mjs} +1 -1
  175. package/dist/esm/chunks/{misc-CWSDLgrI.mjs → misc-BhDxN2k_.mjs} +1 -1
  176. package/dist/esm/chunks/{sseStore-CBd7nxYG.mjs → sseStore-CuK5Cj7t.mjs} +4 -2
  177. package/dist/esm/chunks/{uploads-worker-Dg7tuCe8.mjs → uploads-worker-DOZg7N_E.mjs} +1 -1
  178. package/dist/esm/chunks/{uploadsStore-bAoNL5My.mjs → uploadsStore-1A4Qh0sX.mjs} +1 -1
  179. package/dist/esm/chunks/{viewState-C-AmMZQr.mjs → viewState-CA1LPPV6.mjs} +10 -6
  180. package/dist/esm/chunks/{volumeStore-BnfcWvWI.mjs → volumeStore-C4J_3uNt.mjs} +1 -1
  181. package/dist/esm/chunks/{webRTCStore-BUW-j3A9.mjs → webRTCStore-BRp0i0h6.mjs} +4 -2
  182. package/dist/esm/chunks/{windowStore-CW_UBAZc.mjs → windowStore-B1On863x.mjs} +1 -1
  183. package/dist/esm/components/AudioBubble/index.mjs +11 -7
  184. package/dist/esm/components/Avatar/index.mjs +3 -3
  185. package/dist/esm/components/AvatarGroup/index.mjs +4 -4
  186. package/dist/esm/components/Badge/index.mjs +2 -2
  187. package/dist/esm/components/Button/index.mjs +15 -11
  188. package/dist/esm/components/ButtonBar/index.mjs +11 -7
  189. package/dist/esm/components/Camera/index.mjs +13 -9
  190. package/dist/esm/components/CheckBox/index.mjs +11 -7
  191. package/dist/esm/components/Chip/index.mjs +12 -8
  192. package/dist/esm/components/DataTable/index.mjs +12 -8
  193. package/dist/esm/components/DivInput/index.mjs +3 -3
  194. package/dist/esm/components/Dot/index.mjs +2 -2
  195. package/dist/esm/components/DraggablePanel/index.mjs +10 -6
  196. package/dist/esm/components/DropDown/index.mjs +11 -7
  197. package/dist/esm/components/ErrorSummary/index.mjs +10 -6
  198. package/dist/esm/components/FileIcon/index.mjs +10 -6
  199. package/dist/esm/components/FileList/index.mjs +13 -9
  200. package/dist/esm/components/FlexDiv/index.mjs +2 -2
  201. package/dist/esm/components/Grouper/index.mjs +12 -8
  202. package/dist/esm/components/Icon/index.mjs +11 -7
  203. package/dist/esm/components/IconButton/index.mjs +14 -10
  204. package/dist/esm/components/Label/index.mjs +3 -3
  205. package/dist/esm/components/Level/index.mjs +6 -4
  206. package/dist/esm/components/Modal/index.mjs +17 -13
  207. package/dist/esm/components/ModalController/index.mjs +11 -7
  208. package/dist/esm/components/Overlay/index.mjs +2 -2
  209. package/dist/esm/components/Pager/index.mjs +3 -3
  210. package/dist/esm/components/Progress/index.mjs +11 -7
  211. package/dist/esm/components/PromptInput/index.mjs +18 -14
  212. package/dist/esm/components/RadioButton/index.mjs +11 -7
  213. package/dist/esm/components/RadioButtonList/index.mjs +12 -8
  214. package/dist/esm/components/Slider/index.mjs +11 -7
  215. package/dist/esm/components/Spacer/index.mjs +2 -2
  216. package/dist/esm/components/Switch/index.mjs +2 -2
  217. package/dist/esm/components/TabBar/index.mjs +15 -11
  218. package/dist/esm/components/TextArea/index.mjs +16 -12
  219. package/dist/esm/components/Textfield/index.mjs +17 -13
  220. package/dist/esm/components/Tip/index.mjs +3 -3
  221. package/dist/esm/components/Toast/index.mjs +12 -8
  222. package/dist/esm/components/ToggleButton/index.mjs +16 -12
  223. package/dist/esm/components/UploadArea/index.mjs +14 -10
  224. package/dist/esm/components/Video/index.mjs +19 -15
  225. package/dist/esm/components/VideoController/index.mjs +17 -13
  226. package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
  227. package/dist/esm/hooks/useBindWebRTC.mjs +7 -5
  228. package/dist/esm/hooks/useClipboard.mjs +131 -0
  229. package/dist/esm/hooks/useMdStreamBuffer.mjs +4 -2
  230. package/dist/esm/hooks/useMicrophone.mjs +1 -1
  231. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  232. package/dist/esm/hooks.mjs +12 -6
  233. package/dist/esm/index.mjs +63 -59
  234. package/dist/esm/stores/LocalDB.mjs +5 -3
  235. package/dist/esm/stores/SSE.mjs +5 -3
  236. package/dist/esm/stores/WS.mjs +4 -2
  237. package/dist/esm/stores/WebRTC.mjs +5 -3
  238. package/dist/esm/stores/browserChannel.mjs +7 -0
  239. package/dist/esm/stores/microphone.mjs +2 -2
  240. package/dist/esm/stores/modal.mjs +1 -1
  241. package/dist/esm/stores/tip.mjs +1 -1
  242. package/dist/esm/stores/toast.mjs +1 -1
  243. package/dist/esm/stores/uploads.mjs +3 -3
  244. package/dist/esm/stores/video.mjs +1 -1
  245. package/dist/esm/stores/volume.mjs +2 -2
  246. package/dist/esm/stores/window.mjs +2 -2
  247. package/dist/esm/stores.mjs +21 -17
  248. package/dist/esm/utils/index.mjs +13 -11
  249. package/dist/esm/utils/objects/index.mjs +9 -7
  250. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  251. package/dist/styles.css +1748 -1748
  252. package/dist/types/hooks/index.d.ts +1 -0
  253. package/dist/types/hooks/useClipboard/useClipboard.d.ts +40 -0
  254. package/dist/types/hooks/useClipboard/useClipboard.test.d.ts +1 -0
  255. package/dist/types/index.d.ts +1 -1
  256. package/dist/types/stores/browserChannel/_types.d.ts +24 -0
  257. package/dist/types/stores/browserChannel/browserChannelsStore.d.ts +42 -0
  258. package/dist/types/stores/browserChannel/browserChannelsStore.test.d.ts +1 -0
  259. package/dist/types/stores/browserChannel/index.d.ts +2 -0
  260. package/dist/types/stores/index.d.ts +2 -0
  261. package/dist/types/stores/toast/_types.d.ts +1 -0
  262. package/dist/types/utils/index.d.ts +2 -2
  263. package/dist/types/utils/objects/browserChannel/broadcastChannel.d.ts +67 -0
  264. package/dist/types/utils/objects/browserChannel/broadcastChannel.test.d.ts +1 -0
  265. package/dist/types/utils/objects/index.d.ts +2 -0
  266. package/package.json +1 -1
  267. /package/dist/cjs/chunks/{MdStreamBuffer-CGJnTgCw.js → MdStreamBuffer-Ble8ibwA.js} +0 -0
  268. /package/dist/cjs/chunks/{SSEConnection-BMf8pqRz.js → SSEConnection-DncGftXV.js} +0 -0
  269. /package/dist/cjs/chunks/{_types-CrX297Zz.js → _types-ByMdhdf3.js} +0 -0
  270. /package/dist/cjs/chunks/{audioVisualizer-C-2yYuy_.js → audioVisualizer-zAy7uTX1.js} +0 -0
  271. /package/dist/cjs/chunks/{colors-BXuIv_3Q.js → colors-D5CWjn09.js} +0 -0
  272. /package/dist/cjs/chunks/{debounce-COjctjMe.js → debounce-Dm998akY.js} +0 -0
  273. /package/dist/cjs/chunks/{modalStore-dUsnPsMX.js → modalStore-CG80hn6s.js} +0 -0
  274. /package/dist/cjs/chunks/{rafThrottle-CUFIaObP.js → rafThrottle-D-ki3HW1.js} +0 -0
  275. /package/dist/cjs/chunks/{sharedTypes-gCKfLc_F.js → sharedTypes-xKamS99V.js} +0 -0
  276. /package/dist/cjs/chunks/{tipStore-D8rVy17f.js → tipStore-l4N-Ht3k.js} +0 -0
  277. /package/dist/cjs/chunks/{toastStore-B-KcGjfs.js → toastStore-DSvjQPDV.js} +0 -0
  278. /package/dist/cjs/chunks/{tslib.es6-1b_WVOSx.js → tslib.es6-C8i2M07g.js} +0 -0
  279. /package/dist/cjs/chunks/{videoStore-CEvD64Je.js → videoStore-CwqZlMvJ.js} +0 -0
  280. /package/dist/esm/chunks/{MdStreamBuffer-D5RvMu84.mjs → MdStreamBuffer-eFLLW5Tb.mjs} +0 -0
  281. /package/dist/esm/chunks/{SSEConnection-CgipQWUg.mjs → SSEConnection-DlEQOzv6.mjs} +0 -0
  282. /package/dist/esm/chunks/{_types-DJdJTzFY.mjs → _types-BOCtN_Uf.mjs} +0 -0
  283. /package/dist/esm/chunks/{audioVisualizer-PV2YALCi.mjs → audioVisualizer-Dh04_7kZ.mjs} +0 -0
  284. /package/dist/esm/chunks/{colors-BuApx_ML.mjs → colors-BzL5-oTQ.mjs} +0 -0
  285. /package/dist/esm/chunks/{debounce-DcUXZUBL.mjs → debounce-W1TqN0ok.mjs} +0 -0
  286. /package/dist/esm/chunks/{modalStore-CxNd2bGs.mjs → modalStore-pT-zaa0K.mjs} +0 -0
  287. /package/dist/esm/chunks/{rafThrottle-BX_UbPqi.mjs → rafThrottle-Dn5Hoq7g.mjs} +0 -0
  288. /package/dist/esm/chunks/{sharedTypes-BPqmyLRY.mjs → sharedTypes-CTv7xT4S.mjs} +0 -0
  289. /package/dist/esm/chunks/{tipStore-kz1SU1W0.mjs → tipStore-UMY4yIdr.mjs} +0 -0
  290. /package/dist/esm/chunks/{toastStore-gM8d8pIo.mjs → toastStore-Do6Cy79x.mjs} +0 -0
  291. /package/dist/esm/chunks/{tslib.es6-ChkYAtDK.mjs → tslib.es6-DcvCgOAo.mjs} +0 -0
  292. /package/dist/esm/chunks/{videoStore-Tv0qujkr.mjs → videoStore-D8m6mJ4d.mjs} +0 -0
@@ -14,3 +14,4 @@ export { useAudioRecorder } from './useAudioRecorder/useAudioRecorder';
14
14
  export { useWindow, FormFactor, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, } from './useWindow/useWindow';
15
15
  export { useObserveResize } from './useObserveResize/useObserveResize';
16
16
  export { useIntersecting, type IntersectContainer, type IntersectEntry, type IntersectMargin, type IntersectOptions, type IntersectResult, type IntersectResultList, type ResolvedEntries, defaultOptions as defaultIntersectingOptions, } from './useIntersecting/useIntersecting';
17
+ export { useClipboard, type ClipboardPermissionState, type ClipboardPasteResult, type UseClipboardOptions, type UseClipboardReturn, type UseClipboardTarget, } from './useClipboard/useClipboard';
@@ -0,0 +1,40 @@
1
+ import type { RefObject } from 'react';
2
+ export type ClipboardPermissionState = 'granted' | 'denied' | 'prompt' | 'unsupported';
3
+ export type ClipboardPasteResult = {
4
+ text: string;
5
+ files: File[];
6
+ items: DataTransferItem[];
7
+ nativeEvent: ClipboardEvent;
8
+ };
9
+ export type UseClipboardTarget = RefObject<HTMLElement | null> | Document | HTMLElement;
10
+ export type UseClipboardOptions = {
11
+ /** Element (or ref to one) to listen for native `paste` events on. Defaults to `document`. */
12
+ target?: UseClipboardTarget;
13
+ /** Called whenever a native paste event fires on the target, with the pasted text, files, and raw items. */
14
+ onPaste?: (result: ClipboardPasteResult) => void;
15
+ /** How long `isCopied` stays `true` after a successful `copy()`, in ms. Pass `0` to disable the auto-reset. */
16
+ copiedResetDelay?: number;
17
+ /** Query and subscribe to clipboard-read/clipboard-write permission state on mount. Defaults to `true`. */
18
+ watchPermissions?: boolean;
19
+ };
20
+ export type UseClipboardReturn = {
21
+ /** Most recently read or pasted clipboard text. `null` until a `read()` or observed paste populates it. */
22
+ text: string | null;
23
+ /** Whether the async Clipboard API (`navigator.clipboard`) is available in this environment. */
24
+ isSupported: boolean;
25
+ /** Briefly `true` after a successful `copy()` call. Handy for "Copied!" affordances. */
26
+ isCopied: boolean;
27
+ /** Whether a `copy()` or `read()` call is currently in flight. */
28
+ isRequesting: boolean;
29
+ /** Last error raised by `copy()` or `read()`. */
30
+ error: Error | null;
31
+ /** Current `clipboard-read` permission state, or `unsupported` when the Permissions API can't report it. */
32
+ readPermission: ClipboardPermissionState;
33
+ /** Current `clipboard-write` permission state, or `unsupported` when the Permissions API can't report it. */
34
+ writePermission: ClipboardPermissionState;
35
+ /** Write text to the clipboard. Falls back to a hidden-textarea `execCommand` copy when the Clipboard API is unavailable or denied. */
36
+ copy: (value: string) => Promise<boolean>;
37
+ /** Read text from the clipboard via the async Clipboard API. Resolves to `null` on unsupported browsers or denied permission. */
38
+ read: () => Promise<string | null>;
39
+ };
40
+ export declare function useClipboard(options?: UseClipboardOptions): UseClipboardReturn;
@@ -3,7 +3,7 @@ export type { ToolTip, ToolTipInfo } from './components/sharedTypes';
3
3
  export { ToolTipType } from './components/sharedTypes';
4
4
  export { light, dark, lightTheme, darkTheme, motion, elevations, Elevation, } from './theme';
5
5
  export type { SliceTheme, Colors, Type, Corners, Elevations, } from './theme';
6
- export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, type MicOption, type UseBindWebRTCOptions, type UseBindWebRTCReturn, type UseMDStreamBufferOptions, type UseMicrophoneReturn, useBindWebRTC, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useAudioRecorder, useMicrophone, useWindow, useDoubleClick, useObserveResize, } from './hooks';
6
+ export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, type MicOption, type UseBindWebRTCOptions, type UseBindWebRTCReturn, type UseMDStreamBufferOptions, type UseMicrophoneReturn, type ClipboardPermissionState, type ClipboardPasteResult, type UseClipboardOptions, type UseClipboardReturn, type UseClipboardTarget, useBindWebRTC, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useAudioRecorder, useMicrophone, useWindow, useDoubleClick, useObserveResize, useClipboard, } from './hooks';
7
7
  export { AudioBubble } from './components/AudioBubble/index';
8
8
  export type { AudioBubbleProps } from './components/AudioBubble/index';
9
9
  export { Avatar } from './components/Avatar/index';
@@ -0,0 +1,24 @@
1
+ import type { BrowserChannel, BrowserChannelMessage, ChannelConfig } from '../../utils';
2
+ /**
3
+ * What the store's own `addChannel` / `addChannels` accept: a regular
4
+ * {@link ChannelConfig} minus its callbacks. The store always supplies its
5
+ * own `onMessageCallback` / `onErrorCallback` internally - since every
6
+ * `BrowserChannel` message (data or error) now flows through one unified
7
+ * callback, there's nothing left for a caller-supplied callback to do here.
8
+ * Reach for `useMessage` / `getMessage` to read what a channel receives, or
9
+ * use `BrowserChannel` directly when you need full control over callbacks.
10
+ */
11
+ export type BrowserChannelConfig<T> = Omit<ChannelConfig<T>, 'onMessageCallback' | 'onErrorCallback'>;
12
+ export interface BrowserChannelsStore {
13
+ channels: Record<string, BrowserChannel<any>> | null;
14
+ message: any;
15
+ messages: Record<string, BrowserChannelMessage<unknown>> | null;
16
+ actions: {
17
+ addChannel: (config: BrowserChannelConfig<any>, replace?: boolean) => void;
18
+ removeChannel: (channelName: string) => boolean;
19
+ addChannels: (configs: BrowserChannelConfig<any>[], replace?: boolean) => void;
20
+ removeChannels: () => boolean;
21
+ isActiveChannel: (channelName: string) => boolean;
22
+ post: <T>(channelName: string, message: T) => boolean;
23
+ };
24
+ }
@@ -0,0 +1,42 @@
1
+ import { BrowserChannel, type BrowserChannelMessage, type MessageType } from '../../utils';
2
+ import type { BrowserChannelConfig, BrowserChannelsStore } from './_types';
3
+ export declare const useBrowserChannelsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<BrowserChannelsStore>>;
4
+ export declare const useBrowserChannels: () => Record<string, BrowserChannel<any>> | null;
5
+ export declare const useBrowserChannelActions: () => {
6
+ addChannel: (config: BrowserChannelConfig<any>, replace?: boolean) => void;
7
+ removeChannel: (channelName: string) => boolean;
8
+ addChannels: (configs: BrowserChannelConfig<any>[], replace?: boolean) => void;
9
+ removeChannels: () => boolean;
10
+ isActiveChannel: (channelName: string) => boolean;
11
+ post: <T>(channelName: string, message: T) => boolean;
12
+ };
13
+ export declare const useIsActiveChannel: (channelName: string) => boolean;
14
+ /**
15
+ * Returns the latest message on one named channel, typed as `T`, optionally
16
+ * narrowed to one `MessageType`. Data and error messages share the same slot
17
+ * per channel - errors aren't tracked separately - so `useMessage(name)`
18
+ * always reflects whichever arrived most recently, while
19
+ * `useMessage(name, type)` returns `null` if the latest message doesn't
20
+ * match that type. Unlike the shared `message` field, this is scoped
21
+ * strictly to the named channel and never reflects any other channel's
22
+ * messages.
23
+ */
24
+ export declare function useMessage<T = unknown>(channelName: string): BrowserChannelMessage<T> | null;
25
+ export declare function useMessage<T = unknown>(channelName: string, type: MessageType): BrowserChannelMessage<T> | null;
26
+ export declare const browserChannelActions: {
27
+ addChannel: (config: BrowserChannelConfig<any>, replace?: boolean) => void;
28
+ removeChannel: (channelName: string) => boolean;
29
+ addChannels: (configs: BrowserChannelConfig<any>[], replace?: boolean) => void;
30
+ removeChannels: () => boolean;
31
+ isActiveChannel: (channelName: string) => boolean;
32
+ post: <T>(channelName: string, message: T) => boolean;
33
+ };
34
+ export declare const getBrowserChannels: () => Record<string, BrowserChannel<any>> | null;
35
+ export declare const getLastBrowserChannelMessage: () => any;
36
+ /**
37
+ * Imperative, non-reactive counterpart to `useMessage`: snapshot-reads the
38
+ * latest message envelope for one named channel, typed as `T`, optionally
39
+ * narrowed to one `MessageType`.
40
+ */
41
+ export declare function getMessage<T = unknown>(channelName: string): BrowserChannelMessage<T> | null;
42
+ export declare function getMessage<T = unknown>(channelName: string, type: MessageType): BrowserChannelMessage<T> | null;
@@ -0,0 +1,2 @@
1
+ export { useBrowserChannelsStore, useBrowserChannels, useBrowserChannelActions, useIsActiveChannel, useMessage, browserChannelActions, getBrowserChannels, getLastBrowserChannelMessage, getMessage, } from './browserChannelsStore';
2
+ export type { BrowserChannelConfig, BrowserChannelsStore } from './_types';
@@ -9,3 +9,5 @@ export * from './volume';
9
9
  export * from './WebRTC';
10
10
  export * from './window';
11
11
  export * from './video';
12
+ export { useBrowserChannelsStore, useBrowserChannels, useBrowserChannelActions, useIsActiveChannel, useMessage as useBrowserChannelMessage, browserChannelActions, getBrowserChannels, getLastBrowserChannelMessage, getMessage as getBrowserChannelMessage, } from './browserChannel';
13
+ export type { BrowserChannelConfig, BrowserChannelsStore } from './browserChannel';
@@ -7,6 +7,7 @@ export type Toast = {
7
7
  close?: boolean;
8
8
  position?: 'top' | 'bottom';
9
9
  progress?: boolean;
10
+ container?: 'parent' | 'window';
10
11
  };
11
12
  export interface ToastStore {
12
13
  toast: Toast | null;
@@ -2,5 +2,5 @@ export { copyToClipboard, hexToRgb } from './functions/misc';
2
2
  export { debounce } from './functions/debounce';
3
3
  export { rafThrottle } from './functions/rafThrottle';
4
4
  export * from './functions/colors';
5
- export { AudioVisualizer, IndexedDB, MdBuffer, SSEConnection, WebRTCConnection, WSConnection, } from './objects';
6
- export type { AudioVisualizerOptions, AudioVisualizerSource, IndexedDBOptions, MarkdownAutoCloseRule, MarkdownStreamBufferOptions, MarkdownStreamBufferSnapshot, SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, UnifiedMessageEvent, WebRTCConnectionOptions, WSConnectionOptions, } from './objects';
5
+ export { AudioVisualizer, BrowserChannel, IndexedDB, MdBuffer, MessageType, SSEConnection, WebRTCConnection, WSConnection, } from './objects';
6
+ export type { AudioVisualizerOptions, AudioVisualizerSource, BrowserChannelMessage, ChannelConfig, IndexedDBOptions, MarkdownAutoCloseRule, MarkdownStreamBufferOptions, MarkdownStreamBufferSnapshot, SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, UnifiedMessageEvent, WebRTCConnectionOptions, WSConnectionOptions, } from './objects';
@@ -0,0 +1,67 @@
1
+ export declare enum MessageType {
2
+ Data = "data",
3
+ Error = "error"
4
+ }
5
+ /**
6
+ * Options for constructing a {@link BrowserChannel}.
7
+ */
8
+ export interface ChannelConfig<T> {
9
+ name: string;
10
+ /**
11
+ * Optional human-readable label for this channel instance. The instance's
12
+ * actual {@link BrowserChannel.origin} is always unique - it is always
13
+ * this label joined with a generated UUID by a `.`, e.g. `'tab-1.<uuid>'`,
14
+ * or just `.<uuid>` (with an empty label) when none is given. The `.` is
15
+ * always present, so `origin.split('.')` reliably splits into
16
+ * `[label, uuid]`.
17
+ */
18
+ origin?: string;
19
+ onMessageCallback: (message: BrowserChannelMessage<T>) => void;
20
+ onErrorCallback: (event: MessageEvent) => void;
21
+ }
22
+ /**
23
+ * The envelope every {@link BrowserChannel} sends and receives. `origin`
24
+ * identifies which channel instance posted the message, so a receiver can
25
+ * tell messages from different senders on the same channel name apart.
26
+ */
27
+ export type BrowserChannelMessage<T> = {
28
+ content: T | string;
29
+ type: MessageType;
30
+ origin: string;
31
+ };
32
+ /**
33
+ * A typed wrapper around the native `BroadcastChannel` API for posting and
34
+ * receiving messages between same-origin browsing contexts (tabs, windows,
35
+ * iframes, workers).
36
+ */
37
+ export declare class BrowserChannel<T> {
38
+ readonly name: string;
39
+ /**
40
+ * Unique identifier for this channel instance, attached as `origin` to
41
+ * every message it posts. Always unique per instance, even across
42
+ * instances created with the same `name` or `origin` label.
43
+ */
44
+ readonly origin: string;
45
+ readonly channel: BroadcastChannel;
46
+ private readonly onMessageCallback;
47
+ private readonly onErrorCallback;
48
+ /**
49
+ * Open the underlying `BroadcastChannel` and attach listeners.
50
+ */
51
+ constructor(options: ChannelConfig<T>);
52
+ private attachListeners;
53
+ private cleanUpListeners;
54
+ private onMessage;
55
+ private onError;
56
+ /**
57
+ * Post a message to every other same-origin context listening on this
58
+ * channel. The message is wrapped with this instance's `origin` before
59
+ * being sent.
60
+ */
61
+ post(message: T): void;
62
+ /**
63
+ * Close the channel and remove its listeners. The instance should not be
64
+ * reused after calling this.
65
+ */
66
+ close(): void;
67
+ }
@@ -10,3 +10,5 @@ export type { SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SS
10
10
  export type { UnifiedMessageEvent, WSConnectionOptions, } from './WSConnection/WSConnection';
11
11
  export { WebRTCConnection } from './WebRTCConnection/WebRTCConnection';
12
12
  export type { WebRTCConnectionOptions } from './WebRTCConnection/_types';
13
+ export { BrowserChannel, MessageType } from './browserChannel/broadcastChannel';
14
+ export type { BrowserChannelMessage, ChannelConfig } from './browserChannel/broadcastChannel';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apple-pie/slice",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {