@apple-pie/slice 0.1.31 → 0.1.33

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 (293) hide show
  1. package/README.md +35 -284
  2. package/dist/cjs/chunks/{AudioBubble-k7qS53g6.js → AudioBubble-_eYM1QMu.js} +4 -3
  3. package/dist/cjs/chunks/{Avatar-hP8GuwvD.js → Avatar-DTro_MXZ.js} +1 -1
  4. package/dist/cjs/chunks/{AvatarGroup-DMy34q7_.js → AvatarGroup-OPJJ_Te5.js} +1 -1
  5. package/dist/cjs/chunks/{Badge-D2TbyfJS.js → Badge-DWUeXxm2.js} +1 -1
  6. package/dist/cjs/chunks/{Button-CTsHZBEB.js → Button-CuGvPAkH.js} +1 -1
  7. package/dist/cjs/chunks/{ButtonBar-BRb1PTmw.js → ButtonBar-CbXToyfD.js} +1 -1
  8. package/dist/cjs/chunks/{Camera-CKv087kr.js → Camera-DjENiyud.js} +5 -4
  9. package/dist/cjs/chunks/{CheckBox-VRIL1FHh.js → CheckBox-DiJpbdy5.js} +1 -1
  10. package/dist/cjs/chunks/{Chip-Dr3vKvRY.js → Chip-kzOvEo0P.js} +1 -1
  11. package/dist/cjs/chunks/{DivInput-Ci0gaCWL.js → DivInput-B917fKB9.js} +1 -1
  12. package/dist/cjs/chunks/{Dot-C0MvSJOl.js → Dot-DaRF2JyO.js} +1 -1
  13. package/dist/cjs/chunks/{DrggablePanel-DflouLUs.js → DrggablePanel-CJTEmYW6.js} +4 -3
  14. package/dist/cjs/chunks/{DropDown-BS1H62yj.js → DropDown-DRSQvXCC.js} +1 -1
  15. package/dist/cjs/chunks/{ErrorSummary-B3tof7ir.js → ErrorSummary-ltiIsgJ6.js} +4 -3
  16. package/dist/cjs/chunks/{FileIcon-Te8MaqTs.js → FileIcon-WIVOTJLa.js} +5 -3
  17. package/dist/cjs/chunks/{FileList-CDcfKIV6.js → FileList-CzQZZErI.js} +1 -1
  18. package/dist/cjs/chunks/{FlexDiv-wO8IY0Zf.js → FlexDiv-CBENyLT4.js} +1 -1
  19. package/dist/cjs/chunks/{Grouper-DyGkzdvz.js → Grouper-Cd3AJEFv.js} +4 -3
  20. package/dist/cjs/chunks/{Icon-BFZ_5Qv3.js → Icon-DjvProjz.js} +4 -3
  21. package/dist/cjs/chunks/{IconButton-CgsuJIuF.js → IconButton-BuwQLUuj.js} +1 -1
  22. package/dist/cjs/chunks/{IndexedDB-Dgwal8na.js → IndexedDB-Ddhq6Gjd.js} +1 -1
  23. package/dist/cjs/chunks/{Label-BuyhcJbF.js → Label-d32ENzwL.js} +1 -1
  24. package/dist/cjs/chunks/Level-B8eT8XyV.js +58 -0
  25. package/dist/cjs/chunks/{MdStreamBuffer-CbG_VeRI.js → MdStreamBuffer-Chwibu07.js} +38 -16
  26. package/dist/cjs/chunks/{Modal-ByRyv3wy.js → Modal-CUAj4e6x.js} +34 -8
  27. package/dist/cjs/chunks/ModalController-BwFAVI5G.js +80 -0
  28. package/dist/cjs/chunks/{Overlay-FooE9M_s.js → Overlay-CaAA3ey5.js} +1 -1
  29. package/dist/cjs/chunks/{Pager-B-cuwffo.js → Pager-uExZ5E3x.js} +1 -1
  30. package/dist/cjs/chunks/{ProgressIndicator-ByZ_aYAZ.js → ProgressIndicator-DwqslY4o.js} +4 -3
  31. package/dist/cjs/chunks/{PromptInput--grtHPvy.js → PromptInput-Dl8l8cZv.js} +34 -30
  32. package/dist/cjs/chunks/{RadioButton-DP2X1dA_.js → RadioButton-DPpAOFQt.js} +1 -1
  33. package/dist/cjs/chunks/{RadioButtonList-COGNW5y3.js → RadioButtonList-IbPA6A3y.js} +1 -1
  34. package/dist/cjs/chunks/{Slider-G1a8UKef.js → Slider-D5oa7NGy.js} +1 -1
  35. package/dist/cjs/chunks/{Spacer-CsRCleXv.js → Spacer-DtUh2VLv.js} +1 -1
  36. package/dist/cjs/chunks/{Switch-OBVHKn_D.js → Switch-Bs0r5va5.js} +1 -1
  37. package/dist/cjs/chunks/{TabBar-C1HkBaxE.js → TabBar-BCSTg_Uc.js} +4 -3
  38. package/dist/cjs/chunks/{TextArea-BEmNI_HZ.js → TextArea-Dj7jsvVr.js} +1 -1
  39. package/dist/cjs/chunks/{TextField-D9_COA9H.js → TextField-DNP0wJla.js} +5 -4
  40. package/dist/cjs/chunks/{Tip-2W0u_oQN.js → Tip-awq6PDZa.js} +1 -1
  41. package/dist/cjs/chunks/{Toast-B9jX6ioq.js → Toast-xS1TC3Ba.js} +7 -6
  42. package/dist/cjs/chunks/{ToggleButton-C_Gu5dYR.js → ToggleButton-CqD5c6JA.js} +4 -3
  43. package/dist/cjs/chunks/{UploadArea-ENFAf4tE.js → UploadArea-CvWqk8YK.js} +1 -1
  44. package/dist/cjs/chunks/{WSConnection-CZ22tcLz.js → WSConnection-BACWw4TS.js} +1 -1
  45. package/dist/cjs/chunks/WebRTCConnection-DBeyg4j9.js +252 -0
  46. package/dist/cjs/chunks/{localDBStore-Ca73jeFf.js → localDBStore-wgCc1SmV.js} +1 -1
  47. package/dist/cjs/chunks/{microphoneStore-lxYIvhN8.js → microphoneStore-Dy5TwE2I.js} +27 -4
  48. package/dist/cjs/chunks/{misc-DZAbObFp.js → misc-BwQIEIuF.js} +1 -1
  49. package/dist/cjs/chunks/{sseStore-Bq7sVvyA.js → sseStore-CFFaYonG.js} +2 -2
  50. package/dist/cjs/chunks/{uploads-worker-CD-annza.js → uploads-worker-DWvOe9F8.js} +1 -1
  51. package/dist/cjs/chunks/{uploadsStore-CUeB10zx.js → uploadsStore-BCmts7Ie.js} +2 -2
  52. package/dist/cjs/chunks/{volumeStore-roYTyKJ2.js → volumeStore-BXFAQhvS.js} +5 -4
  53. package/dist/cjs/chunks/webRTCStore-DRjvbnve.js +55 -0
  54. package/dist/cjs/chunks/{windowStore-BdJv-RF0.js → windowStore-C4Bg6I9i.js} +1 -1
  55. package/dist/cjs/components/AudioBubble/index.js +6 -4
  56. package/dist/cjs/components/Avatar/index.js +3 -3
  57. package/dist/cjs/components/AvatarGroup/index.js +3 -3
  58. package/dist/cjs/components/Badge/index.js +2 -2
  59. package/dist/cjs/components/Button/index.js +9 -7
  60. package/dist/cjs/components/ButtonBar/index.js +6 -4
  61. package/dist/cjs/components/Camera/index.js +7 -5
  62. package/dist/cjs/components/CheckBox/index.js +6 -4
  63. package/dist/cjs/components/Chip/index.js +7 -5
  64. package/dist/cjs/components/DivInput/index.js +3 -3
  65. package/dist/cjs/components/Dot/index.js +2 -2
  66. package/dist/cjs/components/DraggablePanel/index.js +5 -3
  67. package/dist/cjs/components/DropDown/index.js +6 -4
  68. package/dist/cjs/components/ErrorSummary/index.js +5 -3
  69. package/dist/cjs/components/FileIcon/index.js +5 -3
  70. package/dist/cjs/components/FileList/index.js +7 -5
  71. package/dist/cjs/components/FlexDiv/index.js +2 -2
  72. package/dist/cjs/components/Grouper/index.js +7 -5
  73. package/dist/cjs/components/Icon/index.js +5 -3
  74. package/dist/cjs/components/IconButton/index.js +8 -6
  75. package/dist/cjs/components/Label/index.js +3 -3
  76. package/dist/cjs/components/Level/index.js +7 -0
  77. package/dist/cjs/components/Modal/index.js +10 -8
  78. package/dist/cjs/components/ModalController/index.js +6 -4
  79. package/dist/cjs/components/Overlay/index.js +2 -2
  80. package/dist/cjs/components/Pager/index.js +3 -3
  81. package/dist/cjs/components/Progress/index.js +5 -3
  82. package/dist/cjs/components/PromptInput/index.js +9 -7
  83. package/dist/cjs/components/RadioButton/index.js +6 -4
  84. package/dist/cjs/components/RadioButtonList/index.js +7 -5
  85. package/dist/cjs/components/Slider/index.js +4 -4
  86. package/dist/cjs/components/Spacer/index.js +2 -2
  87. package/dist/cjs/components/Switch/index.js +2 -2
  88. package/dist/cjs/components/TabBar/index.js +8 -6
  89. package/dist/cjs/components/TextArea/index.js +9 -7
  90. package/dist/cjs/components/Textfield/index.js +9 -7
  91. package/dist/cjs/components/Tip/index.js +3 -3
  92. package/dist/cjs/components/Toast/index.js +6 -4
  93. package/dist/cjs/components/ToggleButton/index.js +9 -7
  94. package/dist/cjs/components/UploadArea/index.js +11 -10
  95. package/dist/cjs/hooks/useAudioRecorder.js +1 -1
  96. package/dist/cjs/hooks/useBindWebRTC.js +60 -0
  97. package/dist/cjs/hooks/useLocalStore.js +3 -3
  98. package/dist/cjs/hooks/useMdStreamBuffer.js +55 -30
  99. package/dist/cjs/hooks/useMicrophone.js +1 -1
  100. package/dist/cjs/hooks/useTrackRenders.js +2 -2
  101. package/dist/cjs/hooks.js +7 -4
  102. package/dist/cjs/index.js +19 -18
  103. package/dist/cjs/providers/ThemeProvider.js +5 -4
  104. package/dist/cjs/providers/themeServer.js +15 -9
  105. package/dist/cjs/stores/LocalDB.js +3 -3
  106. package/dist/cjs/stores/SSE.js +2 -2
  107. package/dist/cjs/stores/WS.js +2 -2
  108. package/dist/cjs/stores/WebRTC.js +9 -0
  109. package/dist/cjs/stores/microphone.js +5 -4
  110. package/dist/cjs/stores/modal.js +1 -1
  111. package/dist/cjs/stores/tip.js +1 -1
  112. package/dist/cjs/stores/toast.js +1 -1
  113. package/dist/cjs/stores/uploads.js +2 -2
  114. package/dist/cjs/stores/volume.js +2 -2
  115. package/dist/cjs/stores/window.js +2 -2
  116. package/dist/cjs/stores.js +24 -19
  117. package/dist/cjs/utils/index.js +4 -3
  118. package/dist/cjs/utils/objects/index.js +4 -3
  119. package/dist/cjs/workers/uploads/uploads.js +2 -2
  120. package/dist/esm/chunks/{AudioBubble-DfrxyTX_.mjs → AudioBubble-SB1LCBlJ.mjs} +9 -3
  121. package/dist/esm/chunks/{Avatar-pA41Pcyl.mjs → Avatar-B6PcVOmT.mjs} +2 -2
  122. package/dist/esm/chunks/{AvatarGroup-CZBtWjnj.mjs → AvatarGroup-DEb3j2IZ.mjs} +2 -2
  123. package/dist/esm/chunks/{Badge-pLwG0zm7.mjs → Badge-bh5UVUnt.mjs} +1 -1
  124. package/dist/esm/chunks/{Button-BJoMLZIs.mjs → Button-CWKs3uAV.mjs} +6 -6
  125. package/dist/esm/chunks/{ButtonBar-BO2RUJ8R.mjs → ButtonBar-CWeMhkSb.mjs} +3 -3
  126. package/dist/esm/chunks/{Camera-4MNA52HG.mjs → Camera-BmuMA9xY.mjs} +11 -5
  127. package/dist/esm/chunks/{CheckBox-7KAsvZld.mjs → CheckBox-BR6a2n0j.mjs} +3 -3
  128. package/dist/esm/chunks/{Chip-BuGvCLLU.mjs → Chip-DXW0jxKf.mjs} +4 -4
  129. package/dist/esm/chunks/{DivInput-D0YzSWjJ.mjs → DivInput-BWO1EJXA.mjs} +2 -2
  130. package/dist/esm/chunks/{Dot-h26m47Z-.mjs → Dot-DMst-5Q2.mjs} +1 -1
  131. package/dist/esm/chunks/{DrggablePanel-Bh6HLPMX.mjs → DrggablePanel-qxrCS7Ot.mjs} +8 -2
  132. package/dist/esm/chunks/{DropDown-NgMYjjXn.mjs → DropDown-DlO2J4QP.mjs} +3 -3
  133. package/dist/esm/chunks/{ErrorSummary-nNm9qymE.mjs → ErrorSummary-BplQFunJ.mjs} +8 -2
  134. package/dist/esm/chunks/{FileIcon-BqyV1wut.mjs → FileIcon-iFmAF7_a.mjs} +8 -2
  135. package/dist/esm/chunks/{FileList-C1tOvoc0.mjs → FileList-CztHFCJe.mjs} +5 -5
  136. package/dist/esm/chunks/{FlexDiv-CkK-DAyg.mjs → FlexDiv-DGmDZL7M.mjs} +1 -1
  137. package/dist/esm/chunks/{Grouper-CyrOkuu2.mjs → Grouper-DxOISLzH.mjs} +9 -3
  138. package/dist/esm/chunks/{Icon-DjW0Krm8.mjs → Icon-L8B35JN1.mjs} +8 -2
  139. package/dist/esm/chunks/{IconButton-DdLhTUl0.mjs → IconButton-DxwJemEK.mjs} +5 -5
  140. package/dist/esm/chunks/{IndexedDB-DVoDikoA.mjs → IndexedDB-DA5oZXju.mjs} +1 -1
  141. package/dist/esm/chunks/{Label-DhmJ_Sln.mjs → Label-wDPtyK4h.mjs} +2 -2
  142. package/dist/esm/chunks/Level-B9JayinM.mjs +63 -0
  143. package/dist/esm/chunks/{MdStreamBuffer-4AJH8WaN.mjs → MdStreamBuffer-Cyon3ytf.mjs} +38 -16
  144. package/dist/esm/chunks/{Modal-FztrJsQo.mjs → Modal-C-Q2A_RY.mjs} +39 -13
  145. package/dist/esm/chunks/ModalController-ClAjHLPb.mjs +91 -0
  146. package/dist/esm/chunks/{Overlay-Dsy55Bxm.mjs → Overlay-Dr9YYxJ6.mjs} +1 -1
  147. package/dist/esm/chunks/{Pager-BqSdwL0L.mjs → Pager-DPbTCMNe.mjs} +2 -2
  148. package/dist/esm/chunks/{ProgressIndicator-BnqZFATV.mjs → ProgressIndicator-HaJJDZ-m.mjs} +8 -2
  149. package/dist/esm/chunks/{PromptInput-CRkcPXJu.mjs → PromptInput-wGhpXw-h.mjs} +38 -31
  150. package/dist/esm/chunks/{RadioButton-DXq3yniV.mjs → RadioButton-oOGgTDhg.mjs} +3 -3
  151. package/dist/esm/chunks/{RadioButtonList-BgOskHCP.mjs → RadioButtonList-CDWKVvyL.mjs} +3 -3
  152. package/dist/esm/chunks/{Slider-DPOy9uNI.mjs → Slider-ioPGftDY.mjs} +3 -3
  153. package/dist/esm/chunks/{Spacer-BJd_D0Fn.mjs → Spacer-VJBjxVlr.mjs} +1 -1
  154. package/dist/esm/chunks/{Switch-DHqlyizo.mjs → Switch-BCk2sTh3.mjs} +1 -1
  155. package/dist/esm/chunks/{TabBar-RBXExqMK.mjs → TabBar-C1DYnCRx.mjs} +11 -5
  156. package/dist/esm/chunks/{TextArea-CIlx_P26.mjs → TextArea-CF3r5m2G.mjs} +2 -2
  157. package/dist/esm/chunks/{TextField-CX72ybwH.mjs → TextField-BNfTj9v2.mjs} +11 -5
  158. package/dist/esm/chunks/{Tip-COBSyEjm.mjs → Tip-DIKQvxxO.mjs} +2 -2
  159. package/dist/esm/chunks/{Toast-BTm3HxDD.mjs → Toast-CkXPrDpp.mjs} +12 -6
  160. package/dist/esm/chunks/{ToggleButton-DujsCKF3.mjs → ToggleButton-Dvy8fc4t.mjs} +5 -4
  161. package/dist/esm/chunks/{UploadArea-D--Nt8Ed.mjs → UploadArea-D_xGzR2e.mjs} +4 -4
  162. package/dist/esm/chunks/{WSConnection-BMXcuW3f.mjs → WSConnection-TiYLENWB.mjs} +1 -1
  163. package/dist/esm/chunks/WebRTCConnection-d0Yvd66q.mjs +252 -0
  164. package/dist/esm/chunks/{localDBStore-36E3160Z.mjs → localDBStore-C-5y16uv.mjs} +2 -2
  165. package/dist/esm/chunks/{microphoneStore-Cexu82zH.mjs → microphoneStore-Cbx9nV4R.mjs} +26 -3
  166. package/dist/esm/chunks/{misc-CTGTuM2J.mjs → misc-zecH7-IH.mjs} +1 -1
  167. package/dist/esm/chunks/{sseStore-Dow4NXkZ.mjs → sseStore-DIquUNpm.mjs} +2 -2
  168. package/dist/esm/chunks/{tslib.es6-BX2F90pK.mjs → tslib.es6-CVvvNSPr.mjs} +1 -1
  169. package/dist/esm/chunks/{uploads-worker-Dhyp4ot3.mjs → uploads-worker-CUggKU9b.mjs} +1 -1
  170. package/dist/esm/chunks/{uploadsStore-DT4lFybE.mjs → uploadsStore-9QngohOe.mjs} +1 -1
  171. package/dist/esm/chunks/{volumeStore-RAxdmQ60.mjs → volumeStore-BrgZCRKF.mjs} +5 -4
  172. package/dist/esm/chunks/webRTCStore-DhFE9-bb.mjs +57 -0
  173. package/dist/esm/chunks/{windowStore-C4AZexIa.mjs → windowStore-BKW7HyoD.mjs} +1 -1
  174. package/dist/esm/components/AudioBubble/index.mjs +14 -4
  175. package/dist/esm/components/Avatar/index.mjs +3 -3
  176. package/dist/esm/components/AvatarGroup/index.mjs +4 -4
  177. package/dist/esm/components/Badge/index.mjs +2 -2
  178. package/dist/esm/components/Button/index.mjs +18 -8
  179. package/dist/esm/components/ButtonBar/index.mjs +14 -4
  180. package/dist/esm/components/Camera/index.mjs +16 -6
  181. package/dist/esm/components/CheckBox/index.mjs +14 -4
  182. package/dist/esm/components/Chip/index.mjs +15 -5
  183. package/dist/esm/components/DivInput/index.mjs +3 -3
  184. package/dist/esm/components/Dot/index.mjs +2 -2
  185. package/dist/esm/components/DraggablePanel/index.mjs +13 -3
  186. package/dist/esm/components/DropDown/index.mjs +14 -4
  187. package/dist/esm/components/ErrorSummary/index.mjs +13 -3
  188. package/dist/esm/components/FileIcon/index.mjs +13 -3
  189. package/dist/esm/components/FileList/index.mjs +16 -6
  190. package/dist/esm/components/FlexDiv/index.mjs +2 -2
  191. package/dist/esm/components/Grouper/index.mjs +15 -5
  192. package/dist/esm/components/Icon/index.mjs +14 -4
  193. package/dist/esm/components/IconButton/index.mjs +17 -7
  194. package/dist/esm/components/Label/index.mjs +3 -3
  195. package/dist/esm/components/Level/index.mjs +11 -0
  196. package/dist/esm/components/Modal/index.mjs +20 -10
  197. package/dist/esm/components/ModalController/index.mjs +14 -6
  198. package/dist/esm/components/Overlay/index.mjs +2 -2
  199. package/dist/esm/components/Pager/index.mjs +3 -3
  200. package/dist/esm/components/Progress/index.mjs +14 -4
  201. package/dist/esm/components/PromptInput/index.mjs +22 -12
  202. package/dist/esm/components/RadioButton/index.mjs +14 -4
  203. package/dist/esm/components/RadioButtonList/index.mjs +15 -5
  204. package/dist/esm/components/Slider/index.mjs +4 -4
  205. package/dist/esm/components/Spacer/index.mjs +2 -2
  206. package/dist/esm/components/Switch/index.mjs +2 -2
  207. package/dist/esm/components/TabBar/index.mjs +18 -8
  208. package/dist/esm/components/TextArea/index.mjs +19 -9
  209. package/dist/esm/components/Textfield/index.mjs +20 -10
  210. package/dist/esm/components/Tip/index.mjs +3 -3
  211. package/dist/esm/components/Toast/index.mjs +15 -5
  212. package/dist/esm/components/ToggleButton/index.mjs +19 -9
  213. package/dist/esm/components/UploadArea/index.mjs +19 -9
  214. package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
  215. package/dist/esm/hooks/useBindWebRTC.mjs +72 -0
  216. package/dist/esm/hooks/useLocalStore.mjs +3 -3
  217. package/dist/esm/hooks/useMdStreamBuffer.mjs +56 -28
  218. package/dist/esm/hooks/useMicrophone.mjs +1 -1
  219. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  220. package/dist/esm/hooks.mjs +14 -2
  221. package/dist/esm/index.mjs +62 -50
  222. package/dist/esm/providers/ThemeProvider.mjs +6 -5
  223. package/dist/esm/providers/themeServer.mjs +11 -6
  224. package/dist/esm/stores/LocalDB.mjs +3 -3
  225. package/dist/esm/stores/SSE.mjs +3 -3
  226. package/dist/esm/stores/WS.mjs +2 -2
  227. package/dist/esm/stores/WebRTC.mjs +7 -0
  228. package/dist/esm/stores/microphone.mjs +2 -2
  229. package/dist/esm/stores/modal.mjs +1 -1
  230. package/dist/esm/stores/tip.mjs +1 -1
  231. package/dist/esm/stores/toast.mjs +1 -1
  232. package/dist/esm/stores/uploads.mjs +3 -3
  233. package/dist/esm/stores/volume.mjs +2 -2
  234. package/dist/esm/stores/window.mjs +2 -2
  235. package/dist/esm/stores.mjs +18 -14
  236. package/dist/esm/utils/index.mjs +11 -9
  237. package/dist/esm/utils/objects/index.mjs +8 -6
  238. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  239. package/dist/styles.css +76 -13
  240. package/dist/types/components/Level/Level.d.ts +5 -0
  241. package/dist/types/components/Level/_types.d.ts +21 -0
  242. package/dist/types/components/Level/index.d.ts +2 -0
  243. package/dist/types/components/Modal/_types.d.ts +3 -0
  244. package/dist/types/components/PromptInput/PromptInput.d.ts +10 -2
  245. package/dist/types/components/PromptInput/_types.d.ts +5 -1
  246. package/dist/types/components/Toast/_types.d.ts +1 -0
  247. package/dist/types/components/ToggleButton/_types.d.ts +1 -0
  248. package/dist/types/hooks/index.d.ts +2 -0
  249. package/dist/types/hooks/useBindWebRTC/index.d.ts +1 -0
  250. package/dist/types/hooks/useBindWebRTC/useBindWebRTC.d.ts +15 -0
  251. package/dist/types/hooks/useLocalStore/useLocalStore.d.ts +1 -1
  252. package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.d.ts +6 -1
  253. package/dist/types/index.d.ts +3 -1
  254. package/dist/types/providers/ThemeProvider.d.ts +1 -0
  255. package/dist/types/providers/themeServer.d.ts +7 -3
  256. package/dist/types/stores/WebRTC/_types.d.ts +16 -0
  257. package/dist/types/stores/WebRTC/index.d.ts +2 -0
  258. package/dist/types/stores/WebRTC/webRTCStore.d.ts +21 -0
  259. package/dist/types/stores/index.d.ts +1 -0
  260. package/dist/types/stores/microphone/index.d.ts +1 -1
  261. package/dist/types/stores/microphone/microphoneStore.d.ts +14 -1
  262. package/dist/types/stores/toast/_types.d.ts +1 -0
  263. package/dist/types/stores/volume/_types.d.ts +3 -1
  264. package/dist/types/stores/volume/volumeStore.d.ts +6 -2
  265. package/dist/types/utils/functions/files.d.ts +1 -1
  266. package/dist/types/utils/index.d.ts +2 -2
  267. package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +10 -0
  268. package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +2 -0
  269. package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +37 -3
  270. package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +13 -4
  271. package/dist/types/utils/objects/index.d.ts +2 -0
  272. package/package.json +1 -1
  273. package/dist/cjs/chunks/ModalController-xjflFsjF.js +0 -68
  274. package/dist/esm/chunks/ModalController-C1BnM5Dz.mjs +0 -76
  275. /package/dist/cjs/chunks/{SSEConnection-ACoOeeTO.js → SSEConnection-CF5WZG9b.js} +0 -0
  276. /package/dist/cjs/chunks/{_types-k-3V1fz_.js → _types-BTdDWVYI.js} +0 -0
  277. /package/dist/cjs/chunks/{audioVisualizer-MOSbvvnZ.js → audioVisualizer-C7fMG0WH.js} +0 -0
  278. /package/dist/cjs/chunks/{colors-B0_3srZN.js → colors-CmOkcjB3.js} +0 -0
  279. /package/dist/cjs/chunks/{debounce-CaoYvh12.js → debounce-BtCCTkbG.js} +0 -0
  280. /package/dist/cjs/chunks/{modalStore-D4bOjuWd.js → modalStore-CaQkdY5_.js} +0 -0
  281. /package/dist/cjs/chunks/{sharedTypes-CthHPjrO.js → sharedTypes-BOieqpQy.js} +0 -0
  282. /package/dist/cjs/chunks/{tipStore-CPB7RHKY.js → tipStore-4Bs9v2sg.js} +0 -0
  283. /package/dist/cjs/chunks/{toastStore-6eHe6esp.js → toastStore-CyCE9-lr.js} +0 -0
  284. /package/dist/cjs/chunks/{tslib.es6-CzpRaW14.js → tslib.es6-DqjaJVC3.js} +0 -0
  285. /package/dist/esm/chunks/{SSEConnection-qNnkZUOe.mjs → SSEConnection-g0GBGAqe.mjs} +0 -0
  286. /package/dist/esm/chunks/{_types-CEStVWlB.mjs → _types-9ekyeJYl.mjs} +0 -0
  287. /package/dist/esm/chunks/{audioVisualizer-BUNbarKP.mjs → audioVisualizer-nMo67yOW.mjs} +0 -0
  288. /package/dist/esm/chunks/{colors-D-qeA9gU.mjs → colors-v5b8_oYV.mjs} +0 -0
  289. /package/dist/esm/chunks/{debounce-D5b6tZ5a.mjs → debounce-DFxAyrPi.mjs} +0 -0
  290. /package/dist/esm/chunks/{modalStore-Crg_QmSJ.mjs → modalStore-D6_oc47l.mjs} +0 -0
  291. /package/dist/esm/chunks/{sharedTypes-U5H1I85x.mjs → sharedTypes-CdmzhKXN.mjs} +0 -0
  292. /package/dist/esm/chunks/{tipStore-pvswaezx.mjs → tipStore-C2M6zBzd.mjs} +0 -0
  293. /package/dist/esm/chunks/{toastStore-80oOTYsj.mjs → toastStore-B-6kdNHw.mjs} +0 -0
