@apple-pie/slice 0.1.31 → 0.1.32
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.
- package/README.md +35 -284
- package/dist/cjs/chunks/{AudioBubble-k7qS53g6.js → AudioBubble-Dh2IlYW0.js} +2 -2
- package/dist/cjs/chunks/{Avatar-hP8GuwvD.js → Avatar-WcBAu25_.js} +1 -1
- package/dist/cjs/chunks/{AvatarGroup-DMy34q7_.js → AvatarGroup-eUkVdeTf.js} +1 -1
- package/dist/cjs/chunks/{Badge-D2TbyfJS.js → Badge-4tBynWZe.js} +1 -1
- package/dist/cjs/chunks/{Button-CTsHZBEB.js → Button-QJ5lsSAz.js} +1 -1
- package/dist/cjs/chunks/{ButtonBar-BRb1PTmw.js → ButtonBar-DcpvT1vD.js} +1 -1
- package/dist/cjs/chunks/{Camera-CKv087kr.js → Camera-iDyPLq9h.js} +3 -3
- package/dist/cjs/chunks/{CheckBox-VRIL1FHh.js → CheckBox-CmZJd8u2.js} +1 -1
- package/dist/cjs/chunks/{Chip-Dr3vKvRY.js → Chip-Bd1bSYeC.js} +1 -1
- package/dist/cjs/chunks/{DivInput-Ci0gaCWL.js → DivInput-BY9pQ6ty.js} +1 -1
- package/dist/cjs/chunks/{Dot-C0MvSJOl.js → Dot-BeWDLajy.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-DflouLUs.js → DrggablePanel-DzY5wTco.js} +2 -2
- package/dist/cjs/chunks/{DropDown-BS1H62yj.js → DropDown-Cn_nX8u7.js} +1 -1
- package/dist/cjs/chunks/{ErrorSummary-B3tof7ir.js → ErrorSummary-D-0uVwyV.js} +2 -2
- package/dist/cjs/chunks/{FileIcon-Te8MaqTs.js → FileIcon-JfY2AYqG.js} +2 -2
- package/dist/cjs/chunks/{FileList-CDcfKIV6.js → FileList-Dc1nfpR2.js} +1 -1
- package/dist/cjs/chunks/{FlexDiv-wO8IY0Zf.js → FlexDiv-B5Pi0-aJ.js} +1 -1
- package/dist/cjs/chunks/{Grouper-DyGkzdvz.js → Grouper-DKZkTlow.js} +2 -2
- package/dist/cjs/chunks/{Icon-BFZ_5Qv3.js → Icon-BVYVJp9J.js} +2 -2
- package/dist/cjs/chunks/{IconButton-CgsuJIuF.js → IconButton-CP1Wsvsx.js} +1 -1
- package/dist/cjs/chunks/{IndexedDB-Dgwal8na.js → IndexedDB-CeiVT55Z.js} +1 -1
- package/dist/cjs/chunks/{Label-BuyhcJbF.js → Label-DIs1rOey.js} +1 -1
- package/dist/cjs/chunks/Level-3yxetsco.js +58 -0
- package/dist/cjs/chunks/{MdStreamBuffer-CbG_VeRI.js → MdStreamBuffer-BudWFoNw.js} +38 -16
- package/dist/cjs/chunks/{Modal-ByRyv3wy.js → Modal-CjpQdoOe.js} +34 -8
- package/dist/cjs/chunks/{ModalController-xjflFsjF.js → ModalController-Cp2PXOOS.js} +1 -1
- package/dist/cjs/chunks/{Overlay-FooE9M_s.js → Overlay-DRpHYZek.js} +1 -1
- package/dist/cjs/chunks/{Pager-B-cuwffo.js → Pager-ChnTKwml.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-ByZ_aYAZ.js → ProgressIndicator-CFiAU-aF.js} +2 -2
- package/dist/cjs/chunks/{PromptInput--grtHPvy.js → PromptInput-BFWR0TaP.js} +2 -2
- package/dist/cjs/chunks/{RadioButton-DP2X1dA_.js → RadioButton-Bi-FP41j.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-COGNW5y3.js → RadioButtonList-JHPKMCoX.js} +1 -1
- package/dist/cjs/chunks/{Slider-G1a8UKef.js → Slider-D97ws1Cl.js} +1 -1
- package/dist/cjs/chunks/{Spacer-CsRCleXv.js → Spacer-DvI2M1wZ.js} +1 -1
- package/dist/cjs/chunks/{Switch-OBVHKn_D.js → Switch-DDSSprb7.js} +1 -1
- package/dist/cjs/chunks/{TabBar-C1HkBaxE.js → TabBar-TllSeSzb.js} +2 -2
- package/dist/cjs/chunks/{TextArea-BEmNI_HZ.js → TextArea-DjZRDixt.js} +1 -1
- package/dist/cjs/chunks/{TextField-D9_COA9H.js → TextField-CKA3K0AN.js} +3 -3
- package/dist/cjs/chunks/{Tip-2W0u_oQN.js → Tip-BdGXN-TQ.js} +1 -1
- package/dist/cjs/chunks/{Toast-B9jX6ioq.js → Toast-COrDS_50.js} +5 -5
- package/dist/cjs/chunks/{ToggleButton-C_Gu5dYR.js → ToggleButton-hoOMzBZc.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-ENFAf4tE.js → UploadArea-ClG8ZgRZ.js} +1 -1
- package/dist/cjs/chunks/{WSConnection-CZ22tcLz.js → WSConnection-Brxc2hEv.js} +1 -1
- package/dist/cjs/chunks/WebRTCConnection-eWP4lueC.js +252 -0
- package/dist/cjs/chunks/{localDBStore-Ca73jeFf.js → localDBStore-SS_r0C6F.js} +1 -1
- package/dist/cjs/chunks/{microphoneStore-lxYIvhN8.js → microphoneStore-DM_8bhFr.js} +27 -4
- package/dist/cjs/chunks/{misc-DZAbObFp.js → misc-4xyXRU2K.js} +1 -1
- package/dist/cjs/chunks/{sseStore-Bq7sVvyA.js → sseStore-Ag-UnuQq.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-CD-annza.js → uploads-worker-CI-SZptI.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-CUeB10zx.js → uploadsStore-DR2hc4ct.js} +2 -2
- package/dist/cjs/chunks/{volumeStore-roYTyKJ2.js → volumeStore-DtTHf-9_.js} +5 -4
- package/dist/cjs/chunks/webRTCStore-DWWn7k-0.js +55 -0
- package/dist/cjs/chunks/{windowStore-BdJv-RF0.js → windowStore-BUo9Du_e.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +4 -4
- package/dist/cjs/components/Avatar/index.js +3 -3
- package/dist/cjs/components/AvatarGroup/index.js +3 -3
- package/dist/cjs/components/Badge/index.js +2 -2
- package/dist/cjs/components/Button/index.js +7 -7
- package/dist/cjs/components/ButtonBar/index.js +3 -3
- package/dist/cjs/components/Camera/index.js +5 -5
- package/dist/cjs/components/CheckBox/index.js +3 -3
- package/dist/cjs/components/Chip/index.js +4 -4
- package/dist/cjs/components/DivInput/index.js +3 -3
- package/dist/cjs/components/Dot/index.js +2 -2
- package/dist/cjs/components/DraggablePanel/index.js +3 -3
- package/dist/cjs/components/DropDown/index.js +3 -3
- package/dist/cjs/components/ErrorSummary/index.js +3 -3
- package/dist/cjs/components/FileIcon/index.js +3 -3
- package/dist/cjs/components/FileList/index.js +4 -4
- package/dist/cjs/components/FlexDiv/index.js +2 -2
- package/dist/cjs/components/Grouper/index.js +4 -4
- package/dist/cjs/components/Icon/index.js +3 -3
- package/dist/cjs/components/IconButton/index.js +6 -6
- package/dist/cjs/components/Label/index.js +3 -3
- package/dist/cjs/components/Level/index.js +7 -0
- package/dist/cjs/components/Modal/index.js +7 -7
- package/dist/cjs/components/ModalController/index.js +3 -3
- package/dist/cjs/components/Overlay/index.js +2 -2
- package/dist/cjs/components/Pager/index.js +3 -3
- package/dist/cjs/components/Progress/index.js +3 -3
- package/dist/cjs/components/PromptInput/index.js +7 -7
- package/dist/cjs/components/RadioButton/index.js +3 -3
- package/dist/cjs/components/RadioButtonList/index.js +4 -4
- package/dist/cjs/components/Slider/index.js +4 -4
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +2 -2
- package/dist/cjs/components/TabBar/index.js +5 -5
- package/dist/cjs/components/TextArea/index.js +7 -7
- package/dist/cjs/components/Textfield/index.js +7 -7
- package/dist/cjs/components/Tip/index.js +3 -3
- package/dist/cjs/components/Toast/index.js +4 -4
- package/dist/cjs/components/ToggleButton/index.js +7 -7
- package/dist/cjs/components/UploadArea/index.js +5 -5
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +60 -0
- package/dist/cjs/hooks/useLocalStore.js +3 -3
- package/dist/cjs/hooks/useMdStreamBuffer.js +55 -30
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +7 -4
- package/dist/cjs/index.js +19 -17
- package/dist/cjs/providers/ThemeProvider.js +5 -4
- package/dist/cjs/providers/themeServer.js +15 -9
- package/dist/cjs/stores/LocalDB.js +3 -3
- package/dist/cjs/stores/SSE.js +2 -2
- package/dist/cjs/stores/WS.js +2 -2
- package/dist/cjs/stores/WebRTC.js +9 -0
- package/dist/cjs/stores/microphone.js +5 -4
- package/dist/cjs/stores/modal.js +1 -1
- package/dist/cjs/stores/tip.js +1 -1
- package/dist/cjs/stores/toast.js +1 -1
- package/dist/cjs/stores/uploads.js +2 -2
- package/dist/cjs/stores/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +18 -13
- package/dist/cjs/utils/index.js +4 -3
- package/dist/cjs/utils/objects/index.js +4 -3
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/esm/chunks/{AudioBubble-DfrxyTX_.mjs → AudioBubble-cYlxxQ7c.mjs} +3 -3
- package/dist/esm/chunks/{Avatar-pA41Pcyl.mjs → Avatar-D84wF2os.mjs} +2 -2
- package/dist/esm/chunks/{AvatarGroup-CZBtWjnj.mjs → AvatarGroup-DiwfbRxH.mjs} +2 -2
- package/dist/esm/chunks/{Badge-pLwG0zm7.mjs → Badge-DuUb5-80.mjs} +1 -1
- package/dist/esm/chunks/{Button-BJoMLZIs.mjs → Button-BIgwWrPJ.mjs} +6 -6
- package/dist/esm/chunks/{ButtonBar-BO2RUJ8R.mjs → ButtonBar-vNvnvw7u.mjs} +3 -3
- package/dist/esm/chunks/{Camera-4MNA52HG.mjs → Camera-BMwkTJPq.mjs} +5 -5
- package/dist/esm/chunks/{CheckBox-7KAsvZld.mjs → CheckBox-Cpoxy8w_.mjs} +3 -3
- package/dist/esm/chunks/{Chip-BuGvCLLU.mjs → Chip-BayNVv7N.mjs} +4 -4
- package/dist/esm/chunks/{DivInput-D0YzSWjJ.mjs → DivInput-CWRUxy1y.mjs} +2 -2
- package/dist/esm/chunks/{Dot-h26m47Z-.mjs → Dot-v_kcIWV2.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-Bh6HLPMX.mjs → DrggablePanel-yEeGeE1w.mjs} +2 -2
- package/dist/esm/chunks/{DropDown-NgMYjjXn.mjs → DropDown-QQhwAg_J.mjs} +3 -3
- package/dist/esm/chunks/{ErrorSummary-nNm9qymE.mjs → ErrorSummary-DzIZMIll.mjs} +2 -2
- package/dist/esm/chunks/{FileIcon-BqyV1wut.mjs → FileIcon-6UlkbKzk.mjs} +2 -2
- package/dist/esm/chunks/{FileList-C1tOvoc0.mjs → FileList-vMiGJByw.mjs} +5 -5
- package/dist/esm/chunks/{FlexDiv-CkK-DAyg.mjs → FlexDiv-B1m7aY04.mjs} +1 -1
- package/dist/esm/chunks/{Grouper-CyrOkuu2.mjs → Grouper-BDrAnfDF.mjs} +3 -3
- package/dist/esm/chunks/{Icon-DjW0Krm8.mjs → Icon-D4A6_c4x.mjs} +2 -2
- package/dist/esm/chunks/{IconButton-DdLhTUl0.mjs → IconButton-B_W-aOsB.mjs} +5 -5
- package/dist/esm/chunks/{IndexedDB-DVoDikoA.mjs → IndexedDB-CTqfKmp1.mjs} +1 -1
- package/dist/esm/chunks/{Label-DhmJ_Sln.mjs → Label-I75yz3gq.mjs} +2 -2
- package/dist/esm/chunks/Level-DgczkKBr.mjs +63 -0
- package/dist/esm/chunks/{MdStreamBuffer-4AJH8WaN.mjs → MdStreamBuffer-CoQWQwRL.mjs} +38 -16
- package/dist/esm/chunks/{Modal-FztrJsQo.mjs → Modal-CwwyijaO.mjs} +39 -13
- package/dist/esm/chunks/{ModalController-C1BnM5Dz.mjs → ModalController-IyB9lDRa.mjs} +2 -2
- package/dist/esm/chunks/{Overlay-Dsy55Bxm.mjs → Overlay-C-yori3-.mjs} +1 -1
- package/dist/esm/chunks/{Pager-BqSdwL0L.mjs → Pager-BEtfyKtq.mjs} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-BnqZFATV.mjs → ProgressIndicator-BV0ginXb.mjs} +2 -2
- package/dist/esm/chunks/{PromptInput-CRkcPXJu.mjs → PromptInput-Cn5fRYap.mjs} +3 -3
- package/dist/esm/chunks/{RadioButton-DXq3yniV.mjs → RadioButton-DWlg6ldv.mjs} +3 -3
- package/dist/esm/chunks/{RadioButtonList-BgOskHCP.mjs → RadioButtonList-D9FdlhPL.mjs} +3 -3
- package/dist/esm/chunks/{Slider-DPOy9uNI.mjs → Slider-B2WZkZSg.mjs} +3 -3
- package/dist/esm/chunks/{Spacer-BJd_D0Fn.mjs → Spacer-7Oj0SlD0.mjs} +1 -1
- package/dist/esm/chunks/{Switch-DHqlyizo.mjs → Switch-DRhnznnO.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-RBXExqMK.mjs → TabBar-D6VR71ye.mjs} +5 -5
- package/dist/esm/chunks/{TextArea-CIlx_P26.mjs → TextArea-CkB5rJjI.mjs} +2 -2
- package/dist/esm/chunks/{TextField-CX72ybwH.mjs → TextField-BIXmkjEz.mjs} +5 -5
- package/dist/esm/chunks/{Tip-COBSyEjm.mjs → Tip-CTdrwLky.mjs} +2 -2
- package/dist/esm/chunks/{Toast-BTm3HxDD.mjs → Toast-8bUziIgh.mjs} +6 -6
- package/dist/esm/chunks/{ToggleButton-DujsCKF3.mjs → ToggleButton-BOFITa8_.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea-D--Nt8Ed.mjs → UploadArea-DE2ccDVx.mjs} +4 -4
- package/dist/esm/chunks/{WSConnection-BMXcuW3f.mjs → WSConnection-CHudrD62.mjs} +1 -1
- package/dist/esm/chunks/WebRTCConnection-DQbNa7Z9.mjs +252 -0
- package/dist/esm/chunks/{localDBStore-36E3160Z.mjs → localDBStore-CaYiqITY.mjs} +2 -2
- package/dist/esm/chunks/{microphoneStore-Cexu82zH.mjs → microphoneStore-COEGtgyX.mjs} +26 -3
- package/dist/esm/chunks/{misc-CTGTuM2J.mjs → misc-2MIIqzsX.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-Dow4NXkZ.mjs → sseStore-nW9CMec_.mjs} +2 -2
- package/dist/esm/chunks/{tslib.es6-BX2F90pK.mjs → tslib.es6-C81Qhn1z.mjs} +1 -1
- package/dist/esm/chunks/{uploads-worker-Dhyp4ot3.mjs → uploads-worker-CMomtRvm.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-DT4lFybE.mjs → uploadsStore-CsfpSOTS.mjs} +1 -1
- package/dist/esm/chunks/{volumeStore-RAxdmQ60.mjs → volumeStore-TSYPqbHx.mjs} +5 -4
- package/dist/esm/chunks/webRTCStore-CVCDJzj5.mjs +57 -0
- package/dist/esm/chunks/{windowStore-C4AZexIa.mjs → windowStore-BvejIR82.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +4 -4
- package/dist/esm/components/Avatar/index.mjs +3 -3
- package/dist/esm/components/AvatarGroup/index.mjs +4 -4
- package/dist/esm/components/Badge/index.mjs +2 -2
- package/dist/esm/components/Button/index.mjs +8 -8
- package/dist/esm/components/ButtonBar/index.mjs +4 -4
- package/dist/esm/components/Camera/index.mjs +6 -6
- package/dist/esm/components/CheckBox/index.mjs +4 -4
- package/dist/esm/components/Chip/index.mjs +5 -5
- package/dist/esm/components/DivInput/index.mjs +3 -3
- package/dist/esm/components/Dot/index.mjs +2 -2
- package/dist/esm/components/DraggablePanel/index.mjs +3 -3
- package/dist/esm/components/DropDown/index.mjs +4 -4
- package/dist/esm/components/ErrorSummary/index.mjs +3 -3
- package/dist/esm/components/FileIcon/index.mjs +3 -3
- package/dist/esm/components/FileList/index.mjs +6 -6
- package/dist/esm/components/FlexDiv/index.mjs +2 -2
- package/dist/esm/components/Grouper/index.mjs +5 -5
- package/dist/esm/components/Icon/index.mjs +4 -4
- package/dist/esm/components/IconButton/index.mjs +7 -7
- package/dist/esm/components/Label/index.mjs +3 -3
- package/dist/esm/components/Level/index.mjs +11 -0
- package/dist/esm/components/Modal/index.mjs +10 -10
- package/dist/esm/components/ModalController/index.mjs +4 -4
- package/dist/esm/components/Overlay/index.mjs +2 -2
- package/dist/esm/components/Pager/index.mjs +3 -3
- package/dist/esm/components/Progress/index.mjs +4 -4
- package/dist/esm/components/PromptInput/index.mjs +11 -11
- package/dist/esm/components/RadioButton/index.mjs +4 -4
- package/dist/esm/components/RadioButtonList/index.mjs +5 -5
- package/dist/esm/components/Slider/index.mjs +4 -4
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -2
- package/dist/esm/components/TabBar/index.mjs +8 -8
- package/dist/esm/components/TextArea/index.mjs +9 -9
- package/dist/esm/components/Textfield/index.mjs +10 -10
- package/dist/esm/components/Tip/index.mjs +3 -3
- package/dist/esm/components/Toast/index.mjs +5 -5
- package/dist/esm/components/ToggleButton/index.mjs +9 -9
- package/dist/esm/components/UploadArea/index.mjs +7 -7
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +72 -0
- package/dist/esm/hooks/useLocalStore.mjs +3 -3
- package/dist/esm/hooks/useMdStreamBuffer.mjs +56 -28
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +14 -2
- package/dist/esm/index.mjs +62 -50
- package/dist/esm/providers/ThemeProvider.mjs +6 -5
- package/dist/esm/providers/themeServer.mjs +11 -6
- package/dist/esm/stores/LocalDB.mjs +3 -3
- package/dist/esm/stores/SSE.mjs +3 -3
- package/dist/esm/stores/WS.mjs +2 -2
- package/dist/esm/stores/WebRTC.mjs +7 -0
- package/dist/esm/stores/microphone.mjs +2 -2
- package/dist/esm/stores/modal.mjs +1 -1
- package/dist/esm/stores/tip.mjs +1 -1
- package/dist/esm/stores/toast.mjs +1 -1
- package/dist/esm/stores/uploads.mjs +3 -3
- package/dist/esm/stores/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +17 -13
- package/dist/esm/utils/index.mjs +11 -9
- package/dist/esm/utils/objects/index.mjs +8 -6
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +51 -11
- package/dist/types/components/Level/Level.d.ts +5 -0
- package/dist/types/components/Level/_types.d.ts +21 -0
- package/dist/types/components/Level/index.d.ts +2 -0
- package/dist/types/components/Modal/_types.d.ts +3 -0
- package/dist/types/components/Toast/_types.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useBindWebRTC/index.d.ts +1 -0
- package/dist/types/hooks/useBindWebRTC/useBindWebRTC.d.ts +15 -0
- package/dist/types/hooks/useLocalStore/useLocalStore.d.ts +1 -1
- package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.d.ts +6 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/providers/ThemeProvider.d.ts +1 -0
- package/dist/types/providers/themeServer.d.ts +7 -3
- package/dist/types/stores/WebRTC/_types.d.ts +16 -0
- package/dist/types/stores/WebRTC/index.d.ts +2 -0
- package/dist/types/stores/WebRTC/webRTCStore.d.ts +21 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/microphone/index.d.ts +1 -1
- package/dist/types/stores/microphone/microphoneStore.d.ts +14 -1
- package/dist/types/stores/toast/_types.d.ts +1 -0
- package/dist/types/stores/volume/_types.d.ts +3 -1
- package/dist/types/stores/volume/volumeStore.d.ts +6 -2
- package/dist/types/utils/functions/files.d.ts +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +10 -0
- package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +2 -0
- package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +37 -3
- package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +13 -4
- package/dist/types/utils/objects/index.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/cjs/chunks/{SSEConnection-ACoOeeTO.js → SSEConnection-DfjLAlOG.js} +0 -0
- /package/dist/cjs/chunks/{_types-k-3V1fz_.js → _types-DMyBIF8s.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-MOSbvvnZ.js → audioVisualizer-BxPvUj4h.js} +0 -0
- /package/dist/cjs/chunks/{colors-B0_3srZN.js → colors-4n0sNFRA.js} +0 -0
- /package/dist/cjs/chunks/{debounce-CaoYvh12.js → debounce-_IK-La-Z.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-D4bOjuWd.js → modalStore-CFsfK3ba.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-CthHPjrO.js → sharedTypes-C0ZHzH_T.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-CPB7RHKY.js → tipStore-dqD9-c30.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-6eHe6esp.js → toastStore-BN1N7WXv.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-CzpRaW14.js → tslib.es6-DsF7Wv4Y.js} +0 -0
- /package/dist/esm/chunks/{SSEConnection-qNnkZUOe.mjs → SSEConnection-iFKOV9Uo.mjs} +0 -0
- /package/dist/esm/chunks/{_types-CEStVWlB.mjs → _types-DrNviSG6.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-BUNbarKP.mjs → audioVisualizer-BsmpLZyK.mjs} +0 -0
- /package/dist/esm/chunks/{colors-D-qeA9gU.mjs → colors-BAATtfbL.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-D5b6tZ5a.mjs → debounce-CYBH5qXQ.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-Crg_QmSJ.mjs → modalStore-DmaeMv7z.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-U5H1I85x.mjs → sharedTypes-CyrInj1b.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-pvswaezx.mjs → tipStore-B_MUZfr2.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-80oOTYsj.mjs → toastStore-DAprlBVj.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DoneCheck, P as ProgressIndicator } from "../../chunks/ProgressIndicator-
|
|
1
|
+
export { D as DoneCheck, P as ProgressIndicator } from "../../chunks/ProgressIndicator-BV0ginXb.mjs";
|
|
2
2
|
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -22,12 +22,12 @@ import "../../theme/type.mjs";
|
|
|
22
22
|
|
|
23
23
|
import "../../hooks/useObserveTheme.mjs";
|
|
24
24
|
|
|
25
|
-
import "../../chunks/tslib.es6-
|
|
25
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
26
26
|
|
|
27
27
|
import "../../hooks/useWindow.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/Icon-
|
|
29
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
30
30
|
|
|
31
|
-
import "../../chunks/misc-
|
|
31
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
32
32
|
|
|
33
33
|
import "motion/react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as PromptInput } from "../../chunks/PromptInput-
|
|
1
|
+
export { P as PromptInput } from "../../chunks/PromptInput-Cn5fRYap.mjs";
|
|
2
2
|
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -22,26 +22,26 @@ import "../../theme/type.mjs";
|
|
|
22
22
|
|
|
23
23
|
import "../../hooks/useObserveTheme.mjs";
|
|
24
24
|
|
|
25
|
-
import "../../chunks/tslib.es6-
|
|
25
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
26
26
|
|
|
27
27
|
import "../../hooks/useWindow.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/Button-
|
|
29
|
+
import "../../chunks/Button-BIgwWrPJ.mjs";
|
|
30
30
|
|
|
31
31
|
import "motion/react";
|
|
32
32
|
|
|
33
|
-
import "../../chunks/Badge-
|
|
33
|
+
import "../../chunks/Badge-DuUb5-80.mjs";
|
|
34
34
|
|
|
35
|
-
import "../../chunks/Dot-
|
|
35
|
+
import "../../chunks/Dot-v_kcIWV2.mjs";
|
|
36
36
|
|
|
37
|
-
import "../../chunks/Icon-
|
|
37
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
38
38
|
|
|
39
|
-
import "../../chunks/misc-
|
|
39
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
40
40
|
|
|
41
|
-
import "../../chunks/ProgressIndicator-
|
|
41
|
+
import "../../chunks/ProgressIndicator-BV0ginXb.mjs";
|
|
42
42
|
|
|
43
|
-
import "../../chunks/sharedTypes-
|
|
43
|
+
import "../../chunks/sharedTypes-CyrInj1b.mjs";
|
|
44
44
|
|
|
45
|
-
import "../../chunks/FileList-
|
|
45
|
+
import "../../chunks/FileList-vMiGJByw.mjs";
|
|
46
46
|
|
|
47
|
-
import "../../chunks/FileIcon-
|
|
47
|
+
import "../../chunks/FileIcon-6UlkbKzk.mjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { R as RadioButton } from "../../chunks/RadioButton-
|
|
1
|
+
export { R as RadioButton } from "../../chunks/RadioButton-DWlg6ldv.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
import "react";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/misc-
|
|
9
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/Icon-
|
|
11
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
12
12
|
|
|
13
13
|
import "../../hooks/useTheme.mjs";
|
|
14
14
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { R as RadioButtonList } from "../../chunks/RadioButtonList-
|
|
1
|
+
export { R as RadioButtonList } from "../../chunks/RadioButtonList-D9FdlhPL.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
import "react";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/misc-
|
|
9
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/RadioButton-
|
|
11
|
+
import "../../chunks/RadioButton-DWlg6ldv.mjs";
|
|
12
12
|
|
|
13
|
-
import "../../chunks/Icon-
|
|
13
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
14
14
|
|
|
15
15
|
import "../../hooks/useTheme.mjs";
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { S as Slider } from "../../chunks/Slider-
|
|
1
|
+
export { S as Slider } from "../../chunks/Slider-B2WZkZSg.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -8,6 +8,6 @@ import "react";
|
|
|
8
8
|
|
|
9
9
|
import "../../hooks/useObserveResize.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/
|
|
11
|
+
import "../../chunks/debounce-CYBH5qXQ.mjs";
|
|
12
12
|
|
|
13
|
-
import "../../chunks/
|
|
13
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { T as TabBar } from "../../chunks/TabBar-
|
|
1
|
+
export { T as TabBar } from "../../chunks/TabBar-D6VR71ye.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -26,16 +26,16 @@ import "../../hooks/useObserveTheme.mjs";
|
|
|
26
26
|
|
|
27
27
|
import "../../hooks/useWindow.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/Badge-
|
|
29
|
+
import "../../chunks/Badge-DuUb5-80.mjs";
|
|
30
30
|
|
|
31
|
-
import "../../chunks/Icon-
|
|
31
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
32
32
|
|
|
33
|
-
import "../../chunks/misc-
|
|
33
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
34
34
|
|
|
35
|
-
import "../../chunks/IconButton-
|
|
35
|
+
import "../../chunks/IconButton-B_W-aOsB.mjs";
|
|
36
36
|
|
|
37
37
|
import "motion/react";
|
|
38
38
|
|
|
39
|
-
import "../../chunks/Dot-
|
|
39
|
+
import "../../chunks/Dot-v_kcIWV2.mjs";
|
|
40
40
|
|
|
41
|
-
import "../../chunks/sharedTypes-
|
|
41
|
+
import "../../chunks/sharedTypes-CyrInj1b.mjs";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { T as TextArea } from "../../chunks/TextArea-
|
|
1
|
+
export { T as TextArea } from "../../chunks/TextArea-CkB5rJjI.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
import "react";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/Button-
|
|
9
|
+
import "../../chunks/Button-BIgwWrPJ.mjs";
|
|
10
10
|
|
|
11
11
|
import "motion/react";
|
|
12
12
|
|
|
13
|
-
import "../../chunks/Badge-
|
|
13
|
+
import "../../chunks/Badge-DuUb5-80.mjs";
|
|
14
14
|
|
|
15
|
-
import "../../chunks/Dot-
|
|
15
|
+
import "../../chunks/Dot-v_kcIWV2.mjs";
|
|
16
16
|
|
|
17
|
-
import "../../chunks/Icon-
|
|
17
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
18
18
|
|
|
19
19
|
import "../../hooks/useTheme.mjs";
|
|
20
20
|
|
|
@@ -34,10 +34,10 @@ import "../../theme/type.mjs";
|
|
|
34
34
|
|
|
35
35
|
import "../../hooks/useObserveTheme.mjs";
|
|
36
36
|
|
|
37
|
-
import "../../chunks/misc-
|
|
37
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
38
38
|
|
|
39
39
|
import "../../hooks/useWindow.mjs";
|
|
40
40
|
|
|
41
|
-
import "../../chunks/ProgressIndicator-
|
|
41
|
+
import "../../chunks/ProgressIndicator-BV0ginXb.mjs";
|
|
42
42
|
|
|
43
|
-
import "../../chunks/sharedTypes-
|
|
43
|
+
import "../../chunks/sharedTypes-CyrInj1b.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { T as TextField } from "../../chunks/TextField-
|
|
1
|
+
export { T as TextField } from "../../chunks/TextField-BIXmkjEz.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -26,20 +26,20 @@ import "../../theme/type.mjs";
|
|
|
26
26
|
|
|
27
27
|
import "../../hooks/useObserveTheme.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/misc-
|
|
29
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
30
30
|
|
|
31
31
|
import "../../hooks/useWindow.mjs";
|
|
32
32
|
|
|
33
|
-
import "../../chunks/Button-
|
|
33
|
+
import "../../chunks/Button-BIgwWrPJ.mjs";
|
|
34
34
|
|
|
35
|
-
import "../../chunks/Badge-
|
|
35
|
+
import "../../chunks/Badge-DuUb5-80.mjs";
|
|
36
36
|
|
|
37
|
-
import "../../chunks/Dot-
|
|
37
|
+
import "../../chunks/Dot-v_kcIWV2.mjs";
|
|
38
38
|
|
|
39
|
-
import "../../chunks/Icon-
|
|
39
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
40
40
|
|
|
41
|
-
import "../../chunks/ProgressIndicator-
|
|
41
|
+
import "../../chunks/ProgressIndicator-BV0ginXb.mjs";
|
|
42
42
|
|
|
43
|
-
import "../../chunks/sharedTypes-
|
|
43
|
+
import "../../chunks/sharedTypes-CyrInj1b.mjs";
|
|
44
44
|
|
|
45
|
-
import "../../chunks/IconButton-
|
|
45
|
+
import "../../chunks/IconButton-B_W-aOsB.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { T as Tip } from "../../chunks/Tip-
|
|
1
|
+
export { T as Tip } from "../../chunks/Tip-CTdrwLky.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -8,4 +8,4 @@ import "motion/react";
|
|
|
8
8
|
|
|
9
9
|
import "react";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/misc-
|
|
11
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { T as Toast, a as ToastType } from "../../chunks/Toast-
|
|
1
|
+
export { T as Toast, a as ToastType } from "../../chunks/Toast-8bUziIgh.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -26,10 +26,10 @@ import "../../theme/type.mjs";
|
|
|
26
26
|
|
|
27
27
|
import "../../hooks/useObserveTheme.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/misc-
|
|
29
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
30
30
|
|
|
31
31
|
import "../../hooks/useWindow.mjs";
|
|
32
32
|
|
|
33
|
-
import "../../chunks/Icon-
|
|
33
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
34
34
|
|
|
35
|
-
import "../../chunks/ProgressIndicator-
|
|
35
|
+
import "../../chunks/ProgressIndicator-BV0ginXb.mjs";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { T as ToggleButton } from "../../chunks/ToggleButton-
|
|
1
|
+
export { T as ToggleButton } from "../../chunks/ToggleButton-BOFITa8_.mjs";
|
|
2
2
|
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
import "react";
|
|
6
6
|
|
|
7
|
-
import "../../chunks/IconButton-
|
|
7
|
+
import "../../chunks/IconButton-B_W-aOsB.mjs";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/tslib.es6-
|
|
9
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
10
10
|
|
|
11
11
|
import "motion/react";
|
|
12
12
|
|
|
13
|
-
import "../../chunks/Badge-
|
|
13
|
+
import "../../chunks/Badge-DuUb5-80.mjs";
|
|
14
14
|
|
|
15
|
-
import "../../chunks/Dot-
|
|
15
|
+
import "../../chunks/Dot-v_kcIWV2.mjs";
|
|
16
16
|
|
|
17
|
-
import "../../chunks/Icon-
|
|
17
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
18
18
|
|
|
19
19
|
import "../../hooks/useTheme.mjs";
|
|
20
20
|
|
|
@@ -34,10 +34,10 @@ import "../../theme/type.mjs";
|
|
|
34
34
|
|
|
35
35
|
import "../../hooks/useObserveTheme.mjs";
|
|
36
36
|
|
|
37
|
-
import "../../chunks/misc-
|
|
37
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
38
38
|
|
|
39
39
|
import "../../hooks/useWindow.mjs";
|
|
40
40
|
|
|
41
|
-
import "../../chunks/sharedTypes-
|
|
41
|
+
import "../../chunks/sharedTypes-CyrInj1b.mjs";
|
|
42
42
|
|
|
43
|
-
import "../../chunks/Label-
|
|
43
|
+
import "../../chunks/Label-I75yz3gq.mjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "../../chunks/UploadArea-
|
|
1
|
+
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "../../chunks/UploadArea-DE2ccDVx.mjs";
|
|
2
2
|
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
import "react";
|
|
6
6
|
|
|
7
|
-
import "../../chunks/misc-
|
|
7
|
+
import "../../chunks/misc-2MIIqzsX.mjs";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/tslib.es6-
|
|
9
|
+
import "../../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/Icon-
|
|
11
|
+
import "../../chunks/Icon-D4A6_c4x.mjs";
|
|
12
12
|
|
|
13
13
|
import "../../hooks/useTheme.mjs";
|
|
14
14
|
|
|
@@ -30,10 +30,10 @@ import "../../hooks/useObserveTheme.mjs";
|
|
|
30
30
|
|
|
31
31
|
import "../../hooks/useWindow.mjs";
|
|
32
32
|
|
|
33
|
-
import "../../chunks/ProgressIndicator-
|
|
33
|
+
import "../../chunks/ProgressIndicator-BV0ginXb.mjs";
|
|
34
34
|
|
|
35
35
|
import "motion/react";
|
|
36
36
|
|
|
37
|
-
import "../../chunks/FileList-
|
|
37
|
+
import "../../chunks/FileList-vMiGJByw.mjs";
|
|
38
38
|
|
|
39
|
-
import "../../chunks/FileIcon-
|
|
39
|
+
import "../../chunks/FileIcon-6UlkbKzk.mjs";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { a as __awaiter } from "../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
3
|
+
|
|
4
|
+
import { useState, useRef, useCallback, useEffect } from "react";
|
|
5
|
+
|
|
6
|
+
import { q as useProcessedMicStream } from "../chunks/microphoneStore-COEGtgyX.mjs";
|
|
7
|
+
|
|
8
|
+
import { f as useVolume } from "../chunks/volumeStore-TSYPqbHx.mjs";
|
|
9
|
+
|
|
10
|
+
import { u as useWebRTC, c as useWebRTCConnection, g as getWebRTCConnections } from "../chunks/webRTCStore-CVCDJzj5.mjs";
|
|
11
|
+
|
|
12
|
+
import "zustand";
|
|
13
|
+
|
|
14
|
+
import "../chunks/WebRTCConnection-DQbNa7Z9.mjs";
|
|
15
|
+
|
|
16
|
+
function useBindWebRTC(options) {
|
|
17
|
+
var _a;
|
|
18
|
+
const {connectionName: connectionName, offerOptions: offerOptions, bearerToken: bearerToken, connectionUrl: connectionUrl, audioElement: audioElement, autoPlayAudio: autoPlayAudio, dataChannels: dataChannels, videoTrack: videoTrack, onRemoteVideoStream: onRemoteVideoStream, onRemoteAudioStream: onRemoteAudioStream, onDataChannelEvent: onDataChannelEvent} = options, processedMicStream = useProcessedMicStream(), volume = useVolume(), {addConnection: addConnection, initializeConnection: initializeConnection, removeConnection: removeConnection, setMicStream: setMicStream, setVolume: setVolume} = useWebRTC(), connectionEntry = useWebRTCConnection(connectionName), [error, setError] = useState(null), [bound, setBound] = useState(!1), ownsConnectionRef = useRef(!1), unbind = useCallback(() => {
|
|
19
|
+
ownsConnectionRef.current && removeConnection(connectionName), ownsConnectionRef.current = !1,
|
|
20
|
+
setBound(!1), setError(null);
|
|
21
|
+
}, [ connectionName, removeConnection ]), bind = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
setError(null);
|
|
24
|
+
const existingConnection = getWebRTCConnections().find(connection => connection.name === connectionName);
|
|
25
|
+
if (existingConnection) {
|
|
26
|
+
const nextError = new Error(`WebRTC connection "${connectionName}" already exists`);
|
|
27
|
+
return setError(nextError), existingConnection.connection;
|
|
28
|
+
}
|
|
29
|
+
const micStream = processedMicStream.current;
|
|
30
|
+
if (!micStream) {
|
|
31
|
+
const nextError = new Error("No processed microphone stream available");
|
|
32
|
+
return setError(nextError), null;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
return addConnection(connectionName, {
|
|
36
|
+
connectionUrl: connectionUrl,
|
|
37
|
+
audioElement: audioElement,
|
|
38
|
+
autoPlayAudio: autoPlayAudio,
|
|
39
|
+
dataChannels: dataChannels,
|
|
40
|
+
micStream: micStream,
|
|
41
|
+
videoTrack: videoTrack,
|
|
42
|
+
volume: volume,
|
|
43
|
+
onRemoteVideoStream: onRemoteVideoStream,
|
|
44
|
+
onRemoteAudioStream: onRemoteAudioStream,
|
|
45
|
+
onDataChannelEvent: onDataChannelEvent
|
|
46
|
+
}), ownsConnectionRef.current = !0, yield initializeConnection(connectionName, offerOptions, bearerToken),
|
|
47
|
+
setBound(!0), null !== (_b = null === (_a = getWebRTCConnections().find(connection => connection.name === connectionName)) || void 0 === _a ? void 0 : _a.connection) && void 0 !== _b ? _b : null;
|
|
48
|
+
} catch (bindError) {
|
|
49
|
+
ownsConnectionRef.current && removeConnection(connectionName), ownsConnectionRef.current = !1,
|
|
50
|
+
setBound(!1);
|
|
51
|
+
const nextError = bindError instanceof Error ? bindError : new Error("Failed to bind WebRTC connection");
|
|
52
|
+
return setError(nextError), null;
|
|
53
|
+
}
|
|
54
|
+
}), [ addConnection, audioElement, autoPlayAudio, bearerToken, connectionName, connectionUrl, dataChannels, initializeConnection, onDataChannelEvent, onRemoteAudioStream, onRemoteVideoStream, offerOptions, processedMicStream, removeConnection, videoTrack, volume ]);
|
|
55
|
+
return useEffect(() => {
|
|
56
|
+
bound && ownsConnectionRef.current && setMicStream(connectionName, processedMicStream.current).catch(streamError => {
|
|
57
|
+
setError(streamError instanceof Error ? streamError : new Error("Failed to update WebRTC microphone stream"));
|
|
58
|
+
});
|
|
59
|
+
}, [ bound, connectionName, processedMicStream, setMicStream ]), useEffect(() => {
|
|
60
|
+
bound && ownsConnectionRef.current && setVolume(connectionName, volume);
|
|
61
|
+
}, [ bound, connectionName, setVolume, volume ]), useEffect(() => () => {
|
|
62
|
+
ownsConnectionRef.current && (removeConnection(connectionName), ownsConnectionRef.current = !1);
|
|
63
|
+
}, [ connectionName, removeConnection ]), {
|
|
64
|
+
connection: null !== (_a = null == connectionEntry ? void 0 : connectionEntry.connection) && void 0 !== _a ? _a : null,
|
|
65
|
+
error: error,
|
|
66
|
+
bind: bind,
|
|
67
|
+
unbind: unbind,
|
|
68
|
+
bound: bound
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { useBindWebRTC };
|
|
@@ -17,15 +17,15 @@ function readLocalStorageValue(key, fallback) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function useLocalStore(key, value) {
|
|
20
|
-
const [item, setItem] = useState(() => readLocalStorageValue(key, value));
|
|
20
|
+
const [item, setItem] = useState(() => readLocalStorageValue(key, value)), [hydrated, setHydrated] = useState(!1);
|
|
21
21
|
return useEffect(() => {
|
|
22
|
-
setItem(readLocalStorageValue(key, value));
|
|
22
|
+
setItem(readLocalStorageValue(key, value)), setHydrated(!0);
|
|
23
23
|
}, [ key, value ]), [ item, function(data) {
|
|
24
24
|
if (canUseLocalStorage()) try {
|
|
25
25
|
globalThis.localStorage.setItem(key, JSON.stringify(data));
|
|
26
26
|
} catch (_a) {}
|
|
27
27
|
setItem(data);
|
|
28
|
-
} ];
|
|
28
|
+
}, hydrated ];
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { useLocalStore };
|
|
@@ -1,42 +1,70 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { _ as __rest } from "../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
3
3
|
|
|
4
|
-
import "
|
|
4
|
+
import { useRef, useState, useCallback, useEffect } from "react";
|
|
5
5
|
|
|
6
|
-
import { M as MdBuffer } from "../chunks/MdStreamBuffer-
|
|
6
|
+
import { M as MdBuffer } from "../chunks/MdStreamBuffer-CoQWQwRL.mjs";
|
|
7
7
|
|
|
8
8
|
function useMDStreamBuffer(options) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const bufferRef = useRef(null), queuedValueRef = useRef(""), paceTimerRef = useRef(null), [healthy, setHealthy] = useState(""), [raw, setRaw] = useState(""), [isComplete, setIsComplete] = useState(!1), [pendingCharacters, setPendingCharacters] = useState(0), paceDelayMs = Math.max(0, null !== (_a = null == options ? void 0 : options.paceDelayMs) && void 0 !== _a ? _a : 0), paceChunkSize = Math.max(1, null !== (_b = null == options ? void 0 : options.paceChunkSize) && void 0 !== _b ? _b : Number.POSITIVE_INFINITY), usesPacing = void 0 !== (null == options ? void 0 : options.paceDelayMs) || void 0 !== (null == options ? void 0 : options.paceChunkSize), getTotalPendingCharacters = useCallback(() => {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
return queuedValueRef.current.length + (null !== (_b = null === (_a = bufferRef.current) || void 0 === _a ? void 0 : _a.pendingCharacters) && void 0 !== _b ? _b : 0);
|
|
13
|
+
}, []), clearPaceTimer = useCallback(() => {
|
|
14
|
+
null !== paceTimerRef.current && (clearTimeout(paceTimerRef.current), paceTimerRef.current = null);
|
|
15
|
+
}, []), releaseQueuedChunk = useCallback(() => {
|
|
16
|
+
if (!bufferRef.current || 0 === queuedValueRef.current.length) return clearPaceTimer(),
|
|
17
|
+
void setPendingCharacters(getTotalPendingCharacters());
|
|
18
|
+
const nextChunk = Number.isFinite(paceChunkSize) ? queuedValueRef.current.slice(0, paceChunkSize) : queuedValueRef.current;
|
|
19
|
+
queuedValueRef.current = queuedValueRef.current.slice(nextChunk.length), bufferRef.current.append(nextChunk),
|
|
20
|
+
setPendingCharacters(getTotalPendingCharacters()), 0 !== queuedValueRef.current.length ? paceTimerRef.current = setTimeout(releaseQueuedChunk, paceDelayMs) : clearPaceTimer();
|
|
21
|
+
}, [ clearPaceTimer, getTotalPendingCharacters, paceChunkSize, paceDelayMs ]), ensurePaceTimer = useCallback(() => {
|
|
22
|
+
usesPacing && null === paceTimerRef.current && (paceTimerRef.current = setTimeout(releaseQueuedChunk, paceDelayMs));
|
|
23
|
+
}, [ paceDelayMs, releaseQueuedChunk, usesPacing ]), drainQueuedValue = useCallback(() => {
|
|
24
|
+
bufferRef.current && 0 !== queuedValueRef.current.length && (clearPaceTimer(), bufferRef.current.append(queuedValueRef.current),
|
|
25
|
+
queuedValueRef.current = "", setPendingCharacters(getTotalPendingCharacters()));
|
|
26
|
+
}, [ clearPaceTimer, getTotalPendingCharacters ]);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const _a = null != options ? options : {}, {paceDelayMs: _paceDelayMs, paceChunkSize: _paceChunkSize} = _a, bufferOptions = __rest(_a, [ "paceDelayMs", "paceChunkSize" ]);
|
|
29
|
+
return bufferRef.current = new MdBuffer(Object.assign(Object.assign({}, bufferOptions), {
|
|
30
|
+
onFlush: snapshot => {
|
|
31
|
+
const {healthy: healthy, raw: raw, isComplete: isComplete} = snapshot;
|
|
32
|
+
setHealthy(healthy), setRaw(raw), setIsComplete(isComplete), setPendingCharacters(queuedValueRef.current.length + snapshot.pendingCharacters);
|
|
33
|
+
}
|
|
34
|
+
})), () => {
|
|
35
|
+
var _a;
|
|
36
|
+
clearPaceTimer(), queuedValueRef.current = "", null === (_a = bufferRef.current) || void 0 === _a || _a.dispose(),
|
|
37
|
+
bufferRef.current = null;
|
|
38
|
+
};
|
|
39
|
+
}, []);
|
|
40
|
+
const append = useCallback(value => {
|
|
41
|
+
var _a;
|
|
42
|
+
if (value) {
|
|
43
|
+
if (!usesPacing) return null === (_a = bufferRef.current) || void 0 === _a || _a.append(value),
|
|
44
|
+
void setPendingCharacters(getTotalPendingCharacters());
|
|
45
|
+
queuedValueRef.current += value, setPendingCharacters(getTotalPendingCharacters()),
|
|
46
|
+
ensurePaceTimer();
|
|
14
47
|
}
|
|
15
|
-
})
|
|
48
|
+
}, [ ensurePaceTimer, getTotalPendingCharacters, usesPacing ]), flush = useCallback(() => {
|
|
49
|
+
var _a;
|
|
50
|
+
return drainQueuedValue(), null === (_a = bufferRef.current) || void 0 === _a ? void 0 : _a.flush();
|
|
51
|
+
}, [ drainQueuedValue ]), complete = useCallback(() => {
|
|
52
|
+
var _a;
|
|
53
|
+
return drainQueuedValue(), null === (_a = bufferRef.current) || void 0 === _a ? void 0 : _a.complete();
|
|
54
|
+
}, [ drainQueuedValue ]), reset = useCallback(() => {
|
|
16
55
|
var _a;
|
|
17
|
-
null === (_a = bufferRef.current) || void 0 === _a || _a.
|
|
18
|
-
|
|
56
|
+
clearPaceTimer(), queuedValueRef.current = "", null === (_a = bufferRef.current) || void 0 === _a || _a.reset(),
|
|
57
|
+
setHealthy(""), setRaw(""), setIsComplete(!1), setPendingCharacters(0);
|
|
58
|
+
}, [ clearPaceTimer ]);
|
|
19
59
|
return {
|
|
20
60
|
raw: raw,
|
|
21
61
|
healthy: healthy,
|
|
22
62
|
isComplete: isComplete,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _a;
|
|
29
|
-
return null === (_a = bufferRef.current) || void 0 === _a ? void 0 : _a.flush();
|
|
30
|
-
}, []),
|
|
31
|
-
complete: useCallback(() => {
|
|
32
|
-
var _a;
|
|
33
|
-
return null === (_a = bufferRef.current) || void 0 === _a ? void 0 : _a.complete();
|
|
34
|
-
}, []),
|
|
35
|
-
reset: useCallback(() => {
|
|
36
|
-
var _a;
|
|
37
|
-
null === (_a = bufferRef.current) || void 0 === _a || _a.reset(), setHealthy(""),
|
|
38
|
-
setRaw("");
|
|
39
|
-
}, [])
|
|
63
|
+
pendingCharacters: pendingCharacters,
|
|
64
|
+
append: append,
|
|
65
|
+
flush: flush,
|
|
66
|
+
complete: complete,
|
|
67
|
+
reset: reset
|
|
40
68
|
};
|
|
41
69
|
}
|
|
42
70
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useRef, useEffect } from "react";
|
|
3
3
|
|
|
4
|
-
import { d as debug } from "../chunks/misc-
|
|
4
|
+
import { d as debug } from "../chunks/misc-2MIIqzsX.mjs";
|
|
5
5
|
|
|
6
|
-
import "../chunks/tslib.es6-
|
|
6
|
+
import "../chunks/tslib.es6-C81Qhn1z.mjs";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Hook to log component renders, mounts, and unmounts
|
package/dist/esm/hooks.mjs
CHANGED
|
@@ -14,6 +14,8 @@ export { useLocalStore } from "./hooks/useLocalStore.mjs";
|
|
|
14
14
|
|
|
15
15
|
export { useMDStreamBuffer } from "./hooks/useMdStreamBuffer.mjs";
|
|
16
16
|
|
|
17
|
+
export { useBindWebRTC } from "./hooks/useBindWebRTC.mjs";
|
|
18
|
+
|
|
17
19
|
export { useMicrophone } from "./hooks/useMicrophone.mjs";
|
|
18
20
|
|
|
19
21
|
export { useAudioRecorder } from "./hooks/useAudioRecorder.mjs";
|
|
@@ -40,6 +42,16 @@ import "./theme/motion.mjs";
|
|
|
40
42
|
|
|
41
43
|
import "./theme/type.mjs";
|
|
42
44
|
|
|
43
|
-
import "./chunks/tslib.es6-
|
|
45
|
+
import "./chunks/tslib.es6-C81Qhn1z.mjs";
|
|
46
|
+
|
|
47
|
+
import "./chunks/MdStreamBuffer-CoQWQwRL.mjs";
|
|
48
|
+
|
|
49
|
+
import "./chunks/microphoneStore-COEGtgyX.mjs";
|
|
50
|
+
|
|
51
|
+
import "zustand";
|
|
52
|
+
|
|
53
|
+
import "./chunks/volumeStore-TSYPqbHx.mjs";
|
|
54
|
+
|
|
55
|
+
import "./chunks/webRTCStore-CVCDJzj5.mjs";
|
|
44
56
|
|
|
45
|
-
import "./chunks/
|
|
57
|
+
import "./chunks/WebRTCConnection-DQbNa7Z9.mjs";
|