@apple-pie/slice 0.1.59 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/cjs/chunks/ActionButton-DhHiZwXV.js +200 -0
- package/dist/cjs/chunks/Attachment-DhyXAQUf.js +351 -0
- package/dist/cjs/chunks/AudioBubble-DS5Oea-b.js +46 -0
- package/dist/cjs/chunks/AudioLevel-uQJ-v5Qz.js +54 -0
- package/dist/cjs/chunks/Avatar-a2GHmu1o.js +125 -0
- package/dist/cjs/chunks/AvatarGroup-CWpoauJP.js +70 -0
- package/dist/cjs/chunks/Badge-DtVP2qH0.js +26 -0
- package/dist/cjs/chunks/Button-Cr5SlNim.js +293 -0
- package/dist/cjs/chunks/ButtonBar-DDupZZ_u.js +96 -0
- package/dist/cjs/chunks/Camera-bjjzmzar.js +560 -0
- package/dist/cjs/chunks/CheckBox-DBaKpMhg.js +66 -0
- package/dist/cjs/chunks/Chip-DsZHDLKG.js +203 -0
- package/dist/cjs/chunks/ContentEditable-BaxU62Mg.js +144 -0
- package/dist/cjs/chunks/DialogBox-C-ZvHDH6.js +204 -0
- package/dist/cjs/chunks/Dot-0Dv8WX0n.js +92 -0
- package/dist/cjs/chunks/DrggablePanel-zi27w3wY.js +251 -0
- package/dist/cjs/chunks/DropDown-BcTjhAtE.js +269 -0
- package/dist/cjs/chunks/ErrorSummary-DDz7nQWX.js +166 -0
- package/dist/cjs/chunks/{FileIcon-63XvrV1q.js → FileIcon-BM8n3o-c.js} +68 -40
- package/dist/cjs/chunks/FileList-T2_mhI_t.js +204 -0
- package/dist/cjs/chunks/FlexBox-DTCyWJeT.js +278 -0
- package/dist/cjs/chunks/FlexDiv-5YN9Hgxy.js +7 -0
- package/dist/cjs/chunks/Icon-COY7IZkK.js +7821 -0
- package/dist/cjs/chunks/IconButton-KJr15EW6.js +10 -0
- package/dist/cjs/chunks/{IndexedDB-ClIpb2ob.js → IndexedDB-DwKh2Gfp.js} +1 -1
- package/dist/cjs/chunks/ModalController-D0S9VnNH.js +143 -0
- package/dist/cjs/chunks/ModalHostContext-DLgUa9Vl.js +5 -0
- package/dist/cjs/chunks/Overlay-CVZLmK8H.js +77 -0
- package/dist/cjs/chunks/Pager-QEUi0r59.js +146 -0
- package/dist/cjs/chunks/PopMenu-DkxhTcwD.js +423 -0
- package/dist/cjs/chunks/PopMenuController-CmS28S4h.js +32 -0
- package/dist/cjs/chunks/ProgressIndicator-Ddj5dfEA.js +237 -0
- package/dist/cjs/chunks/PromptInput-DtepCo-l.js +248 -0
- package/dist/cjs/chunks/RadioButton-B2HGjkQk.js +101 -0
- package/dist/cjs/chunks/RadioButtonList-Oc7oMivb.js +88 -0
- package/dist/cjs/chunks/Slider-Y7zMFKiM.js +170 -0
- package/dist/cjs/chunks/Spacer-CM7sstpQ.js +22 -0
- package/dist/cjs/chunks/Switch-CWJh4Pi4.js +70 -0
- package/dist/cjs/chunks/Tab-DFvjUNPs.js +96 -0
- package/dist/cjs/chunks/TabBar-lB0aqabp.js +186 -0
- package/dist/cjs/chunks/TextArea-UudvZQ9R.js +189 -0
- package/dist/cjs/chunks/TextField-QzgdqFys.js +312 -0
- package/dist/cjs/chunks/Tip-BxS2Wzz3.js +115 -0
- package/dist/cjs/chunks/ToggleButton-De8_kkMd.js +53 -0
- package/dist/cjs/chunks/UploadArea-BtqwFTDl.js +223 -0
- package/dist/cjs/chunks/Video-C1GATYS9.js +396 -0
- package/dist/cjs/chunks/VideoController-CnYz7Sdt.js +169 -0
- package/dist/cjs/chunks/{WSConnection-CDWOkk8n.js → WSConnection-DZKTeDtZ.js} +1 -1
- package/dist/cjs/chunks/{WebRTCConnection-b8jZNRYr.js → WebRTCConnection-DIUG7Gx3.js} +1 -1
- package/dist/cjs/chunks/_types-3m6769Z0.js +910 -0
- package/dist/cjs/chunks/_types-C_Jf14DZ.js +273 -0
- package/dist/cjs/chunks/audioVisualizer-Bak7PWOv.js +71 -0
- package/dist/cjs/chunks/breakpoints-BDw1OJh9.js +18 -0
- package/dist/cjs/chunks/{browserChannelsStore-PGtTaJyY.js → browserChannelsStore-DHE7Vr4_.js} +4 -2
- package/dist/cjs/chunks/colors-hDzzq_Dk.js +62 -0
- package/dist/cjs/chunks/files-RYD9L_pI.js +25 -0
- package/dist/cjs/chunks/getVideoControls-LxSY7z8h.js +19 -0
- package/dist/cjs/chunks/getWaterTransition-s_55VKK2.js +11 -0
- package/dist/cjs/chunks/{localDBStore-BRd0iQuq.js → localDBStore-CTWlm2t-.js} +6 -2
- package/dist/cjs/chunks/{microphoneStore-DljI0Zpj.js → microphoneStore-D7DuvQeX.js} +1 -1
- package/dist/cjs/chunks/{misc-BallZ366.js → misc-PmT7cZzC.js} +29 -38
- package/dist/cjs/chunks/{modalStore-BexwvT-T.js → modalStore-BCn998Jz.js} +20 -17
- package/dist/cjs/chunks/popMenuStore-DqyTqDrl.js +20 -0
- package/dist/cjs/chunks/resolveColor-DkYThq2J.js +9 -0
- package/dist/cjs/chunks/resolveColorProps-DE1k1P-Z.js +17 -0
- package/dist/cjs/chunks/resolveShortcut-DiQdb8VR.js +38 -0
- package/dist/cjs/chunks/sharedTypes-BDMIewR9.js +22 -0
- package/dist/cjs/chunks/{sseStore-cSWpKohM.js → sseStore-DfS7e3vY.js} +3 -3
- package/dist/cjs/chunks/themes-bwU5x3_5.js +34 -0
- package/dist/cjs/chunks/toastStore-BxX1AtE7.js +33 -0
- package/dist/cjs/chunks/type.module-Dk5b_rHG.js +28 -0
- package/dist/cjs/chunks/{uploads-worker-DzrC-YiR.js → uploads-worker-stCHn8-D.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-BajO-auR.js → uploadsStore-Ck3gzZuD.js} +2 -2
- package/dist/cjs/chunks/useAudioVisualizer-D7bStvIe.js +42 -0
- package/dist/cjs/chunks/useModalHost-B8oi4tfb.js +52 -0
- package/dist/cjs/chunks/usePrefersReducedMotion-GpD17CAE.js +16 -0
- package/dist/cjs/chunks/viewState-CMugA-g4.js +627 -0
- package/dist/cjs/chunks/{volumeStore-DzgmrI6q.js → volumeStore-BoEoo9wA.js} +1 -1
- package/dist/cjs/chunks/{webRTCStore-BXHg9abP.js → webRTCStore-OGkXAovD.js} +6 -2
- package/dist/cjs/chunks/{windowStore-DpNMptuw.js → windowStore-HYnXbosz.js} +1 -1
- package/dist/cjs/components/Attachment/index.js +26 -0
- package/dist/cjs/components/AudioBubble/index.js +11 -8
- package/dist/cjs/components/AudioLevel/index.js +9 -0
- package/dist/cjs/components/Avatar/index.js +5 -3
- package/dist/cjs/components/AvatarGroup/index.js +4 -3
- package/dist/cjs/components/Badge/index.js +4 -3
- package/dist/cjs/components/Button/index.js +14 -11
- package/dist/cjs/components/ButtonBar/index.js +11 -9
- package/dist/cjs/components/Camera/index.js +15 -9
- package/dist/cjs/components/CheckBox/index.js +11 -10
- package/dist/cjs/components/Chip/index.js +13 -10
- package/dist/cjs/components/ContentEditable/index.js +8 -0
- package/dist/cjs/components/DataTable/index.js +12 -10
- package/dist/cjs/components/DialogBox/index.js +21 -0
- package/dist/cjs/components/Dot/index.js +8 -3
- package/dist/cjs/components/DraggablePanel/index.js +10 -10
- package/dist/cjs/components/DropDown/index.js +12 -10
- package/dist/cjs/components/ErrorSummary/index.js +10 -7
- package/dist/cjs/components/FileIcon/index.js +8 -9
- package/dist/cjs/components/FileList/index.js +16 -10
- package/dist/cjs/components/FlexBox/index.js +23 -0
- package/dist/cjs/components/FlexDiv/index.js +11 -5
- package/dist/cjs/components/Icon/index.js +8 -7
- package/dist/cjs/components/IconButton/index.js +15 -21
- package/dist/cjs/components/ModalController/index.js +11 -6
- package/dist/cjs/components/Overlay/index.js +9 -3
- package/dist/cjs/components/Pager/index.js +9 -3
- package/dist/cjs/components/PopMenu/index.js +17 -0
- package/dist/cjs/components/PopMenuController/index.js +18 -0
- package/dist/cjs/components/Progress/index.js +13 -10
- package/dist/cjs/components/PromptInput/index.js +19 -13
- package/dist/cjs/components/RadioButton/index.js +11 -10
- package/dist/cjs/components/RadioButtonList/index.js +12 -10
- package/dist/cjs/components/Slider/index.js +4 -8
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +9 -3
- package/dist/cjs/components/Tab/index.js +15 -0
- package/dist/cjs/components/TabBar/index.js +15 -11
- package/dist/cjs/components/TextArea/index.js +11 -12
- package/dist/cjs/components/Textfield/index.js +15 -11
- package/dist/cjs/components/Tip/index.js +9 -4
- package/dist/cjs/components/Toast/index.js +13 -10
- package/dist/cjs/components/ToggleButton/index.js +14 -11
- package/dist/cjs/components/UploadArea/index.js +18 -12
- package/dist/cjs/components/Video/index.js +18 -14
- package/dist/cjs/components/VideoController/index.js +17 -13
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +4 -3
- package/dist/cjs/hooks/useClipboard.js +3 -2
- package/dist/cjs/hooks/useDoubleClick.js +6 -4
- package/dist/cjs/hooks/useInfiniteScroll.js +1 -1
- package/dist/cjs/hooks/useMdStreamBuffer.js +7 -2
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useObserveTheme.js +4 -4
- package/dist/cjs/hooks/useTheme.js +9 -1
- package/dist/cjs/hooks/useToolTip.js +27 -32
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks/useWindow.js +13 -23
- package/dist/cjs/hooks.js +13 -12
- package/dist/cjs/index.js +55 -47
- package/dist/cjs/providers/ThemeProvider.js +4 -3
- package/dist/cjs/providers/themeServer.test.js +398 -403
- package/dist/cjs/providers.js +4 -3
- package/dist/cjs/stores/LocalDB.js +8 -6
- package/dist/cjs/stores/SSE.js +4 -3
- package/dist/cjs/stores/WS.js +4 -3
- package/dist/cjs/stores/WebRTC.js +8 -6
- package/dist/cjs/stores/activeTab.js +1 -1
- package/dist/cjs/stores/browserChannel.js +5 -4
- package/dist/cjs/stores/microphone.js +2 -2
- package/dist/cjs/stores/modal.js +1 -1
- package/dist/cjs/stores/popMenu.js +7 -0
- 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 +38 -34
- package/dist/cjs/theme/colors.js +479 -231
- package/dist/cjs/theme/themes.js +3 -30
- package/dist/cjs/theme/type.js +31 -0
- package/dist/cjs/theme.js +10 -3
- package/dist/cjs/utils/index.js +24 -5
- package/dist/cjs/utils/objects/index.js +2 -2
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/css/type.module.css +27 -0
- package/dist/esm/chunks/ActionButton-guWI4qko.mjs +235 -0
- package/dist/esm/chunks/Attachment-BTSb0hKX.mjs +370 -0
- package/dist/esm/chunks/AudioBubble-D15lr4H6.mjs +68 -0
- package/dist/esm/chunks/AudioLevel-BcNrcGlh.mjs +63 -0
- package/dist/esm/chunks/Avatar-C4JzdLTW.mjs +132 -0
- package/dist/esm/chunks/AvatarGroup-Cn33-JkE.mjs +78 -0
- package/dist/esm/chunks/Badge-DpnuS-Ey.mjs +32 -0
- package/dist/esm/chunks/Button-BwTo8mSI.mjs +315 -0
- package/dist/esm/chunks/ButtonBar-BwHxexlC.mjs +111 -0
- package/dist/esm/chunks/Camera-DWmX5FZ-.mjs +585 -0
- package/dist/esm/chunks/CheckBox-CjmPDfLi.mjs +76 -0
- package/dist/esm/chunks/Chip-BfyUpZbH.mjs +223 -0
- package/dist/esm/chunks/ContentEditable-BvlyAJve.mjs +154 -0
- package/dist/esm/chunks/DialogBox-W9i6k5mv.mjs +224 -0
- package/dist/esm/chunks/Dot-CG395pS6.mjs +104 -0
- package/dist/esm/chunks/DrggablePanel-0Ef6TYrd.mjs +270 -0
- package/dist/esm/chunks/DropDown-CiB0Rp_P.mjs +286 -0
- package/dist/esm/chunks/ErrorSummary-3XoZyvmX.mjs +192 -0
- package/dist/esm/chunks/{FileIcon-B7_cbtHF.mjs → FileIcon-hKJZoGIx.mjs} +73 -53
- package/dist/esm/chunks/FileList-DxB0ZORo.mjs +220 -0
- package/dist/esm/chunks/FlexBox-VfQehVtm.mjs +296 -0
- package/dist/esm/chunks/FlexDiv-BZ5PBnE3.mjs +6 -0
- package/dist/esm/chunks/Icon-43T0fkr6.mjs +7841 -0
- package/dist/esm/chunks/IconButton-oqYTUJit.mjs +12 -0
- package/dist/esm/chunks/{IndexedDB-CB92RX6-.mjs → IndexedDB-DjCLZUf0.mjs} +1 -1
- package/dist/esm/chunks/ModalController-fvF-RWS8.mjs +169 -0
- package/dist/esm/chunks/ModalHostContext-BrT_g7sc.mjs +5 -0
- package/dist/esm/chunks/Overlay-C_FMcUyg.mjs +93 -0
- package/dist/esm/chunks/Pager-LqYNCZ8I.mjs +158 -0
- package/dist/esm/chunks/PopMenu-BkXfm6Sz.mjs +455 -0
- package/dist/esm/chunks/PopMenuController-Dj3uvc8F.mjs +44 -0
- package/dist/esm/chunks/ProgressIndicator-CR3pA1Me.mjs +266 -0
- package/dist/esm/chunks/PromptInput-Bq18i1Ac.mjs +266 -0
- package/dist/esm/chunks/RadioButton-DTUKMjvM.mjs +109 -0
- package/dist/esm/chunks/RadioButtonList-DsOgpe0m.mjs +99 -0
- package/dist/esm/chunks/Slider-DaZTE-eD.mjs +176 -0
- package/dist/esm/chunks/Spacer-CsJxUJ7E.mjs +24 -0
- package/dist/esm/chunks/Switch-BDFgMC0b.mjs +84 -0
- package/dist/esm/chunks/Tab-B8yJ9Qy4.mjs +105 -0
- package/dist/esm/chunks/TabBar-2kQmtcwW.mjs +214 -0
- package/dist/esm/chunks/TextArea-C32MToPG.mjs +201 -0
- package/dist/esm/chunks/TextField-BXrN1QkD.mjs +344 -0
- package/dist/esm/chunks/Tip-4R9wW1mE.mjs +133 -0
- package/dist/esm/chunks/ToggleButton-CGHa458C.mjs +61 -0
- package/dist/esm/chunks/UploadArea-Dq7ST-RG.mjs +237 -0
- package/dist/esm/chunks/Video-KuG0k3ly.mjs +418 -0
- package/dist/esm/chunks/VideoController-DQoDDY1a.mjs +201 -0
- package/dist/esm/chunks/{WSConnection-BENe51Ue.mjs → WSConnection-ByCYrNOq.mjs} +1 -1
- package/dist/esm/chunks/{WebRTCConnection-Cwx1C6Ta.mjs → WebRTCConnection-DTjS3UUU.mjs} +1 -1
- package/dist/esm/chunks/_types-B6NStINb.mjs +296 -0
- package/dist/esm/chunks/_types-ntN11tyz.mjs +910 -0
- package/dist/esm/chunks/audioVisualizer-BMSpJwTS.mjs +71 -0
- package/dist/esm/chunks/breakpoints-Dn9DgpJe.mjs +18 -0
- package/dist/esm/chunks/{browserChannelsStore-oGeBSxAT.mjs → browserChannelsStore-s7VUhLS9.mjs} +6 -2
- package/dist/esm/chunks/colors-DZ9xpMoE.mjs +63 -0
- package/dist/esm/chunks/files-6nwSZlJK.mjs +26 -0
- package/dist/esm/chunks/getVideoControls-aoqr4T3P.mjs +20 -0
- package/dist/esm/chunks/getWaterTransition-CrDSFJdk.mjs +12 -0
- package/dist/esm/chunks/{localDBStore-ZwQD3ino.mjs → localDBStore-DYhPmkHz.mjs} +7 -3
- package/dist/esm/chunks/{microphoneStore-D8VxjdFZ.mjs → microphoneStore-BzSEbtfK.mjs} +1 -1
- package/dist/esm/chunks/{misc-DBIXjc2Q.mjs → misc-DI5GSqkt.mjs} +24 -34
- package/dist/esm/chunks/{modalStore-GWNWh1tE.mjs → modalStore-BgYt3q8T.mjs} +20 -17
- package/dist/esm/chunks/popMenuStore-DtApFGaq.mjs +18 -0
- package/dist/esm/chunks/resolveColor-Kvs7kDyy.mjs +9 -0
- package/dist/esm/chunks/resolveColorProps-CwAU25V-.mjs +17 -0
- package/dist/esm/chunks/resolveShortcut-C43ivgMc.mjs +37 -0
- package/dist/esm/chunks/sharedTypes-DYXO7VNa.mjs +25 -0
- package/dist/esm/chunks/{sseStore-CZqJmpUR.mjs → sseStore-Duybemwt.mjs} +7 -3
- package/dist/esm/chunks/themes-DCtDY7XT.mjs +40 -0
- package/dist/esm/chunks/toastStore-Ds1Kx4-O.mjs +29 -0
- package/dist/esm/chunks/type.module--fVZ2ic7.mjs +28 -0
- package/dist/esm/chunks/{uploads-worker-DuyqBeHz.mjs → uploads-worker-CpJtBCvY.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-D9Ftk4Ke.mjs → uploadsStore-B_7wyr8k.mjs} +1 -1
- package/dist/esm/chunks/useAudioVisualizer-Dw8XLBmS.mjs +42 -0
- package/dist/esm/chunks/useModalHost-DiYFB7Mq.mjs +51 -0
- package/dist/esm/chunks/usePrefersReducedMotion-BWAwMMLE.mjs +15 -0
- package/dist/esm/chunks/viewState-D7e7CrHf.mjs +659 -0
- package/dist/esm/chunks/{volumeStore-hrteUkB-.mjs → volumeStore-mqWIRL0J.mjs} +1 -1
- package/dist/esm/chunks/{webRTCStore-B2ri-_li.mjs → webRTCStore-BepH2O9l.mjs} +7 -3
- package/dist/esm/chunks/{windowStore-DIdy_IoC.mjs → windowStore-C8rGk_0b.mjs} +1 -1
- package/dist/esm/components/Attachment/index.mjs +71 -0
- package/dist/esm/components/AudioBubble/index.mjs +21 -11
- package/dist/esm/components/AudioLevel/index.mjs +21 -0
- package/dist/esm/components/Avatar/index.mjs +9 -3
- package/dist/esm/components/AvatarGroup/index.mjs +10 -4
- package/dist/esm/components/Badge/index.mjs +8 -2
- package/dist/esm/components/Button/index.mjs +27 -17
- package/dist/esm/components/ButtonBar/index.mjs +22 -14
- package/dist/esm/components/Camera/index.mjs +37 -13
- package/dist/esm/components/CheckBox/index.mjs +20 -16
- package/dist/esm/components/Chip/index.mjs +27 -17
- package/dist/esm/components/ContentEditable/index.mjs +17 -0
- package/dist/esm/components/DataTable/index.mjs +27 -21
- package/dist/esm/components/DialogBox/index.mjs +75 -0
- package/dist/esm/components/Dot/index.mjs +28 -2
- package/dist/esm/components/DraggablePanel/index.mjs +16 -20
- package/dist/esm/components/DropDown/index.mjs +25 -15
- package/dist/esm/components/ErrorSummary/index.mjs +22 -10
- package/dist/esm/components/FileIcon/index.mjs +8 -16
- package/dist/esm/components/FileList/index.mjs +40 -16
- package/dist/esm/components/FlexBox/index.mjs +39 -0
- package/dist/esm/components/FlexDiv/index.mjs +33 -3
- package/dist/esm/components/Icon/index.mjs +15 -11
- package/dist/esm/components/IconButton/index.mjs +31 -19
- package/dist/esm/components/ModalController/index.mjs +33 -9
- package/dist/esm/components/Overlay/index.mjs +30 -2
- package/dist/esm/components/Pager/index.mjs +31 -3
- package/dist/esm/components/PopMenu/index.mjs +59 -0
- package/dist/esm/components/PopMenuController/index.mjs +63 -0
- package/dist/esm/components/Progress/index.mjs +21 -11
- package/dist/esm/components/PromptInput/index.mjs +43 -21
- package/dist/esm/components/RadioButton/index.mjs +18 -14
- package/dist/esm/components/RadioButtonList/index.mjs +23 -17
- package/dist/esm/components/Slider/index.mjs +5 -23
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +30 -2
- package/dist/esm/components/Tab/index.mjs +51 -0
- package/dist/esm/components/TabBar/index.mjs +32 -16
- package/dist/esm/components/TextArea/index.mjs +17 -23
- package/dist/esm/components/Textfield/index.mjs +33 -17
- package/dist/esm/components/Tip/index.mjs +29 -3
- package/dist/esm/components/Toast/index.mjs +23 -13
- package/dist/esm/components/ToggleButton/index.mjs +30 -22
- package/dist/esm/components/UploadArea/index.mjs +41 -17
- package/dist/esm/components/Video/index.mjs +34 -24
- package/dist/esm/components/VideoController/index.mjs +44 -26
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +12 -6
- package/dist/esm/hooks/useClipboard.mjs +9 -3
- package/dist/esm/hooks/useDoubleClick.mjs +8 -5
- package/dist/esm/hooks/useInfiniteScroll.mjs +1 -1
- package/dist/esm/hooks/useMdStreamBuffer.mjs +9 -3
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useObserveTheme.mjs +5 -1
- package/dist/esm/hooks/useTheme.mjs +5 -1
- package/dist/esm/hooks/useToolTip.mjs +28 -33
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks/useWindow.mjs +6 -22
- package/dist/esm/hooks.mjs +16 -10
- package/dist/esm/index.mjs +96 -60
- package/dist/esm/providers/ThemeProvider.mjs +5 -1
- package/dist/esm/providers/themeServer.test.mjs +398 -403
- package/dist/esm/providers.mjs +5 -1
- package/dist/esm/stores/LocalDB.mjs +10 -4
- package/dist/esm/stores/SSE.mjs +10 -4
- package/dist/esm/stores/WS.mjs +9 -3
- package/dist/esm/stores/WebRTC.mjs +10 -4
- package/dist/esm/stores/activeTab.mjs +1 -1
- package/dist/esm/stores/browserChannel.mjs +9 -3
- package/dist/esm/stores/microphone.mjs +2 -2
- package/dist/esm/stores/modal.mjs +1 -1
- package/dist/esm/stores/popMenu.mjs +3 -0
- 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 +28 -20
- package/dist/esm/theme/colors.mjs +479 -231
- package/dist/esm/theme/themes.mjs +6 -35
- package/dist/esm/theme/type.mjs +31 -0
- package/dist/esm/theme.mjs +5 -1
- package/dist/esm/utils/index.mjs +37 -12
- package/dist/esm/utils/objects/index.mjs +8 -8
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +5106 -3872
- package/dist/types/components/Attachment/Attachment.d.ts +2 -0
- package/dist/types/components/Attachment/AttachmentImagePreview.d.ts +6 -0
- package/dist/types/components/Attachment/_types.d.ts +47 -0
- package/dist/types/components/Attachment/index.d.ts +3 -0
- package/dist/types/components/Attachment/useContentThumbnail.d.ts +19 -0
- package/dist/types/components/AudioBubble/AudioBubble.d.ts +1 -1
- package/dist/types/components/AudioBubble/_types.d.ts +4 -3
- package/dist/types/components/AudioLevel/AudioLevel.d.ts +5 -0
- package/dist/types/components/AudioLevel/_types.d.ts +22 -0
- package/dist/types/components/AudioLevel/index.d.ts +2 -0
- package/dist/types/components/Avatar/Avatar.d.ts +6 -1
- package/dist/types/components/Avatar/_types.d.ts +28 -15
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/types/components/AvatarGroup/AvatarGroupContext.d.ts +7 -0
- package/dist/types/components/AvatarGroup/_types.d.ts +26 -15
- package/dist/types/components/AvatarGroup/index.d.ts +1 -1
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Badge/_types.d.ts +11 -3
- package/dist/types/components/Button/Button.d.ts +19 -52
- package/dist/types/components/Button/_types.d.ts +18 -14
- package/dist/types/components/ButtonBar/ButtonBar.d.ts +0 -14
- package/dist/types/components/ButtonBar/_types.d.ts +16 -13
- package/dist/types/components/Camera/Camera.d.ts +2 -4
- package/dist/types/components/Camera/_types.d.ts +25 -29
- package/dist/types/components/Camera/cameraSession.d.ts +59 -0
- package/dist/types/components/Camera/index.d.ts +1 -1
- package/dist/types/components/CheckBox/CheckBox.d.ts +1 -1
- package/dist/types/components/CheckBox/_types.d.ts +16 -4
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/Chip/_types.d.ts +35 -19
- package/dist/types/components/ContentEditable/ContentEditable.d.ts +3 -0
- package/dist/types/components/ContentEditable/_types.d.ts +26 -0
- package/dist/types/components/ContentEditable/index.d.ts +2 -0
- package/dist/types/components/DataTable/DataTable.d.ts +1 -1
- package/dist/types/components/DataTable/_types.d.ts +21 -11
- package/dist/types/components/DataTable/_useResizeColumn.d.ts +1 -1
- package/dist/types/components/DataTable/_useRowWindow.d.ts +1 -0
- package/dist/types/components/DataTable/compareValues.d.ts +2 -0
- package/dist/types/components/DialogBox/DialogBox.d.ts +6 -0
- package/dist/types/components/DialogBox/_types.d.ts +68 -0
- package/dist/types/components/DialogBox/index.d.ts +3 -0
- package/dist/types/components/DialogBox/parseSections.d.ts +7 -0
- package/dist/types/components/DialogBox/sections.d.ts +20 -0
- package/dist/types/components/DialogBox/useDialogBox.d.ts +4 -0
- package/dist/types/components/Dot/Dot.d.ts +1 -1
- package/dist/types/components/Dot/_types.d.ts +8 -2
- package/dist/types/components/DraggablePanel/DrggablePanel.d.ts +5 -55
- package/dist/types/components/DraggablePanel/_types.d.ts +46 -0
- package/dist/types/components/DraggablePanel/index.d.ts +1 -0
- package/dist/types/components/DraggablePanel/panelConstraints.d.ts +3 -0
- package/dist/types/components/DropDown/_types.d.ts +45 -16
- package/dist/types/components/DropDown/resolveOptions.d.ts +11 -0
- package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +30 -2
- package/dist/types/components/ErrorSummary/_types.d.ts +16 -4
- package/dist/types/components/FileIcon/FileIcon.d.ts +1 -2
- package/dist/types/components/FileIcon/_types.d.ts +11 -6
- package/dist/types/components/FileIcon/index.d.ts +2 -2
- package/dist/types/components/FileList/FileList.d.ts +2 -2
- package/dist/types/components/FileList/_types.d.ts +16 -6
- package/dist/types/components/FileList/fileListValues.d.ts +5 -0
- package/dist/types/components/FlexBox/FlexBox.d.ts +3 -0
- package/dist/types/components/FlexBox/_types.d.ts +62 -0
- package/dist/types/components/FlexBox/index.d.ts +2 -0
- package/dist/types/components/FlexDiv/FlexDiv.d.ts +2 -64
- package/dist/types/components/FlexDiv/_types.d.ts +4 -146
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/Icon/_types.d.ts +910 -132
- package/dist/types/components/Icon/iconRegistry.d.ts +3 -2
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/IconButton/ActionButton.d.ts +19 -0
- package/dist/types/components/IconButton/IconButton.d.ts +1 -1
- package/dist/types/components/IconButton/_types.d.ts +24 -72
- package/dist/types/components/IconButton/index.d.ts +1 -2
- package/dist/types/components/ModalController/ModalController.d.ts +2 -2
- package/dist/types/components/ModalController/ModalHostContext.d.ts +1 -0
- package/dist/types/components/ModalController/_types.d.ts +3 -5
- package/dist/types/components/ModalController/useModalHost.d.ts +3 -0
- package/dist/types/components/Overlay/Overlay.d.ts +1 -1
- package/dist/types/components/Overlay/_types.d.ts +7 -8
- package/dist/types/components/Pager/Pager.d.ts +1 -1
- package/dist/types/components/Pager/_types.d.ts +21 -5
- package/dist/types/components/Pager/pagerLogic.d.ts +9 -0
- package/dist/types/components/PopMenu/PopMenu.d.ts +3 -0
- package/dist/types/components/PopMenu/PopMenuContext.d.ts +10 -0
- package/dist/types/components/PopMenu/PopMenuGroup.d.ts +2 -0
- package/dist/types/components/PopMenu/PopMenuItem.d.ts +3 -0
- package/dist/types/components/PopMenu/_types.d.ts +110 -0
- package/dist/types/components/PopMenu/index.d.ts +4 -0
- package/dist/types/components/PopMenu/usePopMenu.d.ts +17 -0
- package/dist/types/components/PopMenu/usePopMenuPortal.d.ts +3 -0
- package/dist/types/components/PopMenuController/PopMenuController.d.ts +2 -0
- package/dist/types/components/PopMenuController/index.d.ts +1 -0
- package/dist/types/components/Progress/DoneCheck/DoneCheck.d.ts +1 -1
- package/dist/types/components/Progress/DoneCheck/_types.d.ts +5 -2
- package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +2 -4
- package/dist/types/components/Progress/ProgressIndicator/_types.d.ts +19 -7
- package/dist/types/components/Progress/ProgressIndicator/useSpinnerPlayback.d.ts +3 -0
- package/dist/types/components/PromptInput/PromptInput.d.ts +50 -15
- package/dist/types/components/PromptInput/_types.d.ts +45 -8
- package/dist/types/components/PromptInput/index.d.ts +1 -1
- package/dist/types/components/PromptInput/promptText.d.ts +6 -0
- package/dist/types/components/RadioButton/RadioGroupContext.d.ts +11 -0
- package/dist/types/components/RadioButton/_types.d.ts +24 -13
- package/dist/types/components/RadioButtonList/_types.d.ts +17 -19
- package/dist/types/components/RadioButtonList/index.d.ts +1 -1
- package/dist/types/components/Slider/Slider.d.ts +1 -1
- package/dist/types/components/Slider/_types.d.ts +15 -9
- package/dist/types/components/Slider/sliderLogic.d.ts +6 -0
- package/dist/types/components/Spacer/index.d.ts +1 -1
- package/dist/types/components/Switch/_types.d.ts +18 -7
- package/dist/types/components/Tab/Tab.d.ts +3 -0
- package/dist/types/components/Tab/_types.d.ts +26 -0
- package/dist/types/components/Tab/index.d.ts +2 -0
- package/dist/types/components/TabBar/TabBar.d.ts +1 -1
- package/dist/types/components/TabBar/_types.d.ts +14 -37
- package/dist/types/components/TabBar/index.d.ts +1 -1
- package/dist/types/components/TabBar/shared.d.ts +22 -0
- package/dist/types/components/TextArea/TextArea.d.ts +1 -1
- package/dist/types/components/TextArea/_types.d.ts +32 -11
- package/dist/types/components/TextArea/index.d.ts +1 -1
- package/dist/types/components/Textfield/TextField.d.ts +2 -2
- package/dist/types/components/Textfield/_types.d.ts +41 -37
- package/dist/types/components/Tip/Tip.d.ts +1 -2
- package/dist/types/components/Tip/_types.d.ts +11 -18
- package/dist/types/components/Tip/useTipVisibility.d.ts +6 -0
- package/dist/types/components/Toast/Toast.d.ts +2 -2
- package/dist/types/components/Toast/_types.d.ts +25 -12
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/useToastLifecycle.d.ts +15 -0
- package/dist/types/components/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/types/components/ToggleButton/_types.d.ts +18 -30
- package/dist/types/components/UploadArea/UploadArea.d.ts +27 -19
- package/dist/types/components/UploadArea/_types.d.ts +23 -20
- package/dist/types/components/UploadArea/index.d.ts +1 -1
- package/dist/types/components/UploadArea/selection.d.ts +7 -0
- package/dist/types/components/UploadArea/useFileSelection.d.ts +30 -0
- package/dist/types/components/Video/Video.d.ts +2 -72
- package/dist/types/components/Video/_types.d.ts +37 -11
- package/dist/types/components/Video/getVideoControls.d.ts +3 -0
- package/dist/types/components/Video/index.d.ts +1 -1
- package/dist/types/components/VideoController/VideoController.d.ts +1 -1
- package/dist/types/components/VideoController/_types.d.ts +6 -1
- package/dist/types/components/playHelpers.d.ts +10 -233
- package/dist/types/components/sharedTypes.d.ts +31 -0
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/types/hooks/useToolTip/useToolTip.d.ts +1 -0
- package/dist/types/hooks/useWindow/useWindow.d.ts +5 -16
- package/dist/types/index.d.ts +39 -30
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/popMenu/_types.d.ts +13 -0
- package/dist/types/stores/popMenu/index.d.ts +2 -0
- package/dist/types/stores/popMenu/popMenuStore.d.ts +12 -0
- package/dist/types/stores/toast/_types.d.ts +6 -11
- package/dist/types/stores/toast/toastStore.d.ts +6 -6
- package/dist/types/stores/window/windowStore.d.ts +2 -2
- package/dist/types/theme/breakpoints/breakpoints.d.ts +11 -0
- package/dist/types/theme/colors/palette.d.ts +461 -0
- package/dist/types/theme/colors/recipes.d.ts +34 -0
- package/dist/types/theme/colors/resolveColor.d.ts +7 -0
- package/dist/types/theme/colors/types.d.ts +8 -92
- package/dist/types/theme/index.d.ts +4 -0
- package/dist/types/theme/type/type.d.ts +1 -0
- package/dist/types/theme/type/types.d.ts +3 -0
- package/dist/types/utils/audio/useAudioVisualizer.d.ts +3 -0
- package/dist/types/utils/functions/colors.d.ts +7 -0
- package/dist/types/utils/functions/files.d.ts +3 -4
- package/dist/types/utils/functions/misc.d.ts +12 -2
- package/dist/types/utils/functions/resolveColorProps.d.ts +2 -0
- package/dist/types/utils/functions/resolveShortcut.d.ts +3 -0
- package/dist/types/utils/index.d.ts +5 -1
- package/dist/types/utils/objects/audioVisualizer/audioVisualizer.d.ts +3 -0
- package/dist/types/utils/styling/getWaterTransition.d.ts +4 -0
- package/dist/types/utils/styling/reduceMotionTargets.d.ts +4 -0
- package/dist/types/utils/styling/usePrefersReducedMotion.d.ts +2 -0
- package/package.json +195 -193
- package/scripts/README.md +19 -0
- package/dist/cjs/chunks/AudioBubble-DAtkPfFK.js +0 -55
- package/dist/cjs/chunks/Avatar-BI8Gvsp7.js +0 -82
- package/dist/cjs/chunks/AvatarGroup-1IxbG6-D.js +0 -41
- package/dist/cjs/chunks/Badge-DMey3Pf3.js +0 -22
- package/dist/cjs/chunks/Button-BjmkIu7l.js +0 -265
- package/dist/cjs/chunks/ButtonBar-BxA8GQPM.js +0 -72
- package/dist/cjs/chunks/Camera-ByjATQDE.js +0 -380
- package/dist/cjs/chunks/CheckBox-DZng-9wI.js +0 -51
- package/dist/cjs/chunks/Chip-CqUDN_QK.js +0 -80
- package/dist/cjs/chunks/DivInput-GYDtuy4a.js +0 -101
- package/dist/cjs/chunks/Dot-BgyxIyrr.js +0 -72
- package/dist/cjs/chunks/DrggablePanel-BjOFnl0l.js +0 -224
- package/dist/cjs/chunks/DropDown-C0vZNCK4.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-CVzk_ASK.js +0 -88
- package/dist/cjs/chunks/FileList-6qXKA_Ux.js +0 -223
- package/dist/cjs/chunks/FlexDiv-LwjVh6ls.js +0 -178
- package/dist/cjs/chunks/Grouper-BlWyuh_b.js +0 -63
- package/dist/cjs/chunks/Icon-BTjtQLNe.js +0 -1473
- package/dist/cjs/chunks/IconButton-C0yNYhI6.js +0 -182
- package/dist/cjs/chunks/Label-DsMFZd91.js +0 -106
- package/dist/cjs/chunks/Level-VKdsTW_-.js +0 -63
- package/dist/cjs/chunks/Modal-Dp5Wg1Bw.js +0 -128
- package/dist/cjs/chunks/ModalController-Cb2_7DtS.js +0 -81
- package/dist/cjs/chunks/Overlay-hOm9sYjr.js +0 -41
- package/dist/cjs/chunks/Pager-CPhi9uyP.js +0 -36
- package/dist/cjs/chunks/ProgressIndicator-CMsc_Npc.js +0 -140
- package/dist/cjs/chunks/PromptInput-6eDiLG4g.js +0 -161
- package/dist/cjs/chunks/RadioButton-DMxqwM6_.js +0 -55
- package/dist/cjs/chunks/RadioButtonList-kG_Y1d4X.js +0 -73
- package/dist/cjs/chunks/Slider-DGJomZGG.js +0 -169
- package/dist/cjs/chunks/Spacer-Z97EoNtJ.js +0 -26
- package/dist/cjs/chunks/Switch-CfzJd19R.js +0 -44
- package/dist/cjs/chunks/TabBar-C2aNS0Sd.js +0 -183
- package/dist/cjs/chunks/TextArea-G_MUJAHw.js +0 -77
- package/dist/cjs/chunks/TextField-CWIGERkd.js +0 -190
- package/dist/cjs/chunks/Tip-B7RF879X.js +0 -89
- package/dist/cjs/chunks/Toast-pkSkNuZo.js +0 -185
- package/dist/cjs/chunks/ToggleButton-DPc2x2EV.js +0 -45
- package/dist/cjs/chunks/UploadArea-DyVGwChS.js +0 -132
- package/dist/cjs/chunks/Video-Dh-_ouTP.js +0 -301
- package/dist/cjs/chunks/VideoController-CVm1CtaE.js +0 -95
- package/dist/cjs/chunks/_types-DxINS-ge.js +0 -140
- package/dist/cjs/chunks/audioVisualizer-C74sRH6D.js +0 -60
- package/dist/cjs/chunks/colors-BDwwQ2Y3.js +0 -27
- package/dist/cjs/chunks/debounce-Bi3gt_i6.js +0 -18
- package/dist/cjs/chunks/sharedTypes-XAbs742N.js +0 -6
- package/dist/cjs/chunks/toastStore-Bwus7v5O.js +0 -17
- package/dist/cjs/chunks/viewState-BVtEQ4sR.js +0 -497
- package/dist/cjs/components/DivInput/index.js +0 -7
- package/dist/cjs/components/Grouper/index.js +0 -14
- package/dist/cjs/components/Label/index.js +0 -12
- package/dist/cjs/components/Level/index.js +0 -7
- package/dist/cjs/components/Modal/index.js +0 -15
- package/dist/esm/chunks/AudioBubble-B8vlO9fq.mjs +0 -69
- package/dist/esm/chunks/Avatar-BMHnrzr3.mjs +0 -88
- package/dist/esm/chunks/AvatarGroup-BoBXPEbH.mjs +0 -47
- package/dist/esm/chunks/Badge-C7xDwrvC.mjs +0 -26
- package/dist/esm/chunks/Button-C6sTA1hG.mjs +0 -283
- package/dist/esm/chunks/ButtonBar-Bh3-UpMU.mjs +0 -82
- package/dist/esm/chunks/Camera-BXSLetAD.mjs +0 -398
- package/dist/esm/chunks/CheckBox-DkXJwLeU.mjs +0 -61
- package/dist/esm/chunks/Chip-XTbAoiHl.mjs +0 -92
- package/dist/esm/chunks/DivInput-TsyOx4x2.mjs +0 -113
- package/dist/esm/chunks/Dot-D0NtTwqi.mjs +0 -78
- package/dist/esm/chunks/DrggablePanel-BK9ukIbF.mjs +0 -236
- package/dist/esm/chunks/DropDown-F7yIB6EJ.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-SseJ5z1U.mjs +0 -101
- package/dist/esm/chunks/FileList-Bv9yn2QS.mjs +0 -231
- package/dist/esm/chunks/FlexDiv-3OxQ9y_1.mjs +0 -188
- package/dist/esm/chunks/Grouper-BcrjlgM-.mjs +0 -83
- package/dist/esm/chunks/Icon-He4S-Q8N.mjs +0 -1487
- package/dist/esm/chunks/IconButton-BGL-_8VW.mjs +0 -197
- package/dist/esm/chunks/Label-BouM6sY2.mjs +0 -119
- package/dist/esm/chunks/Level-CTkhQuiZ.mjs +0 -68
- package/dist/esm/chunks/Modal-BnbUOsKH.mjs +0 -142
- package/dist/esm/chunks/ModalController-Dk2VZcXW.mjs +0 -92
- package/dist/esm/chunks/Overlay-D5cMQSvL.mjs +0 -47
- package/dist/esm/chunks/Pager-4-2T_ZbJ.mjs +0 -42
- package/dist/esm/chunks/ProgressIndicator-DBf_bLtr.mjs +0 -156
- package/dist/esm/chunks/PromptInput-I10dUhFO.mjs +0 -175
- package/dist/esm/chunks/RadioButton-ZD7w9pql.mjs +0 -63
- package/dist/esm/chunks/RadioButtonList-h2_5VM4X.mjs +0 -81
- package/dist/esm/chunks/Slider-2Q6yVb8H.mjs +0 -183
- package/dist/esm/chunks/Spacer-Rj8PKnt3.mjs +0 -28
- package/dist/esm/chunks/Switch-C4zkPOMU.mjs +0 -50
- package/dist/esm/chunks/TabBar-bYgmIa-q.mjs +0 -205
- package/dist/esm/chunks/TextArea-BS0Iu1RB.mjs +0 -87
- package/dist/esm/chunks/TextField-BT1quQpj.mjs +0 -210
- package/dist/esm/chunks/Tip-B4Tg6gIC.mjs +0 -99
- package/dist/esm/chunks/Toast-DWHhX64K.mjs +0 -203
- package/dist/esm/chunks/ToggleButton-KAplYW5q.mjs +0 -53
- package/dist/esm/chunks/UploadArea-D_ytxxSf.mjs +0 -142
- package/dist/esm/chunks/Video-BHSzz3Wx.mjs +0 -316
- package/dist/esm/chunks/VideoController-D9ihYFYq.mjs +0 -114
- package/dist/esm/chunks/_types-FIe85AYv.mjs +0 -140
- package/dist/esm/chunks/audioVisualizer-BiB7Hun_.mjs +0 -60
- package/dist/esm/chunks/colors-DAIBQReF.mjs +0 -30
- package/dist/esm/chunks/debounce-BPsURiHk.mjs +0 -19
- package/dist/esm/chunks/sharedTypes-DdC4rvjp.mjs +0 -8
- package/dist/esm/chunks/toastStore-CRMyZAzS.mjs +0 -15
- package/dist/esm/chunks/viewState-BdLOLJlv.mjs +0 -527
- package/dist/esm/components/DivInput/index.mjs +0 -13
- package/dist/esm/components/Grouper/index.mjs +0 -47
- package/dist/esm/components/Label/index.mjs +0 -11
- package/dist/esm/components/Level/index.mjs +0 -15
- package/dist/esm/components/Modal/index.mjs +0 -57
- package/dist/types/components/DataTable/_resolveVirtualizeRows.test.d.ts +0 -1
- package/dist/types/components/DataTable/_useReorderColumns.test.d.ts +0 -1
- package/dist/types/components/DataTable/_useResizeColumn.test.d.ts +0 -1
- package/dist/types/components/DataTable/_useRowWindow.test.d.ts +0 -1
- package/dist/types/components/DataTable/columnHelper.test.d.ts +0 -1
- package/dist/types/components/DataTable/viewState.test.d.ts +0 -1
- package/dist/types/components/DivInput/DivInput.d.ts +0 -3
- package/dist/types/components/DivInput/_types.d.ts +0 -24
- package/dist/types/components/DivInput/index.d.ts +0 -2
- package/dist/types/components/Grouper/Grouper.d.ts +0 -3
- package/dist/types/components/Grouper/_types.d.ts +0 -20
- package/dist/types/components/Grouper/index.d.ts +0 -2
- package/dist/types/components/Icon/iconRegistry.test.d.ts +0 -1
- package/dist/types/components/IconButton/_animation.d.ts +0 -18
- package/dist/types/components/IconButton/_animation.test.d.ts +0 -1
- package/dist/types/components/Label/Label.d.ts +0 -3
- package/dist/types/components/Label/_types.d.ts +0 -25
- package/dist/types/components/Label/index.d.ts +0 -3
- package/dist/types/components/Level/Level.d.ts +0 -5
- package/dist/types/components/Level/_types.d.ts +0 -21
- package/dist/types/components/Level/index.d.ts +0 -2
- package/dist/types/components/Modal/Modal.d.ts +0 -3
- package/dist/types/components/Modal/_types.d.ts +0 -49
- package/dist/types/components/Modal/index.d.ts +0 -2
- package/dist/types/hooks/useActiveTab/useActiveTab.test.d.ts +0 -1
- package/dist/types/hooks/useAudioRecorder/useAudioRecorder.test.d.ts +0 -1
- package/dist/types/hooks/useBindWebRTC/useBindWebRTC.test.d.ts +0 -1
- package/dist/types/hooks/useClipboard/useClipboard.test.d.ts +0 -1
- package/dist/types/hooks/useDoubleClick/useDoubleClick.test.d.ts +0 -1
- package/dist/types/hooks/useInfiniteScroll/useInfiniteScroll.test.d.ts +0 -1
- package/dist/types/hooks/useIntersecting/useIntersecting.test.d.ts +0 -1
- package/dist/types/hooks/useKeyboardShortcuts/useKeyboardShortcuts.test.d.ts +0 -1
- package/dist/types/hooks/useLastUpdated/useLastUpdated.test.d.ts +0 -1
- package/dist/types/hooks/useLocalStore/useLocalStore.test.d.ts +0 -1
- package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.test.d.ts +0 -1
- package/dist/types/hooks/useMicrophone/useMicrophone.test.d.ts +0 -1
- package/dist/types/hooks/useObserveTheme/useObserveTheme.test.d.ts +0 -1
- package/dist/types/hooks/useTheme/useTheme.test.d.ts +0 -1
- package/dist/types/hooks/useToolTip/useToolTip.test.d.ts +0 -1
- package/dist/types/hooks/useTrackRenders/useTrackRenders.test.d.ts +0 -1
- package/dist/types/hooks/useWindow/useWindow.test.d.ts +0 -1
- package/dist/types/providers/themeServer.test.d.ts +0 -1
- package/dist/types/stores/LocalDB/localDBStore.test.d.ts +0 -1
- package/dist/types/stores/SSE/sseStore.test.d.ts +0 -1
- package/dist/types/stores/WS/wsStore.test.d.ts +0 -1
- package/dist/types/stores/WebRTC/webRTCStore.test.d.ts +0 -1
- package/dist/types/stores/activeTab/activeTabStore.test.d.ts +0 -1
- package/dist/types/stores/browserChannel/browserChannelsStore.test.d.ts +0 -1
- package/dist/types/stores/microphone/microphoneStore.test.d.ts +0 -1
- package/dist/types/stores/modal/modalStore.test.d.ts +0 -1
- package/dist/types/stores/tip/tipStore.test.d.ts +0 -1
- package/dist/types/stores/toast/toastStore.test.d.ts +0 -1
- package/dist/types/stores/uploads/uploadsStore.test.d.ts +0 -1
- package/dist/types/stores/video/videoStore.test.d.ts +0 -1
- package/dist/types/stores/volume/volumeStore.test.d.ts +0 -1
- package/dist/types/stores/window/windowStore.test.d.ts +0 -1
- package/dist/types/utils/functions/colors.test.d.ts +0 -1
- package/dist/types/utils/functions/debounce.test.d.ts +0 -1
- package/dist/types/utils/functions/files.test.d.ts +0 -1
- package/dist/types/utils/functions/misc.test.d.ts +0 -1
- package/dist/types/utils/functions/rafThrottle.test.d.ts +0 -1
- package/dist/types/utils/objects/IndexedDB/IndexedDB.test.d.ts +0 -1
- package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.test.d.ts +0 -1
- package/dist/types/utils/objects/SSEConnection/SSEConnection.test.d.ts +0 -1
- package/dist/types/utils/objects/WSConnection/WSConnection.test.d.ts +0 -1
- package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.test.d.ts +0 -1
- package/dist/types/utils/objects/audioVisualizer/audioVisualizer.test.d.ts +0 -1
- package/dist/types/utils/objects/browserChannel/broadcastChannel.test.d.ts +0 -1
- package/dist/types/workers/uploads/uploads-worker.test.d.ts +0 -1
- /package/dist/cjs/chunks/{MdStreamBuffer-DiL2zm2P.js → MdStreamBuffer-B0KtaR_k.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-CTxnFASS.js → SSEConnection-BXWkgT66.js} +0 -0
- /package/dist/cjs/chunks/{activeTabStore-C8afog5l.js → activeTabStore-D2gxAoK6.js} +0 -0
- /package/dist/cjs/chunks/{broadcastChannel-DLSijpj_.js → broadcastChannel-DdPZ3LUB.js} +0 -0
- /package/dist/cjs/chunks/{magic-string.es-DRDyITUv.js → magic-string.es-DsAR0Q7u.js} +0 -0
- /package/dist/cjs/chunks/{rafThrottle-DdNEpMIw.js → rafThrottle-BRdLzPo7.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-BKFK6F3e.js → tipStore-DDHyGeyK.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-B2uEaXWi.js → tslib.es6-B8JY5ZGw.js} +0 -0
- /package/dist/cjs/chunks/{videoStore-BYmE3fJZ.js → videoStore-B0l9iBw4.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-D2Yh0SCY.mjs → MdStreamBuffer-CcO5IBxD.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-B3iPwyF_.mjs → SSEConnection-B5rVxalP.mjs} +0 -0
- /package/dist/esm/chunks/{activeTabStore-BsoH1tFV.mjs → activeTabStore-CCstpXAC.mjs} +0 -0
- /package/dist/esm/chunks/{broadcastChannel-DahousoM.mjs → broadcastChannel-CPT0S33H.mjs} +0 -0
- /package/dist/esm/chunks/{magic-string.es-DOKITkor.mjs → magic-string.es-CI4cCGRB.mjs} +0 -0
- /package/dist/esm/chunks/{rafThrottle-BX9f7-D1.mjs → rafThrottle-Dl8Z5sJ-.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-CF42G3w9.mjs → tipStore-CBvk303u.mjs} +0 -0
- /package/dist/esm/chunks/{tslib.es6-DatKI43-.mjs → tslib.es6-CpnJrDBv.mjs} +0 -0
- /package/dist/esm/chunks/{videoStore-CiDDAB4E.mjs → videoStore-Cd-Lewfy.mjs} +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Slice (`@apple-pie/slice`)
|
|
2
2
|
|
|
3
|
+
Repository guidance: [AGENTS.md](../../AGENTS.md).
|
|
4
|
+
|
|
3
5
|
Slice is a TypeScript-first React UI kit with themed components, hooks, optional Zustand stores, worker-backed uploads, and Storybook documentation.
|
|
4
6
|
|
|
5
7
|
The package is currently in beta. Until `1.0.0`, breaking API changes may still happen.
|
|
@@ -119,7 +121,7 @@ npm run lint
|
|
|
119
121
|
Contributor setup and workflow:
|
|
120
122
|
|
|
121
123
|
- [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
122
|
-
- [
|
|
124
|
+
- [docs/build-architecture.md](./docs/build-architecture.md)
|
|
123
125
|
|
|
124
126
|
## License
|
|
125
127
|
|
|
@@ -129,3 +131,17 @@ Contributor setup and workflow:
|
|
|
129
131
|
|
|
130
132
|
- Documentation and demos: https://slice-uikit.com
|
|
131
133
|
- Source and issues: https://github.com/uris/slice
|
|
134
|
+
|
|
135
|
+
## Scrollbar styling
|
|
136
|
+
|
|
137
|
+
After importing `@apple-pie/slice/styles.css`, apply `slice-scrollbars` to a scrollable element:
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
<div className="slice-scrollbars" style={{ overflowY: 'auto', maxHeight: 320 }}>
|
|
141
|
+
{children}
|
|
142
|
+
</div>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
This uses the same scrollbar styles as Slice components. Override `--scrollbar-size`,
|
|
146
|
+
`--scrollbar-bg`, `--scrollbar-thumb`, and `--scrollbar-thumb-hover` on the element to
|
|
147
|
+
customize its appearance. The class styles scrollbars; it does not enable scrolling.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), mini = require("motion/mini"), react = require("motion/react"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
|
+
|
|
6
|
+
require("../theme/colors.js"), require("../theme/type.js"), require("./resolveColor-DkYThq2J.js"),
|
|
7
|
+
require("./breakpoints-BDw1OJh9.js"), require("./broadcastChannel-DdPZ3LUB.js"),
|
|
8
|
+
require("./files-RYD9L_pI.js"), require("./webRTCStore-OGkXAovD.js"), require("./microphoneStore-D7DuvQeX.js"),
|
|
9
|
+
require("./volumeStore-BoEoo9wA.js");
|
|
10
|
+
|
|
11
|
+
var resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), getWaterTransition = require("./getWaterTransition-s_55VKK2.js"), usePrefersReducedMotion = require("./usePrefersReducedMotion-GpD17CAE.js"), Badge = require("./Badge-DtVP2qH0.js"), Dot = require("./Dot-0Dv8WX0n.js"), Icon = require("./Icon-COY7IZkK.js"), sharedTypes = require("./sharedTypes-BDMIewR9.js"), css_button = "IconButton-module_button__rziqa flexBox-module_row__z24tF", css_background = "IconButton-module_background__BAuJE", css_content = "IconButton-module_content__nlYrR", css_icon = "IconButton-module_icon__2DDWy", css_indicators = "IconButton-module_indicators__7TT69", css_count = "IconButton-module_count__6r373", css_slot = "IconButton-module_slot__ZG-D0", css_frame = "IconButton-module_frame__Bip5r";
|
|
12
|
+
|
|
13
|
+
const sizes = sharedTypes.buttonStyleDefaults.sizes;
|
|
14
|
+
|
|
15
|
+
/** Keep the native button mounted when a live motion preference changes. */ function AnimatedSurface({target: target, transition: transition, reduceMotion: reduceMotion, className: className, children: children}) {
|
|
16
|
+
const controls = react.useAnimationControls(), mounted = React.useRef(!1);
|
|
17
|
+
return React.useEffect(() => {
|
|
18
|
+
controls.stop();
|
|
19
|
+
const {transition: _variantTiming, transitionEnd: transitionEnd} = target, values = tslib_es6.__rest(target, [ "transition", "transitionEnd" ]);
|
|
20
|
+
if (reduceMotion || !mounted.current) {
|
|
21
|
+
const settled = Object.fromEntries(Object.entries(Object.assign(Object.assign({}, values), transitionEnd)).map(([key, value]) => [ key, Array.isArray(value) ? [ ...value ].reverse().find(item => null !== item) : value ]));
|
|
22
|
+
controls.set(settled);
|
|
23
|
+
} else controls.start(Object.assign(Object.assign({}, values), {
|
|
24
|
+
transitionEnd: transitionEnd,
|
|
25
|
+
transition: transition
|
|
26
|
+
}));
|
|
27
|
+
return mounted.current = !0, () => controls.stop();
|
|
28
|
+
}, [ controls, target, transition, reduceMotion ]), jsxRuntime.jsx(react.motion.span, {
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: className,
|
|
31
|
+
initial: !1,
|
|
32
|
+
animate: controls,
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Let the browser blend translucent CSS colors, including live theme color-mix() values. */ function AnimatedBackground({color: color, transition: transition, reduceMotion: reduceMotion}) {
|
|
38
|
+
const ref = React.useRef(null), mounted = React.useRef(!1);
|
|
39
|
+
return React.useLayoutEffect(() => {
|
|
40
|
+
const element = ref.current;
|
|
41
|
+
if (!element) return;
|
|
42
|
+
const _a = react.getValueTransition(transition, "backgroundColor"), {type: type} = _a, timing = tslib_es6.__rest(_a, [ "type" ]);
|
|
43
|
+
if (!mounted.current || reduceMotion || !1 === type || "function" != typeof element.animate) return element.style.backgroundColor = color,
|
|
44
|
+
void (mounted.current = !0);
|
|
45
|
+
const generator = "spring" === type ? react.spring : "inertia" === type || "decay" === type ? react.inertia : "function" == typeof type ? type : void 0, animation = mini.animate(element, {
|
|
46
|
+
backgroundColor: color
|
|
47
|
+
}, (() => {
|
|
48
|
+
if (!generator || generator.applyToOptions) return Object.assign(Object.assign({}, timing), {
|
|
49
|
+
type: generator
|
|
50
|
+
});
|
|
51
|
+
const generated = react.createGeneratorEasing(Object.assign(Object.assign({}, timing), {
|
|
52
|
+
duration: void 0 === timing.duration ? void 0 : 1e3 * timing.duration
|
|
53
|
+
}), 100, generator);
|
|
54
|
+
return Object.assign(Object.assign({}, timing), {
|
|
55
|
+
ease: generated.ease,
|
|
56
|
+
duration: generated.duration
|
|
57
|
+
});
|
|
58
|
+
})());
|
|
59
|
+
return () => animation.stop();
|
|
60
|
+
}, [ color, transition, reduceMotion ]), jsxRuntime.jsx("span", {
|
|
61
|
+
ref: ref,
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
className: css_background
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const ActionButton = React.memo(function(rawProps) {
|
|
68
|
+
const props = resolveColorProps.resolveColorProps(rawProps), {actionName: actionName = "Action", labelContent: labelContent, contentClassName: contentClassName, iconSelected: iconSelected, iconFrame: iconFrame = !1, deselect: deselect = !0, textColor: textColor = "var(--core-text-primary)", textColorHover: textColorHover = "var(--core-text-primary)", textColorSelected: textColorSelected = "var(--core-text-primary)", buttonSize: buttonSize = "m", iconSize: iconSize = 20, iconStrokeWidth: iconStrokeWidth, icon: icon = "basic.more-horiz", iconFill: iconFill = !1, iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-primary)", iconColorSelected: iconColorSelected = "var(--core-text-primary)", backgroundColor: backgroundColor = "var(--core-surface-secondary)", backgroundColorHover: backgroundColorHover = "var(--core-outline-primary)", backgroundColorSelected: backgroundColorSelected = "var(--core-outline-primary)", borderWidth: borderWidth = 0, borderColor: borderColor = "var(--core-outline-primary)", borderRadius: borderRadius = "50%", disabled: disabled = !1, hover: hover = !0, toggle: toggle = !1, selected: selected, defaultSelected: defaultSelected = !1, toggleIcon: toggleIcon = !1, showDot: showDot = !1, count: count = 0, tooltip: tooltip, motionValues: motionValues, transition: transition, onChange: onChange, onToolTip: onToolTip, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur, className: className, style: style, type: type = "button"} = props, buttonAttributes = tslib_es6.__rest(props, [ "actionName", "labelContent", "contentClassName", "iconSelected", "iconFrame", "deselect", "textColor", "textColorHover", "textColorSelected", "buttonSize", "iconSize", "iconStrokeWidth", "icon", "iconFill", "iconColor", "iconColorHover", "iconColorSelected", "backgroundColor", "backgroundColorHover", "backgroundColorSelected", "borderWidth", "borderColor", "borderRadius", "disabled", "hover", "toggle", "selected", "defaultSelected", "toggleIcon", "showDot", "count", "tooltip", "motionValues", "transition", "onChange", "onToolTip", "onClick", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "className", "style", "type" ]), [internalSelected, setInternalSelected] = React.useState(defaultSelected), [hovered, setHovered] = React.useState(!1), on = toggle && (null != selected ? selected : internalSelected), ref = React.useRef(null), focused = React.useRef(!1), pointerOver = React.useRef(!1), tipOpen = React.useRef(!1), tipCallback = React.useRef(onToolTip), hasTipCallback = Boolean(onToolTip), reduceMotion = usePrefersReducedMotion.usePrefersReducedMotion(), {current: theme} = hooks_useTheme.useTheme(), themeMotion = theme.motion, motionTransition = React.useMemo(() => getWaterTransition.getWaterTransition(themeMotion, transition), [ themeMotion, transition ]), activeHover = hover && hovered && !disabled, size = "auto" === buttonSize ? 0 : "number" == typeof buttonSize ? Number.isFinite(buttonSize) && buttonSize > 0 ? buttonSize : sizes.m : null !== (_a = sizes[buttonSize]) && void 0 !== _a ? _a : sizes.m;
|
|
69
|
+
var _a;
|
|
70
|
+
const resolvedIconSize = Number.isFinite(iconSize) && iconSize >= 0 ? iconSize : 20, radius = "number" == typeof borderRadius ? `${Number.isFinite(borderRadius) ? Math.max(0, borderRadius) : 0}px` : borderRadius, color = on ? iconColorSelected : activeHover ? iconColorHover : iconColor, background = on ? backgroundColorSelected : activeHover ? backgroundColorHover : backgroundColor, iconTarget = React.useMemo(() => {
|
|
71
|
+
const variant = null == motionValues ? void 0 : motionValues[on ? "selected" : "unselected"], resolved = "function" == typeof variant ? variant(on, {}, {}) : variant;
|
|
72
|
+
return Object.assign(Object.assign({
|
|
73
|
+
rotate: 0,
|
|
74
|
+
scale: 1,
|
|
75
|
+
opacity: 1
|
|
76
|
+
}, "object" == typeof resolved ? resolved : {}), {
|
|
77
|
+
color: null != color ? color : "var(--core-text-primary)"
|
|
78
|
+
});
|
|
79
|
+
}, [ motionValues, on, color ]), contentColor = on ? textColorSelected : activeHover ? textColorHover : textColor, textTarget = React.useMemo(() => ({
|
|
80
|
+
color: contentColor
|
|
81
|
+
}), [ contentColor ]), cssVars = {
|
|
82
|
+
"--ib-button-size": `${size}px`,
|
|
83
|
+
"--ib-icon-size": `${resolvedIconSize}px`,
|
|
84
|
+
"--ib-border-radius": radius,
|
|
85
|
+
"--ib-border-width": `${Number.isFinite(borderWidth) ? Math.max(0, borderWidth) : 0}px`,
|
|
86
|
+
"--ib-border-color": borderColor
|
|
87
|
+
}, clearTip = () => {
|
|
88
|
+
var _a;
|
|
89
|
+
tipOpen.current && (null === (_a = tipCallback.current) || void 0 === _a || _a.call(tipCallback, null)),
|
|
90
|
+
tipOpen.current = !1;
|
|
91
|
+
}, showTip = event => {
|
|
92
|
+
!disabled && tooltip && onToolTip && (tipOpen.current = !0, tipCallback.current = onToolTip,
|
|
93
|
+
onToolTip({
|
|
94
|
+
type: sharedTypes.ToolTipType.button,
|
|
95
|
+
payload: {
|
|
96
|
+
label: tooltip
|
|
97
|
+
},
|
|
98
|
+
ref: ref,
|
|
99
|
+
event: event
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
102
|
+
return React.useEffect(() => {
|
|
103
|
+
var _a;
|
|
104
|
+
return tooltip && hasTipCallback || !tipOpen.current || (null === (_a = tipCallback.current) || void 0 === _a || _a.call(tipCallback, null),
|
|
105
|
+
tipOpen.current = !1), disabled && (setHovered(!1), pointerOver.current = !1, focused.current = !1),
|
|
106
|
+
() => {
|
|
107
|
+
var _a;
|
|
108
|
+
tipOpen.current && (null === (_a = tipCallback.current) || void 0 === _a || _a.call(tipCallback, null)),
|
|
109
|
+
tipOpen.current = !1;
|
|
110
|
+
};
|
|
111
|
+
}, [ disabled, tooltip, hasTipCallback ]), jsxRuntime.jsxs("button", Object.assign({}, buttonAttributes, {
|
|
112
|
+
ref: ref,
|
|
113
|
+
type: type,
|
|
114
|
+
disabled: disabled,
|
|
115
|
+
className: `${css_button}${className ? ` ${className}` : ""}`,
|
|
116
|
+
style: Object.assign(Object.assign(Object.assign({}, style), cssVars), iconFrame ? {
|
|
117
|
+
borderWidth: 0
|
|
118
|
+
} : {}),
|
|
119
|
+
"aria-label": "string" == typeof actionName && actionName.trim() ? actionName.trim() : "Action",
|
|
120
|
+
"aria-labelledby": void 0,
|
|
121
|
+
"aria-disabled": disabled,
|
|
122
|
+
"aria-pressed": toggle ? on : void 0,
|
|
123
|
+
onClick: event => {
|
|
124
|
+
if (!disabled && (null == onClick || onClick(event), !event.defaultPrevented && (clearTip(),
|
|
125
|
+
toggle && (!on || deselect)))) {
|
|
126
|
+
const next = !on;
|
|
127
|
+
void 0 === selected && setInternalSelected(next), null == onChange || onChange(next);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
onMouseEnter: event => {
|
|
131
|
+
null == onMouseEnter || onMouseEnter(event), disabled || event.defaultPrevented || (pointerOver.current = !0,
|
|
132
|
+
setHovered(!0), showTip(event));
|
|
133
|
+
},
|
|
134
|
+
onMouseLeave: event => {
|
|
135
|
+
null == onMouseLeave || onMouseLeave(event), pointerOver.current = !1, setHovered(!1),
|
|
136
|
+
focused.current || clearTip();
|
|
137
|
+
},
|
|
138
|
+
onFocus: event => {
|
|
139
|
+
null == onFocus || onFocus(event), disabled || event.defaultPrevented || (focused.current = !0,
|
|
140
|
+
showTip());
|
|
141
|
+
},
|
|
142
|
+
onBlur: event => {
|
|
143
|
+
null == onBlur || onBlur(event), focused.current = !1, pointerOver.current || clearTip();
|
|
144
|
+
},
|
|
145
|
+
children: [ !iconFrame && jsxRuntime.jsx(AnimatedBackground, {
|
|
146
|
+
color: background,
|
|
147
|
+
transition: motionTransition,
|
|
148
|
+
reduceMotion: reduceMotion
|
|
149
|
+
}), icon && jsxRuntime.jsxs("span", {
|
|
150
|
+
className: `${css_slot}${iconFrame ? ` ${css_frame}` : ""}`,
|
|
151
|
+
"aria-hidden": "true",
|
|
152
|
+
children: [ iconFrame && jsxRuntime.jsx(AnimatedBackground, {
|
|
153
|
+
color: background,
|
|
154
|
+
transition: motionTransition,
|
|
155
|
+
reduceMotion: reduceMotion
|
|
156
|
+
}), jsxRuntime.jsx("span", {
|
|
157
|
+
className: css_content,
|
|
158
|
+
children: jsxRuntime.jsx(AnimatedSurface, {
|
|
159
|
+
className: css_icon,
|
|
160
|
+
target: iconTarget,
|
|
161
|
+
transition: motionTransition,
|
|
162
|
+
reduceMotion: reduceMotion,
|
|
163
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
164
|
+
name: on && iconSelected ? iconSelected : icon,
|
|
165
|
+
size: resolvedIconSize,
|
|
166
|
+
strokeColor: "currentColor",
|
|
167
|
+
stroke: iconStrokeWidth,
|
|
168
|
+
fill: iconFill,
|
|
169
|
+
toggle: toggleIcon && on,
|
|
170
|
+
pointer: !1,
|
|
171
|
+
tabIndex: -1
|
|
172
|
+
})
|
|
173
|
+
})
|
|
174
|
+
}) ]
|
|
175
|
+
}), null != labelContent && jsxRuntime.jsx(AnimatedSurface, {
|
|
176
|
+
className: null != contentClassName ? contentClassName : css_content,
|
|
177
|
+
target: textTarget,
|
|
178
|
+
transition: motionTransition,
|
|
179
|
+
reduceMotion: reduceMotion,
|
|
180
|
+
children: labelContent
|
|
181
|
+
}), (showDot || 0 !== count) && jsxRuntime.jsxs("span", {
|
|
182
|
+
className: css_indicators,
|
|
183
|
+
"aria-hidden": "true",
|
|
184
|
+
children: [ jsxRuntime.jsx(Dot.Dot, {
|
|
185
|
+
show: showDot,
|
|
186
|
+
"aria-hidden": "true",
|
|
187
|
+
role: "presentation"
|
|
188
|
+
}), 0 !== count && jsxRuntime.jsx("span", {
|
|
189
|
+
className: css_count,
|
|
190
|
+
children: jsxRuntime.jsx(Badge.Badge, {
|
|
191
|
+
variant: "light",
|
|
192
|
+
count: count,
|
|
193
|
+
hideZero: !0
|
|
194
|
+
})
|
|
195
|
+
}) ]
|
|
196
|
+
}) ]
|
|
197
|
+
}));
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
exports.ActionButton = ActionButton;
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-PmT7cZzC.js"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), FileIcon = require("./FileIcon-BM8n3o-c.js"), IconButton = require("./IconButton-KJr15EW6.js"), ProgressIndicator = require("./ProgressIndicator-Ddj5dfEA.js");
|
|
5
|
+
|
|
6
|
+
require("./resolveColor-DkYThq2J.js"), require("./broadcastChannel-DdPZ3LUB.js");
|
|
7
|
+
|
|
8
|
+
var files = require("./files-RYD9L_pI.js");
|
|
9
|
+
|
|
10
|
+
const identities = new WeakMap;
|
|
11
|
+
|
|
12
|
+
let nextIdentity = 0;
|
|
13
|
+
|
|
14
|
+
/** IDs survive immutable updates; object identity supports existing controlled arrays. */
|
|
15
|
+
/** Progress uses percentages only. Invalid or missing values are indeterminate while uploading. */
|
|
16
|
+
function fileProgress(item) {
|
|
17
|
+
return "number" == typeof item.progress && Number.isFinite(item.progress) ? Math.round(Math.max(0, Math.min(100, item.progress))) : item.uploading ? void 0 : 100;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var ContentType, styles = {
|
|
21
|
+
wrapper: "Attachment-module_wrapper__FMeV9",
|
|
22
|
+
canvas: "Attachment-module_canvas__vaAa8",
|
|
23
|
+
imageThumbnail: "Attachment-module_imageThumbnail__cNu8L",
|
|
24
|
+
textThumbnail: "Attachment-module_textThumbnail__0-2-x",
|
|
25
|
+
fileThumbnail: "Attachment-module_fileThumbnail__BfdCU",
|
|
26
|
+
info: "Attachment-module_info__oa-4l",
|
|
27
|
+
textRow: "Attachment-module_textRow__6QWcU",
|
|
28
|
+
filename: "Attachment-module_filename__pguOA",
|
|
29
|
+
filetype: "Attachment-module_filetype__TuJKA",
|
|
30
|
+
filesize: "Attachment-module_filesize__SuoeI",
|
|
31
|
+
button: "Attachment-module_button__Eysgq",
|
|
32
|
+
xs: "Attachment-module_xs__um8pJ type-module_body-xs-regular__ZAFft",
|
|
33
|
+
s: "Attachment-module_s__CBKXB type-module_body-s-regular__vRHSP",
|
|
34
|
+
m: "Attachment-module_m__vvmop type-module_body-m-regular__LuQBA",
|
|
35
|
+
l: "Attachment-module_l__8nONE type-module_body-l-regular__lOYbg",
|
|
36
|
+
xl: "Attachment-module_xl__YnqRE type-module_body-xl-regular__pF2kC",
|
|
37
|
+
preview: "Attachment-module_preview__XGomT",
|
|
38
|
+
metadata: "Attachment-module_metadata__y1rCH",
|
|
39
|
+
openButton: "Attachment-module_openButton__KvbVp",
|
|
40
|
+
srOnly: "Attachment-module_srOnly__4ftCZ",
|
|
41
|
+
upload: "Attachment-module_upload__A9zTv",
|
|
42
|
+
uploadSpinner: "Attachment-module_uploadSpinner__n6MnK",
|
|
43
|
+
uploadPercent: "Attachment-module_uploadPercent__75TxQ",
|
|
44
|
+
uploadLabel: "Attachment-module_uploadLabel__rUcQt",
|
|
45
|
+
previewLoader: "Attachment-module_previewLoader__8sPc5",
|
|
46
|
+
errorPreview: "Attachment-module_errorPreview__D6TJJ",
|
|
47
|
+
errorMessage: "Attachment-module_errorMessage__A9UIM"
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** Mount with the source as its key so loading/error state belongs to one URL. */ function AttachmentImagePreview({src: src, iconSize: iconSize, color: color}) {
|
|
51
|
+
const [status, setStatus] = React.useState("loading"), mounted = React.useRef(!0);
|
|
52
|
+
React.useEffect(() => (mounted.current = !0, () => {
|
|
53
|
+
mounted.current = !1;
|
|
54
|
+
}), []);
|
|
55
|
+
const load = image => tslib_es6.__awaiter(this, void 0, void 0, function*() {
|
|
56
|
+
try {
|
|
57
|
+
yield image.decode(), mounted.current && setStatus("ready");
|
|
58
|
+
} catch (_a) {
|
|
59
|
+
mounted.current && setStatus("error");
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return "error" === status ? jsxRuntime.jsx("div", {
|
|
63
|
+
className: styles.fileThumbnail,
|
|
64
|
+
children: jsxRuntime.jsx(FileIcon.FileIcon, {
|
|
65
|
+
type: "image",
|
|
66
|
+
size: iconSize,
|
|
67
|
+
decorative: !0
|
|
68
|
+
})
|
|
69
|
+
}) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
70
|
+
children: [ jsxRuntime.jsx("img", {
|
|
71
|
+
className: styles.imageThumbnail,
|
|
72
|
+
style: {
|
|
73
|
+
opacity: "ready" === status ? 1 : 0
|
|
74
|
+
},
|
|
75
|
+
src: src,
|
|
76
|
+
alt: "",
|
|
77
|
+
loading: "lazy",
|
|
78
|
+
decoding: "async",
|
|
79
|
+
onLoad: event => {
|
|
80
|
+
load(event.currentTarget);
|
|
81
|
+
},
|
|
82
|
+
onError: () => setStatus("error")
|
|
83
|
+
}), "loading" === status && jsxRuntime.jsx("div", {
|
|
84
|
+
className: styles.previewLoader,
|
|
85
|
+
children: jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
86
|
+
decorative: !0,
|
|
87
|
+
inline: !0,
|
|
88
|
+
show: !0,
|
|
89
|
+
size: 20,
|
|
90
|
+
color: color
|
|
91
|
+
})
|
|
92
|
+
}) ]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Image URLs belong to this hook and are revoked on replacement or unmount. */
|
|
97
|
+
function useContentThumbnail(content) {
|
|
98
|
+
const file = getFile(content), [preview, setPreview] = React.useState(), contentType = function(content) {
|
|
99
|
+
return void 0 === content ? void 0 : "string" == typeof content ? exports.ContentType.Text : exports.ContentType.File;
|
|
100
|
+
}(content), contentFormat = function(content) {
|
|
101
|
+
if (void 0 === content) return;
|
|
102
|
+
if ("string" == typeof content) return FileIcon.FileIconTypes.text;
|
|
103
|
+
const file = getFile(content);
|
|
104
|
+
return void 0 === file ? void 0 : "string" == typeof file ? files.resolveFileIconType(file) : file.type.startsWith("image/") ? FileIcon.FileIconTypes.image : files.resolveFileIconType(file.name);
|
|
105
|
+
}(content), previewable = file instanceof File && (contentFormat === FileIcon.FileIconTypes.image || function(file, format) {
|
|
106
|
+
return format !== FileIcon.FileIconTypes.image && (!!file.type.startsWith("text/") || (format === FileIcon.FileIconTypes.code || format === FileIcon.FileIconTypes.md || /\.(txt|text|log|clipboard)$/i.test(file.name)));
|
|
107
|
+
}(file, contentFormat));
|
|
108
|
+
React.useEffect(() => {
|
|
109
|
+
if (!(file instanceof File && previewable)) return void setPreview(void 0);
|
|
110
|
+
if (contentFormat === FileIcon.FileIconTypes.image) {
|
|
111
|
+
let src;
|
|
112
|
+
try {
|
|
113
|
+
src = URL.createObjectURL(file);
|
|
114
|
+
} catch (_a) {
|
|
115
|
+
return void setPreview({
|
|
116
|
+
file: file,
|
|
117
|
+
status: "error"
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return setPreview({
|
|
121
|
+
file: file,
|
|
122
|
+
thumbnail: {
|
|
123
|
+
type: "image",
|
|
124
|
+
src: src
|
|
125
|
+
},
|
|
126
|
+
status: "ready"
|
|
127
|
+
}), () => URL.revokeObjectURL(src);
|
|
128
|
+
}
|
|
129
|
+
const reader = new FileReader;
|
|
130
|
+
return setPreview({
|
|
131
|
+
file: file,
|
|
132
|
+
status: "loading"
|
|
133
|
+
}), reader.onload = () => {
|
|
134
|
+
"string" == typeof reader.result ? setPreview({
|
|
135
|
+
file: file,
|
|
136
|
+
thumbnail: {
|
|
137
|
+
type: "text",
|
|
138
|
+
text: reader.result.slice(0, 250)
|
|
139
|
+
},
|
|
140
|
+
status: "ready"
|
|
141
|
+
}) : setPreview({
|
|
142
|
+
file: file,
|
|
143
|
+
status: "error"
|
|
144
|
+
});
|
|
145
|
+
}, reader.onerror = () => setPreview({
|
|
146
|
+
file: file,
|
|
147
|
+
status: "error"
|
|
148
|
+
}), reader.readAsText(file.slice(0, 4096)), () => {
|
|
149
|
+
reader.onload = null, reader.onerror = null, reader.readyState === FileReader.LOADING && reader.abort();
|
|
150
|
+
};
|
|
151
|
+
}, [ file, contentFormat, previewable ]);
|
|
152
|
+
const current = (null == preview ? void 0 : preview.file) === file ? preview : void 0;
|
|
153
|
+
return {
|
|
154
|
+
contentType: contentType,
|
|
155
|
+
contentFormat: contentFormat,
|
|
156
|
+
thumbnail: "string" == typeof content ? {
|
|
157
|
+
type: "text",
|
|
158
|
+
text: content.slice(0, 250)
|
|
159
|
+
} : null == current ? void 0 : current.thumbnail,
|
|
160
|
+
isLoading: previewable && (!current || "loading" === current.status),
|
|
161
|
+
fileName: "string" == typeof content ? "clipboard" : getFileName(file),
|
|
162
|
+
fileExtension: getFileExtension(file),
|
|
163
|
+
fileSize: file instanceof File ? formatFileSize(file.size) : void 0
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function getFile(content) {
|
|
168
|
+
if ("object" == typeof content) return "file" in content ? content.file : content;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function getBasename(file) {
|
|
172
|
+
var _a;
|
|
173
|
+
if (void 0 === file) return;
|
|
174
|
+
let name = "string" == typeof file ? file : file.name;
|
|
175
|
+
return "string" == typeof file && name.includes("/") && (name = name.split(/[?#]/)[0]),
|
|
176
|
+
null !== (_a = name.split(/[\\/]/).pop()) && void 0 !== _a ? _a : "";
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function getFileName(file) {
|
|
180
|
+
const basename = getBasename(file);
|
|
181
|
+
if (void 0 === basename) return;
|
|
182
|
+
const dot = basename.lastIndexOf(".");
|
|
183
|
+
return dot <= 0 || dot === basename.length - 1 ? basename : basename.slice(0, dot);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/** Lowercase extension without a dot; filenames and URL paths are supported. */ function getFileExtension(file) {
|
|
187
|
+
const basename = getBasename(file);
|
|
188
|
+
if (void 0 === basename) return;
|
|
189
|
+
const dot = basename.lastIndexOf(".");
|
|
190
|
+
return dot <= 0 || dot === basename.length - 1 ? void 0 : basename.slice(dot + 1).toLowerCase();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** Use 1024 bytes per k, with at most one decimal place. */ function formatFileSize(bytes) {
|
|
194
|
+
return bytes < 1048576 ? Math.round(bytes / 1024 * 10) / 10 + " k" : Math.round(bytes / 1048576 * 10) / 10 + " mb";
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
exports.ContentType = void 0, (ContentType = exports.ContentType || (exports.ContentType = {})).Text = "text",
|
|
198
|
+
ContentType.File = "file", exports.Attachment = function(props) {
|
|
199
|
+
var _a;
|
|
200
|
+
const _b = resolveColorProps.resolveColorProps(props), {content: content, textColor: textColor = "var(--core-text-primary)", textColorLight: textColorLight = "var(--core-text-secondary)", backgroundColor: backgroundColor = "var(--core-surface-secondary)", thumbColor: thumbColor = "var(--core-text-primary)", textSize: textSize = "s", size: size = "m", width: width, height: height, borderColor: borderColor = "var(--core-outline-primary)", borderWidth: borderWidth = 1, borderStyle: borderStyle = "solid", borderRadius: borderRadius = 16, iconSize: iconSize = 48, iconGap: iconGap = 4, padding: padding = "0 var(--spacing-xs)", thumbTextSize: thumbTextSize = 10, thumbPadding: thumbPadding = "var(--spacing-m)", canRemove: canRemove, removeLabel: removeLabel, attachmentName: attachmentName, openLabel: openLabel, onOpen: onOpen, disabled: disabled = !1, onRemove: onRemove, onToolTip: onToolTip, className: className, style: style} = _b, nativeAttributes = tslib_es6.__rest(_b, [ "content", "textColor", "textColorLight", "backgroundColor", "thumbColor", "textSize", "size", "width", "height", "borderColor", "borderWidth", "borderStyle", "borderRadius", "iconSize", "iconGap", "padding", "thumbTextSize", "thumbPadding", "canRemove", "removeLabel", "attachmentName", "openLabel", "onOpen", "disabled", "onRemove", "onToolTip", "className", "style" ]), descriptionId = React.useId(), errorId = React.useId(), fileItem = "object" == typeof content && "file" in content ? content : void 0, error = (null === (_a = null == fileItem ? void 0 : fileItem.error) || void 0 === _a ? void 0 : _a.trim()) || void 0, uploading = Boolean(null == fileItem ? void 0 : fileItem.uploading) && !error, progress = fileItem ? fileProgress(fileItem) : void 0, showFileSize = "xs" !== size && "s" !== size, showUploadPercent = "xs" !== size && "s" !== size, {thumbnail: thumbnail, isLoading: isLoading, contentFormat: contentFormat, fileSize: fileSize, fileExtension: fileExtension, fileName: fileName} = useContentThumbnail(content), label = void 0 === content ? "" : "string" == typeof content ? "Clipboard content" : "file" in content ? "string" == typeof content.file ? null != fileName ? fileName : content.file : null != fileName ? fileName : content.file.name : null != fileName ? fileName : content.name, accessibleName = (null == attachmentName ? void 0 : attachmentName.trim()) || label || "Attachment", actionName = (null == attachmentName ? void 0 : attachmentName.trim()) ? attachmentName.trim() : "object" != typeof content || "file" in content ? fileItem ? "string" == typeof fileItem.file ? fileItem.file || accessibleName : fileItem.file.name || accessibleName : accessibleName : content.name || accessibleName, removeName = (null == removeLabel ? void 0 : removeLabel.trim()) || `Remove ${actionName}`, openName = (null == openLabel ? void 0 : openLabel.trim()) || `Open ${actionName}`, removable = (null == canRemove || canRemove) && Boolean(onRemove), uploadLabel = void 0 === progress ? "Uploading" : `Uploading ${progress}%`, description = [ uploading ? uploadLabel : void 0, null != contentFormat ? contentFormat : fileExtension, null == fileSize ? void 0 : fileSize.replace(/ k$/, " kilobytes").replace(/ mb$/, " megabytes"), error || "text" !== (null == thumbnail ? void 0 : thumbnail.type) ? void 0 : thumbnail.text ].filter(Boolean).join(". "), sizes = {
|
|
201
|
+
xs: 100,
|
|
202
|
+
s: 125,
|
|
203
|
+
m: 140,
|
|
204
|
+
l: 160,
|
|
205
|
+
xl: 180
|
|
206
|
+
}, cssVars = Object.assign({
|
|
207
|
+
"--text-color": textColor,
|
|
208
|
+
"--text-color-light": textColorLight,
|
|
209
|
+
"--background-color": backgroundColor,
|
|
210
|
+
"--thumb-color": thumbColor,
|
|
211
|
+
"--attachment-width": misc.setStyle(null != width ? width : sizes[size]),
|
|
212
|
+
"--attachment-height": misc.setStyle(null != height ? height : sizes[size]),
|
|
213
|
+
"--border-color": borderColor,
|
|
214
|
+
"--border-width": misc.setStyle(borderWidth),
|
|
215
|
+
"--border-style": borderStyle,
|
|
216
|
+
"--border-radius": misc.setStyle(borderRadius),
|
|
217
|
+
"--icon-gap": misc.setStyle(iconGap),
|
|
218
|
+
"--info-padding": misc.setStyle(padding),
|
|
219
|
+
"--thumb-text-size": misc.setStyle(thumbTextSize),
|
|
220
|
+
"--thumb-padding": misc.setStyle(thumbPadding)
|
|
221
|
+
}, style);
|
|
222
|
+
return jsxRuntime.jsxs("div", Object.assign({}, nativeAttributes, {
|
|
223
|
+
role: "group",
|
|
224
|
+
"aria-label": accessibleName,
|
|
225
|
+
"aria-describedby": [ description ? descriptionId : void 0, error ? errorId : void 0 ].filter(Boolean).join(" ") || void 0,
|
|
226
|
+
"aria-disabled": disabled || void 0,
|
|
227
|
+
className: [ styles.wrapper, className ].filter(Boolean).join(" "),
|
|
228
|
+
style: cssVars,
|
|
229
|
+
children: [ jsxRuntime.jsxs("div", {
|
|
230
|
+
className: styles.canvas,
|
|
231
|
+
children: [ error ? jsxRuntime.jsx("div", {
|
|
232
|
+
id: errorId,
|
|
233
|
+
className: `${styles.errorPreview} ${styles[textSize]}`,
|
|
234
|
+
role: "alert",
|
|
235
|
+
tabIndex: 0,
|
|
236
|
+
children: jsxRuntime.jsxs("span", {
|
|
237
|
+
className: styles.errorMessage,
|
|
238
|
+
children: [ jsxRuntime.jsxs("span", {
|
|
239
|
+
className: styles.srOnly,
|
|
240
|
+
children: [ actionName, ": " ]
|
|
241
|
+
}), error ]
|
|
242
|
+
})
|
|
243
|
+
}) : jsxRuntime.jsxs("div", {
|
|
244
|
+
className: styles.preview,
|
|
245
|
+
"aria-hidden": "true",
|
|
246
|
+
children: [ "image" === (null == thumbnail ? void 0 : thumbnail.type) && jsxRuntime.jsx(AttachmentImagePreview, {
|
|
247
|
+
src: thumbnail.src,
|
|
248
|
+
iconSize: iconSize,
|
|
249
|
+
color: textColorLight
|
|
250
|
+
}, thumbnail.src), isLoading && jsxRuntime.jsx("div", {
|
|
251
|
+
className: styles.previewLoader,
|
|
252
|
+
children: jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
253
|
+
decorative: !0,
|
|
254
|
+
inline: !0,
|
|
255
|
+
show: !0,
|
|
256
|
+
size: 20,
|
|
257
|
+
color: textColorLight
|
|
258
|
+
})
|
|
259
|
+
}), "text" === (null == thumbnail ? void 0 : thumbnail.type) && jsxRuntime.jsx("span", {
|
|
260
|
+
className: styles.textThumbnail,
|
|
261
|
+
children: thumbnail.text
|
|
262
|
+
}), !thumbnail && !isLoading && void 0 !== content && jsxRuntime.jsx("div", {
|
|
263
|
+
className: styles.fileThumbnail,
|
|
264
|
+
children: jsxRuntime.jsx(FileIcon.FileIcon, {
|
|
265
|
+
type: contentFormat,
|
|
266
|
+
size: iconSize,
|
|
267
|
+
decorative: !0
|
|
268
|
+
})
|
|
269
|
+
}) ]
|
|
270
|
+
}), onOpen && !error && jsxRuntime.jsx("button", {
|
|
271
|
+
type: "button",
|
|
272
|
+
className: styles.openButton,
|
|
273
|
+
"aria-label": openName,
|
|
274
|
+
disabled: disabled,
|
|
275
|
+
onClick: event => {
|
|
276
|
+
event.stopPropagation(), onOpen(event);
|
|
277
|
+
}
|
|
278
|
+
}) ]
|
|
279
|
+
}), description && jsxRuntime.jsx("span", {
|
|
280
|
+
id: descriptionId,
|
|
281
|
+
className: styles.srOnly,
|
|
282
|
+
children: description
|
|
283
|
+
}), jsxRuntime.jsxs("div", {
|
|
284
|
+
className: styles.info,
|
|
285
|
+
children: [ jsxRuntime.jsx("div", {
|
|
286
|
+
className: styles.textRow,
|
|
287
|
+
children: jsxRuntime.jsx("span", {
|
|
288
|
+
className: `${styles.filename} ${styles[textSize]}`,
|
|
289
|
+
title: label,
|
|
290
|
+
children: label
|
|
291
|
+
})
|
|
292
|
+
}), uploading ? jsxRuntime.jsxs("div", {
|
|
293
|
+
className: `${styles.textRow} ${styles.upload} ${styles[textSize]}`,
|
|
294
|
+
role: "progressbar",
|
|
295
|
+
tabIndex: -1,
|
|
296
|
+
"aria-label": `Uploading ${accessibleName}`,
|
|
297
|
+
"aria-valuemin": 0,
|
|
298
|
+
"aria-valuemax": 100,
|
|
299
|
+
"aria-valuenow": progress,
|
|
300
|
+
"aria-valuetext": uploadLabel,
|
|
301
|
+
children: [ jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
302
|
+
className: styles.uploadSpinner,
|
|
303
|
+
decorative: !0,
|
|
304
|
+
inline: !0,
|
|
305
|
+
show: !0,
|
|
306
|
+
size: 14,
|
|
307
|
+
color: textColorLight
|
|
308
|
+
}), jsxRuntime.jsx("span", {
|
|
309
|
+
className: styles.uploadLabel,
|
|
310
|
+
children: "Uploading"
|
|
311
|
+
}), showUploadPercent && void 0 !== progress && jsxRuntime.jsxs("span", {
|
|
312
|
+
className: styles.uploadPercent,
|
|
313
|
+
children: [ progress, "%" ]
|
|
314
|
+
}) ]
|
|
315
|
+
}) : (contentFormat || fileExtension || showFileSize && fileSize) && jsxRuntime.jsxs("div", {
|
|
316
|
+
className: `${styles.textRow} ${styles.metadata}`,
|
|
317
|
+
"aria-hidden": "true",
|
|
318
|
+
children: [ (contentFormat || fileExtension) && jsxRuntime.jsx("span", {
|
|
319
|
+
className: `${styles.filetype} ${styles[textSize]}`,
|
|
320
|
+
title: label,
|
|
321
|
+
children: null != contentFormat ? contentFormat : fileExtension
|
|
322
|
+
}), showFileSize && fileSize && jsxRuntime.jsx("span", {
|
|
323
|
+
className: `${styles.filesize} ${styles[textSize]}`,
|
|
324
|
+
title: label,
|
|
325
|
+
children: fileSize
|
|
326
|
+
}) ]
|
|
327
|
+
}) ]
|
|
328
|
+
}), removable && jsxRuntime.jsx("div", {
|
|
329
|
+
className: styles.button,
|
|
330
|
+
children: jsxRuntime.jsx(IconButton.IconButton, {
|
|
331
|
+
icon: "basic.cross",
|
|
332
|
+
buttonSize: "s",
|
|
333
|
+
iconSize: 16,
|
|
334
|
+
actionName: removeName,
|
|
335
|
+
tooltip: removeName,
|
|
336
|
+
onToolTip: onToolTip,
|
|
337
|
+
disabled: disabled,
|
|
338
|
+
onClick: event => {
|
|
339
|
+
event.stopPropagation(), null == onRemove || onRemove(event);
|
|
340
|
+
}
|
|
341
|
+
})
|
|
342
|
+
}) ]
|
|
343
|
+
}));
|
|
344
|
+
}, exports.fileItemKey = function(item) {
|
|
345
|
+
const fileItem = "file" in item ? item : void 0;
|
|
346
|
+
if (void 0 !== (null == fileItem ? void 0 : fileItem.id)) return `id:${fileItem.id}`;
|
|
347
|
+
const identity = fileItem && "string" != typeof fileItem.file ? fileItem.file : item;
|
|
348
|
+
let key = identities.get(identity);
|
|
349
|
+
return void 0 === key && (key = nextIdentity++, identities.set(identity, key)),
|
|
350
|
+
`object:${key}`;
|
|
351
|
+
}, exports.fileProgress = fileProgress;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
|
+
|
|
6
|
+
require("../theme/colors.js"), require("../theme/type.js"), require("./resolveColor-DkYThq2J.js"),
|
|
7
|
+
require("./breakpoints-BDw1OJh9.js");
|
|
8
|
+
|
|
9
|
+
var colors = require("./colors-hDzzq_Dk.js");
|
|
10
|
+
|
|
11
|
+
require("./broadcastChannel-DdPZ3LUB.js"), require("./files-RYD9L_pI.js"), require("./webRTCStore-OGkXAovD.js"),
|
|
12
|
+
require("./microphoneStore-D7DuvQeX.js"), require("./volumeStore-BoEoo9wA.js");
|
|
13
|
+
|
|
14
|
+
var useAudioVisualizer = require("./useAudioVisualizer-D7bStvIe.js"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), usePrefersReducedMotion = require("./usePrefersReducedMotion-GpD17CAE.js"), css_wrapper = "AudioBubble-module_wrapper__f2yKg flexBox-module_row__z24tF", css_bubble = "AudioBubble-module_bubble__bpPT3 flexBox-module_row__z24tF";
|
|
15
|
+
|
|
16
|
+
const AudioBubble = React.memo(rawProps => {
|
|
17
|
+
const props = resolveColorProps.resolveColorProps(rawProps), {current: current} = hooks_useTheme.useTheme(), color = current.colors["core-text-primary"], {"aria-hidden": ariaHidden = !0, audioStream: audioStream, playing: playing = !1, size: size = 64, backgroundColor: backgroundColor = "var(--core-text-primary)", glow: glow = !0, glowColor: glowColor = colors.addOpacity(color, .1), glowSize: glowSize = 48, glowOffset: glowOffset = 18, minScale: minScale = 1, maxScale: maxScale = 3, intensity: intensity = 2.2, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, releasePerSeconds: releasePerSeconds = 1.5} = props, divAttributes = tslib_es6.__rest(props, [ "aria-hidden", "audioStream", "playing", "size", "backgroundColor", "glow", "glowColor", "glowSize", "glowOffset", "minScale", "maxScale", "intensity", "peakIntensity", "risePerSeconds", "releasePerSeconds" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", restingScale = Number.isFinite(minScale) && minScale > 0 ? minScale : 1, reducedMotion = usePrefersReducedMotion.usePrefersReducedMotion(), [scale, setScale] = React.useState(restingScale), visualizerSettings = React.useMemo(() => ({
|
|
18
|
+
minScale: minScale,
|
|
19
|
+
maxScale: maxScale,
|
|
20
|
+
intensityMultiplier: intensity,
|
|
21
|
+
peakIntensity: peakIntensity,
|
|
22
|
+
risePerSecond: risePerSeconds,
|
|
23
|
+
releasePerSecond: releasePerSeconds
|
|
24
|
+
}), [ minScale, maxScale, intensity, peakIntensity, risePerSeconds, releasePerSeconds ]), setGlow = React.useMemo(() => glow ? `0 ${glowOffset}px ${glowSize}px ${glowColor}` : "unset", [ glow, glowColor, glowSize, glowOffset ]), cssVars = React.useMemo(() => ({
|
|
25
|
+
"--ab-size": `${size}px`,
|
|
26
|
+
"--ab-bg-color": backgroundColor,
|
|
27
|
+
"--ab-box-shadow": setGlow
|
|
28
|
+
}), [ size, backgroundColor, setGlow ]);
|
|
29
|
+
return useAudioVisualizer.useAudioVisualizer(audioStream, playing && !reducedMotion, visualizerSettings, ({scale: nextScale}) => setScale(nextScale), () => setScale(restingScale)),
|
|
30
|
+
jsxRuntime.jsx("div", Object.assign({
|
|
31
|
+
id: divId,
|
|
32
|
+
className: `${css_wrapper}${divClass}`,
|
|
33
|
+
style: divStyle
|
|
34
|
+
}, rest, {
|
|
35
|
+
"aria-hidden": ariaHidden,
|
|
36
|
+
children: jsxRuntime.jsx("div", {
|
|
37
|
+
className: css_bubble,
|
|
38
|
+
style: Object.assign(Object.assign({}, cssVars), {
|
|
39
|
+
transform: `scale(${scale})`,
|
|
40
|
+
transition: reducedMotion ? "none" : void 0
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
exports.AudioBubble = AudioBubble;
|