@@ -1,8 +1,10 @@
1
1
  import type { WebRTCConnectionOptions } from './_types';
2
2
  export declare class WebRTCConnection {
3
3
  private readonly peerConnection;
4
- private readonly RTCSenderAudioTrack?;
4
+ private RTCSenderAudioTrack;
5
5
  private readonly RTCSenderVideoTrack?;
6
+ private RTCSenderAudioSender;
7
+ private readonly RTCSenderAudioStream;
6
8
  private RTCScreenShareTrack;
7
9
  private RTCScreenShareSender;
8
10
  private readonly RTCReceiverAudioStream;
@@ -11,7 +13,7 @@ export declare class WebRTCConnection {
11
13
  private readonly RTCDataChannels;
12
14
  private readonly connectionUrl;
13
15
  private connectionOffer;
14
- private audioElement;
16
+ private readonly audioElement;
15
17
  private readonly autoPlayAudio;
16
18
  private readonly onRemoteAudioStream?;
17
19
  private readonly onRemoteVideoStream?;
@@ -19,6 +21,22 @@ export declare class WebRTCConnection {
19
21
  private iceTimer?;
20
22
  private offerOptions?;
21
23
  private bearerToken?;
24
+ /**
25
+ * Report whether the peer connection is currently connected
26
+ */
27
+ get connected(): boolean;
28
+ /**
29
+ * Report whether the connection currently has an audio path attached
30
+ */
31
+ get audioConnected(): boolean;
32
+ /**
33
+ * Report whether the connection currently has a video path attached
34
+ */
35
+ get videoConnected(): boolean;
36
+ /**
37
+ * Report whether any data channel is currently open
38
+ */
39
+ get dataConnected(): boolean;
22
40
  /**
23
41
  * Create the base instance
24
42
  */
@@ -54,7 +72,19 @@ export declare class WebRTCConnection {
54
72
  /**
55
73
  * Set the playback volume for the incoming audio element
56
74
  */
57
- setAudioVolume(volume: number): void;
75
+ setVolume(volume: number): void;
76
+ /**
77
+ * Replace the outgoing audio source with the first track from a stream
78
+ */
79
+ setOutgoingAudioStream(stream: MediaStream | null): Promise<void>;
80
+ /**
81
+ * Replace the outgoing audio track without rebuilding the peer connection
82
+ */
83
+ replaceAudioTrack(track: MediaStreamTrack | null): Promise<void>;
84
+ /**
85
+ * Close the peer connection and release local media bindings
86
+ */
87
+ close(): void;
58
88
  /**
59
89
  * Create an audio source node from the unified incoming audio stream
60
90
  */
@@ -71,6 +101,10 @@ export declare class WebRTCConnection {
71
101
  * Set up a local stream with mic and video tracks and add to peer connection
72
102
  */
73
103
  private setupOutgoingMediaStream;
104
+ /**
105
+ * Keep the sender stream aligned to the current local audio track
106
+ */
107
+ private syncSenderAudioStream;
74
108
  /**
75
109
  * Setup data channels
76
110
  */
@@ -1,11 +1,20 @@
1
- export interface WebRTCConnectionOptions {
1
+ type WebRTCMicStreamOption = {
2
+ micStream: MediaStream;
3
+ micTrack?: MediaStreamTrack | null;
4
+ };
5
+ type WebRTCMicTrackOption = {
6
+ micStream?: MediaStream | null;
7
+ micTrack: MediaStreamTrack;
8
+ };
9
+ export type WebRTCConnectionOptions = (WebRTCMicStreamOption | WebRTCMicTrackOption) & {
2
10
  connectionUrl?: string;
3
11
  audioElement?: HTMLAudioElement;
4
12
  autoPlayAudio?: boolean;
13
+ volume?: number;
5
14
  dataChannels?: string | string[];
6
- micMediaTrack: MediaStreamTrack;
7
- videoMediaTrack?: MediaStreamTrack;
15
+ videoTrack?: MediaStreamTrack | null;
8
16
  onRemoteVideoStream?: (streams: Map<string, MediaStream>) => void;
9
17
  onRemoteAudioStream?: (streams: Map<string, MediaStream>) => void;
10
18
  onDataChannelEvent?: (channel: string, eventType: 'message' | 'open' | 'close' | 'error', eventData: MessageEvent | Event | RTCErrorEvent) => void;
11
- }
19
+ };
20
+ export {};
@@ -8,3 +8,5 @@ export { SSEConnection } from './SSEConnection/SSEConnection';
8
8
  export { WSConnection } from './WSConnection/WSConnection';
9
9
  export type { SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, } from './SSEConnection/SSEConnection';
10
10
  export type { UnifiedMessageEvent, WSConnectionOptions, } from './WSConnection/WSConnection';
11
+ export { WebRTCConnection } from './WebRTCConnection/WebRTCConnection';
12
+ export type { WebRTCConnectionOptions } from './WebRTCConnection/_types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apple-pie/slice",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -1,68 +0,0 @@
1
- "use strict";
2
-
3
- var jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), Overlay = require("./Overlay-FooE9M_s.js"), modalStore = require("./modalStore-D4bOjuWd.js"), css_wrapper = "ModalController-module_wrapper__HkOoX flexBox-module_row__z24tF";
4
-
5
- const defaultTransition = {
6
- ease: "easeOut",
7
- duration: .25,
8
- delay: .1
9
- }, defaultVariants = {
10
- initial: {
11
- opacity: 0,
12
- y: 20
13
- },
14
- animate: {
15
- opacity: 1,
16
- y: 0
17
- },
18
- exit: {
19
- opacity: 0,
20
- y: 20
21
- }
22
- };
23
-
24
- exports.ModalController = function(props) {
25
- const {dragConstraintsRef: dragConstraintsRef, transition: transition = defaultTransition, variants: variants = defaultVariants, initial: initial = "initial", animate: animate = "animate", exit: exit = "exit", draggable: draggable = !0, overlayOpacity: overlayOpacity = .7, overlayColor: overlayColor = "rgb(0,0,0)"} = props, controls = react.useDragControls(), modal = modalStore.useModal(), resolve = modalStore.useModalActions().resolve, reject = modalStore.useModalActions().reject, hide = modalStore.useModalActions().hide, ModalComponent = null == modal ? void 0 : modal.component, modalProps = null == modal ? void 0 : modal.props;
26
- return jsxRuntime.jsxs(jsxRuntime.Fragment, {
27
- children: [ jsxRuntime.jsx(Overlay.Overlay, {
28
- show: !!modal,
29
- type: "dark",
30
- opacity: overlayOpacity,
31
- color: overlayColor,
32
- onClick: () => hide()
33
- }), jsxRuntime.jsx(react.AnimatePresence, {
34
- children: modal && ModalComponent && jsxRuntime.jsx(react.motion.div, {
35
- className: css_wrapper,
36
- variants: variants,
37
- initial: initial,
38
- animate: animate,
39
- exit: exit,
40
- transition: transition,
41
- drag: draggable,
42
- dragListener: !draggable && void 0,
43
- dragControls: draggable ? controls : void 0,
44
- dragConstraints: draggable ? dragConstraintsRef : void 0,
45
- dragElastic: draggable ? 0 : void 0,
46
- dragMomentum: !draggable && void 0,
47
- children: jsxRuntime.jsx(ModalComponent, Object.assign({}, modalProps, {
48
- onResolve: value => {
49
- "function" == typeof (null == modalProps ? void 0 : modalProps.onResolve) && modalProps.onResolve(value),
50
- resolve(value);
51
- },
52
- onReject: error => {
53
- "function" == typeof (null == modalProps ? void 0 : modalProps.onReject) && modalProps.onReject(error),
54
- reject(error);
55
- },
56
- onClose: () => {
57
- "function" == typeof (null == modalProps ? void 0 : modalProps.onClose) && modalProps.onClose(),
58
- hide();
59
- },
60
- onDragPointerDown: e => {
61
- "function" == typeof (null == modalProps ? void 0 : modalProps.onDragPointerDown) && (null == modalProps || modalProps.onDragPointerDown(e)),
62
- controls.start(e);
63
- }
64
- }))
65
- })
66
- }) ]
67
- });
68
- };
@@ -1,76 +0,0 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
-
3
- import { useDragControls, AnimatePresence, motion } from "motion/react";
4
-
5
- import { O as Overlay } from "./Overlay-Dsy55Bxm.mjs";
6
-
7
- import { u as useModal, a as useModalActions } from "./modalStore-Crg_QmSJ.mjs";
8
-
9
- var css_wrapper = "ModalController-module_wrapper__HkOoX flexBox-module_row__z24tF";
10
-
11
- const defaultTransition = {
12
- ease: "easeOut",
13
- duration: .25,
14
- delay: .1
15
- }, defaultVariants = {
16
- initial: {
17
- opacity: 0,
18
- y: 20
19
- },
20
- animate: {
21
- opacity: 1,
22
- y: 0
23
- },
24
- exit: {
25
- opacity: 0,
26
- y: 20
27
- }
28
- };
29
-
30
- function ModalController(props) {
31
- const {dragConstraintsRef: dragConstraintsRef, transition: transition = defaultTransition, variants: variants = defaultVariants, initial: initial = "initial", animate: animate = "animate", exit: exit = "exit", draggable: draggable = !0, overlayOpacity: overlayOpacity = .7, overlayColor: overlayColor = "rgb(0,0,0)"} = props, controls = useDragControls(), modal = useModal(), resolve = useModalActions().resolve, reject = useModalActions().reject, hide = useModalActions().hide, ModalComponent = null == modal ? void 0 : modal.component, modalProps = null == modal ? void 0 : modal.props;
32
- return jsxs(Fragment, {
33
- children: [ jsx(Overlay, {
34
- show: !!modal,
35
- type: "dark",
36
- opacity: overlayOpacity,
37
- color: overlayColor,
38
- onClick: () => hide()
39
- }), jsx(AnimatePresence, {
40
- children: modal && ModalComponent && jsx(motion.div, {
41
- className: css_wrapper,
42
- variants: variants,
43
- initial: initial,
44
- animate: animate,
45
- exit: exit,
46
- transition: transition,
47
- drag: draggable,
48
- dragListener: !draggable && void 0,
49
- dragControls: draggable ? controls : void 0,
50
- dragConstraints: draggable ? dragConstraintsRef : void 0,
51
- dragElastic: draggable ? 0 : void 0,
52
- dragMomentum: !draggable && void 0,
53
- children: jsx(ModalComponent, Object.assign({}, modalProps, {
54
- onResolve: value => {
55
- "function" == typeof (null == modalProps ? void 0 : modalProps.onResolve) && modalProps.onResolve(value),
56
- resolve(value);
57
- },
58
- onReject: error => {
59
- "function" == typeof (null == modalProps ? void 0 : modalProps.onReject) && modalProps.onReject(error),
60
- reject(error);
61
- },
62
- onClose: () => {
63
- "function" == typeof (null == modalProps ? void 0 : modalProps.onClose) && modalProps.onClose(),
64
- hide();
65
- },
66
- onDragPointerDown: e => {
67
- "function" == typeof (null == modalProps ? void 0 : modalProps.onDragPointerDown) && (null == modalProps || modalProps.onDragPointerDown(e)),
68
- controls.start(e);
69
- }
70
- }))
71
- })
72
- }) ]
73
- });
74
- }
75
-
76
- export { ModalController as M };