@apple-pie/slice 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -276
- package/dist/cjs/chunks/{AudioBubble-DisHuKIC.js → AudioBubble-Dh2IlYW0.js} +3 -5
- package/dist/cjs/chunks/Avatar-WcBAu25_.js +82 -0
- package/dist/cjs/chunks/{AvatarGroup-DhGp_qLw.js → AvatarGroup-eUkVdeTf.js} +1 -3
- package/dist/cjs/chunks/Badge-4tBynWZe.js +22 -0
- package/dist/cjs/chunks/{Button-PsJx1WmV.js → Button-QJ5lsSAz.js} +1 -3
- package/dist/cjs/chunks/{ButtonBar-8zm6a_h7.js → ButtonBar-DcpvT1vD.js} +1 -3
- package/dist/cjs/chunks/{Camera-zFyIXcge.js → Camera-iDyPLq9h.js} +3 -5
- package/dist/cjs/chunks/CheckBox-CmZJd8u2.js +51 -0
- package/dist/cjs/chunks/Chip-Bd1bSYeC.js +77 -0
- package/dist/cjs/chunks/{DivInput-2cMdJQ9U.js → DivInput-BY9pQ6ty.js} +1 -3
- package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-BeWDLajy.js} +1 -3
- package/dist/cjs/chunks/{DrggablePanel-P7TgBI3j.js → DrggablePanel-DzY5wTco.js} +3 -5
- package/dist/cjs/chunks/DropDown-Cn_nX8u7.js +104 -0
- package/dist/cjs/chunks/ErrorSummary-D-0uVwyV.js +85 -0
- package/dist/cjs/chunks/{FileIcon-PuDoz0mF.js → FileIcon-JfY2AYqG.js} +2 -2
- package/dist/cjs/chunks/FileList-Dc1nfpR2.js +222 -0
- package/dist/cjs/chunks/{FlexDiv-D4aSJC_G.js → FlexDiv-B5Pi0-aJ.js} +2 -3
- package/dist/cjs/chunks/Grouper-DKZkTlow.js +61 -0
- package/dist/cjs/chunks/{Icon-BtcHXeqE.js → Icon-BVYVJp9J.js} +4 -7
- package/dist/cjs/chunks/IconButton-CP1Wsvsx.js +82 -0
- package/dist/cjs/chunks/{IndexedDB-BaVmQgkK.js → IndexedDB-CeiVT55Z.js} +1 -1
- package/dist/cjs/chunks/Label-DIs1rOey.js +102 -0
- package/dist/cjs/chunks/Level-3yxetsco.js +58 -0
- package/dist/cjs/chunks/{MdStreamBuffer-CvLO7CVi.js → MdStreamBuffer-BudWFoNw.js} +38 -16
- package/dist/cjs/chunks/Modal-CjpQdoOe.js +127 -0
- package/dist/cjs/chunks/{ModalController-13xmvKnm.js → ModalController-Cp2PXOOS.js} +1 -3
- package/dist/cjs/chunks/{Overlay-GXu6nMnw.js → Overlay-DRpHYZek.js} +1 -3
- package/dist/cjs/chunks/Pager-ChnTKwml.js +36 -0
- package/dist/cjs/chunks/{ProgressIndicator-D06PqCQk.js → ProgressIndicator-CFiAU-aF.js} +2 -6
- package/dist/cjs/chunks/{PromptInput-DuE4vGxR.js → PromptInput-BFWR0TaP.js} +2 -4
- package/dist/cjs/chunks/RadioButton-Bi-FP41j.js +55 -0
- package/dist/cjs/chunks/{RadioButtonList-N7Fmvr5W.js → RadioButtonList-JHPKMCoX.js} +1 -2
- package/dist/cjs/chunks/{Slider-BSy8xciG.js → Slider-D97ws1Cl.js} +1 -3
- package/dist/cjs/chunks/{Spacer-CyZAUR5N.js → Spacer-DvI2M1wZ.js} +1 -1
- package/dist/cjs/chunks/{Switch-Crm-nHYI.js → Switch-DDSSprb7.js} +1 -2
- package/dist/cjs/chunks/{TabBar-BtFfMwiB.js → TabBar-TllSeSzb.js} +2 -4
- package/dist/cjs/chunks/TextArea-DjZRDixt.js +74 -0
- package/dist/cjs/chunks/{TextField-Bh2EA082.js → TextField-CKA3K0AN.js} +3 -5
- package/dist/cjs/chunks/Tip-BdGXN-TQ.js +88 -0
- package/dist/cjs/chunks/Toast-COrDS_50.js +177 -0
- package/dist/cjs/chunks/ToggleButton-hoOMzBZc.js +39 -0
- package/dist/cjs/chunks/UploadArea-ClG8ZgRZ.js +127 -0
- package/dist/cjs/chunks/{WSConnection-DrOC8Z0R.js → WSConnection-Brxc2hEv.js} +1 -1
- package/dist/cjs/chunks/WebRTCConnection-eWP4lueC.js +252 -0
- package/dist/cjs/chunks/{localDBStore-zyDhaEiP.js → localDBStore-SS_r0C6F.js} +1 -1
- package/dist/cjs/chunks/{microphoneStore-D1fV_8QQ.js → microphoneStore-DM_8bhFr.js} +27 -4
- package/dist/cjs/chunks/{misc-QpU0XEOW.js → misc-4xyXRU2K.js} +1 -1
- package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Ag-UnuQq.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-Az040BSN.js → uploads-worker-CI-SZptI.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-8mOTz0Qe.js → uploadsStore-DR2hc4ct.js} +2 -2
- package/dist/cjs/chunks/{volumeStore-Pv23v12t.js → volumeStore-DtTHf-9_.js} +5 -4
- package/dist/cjs/chunks/webRTCStore-DWWn7k-0.js +55 -0
- package/dist/cjs/chunks/{windowStore-CCxCOUqa.js → windowStore-BUo9Du_e.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +7 -7
- package/dist/cjs/components/Avatar/index.js +3 -4
- package/dist/cjs/components/AvatarGroup/index.js +4 -4
- package/dist/cjs/components/Badge/index.js +3 -3
- package/dist/cjs/components/Button/index.js +7 -8
- package/dist/cjs/components/ButtonBar/index.js +7 -7
- package/dist/cjs/components/Camera/index.js +8 -8
- package/dist/cjs/components/CheckBox/index.js +7 -7
- package/dist/cjs/components/Chip/index.js +7 -8
- package/dist/cjs/components/DivInput/index.js +3 -4
- package/dist/cjs/components/Dot/index.js +3 -3
- package/dist/cjs/components/DraggablePanel/index.js +6 -6
- package/dist/cjs/components/DropDown/index.js +7 -7
- package/dist/cjs/components/ErrorSummary/index.js +6 -7
- package/dist/cjs/components/FileIcon/index.js +6 -7
- package/dist/cjs/components/FileList/index.js +7 -7
- package/dist/cjs/components/FlexDiv/index.js +3 -4
- package/dist/cjs/components/Grouper/index.js +7 -8
- package/dist/cjs/components/Icon/index.js +6 -7
- package/dist/cjs/components/IconButton/index.js +6 -7
- package/dist/cjs/components/Label/index.js +3 -4
- package/dist/cjs/components/Level/index.js +7 -0
- package/dist/cjs/components/Modal/index.js +7 -8
- package/dist/cjs/components/ModalController/index.js +4 -4
- package/dist/cjs/components/Overlay/index.js +3 -3
- package/dist/cjs/components/Pager/index.js +3 -4
- package/dist/cjs/components/Progress/index.js +5 -6
- package/dist/cjs/components/PromptInput/index.js +9 -10
- package/dist/cjs/components/RadioButton/index.js +7 -7
- package/dist/cjs/components/RadioButtonList/index.js +8 -8
- package/dist/cjs/components/Slider/index.js +4 -5
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +3 -3
- package/dist/cjs/components/TabBar/index.js +9 -9
- package/dist/cjs/components/TextArea/index.js +8 -8
- package/dist/cjs/components/Textfield/index.js +9 -9
- package/dist/cjs/components/Tip/index.js +3 -4
- package/dist/cjs/components/Toast/index.js +7 -8
- package/dist/cjs/components/ToggleButton/index.js +8 -8
- package/dist/cjs/components/UploadArea/index.js +7 -7
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +60 -0
- package/dist/cjs/hooks/useLocalStore.js +3 -3
- package/dist/cjs/hooks/useMdStreamBuffer.js +55 -30
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useObserveTheme.js +3 -3
- package/dist/cjs/hooks/useTheme.js +2 -3
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +9 -6
- package/dist/cjs/index.js +19 -17
- package/dist/cjs/providers/ThemeProvider.js +6 -17
- package/dist/cjs/providers/themeServer.js +15 -9
- package/dist/cjs/providers.js +4 -5
- package/dist/cjs/stores/LocalDB.js +3 -3
- package/dist/cjs/stores/SSE.js +2 -2
- package/dist/cjs/stores/WS.js +2 -2
- package/dist/cjs/stores/WebRTC.js +9 -0
- package/dist/cjs/stores/microphone.js +5 -4
- package/dist/cjs/stores/modal.js +1 -1
- package/dist/cjs/stores/tip.js +1 -1
- package/dist/cjs/stores/toast.js +1 -1
- package/dist/cjs/stores/uploads.js +2 -2
- package/dist/cjs/stores/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +18 -13
- package/dist/cjs/theme/type.js +1 -1
- package/dist/cjs/utils/index.js +4 -3
- package/dist/cjs/utils/objects/index.js +4 -3
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/esm/chunks/{AudioBubble-D052QyPH.mjs → AudioBubble-cYlxxQ7c.mjs} +3 -7
- package/dist/esm/chunks/Avatar-D84wF2os.mjs +88 -0
- package/dist/esm/chunks/{AvatarGroup-C7YRtPmJ.mjs → AvatarGroup-DiwfbRxH.mjs} +2 -6
- package/dist/esm/chunks/Badge-DuUb5-80.mjs +26 -0
- package/dist/esm/chunks/{Button-BQS3rwrS.mjs → Button-BIgwWrPJ.mjs} +6 -10
- package/dist/esm/chunks/{ButtonBar-GLNRjmjv.mjs → ButtonBar-vNvnvw7u.mjs} +3 -7
- package/dist/esm/chunks/{Camera-CAp0Y2gN.mjs → Camera-BMwkTJPq.mjs} +5 -9
- package/dist/esm/chunks/CheckBox-Cpoxy8w_.mjs +61 -0
- package/dist/esm/chunks/Chip-BayNVv7N.mjs +87 -0
- package/dist/esm/chunks/{DivInput-g6F1YWTo.mjs → DivInput-CWRUxy1y.mjs} +2 -6
- package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-v_kcIWV2.mjs} +1 -5
- package/dist/esm/chunks/{DrggablePanel-C0AmJy8g.mjs → DrggablePanel-yEeGeE1w.mjs} +2 -6
- package/dist/esm/chunks/DropDown-QQhwAg_J.mjs +112 -0
- package/dist/esm/chunks/ErrorSummary-DzIZMIll.mjs +90 -0
- package/dist/esm/chunks/{FileIcon-BQ2zZIW5.mjs → FileIcon-6UlkbKzk.mjs} +2 -2
- package/dist/esm/chunks/FileList-vMiGJByw.mjs +230 -0
- package/dist/esm/chunks/{FlexDiv-DnY1_qk4.mjs → FlexDiv-B1m7aY04.mjs} +3 -6
- package/dist/esm/chunks/Grouper-BDrAnfDF.mjs +73 -0
- package/dist/esm/chunks/{Icon--RjjODc9.mjs → Icon-D4A6_c4x.mjs} +3 -8
- package/dist/esm/chunks/IconButton-B_W-aOsB.mjs +96 -0
- package/dist/esm/chunks/{IndexedDB-Dk7a4fPS.mjs → IndexedDB-CTqfKmp1.mjs} +1 -1
- package/dist/esm/chunks/Label-I75yz3gq.mjs +113 -0
- package/dist/esm/chunks/Level-DgczkKBr.mjs +63 -0
- package/dist/esm/chunks/{MdStreamBuffer-By7pHJQL.mjs → MdStreamBuffer-CoQWQwRL.mjs} +38 -16
- package/dist/esm/chunks/Modal-CwwyijaO.mjs +139 -0
- package/dist/esm/chunks/{ModalController-BO5FkAqu.mjs → ModalController-IyB9lDRa.mjs} +2 -6
- package/dist/esm/chunks/{Overlay-sXM7cEYc.mjs → Overlay-C-yori3-.mjs} +1 -5
- package/dist/esm/chunks/Pager-BEtfyKtq.mjs +42 -0
- package/dist/esm/chunks/{ProgressIndicator-B5oByN3i.mjs → ProgressIndicator-BV0ginXb.mjs} +2 -8
- package/dist/esm/chunks/{PromptInput-Cwd53ux7.mjs → PromptInput-Cn5fRYap.mjs} +3 -7
- package/dist/esm/chunks/RadioButton-DWlg6ldv.mjs +63 -0
- package/dist/esm/chunks/{RadioButtonList-C_heuiis.mjs → RadioButtonList-D9FdlhPL.mjs} +3 -6
- package/dist/esm/chunks/{Slider-XEV0D2Rd.mjs → Slider-B2WZkZSg.mjs} +3 -7
- package/dist/esm/chunks/{Spacer-C5651N0N.mjs → Spacer-7Oj0SlD0.mjs} +1 -1
- package/dist/esm/chunks/{Switch-RfA431T4.mjs → Switch-DRhnznnO.mjs} +1 -4
- package/dist/esm/chunks/{TabBar-kPZ6ZJxr.mjs → TabBar-D6VR71ye.mjs} +5 -9
- package/dist/esm/chunks/TextArea-CkB5rJjI.mjs +80 -0
- package/dist/esm/chunks/{TextField-DwVKlLI_.mjs → TextField-BIXmkjEz.mjs} +5 -9
- package/dist/esm/chunks/Tip-CTdrwLky.mjs +96 -0
- package/dist/esm/chunks/Toast-8bUziIgh.mjs +189 -0
- package/dist/esm/chunks/ToggleButton-BOFITa8_.mjs +47 -0
- package/dist/esm/chunks/UploadArea-DE2ccDVx.mjs +135 -0
- package/dist/esm/chunks/{WSConnection-DV7k84B4.mjs → WSConnection-CHudrD62.mjs} +1 -1
- package/dist/esm/chunks/WebRTCConnection-DQbNa7Z9.mjs +252 -0
- package/dist/esm/chunks/{localDBStore-Dnpo5nSv.mjs → localDBStore-CaYiqITY.mjs} +2 -2
- package/dist/esm/chunks/{microphoneStore-Dr3lxoWX.mjs → microphoneStore-COEGtgyX.mjs} +26 -3
- package/dist/esm/chunks/{misc-wS74txaa.mjs → misc-2MIIqzsX.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-nW9CMec_.mjs} +2 -2
- package/dist/esm/chunks/{tslib.es6-C-olHjXV.mjs → tslib.es6-C81Qhn1z.mjs} +1 -1
- package/dist/esm/chunks/{uploads-worker-CYp-F4dz.mjs → uploads-worker-CMomtRvm.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-DeRMJ5c9.mjs → uploadsStore-CsfpSOTS.mjs} +1 -1
- package/dist/esm/chunks/{volumeStore-BX7QcrL-.mjs → volumeStore-TSYPqbHx.mjs} +5 -4
- package/dist/esm/chunks/webRTCStore-CVCDJzj5.mjs +57 -0
- package/dist/esm/chunks/{windowStore-CAzx2-QV.mjs → windowStore-BvejIR82.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +4 -6
- package/dist/esm/components/Avatar/index.mjs +3 -5
- package/dist/esm/components/AvatarGroup/index.mjs +4 -6
- package/dist/esm/components/Badge/index.mjs +2 -4
- package/dist/esm/components/Button/index.mjs +8 -10
- package/dist/esm/components/ButtonBar/index.mjs +4 -6
- package/dist/esm/components/Camera/index.mjs +6 -8
- package/dist/esm/components/CheckBox/index.mjs +4 -6
- package/dist/esm/components/Chip/index.mjs +5 -7
- package/dist/esm/components/DivInput/index.mjs +3 -5
- package/dist/esm/components/Dot/index.mjs +2 -4
- package/dist/esm/components/DraggablePanel/index.mjs +3 -5
- package/dist/esm/components/DropDown/index.mjs +4 -6
- package/dist/esm/components/ErrorSummary/index.mjs +3 -5
- package/dist/esm/components/FileIcon/index.mjs +3 -5
- package/dist/esm/components/FileList/index.mjs +6 -8
- package/dist/esm/components/FlexDiv/index.mjs +2 -4
- package/dist/esm/components/Grouper/index.mjs +5 -7
- package/dist/esm/components/Icon/index.mjs +4 -6
- package/dist/esm/components/IconButton/index.mjs +7 -9
- package/dist/esm/components/Label/index.mjs +3 -5
- package/dist/esm/components/Level/index.mjs +11 -0
- package/dist/esm/components/Modal/index.mjs +10 -12
- package/dist/esm/components/ModalController/index.mjs +4 -6
- package/dist/esm/components/Overlay/index.mjs +2 -4
- package/dist/esm/components/Pager/index.mjs +3 -5
- package/dist/esm/components/Progress/index.mjs +4 -6
- package/dist/esm/components/PromptInput/index.mjs +11 -13
- package/dist/esm/components/RadioButton/index.mjs +4 -6
- package/dist/esm/components/RadioButtonList/index.mjs +5 -7
- package/dist/esm/components/Slider/index.mjs +4 -6
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -4
- package/dist/esm/components/TabBar/index.mjs +8 -10
- package/dist/esm/components/TextArea/index.mjs +9 -11
- package/dist/esm/components/Textfield/index.mjs +10 -12
- package/dist/esm/components/Tip/index.mjs +3 -5
- package/dist/esm/components/Toast/index.mjs +5 -7
- package/dist/esm/components/ToggleButton/index.mjs +9 -11
- package/dist/esm/components/UploadArea/index.mjs +9 -11
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +72 -0
- package/dist/esm/hooks/useLocalStore.mjs +3 -3
- package/dist/esm/hooks/useMdStreamBuffer.mjs +56 -28
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useObserveTheme.mjs +0 -2
- package/dist/esm/hooks/useTheme.mjs +0 -2
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +14 -4
- package/dist/esm/index.mjs +62 -52
- package/dist/esm/providers/ThemeProvider.mjs +6 -19
- package/dist/esm/providers/themeServer.mjs +11 -6
- package/dist/esm/providers.mjs +0 -2
- package/dist/esm/stores/LocalDB.mjs +3 -3
- package/dist/esm/stores/SSE.mjs +3 -3
- package/dist/esm/stores/WS.mjs +2 -2
- package/dist/esm/stores/WebRTC.mjs +7 -0
- package/dist/esm/stores/microphone.mjs +2 -2
- package/dist/esm/stores/modal.mjs +1 -1
- package/dist/esm/stores/tip.mjs +1 -1
- package/dist/esm/stores/toast.mjs +1 -1
- package/dist/esm/stores/uploads.mjs +3 -3
- package/dist/esm/stores/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +17 -13
- package/dist/esm/theme/type.mjs +1 -1
- package/dist/esm/utils/index.mjs +11 -9
- package/dist/esm/utils/objects/index.mjs +8 -6
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +8476 -0
- package/dist/types/components/Level/Level.d.ts +5 -0
- package/dist/types/components/Level/_types.d.ts +21 -0
- package/dist/types/components/Level/index.d.ts +2 -0
- package/dist/types/components/Modal/_types.d.ts +4 -0
- package/dist/types/components/Toast/_types.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useBindWebRTC/index.d.ts +1 -0
- package/dist/types/hooks/useBindWebRTC/useBindWebRTC.d.ts +15 -0
- package/dist/types/hooks/useLocalStore/useLocalStore.d.ts +1 -1
- package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.d.ts +6 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/providers/ThemeProvider.d.ts +1 -6
- package/dist/types/providers/themeServer.d.ts +7 -3
- package/dist/types/stores/WebRTC/_types.d.ts +16 -0
- package/dist/types/stores/WebRTC/index.d.ts +2 -0
- package/dist/types/stores/WebRTC/webRTCStore.d.ts +21 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/microphone/index.d.ts +1 -1
- package/dist/types/stores/microphone/microphoneStore.d.ts +14 -1
- package/dist/types/stores/toast/_types.d.ts +1 -0
- package/dist/types/stores/volume/_types.d.ts +3 -1
- package/dist/types/stores/volume/volumeStore.d.ts +6 -2
- package/dist/types/utils/functions/files.d.ts +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +10 -0
- package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +2 -0
- package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +37 -3
- package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +13 -4
- package/dist/types/utils/objects/index.d.ts +2 -0
- package/package.json +8 -3
- package/dist/cjs/chunks/Avatar-CqUSRzVd.js +0 -84
- package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
- package/dist/cjs/chunks/CheckBox-Cbh6UK-7.js +0 -53
- package/dist/cjs/chunks/Chip-DcS8dtW2.js +0 -79
- package/dist/cjs/chunks/DropDown-B0970yVe.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
- package/dist/cjs/chunks/FileList-sDq1jK0b.js +0 -225
- package/dist/cjs/chunks/Grouper-Ccd-x_Nb.js +0 -63
- package/dist/cjs/chunks/IconButton-CF4cR7Tr.js +0 -84
- package/dist/cjs/chunks/Label-htjXHiQ4.js +0 -103
- package/dist/cjs/chunks/Modal-C0Z59meI.js +0 -101
- package/dist/cjs/chunks/Pager-D2_fshTy.js +0 -38
- package/dist/cjs/chunks/RadioButton-DPB2ZGVf.js +0 -56
- package/dist/cjs/chunks/TextArea-CRiPRF8v.js +0 -76
- package/dist/cjs/chunks/Tip-C5keUoHx.js +0 -90
- package/dist/cjs/chunks/Toast-CyiFOsI3.js +0 -178
- package/dist/cjs/chunks/ToggleButton-D5_WnW0o.js +0 -40
- package/dist/cjs/chunks/UploadArea-KqES_OLl.js +0 -129
- package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
- package/dist/esm/chunks/Avatar-29zhNfxX.mjs +0 -92
- package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
- package/dist/esm/chunks/CheckBox-7TiT2U47.mjs +0 -65
- package/dist/esm/chunks/Chip-CKsojimU.mjs +0 -91
- package/dist/esm/chunks/DropDown-mwo8fY7p.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
- package/dist/esm/chunks/FileList-fh-x9Dzm.mjs +0 -235
- package/dist/esm/chunks/Grouper-naJMvpB9.mjs +0 -77
- package/dist/esm/chunks/IconButton-ByBYppAj.mjs +0 -100
- package/dist/esm/chunks/Label-C04tD7UZ.mjs +0 -116
- package/dist/esm/chunks/Modal-B9ad9OfJ.mjs +0 -115
- package/dist/esm/chunks/Pager-Bz0FpgO5.mjs +0 -46
- package/dist/esm/chunks/RadioButton-CLeRiZ8x.mjs +0 -66
- package/dist/esm/chunks/TextArea-CxscPLwN.mjs +0 -84
- package/dist/esm/chunks/Tip-C6EcX7_M.mjs +0 -100
- package/dist/esm/chunks/Toast-D4uMNvaa.mjs +0 -192
- package/dist/esm/chunks/ToggleButton-C0QIflzX.mjs +0 -51
- package/dist/esm/chunks/UploadArea-je-1NhGb.mjs +0 -139
- package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
- /package/dist/cjs/chunks/{SSEConnection-C-1OzEOp.js → SSEConnection-DfjLAlOG.js} +0 -0
- /package/dist/cjs/chunks/{_types-Bdqd2vHh.js → _types-DMyBIF8s.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-EIfIjWH7.js → audioVisualizer-BxPvUj4h.js} +0 -0
- /package/dist/cjs/chunks/{colors-njquvHkx.js → colors-4n0sNFRA.js} +0 -0
- /package/dist/cjs/chunks/{debounce-BF4i6uIC.js → debounce-_IK-La-Z.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-7VjHHM8X.js → modalStore-CFsfK3ba.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-gCECyn2N.js → sharedTypes-C0ZHzH_T.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-Ck4NLvml.js → tipStore-dqD9-c30.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-CSStgB9d.js → toastStore-BN1N7WXv.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-C8dZW5nY.js → tslib.es6-DsF7Wv4Y.js} +0 -0
- /package/dist/esm/chunks/{SSEConnection-DcA3wFsO.mjs → SSEConnection-iFKOV9Uo.mjs} +0 -0
- /package/dist/esm/chunks/{_types-BVrr_Khp.mjs → _types-DrNviSG6.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-ZgT77nUw.mjs → audioVisualizer-BsmpLZyK.mjs} +0 -0
- /package/dist/esm/chunks/{colors-FQ0uNQcW.mjs → colors-BAATtfbL.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-Bst1jxMS.mjs → debounce-CYBH5qXQ.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-BpWnLtOF.mjs → modalStore-DmaeMv7z.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-tn9-uJvb.mjs → sharedTypes-CyrInj1b.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-CL5a95Bl.mjs → tipStore-B_MUZfr2.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-D2PEIqCo.mjs → toastStore-DAprlBVj.mjs} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var Size, Preset, tslib_es6 = require("./tslib.es6-
|
|
4
|
+
var Size, Preset, tslib_es6 = require("./tslib.es6-DsF7Wv4Y.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), css_flexDiv = "FlexDiv-module_flexDiv__EY5A- type-module_body-m-regular__LuQBA";
|
|
5
5
|
|
|
6
|
-
styleInject_es.styleInject(".type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.FlexDiv-module_flexDiv__EY5A- {\n\t&::-webkit-scrollbar {\n\t\tbackground-color: var(--flex-div-bg);\n\t\twidth: 6px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: var(--flex-div-bg);\n\t\twidth: 6px;\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--flex-div-scroll-handle);\n\t\tborder-radius: 20px;\n\t\tborder: 1px solid var(--flex-div-bg);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--flex-div-scroll-handle-hover);\n\t\tborder-radius: 20px;\n\t\tborder: 1px solid var(--flex-div-bg);\n\t}\n}\n"),
|
|
7
6
|
exports.Size = void 0, (Size = exports.Size || (exports.Size = {})).Grow = "grow",
|
|
8
7
|
Size.Fill = "fill", Size.Fit = "fit", Size.Viewport = "viewport", Size.Auto = "auto",
|
|
9
8
|
exports.Preset = void 0, (Preset = exports.Preset || (exports.Preset = {})).FillScroll = "fill-scroll",
|
|
@@ -165,7 +164,7 @@ const FlexDiv = React.memo(React.forwardRef((props, ref) => {
|
|
|
165
164
|
id: divId,
|
|
166
165
|
ref: ref,
|
|
167
166
|
className: `${css_flexDiv} ${null != className ? className : ""}`,
|
|
168
|
-
style: Object.assign(Object.assign({},
|
|
167
|
+
style: Object.assign(Object.assign({}, style), wrapperStyle),
|
|
169
168
|
transition: transition,
|
|
170
169
|
variants: variants,
|
|
171
170
|
initial: enter,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-DsF7Wv4Y.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
|
+
|
|
6
|
+
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
7
|
+
|
|
8
|
+
var Badge = require("./Badge-4tBynWZe.js"), Icon = require("./Icon-BVYVJp9J.js"), css_header = "Grouper-module_header__D5fV0 flexBox-module_rowBetween__5FEvi", css_title = "Grouper-module_title__ZKqTP flexBox-module_rowBetween__5FEvi type-module_body-m-regular__LuQBA", css_content = "Grouper-module_content__Mof50 flexBox-module_rowBetween__5FEvi", css_icon = "Grouper-module_icon__14Jis flexBox-module_row__z24tF";
|
|
9
|
+
|
|
10
|
+
const Grouper = React.memo(props => {
|
|
11
|
+
const theme = hooks_useTheme.useTheme(), {title: title = "Group Title", toggle: toggle = !0, open: open = !0, hasIcon: hasIcon = !0, iconName: iconName = "chevron down", iconSize: iconSize = 18, frameSize: frameSize = 64, border: border = 0, count: count = 0, unframed: unframed = !1, hideNull: hideNull = !0, showFilterBadge: showFilterBadge = !1, onChange: onChange = () => null, onClick: onClick = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "title", "toggle", "open", "hasIcon", "iconName", "iconSize", "frameSize", "border", "count", "unframed", "hideNull", "showFilterBadge", "onChange", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [state, setState] = React.useState(open), [icon, animateIcon] = react.useAnimate();
|
|
12
|
+
React.useEffect(() => setState(open), [ open ]);
|
|
13
|
+
const animate = React.useCallback(state => {
|
|
14
|
+
const animation = {
|
|
15
|
+
rotate: state ? 0 : 180
|
|
16
|
+
};
|
|
17
|
+
animateIcon(icon.current, Object.assign({}, animation), {
|
|
18
|
+
ease: "easeInOut",
|
|
19
|
+
duration: .25
|
|
20
|
+
});
|
|
21
|
+
}, [ animateIcon, icon ]), handleToggle = React.useCallback(() => {
|
|
22
|
+
toggle && (onClick(), onChange(!state), animate(!state), setState(!state));
|
|
23
|
+
}, [ toggle, onClick, onChange, state, animate ]), cssVars = React.useMemo(() => ({
|
|
24
|
+
"--grouper-height": unframed ? "auto" : `${frameSize}px`,
|
|
25
|
+
"--grouper-border": border ? `${border}px` : "0",
|
|
26
|
+
"--grouper-icon-size": `${iconSize}px`
|
|
27
|
+
}), [ frameSize, iconSize, border, unframed ]);
|
|
28
|
+
return jsxRuntime.jsx("button", Object.assign({
|
|
29
|
+
id: divId,
|
|
30
|
+
type: "button",
|
|
31
|
+
className: `${css_header}${divClass}`,
|
|
32
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
33
|
+
onClick: handleToggle,
|
|
34
|
+
"aria-expanded": state
|
|
35
|
+
}, rest, {
|
|
36
|
+
children: jsxRuntime.jsxs("div", {
|
|
37
|
+
className: css_content,
|
|
38
|
+
children: [ jsxRuntime.jsxs("div", {
|
|
39
|
+
className: css_title,
|
|
40
|
+
children: [ title, jsxRuntime.jsx(Badge.Badge, {
|
|
41
|
+
hideNull: hideNull,
|
|
42
|
+
count: count,
|
|
43
|
+
variant: "light"
|
|
44
|
+
}), showFilterBadge && jsxRuntime.jsx(Icon.Icon, {
|
|
45
|
+
name: "filter",
|
|
46
|
+
size: 16,
|
|
47
|
+
strokeColor: theme.current.colors["core-text-disabled"]
|
|
48
|
+
}) ]
|
|
49
|
+
}), hasIcon && jsxRuntime.jsx("div", {
|
|
50
|
+
ref: icon,
|
|
51
|
+
className: css_icon,
|
|
52
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
53
|
+
name: iconName,
|
|
54
|
+
size: iconSize
|
|
55
|
+
})
|
|
56
|
+
}) ]
|
|
57
|
+
})
|
|
58
|
+
}));
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
exports.Grouper = Grouper;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-DsF7Wv4Y.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
5
|
|
|
6
6
|
require("../theme/colors.js");
|
|
7
7
|
|
|
8
|
-
var misc = require("./misc-
|
|
8
|
+
var misc = require("./misc-4xyXRU2K.js");
|
|
9
9
|
|
|
10
10
|
require("../hooks/useWindow.js");
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
styleInject_es.styleInject(".Icon-module_icon__szG-X {\n\tcursor: var(--cursor);\n\tuser-select: none;\n\tpointer-events: var(--pointer-events);\n\t--webkit-user-select: none;\n\t-webkit-tap-highlight-color: transparent;\n\toutline: none;\n\tborder: 0;\n\ttransition: stroke, fill var(--motion-water-duration) var(--motion-water);\n}\n\npath,\ncircle,\nrect,\npolyline,\npolygon,\nline {\n\ttransition: stroke, fill var(--motion-water-duration) var(--motion-water);\n}\n");
|
|
12
|
+
var css_icon = "Icon-module_icon__szG-X";
|
|
15
13
|
|
|
16
14
|
/**
|
|
17
15
|
* Static icon registry created once at module load.
|
|
18
16
|
* Each entry stores only icon line content renderers.
|
|
19
|
-
*/
|
|
20
|
-
const STATIC_ICON_REGISTRY = new Map([ [ "talk", {
|
|
17
|
+
*/ const STATIC_ICON_REGISTRY = new Map([ [ "talk", {
|
|
21
18
|
line: ({strokeColor: strokeColor, fillColor: fillColor}) => jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
22
19
|
children: [ jsxRuntime.jsx("path", {
|
|
23
20
|
d: "M10,2.5c4.14,0,7.5,3.36,7.5,7.5s-3.36,7.5-7.5,7.5-7.5-3.36-7.5-7.5,3.36-7.5,7.5-7.5M10,1C5.03,1,1,5.03,1,10s4.03,9,9,9,9-4.03,9-9S14.97,1,10,1h0Z",
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-DsF7Wv4Y.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), Badge = require("./Badge-4tBynWZe.js"), Dot = require("./Dot-BeWDLajy.js"), Icon = require("./Icon-BVYVJp9J.js"), sharedTypes = require("./sharedTypes-C0ZHzH_T.js"), css_button = "IconButton-module_button__rziqa flexBox-module_row__z24tF", css_label = "IconButton-module_label__qWGFD flexBox-module_row__z24tF type-module_body-l-regular__lOYbg", css_icon = "IconButton-module_icon__2DDWy flexBox-module_row__z24tF", css_count = "IconButton-module_count__6r373 flexBox-module_row__z24tF";
|
|
5
|
+
|
|
6
|
+
const IconButton = React.memo(props => {
|
|
7
|
+
const {frameSize: frameSize = 36, iconSize: iconSize = 20, round: round = !0, icon: icon = "more", borderRadius: borderRadius = 4, border: border = !1, tooltip: tooltip, color: color, colorOn: colorOn, iconFill: iconFill = !1, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-outline-primary)", bgColorOn: bgColorOn = "var(--core-outline-primary)", iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-primary)", transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, fillColor: fillColor, label: label, hover: hover = !0, count: count = 0, toggle: toggle = !1, toggleIcon: toggleIcon = !1, isToggled: isToggled = !1, disabled: disabled = !1, showDot: showDot = !1, buttonSize: buttonSize = "m", onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "frameSize", "iconSize", "round", "icon", "borderRadius", "border", "tooltip", "color", "colorOn", "iconFill", "bgColor", "bgColorHover", "bgColorOn", "iconColor", "iconColorOn", "iconColorHover", "transition", "variants", "initial", "animate", "exit", "fillColor", "label", "hover", "count", "toggle", "toggleIcon", "isToggled", "disabled", "showDot", "buttonSize", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = React.useRef(null), [on, setOn] = React.useState(isToggled), [hovered, setHovered] = React.useState(!1);
|
|
8
|
+
React.useEffect(() => setOn(isToggled), [ isToggled ]);
|
|
9
|
+
const handleClick = React.useCallback(e => {
|
|
10
|
+
disabled || (tooltip && onToolTip(null), toggle && setOn(!on), onClick(e));
|
|
11
|
+
}, [ disabled, tooltip, onToolTip, on, onClick, toggle ]), handleMouseEnter = React.useCallback(e => {
|
|
12
|
+
if (setHovered(!0), !(null == ref ? void 0 : ref.current) || !tooltip) return;
|
|
13
|
+
const tip = {
|
|
14
|
+
type: sharedTypes.ToolTipType.button,
|
|
15
|
+
payload: {
|
|
16
|
+
label: tooltip
|
|
17
|
+
},
|
|
18
|
+
event: e,
|
|
19
|
+
ref: ref
|
|
20
|
+
};
|
|
21
|
+
onToolTip(tip);
|
|
22
|
+
}, [ tooltip, onToolTip ]), handleMouseLeave = React.useCallback(() => {
|
|
23
|
+
setHovered(!1), tooltip && onToolTip(null);
|
|
24
|
+
}, [ tooltip, onToolTip ]), bgColorNormal = React.useMemo(() => on ? bgColorOn : null != bgColor ? bgColor : "var(--core-surface-secondary)", [ bgColorOn, bgColor, on ]), bgHoverColor = React.useMemo(() => hover && on ? bgColorOn : hover ? bgColorHover : null != bgColor ? bgColor : "transparent", [ hover, bgColor, bgColorOn, bgColorHover, on ]), textColor = React.useMemo(() => on ? colorOn : null != color ? color : "var(--core-text-primary)", [ on, colorOn, color ]), setIconColor = React.useMemo(() => on ? iconColorOn : hovered ? iconColorHover : null != iconColor ? iconColor : "var(--core-text-primary)", [ on, iconColorOn, iconColor, iconColorHover, hovered ]), size = React.useMemo(() => buttonSize ? "s" === buttonSize ? 24 : "m" === buttonSize ? 36 : "l" === buttonSize ? 44 : "xl" === buttonSize ? 56 : void 0 : frameSize, [ frameSize, buttonSize ]), cssVars = React.useMemo(() => ({
|
|
25
|
+
"--ib-bg-color": bgColorNormal,
|
|
26
|
+
"--ib-bg-color-hover": disabled ? bgColorNormal : bgHoverColor,
|
|
27
|
+
"--ib-icon-size": `${null != iconSize ? iconSize : 0}px`,
|
|
28
|
+
"--ib-button-size": `${null != size ? size : 0}px`,
|
|
29
|
+
"--ib-border-radius": round ? "100%" : `${null != borderRadius ? borderRadius : 0}px`,
|
|
30
|
+
"--ib-border": border ? "1px" : 0,
|
|
31
|
+
"--ib-color": textColor,
|
|
32
|
+
"--ib-cursor": disabled ? "default" : "pointer"
|
|
33
|
+
}), [ bgColorNormal, bgHoverColor, textColor, border, size, borderRadius, iconSize, round, disabled ]);
|
|
34
|
+
return jsxRuntime.jsxs(react.motion.button, Object.assign({
|
|
35
|
+
id: divId,
|
|
36
|
+
type: "button",
|
|
37
|
+
className: `${css_button}${divClass}`,
|
|
38
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
39
|
+
onClick: e => handleClick(e),
|
|
40
|
+
onMouseOutCapture: handleMouseLeave,
|
|
41
|
+
onMouseOverCapture: handleMouseEnter,
|
|
42
|
+
transition: transition,
|
|
43
|
+
variants: variants,
|
|
44
|
+
initial: initial,
|
|
45
|
+
animate: animate,
|
|
46
|
+
exit: exit,
|
|
47
|
+
disabled: disabled,
|
|
48
|
+
"aria-disabled": disabled,
|
|
49
|
+
ref: ref
|
|
50
|
+
}, rest, {
|
|
51
|
+
children: [ jsxRuntime.jsx("div", {
|
|
52
|
+
className: css_icon,
|
|
53
|
+
style: {
|
|
54
|
+
opacity: disabled ? .3 : 1
|
|
55
|
+
},
|
|
56
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
57
|
+
name: icon,
|
|
58
|
+
strokeColor: setIconColor,
|
|
59
|
+
fillColor: fillColor,
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
size: iconSize,
|
|
62
|
+
fill: iconFill,
|
|
63
|
+
toggle: !!toggleIcon && on,
|
|
64
|
+
pointer: !0
|
|
65
|
+
})
|
|
66
|
+
}), label && jsxRuntime.jsx("div", {
|
|
67
|
+
className: css_label,
|
|
68
|
+
children: label
|
|
69
|
+
}), jsxRuntime.jsx(Dot.Dot, {
|
|
70
|
+
show: showDot
|
|
71
|
+
}), 0 !== count && jsxRuntime.jsx("div", {
|
|
72
|
+
className: css_count,
|
|
73
|
+
children: jsxRuntime.jsx(Badge.Badge, {
|
|
74
|
+
variant: "light",
|
|
75
|
+
count: count,
|
|
76
|
+
hideNull: !0
|
|
77
|
+
})
|
|
78
|
+
}) ]
|
|
79
|
+
}));
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
exports.IconButton = IconButton;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var LabelBackground, tslib_es6 = require("./tslib.es6-DsF7Wv4Y.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-4xyXRU2K.js"), css = {
|
|
5
|
+
label: "Label-module_label__RaRvM",
|
|
6
|
+
button: "Label-module_button__N8bcQ type-module_body-m-regular__LuQBA",
|
|
7
|
+
xs: "Label-module_xs__K9Ai6 type-module_body-xs-regular__ZAFft",
|
|
8
|
+
s: "Label-module_s__Zh8Gp type-module_body-s-regular__vRHSP",
|
|
9
|
+
m: "Label-module_m__BJtGL type-module_body-m-regular__LuQBA",
|
|
10
|
+
l: "Label-module_l__t70tt type-module_body-l-regular__lOYbg"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function resolveSemanticBackground(backgroundColor) {
|
|
14
|
+
if (!backgroundColor || "string" != typeof backgroundColor) return;
|
|
15
|
+
const semanticKey = backgroundColor;
|
|
16
|
+
return exports.LabelBackground[semanticKey] ? exports.LabelBackground[semanticKey] : Object.values(exports.LabelBackground).find(value => value === backgroundColor);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.LabelBackground = void 0, (LabelBackground = exports.LabelBackground || (exports.LabelBackground = {})).red = "red",
|
|
20
|
+
LabelBackground.yellow = "yellow", LabelBackground.green = "green", LabelBackground.blue = "blue",
|
|
21
|
+
LabelBackground.grey = "grey", LabelBackground.lightGrey = "lightGrey", LabelBackground.white = "white",
|
|
22
|
+
exports.Label = function(props) {
|
|
23
|
+
const {children: children, label: label, backgroundColor: backgroundColor, borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-outline-primary)", bgColor: bgColor = "transparent", borderRadius: borderRadius = 4, padding: padding, textColor: textColor = "var(--core-text-primary)", textSize: textSize = "s", onClick: onClick} = props, divAttributes = tslib_es6.__rest(props, [ "children", "label", "backgroundColor", "borderWidth", "borderSize", "borderColor", "bgColor", "borderRadius", "padding", "textColor", "textSize", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", isInteractive = Boolean(onClick), resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, handleClick = React.useCallback(e => {
|
|
24
|
+
isInteractive && (null == onClick || onClick(e));
|
|
25
|
+
}, [ isInteractive, onClick ]), setBgColor = React.useMemo(() => {
|
|
26
|
+
if (!resolvedBackgroundColor) return "transparent";
|
|
27
|
+
const fill = resolveSemanticBackground(resolvedBackgroundColor);
|
|
28
|
+
if (!fill) return resolvedBackgroundColor;
|
|
29
|
+
switch (fill) {
|
|
30
|
+
case "red":
|
|
31
|
+
return "var(--feedback-warning)";
|
|
32
|
+
|
|
33
|
+
case "green":
|
|
34
|
+
return "var(--feedback-positive)";
|
|
35
|
+
|
|
36
|
+
case "yellow":
|
|
37
|
+
return "var(--array-yellow)";
|
|
38
|
+
|
|
39
|
+
case "grey":
|
|
40
|
+
case "white":
|
|
41
|
+
return "var(--core-surface-secondary)";
|
|
42
|
+
|
|
43
|
+
case "lightGrey":
|
|
44
|
+
return "var(--core-button-disabled)";
|
|
45
|
+
|
|
46
|
+
case "blue":
|
|
47
|
+
return "var(--core-button-primary)";
|
|
48
|
+
|
|
49
|
+
default:
|
|
50
|
+
return "var(--core-surface-primary)";
|
|
51
|
+
}
|
|
52
|
+
}, [ resolvedBackgroundColor ]), setBorderColor = React.useMemo(() => {
|
|
53
|
+
if (!resolvedBackgroundColor) return borderColor;
|
|
54
|
+
const fill = resolveSemanticBackground(resolvedBackgroundColor);
|
|
55
|
+
if (!fill) return borderColor;
|
|
56
|
+
switch (fill) {
|
|
57
|
+
case "red":
|
|
58
|
+
return "var(--feedback-warning)";
|
|
59
|
+
|
|
60
|
+
case "green":
|
|
61
|
+
return "var(--feedback-positive)";
|
|
62
|
+
|
|
63
|
+
case "yellow":
|
|
64
|
+
return "var(--array-yellow-label)";
|
|
65
|
+
|
|
66
|
+
case "grey":
|
|
67
|
+
case "lightGrey":
|
|
68
|
+
case "white":
|
|
69
|
+
return "var(--core-outline-primary)";
|
|
70
|
+
|
|
71
|
+
case "blue":
|
|
72
|
+
return "var(--core-button-primary)";
|
|
73
|
+
|
|
74
|
+
default:
|
|
75
|
+
return "var(--core-surface-primary)";
|
|
76
|
+
}
|
|
77
|
+
}, [ resolvedBackgroundColor, borderColor ]), setPadding = React.useMemo(() => padding ? misc.setStyle(padding) : "2px 4px", [ padding ]), cssVars = React.useMemo(() => ({
|
|
78
|
+
"--label-padding": setPadding,
|
|
79
|
+
"--label-border-radius": misc.setStyle(borderRadius),
|
|
80
|
+
"--label-cursor": onClick ? "pointer" : "default",
|
|
81
|
+
"--label-color": textColor,
|
|
82
|
+
"--label-bg-color": setBgColor,
|
|
83
|
+
"--label-border-size": misc.setStyle(resolvedBorderWidth),
|
|
84
|
+
"--label-border-color": setBorderColor
|
|
85
|
+
}), [ setPadding, borderRadius, onClick, textColor, setBorderColor, setBgColor, resolvedBorderWidth ]);
|
|
86
|
+
return isInteractive ? jsxRuntime.jsx("button", Object.assign({
|
|
87
|
+
id: divId,
|
|
88
|
+
type: "button",
|
|
89
|
+
className: `${css.button} ${css[textSize]}${divClass}`,
|
|
90
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
91
|
+
"aria-label": "Label button",
|
|
92
|
+
onClick: e => handleClick(e)
|
|
93
|
+
}, rest, {
|
|
94
|
+
children: null != children ? children : label
|
|
95
|
+
})) : jsxRuntime.jsx("span", Object.assign({
|
|
96
|
+
id: divId,
|
|
97
|
+
className: `${css.label} ${css[textSize]}${divClass}`,
|
|
98
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
99
|
+
}, rest, {
|
|
100
|
+
children: null != children ? children : label
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-DsF7Wv4Y.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-4xyXRU2K.js"), audioVisualizer = require("./audioVisualizer-BxPvUj4h.js"), css_wrapper = "Level-module_wrapper__yOfXw", css_barContainer = "Level-module_barContainer__QMUdv", css_bar = "Level-module_bar__MnApX";
|
|
4
|
+
|
|
5
|
+
const Level = React.memo(function(props) {
|
|
6
|
+
const {width: width = 100, height: height = 4, gap: gap = 0, audioStream: audioStream, playing: playing = !1, minIntensity: minIntensity = 0, maxIntensity: maxIntensity = 5, intensity: intensity = 3.5, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, releasePerSeconds: releasePerSeconds, ReleasePerSeconds: ReleasePerSeconds = 1.5, borderRadius: borderRadius = 4, borderColor: borderColor = "transparent", borderWidth: borderWidth = 0, colorActive: colorActive = "var(--feedback-positive)", backgroundColor: backgroundColor = "var(--core-surface-primary-tint)"} = props, divAttributes = tslib_es6.__rest(props, [ "width", "height", "gap", "audioStream", "playing", "minIntensity", "maxIntensity", "intensity", "peakIntensity", "risePerSeconds", "releasePerSeconds", "ReleasePerSeconds", "borderRadius", "borderColor", "borderWidth", "colorActive", "backgroundColor" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", visualizerRef = React.useRef(null), [normalizedIntensity, setNormalizedIntensity] = React.useState(0), totalBars = Math.max(1, Math.floor(maxIntensity)), minBars = Math.max(0, Math.min(Math.floor(minIntensity), totalBars)), releaseRate = null != releasePerSeconds ? releasePerSeconds : ReleasePerSeconds, intensityIntervals = React.useMemo(() => new Array(totalBars).fill(0).map((_, index) => index), [ totalBars ]), activeBars = React.useMemo(() => {
|
|
7
|
+
const scaledBars = Math.round(minBars + normalizedIntensity * (totalBars - minBars));
|
|
8
|
+
return Math.max(minBars, Math.min(scaledBars, totalBars));
|
|
9
|
+
}, [ minBars, normalizedIntensity, totalBars ]), visualizerSettings = React.useMemo(() => ({
|
|
10
|
+
intensityMultiplier: intensity,
|
|
11
|
+
peakIntensity: peakIntensity,
|
|
12
|
+
risePerSecond: risePerSeconds,
|
|
13
|
+
releasePerSecond: releaseRate,
|
|
14
|
+
onUpdate: ({intensity: nextIntensity}) => setNormalizedIntensity(nextIntensity)
|
|
15
|
+
}), [ intensity, peakIntensity, releaseRate, risePerSeconds ]);
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
var _a;
|
|
18
|
+
if (null === (_a = visualizerRef.current) || void 0 === _a || _a.dispose(), visualizerRef.current = null,
|
|
19
|
+
!audioStream) return void setNormalizedIntensity(0);
|
|
20
|
+
const visualizer = new audioVisualizer.AudioVisualizer(audioStream, visualizerSettings);
|
|
21
|
+
return visualizerRef.current = visualizer, playing && visualizer.start(), () => {
|
|
22
|
+
visualizer.dispose(), visualizerRef.current === visualizer && (visualizerRef.current = null);
|
|
23
|
+
};
|
|
24
|
+
}, [ audioStream, playing, visualizerSettings ]), React.useEffect(() => {
|
|
25
|
+
visualizerRef.current && (playing ? visualizerRef.current.start() : (visualizerRef.current.stop(),
|
|
26
|
+
setNormalizedIntensity(0)));
|
|
27
|
+
}, [ playing ]);
|
|
28
|
+
const cssVars = React.useMemo(() => ({
|
|
29
|
+
"--level-width": misc.setStyle(width),
|
|
30
|
+
"--level-height": misc.setStyle(height),
|
|
31
|
+
"--level-gap": misc.setStyle(gap),
|
|
32
|
+
"--level-bar-border-radius": misc.setStyle(borderRadius),
|
|
33
|
+
"--level-border-color": borderColor,
|
|
34
|
+
"--level-border-width": misc.setStyle(borderWidth),
|
|
35
|
+
"--level-color": colorActive,
|
|
36
|
+
"--level-bg-color": backgroundColor
|
|
37
|
+
}), [ width, height, gap, borderRadius, borderColor, borderWidth, colorActive, backgroundColor ]);
|
|
38
|
+
return jsxRuntime.jsx("div", Object.assign({
|
|
39
|
+
id: divId,
|
|
40
|
+
className: `${css_wrapper}${divClass}`,
|
|
41
|
+
style: Object.assign(Object.assign({}, cssVars), divStyle)
|
|
42
|
+
}, rest, {
|
|
43
|
+
children: intensityIntervals.map(barIndex => {
|
|
44
|
+
const isActive = barIndex < activeBars;
|
|
45
|
+
return jsxRuntime.jsx("div", {
|
|
46
|
+
className: css_barContainer,
|
|
47
|
+
children: jsxRuntime.jsx("div", {
|
|
48
|
+
className: css_bar,
|
|
49
|
+
style: {
|
|
50
|
+
opacity: isActive ? 1 : 0
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
}, barIndex);
|
|
54
|
+
})
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
exports.Level = Level;
|
|
@@ -134,18 +134,19 @@ function hasMeaningfulInlineContent(value, repeatedCharacter) {
|
|
|
134
134
|
|
|
135
135
|
exports.MdBuffer = class {
|
|
136
136
|
constructor(options) {
|
|
137
|
-
var _a, _b, _c, _d, _e, rules;
|
|
138
|
-
this.committedRaw = "", this.activeRaw = "", this.frameHandle = null, this.
|
|
139
|
-
this.
|
|
140
|
-
this.htmlHandling = null !== (_a = null == options ? void 0 : options.htmlHandling) && void 0 !== _a ? _a : "ignore",
|
|
137
|
+
var _a, _b, _c, _d, _e, _f, rules;
|
|
138
|
+
this.committedRaw = "", this.activeRaw = "", this.frameHandle = null, this.flushTimer = null,
|
|
139
|
+
this.lastFlushAt = 0, this.lastFlushedRawLength = 0, this.completeSignal = !1, this.endOfStreamToken = null == options ? void 0 : options.endOfStreamToken,
|
|
140
|
+
this.healthyEndMarker = null == options ? void 0 : options.healthyEndMarker, this.htmlHandling = null !== (_a = null == options ? void 0 : options.htmlHandling) && void 0 !== _a ? _a : "ignore",
|
|
141
141
|
this.includeLinksAndImages = null !== (_b = null == options ? void 0 : options.includeLinksAndImages) && void 0 !== _b && _b,
|
|
142
|
-
this.
|
|
142
|
+
this.flushDelayMs = Math.max(0, null !== (_c = null == options ? void 0 : options.flushDelayMs) && void 0 !== _c ? _c : 0),
|
|
143
|
+
this.onFlush = null == options ? void 0 : options.onFlush, this.requestFrame = null !== (_d = null == options ? void 0 : options.requestFrame) && void 0 !== _d ? _d : function() {
|
|
143
144
|
if ("undefined" != typeof globalThis && "function" == typeof globalThis.requestAnimationFrame) return globalThis.requestAnimationFrame.bind(globalThis);
|
|
144
145
|
return callback => globalThis.setTimeout(() => callback(Date.now()), 16);
|
|
145
|
-
}(), this.cancelFrame = null !== (
|
|
146
|
+
}(), this.cancelFrame = null !== (_e = null == options ? void 0 : options.cancelFrame) && void 0 !== _e ? _e : function() {
|
|
146
147
|
if ("undefined" != typeof globalThis && "function" == typeof globalThis.cancelAnimationFrame) return globalThis.cancelAnimationFrame.bind(globalThis);
|
|
147
148
|
return handle => globalThis.clearTimeout(handle);
|
|
148
|
-
}(), this.watchedMarkers = (rules = null !== (
|
|
149
|
+
}(), this.watchedMarkers = (rules = null !== (_f = null == options ? void 0 : options.watchedMarkers) && void 0 !== _f ? _f : DEFAULT_WATCHED_MARKERS,
|
|
149
150
|
[ ...rules ].sort((left, right) => right.open.length - left.open.length));
|
|
150
151
|
}
|
|
151
152
|
/**
|
|
@@ -158,6 +159,11 @@ exports.MdBuffer = class {
|
|
|
158
159
|
*/ get healthy() {
|
|
159
160
|
return this.buildHealthyOutput();
|
|
160
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Characters appended since the last emitted snapshot.
|
|
164
|
+
*/ get pendingCharacters() {
|
|
165
|
+
return Math.max(0, this.raw.length - this.lastFlushedRawLength);
|
|
166
|
+
}
|
|
161
167
|
/**
|
|
162
168
|
* Append a streamed Markdown token and schedule a frame flush.
|
|
163
169
|
*/ append(chunk) {
|
|
@@ -169,11 +175,15 @@ exports.MdBuffer = class {
|
|
|
169
175
|
* Emit the current snapshot immediately.
|
|
170
176
|
*/ flush(reason = "manual") {
|
|
171
177
|
var _a;
|
|
178
|
+
this.clearScheduledFlush();
|
|
179
|
+
const raw = this.committedRaw + this.activeRaw, healthy = this.buildHealthyOutput();
|
|
180
|
+
this.lastFlushAt = Date.now(), this.lastFlushedRawLength = raw.length;
|
|
172
181
|
const snapshot = {
|
|
173
|
-
raw:
|
|
174
|
-
healthy:
|
|
182
|
+
raw: raw,
|
|
183
|
+
healthy: healthy,
|
|
175
184
|
reason: reason,
|
|
176
|
-
isComplete: this.completeSignal
|
|
185
|
+
isComplete: this.completeSignal,
|
|
186
|
+
pendingCharacters: this.pendingCharacters
|
|
177
187
|
};
|
|
178
188
|
return null === (_a = this.onFlush) || void 0 === _a || _a.call(this, snapshot),
|
|
179
189
|
snapshot;
|
|
@@ -181,14 +191,13 @@ exports.MdBuffer = class {
|
|
|
181
191
|
/**
|
|
182
192
|
* Mark the stream as complete and flush one final snapshot.
|
|
183
193
|
*/ complete() {
|
|
184
|
-
return
|
|
185
|
-
this.completeSignal = !0, this.flush("complete");
|
|
194
|
+
return this.clearScheduledFlush(), this.completeSignal = !0, this.flush("complete");
|
|
186
195
|
}
|
|
187
196
|
/**
|
|
188
197
|
* Clear the buffered state and cancel any pending frame.
|
|
189
198
|
*/ reset() {
|
|
190
|
-
|
|
191
|
-
this.
|
|
199
|
+
this.clearScheduledFlush(), this.committedRaw = "", this.activeRaw = "", this.lastFlushAt = 0,
|
|
200
|
+
this.lastFlushedRawLength = 0, this.completeSignal = !1;
|
|
192
201
|
}
|
|
193
202
|
/**
|
|
194
203
|
* Cancel future work and release the retained state.
|
|
@@ -204,10 +213,23 @@ exports.MdBuffer = class {
|
|
|
204
213
|
return this.dispose(), snapshot;
|
|
205
214
|
}
|
|
206
215
|
scheduleFlush() {
|
|
207
|
-
null === this.frameHandle && (this.frameHandle = this.requestFrame(() => {
|
|
208
|
-
this.frameHandle = null
|
|
216
|
+
null === this.frameHandle && null === this.flushTimer && (this.frameHandle = this.requestFrame(() => {
|
|
217
|
+
this.frameHandle = null;
|
|
218
|
+
const remainingDelay = this.getRemainingFlushDelay();
|
|
219
|
+
remainingDelay <= 0 ? this.flush("raf") : this.flushTimer = setTimeout(() => {
|
|
220
|
+
this.flushTimer = null, this.flush("raf");
|
|
221
|
+
}, remainingDelay);
|
|
209
222
|
}));
|
|
210
223
|
}
|
|
224
|
+
getRemainingFlushDelay() {
|
|
225
|
+
if (this.flushDelayMs <= 0) return 0;
|
|
226
|
+
const elapsed = Date.now() - this.lastFlushAt;
|
|
227
|
+
return Math.max(0, this.flushDelayMs - elapsed);
|
|
228
|
+
}
|
|
229
|
+
clearScheduledFlush() {
|
|
230
|
+
null !== this.frameHandle && (this.cancelFrame(this.frameHandle), this.frameHandle = null),
|
|
231
|
+
null !== this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null);
|
|
232
|
+
}
|
|
211
233
|
commitStableLines() {
|
|
212
234
|
if (this.buildHealthyTail(this.activeRaw) !== this.activeRaw) return;
|
|
213
235
|
const lastNewlineIndex = this.activeRaw.lastIndexOf("\n");
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-DsF7Wv4Y.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-4xyXRU2K.js"), Button = require("./Button-QJ5lsSAz.js"), Icon = require("./Icon-BVYVJp9J.js"), IconButton = require("./IconButton-CP1Wsvsx.js"), css = {
|
|
5
|
+
wrapper: "Modal-module_wrapper__34Hds flexBox-module_columnBetween__ERfp7",
|
|
6
|
+
title: "Modal-module_title__A5OeE flexBox-module_rowBetween__5FEvi",
|
|
7
|
+
titleBlock: "Modal-module_titleBlock__HUepX flexBox-module_rowStart__4tcxS",
|
|
8
|
+
titleIcon: "Modal-module_titleIcon__xJYzy flexBox-module_row__z24tF",
|
|
9
|
+
contentWrapper: "Modal-module_contentWrapper__Swyjx flexBox-module_columnStart__C7P44",
|
|
10
|
+
content: "Modal-module_content__dWO-B flexBox-module_columnStart__C7P44",
|
|
11
|
+
actions: "Modal-module_actions__hY6zi flexBox-module_rowBetween__5FEvi",
|
|
12
|
+
leftActions: "Modal-module_leftActions__-M-DM flexBox-module_rowStart__4tcxS",
|
|
13
|
+
rightActions: "Modal-module_rightActions__IFgrN flexBox-module_rowEnd__rVdVm",
|
|
14
|
+
xs: "Modal-module_xs__iPcS9 type-module_body-xs-medium__s3KvF",
|
|
15
|
+
s: "Modal-module_s__31sYS type-module_body-s-medium__tjdFc",
|
|
16
|
+
m: "Modal-module_m__Iz82L type-module_body-m-medium__uW1on",
|
|
17
|
+
l: "Modal-module_l__pntdS type-module_body-l-medium__BqRC7",
|
|
18
|
+
xl: "Modal-module_xl__MR-68 type-module_body-xl-medium__BeyrH"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Modal = React.memo(props => {
|
|
22
|
+
const {children: children, id: id, className: className, style: style, minWidth: minWidth = 300, minHeight: minHeight = 200, maxHeight: maxHeight = 400, maxWidth: maxWidth = 400, padding: padding, close: close = !0, title: title, titleSize: titleSize = "l", contentSize: contentSize = "m", actions: actions, titleIcon: titleIcon, titleIconFill: titleIconFill = !0, titleBorderColor: titleBorderColor = "var(--core-outline-primary)", titleBorderWidth: titleBorderWidth = 0, actionsBorderColor: actionsBorderColor = "var(--core-outline-primary)", actionsBorderWidth: actionsBorderWidth = 0, autoBorderBottom: autoBorderBottom = !0, onAction: onAction, onReject: onReject, onResolve: onResolve, onClose: onClose, onToolTip: onToolTip, onDragPointerDown: onDragPointerDown, backgroundColor: backgroundColor = "var(--core-surface-secondary)", scrollHandleColor: scrollHandleColor = "var(--core-text-disabled)", scrollHandleColorHover: scrollHandleColorHover = "var(--core-text-disabled)", titleColor: titleColor = "var(--core-text-special)", borderColor: borderColor = "var(--core-outline-primary)", borderRadius: borderRadius = 8, borderWidth: borderWidth = 1} = props, rest = tslib_es6.__rest(props, [ "children", "id", "className", "style", "minWidth", "minHeight", "maxHeight", "maxWidth", "padding", "close", "title", "titleSize", "contentSize", "actions", "titleIcon", "titleIconFill", "titleBorderColor", "titleBorderWidth", "actionsBorderColor", "actionsBorderWidth", "autoBorderBottom", "onAction", "onReject", "onResolve", "onClose", "onToolTip", "onDragPointerDown", "backgroundColor", "scrollHandleColor", "scrollHandleColorHover", "titleColor", "borderColor", "borderRadius", "borderWidth" ]), contentWrapperRef = React.useRef(null), modalStyle = null != style ? style : {}, modalClass = className ? ` ${className}` : "", [scrolls, setScrolls] = React.useState(!1), getScrolls = React.useCallback(() => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const height = null === (_a = contentWrapperRef.current) || void 0 === _a ? void 0 : _a.offsetHeight, scrollHeight = null === (_b = contentWrapperRef.current) || void 0 === _b ? void 0 : _b.scrollHeight;
|
|
25
|
+
return !(!height || !scrollHeight) && height < scrollHeight;
|
|
26
|
+
}, []), setActionBorderWidth = React.useMemo(() => scrolls && 0 === actionsBorderWidth && autoBorderBottom ? "1px" : misc.setStyle(actionsBorderWidth), [ actionsBorderWidth, scrolls, autoBorderBottom ]), setContentPaddingTops = React.useMemo(() => {
|
|
27
|
+
if (scrolls && autoBorderBottom) {
|
|
28
|
+
if ("string" == typeof padding) {
|
|
29
|
+
return padding.split(" ")[0];
|
|
30
|
+
}
|
|
31
|
+
return misc.setStyle(padding, "16px");
|
|
32
|
+
}
|
|
33
|
+
return "0";
|
|
34
|
+
}, [ scrolls, padding, autoBorderBottom ]), cssVars = React.useMemo(() => ({
|
|
35
|
+
"--modal-min-width": misc.setStyle(minWidth),
|
|
36
|
+
"--modal-min-height": misc.setStyle(minHeight),
|
|
37
|
+
"--modal-max-height": misc.setStyle(maxHeight),
|
|
38
|
+
"--modal-max-width": misc.setStyle(maxWidth),
|
|
39
|
+
"--modal-border-color": borderColor,
|
|
40
|
+
"--modal-title-color": titleColor,
|
|
41
|
+
"--modal-border-radius": misc.setStyle(borderRadius),
|
|
42
|
+
"--modal-border-width": misc.setStyle(borderWidth),
|
|
43
|
+
"--modal-padding": misc.setStyle(padding, "16px 24px"),
|
|
44
|
+
"--modal-background-color": backgroundColor,
|
|
45
|
+
"--modal-title-border-color": titleBorderColor,
|
|
46
|
+
"--modal-title-border-width": misc.setStyle(titleBorderWidth),
|
|
47
|
+
"--modal-actions-border-color": actionsBorderColor,
|
|
48
|
+
"--modal-scroll-handle": misc.setStyle(scrollHandleColor),
|
|
49
|
+
"--modal-scroll-handle-hover": misc.setStyle(scrollHandleColorHover),
|
|
50
|
+
"--modal-actions-border-width": setActionBorderWidth,
|
|
51
|
+
"--modal-content-padding-tops": setContentPaddingTops
|
|
52
|
+
}), [ minWidth, minHeight, maxHeight, maxWidth, borderColor, titleColor, borderRadius, borderWidth, padding, titleBorderWidth, titleBorderColor, actionsBorderColor, backgroundColor, scrollHandleColor, scrollHandleColorHover, setContentPaddingTops, setActionBorderWidth ]);
|
|
53
|
+
React.useEffect(() => {
|
|
54
|
+
children && maxHeight && setScrolls(getScrolls());
|
|
55
|
+
}, [ children, maxHeight, getScrolls ]);
|
|
56
|
+
const renderActions = position => null == actions ? void 0 : actions.map((action, index) => action.position || "left" !== position ? action.position && position !== action.position ? null : jsxRuntime.jsx(Button.Button, {
|
|
57
|
+
variant: action.primary ? "solid" : "outline",
|
|
58
|
+
label: action.label,
|
|
59
|
+
onClick: e => (action => {
|
|
60
|
+
const resolves = !action.promise || "resolve" === action.promise, rejects = "reject" === action.promise;
|
|
61
|
+
null == onAction || onAction(action.value), resolves && (null == onResolve || onResolve(action.value)),
|
|
62
|
+
rejects && (null == onReject || onReject(new Error("Modal rejected", {
|
|
63
|
+
cause: action.value
|
|
64
|
+
})));
|
|
65
|
+
})(action),
|
|
66
|
+
round: !0 === action.round,
|
|
67
|
+
iconLeft: action.iconLeft,
|
|
68
|
+
iconRight: action.iconRight,
|
|
69
|
+
tooltip: action.tooltip,
|
|
70
|
+
onToolTip: tip => null == onToolTip ? void 0 : onToolTip(tip)
|
|
71
|
+
}, `${action.id}_${index}`) : null);
|
|
72
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
73
|
+
id: id,
|
|
74
|
+
className: `${css.wrapper}${modalClass}`,
|
|
75
|
+
style: Object.assign(Object.assign({}, modalStyle), cssVars)
|
|
76
|
+
}, rest, {
|
|
77
|
+
children: [ (title || close) && jsxRuntime.jsxs("div", {
|
|
78
|
+
className: `${css.title} ${css[titleSize]}`,
|
|
79
|
+
onPointerDown: onDragPointerDown,
|
|
80
|
+
children: [ jsxRuntime.jsxs("div", {
|
|
81
|
+
className: css.titleBlock,
|
|
82
|
+
children: [ titleIcon && jsxRuntime.jsx("div", {
|
|
83
|
+
className: css.titleIcon,
|
|
84
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
85
|
+
name: titleIcon,
|
|
86
|
+
fill: titleIconFill,
|
|
87
|
+
size: 20
|
|
88
|
+
})
|
|
89
|
+
}), title ]
|
|
90
|
+
}), close && jsxRuntime.jsx("div", {
|
|
91
|
+
className: css.close,
|
|
92
|
+
children: jsxRuntime.jsx("div", {
|
|
93
|
+
className: css.titleIcon,
|
|
94
|
+
children: jsxRuntime.jsx(IconButton.IconButton, {
|
|
95
|
+
tooltip: "close",
|
|
96
|
+
icon: "x",
|
|
97
|
+
onClick: () => {
|
|
98
|
+
null == onReject || onReject(new Error("Modal was closed", {
|
|
99
|
+
cause: "user action"
|
|
100
|
+
})), null == onClose || onClose();
|
|
101
|
+
},
|
|
102
|
+
onToolTip: tip => null == onToolTip ? void 0 : onToolTip(tip)
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
}) ]
|
|
106
|
+
}), jsxRuntime.jsx("div", {
|
|
107
|
+
className: css.contentWrapper,
|
|
108
|
+
ref: contentWrapperRef,
|
|
109
|
+
children: jsxRuntime.jsx("div", {
|
|
110
|
+
className: `${css.content} ${css[contentSize]}`,
|
|
111
|
+
children: children
|
|
112
|
+
})
|
|
113
|
+
}), actions && actions.length > 0 && jsxRuntime.jsxs("div", {
|
|
114
|
+
className: css.actions,
|
|
115
|
+
onPointerDown: onDragPointerDown,
|
|
116
|
+
children: [ jsxRuntime.jsx("div", {
|
|
117
|
+
className: css.leftActions,
|
|
118
|
+
children: renderActions("left")
|
|
119
|
+
}), jsxRuntime.jsx("div", {
|
|
120
|
+
className: css.rightActions,
|
|
121
|
+
children: renderActions("right")
|
|
122
|
+
}) ]
|
|
123
|
+
}) ]
|
|
124
|
+
}));
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
exports.Modal = Modal;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), Overlay = require("./Overlay-
|
|
4
|
-
|
|
5
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.ModalController-module_wrapper__HkOoX {\n\tposition: absolute;\n\tz-index: var(--elevation-confirm);\n}\n");
|
|
3
|
+
var jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), Overlay = require("./Overlay-DRpHYZek.js"), modalStore = require("./modalStore-CFsfK3ba.js"), css_wrapper = "ModalController-module_wrapper__HkOoX flexBox-module_row__z24tF";
|
|
6
4
|
|
|
7
5
|
const defaultTransition = {
|
|
8
6
|
ease: "easeOut",
|