@apple-pie/slice 0.1.60 → 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-DctPd_KB.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-Dn5mB5-k.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-D5nSdN7z.js → WSConnection-DZKTeDtZ.js} +1 -1
- package/dist/cjs/chunks/{WebRTCConnection-CxMqLK-l.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-CvkRtX7s.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-BYxZNIrv.js → localDBStore-CTWlm2t-.js} +6 -2
- package/dist/cjs/chunks/{microphoneStore-Dw-7f6Jb.js → microphoneStore-D7DuvQeX.js} +1 -1
- package/dist/cjs/chunks/{misc-B3tF47Um.js → misc-PmT7cZzC.js} +29 -38
- package/dist/cjs/chunks/{modalStore-BNeHu-nv.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-Dw-nvmmG.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-BiugXTT6.js → uploads-worker-stCHn8-D.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-CxCy0NB7.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-BQIMqtSw.js → volumeStore-BoEoo9wA.js} +1 -1
- package/dist/cjs/chunks/{webRTCStore-B8IKsBKT.js → webRTCStore-OGkXAovD.js} +6 -2
- package/dist/cjs/chunks/{windowStore-H9Jg7tnm.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 +17 -11
- 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-DSPzFDJY.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-DpULdzpq.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-DNh3_RKt.mjs → WSConnection-ByCYrNOq.mjs} +1 -1
- package/dist/esm/chunks/{WebRTCConnection-B9ztLs_6.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-CmMyobjW.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-3uHThx73.mjs → localDBStore-DYhPmkHz.mjs} +7 -3
- package/dist/esm/chunks/{microphoneStore-lnK3t3JC.mjs → microphoneStore-BzSEbtfK.mjs} +1 -1
- package/dist/esm/chunks/{misc-CagHFpjD.mjs → misc-DI5GSqkt.mjs} +24 -34
- package/dist/esm/chunks/{modalStore-DDbEcsqD.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-CCkhffxC.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-BAc2rfWa.mjs → uploads-worker-CpJtBCvY.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-CnmPPpay.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-CSItrUF2.mjs → volumeStore-mqWIRL0J.mjs} +1 -1
- package/dist/esm/chunks/{webRTCStore-BpDbSd4Q.mjs → webRTCStore-BepH2O9l.mjs} +7 -3
- package/dist/esm/chunks/{windowStore-Dkr9ooZW.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 +5343 -4109
- 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 -133
- 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 -201
- package/scripts/README.md +19 -0
- package/dist/cjs/chunks/AudioBubble-B7rjYKZR.js +0 -55
- package/dist/cjs/chunks/Avatar-_FkV6_bj.js +0 -82
- package/dist/cjs/chunks/AvatarGroup-BMOQtckJ.js +0 -41
- package/dist/cjs/chunks/Badge-CQrpFFZl.js +0 -22
- package/dist/cjs/chunks/Button-D53KhAkv.js +0 -265
- package/dist/cjs/chunks/ButtonBar-N5L7PGg6.js +0 -72
- package/dist/cjs/chunks/Camera-BULkeKNC.js +0 -380
- package/dist/cjs/chunks/CheckBox-CxQeRMKr.js +0 -51
- package/dist/cjs/chunks/Chip-D0tBR0Uq.js +0 -80
- package/dist/cjs/chunks/DivInput-D0VUXFiS.js +0 -101
- package/dist/cjs/chunks/Dot-GHGV4L29.js +0 -72
- package/dist/cjs/chunks/DrggablePanel-DSNgmB_o.js +0 -224
- package/dist/cjs/chunks/DropDown-DRcukAxl.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-DWh383tt.js +0 -88
- package/dist/cjs/chunks/FileList-Cl82aFlO.js +0 -223
- package/dist/cjs/chunks/FlexDiv-CwjTwIXH.js +0 -178
- package/dist/cjs/chunks/Grouper-DjUdigNr.js +0 -63
- package/dist/cjs/chunks/Icon-B07V8-iO.js +0 -1489
- package/dist/cjs/chunks/IconButton-C8l4gN5C.js +0 -182
- package/dist/cjs/chunks/Label-BbJHiOmP.js +0 -106
- package/dist/cjs/chunks/Level-Bj5Kg1W3.js +0 -63
- package/dist/cjs/chunks/Modal-CVmIsdGy.js +0 -128
- package/dist/cjs/chunks/ModalController-DeSot1gM.js +0 -81
- package/dist/cjs/chunks/Overlay-CFoktASG.js +0 -41
- package/dist/cjs/chunks/Pager-NsKBlF0O.js +0 -36
- package/dist/cjs/chunks/ProgressIndicator-BK0eIP3-.js +0 -140
- package/dist/cjs/chunks/PromptInput-BG1-rzlA.js +0 -161
- package/dist/cjs/chunks/RadioButton-DCiNs99y.js +0 -55
- package/dist/cjs/chunks/RadioButtonList-DLdTst71.js +0 -73
- package/dist/cjs/chunks/Slider-CekvQKaG.js +0 -169
- package/dist/cjs/chunks/Spacer-C-nVP3Ic.js +0 -26
- package/dist/cjs/chunks/Switch-DkU5T0Hm.js +0 -44
- package/dist/cjs/chunks/TabBar-Dm3tMtlm.js +0 -183
- package/dist/cjs/chunks/TextArea-Drq3c8dZ.js +0 -77
- package/dist/cjs/chunks/TextField-D38gJzBN.js +0 -190
- package/dist/cjs/chunks/Tip-DMQjQT85.js +0 -89
- package/dist/cjs/chunks/Toast-sZSVZ0ND.js +0 -185
- package/dist/cjs/chunks/ToggleButton-I3AxfCqI.js +0 -45
- package/dist/cjs/chunks/UploadArea-eGZIGNi3.js +0 -132
- package/dist/cjs/chunks/Video-CK1Ui0jI.js +0 -301
- package/dist/cjs/chunks/VideoController-Z2VgDcSG.js +0 -95
- package/dist/cjs/chunks/_types-Bvz68-MM.js +0 -141
- package/dist/cjs/chunks/audioVisualizer-cC1Q8TJs.js +0 -60
- package/dist/cjs/chunks/colors-BLmUwGPt.js +0 -27
- package/dist/cjs/chunks/debounce-CiNBCKOh.js +0 -18
- package/dist/cjs/chunks/sharedTypes-CnzGgdys.js +0 -6
- package/dist/cjs/chunks/toastStore-DtZ3Woz_.js +0 -17
- package/dist/cjs/chunks/viewState-C9dAI8FG.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-nUxpObow.mjs +0 -69
- package/dist/esm/chunks/Avatar-tdg93uhg.mjs +0 -88
- package/dist/esm/chunks/AvatarGroup-C-8btUsy.mjs +0 -47
- package/dist/esm/chunks/Badge-BsLebku3.mjs +0 -26
- package/dist/esm/chunks/Button-BtxNw6ia.mjs +0 -283
- package/dist/esm/chunks/ButtonBar-Duch_kZq.mjs +0 -82
- package/dist/esm/chunks/Camera-CcUUY3V-.mjs +0 -398
- package/dist/esm/chunks/CheckBox-CMzqOPXk.mjs +0 -61
- package/dist/esm/chunks/Chip-fbi2OZwl.mjs +0 -92
- package/dist/esm/chunks/DivInput-C0E2-H7Q.mjs +0 -113
- package/dist/esm/chunks/Dot-CUKJwIzW.mjs +0 -78
- package/dist/esm/chunks/DrggablePanel-R5vyKmMt.mjs +0 -236
- package/dist/esm/chunks/DropDown-Dak1tC81.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-7St6DRq1.mjs +0 -101
- package/dist/esm/chunks/FileList-DxypG1gf.mjs +0 -231
- package/dist/esm/chunks/FlexDiv-CaNnli-r.mjs +0 -188
- package/dist/esm/chunks/Grouper-Cfkyb5fu.mjs +0 -83
- package/dist/esm/chunks/Icon-BZ634R5u.mjs +0 -1503
- package/dist/esm/chunks/IconButton-BW8BwWt1.mjs +0 -197
- package/dist/esm/chunks/Label-gjoEtJAw.mjs +0 -119
- package/dist/esm/chunks/Level-D4r_4yC6.mjs +0 -68
- package/dist/esm/chunks/Modal-BpeG1ufF.mjs +0 -142
- package/dist/esm/chunks/ModalController-CWJu74sJ.mjs +0 -92
- package/dist/esm/chunks/Overlay-Ctpj5rdn.mjs +0 -47
- package/dist/esm/chunks/Pager-BqAdm87r.mjs +0 -42
- package/dist/esm/chunks/ProgressIndicator-BJGyKW4y.mjs +0 -156
- package/dist/esm/chunks/PromptInput-DAAohdde.mjs +0 -175
- package/dist/esm/chunks/RadioButton-Mubr8ARW.mjs +0 -63
- package/dist/esm/chunks/RadioButtonList-Mw2IVegX.mjs +0 -81
- package/dist/esm/chunks/Slider-tbgzaids.mjs +0 -183
- package/dist/esm/chunks/Spacer-DMPc2plL.mjs +0 -28
- package/dist/esm/chunks/Switch-CV6qfAb7.mjs +0 -50
- package/dist/esm/chunks/TabBar-e13ZmdaD.mjs +0 -205
- package/dist/esm/chunks/TextArea-Bhut96m6.mjs +0 -87
- package/dist/esm/chunks/TextField-iqgBuz_w.mjs +0 -210
- package/dist/esm/chunks/Tip-BhNgf7ae.mjs +0 -99
- package/dist/esm/chunks/Toast-C4ij2wVB.mjs +0 -203
- package/dist/esm/chunks/ToggleButton-74KPRo9V.mjs +0 -53
- package/dist/esm/chunks/UploadArea-CoI7E5w5.mjs +0 -142
- package/dist/esm/chunks/Video-DPue5vFh.mjs +0 -316
- package/dist/esm/chunks/VideoController-Ce6X6aAe.mjs +0 -114
- package/dist/esm/chunks/_types-YqjUzbuI.mjs +0 -141
- package/dist/esm/chunks/audioVisualizer-_H-alvTA.mjs +0 -60
- package/dist/esm/chunks/colors-qznBTNSD.mjs +0 -30
- package/dist/esm/chunks/debounce-Ck7nvyAV.mjs +0 -19
- package/dist/esm/chunks/sharedTypes-BS0kCucU.mjs +0 -8
- package/dist/esm/chunks/toastStore-OATPs-NI.mjs +0 -15
- package/dist/esm/chunks/viewState-DHKdCOat.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-BwrT84Xh.js → MdStreamBuffer-B0KtaR_k.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-Dciti25t.js → SSEConnection-BXWkgT66.js} +0 -0
- /package/dist/cjs/chunks/{activeTabStore-qP5wXhKH.js → activeTabStore-D2gxAoK6.js} +0 -0
- /package/dist/cjs/chunks/{broadcastChannel-BV0gIfvH.js → broadcastChannel-DdPZ3LUB.js} +0 -0
- /package/dist/cjs/chunks/{magic-string.es-Vs_88NMN.js → magic-string.es-DsAR0Q7u.js} +0 -0
- /package/dist/cjs/chunks/{rafThrottle-BlnxmQVH.js → rafThrottle-BRdLzPo7.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-K8csyK2D.js → tipStore-DDHyGeyK.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-DL37Dyu4.js → tslib.es6-B8JY5ZGw.js} +0 -0
- /package/dist/cjs/chunks/{videoStore-CR0cDt-h.js → videoStore-B0l9iBw4.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-DFtBr080.mjs → MdStreamBuffer-CcO5IBxD.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-Djeh2C5G.mjs → SSEConnection-B5rVxalP.mjs} +0 -0
- /package/dist/esm/chunks/{activeTabStore-DSluAldJ.mjs → activeTabStore-CCstpXAC.mjs} +0 -0
- /package/dist/esm/chunks/{broadcastChannel-B2yT2lpA.mjs → broadcastChannel-CPT0S33H.mjs} +0 -0
- /package/dist/esm/chunks/{magic-string.es-Cm4dLOmN.mjs → magic-string.es-CI4cCGRB.mjs} +0 -0
- /package/dist/esm/chunks/{rafThrottle-CJcLGMwV.mjs → rafThrottle-Dl8Z5sJ-.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-BrCvK80A.mjs → tipStore-CBvk303u.mjs} +0 -0
- /package/dist/esm/chunks/{tslib.es6-DiR-r3pp.mjs → tslib.es6-CpnJrDBv.mjs} +0 -0
- /package/dist/esm/chunks/{videoStore-CLWsJ-oG.mjs → videoStore-Cd-Lewfy.mjs} +0 -0
|
@@ -1579,12 +1579,12 @@ function requireBuild() {
|
|
|
1579
1579
|
}
|
|
1580
1580
|
};
|
|
1581
1581
|
/**
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1582
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1583
|
+
*
|
|
1584
|
+
* This source code is licensed under the MIT license found in the
|
|
1585
|
+
* LICENSE file in the root directory of this source tree.
|
|
1586
|
+
*
|
|
1587
|
+
*/
|
|
1588
1588
|
const pkg = "diff-sequences", NOT_YET_SET = 0, countCommonItemsF = (aIndex, aEnd, bIndex, bEnd, isCommon) => {
|
|
1589
1589
|
let nCommon = 0;
|
|
1590
1590
|
for (;aIndex < aEnd && bIndex < bEnd && isCommon(aIndex, bIndex); ) aIndex += 1,
|
|
@@ -3625,9 +3625,9 @@ function createTest(fn) {
|
|
|
3625
3625
|
return function(fn) {
|
|
3626
3626
|
const taskFn = fn;
|
|
3627
3627
|
/**
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3628
|
+
* Parse builder pattern arguments into a fixtures object.
|
|
3629
|
+
* Handles both builder pattern (name, options?, value) and object syntax.
|
|
3630
|
+
*/
|
|
3631
3631
|
function parseBuilderFixtures(fixturesOrName, optionsOrFn, maybeFn) {
|
|
3632
3632
|
if ("string" != typeof fixturesOrName) return fixturesOrName;
|
|
3633
3633
|
const fixtureName = fixturesOrName;
|
|
@@ -4254,8 +4254,8 @@ function test$1(obj, args) {
|
|
|
4254
4254
|
function type(obj) {
|
|
4255
4255
|
if (void 0 === obj) return "undefined";
|
|
4256
4256
|
if (null === obj) return "null";
|
|
4257
|
-
const stringTag =
|
|
4258
|
-
|
|
4257
|
+
const stringTag = /** @type {Record<PropertyKey, unknown>} */
|
|
4258
|
+
obj[Symbol.toStringTag];
|
|
4259
4259
|
if ("string" == typeof stringTag) return stringTag;
|
|
4260
4260
|
return Object.prototype.toString.call(obj).slice(8, -1);
|
|
4261
4261
|
}
|
|
@@ -4298,8 +4298,8 @@ __name(_AssertionError, "AssertionError");
|
|
|
4298
4298
|
var AssertionError = _AssertionError;
|
|
4299
4299
|
|
|
4300
4300
|
function expectTypes(obj, types) {
|
|
4301
|
-
let flagMsg = flag(obj, "message"), ssfi =
|
|
4302
|
-
|
|
4301
|
+
let flagMsg = flag(obj, "message"), ssfi = /** @type {Function} */
|
|
4302
|
+
flag(obj, "ssfi");
|
|
4303
4303
|
flagMsg = flagMsg ? flagMsg + ": " : "", obj = /** @type {object} */
|
|
4304
4304
|
flag(obj, "object"), (types = types.map(function(t) {
|
|
4305
4305
|
return t.toLowerCase();
|
|
@@ -4808,17 +4808,17 @@ function objDisplay(obj) {
|
|
|
4808
4808
|
let str = inspect2(obj), type3 = Object.prototype.toString.call(obj);
|
|
4809
4809
|
if (config.truncateThreshold && str.length >= config.truncateThreshold) {
|
|
4810
4810
|
if ("[object Function]" === type3) {
|
|
4811
|
-
const objAsFunction =
|
|
4812
|
-
|
|
4811
|
+
const objAsFunction = /** @type {Function} */
|
|
4812
|
+
obj;
|
|
4813
4813
|
return objAsFunction.name && "" !== objAsFunction.name ? "[Function: " + objAsFunction.name + "]" : "[Function]";
|
|
4814
4814
|
}
|
|
4815
4815
|
if ("[object Array]" === type3) {
|
|
4816
|
-
return "[ Array(" +
|
|
4817
|
-
|
|
4816
|
+
return "[ Array(" + /** @type {unknown[]} */
|
|
4817
|
+
obj.length + ") ]";
|
|
4818
4818
|
}
|
|
4819
4819
|
if ("[object Object]" === type3) {
|
|
4820
|
-
const objAsObject =
|
|
4821
|
-
|
|
4820
|
+
const objAsObject = /** @type {Record<PropertyKey, unknown>} */
|
|
4821
|
+
obj;
|
|
4822
4822
|
let keys = Object.keys(objAsObject);
|
|
4823
4823
|
return "{ Object (" + (keys.length > 2 ? keys.splice(0, 2).join(", ") + ", ..." : keys.join(", ")) + ") }";
|
|
4824
4824
|
}
|
|
@@ -4830,17 +4830,17 @@ function objDisplay(obj) {
|
|
|
4830
4830
|
function getMessage2(obj, args) {
|
|
4831
4831
|
let negate = flag(obj, "negate"), val = flag(obj, "object"), expected = args[3], actual = getActual(obj, args), rawMsg = negate ? args[2] : args[1], flagMsg = flag(obj, "message");
|
|
4832
4832
|
"function" == typeof rawMsg && (rawMsg = rawMsg());
|
|
4833
|
-
const msg = (
|
|
4834
|
-
|
|
4833
|
+
const msg = (/** @type {string} */
|
|
4834
|
+
rawMsg || "").replace(/#\{(this|act|exp)\}/g, function(_, tag) {
|
|
4835
4835
|
return objDisplay("this" === tag ? val : "act" === tag ? actual : expected);
|
|
4836
4836
|
});
|
|
4837
4837
|
return flagMsg ? flagMsg + ": " + msg : msg;
|
|
4838
4838
|
}
|
|
4839
4839
|
|
|
4840
4840
|
function transferFlags(source, object, includeAll) {
|
|
4841
|
-
const sourceWithFlags =
|
|
4842
|
-
/** @type {{__flags?: Record<PropertyKey, unknown>}} */
|
|
4843
|
-
|
|
4841
|
+
const sourceWithFlags = /** @type {{__flags?: Record<PropertyKey, unknown>}} */
|
|
4842
|
+
source, objWithFlags = /** @type {{__flags?: Record<PropertyKey, unknown>}} */
|
|
4843
|
+
object;
|
|
4844
4844
|
let flags = sourceWithFlags.__flags || (sourceWithFlags.__flags = Object.create(null));
|
|
4845
4845
|
const objFlags = objWithFlags.__flags || (objWithFlags.__flags = Object.create(null));
|
|
4846
4846
|
includeAll = 3 !== arguments.length || includeAll;
|
|
@@ -5395,8 +5395,8 @@ function overwriteProperty(ctx, name, getter) {
|
|
|
5395
5395
|
}
|
|
5396
5396
|
|
|
5397
5397
|
function overwriteMethod(ctx, name, method) {
|
|
5398
|
-
let _method =
|
|
5399
|
-
|
|
5398
|
+
let _method = /** @type {Record<PropertyKey, unknown>} */
|
|
5399
|
+
ctx[name], _super = __name(function() {
|
|
5400
5400
|
throw new Error(String(name) + " is not a function");
|
|
5401
5401
|
}, "_super");
|
|
5402
5402
|
function overwritingMethodWrapper() {
|
|
@@ -5436,8 +5436,8 @@ __name(_PluginAddChainableMethodEvent, "PluginAddChainableMethodEvent");
|
|
|
5436
5436
|
var PluginAddChainableMethodEvent = _PluginAddChainableMethodEvent;
|
|
5437
5437
|
|
|
5438
5438
|
function addChainableMethod(ctx, name, method, chainingBehavior) {
|
|
5439
|
-
const ctxChainable =
|
|
5440
|
-
|
|
5439
|
+
const ctxChainable = /** @type {T & {__methods: Record<PropertyKey, ChainableBehavior>}} */
|
|
5440
|
+
ctx;
|
|
5441
5441
|
"function" != typeof chainingBehavior && (chainingBehavior = __name(function() {}, "chainingBehavior"));
|
|
5442
5442
|
let chainableBehavior = {
|
|
5443
5443
|
method: method,
|
|
@@ -5448,8 +5448,8 @@ function addChainableMethod(ctx, name, method, chainingBehavior) {
|
|
|
5448
5448
|
get: __name(function() {
|
|
5449
5449
|
function chainableMethodWrapper(...args) {
|
|
5450
5450
|
flag(this, "lockSsfi") || flag(this, "ssfi", chainableMethodWrapper);
|
|
5451
|
-
let result =
|
|
5452
|
-
|
|
5451
|
+
let result = /** @type {(...args: unknown[]) => unknown} */
|
|
5452
|
+
chainableBehavior.method.apply(this, args);
|
|
5453
5453
|
if (void 0 !== result) return result;
|
|
5454
5454
|
let newAssertion = new Assertion;
|
|
5455
5455
|
return transferFlags(this, newAssertion), newAssertion;
|
|
@@ -5472,12 +5472,13 @@ function addChainableMethod(ctx, name, method, chainingBehavior) {
|
|
|
5472
5472
|
}
|
|
5473
5473
|
|
|
5474
5474
|
function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
|
|
5475
|
-
let chainableBehavior =
|
|
5476
|
-
|
|
5475
|
+
let chainableBehavior = /** @type {{__methods: Record<PropertyKey, ChainableBehavior>}} */
|
|
5476
|
+
ctx.__methods[name], _chainingBehavior = chainableBehavior.chainingBehavior;
|
|
5477
5477
|
chainableBehavior.chainingBehavior =
|
|
5478
5478
|
/**
|
|
5479
|
-
|
|
5480
|
-
|
|
5479
|
+
* @this {T}
|
|
5480
|
+
*/
|
|
5481
|
+
__name(function() {
|
|
5481
5482
|
let result = chainingBehavior(_chainingBehavior).call(this);
|
|
5482
5483
|
if (void 0 !== result) return result;
|
|
5483
5484
|
let newAssertion = new Assertion;
|
|
@@ -5929,17 +5930,15 @@ function oneOf(list, msg) {
|
|
|
5929
5930
|
|
|
5930
5931
|
function assertChanges(subject, prop, msg) {
|
|
5931
5932
|
msg && flag2(this, "message", msg);
|
|
5932
|
-
const fn =
|
|
5933
|
-
|
|
5933
|
+
const fn = /** @type {() => void} */
|
|
5934
|
+
flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
|
|
5934
5935
|
let initial;
|
|
5935
5936
|
new Assertion(fn, flagMsg, ssfi, !0).is.a("function"), null == prop ? (new Assertion(subject, flagMsg, ssfi, !0).is.a("function"),
|
|
5936
5937
|
initial = /** @type {() => unknown} */
|
|
5937
5938
|
subject()) : (new Assertion(subject, flagMsg, ssfi, !0).to.have.property(prop),
|
|
5938
5939
|
initial = /** @type {Record<PropertyKey, unknown>} */
|
|
5939
5940
|
subject[prop]), fn();
|
|
5940
|
-
let final = null == prop ?
|
|
5941
|
-
/** @type {() => unknown} */ subject() :
|
|
5942
|
-
/** @type {Record<PropertyKey, unknown>} */ subject[prop], msgObj = null == prop ? initial : "." + prop;
|
|
5941
|
+
let final = null == prop ? /** @type {() => unknown} */ subject() : /** @type {Record<PropertyKey, unknown>} */ subject[prop], msgObj = null == prop ? initial : "." + prop;
|
|
5943
5942
|
flag2(this, "deltaMsgObj", msgObj), flag2(this, "initialDeltaValue", initial), flag2(this, "finalDeltaValue", final),
|
|
5944
5943
|
flag2(this, "deltaBehavior", "change"), flag2(this, "realDelta", final !== initial),
|
|
5945
5944
|
this.assert(initial !== final, "expected " + msgObj + " to change", "expected " + msgObj + " to not change");
|
|
@@ -5947,17 +5946,15 @@ function assertChanges(subject, prop, msg) {
|
|
|
5947
5946
|
|
|
5948
5947
|
function assertIncreases(subject, prop, msg) {
|
|
5949
5948
|
msg && flag2(this, "message", msg);
|
|
5950
|
-
const fn =
|
|
5951
|
-
|
|
5949
|
+
const fn = /** @type {() => void} */
|
|
5950
|
+
flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
|
|
5952
5951
|
let initial;
|
|
5953
5952
|
new Assertion(fn, flagMsg, ssfi, !0).is.a("function"), null == prop ? (new Assertion(subject, flagMsg, ssfi, !0).is.a("function"),
|
|
5954
5953
|
initial = /** @type {() => number} */
|
|
5955
5954
|
subject()) : (new Assertion(subject, flagMsg, ssfi, !0).to.have.property(prop),
|
|
5956
5955
|
initial = /** @type {Record<PropertyKey, number>} */
|
|
5957
5956
|
subject[prop]), new Assertion(initial, flagMsg, ssfi, !0).is.a("number"), fn();
|
|
5958
|
-
let final = null == prop ?
|
|
5959
|
-
/** @type {() => number} */ subject() :
|
|
5960
|
-
/** @type {Record<PropertyKey, number>} */ subject[prop], msgObj = null == prop ? initial : "." + prop;
|
|
5957
|
+
let final = null == prop ? /** @type {() => number} */ subject() : /** @type {Record<PropertyKey, number>} */ subject[prop], msgObj = null == prop ? initial : "." + prop;
|
|
5961
5958
|
flag2(this, "deltaMsgObj", msgObj), flag2(this, "initialDeltaValue", initial), flag2(this, "finalDeltaValue", final),
|
|
5962
5959
|
flag2(this, "deltaBehavior", "increase"), flag2(this, "realDelta", final - initial),
|
|
5963
5960
|
this.assert(final - initial > 0, "expected " + msgObj + " to increase", "expected " + msgObj + " to not increase");
|
|
@@ -5965,17 +5962,15 @@ function assertIncreases(subject, prop, msg) {
|
|
|
5965
5962
|
|
|
5966
5963
|
function assertDecreases(subject, prop, msg) {
|
|
5967
5964
|
msg && flag2(this, "message", msg);
|
|
5968
|
-
const fn =
|
|
5969
|
-
|
|
5965
|
+
const fn = /** @type {() => void} */
|
|
5966
|
+
flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
|
|
5970
5967
|
let initial;
|
|
5971
5968
|
new Assertion(fn, flagMsg, ssfi, !0).is.a("function"), null == prop ? (new Assertion(subject, flagMsg, ssfi, !0).is.a("function"),
|
|
5972
5969
|
initial = /** @type {() => number} */
|
|
5973
5970
|
subject()) : (new Assertion(subject, flagMsg, ssfi, !0).to.have.property(prop),
|
|
5974
5971
|
initial = /** @type {Record<PropertyKey, number>} */
|
|
5975
5972
|
subject[prop]), new Assertion(initial, flagMsg, ssfi, !0).is.a("number"), fn();
|
|
5976
|
-
let final = null == prop ?
|
|
5977
|
-
/** @type {() => number} */ subject() :
|
|
5978
|
-
/** @type {Record<PropertyKey, number>} */ subject[prop], msgObj = null == prop ? initial : "." + prop;
|
|
5973
|
+
let final = null == prop ? /** @type {() => number} */ subject() : /** @type {Record<PropertyKey, number>} */ subject[prop], msgObj = null == prop ? initial : "." + prop;
|
|
5979
5974
|
flag2(this, "deltaMsgObj", msgObj), flag2(this, "initialDeltaValue", initial), flag2(this, "finalDeltaValue", final),
|
|
5980
5975
|
flag2(this, "deltaBehavior", "decrease"), flag2(this, "realDelta", initial - final),
|
|
5981
5976
|
this.assert(final - initial < 0, "expected " + msgObj + " to decrease", "expected " + msgObj + " to not decrease");
|
|
@@ -7815,7 +7810,7 @@ class SnapshotState {
|
|
|
7815
7810
|
null != oldContent && oldContent === content || await environment.saveSnapshotFile(snapshotPath, content);
|
|
7816
7811
|
}(this._environment, this._snapshotData, this.snapshotPath), this._fileExists = !0),
|
|
7817
7812
|
hasInlineSnapshots && await async function(environment, snapshots) {
|
|
7818
|
-
const MagicString = (await (import("../chunks/magic-string.es-
|
|
7813
|
+
const MagicString = (await (import("../chunks/magic-string.es-CI4cCGRB.mjs"))).default, files = new Set(snapshots.map(i => i.file));
|
|
7819
7814
|
await Promise.all(Array.from(files).map(async file => {
|
|
7820
7815
|
const snaps = snapshots.filter(i => i.file === file), code = await environment.readSnapshotFile(file);
|
|
7821
7816
|
if (null == code) throw new Error(`cannot read ${file} when saving inline snapshot`);
|
|
@@ -8156,13 +8151,13 @@ function requireCopyPrototypeMethods() {
|
|
|
8156
8151
|
var call = Function.call, throwsOnProto = function() {
|
|
8157
8152
|
if (hasRequiredThrowsOnProto) return throwsOnProto_1;
|
|
8158
8153
|
/**
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8154
|
+
* Is true when the environment causes an error to be thrown for accessing the
|
|
8155
|
+
* __proto__ property.
|
|
8156
|
+
* This is necessary in order to support `node --disable-proto=throw`.
|
|
8157
|
+
*
|
|
8158
|
+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto
|
|
8159
|
+
* @type {boolean}
|
|
8160
|
+
*/
|
|
8166
8161
|
let throwsOnProto;
|
|
8167
8162
|
hasRequiredThrowsOnProto = 1;
|
|
8168
8163
|
try {
|
|
@@ -8192,11 +8187,11 @@ function requireCalledInOrder() {
|
|
|
8192
8187
|
hasRequiredCalledInOrder = 1;
|
|
8193
8188
|
var every = requireArray().every;
|
|
8194
8189
|
/**
|
|
8195
|
-
|
|
8196
|
-
|
|
8190
|
+
* @private
|
|
8191
|
+
*/
|
|
8197
8192
|
/**
|
|
8198
|
-
|
|
8199
|
-
|
|
8193
|
+
* @private
|
|
8194
|
+
*/
|
|
8200
8195
|
function checkAdjacentCalls(callMap, spy, index, spies) {
|
|
8201
8196
|
var calledBeforeNext = !0;
|
|
8202
8197
|
return index !== spies.length - 1 && (calledBeforeNext = spy.calledBefore(spies[index + 1])),
|
|
@@ -8205,17 +8200,17 @@ function requireCalledInOrder() {
|
|
|
8205
8200
|
}(callMap, spy) || !calledBeforeNext) && (callMap[spy.id] += 1, !0);
|
|
8206
8201
|
}
|
|
8207
8202
|
/**
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8203
|
+
* A Sinon proxy object (fake, spy, stub)
|
|
8204
|
+
* @typedef {object} SinonProxy
|
|
8205
|
+
* @property {Function} calledBefore - A method that determines if this proxy was called before another one
|
|
8206
|
+
* @property {string} id - Some id
|
|
8207
|
+
* @property {number} callCount - Number of times this proxy has been called
|
|
8208
|
+
*/
|
|
8214
8209
|
/**
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8210
|
+
* Returns true when the spies have been called in the order they were supplied in
|
|
8211
|
+
* @param {SinonProxy[] | SinonProxy} spies An array of proxies, or several proxies as arguments
|
|
8212
|
+
* @returns {boolean} true when spies are called in order, false otherwise
|
|
8213
|
+
*/ return calledInOrder_1 = function(spies) {
|
|
8219
8214
|
return every(arguments.length > 1 ? arguments : spies, checkAdjacentCalls.bind(null, {}));
|
|
8220
8215
|
}, calledInOrder_1;
|
|
8221
8216
|
}
|
|
@@ -8224,10 +8219,10 @@ function requireClassName() {
|
|
|
8224
8219
|
if (hasRequiredClassName) return className_1;
|
|
8225
8220
|
return hasRequiredClassName = 1, className_1 =
|
|
8226
8221
|
/**
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8222
|
+
* Returns a display name for a value from a constructor
|
|
8223
|
+
* @param {object} value A value to examine
|
|
8224
|
+
* @returns {(string|null)} A string or null
|
|
8225
|
+
*/
|
|
8231
8226
|
function(value) {
|
|
8232
8227
|
return value.constructor && value.constructor.name || null;
|
|
8233
8228
|
};
|
|
@@ -8240,22 +8235,22 @@ function requireOrderByFirstCall() {
|
|
|
8240
8235
|
hasRequiredOrderByFirstCall = 1;
|
|
8241
8236
|
var sort = requireArray().sort, slice = requireArray().slice;
|
|
8242
8237
|
/**
|
|
8243
|
-
|
|
8244
|
-
|
|
8238
|
+
* @private
|
|
8239
|
+
*/
|
|
8245
8240
|
function comparator(a, b) {
|
|
8246
8241
|
var aCall = a.getCall(0), bCall = b.getCall(0);
|
|
8247
8242
|
return (aCall && aCall.callId || -1) < (bCall && bCall.callId || -1) ? -1 : 1;
|
|
8248
8243
|
}
|
|
8249
8244
|
/**
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8245
|
+
* A Sinon proxy object (fake, spy, stub)
|
|
8246
|
+
* @typedef {object} SinonProxy
|
|
8247
|
+
* @property {Function} getCall - A method that can return the first call
|
|
8248
|
+
*/
|
|
8254
8249
|
/**
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8250
|
+
* Sorts an array of SinonProxy instances (fake, spy, stub) by their first call
|
|
8251
|
+
* @param {SinonProxy[] | SinonProxy} spies
|
|
8252
|
+
* @returns {SinonProxy[]}
|
|
8253
|
+
*/ return orderByFirstCall_1 = function(spies) {
|
|
8259
8254
|
return sort(slice(spies), comparator);
|
|
8260
8255
|
};
|
|
8261
8256
|
}
|
|
@@ -8303,15 +8298,15 @@ function requireTypeDetect() {
|
|
|
8303
8298
|
return hasRequiredTypeDetect || (hasRequiredTypeDetect = 1, typeDetect$1.exports = function() {
|
|
8304
8299
|
var promiseExists = "function" == typeof Promise, globalObject = "object" == typeof self ? self : commonjsGlobal, symbolExists = "undefined" != typeof Symbol, mapExists = "undefined" != typeof Map, setExists = "undefined" != typeof Set, weakMapExists = "undefined" != typeof WeakMap, weakSetExists = "undefined" != typeof WeakSet, dataViewExists = "undefined" != typeof DataView, symbolIteratorExists = symbolExists && void 0 !== Symbol.iterator, symbolToStringTagExists = symbolExists && void 0 !== Symbol.toStringTag, setEntriesExists = setExists && "function" == typeof Set.prototype.entries, mapEntriesExists = mapExists && "function" == typeof Map.prototype.entries, setIteratorPrototype = setEntriesExists && Object.getPrototypeOf((new Set).entries()), mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf((new Map).entries()), arrayIteratorExists = symbolIteratorExists && "function" == typeof Array.prototype[Symbol.iterator], arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]()), stringIteratorExists = symbolIteratorExists && "function" == typeof String.prototype[Symbol.iterator], stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(""[Symbol.iterator]()), toStringLeftSliceLength = 8, toStringRightSliceLength = -1;
|
|
8305
8300
|
/**
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8301
|
+
* ### typeOf (obj)
|
|
8302
|
+
*
|
|
8303
|
+
* Uses `Object.prototype.toString` to determine the type of an object,
|
|
8304
|
+
* normalising behaviour across engine versions & well optimised.
|
|
8305
|
+
*
|
|
8306
|
+
* @param {Mixed} object
|
|
8307
|
+
* @return {String} object type
|
|
8308
|
+
* @api public
|
|
8309
|
+
*/
|
|
8315
8310
|
function typeDetect(obj) {
|
|
8316
8311
|
var typeofObj = typeof obj;
|
|
8317
8312
|
if ("object" !== typeofObj) return typeofObj;
|
|
@@ -8345,10 +8340,10 @@ function requireTypeOf() {
|
|
|
8345
8340
|
hasRequiredTypeOf = 1;
|
|
8346
8341
|
var type = requireTypeDetect();
|
|
8347
8342
|
/**
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8343
|
+
* Returns the lower-case result of running type from type-detect on the value
|
|
8344
|
+
* @param {*} value
|
|
8345
|
+
* @returns {string}
|
|
8346
|
+
*/ return typeOf = function(value) {
|
|
8352
8347
|
return type(value).toLowerCase();
|
|
8353
8348
|
};
|
|
8354
8349
|
}
|
|
@@ -8357,10 +8352,10 @@ function requireValueToString() {
|
|
|
8357
8352
|
if (hasRequiredValueToString) return valueToString_1;
|
|
8358
8353
|
return hasRequiredValueToString = 1, valueToString_1 =
|
|
8359
8354
|
/**
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8355
|
+
* Returns a string representation of the value
|
|
8356
|
+
* @param {*} value
|
|
8357
|
+
* @returns {string}
|
|
8358
|
+
*/
|
|
8364
8359
|
function(value) {
|
|
8365
8360
|
return value && value.toString ? value.toString() : String(value);
|
|
8366
8361
|
};
|
|
@@ -8377,12 +8372,12 @@ var fakeTimersSrcExports = function() {
|
|
|
8377
8372
|
className: requireClassName(),
|
|
8378
8373
|
deprecated: (hasRequiredDeprecated || (hasRequiredDeprecated = 1,
|
|
8379
8374
|
/**
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8375
|
+
* Returns a function that will invoke the supplied function and print a
|
|
8376
|
+
* deprecation warning to the console each time it is called.
|
|
8377
|
+
* @param {Function} func
|
|
8378
|
+
* @param {string} msg
|
|
8379
|
+
* @returns {Function}
|
|
8380
|
+
*/
|
|
8386
8381
|
(exports$1 = deprecated).wrap = function(func, msg) {
|
|
8387
8382
|
var wrapped = function() {
|
|
8388
8383
|
return exports$1.printWarning(msg), func.apply(this, arguments);
|
|
@@ -8390,31 +8385,31 @@ var fakeTimersSrcExports = function() {
|
|
|
8390
8385
|
return func.prototype && (wrapped.prototype = func.prototype), wrapped;
|
|
8391
8386
|
},
|
|
8392
8387
|
/**
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8388
|
+
* Returns a string which can be supplied to `wrap()` to notify the user that a
|
|
8389
|
+
* particular part of the sinon API has been deprecated.
|
|
8390
|
+
* @param {string} packageName
|
|
8391
|
+
* @param {string} funcName
|
|
8392
|
+
* @returns {string}
|
|
8393
|
+
*/
|
|
8399
8394
|
exports$1.defaultMsg = function(packageName, funcName) {
|
|
8400
8395
|
return `${packageName}.${funcName} is deprecated and will be removed from the public API in a future version of ${packageName}.`;
|
|
8401
8396
|
},
|
|
8402
8397
|
/**
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8398
|
+
* Prints a warning on the console, when it exists
|
|
8399
|
+
* @param {string} msg
|
|
8400
|
+
* @returns {undefined}
|
|
8401
|
+
*/
|
|
8407
8402
|
exports$1.printWarning = function(msg) {
|
|
8408
8403
|
"object" == typeof process && process.emitWarning ? process.emitWarning(msg) : console.info && console.info(msg);
|
|
8409
8404
|
}), deprecated),
|
|
8410
8405
|
every: (hasRequiredEvery || (hasRequiredEvery = 1,
|
|
8411
8406
|
/**
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8407
|
+
* Returns true when fn returns true for all members of obj.
|
|
8408
|
+
* This is an every implementation that works for all iterables
|
|
8409
|
+
* @param {object} obj
|
|
8410
|
+
* @param {Function} fn
|
|
8411
|
+
* @returns {boolean}
|
|
8412
|
+
*/
|
|
8418
8413
|
every = function(obj, fn) {
|
|
8419
8414
|
var pass = !0;
|
|
8420
8415
|
try {
|
|
@@ -8428,10 +8423,10 @@ var fakeTimersSrcExports = function() {
|
|
|
8428
8423
|
}), every),
|
|
8429
8424
|
functionName: hasRequiredFunctionName ? functionName : (hasRequiredFunctionName = 1,
|
|
8430
8425
|
/**
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8426
|
+
* Returns a display name for a function
|
|
8427
|
+
* @param {Function} func
|
|
8428
|
+
* @returns {string}
|
|
8429
|
+
*/
|
|
8435
8430
|
functionName = function(func) {
|
|
8436
8431
|
if (!func) return "";
|
|
8437
8432
|
try {
|
|
@@ -8464,138 +8459,138 @@ var fakeTimersSrcExports = function() {
|
|
|
8464
8459
|
} catch (e) {}
|
|
8465
8460
|
}
|
|
8466
8461
|
/**
|
|
8467
|
-
|
|
8468
|
-
|
|
8462
|
+
* @typedef {"nextAsync" | "manual" | "interval"} TickMode
|
|
8463
|
+
*/
|
|
8469
8464
|
/**
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8465
|
+
* @typedef {object} NextAsyncTickMode
|
|
8466
|
+
* @property {"nextAsync"} mode
|
|
8467
|
+
*/
|
|
8473
8468
|
/**
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8469
|
+
* @typedef {object} ManualTickMode
|
|
8470
|
+
* @property {"manual"} mode
|
|
8471
|
+
*/
|
|
8477
8472
|
/**
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8473
|
+
* @typedef {object} IntervalTickMode
|
|
8474
|
+
* @property {"interval"} mode
|
|
8475
|
+
* @property {number} [delta]
|
|
8476
|
+
*/
|
|
8482
8477
|
/**
|
|
8483
|
-
|
|
8484
|
-
|
|
8478
|
+
* @typedef {IntervalTickMode | NextAsyncTickMode | ManualTickMode} TimerTickMode
|
|
8479
|
+
*/
|
|
8485
8480
|
/**
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8481
|
+
* @typedef {object} IdleDeadline
|
|
8482
|
+
* @property {boolean} didTimeout - whether or not the callback was called before reaching the optional timeout
|
|
8483
|
+
* @property {function():number} timeRemaining - a floating-point value providing an estimate of the number of milliseconds remaining in the current idle period
|
|
8484
|
+
*/
|
|
8490
8485
|
/**
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8486
|
+
* Queues a function to be called during a browser's idle periods
|
|
8487
|
+
* @callback RequestIdleCallback
|
|
8488
|
+
* @param {function(IdleDeadline)} callback
|
|
8489
|
+
* @param {{timeout: number}} options - an options object
|
|
8490
|
+
* @returns {number} the id
|
|
8491
|
+
*/
|
|
8497
8492
|
/**
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8493
|
+
* @callback NextTick
|
|
8494
|
+
* @param {VoidVarArgsFunc} callback - the callback to run
|
|
8495
|
+
* @param {...*} args - optional arguments to call the callback with
|
|
8496
|
+
* @returns {void}
|
|
8497
|
+
*/
|
|
8503
8498
|
/**
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8499
|
+
* @callback SetImmediate
|
|
8500
|
+
* @param {VoidVarArgsFunc} callback - the callback to run
|
|
8501
|
+
* @param {...*} args - optional arguments to call the callback with
|
|
8502
|
+
* @returns {NodeImmediate}
|
|
8503
|
+
*/
|
|
8509
8504
|
/**
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8505
|
+
* @callback VoidVarArgsFunc
|
|
8506
|
+
* @param {...*} callback - the callback to run
|
|
8507
|
+
* @returns {void}
|
|
8508
|
+
*/
|
|
8514
8509
|
/**
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8510
|
+
* @typedef RequestAnimationFrame
|
|
8511
|
+
* @property {function(number):void} requestAnimationFrame
|
|
8512
|
+
* @returns {number} - the id
|
|
8513
|
+
*/
|
|
8519
8514
|
/**
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8515
|
+
* @typedef Performance
|
|
8516
|
+
* @property {function(): number} now
|
|
8517
|
+
*/
|
|
8523
8518
|
/**
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8519
|
+
* @typedef {object} Clock
|
|
8520
|
+
* @property {number} now - the current time
|
|
8521
|
+
* @property {Date} Date - the Date constructor
|
|
8522
|
+
* @property {number} loopLimit - the maximum number of timers before assuming an infinite loop
|
|
8523
|
+
* @property {RequestIdleCallback} requestIdleCallback
|
|
8524
|
+
* @property {function(number):void} cancelIdleCallback
|
|
8525
|
+
* @property {setTimeout} setTimeout
|
|
8526
|
+
* @property {clearTimeout} clearTimeout
|
|
8527
|
+
* @property {NextTick} nextTick
|
|
8528
|
+
* @property {queueMicrotask} queueMicrotask
|
|
8529
|
+
* @property {setInterval} setInterval
|
|
8530
|
+
* @property {clearInterval} clearInterval
|
|
8531
|
+
* @property {SetImmediate} setImmediate
|
|
8532
|
+
* @property {function(NodeImmediate):void} clearImmediate
|
|
8533
|
+
* @property {function():number} countTimers
|
|
8534
|
+
* @property {RequestAnimationFrame} requestAnimationFrame
|
|
8535
|
+
* @property {function(number):void} cancelAnimationFrame
|
|
8536
|
+
* @property {function():void} runMicrotasks
|
|
8537
|
+
* @property {function(string | number): number} tick
|
|
8538
|
+
* @property {function(string | number): Promise<number>} tickAsync
|
|
8539
|
+
* @property {function(): number} next
|
|
8540
|
+
* @property {function(): Promise<number>} nextAsync
|
|
8541
|
+
* @property {function(): number} runAll
|
|
8542
|
+
* @property {function(): number} runToFrame
|
|
8543
|
+
* @property {function(): Promise<number>} runAllAsync
|
|
8544
|
+
* @property {function(): number} runToLast
|
|
8545
|
+
* @property {function(): Promise<number>} runToLastAsync
|
|
8546
|
+
* @property {function(): void} reset
|
|
8547
|
+
* @property {function(number | Date): void} setSystemTime
|
|
8548
|
+
* @property {function(number): void} jump
|
|
8549
|
+
* @property {Performance} performance
|
|
8550
|
+
* @property {function(number[]): number[]} hrtime - process.hrtime (legacy)
|
|
8551
|
+
* @property {function(): void} uninstall Uninstall the clock.
|
|
8552
|
+
* @property {Function[]} methods - the methods that are faked
|
|
8553
|
+
* @property {boolean} [shouldClearNativeTimers] inherited from config
|
|
8554
|
+
* @property {{methodName:string, original:any}[] | undefined} timersModuleMethods
|
|
8555
|
+
* @property {{methodName:string, original:any}[] | undefined} timersPromisesModuleMethods
|
|
8556
|
+
* @property {Map<function(): void, AbortSignal>} abortListenerMap
|
|
8557
|
+
* @property {function(TimerTickMode): void} setTickMode
|
|
8558
|
+
*/
|
|
8564
8559
|
/**
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8560
|
+
* Configuration object for the `install` method.
|
|
8561
|
+
* @typedef {object} Config
|
|
8562
|
+
* @property {number|Date} [now] a number (in milliseconds) or a Date object (default epoch)
|
|
8563
|
+
* @property {string[]} [toFake] names of the methods that should be faked.
|
|
8564
|
+
* @property {number} [loopLimit] the maximum number of timers that will be run when calling runAll()
|
|
8565
|
+
* @property {boolean} [shouldAdvanceTime] tells FakeTimers to increment mocked time automatically (default false)
|
|
8566
|
+
* @property {number} [advanceTimeDelta] increment mocked time every <<advanceTimeDelta>> ms (default: 20ms)
|
|
8567
|
+
* @property {boolean} [shouldClearNativeTimers] forwards clear timer calls to native functions if they are not fakes (default: false)
|
|
8568
|
+
* @property {boolean} [ignoreMissingTimers] default is false, meaning asking to fake timers that are not present will throw an error
|
|
8569
|
+
*/
|
|
8575
8570
|
/**
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8571
|
+
* The internal structure to describe a scheduled fake timer
|
|
8572
|
+
* @typedef {object} Timer
|
|
8573
|
+
* @property {Function} func
|
|
8574
|
+
* @property {*[]} args
|
|
8575
|
+
* @property {number} delay
|
|
8576
|
+
* @property {number} callAt
|
|
8577
|
+
* @property {number} createdAt
|
|
8578
|
+
* @property {boolean} immediate
|
|
8579
|
+
* @property {number} id
|
|
8580
|
+
* @property {Error} [error]
|
|
8581
|
+
*/
|
|
8587
8582
|
/**
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8583
|
+
* A Node timer
|
|
8584
|
+
* @typedef {object} NodeImmediate
|
|
8585
|
+
* @property {function(): boolean} hasRef
|
|
8586
|
+
* @property {function(): NodeImmediate} ref
|
|
8587
|
+
* @property {function(): NodeImmediate} unref
|
|
8588
|
+
*/
|
|
8594
8589
|
/**
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8590
|
+
* Mocks available features in the specified global namespace.
|
|
8591
|
+
* @param {*} _global Namespace to mock (e.g. `window`)
|
|
8592
|
+
* @returns {FakeTimers}
|
|
8593
|
+
*/ function withGlobal(_global) {
|
|
8599
8594
|
const maxTimeout = Math.pow(2, 31) - 1, NOOP = function() {}, NOOP_ARRAY = function() {
|
|
8600
8595
|
return [];
|
|
8601
8596
|
}, isPresent = {};
|
|
@@ -8621,11 +8616,11 @@ var fakeTimersSrcExports = function() {
|
|
|
8621
8616
|
if (void 0 === NativeDate) throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");
|
|
8622
8617
|
isPresent.Date = !0;
|
|
8623
8618
|
/**
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8619
|
+
* The PerformanceEntry object encapsulates a single performance metric
|
|
8620
|
+
* that is part of the browser's performance timeline.
|
|
8621
|
+
*
|
|
8622
|
+
* This is an object returned by the `mark` and `measure` methods on the Performance prototype
|
|
8623
|
+
*/
|
|
8629
8624
|
class FakePerformanceEntry {
|
|
8630
8625
|
constructor(name, entryType, startTime, duration) {
|
|
8631
8626
|
this.name = name, this.entryType = entryType, this.startTime = startTime, this.duration = duration;
|
|
@@ -8637,27 +8632,27 @@ var fakeTimersSrcExports = function() {
|
|
|
8637
8632
|
}
|
|
8638
8633
|
}
|
|
8639
8634
|
/**
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8635
|
+
* @param {number} num
|
|
8636
|
+
* @returns {boolean}
|
|
8637
|
+
*/ let isNearInfiniteLimit = !1;
|
|
8643
8638
|
/**
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8639
|
+
* @param {Clock} clock
|
|
8640
|
+
* @param {number} i
|
|
8641
|
+
*/ function checkIsNearInfiniteLimit(clock, i) {
|
|
8647
8642
|
clock.loopLimit && i === clock.loopLimit - 1 && (isNearInfiniteLimit = !0);
|
|
8648
8643
|
}
|
|
8649
8644
|
/**
|
|
8650
|
-
|
|
8651
|
-
|
|
8645
|
+
*
|
|
8646
|
+
*/ function resetIsNearInfiniteLimit() {
|
|
8652
8647
|
isNearInfiniteLimit = !1;
|
|
8653
8648
|
}
|
|
8654
8649
|
/**
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8650
|
+
* Parse strings like "01:10:00" (meaning 1 hour, 10 minutes, 0 seconds) into
|
|
8651
|
+
* number of milliseconds. This is used to support human-readable strings passed
|
|
8652
|
+
* to clock.tick()
|
|
8653
|
+
* @param {string} str
|
|
8654
|
+
* @returns {number}
|
|
8655
|
+
*/ function parseTime(str) {
|
|
8661
8656
|
if (!str) return 0;
|
|
8662
8657
|
const strings = str.split(":"), l = strings.length;
|
|
8663
8658
|
let parsed, i = l, ms = 0;
|
|
@@ -8669,17 +8664,17 @@ var fakeTimersSrcExports = function() {
|
|
|
8669
8664
|
return 1e3 * ms;
|
|
8670
8665
|
}
|
|
8671
8666
|
/**
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8667
|
+
* Get the decimal part of the millisecond value as nanoseconds
|
|
8668
|
+
* @param {number} msFloat the number of milliseconds
|
|
8669
|
+
* @returns {number} an integer number of nanoseconds in the range [0,1e6)
|
|
8670
|
+
*
|
|
8671
|
+
* Example: nanoRemainer(123.456789) -> 456789
|
|
8672
|
+
*/
|
|
8678
8673
|
/**
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8674
|
+
* Used to grok the `now` parameter to createClock.
|
|
8675
|
+
* @param {Date|number} epoch the system time
|
|
8676
|
+
* @returns {number}
|
|
8677
|
+
*/
|
|
8683
8678
|
function getEpoch(epoch) {
|
|
8684
8679
|
if (!epoch) return 0;
|
|
8685
8680
|
if ("function" == typeof epoch.getTime) return epoch.getTime();
|
|
@@ -8687,17 +8682,17 @@ var fakeTimersSrcExports = function() {
|
|
|
8687
8682
|
throw new TypeError("now should be milliseconds since UNIX epoch");
|
|
8688
8683
|
}
|
|
8689
8684
|
/**
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8685
|
+
* @param {number} from
|
|
8686
|
+
* @param {number} to
|
|
8687
|
+
* @param {Timer} timer
|
|
8688
|
+
* @returns {boolean}
|
|
8689
|
+
*/ function inRange(from, to, timer) {
|
|
8695
8690
|
return timer && timer.callAt >= from && timer.callAt <= to;
|
|
8696
8691
|
}
|
|
8697
8692
|
/**
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8693
|
+
* @param {Clock} clock
|
|
8694
|
+
* @param {Timer} job
|
|
8695
|
+
*/ function getInfiniteLoopError(clock, job) {
|
|
8701
8696
|
const infiniteLoopError = new Error(`Aborting after running ${clock.loopLimit} timers, assuming an infinite loop!`);
|
|
8702
8697
|
if (!job.error) return infiniteLoopError;
|
|
8703
8698
|
const computedTargetPattern = /target\.*[<|(|[].*?[>|\]|)]\s*/;
|
|
@@ -8719,15 +8714,15 @@ var fakeTimersSrcExports = function() {
|
|
|
8719
8714
|
function createDate() {
|
|
8720
8715
|
class ClockDate extends NativeDate {
|
|
8721
8716
|
/**
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8717
|
+
* @param {number} year
|
|
8718
|
+
* @param {number} month
|
|
8719
|
+
* @param {number} date
|
|
8720
|
+
* @param {number} hour
|
|
8721
|
+
* @param {number} minute
|
|
8722
|
+
* @param {number} second
|
|
8723
|
+
* @param {number} ms
|
|
8724
|
+
* @returns void
|
|
8725
|
+
*/
|
|
8731
8726
|
constructor(year, month, date, hour, minute, second, ms) {
|
|
8732
8727
|
0 === arguments.length ? super(ClockDate.clock.now) : super(...arguments), Object.defineProperty(this, "constructor", {
|
|
8733
8728
|
value: NativeDate,
|
|
@@ -8753,13 +8748,13 @@ var fakeTimersSrcExports = function() {
|
|
|
8753
8748
|
});
|
|
8754
8749
|
}
|
|
8755
8750
|
/**
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8751
|
+
* Mirror Intl by default on our fake implementation
|
|
8752
|
+
*
|
|
8753
|
+
* Most of the properties are the original native ones,
|
|
8754
|
+
* but we need to take control of those that have a
|
|
8755
|
+
* dependency on the current clock.
|
|
8756
|
+
* @returns {object} the partly fake Intl implementation
|
|
8757
|
+
*/ function runJobs(clock) {
|
|
8763
8758
|
if (clock.jobs) {
|
|
8764
8759
|
for (let i = 0; i < clock.jobs.length; i++) {
|
|
8765
8760
|
const job = clock.jobs[i];
|
|
@@ -8769,10 +8764,10 @@ var fakeTimersSrcExports = function() {
|
|
|
8769
8764
|
}
|
|
8770
8765
|
}
|
|
8771
8766
|
/**
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8767
|
+
* @param {Clock} clock
|
|
8768
|
+
* @param {Timer} timer
|
|
8769
|
+
* @returns {number} id of the created timer
|
|
8770
|
+
*/ function addTimer(clock, timer) {
|
|
8776
8771
|
if (void 0 === timer.func) throw new Error("Callback must be provided to timer calls");
|
|
8777
8772
|
if (addTimerReturnsObject && "function" != typeof timer.func) throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${timer.func} of type ${typeof timer.func}`);
|
|
8778
8773
|
var num;
|
|
@@ -8810,19 +8805,19 @@ var fakeTimersSrcExports = function() {
|
|
|
8810
8805
|
return timer.id;
|
|
8811
8806
|
}
|
|
8812
8807
|
/**
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8808
|
+
* Timer comparitor
|
|
8809
|
+
* @param {Timer} a
|
|
8810
|
+
* @param {Timer} b
|
|
8811
|
+
* @returns {number}
|
|
8812
|
+
*/ function compareTimers(a, b) {
|
|
8818
8813
|
return a.callAt < b.callAt ? -1 : a.callAt > b.callAt ? 1 : a.immediate && !b.immediate ? -1 : !a.immediate && b.immediate ? 1 : a.createdAt < b.createdAt ? -1 : a.createdAt > b.createdAt ? 1 : a.id < b.id ? -1 : a.id > b.id ? 1 : void 0;
|
|
8819
8814
|
}
|
|
8820
8815
|
/**
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8816
|
+
* @param {Clock} clock
|
|
8817
|
+
* @param {number} from
|
|
8818
|
+
* @param {number} to
|
|
8819
|
+
* @returns {Timer}
|
|
8820
|
+
*/ function firstTimerInRange(clock, from, to) {
|
|
8826
8821
|
const timers = clock.timers;
|
|
8827
8822
|
let id, isInRange, timer = null;
|
|
8828
8823
|
for (id in timers) timers.hasOwnProperty(id) && (isInRange = inRange(from, to, timers[id]),
|
|
@@ -8830,45 +8825,45 @@ var fakeTimersSrcExports = function() {
|
|
|
8830
8825
|
return timer;
|
|
8831
8826
|
}
|
|
8832
8827
|
/**
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8828
|
+
* @param {Clock} clock
|
|
8829
|
+
* @returns {Timer}
|
|
8830
|
+
*/ function firstTimer(clock) {
|
|
8836
8831
|
const timers = clock.timers;
|
|
8837
8832
|
let id, timer = null;
|
|
8838
8833
|
for (id in timers) timers.hasOwnProperty(id) && (timer && 1 !== compareTimers(timer, timers[id]) || (timer = timers[id]));
|
|
8839
8834
|
return timer;
|
|
8840
8835
|
}
|
|
8841
8836
|
/**
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8837
|
+
* @param {Clock} clock
|
|
8838
|
+
* @returns {Timer}
|
|
8839
|
+
*/ function lastTimer(clock) {
|
|
8845
8840
|
const timers = clock.timers;
|
|
8846
8841
|
let id, timer = null;
|
|
8847
8842
|
for (id in timers) timers.hasOwnProperty(id) && (timer && -1 !== compareTimers(timer, timers[id]) || (timer = timers[id]));
|
|
8848
8843
|
return timer;
|
|
8849
8844
|
}
|
|
8850
8845
|
/**
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8846
|
+
* @param {Clock} clock
|
|
8847
|
+
* @param {Timer} timer
|
|
8848
|
+
*/ function callTimer(clock, timer) {
|
|
8854
8849
|
if ("number" == typeof timer.interval ? clock.timers[timer.id].callAt += timer.interval : delete clock.timers[timer.id],
|
|
8855
8850
|
"function" == typeof timer.func) timer.func.apply(null, timer.args); else {
|
|
8856
8851
|
(0, eval)(timer.func);
|
|
8857
8852
|
}
|
|
8858
8853
|
}
|
|
8859
8854
|
/**
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8855
|
+
* Gets clear handler name for a given timer type
|
|
8856
|
+
* @param {string} ttype
|
|
8857
|
+
*/ function getClearHandler(ttype) {
|
|
8863
8858
|
return "IdleCallback" === ttype || "AnimationFrame" === ttype ? `cancel${ttype}` : `clear${ttype}`;
|
|
8864
8859
|
}
|
|
8865
8860
|
/**
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8861
|
+
* Gets schedule handler name for a given timer type
|
|
8862
|
+
* @param {string} ttype
|
|
8863
|
+
*/ const warnOnce =
|
|
8869
8864
|
/**
|
|
8870
|
-
|
|
8871
|
-
|
|
8865
|
+
* Creates an anonymous function to warn only once
|
|
8866
|
+
*/
|
|
8872
8867
|
function() {
|
|
8873
8868
|
let calls = 0;
|
|
8874
8869
|
return function(msg) {
|
|
@@ -8876,10 +8871,10 @@ var fakeTimersSrcExports = function() {
|
|
|
8876
8871
|
};
|
|
8877
8872
|
}();
|
|
8878
8873
|
/**
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8874
|
+
* @param {Clock} clock
|
|
8875
|
+
* @param {number} timerId
|
|
8876
|
+
* @param {string} ttype
|
|
8877
|
+
*/ function clearTimer(clock, timerId, ttype) {
|
|
8883
8878
|
if (!timerId) return;
|
|
8884
8879
|
clock.timers || (clock.timers = {});
|
|
8885
8880
|
const id = Number(timerId);
|
|
@@ -8903,14 +8898,14 @@ var fakeTimersSrcExports = function() {
|
|
|
8903
8898
|
}
|
|
8904
8899
|
}
|
|
8905
8900
|
/**
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8901
|
+
* @param {Clock} clock
|
|
8902
|
+
* @returns {Timer[]}
|
|
8903
|
+
*/
|
|
8909
8904
|
/**
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8905
|
+
* @param {object} target the target containing the method to replace
|
|
8906
|
+
* @param {string} method the keyname of the method on the target
|
|
8907
|
+
* @param {Clock} clock
|
|
8908
|
+
*/
|
|
8914
8909
|
function hijackMethod(target, method, clock) {
|
|
8915
8910
|
if (clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(target, method),
|
|
8916
8911
|
clock[`_${method}`] = target[method], "Date" === method) target[method] = clock[method]; else if ("Intl" === method) target[method] = clock[method]; else if ("performance" === method) {
|
|
@@ -8926,30 +8921,30 @@ var fakeTimersSrcExports = function() {
|
|
|
8926
8921
|
target[method].clock = clock;
|
|
8927
8922
|
}
|
|
8928
8923
|
/**
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8924
|
+
* @param {Clock} clock
|
|
8925
|
+
* @param {number} advanceTimeDelta
|
|
8926
|
+
*/ function doIntervalTick(clock, advanceTimeDelta) {
|
|
8932
8927
|
clock.tick(advanceTimeDelta);
|
|
8933
8928
|
}
|
|
8934
8929
|
/**
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8930
|
+
* @typedef {object} Timers
|
|
8931
|
+
* @property {setTimeout} setTimeout
|
|
8932
|
+
* @property {clearTimeout} clearTimeout
|
|
8933
|
+
* @property {setInterval} setInterval
|
|
8934
|
+
* @property {clearInterval} clearInterval
|
|
8935
|
+
* @property {Date} Date
|
|
8936
|
+
* @property {Intl} Intl
|
|
8937
|
+
* @property {SetImmediate=} setImmediate
|
|
8938
|
+
* @property {function(NodeImmediate): void=} clearImmediate
|
|
8939
|
+
* @property {function(number[]):number[]=} hrtime
|
|
8940
|
+
* @property {NextTick=} nextTick
|
|
8941
|
+
* @property {Performance=} performance
|
|
8942
|
+
* @property {RequestAnimationFrame=} requestAnimationFrame
|
|
8943
|
+
* @property {boolean=} queueMicrotask
|
|
8944
|
+
* @property {function(number): void=} cancelAnimationFrame
|
|
8945
|
+
* @property {RequestIdleCallback=} requestIdleCallback
|
|
8946
|
+
* @property {function(number): void=} cancelIdleCallback
|
|
8947
|
+
*/
|
|
8953
8948
|
/** @type {Timers} */ const timers = {
|
|
8954
8949
|
setTimeout: _global.setTimeout,
|
|
8955
8950
|
clearTimeout: _global.clearTimeout,
|
|
@@ -8966,10 +8961,10 @@ var fakeTimersSrcExports = function() {
|
|
|
8966
8961
|
isPresent.Intl && (timers.Intl = NativeIntl);
|
|
8967
8962
|
const originalSetTimeout = _global.setImmediate || _global.setTimeout, originalClearInterval = _global.clearInterval, originalSetInterval = _global.setInterval;
|
|
8968
8963
|
/**
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8964
|
+
* @param {Date|number} [start] the system time - non-integer values are floored
|
|
8965
|
+
* @param {number} [loopLimit] maximum number of timers that will be run when calling runAll()
|
|
8966
|
+
* @returns {Clock}
|
|
8967
|
+
*/
|
|
8973
8968
|
function createClock(start, loopLimit) {
|
|
8974
8969
|
start = Math.floor(getEpoch(start)), loopLimit = loopLimit || 1e3;
|
|
8975
8970
|
let nanos = 0;
|
|
@@ -8997,13 +8992,13 @@ var fakeTimersSrcExports = function() {
|
|
|
8997
8992
|
return [ secsSinceStart, remainderInNanos ];
|
|
8998
8993
|
}
|
|
8999
8994
|
/**
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
8995
|
+
* A high resolution timestamp in milliseconds.
|
|
8996
|
+
* @typedef {number} DOMHighResTimeStamp
|
|
8997
|
+
*/
|
|
9003
8998
|
/**
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
8999
|
+
* performance.now()
|
|
9000
|
+
* @returns {DOMHighResTimeStamp}
|
|
9001
|
+
*/ function fakePerformanceNow() {
|
|
9007
9002
|
const hrt = hrtime();
|
|
9008
9003
|
return 1e3 * hrt[0] + hrt[1] / 1e6;
|
|
9009
9004
|
}
|
|
@@ -9017,12 +9012,12 @@ var fakeTimersSrcExports = function() {
|
|
|
9017
9012
|
}));
|
|
9018
9013
|
}
|
|
9019
9014
|
/**
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9015
|
+
* @param {number|string} tickValue milliseconds or a string parseable by parseTime
|
|
9016
|
+
* @param {boolean} isAsync
|
|
9017
|
+
* @param {Function} resolve
|
|
9018
|
+
* @param {Function} reject
|
|
9019
|
+
* @returns {number|undefined} will return the new `now` value or nothing for async
|
|
9020
|
+
*/
|
|
9026
9021
|
function doTick(tickValue, isAsync, resolve, reject) {
|
|
9027
9022
|
const msFloat = "number" == typeof tickValue ? tickValue : parseTime(tickValue), ms = Math.floor(msFloat), remainder = function(msFloat) {
|
|
9028
9023
|
const remainder = 1e6 * msFloat % 1e6, positiveRemainder = remainder < 0 ? remainder + 1e6 : remainder;
|
|
@@ -9072,9 +9067,9 @@ var fakeTimersSrcExports = function() {
|
|
|
9072
9067
|
}, doTickInner();
|
|
9073
9068
|
}
|
|
9074
9069
|
/**
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9070
|
+
* @param {string|number} tickValue number of milliseconds or a human-readable value like "01:11:15"
|
|
9071
|
+
* @returns {number} will return the new `now` value
|
|
9072
|
+
*/ return clock.Date.clock = clock, isPresent.hrtimeBigint && (hrtime.bigint = function() {
|
|
9078
9073
|
const parts = hrtime();
|
|
9079
9074
|
return BigInt(parts[0]) * BigInt(1e9) + BigInt(parts[1]);
|
|
9080
9075
|
}), isPresent.Intl && (clock.Intl = function() {
|
|
@@ -9094,8 +9089,8 @@ var fakeTimersSrcExports = function() {
|
|
|
9094
9089
|
ClockIntl;
|
|
9095
9090
|
}(), clock.Intl.clock = clock)
|
|
9096
9091
|
/**
|
|
9097
|
-
|
|
9098
|
-
|
|
9092
|
+
* @param {TimerTickMode} tickModeConfig - The new configuration for how the clock should tick.
|
|
9093
|
+
*/ , clock.setTickMode = function(tickModeConfig) {
|
|
9099
9094
|
const {mode: newMode, delta: newDelta} = tickModeConfig, {mode: oldMode, delta: oldDelta} = clock.tickMode;
|
|
9100
9095
|
newMode === oldMode && newDelta === oldDelta || ("interval" === oldMode && originalClearInterval(clock.attachedInterval),
|
|
9101
9096
|
clock.tickMode = {
|
|
@@ -9123,9 +9118,9 @@ var fakeTimersSrcExports = function() {
|
|
|
9123
9118
|
clock.attachedInterval = intervalId;
|
|
9124
9119
|
}
|
|
9125
9120
|
/**
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9121
|
+
* @param {Config=} [config] Optional config
|
|
9122
|
+
* @returns {Clock}
|
|
9123
|
+
*/ (clock, newDelta || 20));
|
|
9129
9124
|
}, clock.requestIdleCallback = function(func, timeout) {
|
|
9130
9125
|
let timeToNextIdlePeriod = 0;
|
|
9131
9126
|
clock.countTimers() > 0 && (timeToNextIdlePeriod = 50);
|
|
@@ -9209,9 +9204,9 @@ var fakeTimersSrcExports = function() {
|
|
|
9209
9204
|
return doTick(tickValue, !1);
|
|
9210
9205
|
}, void 0 !== _global.Promise && (
|
|
9211
9206
|
/**
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9207
|
+
* @param {string|number} tickValue number of milliseconds or a human-readable value like "01:11:15"
|
|
9208
|
+
* @returns {Promise}
|
|
9209
|
+
*/
|
|
9215
9210
|
clock.tickAsync = function(tickValue) {
|
|
9216
9211
|
return pauseAutoTickUntilFinished(new _global.Promise(function(resolve, reject) {
|
|
9217
9212
|
originalSetTimeout(function() {
|
|
@@ -9269,8 +9264,8 @@ var fakeTimersSrcExports = function() {
|
|
|
9269
9264
|
return pauseAutoTickUntilFinished(new _global.Promise(function(resolve, reject) {
|
|
9270
9265
|
let i = 0;
|
|
9271
9266
|
/**
|
|
9272
|
-
|
|
9273
|
-
|
|
9267
|
+
*
|
|
9268
|
+
*/ !function doRun() {
|
|
9274
9269
|
originalSetTimeout(function() {
|
|
9275
9270
|
try {
|
|
9276
9271
|
let numTimers;
|
|
@@ -9310,9 +9305,9 @@ var fakeTimersSrcExports = function() {
|
|
|
9310
9305
|
timer.createdAt += difference, timer.callAt += difference);
|
|
9311
9306
|
},
|
|
9312
9307
|
/**
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9308
|
+
* @param {string|number} tickValue number of milliseconds or a human-readable value like "01:11:15"
|
|
9309
|
+
* @returns {number} will return the new `now` value
|
|
9310
|
+
*/
|
|
9316
9311
|
clock.jump = function(tickValue) {
|
|
9317
9312
|
const msFloat = "number" == typeof tickValue ? tickValue : parseTime(tickValue), ms = Math.floor(msFloat);
|
|
9318
9313
|
for (const timer of Object.values(clock.timers)) clock.now + ms > timer.callAt && (timer.callAt = clock.now + ms);
|
|
@@ -9330,9 +9325,9 @@ var fakeTimersSrcExports = function() {
|
|
|
9330
9325
|
config.advanceTimeDelta = config.advanceTimeDelta || 20, config.shouldClearNativeTimers = config.shouldClearNativeTimers || !1,
|
|
9331
9326
|
config.target) throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");
|
|
9332
9327
|
/**
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9328
|
+
* @param {string} timer/object the name of the thing that is not present
|
|
9329
|
+
* @param timer
|
|
9330
|
+
*/ function handleMissingTimer(timer) {
|
|
9336
9331
|
if (!config.ignoreMissingTimers) throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${timer}'`);
|
|
9337
9332
|
}
|
|
9338
9333
|
let i, l;
|
|
@@ -9474,12 +9469,12 @@ var fakeTimersSrcExports = function() {
|
|
|
9474
9469
|
};
|
|
9475
9470
|
}
|
|
9476
9471
|
/**
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9472
|
+
* @typedef {object} FakeTimers
|
|
9473
|
+
* @property {Timers} timers
|
|
9474
|
+
* @property {createClock} createClock
|
|
9475
|
+
* @property {Function} install
|
|
9476
|
+
* @property {withGlobal} withGlobal
|
|
9477
|
+
*/
|
|
9483
9478
|
/** @type {FakeTimers} */ const defaultImplementation = withGlobal(globalObject);
|
|
9484
9479
|
return fakeTimersSrc.timers = defaultImplementation.timers, fakeTimersSrc.createClock = defaultImplementation.createClock,
|
|
9485
9480
|
fakeTimersSrc.install = defaultImplementation.install, fakeTimersSrc.withGlobal = withGlobal,
|
|
@@ -9953,8 +9948,8 @@ use((chai, utils) => {
|
|
|
9953
9948
|
return a.length === b.length && a.every((aItem, i) => equals(aItem, b[i], [ ...customTesters, iterableEquality ]));
|
|
9954
9949
|
}
|
|
9955
9950
|
/**
|
|
9956
|
-
|
|
9957
|
-
|
|
9951
|
+
* Used for `toHaveBeenCalledBefore` and `toHaveBeenCalledAfter` to determine if the expected spy was called before the result spy.
|
|
9952
|
+
*/
|
|
9958
9953
|
function isSpyCalledBeforeAnotherSpy(beforeSpy, afterSpy, failIfNoFirstInvocation) {
|
|
9959
9954
|
const beforeInvocationCallOrder = beforeSpy.mock.invocationCallOrder, afterInvocationCallOrder = afterSpy.mock.invocationCallOrder;
|
|
9960
9955
|
return 0 === beforeInvocationCallOrder.length ? !failIfNoFirstInvocation : 0 !== afterInvocationCallOrder.length && beforeInvocationCallOrder[0] < afterInvocationCallOrder[0];
|