@apple-pie/slice 0.1.30 → 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 +36 -276
- package/dist/cjs/chunks/{AudioBubble-DisHuKIC.js → AudioBubble-Dh2IlYW0.js} +3 -5
- package/dist/cjs/chunks/Avatar-WcBAu25_.js +82 -0
- package/dist/cjs/chunks/{AvatarGroup-DhGp_qLw.js → AvatarGroup-eUkVdeTf.js} +1 -3
- package/dist/cjs/chunks/Badge-4tBynWZe.js +22 -0
- package/dist/cjs/chunks/{Button-PsJx1WmV.js → Button-QJ5lsSAz.js} +1 -3
- package/dist/cjs/chunks/{ButtonBar-8zm6a_h7.js → ButtonBar-DcpvT1vD.js} +1 -3
- package/dist/cjs/chunks/{Camera-zFyIXcge.js → Camera-iDyPLq9h.js} +3 -5
- package/dist/cjs/chunks/CheckBox-CmZJd8u2.js +51 -0
- package/dist/cjs/chunks/Chip-Bd1bSYeC.js +77 -0
- package/dist/cjs/chunks/{DivInput-2cMdJQ9U.js → DivInput-BY9pQ6ty.js} +1 -3
- package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-BeWDLajy.js} +1 -3
- package/dist/cjs/chunks/{DrggablePanel-P7TgBI3j.js → DrggablePanel-DzY5wTco.js} +3 -5
- package/dist/cjs/chunks/DropDown-Cn_nX8u7.js +104 -0
- package/dist/cjs/chunks/ErrorSummary-D-0uVwyV.js +85 -0
- package/dist/cjs/chunks/{FileIcon-PuDoz0mF.js → FileIcon-JfY2AYqG.js} +2 -2
- package/dist/cjs/chunks/FileList-Dc1nfpR2.js +222 -0
- package/dist/cjs/chunks/{FlexDiv-D4aSJC_G.js → FlexDiv-B5Pi0-aJ.js} +2 -3
- package/dist/cjs/chunks/Grouper-DKZkTlow.js +61 -0
- package/dist/cjs/chunks/{Icon-BtcHXeqE.js → Icon-BVYVJp9J.js} +4 -7
- package/dist/cjs/chunks/IconButton-CP1Wsvsx.js +82 -0
- package/dist/cjs/chunks/{IndexedDB-BaVmQgkK.js → IndexedDB-CeiVT55Z.js} +1 -1
- package/dist/cjs/chunks/Label-DIs1rOey.js +102 -0
- package/dist/cjs/chunks/Level-3yxetsco.js +58 -0
- package/dist/cjs/chunks/{MdStreamBuffer-CvLO7CVi.js → MdStreamBuffer-BudWFoNw.js} +38 -16
- package/dist/cjs/chunks/Modal-CjpQdoOe.js +127 -0
- package/dist/cjs/chunks/{ModalController-13xmvKnm.js → ModalController-Cp2PXOOS.js} +1 -3
- package/dist/cjs/chunks/{Overlay-GXu6nMnw.js → Overlay-DRpHYZek.js} +1 -3
- package/dist/cjs/chunks/Pager-ChnTKwml.js +36 -0
- package/dist/cjs/chunks/{ProgressIndicator-D06PqCQk.js → ProgressIndicator-CFiAU-aF.js} +2 -6
- package/dist/cjs/chunks/{PromptInput-DuE4vGxR.js → PromptInput-BFWR0TaP.js} +2 -4
- package/dist/cjs/chunks/RadioButton-Bi-FP41j.js +55 -0
- package/dist/cjs/chunks/{RadioButtonList-N7Fmvr5W.js → RadioButtonList-JHPKMCoX.js} +1 -2
- package/dist/cjs/chunks/{Slider-BSy8xciG.js → Slider-D97ws1Cl.js} +1 -3
- package/dist/cjs/chunks/{Spacer-CyZAUR5N.js → Spacer-DvI2M1wZ.js} +1 -1
- package/dist/cjs/chunks/{Switch-Crm-nHYI.js → Switch-DDSSprb7.js} +1 -2
- package/dist/cjs/chunks/{TabBar-BtFfMwiB.js → TabBar-TllSeSzb.js} +2 -4
- package/dist/cjs/chunks/TextArea-DjZRDixt.js +74 -0
- package/dist/cjs/chunks/{TextField-Bh2EA082.js → TextField-CKA3K0AN.js} +3 -5
- package/dist/cjs/chunks/Tip-BdGXN-TQ.js +88 -0
- package/dist/cjs/chunks/Toast-COrDS_50.js +177 -0
- package/dist/cjs/chunks/ToggleButton-hoOMzBZc.js +39 -0
- package/dist/cjs/chunks/UploadArea-ClG8ZgRZ.js +127 -0
- package/dist/cjs/chunks/{WSConnection-DrOC8Z0R.js → WSConnection-Brxc2hEv.js} +1 -1
- package/dist/cjs/chunks/WebRTCConnection-eWP4lueC.js +252 -0
- package/dist/cjs/chunks/{localDBStore-zyDhaEiP.js → localDBStore-SS_r0C6F.js} +1 -1
- package/dist/cjs/chunks/{microphoneStore-D1fV_8QQ.js → microphoneStore-DM_8bhFr.js} +27 -4
- package/dist/cjs/chunks/{misc-QpU0XEOW.js → misc-4xyXRU2K.js} +1 -1
- package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Ag-UnuQq.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-Az040BSN.js → uploads-worker-CI-SZptI.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-8mOTz0Qe.js → uploadsStore-DR2hc4ct.js} +2 -2
- package/dist/cjs/chunks/{volumeStore-Pv23v12t.js → volumeStore-DtTHf-9_.js} +5 -4
- package/dist/cjs/chunks/webRTCStore-DWWn7k-0.js +55 -0
- package/dist/cjs/chunks/{windowStore-CCxCOUqa.js → windowStore-BUo9Du_e.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +7 -7
- package/dist/cjs/components/Avatar/index.js +3 -4
- package/dist/cjs/components/AvatarGroup/index.js +4 -4
- package/dist/cjs/components/Badge/index.js +3 -3
- package/dist/cjs/components/Button/index.js +7 -8
- package/dist/cjs/components/ButtonBar/index.js +7 -7
- package/dist/cjs/components/Camera/index.js +8 -8
- package/dist/cjs/components/CheckBox/index.js +7 -7
- package/dist/cjs/components/Chip/index.js +7 -8
- package/dist/cjs/components/DivInput/index.js +3 -4
- package/dist/cjs/components/Dot/index.js +3 -3
- package/dist/cjs/components/DraggablePanel/index.js +6 -6
- package/dist/cjs/components/DropDown/index.js +7 -7
- package/dist/cjs/components/ErrorSummary/index.js +6 -7
- package/dist/cjs/components/FileIcon/index.js +6 -7
- package/dist/cjs/components/FileList/index.js +7 -7
- package/dist/cjs/components/FlexDiv/index.js +3 -4
- package/dist/cjs/components/Grouper/index.js +7 -8
- package/dist/cjs/components/Icon/index.js +6 -7
- package/dist/cjs/components/IconButton/index.js +6 -7
- package/dist/cjs/components/Label/index.js +3 -4
- package/dist/cjs/components/Level/index.js +7 -0
- package/dist/cjs/components/Modal/index.js +7 -8
- package/dist/cjs/components/ModalController/index.js +4 -4
- package/dist/cjs/components/Overlay/index.js +3 -3
- package/dist/cjs/components/Pager/index.js +3 -4
- package/dist/cjs/components/Progress/index.js +5 -6
- package/dist/cjs/components/PromptInput/index.js +9 -10
- package/dist/cjs/components/RadioButton/index.js +7 -7
- package/dist/cjs/components/RadioButtonList/index.js +8 -8
- package/dist/cjs/components/Slider/index.js +4 -5
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +3 -3
- package/dist/cjs/components/TabBar/index.js +9 -9
- package/dist/cjs/components/TextArea/index.js +8 -8
- package/dist/cjs/components/Textfield/index.js +9 -9
- package/dist/cjs/components/Tip/index.js +3 -4
- package/dist/cjs/components/Toast/index.js +7 -8
- package/dist/cjs/components/ToggleButton/index.js +8 -8
- package/dist/cjs/components/UploadArea/index.js +7 -7
- 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/useObserveTheme.js +3 -3
- package/dist/cjs/hooks/useTheme.js +2 -3
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +9 -6
- package/dist/cjs/index.js +19 -17
- package/dist/cjs/providers/ThemeProvider.js +6 -17
- package/dist/cjs/providers/themeServer.js +15 -9
- package/dist/cjs/providers.js +4 -5
- 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/theme/type.js +1 -1
- 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-D052QyPH.mjs → AudioBubble-cYlxxQ7c.mjs} +3 -7
- package/dist/esm/chunks/Avatar-D84wF2os.mjs +88 -0
- package/dist/esm/chunks/{AvatarGroup-C7YRtPmJ.mjs → AvatarGroup-DiwfbRxH.mjs} +2 -6
- package/dist/esm/chunks/Badge-DuUb5-80.mjs +26 -0
- package/dist/esm/chunks/{Button-BQS3rwrS.mjs → Button-BIgwWrPJ.mjs} +6 -10
- package/dist/esm/chunks/{ButtonBar-GLNRjmjv.mjs → ButtonBar-vNvnvw7u.mjs} +3 -7
- package/dist/esm/chunks/{Camera-CAp0Y2gN.mjs → Camera-BMwkTJPq.mjs} +5 -9
- package/dist/esm/chunks/CheckBox-Cpoxy8w_.mjs +61 -0
- package/dist/esm/chunks/Chip-BayNVv7N.mjs +87 -0
- package/dist/esm/chunks/{DivInput-g6F1YWTo.mjs → DivInput-CWRUxy1y.mjs} +2 -6
- package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-v_kcIWV2.mjs} +1 -5
- package/dist/esm/chunks/{DrggablePanel-C0AmJy8g.mjs → DrggablePanel-yEeGeE1w.mjs} +2 -6
- package/dist/esm/chunks/DropDown-QQhwAg_J.mjs +112 -0
- package/dist/esm/chunks/ErrorSummary-DzIZMIll.mjs +90 -0
- package/dist/esm/chunks/{FileIcon-BQ2zZIW5.mjs → FileIcon-6UlkbKzk.mjs} +2 -2
- package/dist/esm/chunks/FileList-vMiGJByw.mjs +230 -0
- package/dist/esm/chunks/{FlexDiv-DnY1_qk4.mjs → FlexDiv-B1m7aY04.mjs} +3 -6
- package/dist/esm/chunks/Grouper-BDrAnfDF.mjs +73 -0
- package/dist/esm/chunks/{Icon--RjjODc9.mjs → Icon-D4A6_c4x.mjs} +3 -8
- package/dist/esm/chunks/IconButton-B_W-aOsB.mjs +96 -0
- package/dist/esm/chunks/{IndexedDB-Dk7a4fPS.mjs → IndexedDB-CTqfKmp1.mjs} +1 -1
- package/dist/esm/chunks/Label-I75yz3gq.mjs +113 -0
- package/dist/esm/chunks/Level-DgczkKBr.mjs +63 -0
- package/dist/esm/chunks/{MdStreamBuffer-By7pHJQL.mjs → MdStreamBuffer-CoQWQwRL.mjs} +38 -16
- package/dist/esm/chunks/Modal-CwwyijaO.mjs +139 -0
- package/dist/esm/chunks/{ModalController-BO5FkAqu.mjs → ModalController-IyB9lDRa.mjs} +2 -6
- package/dist/esm/chunks/{Overlay-sXM7cEYc.mjs → Overlay-C-yori3-.mjs} +1 -5
- package/dist/esm/chunks/Pager-BEtfyKtq.mjs +42 -0
- package/dist/esm/chunks/{ProgressIndicator-B5oByN3i.mjs → ProgressIndicator-BV0ginXb.mjs} +2 -8
- package/dist/esm/chunks/{PromptInput-Cwd53ux7.mjs → PromptInput-Cn5fRYap.mjs} +3 -7
- package/dist/esm/chunks/RadioButton-DWlg6ldv.mjs +63 -0
- package/dist/esm/chunks/{RadioButtonList-C_heuiis.mjs → RadioButtonList-D9FdlhPL.mjs} +3 -6
- package/dist/esm/chunks/{Slider-XEV0D2Rd.mjs → Slider-B2WZkZSg.mjs} +3 -7
- package/dist/esm/chunks/{Spacer-C5651N0N.mjs → Spacer-7Oj0SlD0.mjs} +1 -1
- package/dist/esm/chunks/{Switch-RfA431T4.mjs → Switch-DRhnznnO.mjs} +1 -4
- package/dist/esm/chunks/{TabBar-kPZ6ZJxr.mjs → TabBar-D6VR71ye.mjs} +5 -9
- package/dist/esm/chunks/TextArea-CkB5rJjI.mjs +80 -0
- package/dist/esm/chunks/{TextField-DwVKlLI_.mjs → TextField-BIXmkjEz.mjs} +5 -9
- package/dist/esm/chunks/Tip-CTdrwLky.mjs +96 -0
- package/dist/esm/chunks/Toast-8bUziIgh.mjs +189 -0
- package/dist/esm/chunks/ToggleButton-BOFITa8_.mjs +47 -0
- package/dist/esm/chunks/UploadArea-DE2ccDVx.mjs +135 -0
- package/dist/esm/chunks/{WSConnection-DV7k84B4.mjs → WSConnection-CHudrD62.mjs} +1 -1
- package/dist/esm/chunks/WebRTCConnection-DQbNa7Z9.mjs +252 -0
- package/dist/esm/chunks/{localDBStore-Dnpo5nSv.mjs → localDBStore-CaYiqITY.mjs} +2 -2
- package/dist/esm/chunks/{microphoneStore-Dr3lxoWX.mjs → microphoneStore-COEGtgyX.mjs} +26 -3
- package/dist/esm/chunks/{misc-wS74txaa.mjs → misc-2MIIqzsX.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-nW9CMec_.mjs} +2 -2
- package/dist/esm/chunks/{tslib.es6-C-olHjXV.mjs → tslib.es6-C81Qhn1z.mjs} +1 -1
- package/dist/esm/chunks/{uploads-worker-CYp-F4dz.mjs → uploads-worker-CMomtRvm.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-DeRMJ5c9.mjs → uploadsStore-CsfpSOTS.mjs} +1 -1
- package/dist/esm/chunks/{volumeStore-BX7QcrL-.mjs → volumeStore-TSYPqbHx.mjs} +5 -4
- package/dist/esm/chunks/webRTCStore-CVCDJzj5.mjs +57 -0
- package/dist/esm/chunks/{windowStore-CAzx2-QV.mjs → windowStore-BvejIR82.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +4 -6
- package/dist/esm/components/Avatar/index.mjs +3 -5
- package/dist/esm/components/AvatarGroup/index.mjs +4 -6
- package/dist/esm/components/Badge/index.mjs +2 -4
- package/dist/esm/components/Button/index.mjs +8 -10
- package/dist/esm/components/ButtonBar/index.mjs +4 -6
- package/dist/esm/components/Camera/index.mjs +6 -8
- package/dist/esm/components/CheckBox/index.mjs +4 -6
- package/dist/esm/components/Chip/index.mjs +5 -7
- package/dist/esm/components/DivInput/index.mjs +3 -5
- package/dist/esm/components/Dot/index.mjs +2 -4
- package/dist/esm/components/DraggablePanel/index.mjs +3 -5
- package/dist/esm/components/DropDown/index.mjs +4 -6
- package/dist/esm/components/ErrorSummary/index.mjs +3 -5
- package/dist/esm/components/FileIcon/index.mjs +3 -5
- package/dist/esm/components/FileList/index.mjs +6 -8
- package/dist/esm/components/FlexDiv/index.mjs +2 -4
- package/dist/esm/components/Grouper/index.mjs +5 -7
- package/dist/esm/components/Icon/index.mjs +4 -6
- package/dist/esm/components/IconButton/index.mjs +7 -9
- package/dist/esm/components/Label/index.mjs +3 -5
- package/dist/esm/components/Level/index.mjs +11 -0
- package/dist/esm/components/Modal/index.mjs +10 -12
- package/dist/esm/components/ModalController/index.mjs +4 -6
- package/dist/esm/components/Overlay/index.mjs +2 -4
- package/dist/esm/components/Pager/index.mjs +3 -5
- package/dist/esm/components/Progress/index.mjs +4 -6
- package/dist/esm/components/PromptInput/index.mjs +11 -13
- package/dist/esm/components/RadioButton/index.mjs +4 -6
- package/dist/esm/components/RadioButtonList/index.mjs +5 -7
- package/dist/esm/components/Slider/index.mjs +4 -6
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -4
- package/dist/esm/components/TabBar/index.mjs +8 -10
- package/dist/esm/components/TextArea/index.mjs +9 -11
- package/dist/esm/components/Textfield/index.mjs +10 -12
- package/dist/esm/components/Tip/index.mjs +3 -5
- package/dist/esm/components/Toast/index.mjs +5 -7
- package/dist/esm/components/ToggleButton/index.mjs +9 -11
- package/dist/esm/components/UploadArea/index.mjs +9 -11
- 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/useObserveTheme.mjs +0 -2
- package/dist/esm/hooks/useTheme.mjs +0 -2
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +14 -4
- package/dist/esm/index.mjs +62 -52
- package/dist/esm/providers/ThemeProvider.mjs +6 -19
- package/dist/esm/providers/themeServer.mjs +11 -6
- package/dist/esm/providers.mjs +0 -2
- 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/theme/type.mjs +1 -1
- 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 +8476 -0
- 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 +4 -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 +4 -1
- package/dist/types/providers/ThemeProvider.d.ts +1 -6
- 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 +8 -3
- package/dist/cjs/chunks/Avatar-CqUSRzVd.js +0 -84
- package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
- package/dist/cjs/chunks/CheckBox-Cbh6UK-7.js +0 -53
- package/dist/cjs/chunks/Chip-DcS8dtW2.js +0 -79
- package/dist/cjs/chunks/DropDown-B0970yVe.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
- package/dist/cjs/chunks/FileList-sDq1jK0b.js +0 -225
- package/dist/cjs/chunks/Grouper-Ccd-x_Nb.js +0 -63
- package/dist/cjs/chunks/IconButton-CF4cR7Tr.js +0 -84
- package/dist/cjs/chunks/Label-htjXHiQ4.js +0 -103
- package/dist/cjs/chunks/Modal-C0Z59meI.js +0 -101
- package/dist/cjs/chunks/Pager-D2_fshTy.js +0 -38
- package/dist/cjs/chunks/RadioButton-DPB2ZGVf.js +0 -56
- package/dist/cjs/chunks/TextArea-CRiPRF8v.js +0 -76
- package/dist/cjs/chunks/Tip-C5keUoHx.js +0 -90
- package/dist/cjs/chunks/Toast-CyiFOsI3.js +0 -178
- package/dist/cjs/chunks/ToggleButton-D5_WnW0o.js +0 -40
- package/dist/cjs/chunks/UploadArea-KqES_OLl.js +0 -129
- package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
- package/dist/esm/chunks/Avatar-29zhNfxX.mjs +0 -92
- package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
- package/dist/esm/chunks/CheckBox-7TiT2U47.mjs +0 -65
- package/dist/esm/chunks/Chip-CKsojimU.mjs +0 -91
- package/dist/esm/chunks/DropDown-mwo8fY7p.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
- package/dist/esm/chunks/FileList-fh-x9Dzm.mjs +0 -235
- package/dist/esm/chunks/Grouper-naJMvpB9.mjs +0 -77
- package/dist/esm/chunks/IconButton-ByBYppAj.mjs +0 -100
- package/dist/esm/chunks/Label-C04tD7UZ.mjs +0 -116
- package/dist/esm/chunks/Modal-B9ad9OfJ.mjs +0 -115
- package/dist/esm/chunks/Pager-Bz0FpgO5.mjs +0 -46
- package/dist/esm/chunks/RadioButton-CLeRiZ8x.mjs +0 -66
- package/dist/esm/chunks/TextArea-CxscPLwN.mjs +0 -84
- package/dist/esm/chunks/Tip-C6EcX7_M.mjs +0 -100
- package/dist/esm/chunks/Toast-D4uMNvaa.mjs +0 -192
- package/dist/esm/chunks/ToggleButton-C0QIflzX.mjs +0 -51
- package/dist/esm/chunks/UploadArea-je-1NhGb.mjs +0 -139
- package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
- /package/dist/cjs/chunks/{SSEConnection-C-1OzEOp.js → SSEConnection-DfjLAlOG.js} +0 -0
- /package/dist/cjs/chunks/{_types-Bdqd2vHh.js → _types-DMyBIF8s.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-EIfIjWH7.js → audioVisualizer-BxPvUj4h.js} +0 -0
- /package/dist/cjs/chunks/{colors-njquvHkx.js → colors-4n0sNFRA.js} +0 -0
- /package/dist/cjs/chunks/{debounce-BF4i6uIC.js → debounce-_IK-La-Z.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-7VjHHM8X.js → modalStore-CFsfK3ba.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-gCECyn2N.js → sharedTypes-C0ZHzH_T.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-Ck4NLvml.js → tipStore-dqD9-c30.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-CSStgB9d.js → toastStore-BN1N7WXv.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-C8dZW5nY.js → tslib.es6-DsF7Wv4Y.js} +0 -0
- /package/dist/esm/chunks/{SSEConnection-DcA3wFsO.mjs → SSEConnection-iFKOV9Uo.mjs} +0 -0
- /package/dist/esm/chunks/{_types-BVrr_Khp.mjs → _types-DrNviSG6.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-ZgT77nUw.mjs → audioVisualizer-BsmpLZyK.mjs} +0 -0
- /package/dist/esm/chunks/{colors-FQ0uNQcW.mjs → colors-BAATtfbL.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-Bst1jxMS.mjs → debounce-CYBH5qXQ.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-BpWnLtOF.mjs → modalStore-DmaeMv7z.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-tn9-uJvb.mjs → sharedTypes-CyrInj1b.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-CL5a95Bl.mjs → tipStore-B_MUZfr2.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-D2PEIqCo.mjs → toastStore-DAprlBVj.mjs} +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
7
|
+
|
|
8
|
+
import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
|
|
9
|
+
|
|
10
|
+
import { useTheme } from "../hooks/useTheme.mjs";
|
|
11
|
+
|
|
12
|
+
import "../theme/colors.mjs";
|
|
13
|
+
|
|
14
|
+
import { s as setStyle, f as filterClasses, a as accessibleKeyDown } from "./misc-2MIIqzsX.mjs";
|
|
15
|
+
|
|
16
|
+
import "../hooks/useWindow.mjs";
|
|
17
|
+
|
|
18
|
+
import { I as Icon } from "./Icon-D4A6_c4x.mjs";
|
|
19
|
+
|
|
20
|
+
import { P as ProgressIndicator } from "./ProgressIndicator-BV0ginXb.mjs";
|
|
21
|
+
|
|
22
|
+
var ToastType, css = {
|
|
23
|
+
wrapper: "Toast-module_wrapper__1uj9O flexBox-module_rowBetween__5FEvi",
|
|
24
|
+
close: "Toast-module_close__i10-s flexBox-module_row__z24tF",
|
|
25
|
+
message: "Toast-module_message__3dP0P flexBox-module_rowStart__4tcxS",
|
|
26
|
+
progress: "Toast-module_progress__SWsbA flexBox-module_row__z24tF",
|
|
27
|
+
s: "Toast-module_s__kc5Ef type-module_body-s-regular__vRHSP",
|
|
28
|
+
m: "Toast-module_m__JtmLz type-module_body-m-regular__LuQBA",
|
|
29
|
+
l: "Toast-module_l__-W0PD type-module_body-l-regular__lOYbg"
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
!function(ToastType) {
|
|
33
|
+
ToastType.Success = "success", ToastType.Error = "error", ToastType.Warning = "warning",
|
|
34
|
+
ToastType.Info = "info";
|
|
35
|
+
}(ToastType || (ToastType = {}));
|
|
36
|
+
|
|
37
|
+
const ToastBase = React.forwardRef((props, ref) => {
|
|
38
|
+
const {notifId: notifId, message: message = null, size: size = "m", border: border = !0, padding: padding, radius: radius = 8, container: container = "window", showDelay: showDelay = 0, duration: duration = 5e3, position: position = "bottom", offset: offset = 24, close: close = !0, progress: progress, type: type = ToastType.Info, didHide: didHide = () => null} = props, divAttributes = __rest(props, [ "notifId", "message", "size", "border", "padding", "radius", "container", "showDelay", "duration", "position", "offset", "close", "progress", "type", "didHide" ]), theme = useTheme(), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? `${className}` : "", [ready, setReady] = useState(!1), [content, setContent] = useState(null), timer = useRef(null);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
timer.current && clearTimeout(timer.current);
|
|
41
|
+
return message && message.length > 0 ? timer.current = setTimeout(() => {
|
|
42
|
+
setContent(message), timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
|
|
43
|
+
setReady(!1);
|
|
44
|
+
}, duration));
|
|
45
|
+
}, showDelay) : setContent(null), () => {
|
|
46
|
+
timer.current && clearTimeout(timer.current);
|
|
47
|
+
};
|
|
48
|
+
}, [ message, showDelay, duration ]), useEffect(() => setReady(null !== content), [ content ]);
|
|
49
|
+
const defaultPadding = useMemo(() => close ? "10px 12px 10px 16px" : "10px 16px", [ close ]), colorScheme = useMemo(() => {
|
|
50
|
+
switch (type) {
|
|
51
|
+
case "success":
|
|
52
|
+
return {
|
|
53
|
+
border: "var(--array-land-label)",
|
|
54
|
+
bg: "var(--array-land)",
|
|
55
|
+
text: "var(--array-land-label)"
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
case "warning":
|
|
59
|
+
return {
|
|
60
|
+
border: "var(--array-orange-label)",
|
|
61
|
+
bg: "var(--array-orange)",
|
|
62
|
+
text: "var(--array-orange-label)"
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
case "error":
|
|
66
|
+
return {
|
|
67
|
+
border: "var(--feedback-warning)",
|
|
68
|
+
bg: "var(--array-magenta)",
|
|
69
|
+
text: "var(--feedback-warning)"
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
default:
|
|
73
|
+
return {
|
|
74
|
+
border: "var(--core-outline-primary)",
|
|
75
|
+
bg: "var(--core-surface-secondary)",
|
|
76
|
+
text: "var(--core-text-primary)"
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}, [ type ]), cssVars = useMemo(() => ({
|
|
80
|
+
"--toast-padding": setStyle(padding, defaultPadding),
|
|
81
|
+
"--toast-background": colorScheme.bg,
|
|
82
|
+
"--toast-color": colorScheme.text,
|
|
83
|
+
"--toast-border": border ? `1px solid ${colorScheme.border}` : "unset",
|
|
84
|
+
"--toast-border-radius": setStyle(radius, 4),
|
|
85
|
+
"--toast-position": "window" === container ? "fixed" : "absolute"
|
|
86
|
+
}), [ padding, border, colorScheme, radius, defaultPadding, container ]), variants = useMemo(() => {
|
|
87
|
+
const positionShow = "bottom" === position ? {
|
|
88
|
+
bottom: offset
|
|
89
|
+
} : {
|
|
90
|
+
top: offset
|
|
91
|
+
}, positionHide = "bottom" === position ? {
|
|
92
|
+
bottom: -offset
|
|
93
|
+
} : {
|
|
94
|
+
top: -offset
|
|
95
|
+
}, transition = {
|
|
96
|
+
ease: "easeInOut",
|
|
97
|
+
duration: .25
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
initial: Object.assign({
|
|
101
|
+
opacity: 0
|
|
102
|
+
}, positionHide),
|
|
103
|
+
animate: Object.assign(Object.assign({
|
|
104
|
+
opacity: 1
|
|
105
|
+
}, positionShow), {
|
|
106
|
+
transition: transition
|
|
107
|
+
}),
|
|
108
|
+
exit: Object.assign(Object.assign({
|
|
109
|
+
opacity: 0
|
|
110
|
+
}, positionHide), {
|
|
111
|
+
transition: transition
|
|
112
|
+
})
|
|
113
|
+
};
|
|
114
|
+
}, [ position, offset ]), classNames = useMemo(() => filterClasses([ css.wrapper, css[size], divClass ]), [ size, divClass ]), handleClose = useCallback(() => {
|
|
115
|
+
setReady(!1);
|
|
116
|
+
}, []), handleMouseOver = useCallback(() => {
|
|
117
|
+
timer.current && clearTimeout(timer.current);
|
|
118
|
+
}, []), handleMouseOut = useCallback(() => {
|
|
119
|
+
timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
|
|
120
|
+
setContent(null);
|
|
121
|
+
}, duration));
|
|
122
|
+
}, [ duration ]), showProgress = useMemo(() => void 0 !== progress ? progress : "Infinite" === duration, [ progress, duration ]), iconColor = useMemo(() => {
|
|
123
|
+
switch (type) {
|
|
124
|
+
case ToastType.Error:
|
|
125
|
+
return theme.current.colors["feedback-warning"];
|
|
126
|
+
|
|
127
|
+
case ToastType.Success:
|
|
128
|
+
return theme.current.colors["array-land-label"];
|
|
129
|
+
|
|
130
|
+
case ToastType.Warning:
|
|
131
|
+
return theme.current.colors["array-orange-label"];
|
|
132
|
+
|
|
133
|
+
default:
|
|
134
|
+
return theme.current.colors["core-text-primary"];
|
|
135
|
+
}
|
|
136
|
+
}, [ type, theme ]);
|
|
137
|
+
return jsx(AnimatePresence, {
|
|
138
|
+
onExitComplete: () => didHide(),
|
|
139
|
+
initial: !1,
|
|
140
|
+
children: ready && jsxs(motion.div, Object.assign({
|
|
141
|
+
ref: ref,
|
|
142
|
+
id: divId,
|
|
143
|
+
className: classNames
|
|
144
|
+
}, rest, {
|
|
145
|
+
onMouseEnter: handleMouseOver,
|
|
146
|
+
onMouseLeave: handleMouseOut,
|
|
147
|
+
onFocus: handleMouseOver,
|
|
148
|
+
onBlur: handleMouseOut,
|
|
149
|
+
style: Object.assign(Object.assign(Object.assign({}, divStyle), cssVars), {
|
|
150
|
+
visibility: ready ? "visible" : "hidden"
|
|
151
|
+
}),
|
|
152
|
+
variants: variants,
|
|
153
|
+
initial: "initial",
|
|
154
|
+
animate: "animate",
|
|
155
|
+
exit: "exit",
|
|
156
|
+
children: [ jsxs("div", {
|
|
157
|
+
role: "status",
|
|
158
|
+
"aria-live": "polite",
|
|
159
|
+
className: css.message,
|
|
160
|
+
children: [ showProgress && jsx("div", {
|
|
161
|
+
className: css.progress,
|
|
162
|
+
children: jsx(ProgressIndicator, {
|
|
163
|
+
show: !0,
|
|
164
|
+
inline: !0,
|
|
165
|
+
color: iconColor
|
|
166
|
+
})
|
|
167
|
+
}), content ]
|
|
168
|
+
}), ("Infinite" === duration || close) && jsx("div", {
|
|
169
|
+
className: css.close,
|
|
170
|
+
tabIndex: 0,
|
|
171
|
+
role: "button",
|
|
172
|
+
"aria-label": "dismiss message",
|
|
173
|
+
onKeyDown: e => accessibleKeyDown(e, handleClose),
|
|
174
|
+
onClick: handleClose,
|
|
175
|
+
children: jsx(Icon, {
|
|
176
|
+
name: "x",
|
|
177
|
+
size: 20,
|
|
178
|
+
strokeColor: iconColor
|
|
179
|
+
})
|
|
180
|
+
}) ]
|
|
181
|
+
}), notifId)
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
ToastBase.displayName = "Toast";
|
|
186
|
+
|
|
187
|
+
const Toast = React.memo(ToastBase);
|
|
188
|
+
|
|
189
|
+
export { Toast as T, ToastType as a };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
|
|
5
|
+
import { I as IconButton } from "./IconButton-B_W-aOsB.mjs";
|
|
6
|
+
|
|
7
|
+
import { L as Label } from "./Label-I75yz3gq.mjs";
|
|
8
|
+
|
|
9
|
+
var css_toggleButton = "ToggleButton-module_toggleButton__H7KgI flexBox-module_rowStart__4tcxS";
|
|
10
|
+
|
|
11
|
+
function ToggleButton(props) {
|
|
12
|
+
const {label: label, textSize: textSize, icon: icon, selected: selected = !1, iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-surface-primary)", bgColor: bgColor = "var(--core-surface-secondary)", bgColorOn: bgColorOn = "var(--core-text-special)", iconSize: iconSize = 20, buttonSize: buttonSize = "m", tooltip: tooltip, gap: gap = 4, unselect: unselect = !0, fill: fill = !1, disabled: disabled = !1, onChange: onChange, onSelect: onSelect, onToolTip: onToolTip, children: children} = props, handleClick = () => {
|
|
13
|
+
if (!unselect && selected) return;
|
|
14
|
+
const newState = !selected;
|
|
15
|
+
null == onChange || onChange(newState), newState && (null == onSelect || onSelect());
|
|
16
|
+
}, cssVars = useMemo(() => ({
|
|
17
|
+
"--tb-gap": `${gap}px`
|
|
18
|
+
}), [ gap ]);
|
|
19
|
+
return jsxs("div", {
|
|
20
|
+
className: css_toggleButton,
|
|
21
|
+
style: cssVars,
|
|
22
|
+
children: [ icon && jsx(IconButton, {
|
|
23
|
+
icon: icon,
|
|
24
|
+
buttonSize: buttonSize,
|
|
25
|
+
tooltip: tooltip,
|
|
26
|
+
toggle: !selected,
|
|
27
|
+
isToggled: selected,
|
|
28
|
+
bgColorOn: bgColorOn,
|
|
29
|
+
bgColor: bgColor,
|
|
30
|
+
iconColor: iconColor,
|
|
31
|
+
iconColorOn: iconColorOn,
|
|
32
|
+
onClick: handleClick,
|
|
33
|
+
iconSize: iconSize,
|
|
34
|
+
iconFill: fill,
|
|
35
|
+
disabled: disabled,
|
|
36
|
+
onToolTip: onToolTip
|
|
37
|
+
}), (children || label) && jsx(Label, {
|
|
38
|
+
textSize: textSize,
|
|
39
|
+
borderSize: 0,
|
|
40
|
+
padding: 0,
|
|
41
|
+
onClick: handleClick,
|
|
42
|
+
children: null != children ? children : label
|
|
43
|
+
}) ]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { ToggleButton as T };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
import React, { useState, useRef, useId, useCallback, useMemo } from "react";
|
|
5
|
+
|
|
6
|
+
import { s as setStyle, a as accessibleKeyDown } from "./misc-2MIIqzsX.mjs";
|
|
7
|
+
|
|
8
|
+
import { I as Icon } from "./Icon-D4A6_c4x.mjs";
|
|
9
|
+
|
|
10
|
+
import { P as ProgressIndicator } from "./ProgressIndicator-BV0ginXb.mjs";
|
|
11
|
+
|
|
12
|
+
import { F as FileList } from "./FileList-vMiGJByw.mjs";
|
|
13
|
+
|
|
14
|
+
var css = {
|
|
15
|
+
wrapper: "UploadArea-module_wrapper__aircC flexBox-module_column__ezvMq",
|
|
16
|
+
icon: "UploadArea-module_icon__M7n-m flexBox-module_row__z24tF",
|
|
17
|
+
title: "UploadArea-module_title__VbNGq type-module_body-l-bold__Fh2dt",
|
|
18
|
+
message: "UploadArea-module_message__U1ZVM flexBox-module_row__z24tF",
|
|
19
|
+
files: "UploadArea-module_files__Q796x flexBox-module_column__ezvMq",
|
|
20
|
+
xs: "UploadArea-module_xs__-AoM7 type-module_body-xs-regular__ZAFft",
|
|
21
|
+
s: "UploadArea-module_s__wy1zN type-module_body-s-regular__vRHSP",
|
|
22
|
+
m: "UploadArea-module_m__bKuFN type-module_body-m-regular__LuQBA",
|
|
23
|
+
l: "UploadArea-module_l__KG9YN type-module_body-l-regular__lOYbg"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const imageTypes = [ "png", "jpg", "jpeg", "gif", "svg", "heic", "heif" ], videoTypes = [ "mp4", "avi", "mov", "wmv", "flv" ], documentTypes = [ "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx" ], audioTypes = [ "mp3", "wav", "ogg", "aac", "flac" ], textTypes = [ "txt", "rtf", "md", "csv", "json", "xml" ], allTypes = [ ...imageTypes, ...videoTypes, ...documentTypes, ...audioTypes, ...textTypes ];
|
|
27
|
+
|
|
28
|
+
var FileTypes;
|
|
29
|
+
|
|
30
|
+
!function(FileTypes) {
|
|
31
|
+
FileTypes.images = "images", FileTypes.videos = "videos", FileTypes.documents = "documents",
|
|
32
|
+
FileTypes.audio = "audio", FileTypes.text = "text", FileTypes.all = "all", FileTypes.custom = "custom";
|
|
33
|
+
}(FileTypes || (FileTypes = {}));
|
|
34
|
+
|
|
35
|
+
const UploadAreaBase = React.forwardRef((props, ref) => {
|
|
36
|
+
const {icon: icon = "upload", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", title: title = "Upload Files", width: width = "100%", height: height = "auto", message: message = "Drag and drop files here or click to upload", busyMessage: busyMessage = "Uploading in progress", iconSize: iconSize = 24, textSize: textSize = "m", borderWidth: borderWidth, border: border = 1, borderStyle: borderStyle = "dashed", borderColor: borderColor = "var(--core-outline-primary)", borderColorHover: borderColorHover = "var(--core-outline-special)", borderRadius: borderRadius, radius: radius = 8, padding: padding = 32, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-surface-special)", acceptedTypes: acceptedTypes = allTypes, multiple: multiple = !0, busy: busy = !1, canRemove: canRemove = !0, showProgress: showProgress = !0, files: files = [], onUpload: onUpload} = props, [hovered, setHovered] = useState(!1), inputRef = useRef(null), dragDepth = useRef(0), inputId = useId(), titleId = useId(), messageId = useId(), isInteractive = !busy && files.length < 1, resolvedBorderWidth = null != borderWidth ? borderWidth : border, resolvedBorderRadius = null != borderRadius ? borderRadius : radius, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, handleClickUpload = useCallback(() => {
|
|
37
|
+
var _a;
|
|
38
|
+
isInteractive && (null == inputRef ? void 0 : inputRef.current) && (inputRef.current.value = "",
|
|
39
|
+
null === (_a = inputRef.current) || void 0 === _a || _a.click());
|
|
40
|
+
}, [ isInteractive ]), handleFileInputChange = useCallback(e => {
|
|
41
|
+
busy || e.target.files && (null == onUpload || onUpload(Array.from(e.target.files)));
|
|
42
|
+
}, [ busy, onUpload ]), hasFilesInDrag = useCallback(e => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
return Array.from(null !== (_b = null === (_a = e.dataTransfer) || void 0 === _a ? void 0 : _a.types) && void 0 !== _b ? _b : []).includes("Files");
|
|
45
|
+
}, []), handleDragEnter = useCallback(e => {
|
|
46
|
+
e.preventDefault(), !busy && hasFilesInDrag(e) && (dragDepth.current += 1, 1 === dragDepth.current && setHovered(!0));
|
|
47
|
+
}, [ busy, hasFilesInDrag ]), handleDragLeave = useCallback(e => {
|
|
48
|
+
e.preventDefault(), busy || (dragDepth.current = Math.max(0, dragDepth.current - 1),
|
|
49
|
+
0 === dragDepth.current && setHovered(!1));
|
|
50
|
+
}, [ busy ]), handleDrop = useCallback(e => {
|
|
51
|
+
var _a;
|
|
52
|
+
if (e.preventDefault(), busy) return;
|
|
53
|
+
dragDepth.current = 0, setHovered(!1);
|
|
54
|
+
const files = Array.from(null !== (_a = e.dataTransfer.files) && void 0 !== _a ? _a : []);
|
|
55
|
+
null == onUpload || onUpload(files);
|
|
56
|
+
}, [ busy, onUpload ]), iconStrokeColor = useMemo(() => hovered ? iconColorHover : iconColor, [ hovered, iconColor, iconColorHover ]), cssVars = useMemo(() => ({
|
|
57
|
+
"--ua-border": `${resolvedBorderWidth}px`,
|
|
58
|
+
"--ua-border-style": borderStyle,
|
|
59
|
+
"--ua-border-color": hovered || busy ? borderColorHover : borderColor,
|
|
60
|
+
"--ua-radius": `${resolvedBorderRadius}px`,
|
|
61
|
+
"--ua-padding": setStyle(padding),
|
|
62
|
+
"--ua-bg-color": hovered ? resolvedBackgroundColorHover : resolvedBackgroundColor,
|
|
63
|
+
"--ua-icon-size": `${iconSize}px`,
|
|
64
|
+
"--ua-cursor": busy || files.length > 0 ? "default" : "pointer",
|
|
65
|
+
"--ua-width": setStyle(width),
|
|
66
|
+
"--ua-height": setStyle(height)
|
|
67
|
+
}), [ resolvedBorderWidth, borderStyle, borderColor, borderColorHover, resolvedBorderRadius, padding, resolvedBackgroundColor, resolvedBackgroundColorHover, iconSize, busy, hovered, height, files.length, width ]);
|
|
68
|
+
return jsxs("div", {
|
|
69
|
+
className: css.wrapper,
|
|
70
|
+
style: cssVars,
|
|
71
|
+
ref: ref,
|
|
72
|
+
role: isInteractive ? "button" : void 0,
|
|
73
|
+
"aria-label": isInteractive ? "Click to upload files" : void 0,
|
|
74
|
+
"aria-describedby": `${titleId} ${messageId}`,
|
|
75
|
+
"aria-disabled": !isInteractive,
|
|
76
|
+
tabIndex: isInteractive ? 0 : -1,
|
|
77
|
+
onClick: isInteractive ? handleClickUpload : void 0,
|
|
78
|
+
onKeyDown: isInteractive ? e => accessibleKeyDown(e, () => handleClickUpload()) : void 0,
|
|
79
|
+
onDragEnter: handleDragEnter,
|
|
80
|
+
onDragOver: e => {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
},
|
|
83
|
+
onDragLeave: handleDragLeave,
|
|
84
|
+
onDrop: handleDrop,
|
|
85
|
+
children: [ jsx("div", {
|
|
86
|
+
className: css.icon,
|
|
87
|
+
children: jsx(Icon, {
|
|
88
|
+
size: iconSize,
|
|
89
|
+
name: icon,
|
|
90
|
+
strokeColor: iconStrokeColor,
|
|
91
|
+
pointer: !1
|
|
92
|
+
})
|
|
93
|
+
}), jsx("div", {
|
|
94
|
+
id: titleId,
|
|
95
|
+
className: css.title,
|
|
96
|
+
children: title
|
|
97
|
+
}), jsxs("div", {
|
|
98
|
+
id: messageId,
|
|
99
|
+
className: `${css.message} ${css[textSize]}`,
|
|
100
|
+
children: [ busy && showProgress && jsx(ProgressIndicator, {
|
|
101
|
+
show: !0,
|
|
102
|
+
size: 20,
|
|
103
|
+
inline: !0,
|
|
104
|
+
color: iconStrokeColor
|
|
105
|
+
}), busy ? busyMessage : message ]
|
|
106
|
+
}), files.length > 0 && jsx("div", {
|
|
107
|
+
className: css.files,
|
|
108
|
+
children: jsx(FileList, {
|
|
109
|
+
files: files,
|
|
110
|
+
bgColor: "var(--core-surface-primary)",
|
|
111
|
+
size: "m",
|
|
112
|
+
direction: "column",
|
|
113
|
+
gap: 8,
|
|
114
|
+
iconSize: 24,
|
|
115
|
+
padding: "10px",
|
|
116
|
+
canRemove: canRemove
|
|
117
|
+
})
|
|
118
|
+
}), jsx("input", {
|
|
119
|
+
id: inputId,
|
|
120
|
+
ref: inputRef,
|
|
121
|
+
type: "file",
|
|
122
|
+
hidden: !0,
|
|
123
|
+
disabled: busy,
|
|
124
|
+
multiple: multiple,
|
|
125
|
+
accept: acceptedTypes ? acceptedTypes.join(", ") : void 0,
|
|
126
|
+
onChange: handleFileInputChange
|
|
127
|
+
}) ]
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
UploadAreaBase.displayName = "UploadArea";
|
|
132
|
+
|
|
133
|
+
const UploadArea = React.memo(UploadAreaBase);
|
|
134
|
+
|
|
135
|
+
export { UploadArea as U, allTypes as a, audioTypes as b, documentTypes as d, imageTypes as i, textTypes as t, videoTypes as v };
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { a as __awaiter } from "./tslib.es6-C81Qhn1z.mjs";
|
|
2
|
+
|
|
3
|
+
class WebRTCConnection {
|
|
4
|
+
/**
|
|
5
|
+
* Report whether the peer connection is currently connected
|
|
6
|
+
*/
|
|
7
|
+
get connected() {
|
|
8
|
+
return "connected" === this.peerConnection.connectionState;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Report whether the connection currently has an audio path attached
|
|
12
|
+
*/ get audioConnected() {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const hasLocalAudioTrack = "live" === (null === (_b = null === (_a = this.RTCSenderAudioSender) || void 0 === _a ? void 0 : _a.track) || void 0 === _b ? void 0 : _b.readyState), hasRemoteAudioTrack = this.RTCReceiverAudioTracks.size > 0;
|
|
15
|
+
return Boolean(hasLocalAudioTrack || hasRemoteAudioTrack);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Report whether the connection currently has a video path attached
|
|
19
|
+
*/ get videoConnected() {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const hasLocalVideoTrack = "live" === (null === (_a = this.RTCSenderVideoTrack) || void 0 === _a ? void 0 : _a.readyState) || "live" === (null === (_b = this.RTCScreenShareTrack) || void 0 === _b ? void 0 : _b.readyState), hasRemoteVideoTrack = this.RTCReceiverVideoTracks.size > 0;
|
|
22
|
+
return Boolean(hasLocalVideoTrack || hasRemoteVideoTrack);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Report whether any data channel is currently open
|
|
26
|
+
*/ get dataConnected() {
|
|
27
|
+
return this.RTCDataChannels.some(channel => "open" === channel.readyState);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Create the base instance
|
|
31
|
+
*/ constructor(rtcConnectionInfo) {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
33
|
+
if (this.RTCSenderAudioTrack = null, this.RTCSenderVideoTrack = null, this.RTCSenderAudioSender = null,
|
|
34
|
+
this.RTCSenderAudioStream = new MediaStream, this.RTCScreenShareTrack = null, this.RTCScreenShareSender = null,
|
|
35
|
+
this.RTCReceiverAudioStream = new MediaStream, this.RTCReceiverVideoTracks = new Map,
|
|
36
|
+
this.RTCReceiverAudioTracks = new Map, this.RTCDataChannels = [], this.connectionUrl = "",
|
|
37
|
+
this.connectionOffer = null, this.autoPlayAudio = !0, this.iceTimer = null, !globalThis.document) throw new Error("RTC needs a valid browser environment");
|
|
38
|
+
if (this.connectionUrl = null !== (_a = rtcConnectionInfo.connectionUrl) && void 0 !== _a ? _a : "",
|
|
39
|
+
this.peerConnection = new RTCPeerConnection, this.RTCSenderAudioTrack = null !== (_d = null !== (_c = null === (_b = rtcConnectionInfo.micStream) || void 0 === _b ? void 0 : _b.getAudioTracks()[0]) && void 0 !== _c ? _c : rtcConnectionInfo.micTrack) && void 0 !== _d ? _d : null,
|
|
40
|
+
!this.RTCSenderAudioTrack) throw new Error("WebRTCConnection requires a microphone stream or track");
|
|
41
|
+
this.RTCSenderVideoTrack = rtcConnectionInfo.videoTrack, this.audioElement = null !== (_e = rtcConnectionInfo.audioElement) && void 0 !== _e ? _e : document.createElement("audio"),
|
|
42
|
+
this.autoPlayAudio = null === (_f = rtcConnectionInfo.autoPlayAudio) || void 0 === _f || _f;
|
|
43
|
+
const channels = null !== (_g = rtcConnectionInfo.dataChannels) && void 0 !== _g ? _g : [];
|
|
44
|
+
this.onRemoteVideoStream = rtcConnectionInfo.onRemoteVideoStream, this.onRemoteAudioStream = rtcConnectionInfo.onRemoteAudioStream,
|
|
45
|
+
this.onDataChannelEvent = rtcConnectionInfo.onDataChannelEvent, this.setupIncomingAudioStream(),
|
|
46
|
+
"number" == typeof rtcConnectionInfo.volume && this.setVolume(rtcConnectionInfo.volume),
|
|
47
|
+
this.setupOutgoingMediaStream(), this.setupDataChannels(channels), this.setupDataChannelEventListeners(),
|
|
48
|
+
this.peerConnection.ontrack = this.onTrack.bind(this);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Initialize the RTC connection
|
|
52
|
+
*/ initialize(offerOptions, bearerToken) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function*() {
|
|
54
|
+
this.offerOptions = offerOptions, this.bearerToken = bearerToken, yield this.negotiate();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Start an optional screen share stream and renegotiate if already connected
|
|
59
|
+
*/ startScreenShare() {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function*() {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
if (!(null === (_b = null === (_a = globalThis.navigator) || void 0 === _a ? void 0 : _a.mediaDevices) || void 0 === _b ? void 0 : _b.getDisplayMedia)) throw new Error("Screen share is not supported in this browser");
|
|
63
|
+
if (this.RTCScreenShareSender) return;
|
|
64
|
+
const screenTrack = (yield navigator.mediaDevices.getDisplayMedia({
|
|
65
|
+
video: !0,
|
|
66
|
+
audio: !1
|
|
67
|
+
})).getVideoTracks()[0];
|
|
68
|
+
if (!screenTrack) throw new Error("No screen share video track was provided");
|
|
69
|
+
const screenShareStream = new MediaStream([ screenTrack ]);
|
|
70
|
+
this.RTCScreenShareTrack = screenTrack, this.RTCScreenShareSender = this.peerConnection.addTrack(screenTrack, screenShareStream),
|
|
71
|
+
screenTrack.addEventListener("ended", () => {
|
|
72
|
+
this.stopScreenShare(!1);
|
|
73
|
+
}), this.peerConnection.remoteDescription && (yield this.negotiate());
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Stop the optional screen share stream and renegotiate if already connected
|
|
78
|
+
*/ stopScreenShare() {
|
|
79
|
+
return __awaiter(this, arguments, void 0, function*(stopTrack = !0) {
|
|
80
|
+
this.RTCScreenShareSender && (this.peerConnection.removeTrack(this.RTCScreenShareSender),
|
|
81
|
+
this.RTCScreenShareSender = null), stopTrack && this.RTCScreenShareTrack && this.RTCScreenShareTrack.stop(),
|
|
82
|
+
this.RTCScreenShareTrack = null, this.peerConnection.remoteDescription && (yield this.negotiate());
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Create an offer, wait for ICE gathering, POST SDP, and apply the answer
|
|
87
|
+
*/ negotiate() {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function*() {
|
|
89
|
+
var _a;
|
|
90
|
+
if (!this.peerConnection) throw new Error("Peer connection not initialized");
|
|
91
|
+
if (!this.connectionUrl) throw new Error("Peer connection url not provided");
|
|
92
|
+
this.connectionOffer = yield this.peerConnection.createOffer(this.offerOptions),
|
|
93
|
+
yield this.peerConnection.setLocalDescription(this.connectionOffer), yield this.waitForIceGathering();
|
|
94
|
+
const headers = {
|
|
95
|
+
"Content-Type": "application/sdp"
|
|
96
|
+
};
|
|
97
|
+
this.bearerToken && "" !== this.bearerToken && (headers.Authorization = `Bearer ${this.bearerToken}`);
|
|
98
|
+
const sdpResponse = yield fetch(this.connectionUrl, {
|
|
99
|
+
method: "POST",
|
|
100
|
+
body: null === (_a = this.connectionOffer) || void 0 === _a ? void 0 : _a.sdp,
|
|
101
|
+
headers: headers
|
|
102
|
+
});
|
|
103
|
+
if (!sdpResponse.ok) throw new Error(`Failed to send connection offer to ${this.connectionUrl}. Status: ${sdpResponse.status} ${sdpResponse.statusText}`);
|
|
104
|
+
const sdpReply = {
|
|
105
|
+
type: "answer",
|
|
106
|
+
sdp: yield sdpResponse.text()
|
|
107
|
+
};
|
|
108
|
+
yield this.peerConnection.setRemoteDescription(sdpReply);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Send a JSON-serializable payload over a named data channel
|
|
113
|
+
*/ sendMessage(channelName, data) {
|
|
114
|
+
const channel = this.RTCDataChannels.find(dataChannel => dataChannel.label === channelName);
|
|
115
|
+
if (!channel) throw new Error(`Data channel "${channelName}" not found`);
|
|
116
|
+
if ("open" !== channel.readyState) throw new Error(`Data channel "${channelName}" is not open. Current state: ${channel.readyState}`);
|
|
117
|
+
channel.send(JSON.stringify(data));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Mute or unmute all incoming audio playback
|
|
121
|
+
*/ muteAllAudio(muted) {
|
|
122
|
+
this.audioElement.muted = muted;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Mute or unmute a specific incoming audio track
|
|
126
|
+
*/ muteAudioTrack(trackId, muted) {
|
|
127
|
+
const track = this.RTCReceiverAudioTracks.get(trackId);
|
|
128
|
+
if (!track) throw new Error(`Audio track "${trackId}" not found`);
|
|
129
|
+
track.enabled = !muted;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Set the playback volume for the incoming audio element
|
|
133
|
+
*/ setVolume(volume) {
|
|
134
|
+
this.audioElement.volume = Math.max(0, Math.min(1, volume));
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Replace the outgoing audio source with the first track from a stream
|
|
138
|
+
*/ setOutgoingAudioStream(stream) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function*() {
|
|
140
|
+
var _a;
|
|
141
|
+
yield this.replaceAudioTrack(null !== (_a = null == stream ? void 0 : stream.getAudioTracks()[0]) && void 0 !== _a ? _a : null);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Replace the outgoing audio track without rebuilding the peer connection
|
|
146
|
+
*/ replaceAudioTrack(track) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function*() {
|
|
148
|
+
this.RTCSenderAudioTrack = track, this.syncSenderAudioStream(track), this.RTCSenderAudioSender ? yield this.RTCSenderAudioSender.replaceTrack(track) : track && (this.RTCSenderAudioSender = this.peerConnection.addTrack(track, this.RTCSenderAudioStream),
|
|
149
|
+
this.peerConnection.remoteDescription && (yield this.negotiate()));
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Close the peer connection and release local media bindings
|
|
154
|
+
*/ close() {
|
|
155
|
+
this.iceTimer && (clearTimeout(this.iceTimer), this.iceTimer = null), this.RTCScreenShareSender && (this.peerConnection.removeTrack(this.RTCScreenShareSender),
|
|
156
|
+
this.RTCScreenShareSender = null), this.RTCSenderAudioSender && (this.peerConnection.removeTrack(this.RTCSenderAudioSender),
|
|
157
|
+
this.RTCSenderAudioSender = null), this.RTCScreenShareTrack = null, this.RTCSenderAudioTrack = null,
|
|
158
|
+
this.audioElement.srcObject = null, this.peerConnection.close();
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Create an audio source node from the unified incoming audio stream
|
|
162
|
+
*/ createIncomingAudioSource(audioContext) {
|
|
163
|
+
return audioContext.createMediaStreamSource(this.RTCReceiverAudioStream);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Handle track events adding them to the unified audio and video streams
|
|
167
|
+
*/ onTrack(event) {
|
|
168
|
+
var _a, _b;
|
|
169
|
+
if (event.streams[0]) {
|
|
170
|
+
if ("video" === event.track.kind) {
|
|
171
|
+
const stream = event.streams[0], id = stream.id;
|
|
172
|
+
this.RTCReceiverVideoTracks.has(id) || (this.RTCReceiverVideoTracks.set(id, stream),
|
|
173
|
+
null === (_a = this.onRemoteVideoStream) || void 0 === _a || _a.call(this, this.RTCReceiverVideoTracks));
|
|
174
|
+
}
|
|
175
|
+
if ("audio" === event.track.kind) {
|
|
176
|
+
const id = event.track.id;
|
|
177
|
+
this.RTCReceiverAudioTracks.has(id) || (this.RTCReceiverAudioStream.addTrack(event.track),
|
|
178
|
+
this.RTCReceiverAudioTracks.set(id, event.track), null === (_b = this.onRemoteAudioStream) || void 0 === _b || _b.call(this, new Map([ [ this.RTCReceiverAudioStream.id, this.RTCReceiverAudioStream ] ])));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Create a local audio element and set its source to the rtc incoming media stream
|
|
184
|
+
*/ setupIncomingAudioStream() {
|
|
185
|
+
this.audioElement.autoplay = this.autoPlayAudio, this.audioElement.srcObject = this.RTCReceiverAudioStream;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Set up a local stream with mic and video tracks and add to peer connection
|
|
189
|
+
*/ setupOutgoingMediaStream() {
|
|
190
|
+
if (this.RTCSenderAudioTrack && (this.syncSenderAudioStream(this.RTCSenderAudioTrack),
|
|
191
|
+
this.RTCSenderAudioSender = this.peerConnection.addTrack(this.RTCSenderAudioTrack, this.RTCSenderAudioStream)),
|
|
192
|
+
this.RTCSenderVideoTrack) {
|
|
193
|
+
const senderStream = new MediaStream([ this.RTCSenderVideoTrack ]);
|
|
194
|
+
this.peerConnection.addTrack(this.RTCSenderVideoTrack, senderStream);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Keep the sender stream aligned to the current local audio track
|
|
199
|
+
*/ syncSenderAudioStream(track) {
|
|
200
|
+
for (const currentTrack of this.RTCSenderAudioStream.getAudioTracks()) this.RTCSenderAudioStream.removeTrack(currentTrack);
|
|
201
|
+
track && this.RTCSenderAudioStream.addTrack(track);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Setup data channels
|
|
205
|
+
*/ setupDataChannels(channels) {
|
|
206
|
+
const channelsArray = Array.isArray(channels) ? channels : [ channels ];
|
|
207
|
+
if (channelsArray.length > 0) for (const channel of channelsArray) {
|
|
208
|
+
const dataChannel = this.peerConnection.createDataChannel(channel);
|
|
209
|
+
this.RTCDataChannels.push(dataChannel);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Add listeners for data events and push through callback
|
|
214
|
+
*/ setupDataChannelEventListeners() {
|
|
215
|
+
for (const channel of this.RTCDataChannels) {
|
|
216
|
+
const channelName = channel.label;
|
|
217
|
+
channel.addEventListener("message", event => {
|
|
218
|
+
var _a;
|
|
219
|
+
null === (_a = this.onDataChannelEvent) || void 0 === _a || _a.call(this, channelName, "message", event);
|
|
220
|
+
}), channel.addEventListener("open", event => {
|
|
221
|
+
var _a;
|
|
222
|
+
null === (_a = this.onDataChannelEvent) || void 0 === _a || _a.call(this, channelName, "open", event);
|
|
223
|
+
}), channel.addEventListener("close", event => {
|
|
224
|
+
var _a;
|
|
225
|
+
null === (_a = this.onDataChannelEvent) || void 0 === _a || _a.call(this, channelName, "close", event);
|
|
226
|
+
}), channel.addEventListener("error", event => {
|
|
227
|
+
var _a;
|
|
228
|
+
null === (_a = this.onDataChannelEvent) || void 0 === _a || _a.call(this, channelName, "error", event);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Wait for the ICE gathering to be complete
|
|
234
|
+
*/ waitForIceGathering() {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function*() {
|
|
236
|
+
if ("complete" !== this.peerConnection.iceGatheringState) return new Promise((resolve, reject) => {
|
|
237
|
+
const handleStateChange = () => {
|
|
238
|
+
"complete" === this.peerConnection.iceGatheringState && (this.iceTimer && clearTimeout(this.iceTimer),
|
|
239
|
+
this.iceTimer = null, this.peerConnection.removeEventListener("icegatheringstatechange", handleStateChange),
|
|
240
|
+
resolve());
|
|
241
|
+
};
|
|
242
|
+
this.peerConnection.addEventListener("icegatheringstatechange", handleStateChange),
|
|
243
|
+
this.iceTimer = setTimeout(() => {
|
|
244
|
+
this.peerConnection.removeEventListener("icegatheringstatechange", handleStateChange),
|
|
245
|
+
this.iceTimer = null, reject(new Error("ICE gathering timed out"));
|
|
246
|
+
}, 5e3);
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export { WebRTCConnection as W };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __awaiter, _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
2
2
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ import { create } from "zustand";
|
|
|
6
6
|
|
|
7
7
|
import { useShallow } from "zustand/react/shallow";
|
|
8
8
|
|
|
9
|
-
import { I as IndexedDB } from "./IndexedDB-
|
|
9
|
+
import { I as IndexedDB } from "./IndexedDB-CTqfKmp1.mjs";
|
|
10
10
|
|
|
11
11
|
function isValidIDBKey(key) {
|
|
12
12
|
return "string" == typeof key || "number" == typeof key || key instanceof Date || key instanceof ArrayBuffer || (Array.isArray(key) ? key.every(entry => isValidIDBKey(entry)) : ArrayBuffer.isView(key));
|