@apple-pie/slice 0.1.46 → 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-D7A6YNKq.js → AudioBubble-7MRDr6oW.js} +5 -4
- package/dist/cjs/chunks/{Avatar-NhXEz-E5.js → Avatar-BEQvuKXB.js} +1 -1
- package/dist/cjs/chunks/{AvatarGroup-BiY5kR8U.js → AvatarGroup-BBigZoAv.js} +1 -1
- package/dist/cjs/chunks/{Badge-DjXygkSp.js → Badge-BvSSeAAt.js} +1 -1
- package/dist/cjs/chunks/{Button-C-omYiMd.js → Button-DXQNFBaZ.js} +1 -1
- package/dist/cjs/chunks/{ButtonBar-BeJEeGL_.js → ButtonBar-BXo6dNuf.js} +1 -1
- package/dist/cjs/chunks/{Camera-D9EEGKDj.js → Camera-BPQ1yF3e.js} +6 -5
- package/dist/cjs/chunks/{CheckBox-B30zlOIJ.js → CheckBox-OnTqLOoy.js} +1 -1
- package/dist/cjs/chunks/{Chip-DHX-Qu95.js → Chip-ekl1KQ93.js} +1 -1
- package/dist/cjs/chunks/{DivInput-Br6pOhYv.js → DivInput-D3SEX8J9.js} +1 -1
- package/dist/cjs/chunks/{Dot-BLu3iqa7.js → Dot-03FuwY2T.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-9eU1y3zx.js → DrggablePanel-CzMav9ix.js} +5 -4
- package/dist/cjs/chunks/{DropDown-CLZSy99h.js → DropDown-DZmhSeRX.js} +1 -1
- package/dist/cjs/chunks/{ErrorSummary-B5lPVdED.js → ErrorSummary-DWQIY4M8.js} +5 -4
- package/dist/cjs/chunks/{FileIcon-CESqm-fD.js → FileIcon-CtEGJMf1.js} +5 -5
- package/dist/cjs/chunks/{FileList-DbjNz28-.js → FileList-31XpLMih.js} +1 -1
- package/dist/cjs/chunks/{FlexDiv-KmadT8yF.js → FlexDiv-CC6KADWm.js} +1 -1
- package/dist/cjs/chunks/{Grouper-CACMpHGp.js → Grouper-B9qnrP-4.js} +5 -4
- package/dist/cjs/chunks/{Icon-B36rVqFs.js → Icon-CiZuv_Ch.js} +5 -4
- package/dist/cjs/chunks/{IconButton-Dn424Wsw.js → IconButton-C6ZUdM8z.js} +1 -1
- package/dist/cjs/chunks/{IndexedDB-BRw-IxEC.js → IndexedDB-DFFn9mqX.js} +1 -1
- package/dist/cjs/chunks/{Label-CsEg5AQ2.js → Label-B7bBplmn.js} +1 -1
- package/dist/cjs/chunks/{Level-BuiDjBcq.js → Level-DwSesAi0.js} +5 -1
- package/dist/cjs/chunks/{Modal-Cf9RR9Es.js → Modal-BPPojCas.js} +1 -1
- package/dist/cjs/chunks/{ModalController-tDrizTHZ.js → ModalController-BGEq6nZW.js} +3 -3
- package/dist/cjs/chunks/{Overlay-Ci1FxGZk.js → Overlay-BTyVHmZi.js} +1 -1
- package/dist/cjs/chunks/{Pager-C3WzCySK.js → Pager-CyJRXuXt.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-DSquSJwP.js → ProgressIndicator-DywiCVkO.js} +5 -4
- package/dist/cjs/chunks/{PromptInput-BbXZGAWe.js → PromptInput-Cg5z8XMK.js} +6 -5
- package/dist/cjs/chunks/{RadioButton-VMEcd_W1.js → RadioButton-3LQ__XHx.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-Dqy7lYxE.js → RadioButtonList-CCmGGzhD.js} +1 -1
- package/dist/cjs/chunks/{Slider-BqzYObVj.js → Slider-DEvyBgim.js} +5 -4
- package/dist/cjs/chunks/{Spacer-C56PON7K.js → Spacer-DzKg1JZN.js} +1 -1
- package/dist/cjs/chunks/{Switch-CHr2xPQL.js → Switch-BCnrGlFd.js} +1 -1
- package/dist/cjs/chunks/{TabBar-Co-CXGfB.js → TabBar-tawvDdQ9.js} +6 -5
- package/dist/cjs/chunks/{TextArea-BHdYXzBg.js → TextArea-BCmck_Bu.js} +1 -1
- package/dist/cjs/chunks/{TextField-DlYNng8e.js → TextField-D0ig3i5Z.js} +6 -5
- package/dist/cjs/chunks/{Tip-DEOw8HJ6.js → Tip-DPAa_tZz.js} +1 -1
- package/dist/cjs/chunks/{Toast-DawqmWWR.js → Toast-CjSm6wKq.js} +6 -5
- package/dist/cjs/chunks/{ToggleButton-mIzDlM7o.js → ToggleButton-cNIopPE-.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-WT5XsyU_.js → UploadArea-DoJuVudV.js} +1 -1
- package/dist/cjs/chunks/{Video-Pjf89fZt.js → Video-M1-jtah8.js} +1 -1
- package/dist/cjs/chunks/{VideoController-CkZ4EmHb.js → VideoController-Cghf-ihF.js} +4 -4
- package/dist/cjs/chunks/{WSConnection-ByeRqZeT.js → WSConnection-BERcrJfr.js} +1 -1
- package/dist/cjs/chunks/{WebRTCConnection-BIFUOK1m.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-Bp9sZnnB.js → localDBStore-CzLeudjH.js} +4 -2
- package/dist/cjs/chunks/{microphoneStore-CvE6xePs.js → microphoneStore-BkaENcMx.js} +1 -1
- package/dist/cjs/chunks/{misc-eL5ZLV74.js → misc-BzvE_9R_.js} +1 -1
- package/dist/cjs/chunks/{sseStore-DnyhZyHc.js → sseStore-C9XlDamt.js} +4 -2
- package/dist/cjs/chunks/{uploads-worker--rEBDgqq.js → uploads-worker-ZLJR3WZA.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-CHIqdTcL.js → uploadsStore-xzGjSmYP.js} +2 -2
- package/dist/cjs/chunks/{viewState-BM1U3FFI.js → viewState-6P26uORS.js} +6 -5
- package/dist/cjs/chunks/{volumeStore-U2OlJf6Y.js → volumeStore-D5uQzCPQ.js} +1 -1
- package/dist/cjs/chunks/{webRTCStore-t11G9lB7.js → webRTCStore-CgLUjMDH.js} +3 -1
- package/dist/cjs/chunks/{windowStore-D1mTGGvA.js → windowStore-De7LtHFd.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +7 -7
- 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 +10 -9
- 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 +8 -7
- package/dist/cjs/components/DataTable/index.js +11 -10
- 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 -7
- package/dist/cjs/components/DropDown/index.js +7 -7
- package/dist/cjs/components/ErrorSummary/index.js +7 -6
- package/dist/cjs/components/FileIcon/index.js +7 -6
- package/dist/cjs/components/FileList/index.js +7 -7
- package/dist/cjs/components/FlexDiv/index.js +2 -2
- package/dist/cjs/components/Grouper/index.js +8 -7
- package/dist/cjs/components/Icon/index.js +7 -6
- package/dist/cjs/components/IconButton/index.js +9 -9
- 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 +11 -10
- package/dist/cjs/components/ModalController/index.js +6 -6
- 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 -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 +7 -7
- 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 -9
- package/dist/cjs/components/TextArea/index.js +10 -9
- package/dist/cjs/components/Textfield/index.js +10 -10
- 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 +10 -9
- package/dist/cjs/components/UploadArea/index.js +8 -8
- package/dist/cjs/components/Video/index.js +12 -12
- package/dist/cjs/components/VideoController/index.js +10 -10
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +3 -2
- package/dist/cjs/hooks/useClipboard.js +3 -1
- 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 -6
- package/dist/cjs/index.js +11 -10
- 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 +12 -5
- 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-DzYODlDD.mjs → AudioBubble-sDq1KbG4.mjs} +8 -6
- package/dist/esm/chunks/{Avatar-CLj2yi7I.mjs → Avatar-CgH69dGS.mjs} +2 -2
- package/dist/esm/chunks/{AvatarGroup-BsBGeeDX.mjs → AvatarGroup-CVcONno4.mjs} +2 -2
- package/dist/esm/chunks/{Badge-CxuIh-Xz.mjs → Badge-V0fkzlfk.mjs} +1 -1
- package/dist/esm/chunks/{Button-Bz9ypmSl.mjs → Button-CL0LKJDc.mjs} +6 -6
- package/dist/esm/chunks/{ButtonBar-DgHGxtm7.mjs → ButtonBar-BPLc12tE.mjs} +3 -3
- package/dist/esm/chunks/{Camera-CQenDpVd.mjs → Camera-D6KBmxd_.mjs} +10 -8
- package/dist/esm/chunks/{CheckBox-Bg1tGyjG.mjs → CheckBox-iVGppX1l.mjs} +3 -3
- package/dist/esm/chunks/{Chip-BuIMZul1.mjs → Chip-DO5g84bY.mjs} +4 -4
- package/dist/esm/chunks/{DivInput-YeMKT7Mv.mjs → DivInput-D5m-4myl.mjs} +2 -2
- package/dist/esm/chunks/{Dot-BlmxajCk.mjs → Dot-sfjq9c6Z.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-B-4Wnapx.mjs → DrggablePanel-IO_BrX30.mjs} +7 -5
- package/dist/esm/chunks/{DropDown-FW_C2G4q.mjs → DropDown-BBLh_fWy.mjs} +3 -3
- package/dist/esm/chunks/{ErrorSummary-_8Rk-Wsr.mjs → ErrorSummary-B0YJ3i5i.mjs} +7 -5
- package/dist/esm/chunks/{FileIcon-BSt6hm2F.mjs → FileIcon-hM81mI8u.mjs} +7 -5
- package/dist/esm/chunks/{FileList-D0HPgRL-.mjs → FileList-BCkq2RDu.mjs} +5 -5
- package/dist/esm/chunks/{FlexDiv-DsrFpwch.mjs → FlexDiv-DXMUnFLf.mjs} +1 -1
- package/dist/esm/chunks/{Grouper-DnpGsdiB.mjs → Grouper-16TyXy09.mjs} +8 -6
- package/dist/esm/chunks/{Icon-CptxAEva.mjs → Icon-DfeRt_ez.mjs} +7 -5
- package/dist/esm/chunks/{IconButton-XkOW_lnr.mjs → IconButton-VzkyqbvH.mjs} +5 -5
- package/dist/esm/chunks/{IndexedDB-C57PCioP.mjs → IndexedDB-Dr5zANnZ.mjs} +1 -1
- package/dist/esm/chunks/{Label-BjL3V2bm.mjs → Label-D1Z4Zouo.mjs} +2 -2
- package/dist/esm/chunks/{Level-CciHNq5z.mjs → Level-ChdkPG6_.mjs} +5 -3
- package/dist/esm/chunks/{Modal-45bTlzdT.mjs → Modal-C7n04R_z.mjs} +5 -5
- package/dist/esm/chunks/{ModalController-BfuINJfH.mjs → ModalController-oB5b930d.mjs} +5 -5
- package/dist/esm/chunks/{Overlay-Dho1XXV_.mjs → Overlay-DX_g-1OP.mjs} +1 -1
- package/dist/esm/chunks/{Pager-Brhn9W2p.mjs → Pager-Bz0p-nkX.mjs} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-H1AokmcU.mjs → ProgressIndicator-Cx1alCaM.mjs} +7 -5
- package/dist/esm/chunks/{PromptInput-dxlaGMAZ.mjs → PromptInput-Cw7w2DJk.mjs} +9 -7
- package/dist/esm/chunks/{RadioButton-DtxbUP1m.mjs → RadioButton-DNi4HZSs.mjs} +3 -3
- package/dist/esm/chunks/{RadioButtonList-BU7AmRaJ.mjs → RadioButtonList-DuOqut1l.mjs} +3 -3
- package/dist/esm/chunks/{Slider-Ci-Syo6r.mjs → Slider-DESg64FR.mjs} +8 -6
- package/dist/esm/chunks/{Spacer-DLe6P6sl.mjs → Spacer-yLr4JhRb.mjs} +1 -1
- package/dist/esm/chunks/{Switch-tmuC_vFz.mjs → Switch-B8SOJBXI.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-DqT8ukGt.mjs → TabBar-CON4mLhp.mjs} +11 -9
- package/dist/esm/chunks/{TextArea-BwKbadO9.mjs → TextArea-CDTEvkGd.mjs} +2 -2
- package/dist/esm/chunks/{TextField-CbSORtHS.mjs → TextField-CMNdOgk6.mjs} +10 -8
- package/dist/esm/chunks/{Tip-CoyRu-o-.mjs → Tip-B0Ue8ayH.mjs} +2 -2
- package/dist/esm/chunks/{Toast-CfJSmVvm.mjs → Toast-1VODwuQo.mjs} +9 -7
- package/dist/esm/chunks/{ToggleButton-Cq7fm59Y.mjs → ToggleButton-DhiHk_eR.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea-DUpwYakK.mjs → UploadArea-OzgNd37z.mjs} +4 -4
- package/dist/esm/chunks/{Video-DzClo3wr.mjs → Video-Cgq5CCI3.mjs} +5 -5
- package/dist/esm/chunks/{VideoController-ipcig4rq.mjs → VideoController-FZ_rT2N8.mjs} +8 -8
- package/dist/esm/chunks/{WSConnection-B_YnWXbU.mjs → WSConnection-Bg5A_R4Y.mjs} +1 -1
- package/dist/esm/chunks/{WebRTCConnection-DWRLYmZt.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-DNswekRn.mjs → localDBStore-CbMyWyUR.mjs} +4 -2
- package/dist/esm/chunks/{microphoneStore-BVbwClpG.mjs → microphoneStore-tq5JJf5k.mjs} +1 -1
- package/dist/esm/chunks/{misc-BehJA8xr.mjs → misc-BhDxN2k_.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-pAJ2IGAZ.mjs → sseStore-CuK5Cj7t.mjs} +4 -2
- package/dist/esm/chunks/{uploads-worker-BliiKZBP.mjs → uploads-worker-DOZg7N_E.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-Twdke-kc.mjs → uploadsStore-1A4Qh0sX.mjs} +1 -1
- package/dist/esm/chunks/{viewState-DsPZr861.mjs → viewState-CA1LPPV6.mjs} +9 -7
- package/dist/esm/chunks/{volumeStore-B1cNRiOA.mjs → volumeStore-C4J_3uNt.mjs} +1 -1
- package/dist/esm/chunks/{webRTCStore-Dbm8asHn.mjs → webRTCStore-BRp0i0h6.mjs} +4 -2
- package/dist/esm/chunks/{windowStore-CBzgTFW5.mjs → windowStore-B1On863x.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +10 -8
- 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 +14 -12
- package/dist/esm/components/ButtonBar/index.mjs +10 -8
- package/dist/esm/components/Camera/index.mjs +12 -10
- package/dist/esm/components/CheckBox/index.mjs +10 -8
- package/dist/esm/components/Chip/index.mjs +11 -9
- package/dist/esm/components/DataTable/index.mjs +11 -9
- 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 +9 -7
- package/dist/esm/components/DropDown/index.mjs +10 -8
- package/dist/esm/components/ErrorSummary/index.mjs +9 -7
- package/dist/esm/components/FileIcon/index.mjs +9 -7
- package/dist/esm/components/FileList/index.mjs +12 -10
- package/dist/esm/components/FlexDiv/index.mjs +2 -2
- package/dist/esm/components/Grouper/index.mjs +11 -9
- package/dist/esm/components/Icon/index.mjs +10 -8
- package/dist/esm/components/IconButton/index.mjs +13 -11
- 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 +16 -14
- package/dist/esm/components/ModalController/index.mjs +10 -8
- 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 +10 -8
- package/dist/esm/components/PromptInput/index.mjs +17 -15
- package/dist/esm/components/RadioButton/index.mjs +10 -8
- package/dist/esm/components/RadioButtonList/index.mjs +11 -9
- package/dist/esm/components/Slider/index.mjs +10 -8
- 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 +14 -12
- package/dist/esm/components/TextArea/index.mjs +15 -13
- package/dist/esm/components/Textfield/index.mjs +16 -14
- package/dist/esm/components/Tip/index.mjs +3 -3
- package/dist/esm/components/Toast/index.mjs +11 -9
- package/dist/esm/components/ToggleButton/index.mjs +15 -13
- package/dist/esm/components/UploadArea/index.mjs +13 -11
- package/dist/esm/components/Video/index.mjs +18 -16
- package/dist/esm/components/VideoController/index.mjs +16 -14
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +7 -5
- package/dist/esm/hooks/useClipboard.mjs +4 -2
- 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 +9 -7
- package/dist/esm/index.mjs +60 -58
- 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 +20 -16
- 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 +2065 -2065
- 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/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-D6TMHeW6.js → MdStreamBuffer-Ble8ibwA.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-C6CaqgKt.js → SSEConnection-DncGftXV.js} +0 -0
- /package/dist/cjs/chunks/{_types-B00qXMsk.js → _types-ByMdhdf3.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-DyXEzz5B.js → audioVisualizer-zAy7uTX1.js} +0 -0
- /package/dist/cjs/chunks/{colors-D4KqwENo.js → colors-D5CWjn09.js} +0 -0
- /package/dist/cjs/chunks/{debounce-Dwcudcja.js → debounce-Dm998akY.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-BgSGFbsR.js → modalStore-CG80hn6s.js} +0 -0
- /package/dist/cjs/chunks/{rafThrottle-s6AR2mx7.js → rafThrottle-D-ki3HW1.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-BGj2TuEP.js → sharedTypes-xKamS99V.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-nssDFmCg.js → tipStore-l4N-Ht3k.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-BZfCxYNa.js → toastStore-DSvjQPDV.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-hvdVpg9n.js → tslib.es6-C8i2M07g.js} +0 -0
- /package/dist/cjs/chunks/{videoStore-D1GUKQuQ.js → videoStore-CwqZlMvJ.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-CVQOlAQI.mjs → MdStreamBuffer-eFLLW5Tb.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-B51Za2e1.mjs → SSEConnection-DlEQOzv6.mjs} +0 -0
- /package/dist/esm/chunks/{_types-DLEuRVFo.mjs → _types-BOCtN_Uf.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-BE5XzPMo.mjs → audioVisualizer-Dh04_7kZ.mjs} +0 -0
- /package/dist/esm/chunks/{colors-DrwCjncz.mjs → colors-BzL5-oTQ.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-DNEyxGlg.mjs → debounce-W1TqN0ok.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-ENLMmYBo.mjs → modalStore-pT-zaa0K.mjs} +0 -0
- /package/dist/esm/chunks/{rafThrottle-BGq3oR1J.mjs → rafThrottle-Dn5Hoq7g.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-D8p2SubQ.mjs → sharedTypes-CTv7xT4S.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-Cq54idgj.mjs → tipStore-UMY4yIdr.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-B_t3rRa8.mjs → toastStore-Do6Cy79x.mjs} +0 -0
- /package/dist/esm/chunks/{tslib.es6-DDvIwyzx.mjs → tslib.es6-DcvCgOAo.mjs} +0 -0
- /package/dist/esm/chunks/{videoStore-3qSk7xdi.mjs → videoStore-D8m6mJ4d.mjs} +0 -0
|
@@ -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
|