@apple-pie/slice 0.1.45 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chunks/{AudioBubble-DSKLRflw.js → AudioBubble-7MRDr6oW.js} +5 -3
- package/dist/cjs/chunks/{Avatar-CFcsdTuN.js → Avatar-BEQvuKXB.js} +1 -1
- package/dist/cjs/chunks/{AvatarGroup-CMd6AE9B.js → AvatarGroup-BBigZoAv.js} +1 -1
- package/dist/cjs/chunks/{Badge-C__w6y3X.js → Badge-BvSSeAAt.js} +1 -1
- package/dist/cjs/chunks/{Button-BLdW3YU9.js → Button-DXQNFBaZ.js} +1 -1
- package/dist/cjs/chunks/{ButtonBar-CL4kiqgc.js → ButtonBar-BXo6dNuf.js} +1 -1
- package/dist/cjs/chunks/{Camera-BmLMOBRg.js → Camera-BPQ1yF3e.js} +6 -4
- package/dist/cjs/chunks/{CheckBox-Cihl0IrF.js → CheckBox-OnTqLOoy.js} +1 -1
- package/dist/cjs/chunks/{Chip-BfD_0Cig.js → Chip-ekl1KQ93.js} +1 -1
- package/dist/cjs/chunks/{DivInput-LIJ7zv8H.js → DivInput-D3SEX8J9.js} +1 -1
- package/dist/cjs/chunks/{Dot-Bj2a76Ta.js → Dot-03FuwY2T.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-CqzMpyGs.js → DrggablePanel-CzMav9ix.js} +5 -3
- package/dist/cjs/chunks/{DropDown-pWYMxruM.js → DropDown-DZmhSeRX.js} +1 -1
- package/dist/cjs/chunks/{ErrorSummary-ClLL68U3.js → ErrorSummary-DWQIY4M8.js} +5 -3
- package/dist/cjs/chunks/{FileIcon-z21zrEc2.js → FileIcon-CtEGJMf1.js} +5 -4
- package/dist/cjs/chunks/{FileList-qY-irjP-.js → FileList-31XpLMih.js} +1 -1
- package/dist/cjs/chunks/{FlexDiv-DgR6u9Jv.js → FlexDiv-CC6KADWm.js} +1 -1
- package/dist/cjs/chunks/{Grouper-DeYMKA1T.js → Grouper-B9qnrP-4.js} +4 -3
- package/dist/cjs/chunks/{Icon-tc6LQovS.js → Icon-CiZuv_Ch.js} +5 -3
- package/dist/cjs/chunks/{IconButton-LoaWO9zY.js → IconButton-C6ZUdM8z.js} +1 -1
- package/dist/cjs/chunks/{IndexedDB-CYqvMLuZ.js → IndexedDB-DFFn9mqX.js} +1 -1
- package/dist/cjs/chunks/{Label-T84i3rWo.js → Label-B7bBplmn.js} +1 -1
- package/dist/cjs/chunks/{Level-OEsy5yT2.js → Level-DwSesAi0.js} +5 -1
- package/dist/cjs/chunks/{Modal-DqXuXPge.js → Modal-BPPojCas.js} +1 -1
- package/dist/cjs/chunks/{ModalController-C91kCSxO.js → ModalController-BGEq6nZW.js} +3 -2
- package/dist/cjs/chunks/{Overlay-D3QPWT8O.js → Overlay-BTyVHmZi.js} +1 -1
- package/dist/cjs/chunks/{Pager-CLtuO3Sv.js → Pager-CyJRXuXt.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-DI1fY8vp.js → ProgressIndicator-DywiCVkO.js} +5 -3
- package/dist/cjs/chunks/{PromptInput-BMnpfTXt.js → PromptInput-Cg5z8XMK.js} +6 -4
- package/dist/cjs/chunks/{RadioButton-CzkQTfqG.js → RadioButton-3LQ__XHx.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-CVkww1_P.js → RadioButtonList-CCmGGzhD.js} +1 -1
- package/dist/cjs/chunks/{Slider-9ze6h-KZ.js → Slider-DEvyBgim.js} +5 -3
- package/dist/cjs/chunks/{Spacer-DuipTdw1.js → Spacer-DzKg1JZN.js} +1 -1
- package/dist/cjs/chunks/{Switch-Bug1jQu4.js → Switch-BCnrGlFd.js} +1 -1
- package/dist/cjs/chunks/{TabBar-CLDId1LR.js → TabBar-tawvDdQ9.js} +6 -4
- package/dist/cjs/chunks/{TextArea-DyQZBTPs.js → TextArea-BCmck_Bu.js} +1 -1
- package/dist/cjs/chunks/{TextField-BR-pQK87.js → TextField-D0ig3i5Z.js} +6 -4
- package/dist/cjs/chunks/{Tip-BvGX_YgV.js → Tip-DPAa_tZz.js} +1 -1
- package/dist/cjs/chunks/{Toast-D7pGWE3h.js → Toast-CjSm6wKq.js} +6 -4
- package/dist/cjs/chunks/{ToggleButton-8NaB4UUl.js → ToggleButton-cNIopPE-.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-G-mBqjb7.js → UploadArea-DoJuVudV.js} +1 -1
- package/dist/cjs/chunks/{Video-Ba3wg6jb.js → Video-M1-jtah8.js} +1 -1
- package/dist/cjs/chunks/{VideoController-BKzIJmMa.js → VideoController-Cghf-ihF.js} +4 -3
- package/dist/cjs/chunks/{WSConnection-DMrqNo3k.js → WSConnection-BERcrJfr.js} +1 -1
- package/dist/cjs/chunks/{WebRTCConnection-DNnDh6-M.js → WebRTCConnection-Dd5i5Vsn.js} +1 -1
- package/dist/cjs/chunks/broadcastChannel-D1XhG6Q1.js +75 -0
- package/dist/cjs/chunks/browserChannelsStore-CPJhMFtD.js +96 -0
- package/dist/cjs/chunks/{localDBStore-BTA4H5xb.js → localDBStore-CzLeudjH.js} +4 -2
- package/dist/cjs/chunks/{microphoneStore-Gd9Pi7xk.js → microphoneStore-BkaENcMx.js} +1 -1
- package/dist/cjs/chunks/{misc-DwqTFwbJ.js → misc-BzvE_9R_.js} +1 -1
- package/dist/cjs/chunks/{sseStore-BLzihLI9.js → sseStore-C9XlDamt.js} +4 -2
- package/dist/cjs/chunks/{uploads-worker-b6jenaeT.js → uploads-worker-ZLJR3WZA.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-BdD0blGO.js → uploadsStore-xzGjSmYP.js} +2 -2
- package/dist/cjs/chunks/{viewState-DgJIoERG.js → viewState-6P26uORS.js} +6 -4
- package/dist/cjs/chunks/{volumeStore-BU9B-kDV.js → volumeStore-D5uQzCPQ.js} +1 -1
- package/dist/cjs/chunks/{webRTCStore-U1mlk90q.js → webRTCStore-CgLUjMDH.js} +3 -1
- package/dist/cjs/chunks/{windowStore-qDiDW4v-.js → windowStore-De7LtHFd.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +6 -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 +6 -5
- package/dist/cjs/components/Camera/index.js +8 -7
- package/dist/cjs/components/CheckBox/index.js +6 -5
- package/dist/cjs/components/Chip/index.js +7 -6
- package/dist/cjs/components/DataTable/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 +6 -5
- package/dist/cjs/components/DropDown/index.js +6 -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 +7 -6
- 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 -8
- package/dist/cjs/components/Label/index.js +3 -3
- package/dist/cjs/components/Level/index.js +4 -4
- package/dist/cjs/components/Modal/index.js +10 -9
- package/dist/cjs/components/ModalController/index.js +6 -5
- 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 +6 -5
- package/dist/cjs/components/PromptInput/index.js +10 -9
- package/dist/cjs/components/RadioButton/index.js +6 -5
- package/dist/cjs/components/RadioButtonList/index.js +7 -6
- package/dist/cjs/components/Slider/index.js +6 -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 -8
- package/dist/cjs/components/TextArea/index.js +9 -8
- package/dist/cjs/components/Textfield/index.js +10 -9
- package/dist/cjs/components/Tip/index.js +3 -3
- package/dist/cjs/components/Toast/index.js +7 -6
- package/dist/cjs/components/ToggleButton/index.js +9 -8
- package/dist/cjs/components/UploadArea/index.js +8 -7
- package/dist/cjs/components/Video/index.js +12 -11
- package/dist/cjs/components/VideoController/index.js +10 -9
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +3 -2
- package/dist/cjs/hooks/useClipboard.js +127 -0
- package/dist/cjs/hooks/useMdStreamBuffer.js +2 -2
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +7 -5
- package/dist/cjs/index.js +14 -12
- package/dist/cjs/stores/LocalDB.js +6 -6
- package/dist/cjs/stores/SSE.js +6 -5
- package/dist/cjs/stores/WS.js +4 -2
- package/dist/cjs/stores/WebRTC.js +6 -6
- package/dist/cjs/stores/browserChannel.js +10 -0
- 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 +1 -1
- package/dist/cjs/stores/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +47 -41
- package/dist/cjs/utils/index.js +9 -3
- package/dist/cjs/utils/objects/index.js +9 -3
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/esm/chunks/{AudioBubble-C8RHNRZ_.mjs → AudioBubble-sDq1KbG4.mjs} +9 -5
- package/dist/esm/chunks/{Avatar-B5dBNLzt.mjs → Avatar-CgH69dGS.mjs} +2 -2
- package/dist/esm/chunks/{AvatarGroup-CXIojYDR.mjs → AvatarGroup-CVcONno4.mjs} +2 -2
- package/dist/esm/chunks/{Badge-CMEuRMVe.mjs → Badge-V0fkzlfk.mjs} +1 -1
- package/dist/esm/chunks/{Button-DvW5z2Fy.mjs → Button-CL0LKJDc.mjs} +6 -6
- package/dist/esm/chunks/{ButtonBar-CFxfVpe3.mjs → ButtonBar-BPLc12tE.mjs} +3 -3
- package/dist/esm/chunks/{Camera-BV_CFREh.mjs → Camera-D6KBmxd_.mjs} +11 -7
- package/dist/esm/chunks/{CheckBox-DHFFL-Jq.mjs → CheckBox-iVGppX1l.mjs} +3 -3
- package/dist/esm/chunks/{Chip-Cuh20guW.mjs → Chip-DO5g84bY.mjs} +4 -4
- package/dist/esm/chunks/{DivInput-BxW5ri5Q.mjs → DivInput-D5m-4myl.mjs} +2 -2
- package/dist/esm/chunks/{Dot-zriuPgn8.mjs → Dot-sfjq9c6Z.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-hAxQGwCH.mjs → DrggablePanel-IO_BrX30.mjs} +8 -4
- package/dist/esm/chunks/{DropDown-B0CYM8o5.mjs → DropDown-BBLh_fWy.mjs} +3 -3
- package/dist/esm/chunks/{ErrorSummary-I17C5u75.mjs → ErrorSummary-B0YJ3i5i.mjs} +8 -4
- package/dist/esm/chunks/{FileIcon-CuIzwDJs.mjs → FileIcon-hM81mI8u.mjs} +8 -4
- package/dist/esm/chunks/{FileList-DhitNTMJ.mjs → FileList-BCkq2RDu.mjs} +5 -5
- package/dist/esm/chunks/{FlexDiv-DMXeGSEr.mjs → FlexDiv-DXMUnFLf.mjs} +1 -1
- package/dist/esm/chunks/{Grouper-BfkNOB5K.mjs → Grouper-16TyXy09.mjs} +9 -5
- package/dist/esm/chunks/{Icon-QUVzyYBt.mjs → Icon-DfeRt_ez.mjs} +8 -4
- package/dist/esm/chunks/{IconButton-DIodt9r2.mjs → IconButton-VzkyqbvH.mjs} +5 -5
- package/dist/esm/chunks/{IndexedDB-DHk5y9UO.mjs → IndexedDB-Dr5zANnZ.mjs} +1 -1
- package/dist/esm/chunks/{Label-DlYEhytS.mjs → Label-D1Z4Zouo.mjs} +2 -2
- package/dist/esm/chunks/{Level-BpxVLm1m.mjs → Level-ChdkPG6_.mjs} +5 -3
- package/dist/esm/chunks/{Modal-Dg3jWsON.mjs → Modal-C7n04R_z.mjs} +5 -5
- package/dist/esm/chunks/{ModalController-CDaKXxq3.mjs → ModalController-oB5b930d.mjs} +6 -4
- package/dist/esm/chunks/{Overlay-DfkhMYtD.mjs → Overlay-DX_g-1OP.mjs} +1 -1
- package/dist/esm/chunks/{Pager-C4aHLVBY.mjs → Pager-Bz0p-nkX.mjs} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-BrLB_HEn.mjs → ProgressIndicator-Cx1alCaM.mjs} +8 -4
- package/dist/esm/chunks/{PromptInput-BLs3B_Um.mjs → PromptInput-Cw7w2DJk.mjs} +10 -6
- package/dist/esm/chunks/{RadioButton-lGkQ2BjR.mjs → RadioButton-DNi4HZSs.mjs} +3 -3
- package/dist/esm/chunks/{RadioButtonList-Dwdbj7oq.mjs → RadioButtonList-DuOqut1l.mjs} +3 -3
- package/dist/esm/chunks/{Slider-C5FcSmsD.mjs → Slider-DESg64FR.mjs} +9 -5
- package/dist/esm/chunks/{Spacer-CUub-zd9.mjs → Spacer-yLr4JhRb.mjs} +1 -1
- package/dist/esm/chunks/{Switch-BZx31_TC.mjs → Switch-B8SOJBXI.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-BUlSi-mM.mjs → TabBar-CON4mLhp.mjs} +12 -8
- package/dist/esm/chunks/{TextArea-CrTPPqPj.mjs → TextArea-CDTEvkGd.mjs} +2 -2
- package/dist/esm/chunks/{TextField-DJqLzBpE.mjs → TextField-CMNdOgk6.mjs} +11 -7
- package/dist/esm/chunks/{Tip-6Frqfzpi.mjs → Tip-B0Ue8ayH.mjs} +2 -2
- package/dist/esm/chunks/{Toast-CphE3OkY.mjs → Toast-1VODwuQo.mjs} +10 -6
- package/dist/esm/chunks/{ToggleButton-BXB_VtB3.mjs → ToggleButton-DhiHk_eR.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea-B4jM32ER.mjs → UploadArea-OzgNd37z.mjs} +4 -4
- package/dist/esm/chunks/{Video-DgkfQgi8.mjs → Video-Cgq5CCI3.mjs} +5 -5
- package/dist/esm/chunks/{VideoController-M3g4Pwtc.mjs → VideoController-FZ_rT2N8.mjs} +9 -7
- package/dist/esm/chunks/{WSConnection-M552mwWy.mjs → WSConnection-Bg5A_R4Y.mjs} +1 -1
- package/dist/esm/chunks/{WebRTCConnection-BZNdtUKO.mjs → WebRTCConnection-DwhXmF5N.mjs} +1 -1
- package/dist/esm/chunks/broadcastChannel-_OaC_OdO.mjs +76 -0
- package/dist/esm/chunks/browserChannelsStore-Dn8RLoFP.mjs +94 -0
- package/dist/esm/chunks/{localDBStore-GmKJfODp.mjs → localDBStore-CbMyWyUR.mjs} +4 -2
- package/dist/esm/chunks/{microphoneStore-CvhusEyi.mjs → microphoneStore-tq5JJf5k.mjs} +1 -1
- package/dist/esm/chunks/{misc-CWSDLgrI.mjs → misc-BhDxN2k_.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-CBd7nxYG.mjs → sseStore-CuK5Cj7t.mjs} +4 -2
- package/dist/esm/chunks/{uploads-worker-Dg7tuCe8.mjs → uploads-worker-DOZg7N_E.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-bAoNL5My.mjs → uploadsStore-1A4Qh0sX.mjs} +1 -1
- package/dist/esm/chunks/{viewState-C-AmMZQr.mjs → viewState-CA1LPPV6.mjs} +10 -6
- package/dist/esm/chunks/{volumeStore-BnfcWvWI.mjs → volumeStore-C4J_3uNt.mjs} +1 -1
- package/dist/esm/chunks/{webRTCStore-BUW-j3A9.mjs → webRTCStore-BRp0i0h6.mjs} +4 -2
- package/dist/esm/chunks/{windowStore-CW_UBAZc.mjs → windowStore-B1On863x.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +11 -7
- 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 -11
- package/dist/esm/components/ButtonBar/index.mjs +11 -7
- package/dist/esm/components/Camera/index.mjs +13 -9
- package/dist/esm/components/CheckBox/index.mjs +11 -7
- package/dist/esm/components/Chip/index.mjs +12 -8
- package/dist/esm/components/DataTable/index.mjs +12 -8
- 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 -6
- package/dist/esm/components/DropDown/index.mjs +11 -7
- package/dist/esm/components/ErrorSummary/index.mjs +10 -6
- package/dist/esm/components/FileIcon/index.mjs +10 -6
- package/dist/esm/components/FileList/index.mjs +13 -9
- package/dist/esm/components/FlexDiv/index.mjs +2 -2
- package/dist/esm/components/Grouper/index.mjs +12 -8
- package/dist/esm/components/Icon/index.mjs +11 -7
- package/dist/esm/components/IconButton/index.mjs +14 -10
- package/dist/esm/components/Label/index.mjs +3 -3
- package/dist/esm/components/Level/index.mjs +6 -4
- package/dist/esm/components/Modal/index.mjs +17 -13
- package/dist/esm/components/ModalController/index.mjs +11 -7
- 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 -7
- package/dist/esm/components/PromptInput/index.mjs +18 -14
- package/dist/esm/components/RadioButton/index.mjs +11 -7
- package/dist/esm/components/RadioButtonList/index.mjs +12 -8
- package/dist/esm/components/Slider/index.mjs +11 -7
- 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 -11
- package/dist/esm/components/TextArea/index.mjs +16 -12
- package/dist/esm/components/Textfield/index.mjs +17 -13
- package/dist/esm/components/Tip/index.mjs +3 -3
- package/dist/esm/components/Toast/index.mjs +12 -8
- package/dist/esm/components/ToggleButton/index.mjs +16 -12
- package/dist/esm/components/UploadArea/index.mjs +14 -10
- package/dist/esm/components/Video/index.mjs +19 -15
- package/dist/esm/components/VideoController/index.mjs +17 -13
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +7 -5
- package/dist/esm/hooks/useClipboard.mjs +131 -0
- package/dist/esm/hooks/useMdStreamBuffer.mjs +4 -2
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +12 -6
- package/dist/esm/index.mjs +63 -59
- package/dist/esm/stores/LocalDB.mjs +5 -3
- package/dist/esm/stores/SSE.mjs +5 -3
- package/dist/esm/stores/WS.mjs +4 -2
- package/dist/esm/stores/WebRTC.mjs +5 -3
- package/dist/esm/stores/browserChannel.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/video.mjs +1 -1
- package/dist/esm/stores/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +21 -17
- package/dist/esm/utils/index.mjs +13 -11
- package/dist/esm/utils/objects/index.mjs +9 -7
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +1748 -1748
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useClipboard/useClipboard.d.ts +40 -0
- package/dist/types/hooks/useClipboard/useClipboard.test.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/stores/browserChannel/_types.d.ts +24 -0
- package/dist/types/stores/browserChannel/browserChannelsStore.d.ts +42 -0
- package/dist/types/stores/browserChannel/browserChannelsStore.test.d.ts +1 -0
- package/dist/types/stores/browserChannel/index.d.ts +2 -0
- package/dist/types/stores/index.d.ts +2 -0
- package/dist/types/stores/toast/_types.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/objects/browserChannel/broadcastChannel.d.ts +67 -0
- package/dist/types/utils/objects/browserChannel/broadcastChannel.test.d.ts +1 -0
- package/dist/types/utils/objects/index.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/cjs/chunks/{MdStreamBuffer-CGJnTgCw.js → MdStreamBuffer-Ble8ibwA.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-BMf8pqRz.js → SSEConnection-DncGftXV.js} +0 -0
- /package/dist/cjs/chunks/{_types-CrX297Zz.js → _types-ByMdhdf3.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-C-2yYuy_.js → audioVisualizer-zAy7uTX1.js} +0 -0
- /package/dist/cjs/chunks/{colors-BXuIv_3Q.js → colors-D5CWjn09.js} +0 -0
- /package/dist/cjs/chunks/{debounce-COjctjMe.js → debounce-Dm998akY.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-dUsnPsMX.js → modalStore-CG80hn6s.js} +0 -0
- /package/dist/cjs/chunks/{rafThrottle-CUFIaObP.js → rafThrottle-D-ki3HW1.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-gCKfLc_F.js → sharedTypes-xKamS99V.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-D8rVy17f.js → tipStore-l4N-Ht3k.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-B-KcGjfs.js → toastStore-DSvjQPDV.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-1b_WVOSx.js → tslib.es6-C8i2M07g.js} +0 -0
- /package/dist/cjs/chunks/{videoStore-CEvD64Je.js → videoStore-CwqZlMvJ.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-D5RvMu84.mjs → MdStreamBuffer-eFLLW5Tb.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-CgipQWUg.mjs → SSEConnection-DlEQOzv6.mjs} +0 -0
- /package/dist/esm/chunks/{_types-DJdJTzFY.mjs → _types-BOCtN_Uf.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-PV2YALCi.mjs → audioVisualizer-Dh04_7kZ.mjs} +0 -0
- /package/dist/esm/chunks/{colors-BuApx_ML.mjs → colors-BzL5-oTQ.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-DcUXZUBL.mjs → debounce-W1TqN0ok.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-CxNd2bGs.mjs → modalStore-pT-zaa0K.mjs} +0 -0
- /package/dist/esm/chunks/{rafThrottle-BX_UbPqi.mjs → rafThrottle-Dn5Hoq7g.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-BPqmyLRY.mjs → sharedTypes-CTv7xT4S.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-kz1SU1W0.mjs → tipStore-UMY4yIdr.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-gM8d8pIo.mjs → toastStore-Do6Cy79x.mjs} +0 -0
- /package/dist/esm/chunks/{tslib.es6-ChkYAtDK.mjs → tslib.es6-DcvCgOAo.mjs} +0 -0
- /package/dist/esm/chunks/{videoStore-Tv0qujkr.mjs → videoStore-D8m6mJ4d.mjs} +0 -0
|
@@ -14,3 +14,4 @@ export { useAudioRecorder } from './useAudioRecorder/useAudioRecorder';
|
|
|
14
14
|
export { useWindow, FormFactor, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, } from './useWindow/useWindow';
|
|
15
15
|
export { useObserveResize } from './useObserveResize/useObserveResize';
|
|
16
16
|
export { useIntersecting, type IntersectContainer, type IntersectEntry, type IntersectMargin, type IntersectOptions, type IntersectResult, type IntersectResultList, type ResolvedEntries, defaultOptions as defaultIntersectingOptions, } from './useIntersecting/useIntersecting';
|
|
17
|
+
export { useClipboard, type ClipboardPermissionState, type ClipboardPasteResult, type UseClipboardOptions, type UseClipboardReturn, type UseClipboardTarget, } from './useClipboard/useClipboard';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
export type ClipboardPermissionState = 'granted' | 'denied' | 'prompt' | 'unsupported';
|
|
3
|
+
export type ClipboardPasteResult = {
|
|
4
|
+
text: string;
|
|
5
|
+
files: File[];
|
|
6
|
+
items: DataTransferItem[];
|
|
7
|
+
nativeEvent: ClipboardEvent;
|
|
8
|
+
};
|
|
9
|
+
export type UseClipboardTarget = RefObject<HTMLElement | null> | Document | HTMLElement;
|
|
10
|
+
export type UseClipboardOptions = {
|
|
11
|
+
/** Element (or ref to one) to listen for native `paste` events on. Defaults to `document`. */
|
|
12
|
+
target?: UseClipboardTarget;
|
|
13
|
+
/** Called whenever a native paste event fires on the target, with the pasted text, files, and raw items. */
|
|
14
|
+
onPaste?: (result: ClipboardPasteResult) => void;
|
|
15
|
+
/** How long `isCopied` stays `true` after a successful `copy()`, in ms. Pass `0` to disable the auto-reset. */
|
|
16
|
+
copiedResetDelay?: number;
|
|
17
|
+
/** Query and subscribe to clipboard-read/clipboard-write permission state on mount. Defaults to `true`. */
|
|
18
|
+
watchPermissions?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type UseClipboardReturn = {
|
|
21
|
+
/** Most recently read or pasted clipboard text. `null` until a `read()` or observed paste populates it. */
|
|
22
|
+
text: string | null;
|
|
23
|
+
/** Whether the async Clipboard API (`navigator.clipboard`) is available in this environment. */
|
|
24
|
+
isSupported: boolean;
|
|
25
|
+
/** Briefly `true` after a successful `copy()` call. Handy for "Copied!" affordances. */
|
|
26
|
+
isCopied: boolean;
|
|
27
|
+
/** Whether a `copy()` or `read()` call is currently in flight. */
|
|
28
|
+
isRequesting: boolean;
|
|
29
|
+
/** Last error raised by `copy()` or `read()`. */
|
|
30
|
+
error: Error | null;
|
|
31
|
+
/** Current `clipboard-read` permission state, or `unsupported` when the Permissions API can't report it. */
|
|
32
|
+
readPermission: ClipboardPermissionState;
|
|
33
|
+
/** Current `clipboard-write` permission state, or `unsupported` when the Permissions API can't report it. */
|
|
34
|
+
writePermission: ClipboardPermissionState;
|
|
35
|
+
/** Write text to the clipboard. Falls back to a hidden-textarea `execCommand` copy when the Clipboard API is unavailable or denied. */
|
|
36
|
+
copy: (value: string) => Promise<boolean>;
|
|
37
|
+
/** Read text from the clipboard via the async Clipboard API. Resolves to `null` on unsupported browsers or denied permission. */
|
|
38
|
+
read: () => Promise<string | null>;
|
|
39
|
+
};
|
|
40
|
+
export declare function useClipboard(options?: UseClipboardOptions): UseClipboardReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type { ToolTip, ToolTipInfo } from './components/sharedTypes';
|
|
|
3
3
|
export { ToolTipType } from './components/sharedTypes';
|
|
4
4
|
export { light, dark, lightTheme, darkTheme, motion, elevations, Elevation, } from './theme';
|
|
5
5
|
export type { SliceTheme, Colors, Type, Corners, Elevations, } from './theme';
|
|
6
|
-
export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, type MicOption, type UseBindWebRTCOptions, type UseBindWebRTCReturn, type UseMDStreamBufferOptions, type UseMicrophoneReturn, useBindWebRTC, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useAudioRecorder, useMicrophone, useWindow, useDoubleClick, useObserveResize, } from './hooks';
|
|
6
|
+
export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, type MicOption, type UseBindWebRTCOptions, type UseBindWebRTCReturn, type UseMDStreamBufferOptions, type UseMicrophoneReturn, type ClipboardPermissionState, type ClipboardPasteResult, type UseClipboardOptions, type UseClipboardReturn, type UseClipboardTarget, useBindWebRTC, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useAudioRecorder, useMicrophone, useWindow, useDoubleClick, useObserveResize, useClipboard, } from './hooks';
|
|
7
7
|
export { AudioBubble } from './components/AudioBubble/index';
|
|
8
8
|
export type { AudioBubbleProps } from './components/AudioBubble/index';
|
|
9
9
|
export { Avatar } from './components/Avatar/index';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BrowserChannel, BrowserChannelMessage, ChannelConfig } from '../../utils';
|
|
2
|
+
/**
|
|
3
|
+
* What the store's own `addChannel` / `addChannels` accept: a regular
|
|
4
|
+
* {@link ChannelConfig} minus its callbacks. The store always supplies its
|
|
5
|
+
* own `onMessageCallback` / `onErrorCallback` internally - since every
|
|
6
|
+
* `BrowserChannel` message (data or error) now flows through one unified
|
|
7
|
+
* callback, there's nothing left for a caller-supplied callback to do here.
|
|
8
|
+
* Reach for `useMessage` / `getMessage` to read what a channel receives, or
|
|
9
|
+
* use `BrowserChannel` directly when you need full control over callbacks.
|
|
10
|
+
*/
|
|
11
|
+
export type BrowserChannelConfig<T> = Omit<ChannelConfig<T>, 'onMessageCallback' | 'onErrorCallback'>;
|
|
12
|
+
export interface BrowserChannelsStore {
|
|
13
|
+
channels: Record<string, BrowserChannel<any>> | null;
|
|
14
|
+
message: any;
|
|
15
|
+
messages: Record<string, BrowserChannelMessage<unknown>> | null;
|
|
16
|
+
actions: {
|
|
17
|
+
addChannel: (config: BrowserChannelConfig<any>, replace?: boolean) => void;
|
|
18
|
+
removeChannel: (channelName: string) => boolean;
|
|
19
|
+
addChannels: (configs: BrowserChannelConfig<any>[], replace?: boolean) => void;
|
|
20
|
+
removeChannels: () => boolean;
|
|
21
|
+
isActiveChannel: (channelName: string) => boolean;
|
|
22
|
+
post: <T>(channelName: string, message: T) => boolean;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BrowserChannel, type BrowserChannelMessage, type MessageType } from '../../utils';
|
|
2
|
+
import type { BrowserChannelConfig, BrowserChannelsStore } from './_types';
|
|
3
|
+
export declare const useBrowserChannelsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<BrowserChannelsStore>>;
|
|
4
|
+
export declare const useBrowserChannels: () => Record<string, BrowserChannel<any>> | null;
|
|
5
|
+
export declare const useBrowserChannelActions: () => {
|
|
6
|
+
addChannel: (config: BrowserChannelConfig<any>, replace?: boolean) => void;
|
|
7
|
+
removeChannel: (channelName: string) => boolean;
|
|
8
|
+
addChannels: (configs: BrowserChannelConfig<any>[], replace?: boolean) => void;
|
|
9
|
+
removeChannels: () => boolean;
|
|
10
|
+
isActiveChannel: (channelName: string) => boolean;
|
|
11
|
+
post: <T>(channelName: string, message: T) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const useIsActiveChannel: (channelName: string) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the latest message on one named channel, typed as `T`, optionally
|
|
16
|
+
* narrowed to one `MessageType`. Data and error messages share the same slot
|
|
17
|
+
* per channel - errors aren't tracked separately - so `useMessage(name)`
|
|
18
|
+
* always reflects whichever arrived most recently, while
|
|
19
|
+
* `useMessage(name, type)` returns `null` if the latest message doesn't
|
|
20
|
+
* match that type. Unlike the shared `message` field, this is scoped
|
|
21
|
+
* strictly to the named channel and never reflects any other channel's
|
|
22
|
+
* messages.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useMessage<T = unknown>(channelName: string): BrowserChannelMessage<T> | null;
|
|
25
|
+
export declare function useMessage<T = unknown>(channelName: string, type: MessageType): BrowserChannelMessage<T> | null;
|
|
26
|
+
export declare const browserChannelActions: {
|
|
27
|
+
addChannel: (config: BrowserChannelConfig<any>, replace?: boolean) => void;
|
|
28
|
+
removeChannel: (channelName: string) => boolean;
|
|
29
|
+
addChannels: (configs: BrowserChannelConfig<any>[], replace?: boolean) => void;
|
|
30
|
+
removeChannels: () => boolean;
|
|
31
|
+
isActiveChannel: (channelName: string) => boolean;
|
|
32
|
+
post: <T>(channelName: string, message: T) => boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare const getBrowserChannels: () => Record<string, BrowserChannel<any>> | null;
|
|
35
|
+
export declare const getLastBrowserChannelMessage: () => any;
|
|
36
|
+
/**
|
|
37
|
+
* Imperative, non-reactive counterpart to `useMessage`: snapshot-reads the
|
|
38
|
+
* latest message envelope for one named channel, typed as `T`, optionally
|
|
39
|
+
* narrowed to one `MessageType`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getMessage<T = unknown>(channelName: string): BrowserChannelMessage<T> | null;
|
|
42
|
+
export declare function getMessage<T = unknown>(channelName: string, type: MessageType): BrowserChannelMessage<T> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useBrowserChannelsStore, useBrowserChannels, useBrowserChannelActions, useIsActiveChannel, useMessage, browserChannelActions, getBrowserChannels, getLastBrowserChannelMessage, getMessage, } from './browserChannelsStore';
|
|
2
|
+
export type { BrowserChannelConfig, BrowserChannelsStore } from './_types';
|
|
@@ -9,3 +9,5 @@ export * from './volume';
|
|
|
9
9
|
export * from './WebRTC';
|
|
10
10
|
export * from './window';
|
|
11
11
|
export * from './video';
|
|
12
|
+
export { useBrowserChannelsStore, useBrowserChannels, useBrowserChannelActions, useIsActiveChannel, useMessage as useBrowserChannelMessage, browserChannelActions, getBrowserChannels, getLastBrowserChannelMessage, getMessage as getBrowserChannelMessage, } from './browserChannel';
|
|
13
|
+
export type { BrowserChannelConfig, BrowserChannelsStore } from './browserChannel';
|
|
@@ -2,5 +2,5 @@ export { copyToClipboard, hexToRgb } from './functions/misc';
|
|
|
2
2
|
export { debounce } from './functions/debounce';
|
|
3
3
|
export { rafThrottle } from './functions/rafThrottle';
|
|
4
4
|
export * from './functions/colors';
|
|
5
|
-
export { AudioVisualizer, IndexedDB, MdBuffer, SSEConnection, WebRTCConnection, WSConnection, } from './objects';
|
|
6
|
-
export type { AudioVisualizerOptions, AudioVisualizerSource, IndexedDBOptions, MarkdownAutoCloseRule, MarkdownStreamBufferOptions, MarkdownStreamBufferSnapshot, SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, UnifiedMessageEvent, WebRTCConnectionOptions, WSConnectionOptions, } from './objects';
|
|
5
|
+
export { AudioVisualizer, BrowserChannel, IndexedDB, MdBuffer, MessageType, SSEConnection, WebRTCConnection, WSConnection, } from './objects';
|
|
6
|
+
export type { AudioVisualizerOptions, AudioVisualizerSource, BrowserChannelMessage, ChannelConfig, IndexedDBOptions, MarkdownAutoCloseRule, MarkdownStreamBufferOptions, MarkdownStreamBufferSnapshot, SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, UnifiedMessageEvent, WebRTCConnectionOptions, WSConnectionOptions, } from './objects';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare enum MessageType {
|
|
2
|
+
Data = "data",
|
|
3
|
+
Error = "error"
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Options for constructing a {@link BrowserChannel}.
|
|
7
|
+
*/
|
|
8
|
+
export interface ChannelConfig<T> {
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Optional human-readable label for this channel instance. The instance's
|
|
12
|
+
* actual {@link BrowserChannel.origin} is always unique - it is always
|
|
13
|
+
* this label joined with a generated UUID by a `.`, e.g. `'tab-1.<uuid>'`,
|
|
14
|
+
* or just `.<uuid>` (with an empty label) when none is given. The `.` is
|
|
15
|
+
* always present, so `origin.split('.')` reliably splits into
|
|
16
|
+
* `[label, uuid]`.
|
|
17
|
+
*/
|
|
18
|
+
origin?: string;
|
|
19
|
+
onMessageCallback: (message: BrowserChannelMessage<T>) => void;
|
|
20
|
+
onErrorCallback: (event: MessageEvent) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The envelope every {@link BrowserChannel} sends and receives. `origin`
|
|
24
|
+
* identifies which channel instance posted the message, so a receiver can
|
|
25
|
+
* tell messages from different senders on the same channel name apart.
|
|
26
|
+
*/
|
|
27
|
+
export type BrowserChannelMessage<T> = {
|
|
28
|
+
content: T | string;
|
|
29
|
+
type: MessageType;
|
|
30
|
+
origin: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* A typed wrapper around the native `BroadcastChannel` API for posting and
|
|
34
|
+
* receiving messages between same-origin browsing contexts (tabs, windows,
|
|
35
|
+
* iframes, workers).
|
|
36
|
+
*/
|
|
37
|
+
export declare class BrowserChannel<T> {
|
|
38
|
+
readonly name: string;
|
|
39
|
+
/**
|
|
40
|
+
* Unique identifier for this channel instance, attached as `origin` to
|
|
41
|
+
* every message it posts. Always unique per instance, even across
|
|
42
|
+
* instances created with the same `name` or `origin` label.
|
|
43
|
+
*/
|
|
44
|
+
readonly origin: string;
|
|
45
|
+
readonly channel: BroadcastChannel;
|
|
46
|
+
private readonly onMessageCallback;
|
|
47
|
+
private readonly onErrorCallback;
|
|
48
|
+
/**
|
|
49
|
+
* Open the underlying `BroadcastChannel` and attach listeners.
|
|
50
|
+
*/
|
|
51
|
+
constructor(options: ChannelConfig<T>);
|
|
52
|
+
private attachListeners;
|
|
53
|
+
private cleanUpListeners;
|
|
54
|
+
private onMessage;
|
|
55
|
+
private onError;
|
|
56
|
+
/**
|
|
57
|
+
* Post a message to every other same-origin context listening on this
|
|
58
|
+
* channel. The message is wrapped with this instance's `origin` before
|
|
59
|
+
* being sent.
|
|
60
|
+
*/
|
|
61
|
+
post(message: T): void;
|
|
62
|
+
/**
|
|
63
|
+
* Close the channel and remove its listeners. The instance should not be
|
|
64
|
+
* reused after calling this.
|
|
65
|
+
*/
|
|
66
|
+
close(): void;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,3 +10,5 @@ export type { SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SS
|
|
|
10
10
|
export type { UnifiedMessageEvent, WSConnectionOptions, } from './WSConnection/WSConnection';
|
|
11
11
|
export { WebRTCConnection } from './WebRTCConnection/WebRTCConnection';
|
|
12
12
|
export type { WebRTCConnectionOptions } from './WebRTCConnection/_types';
|
|
13
|
+
export { BrowserChannel, MessageType } from './browserChannel/broadcastChannel';
|
|
14
|
+
export type { BrowserChannelMessage, ChannelConfig } from './browserChannel/broadcastChannel';
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|