@apple-pie/slice 0.1.36 → 0.1.38
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/dist/cjs/chunks/{AudioBubble-BE_f4Hso.js → AudioBubble-NNEBsJdS.js} +4 -3
- package/dist/cjs/chunks/{Avatar-BiyInyRO.js → Avatar-SrfANGbC.js} +1 -1
- package/dist/cjs/chunks/{AvatarGroup-DRL0lWmX.js → AvatarGroup-CrpB1rY2.js} +1 -1
- package/dist/cjs/chunks/{Badge-DMowUBPk.js → Badge-CgOsYcT3.js} +1 -1
- package/dist/cjs/chunks/{Button-COMAPFWV.js → Button-DaiX-C4m.js} +1 -1
- package/dist/cjs/chunks/{ButtonBar-IiuZuTLR.js → ButtonBar-BZ3rh8Lq.js} +1 -1
- package/dist/cjs/chunks/{Camera-Ly06XVkk.js → Camera-AhNDA3t9.js} +5 -4
- package/dist/cjs/chunks/{CheckBox-HmPtb4qd.js → CheckBox-C3C5mjHu.js} +1 -1
- package/dist/cjs/chunks/{Chip-6PG7VzN-.js → Chip-ts1Mqmdz.js} +1 -1
- package/dist/cjs/chunks/{DivInput-C-PFUeDT.js → DivInput-vBlUyYSR.js} +1 -1
- package/dist/cjs/chunks/{Dot-dB91CPB9.js → Dot-BPztauRU.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-B4pmiREo.js → DrggablePanel-DWRBhX1h.js} +8 -7
- package/dist/cjs/chunks/{DropDown-DrFvc39t.js → DropDown-aA4rP4nj.js} +1 -1
- package/dist/cjs/chunks/{ErrorSummary-_XvQGFbZ.js → ErrorSummary-Cj13tzbo.js} +4 -3
- package/dist/cjs/chunks/{FileIcon-UA9ZceY_.js → FileIcon-BnKrr5kO.js} +4 -3
- package/dist/cjs/chunks/{FileList-CnsmD5Y7.js → FileList-Bh2ASAlo.js} +1 -1
- package/dist/cjs/chunks/{FlexDiv-WZf3guIi.js → FlexDiv-Dvt7RZ5w.js} +1 -1
- package/dist/cjs/chunks/{Grouper-BzPprBpD.js → Grouper-CrXhav6m.js} +4 -3
- package/dist/cjs/chunks/{Icon-g039RSWl.js → Icon-FZglA3Yv.js} +78 -4
- package/dist/cjs/chunks/{IconButton-DZBikqIA.js → IconButton-NhRNQC8P.js} +1 -1
- package/dist/cjs/chunks/{IndexedDB-DW-NDU8i.js → IndexedDB-DbfRU4NA.js} +1 -1
- package/dist/cjs/chunks/{Label-BLCGQli-.js → Label-yG4MKTBU.js} +1 -1
- package/dist/cjs/chunks/{Level-CvPkz_70.js → Level-CbDPXUqH.js} +2 -1
- package/dist/cjs/chunks/{Modal-D8RvqX4f.js → Modal-ByLhIOEY.js} +1 -1
- package/dist/cjs/chunks/{ModalController-ctBbD_Jn.js → ModalController-CLAsLeXH.js} +4 -2
- package/dist/cjs/chunks/{Overlay-CB0-ZCbr.js → Overlay-EZURYTTf.js} +1 -1
- package/dist/cjs/chunks/{Pager-GwtjwNSr.js → Pager-C0gzryId.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-BqAJgdQp.js → ProgressIndicator-COd8pJNN.js} +4 -3
- package/dist/cjs/chunks/{PromptInput-B5-MrCid.js → PromptInput-Fz_LPCgY.js} +5 -4
- package/dist/cjs/chunks/{RadioButton-B0It6bQ8.js → RadioButton-9_v2hLcZ.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-B-G1DO7M.js → RadioButtonList-B-ZTg8zH.js} +1 -1
- package/dist/cjs/chunks/{Slider-BDCvQ_h4.js → Slider-CVK9DAg2.js} +4 -3
- package/dist/cjs/chunks/{Spacer-C_qGs52F.js → Spacer-D-kgqLFU.js} +1 -1
- package/dist/cjs/chunks/{Switch-2YgqC8vV.js → Switch-BjV9N6mT.js} +1 -1
- package/dist/cjs/chunks/{TabBar-C3FbWoTz.js → TabBar-C-Gy9m_G.js} +5 -4
- package/dist/cjs/chunks/{TextArea-C3DehkDw.js → TextArea-zbvBRvaO.js} +1 -1
- package/dist/cjs/chunks/{TextField-BkZlrRfY.js → TextField-BaA1d-kZ.js} +5 -4
- package/dist/cjs/chunks/{Tip-CEvYKuL1.js → Tip-C5XHyCqG.js} +1 -1
- package/dist/cjs/chunks/{Toast-BoCExCrT.js → Toast-DvkCHKd_.js} +5 -4
- package/dist/cjs/chunks/{ToggleButton-CBQt8Ii8.js → ToggleButton-8x0KwHGz.js} +5 -2
- package/dist/cjs/chunks/{UploadArea-D3I4J8B7.js → UploadArea-C4EUBdgw.js} +1 -1
- package/dist/cjs/chunks/Video-YJtfnmcL.js +297 -0
- package/dist/cjs/chunks/VideoController-CGd4vCS5.js +94 -0
- package/dist/cjs/chunks/{WSConnection-D6rZfnAf.js → WSConnection-GFxVk4ga.js} +1 -1
- package/dist/cjs/chunks/{WebRTCConnection-C_IDgzdx.js → WebRTCConnection-BI1U50VW.js} +1 -1
- package/dist/cjs/chunks/{_types-Cq4h0y4u.js → _types-CYthPcWN.js} +9 -3
- package/dist/cjs/chunks/{localDBStore-CmeqEYMi.js → localDBStore-BcFJ7jo5.js} +1 -1
- package/dist/cjs/chunks/{microphoneStore-V2mYQFa4.js → microphoneStore-DPHwHLgx.js} +1 -1
- package/dist/cjs/chunks/{misc-CGesOGlL.js → misc-thfr_amv.js} +1 -1
- package/dist/cjs/chunks/{sseStore-Bql9biBI.js → sseStore-CiKSDxcG.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-CpdqGKrs.js → uploads-worker-CU3C7Eit.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-DWM1E-GX.js → uploadsStore-DAasEgzA.js} +2 -2
- package/dist/cjs/chunks/videoStore-DmHtglyq.js +21 -0
- package/dist/cjs/chunks/{volumeStore-CpxXslLu.js → volumeStore-1w6yUtq4.js} +1 -1
- package/dist/cjs/chunks/{webRTCStore-C9e5XlzB.js → webRTCStore-C961XakJ.js} +1 -1
- package/dist/cjs/chunks/{windowStore-DV7Ch5Z2.js → windowStore-BFp40NXf.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +7 -5
- 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 +9 -8
- package/dist/cjs/components/ButtonBar/index.js +7 -5
- package/dist/cjs/components/Camera/index.js +8 -6
- package/dist/cjs/components/CheckBox/index.js +7 -5
- package/dist/cjs/components/Chip/index.js +7 -6
- 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 +7 -5
- package/dist/cjs/components/DropDown/index.js +7 -5
- package/dist/cjs/components/ErrorSummary/index.js +6 -5
- package/dist/cjs/components/FileIcon/index.js +6 -5
- package/dist/cjs/components/FileList/index.js +8 -7
- package/dist/cjs/components/FlexDiv/index.js +2 -2
- package/dist/cjs/components/Grouper/index.js +7 -6
- package/dist/cjs/components/Icon/index.js +6 -5
- package/dist/cjs/components/IconButton/index.js +9 -7
- package/dist/cjs/components/Label/index.js +3 -3
- package/dist/cjs/components/Level/index.js +3 -3
- package/dist/cjs/components/Modal/index.js +10 -9
- package/dist/cjs/components/ModalController/index.js +6 -4
- 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 +5 -4
- package/dist/cjs/components/PromptInput/index.js +10 -8
- package/dist/cjs/components/RadioButton/index.js +7 -5
- package/dist/cjs/components/RadioButtonList/index.js +8 -6
- package/dist/cjs/components/Slider/index.js +7 -5
- 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 +9 -7
- package/dist/cjs/components/TextArea/index.js +9 -8
- package/dist/cjs/components/Textfield/index.js +10 -8
- package/dist/cjs/components/Tip/index.js +3 -3
- package/dist/cjs/components/Toast/index.js +6 -5
- package/dist/cjs/components/ToggleButton/index.js +9 -8
- package/dist/cjs/components/UploadArea/index.js +8 -6
- package/dist/cjs/components/Video/index.js +17 -0
- package/dist/cjs/components/VideoController/index.js +16 -0
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +2 -2
- package/dist/cjs/hooks/useMdStreamBuffer.js +1 -1
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +3 -3
- package/dist/cjs/index.js +9 -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 +2 -2
- package/dist/cjs/stores/microphone.js +2 -2
- 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/video.js +7 -0
- package/dist/cjs/stores/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +30 -28
- package/dist/cjs/utils/index.js +2 -2
- package/dist/cjs/utils/objects/index.js +2 -2
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/esm/chunks/{AudioBubble-DbIkKNSG.mjs → AudioBubble-iizzoWYu.mjs} +8 -4
- package/dist/esm/chunks/{Avatar-BdEM1ozC.mjs → Avatar-DubrdG84.mjs} +2 -2
- package/dist/esm/chunks/{AvatarGroup-BTYNzBuA.mjs → AvatarGroup-BgRuyywS.mjs} +2 -2
- package/dist/esm/chunks/{Badge-BpiR8FTR.mjs → Badge-DuAuiCDh.mjs} +1 -1
- package/dist/esm/chunks/{Button-CsgknV85.mjs → Button-sNpmgrEH.mjs} +6 -6
- package/dist/esm/chunks/{ButtonBar-BFZwa2aG.mjs → ButtonBar-B3OfP6aP.mjs} +3 -3
- package/dist/esm/chunks/{Camera-CqXqVh7j.mjs → Camera-BjPshLqz.mjs} +10 -6
- package/dist/esm/chunks/{CheckBox-CQxfSzXH.mjs → CheckBox-DGZvXelF.mjs} +3 -3
- package/dist/esm/chunks/{Chip-B9lOeTEj.mjs → Chip-CW_-VRsb.mjs} +4 -4
- package/dist/esm/chunks/{DivInput-D98_x_cR.mjs → DivInput-WVbkF9Iw.mjs} +2 -2
- package/dist/esm/chunks/{Dot-CWHimm2-.mjs → Dot-BOTK-iGH.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-CWuLIdX9.mjs → DrggablePanel-BrY_Q7yh.mjs} +11 -7
- package/dist/esm/chunks/{DropDown-DmvRDK3x.mjs → DropDown-C9ss5Kya.mjs} +3 -3
- package/dist/esm/chunks/{ErrorSummary-CB6H8_k-.mjs → ErrorSummary-DZZOdkpV.mjs} +7 -3
- package/dist/esm/chunks/{FileIcon-D20gyTFi.mjs → FileIcon-DBx6DOva.mjs} +7 -3
- package/dist/esm/chunks/{FileList-C-YZ-FcH.mjs → FileList-CCuBYh9W.mjs} +5 -5
- package/dist/esm/chunks/{FlexDiv-CtfrPPcV.mjs → FlexDiv-Bt5TztWq.mjs} +1 -1
- package/dist/esm/chunks/{Grouper-gDZnuiM0.mjs → Grouper-DmsQtgYL.mjs} +8 -4
- package/dist/esm/chunks/{Icon-CF8mSm1j.mjs → Icon-BGLECWjf.mjs} +82 -5
- package/dist/esm/chunks/{IconButton-DAyyIY8J.mjs → IconButton-DfXCtxO7.mjs} +5 -5
- package/dist/esm/chunks/{IndexedDB-Ckz-KqBO.mjs → IndexedDB-FKrpsWT5.mjs} +1 -1
- package/dist/esm/chunks/{Label-2jNz4_6V.mjs → Label-ClSeda6b.mjs} +2 -2
- package/dist/esm/chunks/{Level-CVC8xDqy.mjs → Level-f-qJ6DpU.mjs} +4 -3
- package/dist/esm/chunks/{Modal-BmNG8fzy.mjs → Modal-Wyh9vD8I.mjs} +5 -5
- package/dist/esm/chunks/{ModalController-Ce3srWy-.mjs → ModalController-DwYap4hN.mjs} +8 -3
- package/dist/esm/chunks/{Overlay-B7lugjjj.mjs → Overlay-o7rQtTk-.mjs} +1 -1
- package/dist/esm/chunks/{Pager-DURbG5j1.mjs → Pager-BvmxNZIN.mjs} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-CRc_YmyK.mjs → ProgressIndicator-8wqZL1ib.mjs} +7 -3
- package/dist/esm/chunks/{PromptInput-vnwk-zMH.mjs → PromptInput-Mcp3A0Ay.mjs} +9 -5
- package/dist/esm/chunks/{RadioButton-BEuDCEOu.mjs → RadioButton-C5p9M9LA.mjs} +3 -3
- package/dist/esm/chunks/{RadioButtonList-B_WIvWpr.mjs → RadioButtonList-C3_34iLp.mjs} +3 -3
- package/dist/esm/chunks/{Slider-CDjKOpoL.mjs → Slider-D-W_jWtn.mjs} +8 -4
- package/dist/esm/chunks/{Spacer-CdkfmN54.mjs → Spacer-BCFISLRB.mjs} +1 -1
- package/dist/esm/chunks/{Switch-C_DiN4cG.mjs → Switch-BWMkKzv0.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-D8IYekUP.mjs → TabBar-CzDdMYki.mjs} +11 -7
- package/dist/esm/chunks/{TextArea-DWcOF8Wp.mjs → TextArea-COv1tDKL.mjs} +2 -2
- package/dist/esm/chunks/{TextField-D-Y8f0QY.mjs → TextField-DXB2x3g3.mjs} +10 -6
- package/dist/esm/chunks/{Tip-Cr872A6k.mjs → Tip-C-SbwBBX.mjs} +2 -2
- package/dist/esm/chunks/{Toast-Bb5Hh3so.mjs → Toast-P4qpxneX.mjs} +9 -5
- package/dist/esm/chunks/{ToggleButton-_9LchL03.mjs → ToggleButton-D_jOHDpK.mjs} +6 -3
- package/dist/esm/chunks/{UploadArea-Dm3tjBoN.mjs → UploadArea-B7Nvocjc.mjs} +4 -4
- package/dist/esm/chunks/Video-Dvkx0zJN.mjs +308 -0
- package/dist/esm/chunks/VideoController-DUAGSgCK.mjs +111 -0
- package/dist/esm/chunks/{WSConnection-B1_GePm4.mjs → WSConnection-DoZ0xJZ6.mjs} +1 -1
- package/dist/esm/chunks/{WebRTCConnection-DFZPhyph.mjs → WebRTCConnection-_zBzV614.mjs} +1 -1
- package/dist/esm/chunks/{_types-CI0sR4EH.mjs → _types-BO3tclBe.mjs} +9 -3
- package/dist/esm/chunks/{localDBStore-C-lYeGJl.mjs → localDBStore-D7_9yym7.mjs} +2 -2
- package/dist/esm/chunks/{microphoneStore-zHPtnRfW.mjs → microphoneStore-BGWQI4OG.mjs} +1 -1
- package/dist/esm/chunks/{misc-DjqDmrJE.mjs → misc-BCwU6qLj.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-ZGbbKbVB.mjs → sseStore-DWnaYuNg.mjs} +2 -2
- package/dist/esm/chunks/{uploads-worker-kw6UOEx5.mjs → uploads-worker-5NJ0rSVJ.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-BfyNmYWk.mjs → uploadsStore-ygVc1ghD.mjs} +1 -1
- package/dist/esm/chunks/videoStore-CZfHgy1p.mjs +19 -0
- package/dist/esm/chunks/{volumeStore-D_5Xqf_0.mjs → volumeStore-C-Iat9Bn.mjs} +1 -1
- package/dist/esm/chunks/{webRTCStore-Cy7Mo7hB.mjs → webRTCStore-CWIDJL7j.mjs} +2 -2
- package/dist/esm/chunks/{windowStore-CXggRA80.mjs → windowStore-D-1yvjRs.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +11 -5
- 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 +15 -9
- package/dist/esm/components/ButtonBar/index.mjs +11 -5
- package/dist/esm/components/Camera/index.mjs +13 -7
- package/dist/esm/components/CheckBox/index.mjs +11 -5
- package/dist/esm/components/Chip/index.mjs +12 -6
- 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 +10 -4
- package/dist/esm/components/DropDown/index.mjs +11 -5
- package/dist/esm/components/ErrorSummary/index.mjs +10 -4
- package/dist/esm/components/FileIcon/index.mjs +10 -4
- package/dist/esm/components/FileList/index.mjs +13 -7
- package/dist/esm/components/FlexDiv/index.mjs +2 -2
- package/dist/esm/components/Grouper/index.mjs +12 -6
- package/dist/esm/components/Icon/index.mjs +11 -5
- package/dist/esm/components/IconButton/index.mjs +14 -8
- package/dist/esm/components/Label/index.mjs +3 -3
- package/dist/esm/components/Level/index.mjs +4 -4
- package/dist/esm/components/Modal/index.mjs +17 -11
- package/dist/esm/components/ModalController/index.mjs +11 -5
- 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 +11 -5
- package/dist/esm/components/PromptInput/index.mjs +18 -12
- package/dist/esm/components/RadioButton/index.mjs +11 -5
- package/dist/esm/components/RadioButtonList/index.mjs +12 -6
- package/dist/esm/components/Slider/index.mjs +11 -5
- 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 +15 -9
- package/dist/esm/components/TextArea/index.mjs +16 -10
- package/dist/esm/components/Textfield/index.mjs +17 -11
- package/dist/esm/components/Tip/index.mjs +3 -3
- package/dist/esm/components/Toast/index.mjs +12 -6
- package/dist/esm/components/ToggleButton/index.mjs +16 -10
- package/dist/esm/components/UploadArea/index.mjs +14 -8
- package/dist/esm/components/Video/index.mjs +61 -0
- package/dist/esm/components/VideoController/index.mjs +55 -0
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +5 -5
- package/dist/esm/hooks/useMdStreamBuffer.mjs +2 -2
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +6 -6
- package/dist/esm/index.mjs +59 -53
- 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 +3 -3
- 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/video.mjs +3 -0
- package/dist/esm/stores/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +17 -15
- package/dist/esm/utils/index.mjs +10 -10
- package/dist/esm/utils/objects/index.mjs +7 -7
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +149 -1
- package/dist/types/components/Icon/_types.d.ts +6 -0
- package/dist/types/components/ToggleButton/_types.d.ts +2 -0
- package/dist/types/components/Video/Video.d.ts +69 -0
- package/dist/types/components/Video/_types.d.ts +60 -0
- package/dist/types/components/Video/index.d.ts +2 -0
- package/dist/types/components/VideoController/VideoController.d.ts +2 -0
- package/dist/types/components/VideoController/_types.d.ts +19 -0
- package/dist/types/components/VideoController/index.d.ts +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/video/_types.d.ts +14 -0
- package/dist/types/stores/video/index.d.ts +2 -0
- package/dist/types/stores/video/videoStore.d.ts +12 -0
- package/package.json +1 -1
- /package/dist/cjs/chunks/{MdStreamBuffer-P4x0pDST.js → MdStreamBuffer-6ppQXjx-.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-CYqfVBs1.js → SSEConnection-u5Nbvi9N.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-D3ZG5ZP6.js → audioVisualizer-CcF9txlx.js} +0 -0
- /package/dist/cjs/chunks/{colors-DbCrvnqF.js → colors-BcjKxDNk.js} +0 -0
- /package/dist/cjs/chunks/{debounce-DnWdlF44.js → debounce-CGlNCeVU.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-CJNFUtIy.js → modalStore-BsFlxAuk.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-D5nZ9SDg.js → sharedTypes-CTQSVGwg.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-DV7lnGfJ.js → tipStore-BpBKS759.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-B_Kb_gld.js → toastStore-B94fIo0i.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-CjqORQO8.js → tslib.es6-B1ngcCGJ.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-QqAM_dVR.mjs → MdStreamBuffer-DDT67lxm.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-Bxy3gcK3.mjs → SSEConnection-dWPQXa3J.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-DKVVhtrd.mjs → audioVisualizer-CEutpKkb.mjs} +0 -0
- /package/dist/esm/chunks/{colors-znQ0X8Pf.mjs → colors-BlWPMqVw.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-AGOKEQDZ.mjs → debounce-xEaitPPO.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-BXnW8M6D.mjs → modalStore-DqQDI9Y8.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-_CvGLd7A.mjs → sharedTypes-Cnhu6KJ0.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-BZPw1gyq.mjs → tipStore-DQq5FT-A.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-BXCjnqI1.mjs → toastStore-Da3vPfDn.mjs} +0 -0
- /package/dist/esm/chunks/{tslib.es6-8-nvCYY0.mjs → tslib.es6-snMG2wnR.mjs} +0 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as __rest, a as __awaiter } from "./tslib.es6-snMG2wnR.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import React, { useRef, useState, useCallback, useMemo, useEffect } from "react";
|
|
7
|
+
|
|
8
|
+
import { s as setStyle } from "./misc-BCwU6qLj.mjs";
|
|
9
|
+
|
|
10
|
+
import { I as IconButton } from "./IconButton-DfXCtxO7.mjs";
|
|
11
|
+
|
|
12
|
+
import { S as Slider } from "./Slider-D-W_jWtn.mjs";
|
|
13
|
+
|
|
14
|
+
import { T as ToggleButton } from "./ToggleButton-D_jOHDpK.mjs";
|
|
15
|
+
|
|
16
|
+
var PlayState, css_wrapper = "Video-module_wrapper__a9iH8", css_video = "Video-module_video__hxKME", css_controls = "Video-module_controls__X4yt6", css_controlsHeader = "Video-module_controlsHeader__dD64-", css_controlsFooter = "Video-module_controlsFooter__qJNTa", css_controlsBody = "Video-module_controlsBody__2GbQz", css_right = "Video-module_right__UMhfW", css_left = "Video-module_left__XC33m", css_progress = "Video-module_progress__UTWtq";
|
|
17
|
+
|
|
18
|
+
!function(PlayState) {
|
|
19
|
+
PlayState.Playing = "playing", PlayState.Paused = "paused", PlayState.Stopped = "stopped",
|
|
20
|
+
PlayState.Ended = "ended";
|
|
21
|
+
}(PlayState || (PlayState = {}));
|
|
22
|
+
|
|
23
|
+
const BaseVideo = React.forwardRef((props, ref) => {
|
|
24
|
+
const {children: children, src: src, playing: playing, loop: loop = !1, muted: muted = !0, playsInline: playsInline = !0, controls: controls = "simple", volume: volume = 1, poster: poster, captionsSrc: captionsSrc, playRate: playRate = 1, width: width = "100%", height: height = "auto", borderRadius: borderRadius, borderSize: borderSize, borderColor: borderColor, backgroundColor: backgroundColor, objectFit: objectFit = "contain", customControls: customControls = {
|
|
25
|
+
play: !1,
|
|
26
|
+
progress: !0,
|
|
27
|
+
volume: !0,
|
|
28
|
+
fullscreen: !0
|
|
29
|
+
}, onPlay: onPlay, onPause: onPause, onEnd: onEnd, onProgress: onProgress, onLoadProgress: onLoadProgress, onPlaybackRateChange: onPlaybackRateChange, onCanPlayThrough: onCanPlayThrough, onPlayStateChange: onPlayStateChange, onLoadMetaData: onLoadMetaData, onFullScreenChange: onFullScreenChange, onVolumeChange: onVolumeChange, onLoadedFrameData: onLoadedFrameData, onQuit: onQuit} = props, divAttributes = __rest(props, [ "children", "src", "playing", "loop", "muted", "playsInline", "controls", "volume", "poster", "captionsSrc", "playRate", "width", "height", "borderRadius", "borderSize", "borderColor", "backgroundColor", "objectFit", "customControls", "onPlay", "onPause", "onEnd", "onProgress", "onLoadProgress", "onPlaybackRateChange", "onCanPlayThrough", "onPlayStateChange", "onLoadMetaData", "onFullScreenChange", "onVolumeChange", "onLoadedFrameData", "onQuit" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", videoRef = useRef(null), containerRef = useRef(null), progress = useRef(null), wasPlaying = useRef(null != playing && playing), playState = useRef(PlayState.Stopped), [isPlaying, setIsPlaying] = useState(null != playing && playing), [isMuted, setIsMuted] = useState(null != muted && muted), [currentVolume, setCurrentVolume] = useState(null != volume ? volume : 1), [currentProgress, setCurrentProgress] = useState(0), [hovered, setHovered] = useState(!1), timer = useRef(null), handleLoadProgress = useCallback(event => {
|
|
30
|
+
const target = event.target;
|
|
31
|
+
if (target.buffered.length > 0) {
|
|
32
|
+
const bufferedEnd = target.buffered.end(target.buffered.length - 1), duration = target.duration;
|
|
33
|
+
if (duration > 0) {
|
|
34
|
+
null == onLoadProgress || onLoadProgress(bufferedEnd / duration);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, [ onLoadProgress ]), handlePlayProgress = useCallback(event => {
|
|
38
|
+
var _a, _b, _c;
|
|
39
|
+
const target = event.target, percentPlayed = target.currentTime / target.duration;
|
|
40
|
+
if (setCurrentProgress(percentPlayed), progress.current !== percentPlayed) {
|
|
41
|
+
null == onProgress || onProgress(percentPlayed), progress.current = percentPlayed;
|
|
42
|
+
const isAtZero = 0 === (null === (_a = videoRef.current) || void 0 === _a ? void 0 : _a.currentTime), isAtEnd = (null === (_b = videoRef.current) || void 0 === _b ? void 0 : _b.currentTime) === (null === (_c = videoRef.current) || void 0 === _c ? void 0 : _c.duration);
|
|
43
|
+
isAtZero && target.paused ? (playState.current !== PlayState.Stopped && (null == onPlayStateChange || onPlayStateChange(PlayState.Stopped)),
|
|
44
|
+
playState.current = PlayState.Stopped) : isAtEnd ? (playState.current !== PlayState.Ended && (null == onPlayStateChange || onPlayStateChange(PlayState.Ended)),
|
|
45
|
+
playState.current = PlayState.Ended) : target.paused && playState.current !== PlayState.Paused ? (null == onPlayStateChange || onPlayStateChange(PlayState.Paused),
|
|
46
|
+
playState.current = PlayState.Paused) : target.paused || playState.current === PlayState.Playing || (null == onPlayStateChange || onPlayStateChange(PlayState.Playing),
|
|
47
|
+
playState.current = PlayState.Playing);
|
|
48
|
+
}
|
|
49
|
+
}, [ onProgress, onPlayStateChange ]), handleCanPlayThrough = useCallback(() => {
|
|
50
|
+
null == onCanPlayThrough || onCanPlayThrough();
|
|
51
|
+
}, [ onCanPlayThrough ]), handlePlay = useCallback(() => {
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
(null === (_a = videoRef.current) || void 0 === _a ? void 0 : _a.paused) && videoRef.current.play().then(() => null),
|
|
54
|
+
null == onPlay || onPlay(), setIsPlaying(!0);
|
|
55
|
+
(null === (_b = videoRef.current) || void 0 === _b ? void 0 : _b.currentTime) === (null === (_c = videoRef.current) || void 0 === _c ? void 0 : _c.duration) ? (playState.current !== PlayState.Ended && (null == onPlayStateChange || onPlayStateChange(PlayState.Ended)),
|
|
56
|
+
playState.current = PlayState.Ended) : playState.current !== PlayState.Playing && (null == onPlayStateChange || onPlayStateChange(PlayState.Playing),
|
|
57
|
+
playState.current = PlayState.Playing);
|
|
58
|
+
}, [ onPlay, onPlayStateChange ]), handlePause = useCallback(() => {
|
|
59
|
+
var _a, _b, _c;
|
|
60
|
+
null == onPause || onPause(), setIsPlaying(!1);
|
|
61
|
+
const isAtZero = 0 === (null === (_a = videoRef.current) || void 0 === _a ? void 0 : _a.currentTime);
|
|
62
|
+
(null === (_b = videoRef.current) || void 0 === _b ? void 0 : _b.currentTime) === (null === (_c = videoRef.current) || void 0 === _c ? void 0 : _c.duration) || isAtZero || playState.current !== PlayState.Paused && (null == onPlayStateChange || onPlayStateChange(PlayState.Paused),
|
|
63
|
+
playState.current = PlayState.Paused);
|
|
64
|
+
}, [ onPause, onPlayStateChange ]), handleEnd = useCallback(() => {
|
|
65
|
+
null == onEnd || onEnd();
|
|
66
|
+
}, [ onEnd ]), handleLoadMetadata = useCallback(event => {
|
|
67
|
+
const target = event.target;
|
|
68
|
+
null == onLoadMetaData || onLoadMetaData(target.duration);
|
|
69
|
+
}, [ onLoadMetaData ]), handlePlaybackRate = useCallback(event => {
|
|
70
|
+
const playbackRate = event.target.playbackRate;
|
|
71
|
+
null == onPlaybackRateChange || onPlaybackRateChange(playbackRate);
|
|
72
|
+
}, [ onPlaybackRateChange ]), handlePlayClick = useCallback(play => {
|
|
73
|
+
const video = videoRef.current;
|
|
74
|
+
if (!video) return;
|
|
75
|
+
let setPlaying = video.paused;
|
|
76
|
+
void 0 !== play && (setPlaying = play), setPlaying ? video.play().then(() => null).catch(() => null) : video.pause();
|
|
77
|
+
}, []), handleMouseOver = useCallback(() => {
|
|
78
|
+
setHovered(!0), timer.current && clearTimeout(timer.current), timer.current = setTimeout(() => {
|
|
79
|
+
setHovered(!1);
|
|
80
|
+
}, 2e3);
|
|
81
|
+
}, []), handleMouseOut = useCallback(() => {
|
|
82
|
+
timer.current && clearTimeout(timer.current), setHovered(!1);
|
|
83
|
+
}, []), handleFullScreen = useCallback((state = !0) => {
|
|
84
|
+
const video = videoRef.current;
|
|
85
|
+
video && (state ? video.requestFullscreen().catch(() => null) : document.fullscreenElement === video && document.exitFullscreen().catch(() => null));
|
|
86
|
+
}, []), handleMute = useCallback(state => {
|
|
87
|
+
if (!videoRef.current) return;
|
|
88
|
+
let nextMuted = !videoRef.current.muted;
|
|
89
|
+
void 0 !== state && (nextMuted = state), videoRef.current.muted = nextMuted, setIsMuted(nextMuted);
|
|
90
|
+
}, []), handleRateChange = useCallback((rate = 1) => {
|
|
91
|
+
if (!videoRef.current) return;
|
|
92
|
+
let nextRate = rate;
|
|
93
|
+
rate < .5 && (nextRate = .5), rate > 3 && (nextRate = 3), videoRef.current.playbackRate = nextRate;
|
|
94
|
+
}, []), handleRestart = useCallback(() => {
|
|
95
|
+
videoRef.current && (videoRef.current.pause(), videoRef.current.currentTime = 0,
|
|
96
|
+
videoRef.current.play().then(() => null));
|
|
97
|
+
}, []), handleVolumeChange = useCallback((volume = 1) => {
|
|
98
|
+
if (!videoRef.current) return;
|
|
99
|
+
let nextVolume = volume;
|
|
100
|
+
volume < 0 && (nextVolume = 0), volume > 1 && (nextVolume = 1), videoRef.current.volume = nextVolume,
|
|
101
|
+
setCurrentVolume(nextVolume), null == onVolumeChange || onVolumeChange(nextVolume);
|
|
102
|
+
}, [ onVolumeChange ]), handleSetProgress = useCallback(progress => {
|
|
103
|
+
videoRef.current && (wasPlaying.current || (wasPlaying.current = !videoRef.current.paused),
|
|
104
|
+
videoRef.current.pause(), videoRef.current.currentTime = progress * videoRef.current.duration);
|
|
105
|
+
}, []), handleSeekEnd = useCallback(() => {
|
|
106
|
+
wasPlaying.current && (handlePlayClick(!0), wasPlaying.current = !1);
|
|
107
|
+
}, [ handlePlayClick ]), handleFullScreenChange = useCallback(() => {
|
|
108
|
+
const isFullscreen = document.fullscreenElement === videoRef.current;
|
|
109
|
+
null == onFullScreenChange || onFullScreenChange(isFullscreen);
|
|
110
|
+
}, [ onFullScreenChange ]), handleLoadedFrame = useCallback(() => {
|
|
111
|
+
null == onLoadedFrameData || onLoadedFrameData();
|
|
112
|
+
}, [ onLoadedFrameData ]);
|
|
113
|
+
React.useImperativeHandle(ref, () => ({
|
|
114
|
+
play: () => __awaiter(void 0, void 0, void 0, function*() {
|
|
115
|
+
handlePlayClick(!0);
|
|
116
|
+
}),
|
|
117
|
+
stop: () => __awaiter(void 0, void 0, void 0, function*() {
|
|
118
|
+
handlePlayClick(!1);
|
|
119
|
+
}),
|
|
120
|
+
restart: () => __awaiter(void 0, void 0, void 0, function*() {
|
|
121
|
+
handleRestart();
|
|
122
|
+
}),
|
|
123
|
+
setVolume: volume => {
|
|
124
|
+
handleVolumeChange(volume);
|
|
125
|
+
},
|
|
126
|
+
mute: mute => {
|
|
127
|
+
handleMute(mute);
|
|
128
|
+
},
|
|
129
|
+
fullscreen: state => {
|
|
130
|
+
handleFullScreen(state);
|
|
131
|
+
},
|
|
132
|
+
playbackRate: rate => {
|
|
133
|
+
handleRateChange(rate);
|
|
134
|
+
},
|
|
135
|
+
get videoElement() {
|
|
136
|
+
var _a;
|
|
137
|
+
return null !== (_a = videoRef.current) && void 0 !== _a ? _a : void 0;
|
|
138
|
+
}
|
|
139
|
+
}), [ handlePlayClick, handleRestart, handleMute, handleFullScreen, handleRateChange, handleVolumeChange ]);
|
|
140
|
+
const showCustomControls = useMemo(() => "default" !== controls && "none" !== controls, [ controls ]), cssVars = useMemo(() => ({
|
|
141
|
+
"--video-width": setStyle(width, "unset"),
|
|
142
|
+
"--video-height": setStyle(height, "unset"),
|
|
143
|
+
"--video-border-radius": setStyle(borderRadius, 0),
|
|
144
|
+
"--video-border-size": setStyle(borderSize, 0),
|
|
145
|
+
"--video-border-color": setStyle(borderColor, "transparent"),
|
|
146
|
+
"--video-bg-color": setStyle(backgroundColor, "transparent"),
|
|
147
|
+
"--video-object-fit": null != objectFit ? objectFit : "contain",
|
|
148
|
+
"--video-controls-pointer-events": hovered ? "auto" : "none",
|
|
149
|
+
"--video-controls-opacity": hovered ? 1 : 0,
|
|
150
|
+
"--video-progress-padding-left": customControls.quit ? "8px" : "16px"
|
|
151
|
+
}), [ width, height, borderRadius, borderSize, borderColor, backgroundColor, objectFit, hovered, customControls.quit ]), speakerIcon = useMemo(() => isMuted || 0 === currentVolume ? "speaker muted" : "speaker", [ isMuted, currentVolume ]);
|
|
152
|
+
return useEffect(() => handleRateChange(playRate), [ playRate, handleRateChange ]),
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
void 0 !== playing && handlePlayClick(playing);
|
|
155
|
+
}, [ playing, handlePlayClick ]), useEffect(() => handleMute(muted), [ muted, handleMute ]),
|
|
156
|
+
useEffect(() => handleVolumeChange(volume), [ volume, handleVolumeChange ]), useEffect(() => {
|
|
157
|
+
var _a, _b;
|
|
158
|
+
return null === (_a = videoRef.current) || void 0 === _a || _a.addEventListener("seeked", handleSeekEnd),
|
|
159
|
+
null === (_b = videoRef.current) || void 0 === _b || _b.addEventListener("loadeddata", handleLoadedFrame),
|
|
160
|
+
document.addEventListener("fullscreenchange", handleFullScreenChange), () => {
|
|
161
|
+
var _a, _b;
|
|
162
|
+
null === (_a = videoRef.current) || void 0 === _a || _a.removeEventListener("seeked", handleSeekEnd),
|
|
163
|
+
null === (_b = videoRef.current) || void 0 === _b || _b.removeEventListener("loadeddata", handleLoadedFrame),
|
|
164
|
+
document.removeEventListener("fullscreenchange", handleFullScreenChange);
|
|
165
|
+
};
|
|
166
|
+
}, [ handleSeekEnd, handleFullScreenChange, handleLoadedFrame ]), jsxs("div", Object.assign({
|
|
167
|
+
id: divId,
|
|
168
|
+
ref: containerRef,
|
|
169
|
+
className: `${css_wrapper}${divClass}`,
|
|
170
|
+
style: Object.assign(Object.assign({}, cssVars), divStyle),
|
|
171
|
+
onMouseEnter: handleMouseOver,
|
|
172
|
+
onMouseLeave: handleMouseOut,
|
|
173
|
+
onBlur: handleMouseOut,
|
|
174
|
+
onFocus: handleMouseOver,
|
|
175
|
+
onMouseMove: handleMouseOver
|
|
176
|
+
}, rest, {
|
|
177
|
+
children: [ showCustomControls && jsxs("div", {
|
|
178
|
+
className: css_controls,
|
|
179
|
+
children: [ !children && "simple" === controls && jsxs("div", {
|
|
180
|
+
className: css_controls,
|
|
181
|
+
children: [ jsxs("div", {
|
|
182
|
+
className: css_controlsHeader,
|
|
183
|
+
children: [ customControls.fullscreen && jsx("div", {
|
|
184
|
+
className: css_left,
|
|
185
|
+
children: jsx(IconButton, {
|
|
186
|
+
icon: "fullscreen",
|
|
187
|
+
iconFill: !0,
|
|
188
|
+
buttonSize: "m",
|
|
189
|
+
iconSize: 18,
|
|
190
|
+
bgColor: "rgba(255,255,255,0.05)",
|
|
191
|
+
bgColorHover: "rgba(0,0,0,0.7)",
|
|
192
|
+
iconColor: "var(--core-text-light)",
|
|
193
|
+
iconColorHover: "var(--core-text-light)",
|
|
194
|
+
onClick: () => handleFullScreen(!0)
|
|
195
|
+
})
|
|
196
|
+
}), customControls.volume && jsxs("div", {
|
|
197
|
+
className: css_right,
|
|
198
|
+
children: [ jsx(IconButton, {
|
|
199
|
+
icon: speakerIcon,
|
|
200
|
+
iconFill: !0,
|
|
201
|
+
buttonSize: "m",
|
|
202
|
+
iconSize: 20,
|
|
203
|
+
bgColor: "rgba(255,255,255,0.05)",
|
|
204
|
+
bgColorHover: "rgba(0,0,0,0.7)",
|
|
205
|
+
bgColorOn: "rgba(0,0,0,0.5)",
|
|
206
|
+
iconColor: "var(--core-text-light)",
|
|
207
|
+
iconColorHover: "var(--core-text-light)",
|
|
208
|
+
onClick: () => handleMute()
|
|
209
|
+
}), jsx(Slider, {
|
|
210
|
+
trackColor: "rgba(0,0,0,0.5)",
|
|
211
|
+
progressColor: "var(--core-text-light)",
|
|
212
|
+
trackHeadSize: 16,
|
|
213
|
+
trackHeadBorderSize: 0,
|
|
214
|
+
scaleMax: 1,
|
|
215
|
+
scaleMin: 0,
|
|
216
|
+
value: currentVolume,
|
|
217
|
+
onChange: value => handleVolumeChange(value)
|
|
218
|
+
}) ]
|
|
219
|
+
}) ]
|
|
220
|
+
}), jsx("div", {
|
|
221
|
+
className: css_controlsBody,
|
|
222
|
+
children: customControls.play && jsx(ToggleButton, {
|
|
223
|
+
selected: isPlaying,
|
|
224
|
+
icon: "play",
|
|
225
|
+
iconOn: "pause",
|
|
226
|
+
iconSize: 48,
|
|
227
|
+
buttonSize: "xl",
|
|
228
|
+
bgColor: "rgba(0,0,0,0.5)",
|
|
229
|
+
bgColorHover: "rgba(0,0,0,0.7)",
|
|
230
|
+
bgColorOn: "rgba(0,0,0,0.5)",
|
|
231
|
+
iconColor: "var(--core-text-light)",
|
|
232
|
+
iconColorOn: "var(--core-text-light)",
|
|
233
|
+
iconColorHover: "var(--core-text-light)",
|
|
234
|
+
onChange: () => handlePlayClick()
|
|
235
|
+
})
|
|
236
|
+
}), jsx("div", {
|
|
237
|
+
className: css_controlsFooter,
|
|
238
|
+
children: customControls.progress && jsxs("div", {
|
|
239
|
+
className: css_progress,
|
|
240
|
+
children: [ jsx(ToggleButton, {
|
|
241
|
+
selected: isPlaying,
|
|
242
|
+
icon: "play",
|
|
243
|
+
iconOn: "pause",
|
|
244
|
+
buttonSize: "m",
|
|
245
|
+
iconSize: 28,
|
|
246
|
+
bgColor: "rgba(255,255,255,0.05)",
|
|
247
|
+
bgColorHover: "rgba(0,0,0,0.7)",
|
|
248
|
+
bgColorOn: "rgba(255,255,255,0.05)",
|
|
249
|
+
iconColor: "var(--core-text-light)",
|
|
250
|
+
iconColorHover: "var(--core-text-light)",
|
|
251
|
+
iconColorOn: "var(--core-text-light)",
|
|
252
|
+
onChange: () => handlePlayClick()
|
|
253
|
+
}), jsx(Slider, {
|
|
254
|
+
trackColor: "rgba(0,0,0,0.5)",
|
|
255
|
+
progressColor: "var(--core-text-light)",
|
|
256
|
+
trackHeadSize: 16,
|
|
257
|
+
trackHeadBorderSize: 0,
|
|
258
|
+
scaleMax: 1,
|
|
259
|
+
scaleMin: 0,
|
|
260
|
+
value: currentProgress,
|
|
261
|
+
onChange: handleSetProgress,
|
|
262
|
+
width: "100%"
|
|
263
|
+
}), customControls.quit && jsx(IconButton, {
|
|
264
|
+
toggle: !1,
|
|
265
|
+
icon: "x",
|
|
266
|
+
buttonSize: "m",
|
|
267
|
+
bgColor: "rgba(255,255,255,0.05)",
|
|
268
|
+
bgColorHover: "rgba(0,0,0,0.7)",
|
|
269
|
+
bgColorOn: "rgba(255,255,255,0.05)",
|
|
270
|
+
iconColor: "var(--core-text-light)",
|
|
271
|
+
iconColorHover: "var(--core-text-light)",
|
|
272
|
+
iconColorOn: "var(--core-text-light)",
|
|
273
|
+
onClick: () => null == onQuit ? void 0 : onQuit()
|
|
274
|
+
}) ]
|
|
275
|
+
})
|
|
276
|
+
}) ]
|
|
277
|
+
}), "custom" === controls && children ]
|
|
278
|
+
}), jsx("video", {
|
|
279
|
+
ref: videoRef,
|
|
280
|
+
src: src,
|
|
281
|
+
autoPlay: !1,
|
|
282
|
+
playsInline: playsInline,
|
|
283
|
+
loop: loop,
|
|
284
|
+
muted: isMuted,
|
|
285
|
+
controls: "default" === controls,
|
|
286
|
+
poster: poster,
|
|
287
|
+
onCanPlayThrough: handleCanPlayThrough,
|
|
288
|
+
onPlay: handlePlay,
|
|
289
|
+
onPause: handlePause,
|
|
290
|
+
onEnded: handleEnd,
|
|
291
|
+
onProgress: handleLoadProgress,
|
|
292
|
+
onTimeUpdate: handlePlayProgress,
|
|
293
|
+
onRateChange: handlePlaybackRate,
|
|
294
|
+
onLoadedMetadata: handleLoadMetadata,
|
|
295
|
+
className: css_video,
|
|
296
|
+
children: jsx("track", {
|
|
297
|
+
kind: "captions",
|
|
298
|
+
src: captionsSrc
|
|
299
|
+
})
|
|
300
|
+
}) ]
|
|
301
|
+
}));
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
BaseVideo.displayName = "Video";
|
|
305
|
+
|
|
306
|
+
const Video = React.memo(BaseVideo);
|
|
307
|
+
|
|
308
|
+
export { Video as V };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-snMG2wnR.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import { useDragControls, AnimatePresence, motion } from "motion/react";
|
|
7
|
+
|
|
8
|
+
import { useRef, useState, useEffect, useMemo } from "react";
|
|
9
|
+
|
|
10
|
+
import "./microphoneStore-BGWQI4OG.mjs";
|
|
11
|
+
|
|
12
|
+
import "./volumeStore-C-Iat9Bn.mjs";
|
|
13
|
+
|
|
14
|
+
import "./webRTCStore-CWIDJL7j.mjs";
|
|
15
|
+
|
|
16
|
+
import { s as setStyle } from "./misc-BCwU6qLj.mjs";
|
|
17
|
+
|
|
18
|
+
import { I as IconButton } from "./IconButton-DfXCtxO7.mjs";
|
|
19
|
+
|
|
20
|
+
import { O as Overlay } from "./Overlay-o7rQtTk-.mjs";
|
|
21
|
+
|
|
22
|
+
import { u as useVideo, a as useVideoActions } from "./videoStore-CZfHgy1p.mjs";
|
|
23
|
+
|
|
24
|
+
var css_container = "VideoController-module_container__wNiGy", css_box = "VideoController-module_box__a0PRD", css_wrapper = "VideoController-module_wrapper__RhpUo", css_video = "VideoController-module_video__9bS2L";
|
|
25
|
+
|
|
26
|
+
const defaultTransition = {
|
|
27
|
+
ease: "easeOut",
|
|
28
|
+
duration: .25,
|
|
29
|
+
delay: .1
|
|
30
|
+
}, defaultVariants = {
|
|
31
|
+
initial: {
|
|
32
|
+
opacity: 0
|
|
33
|
+
},
|
|
34
|
+
animate: {
|
|
35
|
+
opacity: 1
|
|
36
|
+
},
|
|
37
|
+
exit: {
|
|
38
|
+
opacity: 0
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
function VideoController(props) {
|
|
43
|
+
var _a;
|
|
44
|
+
const {dragConstraintsRef: dragConstraintsRef, transition: transition = defaultTransition, variants: variants = defaultVariants, initial: initial = "initial", animate: animate = "animate", exit: exit = "exit", draggable: draggable = !0, overlayOpacity: overlayOpacity = .7, overlayColor: overlayColor = "rgb(0,0,0)", padding: padding = 64, borderRadius: borderRadius = 8, quit: quit = "inline", onQuit: onQuit} = props, controls = useDragControls(), video = useVideo(), hide = useVideoActions().clear, VideoComponent = null == video ? void 0 : video.component, _b = null !== (_a = null == video ? void 0 : video.props) && void 0 !== _a ? _a : {}, {onLoadedFrameData: onLoadedFrameData, borderRadius: videoBorderRadius} = _b, videoProps = __rest(_b, [ "onLoadedFrameData", "borderRadius" ]), ref = useRef(null), constraints = null != dragConstraintsRef ? dragConstraintsRef : ref, [ready, setReady] = useState(!1);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
(null == video ? void 0 : video.id) && setReady(!1);
|
|
47
|
+
}, [ null == video ? void 0 : video.id ]);
|
|
48
|
+
const handleHide = () => {
|
|
49
|
+
setReady(!1), hide(), null == onQuit || onQuit();
|
|
50
|
+
}, cssVars = useMemo(() => ({
|
|
51
|
+
"--overlay-padding": setStyle(padding, 64),
|
|
52
|
+
"--video-visibility": ready ? "visible" : "hidden",
|
|
53
|
+
"--video-border-radius": setStyle(borderRadius, 8)
|
|
54
|
+
}), [ padding, ready, borderRadius ]);
|
|
55
|
+
return jsxs(Fragment, {
|
|
56
|
+
children: [ jsx(Overlay, {
|
|
57
|
+
show: !!video,
|
|
58
|
+
type: "dark",
|
|
59
|
+
opacity: overlayOpacity,
|
|
60
|
+
color: overlayColor,
|
|
61
|
+
onClick: handleHide
|
|
62
|
+
}), jsx(AnimatePresence, {
|
|
63
|
+
initial: !1,
|
|
64
|
+
children: video && VideoComponent && jsx("div", {
|
|
65
|
+
className: css_container,
|
|
66
|
+
ref: ref,
|
|
67
|
+
style: cssVars,
|
|
68
|
+
children: jsx("div", {
|
|
69
|
+
className: css_box,
|
|
70
|
+
children: jsxs(motion.div, {
|
|
71
|
+
className: css_wrapper,
|
|
72
|
+
variants: variants,
|
|
73
|
+
initial: initial,
|
|
74
|
+
animate: animate,
|
|
75
|
+
exit: exit,
|
|
76
|
+
transition: transition,
|
|
77
|
+
drag: draggable,
|
|
78
|
+
dragListener: !draggable && void 0,
|
|
79
|
+
dragControls: draggable ? controls : void 0,
|
|
80
|
+
dragConstraints: draggable ? constraints : void 0,
|
|
81
|
+
dragElastic: draggable ? 0 : void 0,
|
|
82
|
+
dragMomentum: !draggable && void 0,
|
|
83
|
+
children: [ jsx("div", {
|
|
84
|
+
className: css_video,
|
|
85
|
+
children: jsx(VideoComponent, Object.assign({}, videoProps, {
|
|
86
|
+
borderRadius: null != borderRadius ? borderRadius : videoBorderRadius,
|
|
87
|
+
onLoadedFrameData: () => {
|
|
88
|
+
setReady(!0), null == onLoadedFrameData || onLoadedFrameData();
|
|
89
|
+
},
|
|
90
|
+
customControls: Object.assign(Object.assign({}, videoProps.customControls), {
|
|
91
|
+
quit: "inside" === quit
|
|
92
|
+
}),
|
|
93
|
+
onQuit: () => handleHide()
|
|
94
|
+
}))
|
|
95
|
+
}), "outside" === quit && jsx(IconButton, {
|
|
96
|
+
icon: "x",
|
|
97
|
+
buttonSize: "l",
|
|
98
|
+
onClick: handleHide,
|
|
99
|
+
bgColor: "rgba(255,255,255,0.05)",
|
|
100
|
+
bgColorHover: "rgba(255,255,255,0.25)",
|
|
101
|
+
iconColor: "var(--core-text-light)",
|
|
102
|
+
iconColorHover: "var(--core-text-light)"
|
|
103
|
+
}) ]
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
}) ]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { VideoController as V };
|
|
@@ -41,7 +41,11 @@ const SliceIcons = {
|
|
|
41
41
|
speaker: "speaker",
|
|
42
42
|
speakerMuted: "speaker muted",
|
|
43
43
|
speakerHigh: "speaker high",
|
|
44
|
-
speakerLow: "speaker low"
|
|
44
|
+
speakerLow: "speaker low",
|
|
45
|
+
play: "play",
|
|
46
|
+
playCircle: "play circle",
|
|
47
|
+
pause: "pause",
|
|
48
|
+
pauseCircle: "pause circle"
|
|
45
49
|
},
|
|
46
50
|
files: {
|
|
47
51
|
document: "document",
|
|
@@ -82,7 +86,8 @@ const SliceIcons = {
|
|
|
82
86
|
googleMono: "google mono",
|
|
83
87
|
linkedin: "linkedin",
|
|
84
88
|
github: "github",
|
|
85
|
-
npm: "npm"
|
|
89
|
+
npm: "npm",
|
|
90
|
+
openAI: "openAI"
|
|
86
91
|
},
|
|
87
92
|
edit: {
|
|
88
93
|
edit: "edit",
|
|
@@ -126,7 +131,8 @@ const SliceIcons = {
|
|
|
126
131
|
sidebar: "sidebar",
|
|
127
132
|
sidebarSplit: "sidebar split",
|
|
128
133
|
keyboard: "keyboard",
|
|
129
|
-
x: "x"
|
|
134
|
+
x: "x",
|
|
135
|
+
fullscreen: "fullscreen"
|
|
130
136
|
}
|
|
131
137
|
};
|
|
132
138
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __awaiter, _ as __rest } from "./tslib.es6-
|
|
1
|
+
import { a as __awaiter, _ as __rest } from "./tslib.es6-snMG2wnR.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-FKrpsWT5.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));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { create } from "zustand";
|
|
2
2
|
|
|
3
|
-
import "./tslib.es6-
|
|
3
|
+
import "./tslib.es6-snMG2wnR.mjs";
|
|
4
4
|
|
|
5
|
-
import { S as SSEConnection } from "./SSEConnection-
|
|
5
|
+
import { S as SSEConnection } from "./SSEConnection-dWPQXa3J.mjs";
|
|
6
6
|
|
|
7
7
|
const useSSEStore = create((set, get) => ({
|
|
8
8
|
connections: [],
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { create } from "zustand";
|
|
2
|
+
|
|
3
|
+
const useVideoStore = create((set, get) => ({
|
|
4
|
+
video: null,
|
|
5
|
+
actions: {
|
|
6
|
+
show: video => {
|
|
7
|
+
get().video !== video && set({
|
|
8
|
+
video: video
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
clear: () => {
|
|
12
|
+
set({
|
|
13
|
+
video: null
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
})), useVideo = () => useVideoStore(state => state.video), useVideoActions = () => useVideoStore(state => state.actions), videoActions = useVideoStore.getState().actions, getVideo = () => useVideoStore.getState().video;
|
|
18
|
+
|
|
19
|
+
export { useVideoActions as a, useVideoStore as b, getVideo as g, useVideo as u, videoActions as v };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as __awaiter } from "./tslib.es6-
|
|
1
|
+
import { a as __awaiter } from "./tslib.es6-snMG2wnR.mjs";
|
|
2
2
|
|
|
3
3
|
import { create } from "zustand";
|
|
4
4
|
|
|
5
|
-
import { W as WebRTCConnection } from "./WebRTCConnection-
|
|
5
|
+
import { W as WebRTCConnection } from "./WebRTCConnection-_zBzV614.mjs";
|
|
6
6
|
|
|
7
7
|
const useWebRTCStore = create((set, get) => ({
|
|
8
8
|
connections: [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AudioBubble } from "../../chunks/AudioBubble-
|
|
1
|
+
export { A as AudioBubble } from "../../chunks/AudioBubble-iizzoWYu.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-snMG2wnR.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -24,12 +24,18 @@ import "../../theme/type.mjs";
|
|
|
24
24
|
|
|
25
25
|
import "../../hooks/useObserveTheme.mjs";
|
|
26
26
|
|
|
27
|
-
import "../../chunks/colors-
|
|
27
|
+
import "../../chunks/colors-BlWPMqVw.mjs";
|
|
28
28
|
|
|
29
|
-
import "../../chunks/audioVisualizer-
|
|
29
|
+
import "../../chunks/audioVisualizer-CEutpKkb.mjs";
|
|
30
30
|
|
|
31
|
-
import "../../chunks/
|
|
31
|
+
import "../../chunks/webRTCStore-CWIDJL7j.mjs";
|
|
32
32
|
|
|
33
33
|
import "zustand";
|
|
34
34
|
|
|
35
|
+
import "../../chunks/WebRTCConnection-_zBzV614.mjs";
|
|
36
|
+
|
|
37
|
+
import "../../chunks/microphoneStore-BGWQI4OG.mjs";
|
|
38
|
+
|
|
39
|
+
import "../../chunks/volumeStore-C-Iat9Bn.mjs";
|
|
40
|
+
|
|
35
41
|
import "../../hooks/useWindow.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { A as Avatar } from "../../chunks/Avatar-
|
|
1
|
+
export { A as Avatar } from "../../chunks/Avatar-DubrdG84.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-snMG2wnR.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-BCwU6qLj.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { A as AvatarGroup } from "../../chunks/AvatarGroup-
|
|
1
|
+
export { A as AvatarGroup } from "../../chunks/AvatarGroup-BgRuyywS.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-snMG2wnR.mjs";
|
|
4
4
|
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
import "react";
|
|
8
8
|
|
|
9
|
-
import "../../chunks/Avatar-
|
|
9
|
+
import "../../chunks/Avatar-DubrdG84.mjs";
|
|
10
10
|
|
|
11
|
-
import "../../chunks/misc-
|
|
11
|
+
import "../../chunks/misc-BCwU6qLj.mjs";
|