@maas/vue-equipment 1.0.0-beta.4 → 1.0.0-beta.40
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 +2 -2
- package/dist/composables/useCountdown/index.d.ts +23 -0
- package/dist/composables/useCountdown/index.js +133 -0
- package/dist/composables/useCountdown/index.js.map +1 -0
- package/dist/composables/useEasings/index.d.ts +21 -0
- package/dist/composables/useEasings/index.js +40 -0
- package/dist/composables/useEasings/index.js.map +1 -0
- package/dist/composables/useMetaViewport/index.d.ts +9 -0
- package/dist/composables/useMetaViewport/index.js +29 -0
- package/dist/composables/useMetaViewport/index.js.map +1 -0
- package/dist/composables/useScrollTo/index.d.ts +49 -0
- package/dist/composables/useScrollTo/index.js +152 -0
- package/dist/composables/useScrollTo/index.js.map +1 -0
- package/dist/nuxt/module.d.mts +4 -3
- package/dist/nuxt/module.json +2 -2
- package/dist/nuxt/module.mjs +55 -35
- package/dist/nuxt/types.d.mts +3 -1
- package/dist/plugins/MagicAccordion/nuxt.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.d.vue.ts +26 -0
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +70 -84
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +11 -24
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.d.vue.ts +20 -0
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +18 -32
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +7 -20
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.d.vue.ts +23 -0
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +62 -62
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +10 -59
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.d.vue.ts +20 -0
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +40 -45
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +9 -22
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionCallback.mjs +1 -1
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +4 -4
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.mjs +9 -8
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.d.ts +1 -5
- package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.mjs +3 -3
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.d.vue.ts +15 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +164 -152
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +9 -15
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.d.vue.ts +17 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +50 -54
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +7 -20
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.d.vue.ts +27 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +89 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +15 -28
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.d.vue.ts +17 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +39 -49
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +7 -20
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.d.vue.ts +20 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +75 -76
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +7 -57
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.d.vue.ts +3 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +30 -40
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +2 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.d.vue.ts +24 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +88 -85
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +10 -61
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.d.vue.ts +19 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +44 -48
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +9 -22
- package/dist/plugins/MagicCommand/src/composables/private/useCommandCallback.mjs +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.mjs +11 -13
- package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.mjs +3 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandView.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandView.mjs +63 -44
- package/dist/plugins/MagicCommand/src/composables/useMagicCommand.mjs +21 -4
- package/dist/plugins/MagicCommand/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicCommand/src/types/index.d.ts +3 -3
- package/dist/plugins/MagicCookie/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.d.vue.ts +20 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +43 -41
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +9 -22
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.d.vue.ts +19 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +19 -36
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +7 -20
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.d.vue.ts +17 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +47 -73
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +11 -15
- package/dist/plugins/MagicCookie/src/composables/private/useCookieCallback.mjs +1 -1
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +12 -4
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.d.ts +2 -1
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.mjs +10 -6
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCookie/src/types/index.d.ts +3 -2
- package/dist/plugins/MagicDraggable/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.d.vue.ts +19 -0
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +92 -101
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +7 -24
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +51 -66
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +37 -15
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +2 -15
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +111 -56
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +6 -5
- package/dist/plugins/MagicDraggable/src/composables/useMagicDraggable.mjs +1 -1
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +4 -3
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/MagicDrawer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.d.vue.ts +31 -0
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +290 -324
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +19 -35
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerCallback.mjs +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +37 -15
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +10 -5
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.mjs +28 -10
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +55 -19
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.mjs +3 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerUtils.mjs +21 -8
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +7 -2
- package/dist/plugins/MagicDrawer/src/composables/useMagicDrawer.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/types/index.mjs +1 -0
- package/dist/plugins/MagicDrawer/src/utils/defaultOptions.mjs +2 -2
- package/dist/plugins/MagicEmitter/nuxt.d.ts +1 -1
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +202 -100
- package/dist/plugins/MagicEmitter/src/types/index.d.ts +2 -0
- package/dist/plugins/MagicError/index.d.ts +5 -0
- package/dist/plugins/MagicError/index.mjs +3 -0
- package/dist/plugins/MagicError/nuxt.d.ts +2 -0
- package/dist/plugins/MagicError/nuxt.mjs +12 -0
- package/dist/plugins/MagicError/package.json +40 -0
- package/dist/plugins/MagicError/src/MagicError.mjs +0 -0
- package/dist/plugins/MagicError/src/class/MagicError.d.ts +6 -0
- package/dist/plugins/MagicError/src/class/MagicError.mjs +15 -0
- package/dist/plugins/MagicError/src/composables/useMagicError.d.ts +18 -0
- package/dist/plugins/MagicError/src/composables/useMagicError.mjs +31 -0
- package/dist/plugins/MagicMarquee/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.d.vue.ts +21 -0
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +38 -72
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +9 -24
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +8 -2
- package/dist/plugins/MagicMarquee/src/composables/useMagicMarquee.d.ts +1 -1
- package/dist/plugins/MagicMenu/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.d.vue.ts +17 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +60 -60
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +7 -20
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.d.vue.ts +25 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +189 -216
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +11 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.d.vue.ts +24 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +171 -198
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +12 -26
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.d.vue.ts +26 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +103 -112
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +15 -28
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.d.vue.ts +20 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +82 -81
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +7 -57
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.d.vue.ts +25 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +69 -86
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +10 -23
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.d.vue.ts +24 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +99 -97
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +12 -60
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.d.vue.ts +20 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +57 -61
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +11 -24
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +15 -5
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +4 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +38 -16
- package/dist/plugins/MagicMenu/src/composables/private/useMenuItem.mjs +12 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +45 -18
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +4 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +31 -10
- package/dist/plugins/MagicMenu/src/composables/useMagicMenu.mjs +1 -0
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicMenu/src/types/index.d.ts +4 -4
- package/dist/plugins/MagicModal/nuxt.d.ts +1 -1
- package/dist/plugins/MagicModal/src/components/MagicModal.d.vue.ts +24 -0
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +134 -171
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +11 -25
- package/dist/plugins/MagicModal/src/composables/private/useModalCallback.mjs +1 -1
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +37 -15
- package/dist/plugins/MagicModal/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicModal/src/types/index.mjs +1 -0
- package/dist/plugins/MagicNoise/nuxt.d.ts +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.d.vue.ts +8 -0
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +50 -81
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +2 -10
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +17 -9
- package/dist/plugins/MagicNoise/src/types/index.d.ts +2 -0
- package/dist/plugins/MagicNoise/src/utils/defaultOptions.mjs +3 -1
- package/dist/plugins/MagicPie/index.d.ts +7 -0
- package/dist/plugins/MagicPie/index.mjs +8 -0
- package/dist/plugins/MagicPie/nuxt.d.ts +2 -0
- package/dist/plugins/MagicPie/nuxt.mjs +23 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.d.vue.ts +8 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +181 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +8 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.d.ts +6 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +35 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.d.ts +13 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.mjs +43 -0
- package/dist/plugins/MagicPie/src/types/index.d.ts +9 -0
- package/dist/plugins/MagicPie/src/types/index.mjs +0 -0
- package/dist/plugins/MagicPlayer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +103 -65
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.d.vue.ts +18 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +129 -127
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +10 -25
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.d.vue.ts +6 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +38 -42
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +2 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.d.vue.ts +6 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +131 -102
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +2 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.d.vue.ts +25 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +140 -82
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +18 -13
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.d.vue.ts +13 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +26 -36
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +7 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.d.vue.ts +19 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +66 -56
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +7 -22
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +66 -109
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +128 -68
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.d.vue.ts +36 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +185 -210
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +25 -34
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenEnter.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenEnter.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenExit.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenExit.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Pause.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/icons/Pause.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Play.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/icons/Play.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOff.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOff.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOn.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOn.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Waiting.d.vue.ts +3 -0
- package/dist/plugins/MagicPlayer/src/components/icons/Waiting.vue.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +0 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +9 -52
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +8 -34
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +170 -234
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.d.ts +8 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.mjs +103 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +3 -17
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +113 -176
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerProvider.d.ts +6 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerProvider.mjs +34 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +4 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +113 -49
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +7 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +62 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +4 -8
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +50 -93
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +37 -52
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +53 -3
- package/dist/plugins/MagicPlayer/src/css/magic-player-audio-controls.css +0 -1
- package/dist/plugins/MagicPlayer/src/css/magic-player-overlay.css +0 -0
- package/dist/plugins/MagicPlayer/src/css/magic-player-timeline.css +5 -0
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +6 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +12 -1
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +77 -10
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.mjs +7 -1
- package/dist/plugins/MagicPlayer/src/utils/playbackDefaults.d.ts +3 -0
- package/dist/plugins/MagicPlayer/src/utils/playbackDefaults.mjs +7 -0
- package/dist/plugins/MagicScroll/nuxt.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.d.vue.ts +18 -0
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +60 -61
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +7 -22
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.d.vue.ts +20 -0
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +56 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +7 -22
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.d.vue.ts +36 -0
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +26 -33
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +25 -38
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.d.vue.ts +20 -0
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +71 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +9 -24
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +17 -7
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +41 -26
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/nuxt.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.d.vue.ts +15 -0
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +91 -110
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +8 -16
- package/dist/plugins/MagicToast/src/components/MagicToastView.d.vue.ts +17 -0
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +66 -82
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +7 -23
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +9 -7
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +23 -23
- package/dist/plugins/MagicToast/src/composables/private/useToastListener.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +36 -16
- package/dist/plugins/MagicToast/src/composables/private/useToastView.mjs +1 -0
- package/dist/plugins/MagicToast/src/types/index.d.ts +11 -11
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/utils/css/animations/fade-down.css +9 -0
- package/dist/utils/css/animations.css +9 -22
- package/dist/utils/css/easings.css +9 -1
- package/dist/utils/css/keyframes.css +22 -0
- package/dist/utils/index.d.ts +9 -4
- package/dist/utils/index.js +42 -4
- package/dist/utils/index.js.map +1 -1
- package/package.json +25 -21
- package/dist/composables/index.d.ts +0 -97
- package/dist/composables/index.js +0 -338
- package/dist/composables/index.js.map +0 -1
- package/dist/nuxt/module.cjs +0 -5
- package/dist/nuxt/module.d.ts +0 -9
- package/dist/nuxt/types.d.ts +0 -1
- package/dist/plugins/.turbo/turbo-lint.log +0 -13
- package/dist/plugins/.turbo/turbo-release.log +0 -7
- package/dist/plugins/MagicAccordion/demo/data/footer.json +0 -117
- package/dist/plugins/MagicCommand/demo/data/about.json +0 -3
- package/dist/plugins/MagicCommand/demo/data/search.json +0 -594
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +0 -15
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.mjs +0 -9
- package/dist/plugins/index.d.ts +0 -13
- package/dist/plugins/index.mjs +0 -13
- package/dist/utils/css/transitions.css +0 -8
- /package/dist/plugins/{.turbo/turbo-build.log → MagicError/src/MagicError.d.ts} +0 -0
- /package/dist/plugins/MagicToast/{symbols → src/symbols}/index.d.ts +0 -0
- /package/dist/plugins/MagicToast/{symbols → src/symbols}/index.mjs +0 -0
- /package/dist/utils/css/{transitions → animations}/clip.css +0 -0
- /package/dist/utils/css/{transitions → animations}/fade-up.css +0 -0
- /package/dist/utils/css/{transitions → animations}/fade.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-btt.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-ltr.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-rtl.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-ttb.css +0 -0
- /package/dist/utils/css/{transitions → animations}/zoom.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/auto-size-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/clip-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/clip-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-down-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-down-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-up-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-up-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/flip-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/flip-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-btt-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-btt-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ltr-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ltr-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-rtl-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-rtl-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ttb-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ttb-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/squash-y.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/zoom-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/zoom-out.css +0 -0
|
@@ -1,46 +1,30 @@
|
|
|
1
1
|
import { type MaybeRef } from 'vue';
|
|
2
2
|
import type { MagicDrawerOptions } from '../types/index.js';
|
|
3
|
-
import '@maas/vue-equipment/utils/css/
|
|
4
|
-
import '@maas/vue-equipment/utils/css/
|
|
5
|
-
import '@maas/vue-equipment/utils/css/
|
|
6
|
-
import '@maas/vue-equipment/utils/css/
|
|
7
|
-
import '@maas/vue-equipment/utils/css/
|
|
8
|
-
import '@maas/vue-equipment/utils/css/
|
|
9
|
-
import '@maas/vue-equipment/utils/css/
|
|
10
|
-
import '@maas/vue-equipment/utils/css/
|
|
11
|
-
import '@maas/vue-equipment/utils/css/
|
|
12
|
-
import '@maas/vue-equipment/utils/css/
|
|
3
|
+
import '@maas/vue-equipment/utils/css/keyframes/fade-in.css';
|
|
4
|
+
import '@maas/vue-equipment/utils/css/keyframes/fade-out.css';
|
|
5
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-ltr-in.css';
|
|
6
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-rtl-in.css';
|
|
7
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-ttb-in.css';
|
|
8
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-btt-in.css';
|
|
9
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-ltr-out.css';
|
|
10
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-rtl-out.css';
|
|
11
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-ttb-out.css';
|
|
12
|
+
import '@maas/vue-equipment/utils/css/keyframes/slide-btt-out.css';
|
|
13
13
|
interface MagicDrawerProps {
|
|
14
14
|
id: MaybeRef<string>;
|
|
15
15
|
options?: MagicDrawerOptions;
|
|
16
16
|
}
|
|
17
|
-
declare
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
refs: {
|
|
24
|
-
drawerRef: HTMLDivElement;
|
|
25
|
-
wrapperRef: HTMLDivElement;
|
|
26
|
-
elRef: unknown;
|
|
27
|
-
};
|
|
28
|
-
rootEl: any;
|
|
17
|
+
declare var __VLS_11: {}, __VLS_37: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
backdrop?: (props: typeof __VLS_11) => any;
|
|
20
|
+
} & {
|
|
21
|
+
default?: (props: typeof __VLS_37) => any;
|
|
29
22
|
};
|
|
30
|
-
|
|
31
|
-
declare const
|
|
32
|
-
declare const _default:
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
33
26
|
export default _default;
|
|
34
|
-
type
|
|
35
|
-
type __VLS_TypePropsToOption<T> = {
|
|
36
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
37
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
38
|
-
} : {
|
|
39
|
-
type: import('vue').PropType<T[K]>;
|
|
40
|
-
required: true;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
44
28
|
new (): {
|
|
45
29
|
$slots: S;
|
|
46
30
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toValue, nextTick } from "vue";
|
|
2
|
-
import { useMetaViewport } from "@maas/vue-equipment/composables";
|
|
3
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
2
|
+
import { useMetaViewport } from "@maas/vue-equipment/composables/useMetaViewport";
|
|
3
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
4
4
|
export function useDrawerCallback(args) {
|
|
5
5
|
const {
|
|
6
6
|
id,
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
1
|
+
import { ref, shallowRef } from "vue";
|
|
2
2
|
import { defu } from "defu";
|
|
3
3
|
import { useScrollLock } from "@vueuse/core";
|
|
4
4
|
import { useFocusTrap } from "@vueuse/integrations/useFocusTrap";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
matchClass,
|
|
7
|
+
scrollbarGutterSupport,
|
|
8
|
+
scrollbarWidth
|
|
9
|
+
} from "@maas/vue-equipment/utils";
|
|
6
10
|
const defaultOptions = {
|
|
7
11
|
focusTrap: false,
|
|
8
12
|
focusTarget: void 0,
|
|
9
13
|
scrollLock: true
|
|
10
14
|
};
|
|
11
|
-
const scrollLock = typeof window !== "undefined" ? useScrollLock(document?.documentElement) :
|
|
15
|
+
const scrollLock = typeof window !== "undefined" ? useScrollLock(document?.documentElement) : shallowRef(false);
|
|
12
16
|
export function useDrawerDOM(args) {
|
|
13
17
|
const positionFixedElements = ref([]);
|
|
14
18
|
const mappedOptions = defu(args, defaultOptions);
|
|
@@ -34,26 +38,44 @@ export function useDrawerDOM(args) {
|
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
function addScrollLockPadding() {
|
|
37
|
-
if (typeof window === "undefined")
|
|
41
|
+
if (typeof window === "undefined") {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
38
44
|
const exclude = new RegExp(/magic-drawer(__backdrop)?/);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
document.body.style.setProperty(
|
|
46
|
+
"--scrollbar-width",
|
|
47
|
+
`${scrollbarWidth()}px`
|
|
48
|
+
);
|
|
42
49
|
positionFixedElements.value = [
|
|
43
50
|
...document.body.getElementsByTagName("*")
|
|
44
51
|
].filter(
|
|
45
|
-
(x) => getComputedStyle(x, null).getPropertyValue("position") === "fixed" && !matchClass(x, exclude)
|
|
46
|
-
);
|
|
47
|
-
positionFixedElements.value.forEach(
|
|
48
|
-
(elem) => elem.style.paddingRight = "var(--scrollbar-width)"
|
|
52
|
+
(x) => getComputedStyle(x, null).getPropertyValue("position") === "fixed" && getComputedStyle(x, null).getPropertyValue("right") === "0px" && !matchClass(x, exclude)
|
|
49
53
|
);
|
|
54
|
+
switch (scrollbarGutterSupport()) {
|
|
55
|
+
case true:
|
|
56
|
+
document.documentElement.style.scrollbarGutter = "stable";
|
|
57
|
+
positionFixedElements.value.forEach((elem) => {
|
|
58
|
+
elem.style.scrollbarGutter = "stable";
|
|
59
|
+
elem.style.overflow = "auto";
|
|
60
|
+
});
|
|
61
|
+
break;
|
|
62
|
+
case false:
|
|
63
|
+
document.body.style.paddingRight = "var(--scrollbar-width)";
|
|
64
|
+
positionFixedElements.value.forEach(
|
|
65
|
+
(elem) => elem.style.paddingRight = "var(--scrollbar-width)"
|
|
66
|
+
);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
50
69
|
}
|
|
51
70
|
function removeScrollLockPadding() {
|
|
52
|
-
document.
|
|
71
|
+
document.documentElement.style.scrollbarGutter = "";
|
|
53
72
|
document.body.style.removeProperty("--scrollbar-width");
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
document.body.style.paddingRight = "";
|
|
74
|
+
positionFixedElements.value.forEach((elem) => {
|
|
75
|
+
elem.style.paddingRight = "";
|
|
76
|
+
elem.style.scrollbarGutter = "";
|
|
77
|
+
elem.style.overflow = "";
|
|
78
|
+
});
|
|
57
79
|
}
|
|
58
80
|
return {
|
|
59
81
|
trapFocus,
|
|
@@ -2,8 +2,8 @@ import { type Ref, type MaybeRef } from 'vue';
|
|
|
2
2
|
import type { DrawerDefaultOptions } from '../../types/index.js';
|
|
3
3
|
type UseDrawerDragArgs = {
|
|
4
4
|
id: MaybeRef<string>;
|
|
5
|
-
elRef: Ref<HTMLElement |
|
|
6
|
-
wrapperRef: Ref<HTMLDivElement |
|
|
5
|
+
elRef: Ref<HTMLElement | null>;
|
|
6
|
+
wrapperRef: Ref<HTMLDivElement | null>;
|
|
7
7
|
position: MaybeRef<DrawerDefaultOptions['position']>;
|
|
8
8
|
snapPoints: MaybeRef<DrawerDefaultOptions['snapPoints']>;
|
|
9
9
|
threshold: MaybeRef<DrawerDefaultOptions['threshold']>;
|
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
} from "@maas/vue-equipment/utils";
|
|
23
23
|
import {
|
|
24
24
|
useMagicEmitter
|
|
25
|
-
} from "@maas/vue-equipment/plugins";
|
|
25
|
+
} from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
26
|
+
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
26
27
|
import { useMagicDrawer } from "./../useMagicDrawer.mjs";
|
|
27
28
|
import { useDrawerSnap } from "./useDrawerSnap.mjs";
|
|
28
29
|
import { useDrawerGuards } from "./useDrawerGuards.mjs";
|
|
@@ -42,6 +43,10 @@ export function useDrawerDrag(args) {
|
|
|
42
43
|
preventDragClose,
|
|
43
44
|
disabled
|
|
44
45
|
} = args;
|
|
46
|
+
const { logWarning } = useMagicError({
|
|
47
|
+
prefix: "MagicDrawer",
|
|
48
|
+
source: "useDrawerDrag"
|
|
49
|
+
});
|
|
45
50
|
const { initializeState } = useDrawerState(toValue(id));
|
|
46
51
|
const state = initializeState();
|
|
47
52
|
const {
|
|
@@ -285,7 +290,7 @@ export function useDrawerDrag(args) {
|
|
|
285
290
|
function snapToCallback(payload) {
|
|
286
291
|
if (payload.id === toValue(id)) {
|
|
287
292
|
if (!toValue(isActive)) {
|
|
288
|
-
|
|
293
|
+
logWarning("Cannot snap to point when drawer is not open");
|
|
289
294
|
return;
|
|
290
295
|
} else {
|
|
291
296
|
snapTo({
|
|
@@ -383,9 +388,9 @@ export function useDrawerDrag(args) {
|
|
|
383
388
|
shouldClose.value = false;
|
|
384
389
|
checkDirection({ x: e.screenX, y: e.screenY });
|
|
385
390
|
if (!scrollLock) {
|
|
386
|
-
const
|
|
387
|
-
if (
|
|
388
|
-
scrollLock = useScrollLock(
|
|
391
|
+
const scrollLockTarget = lockScroll(e.target);
|
|
392
|
+
if (scrollLockTarget) {
|
|
393
|
+
scrollLock = useScrollLock(scrollLockTarget);
|
|
389
394
|
scrollLock.value = true;
|
|
390
395
|
}
|
|
391
396
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Ref, type MaybeRef } from 'vue';
|
|
2
2
|
import type { DrawerSnapPoint, DrawerDefaultOptions } from '../../types/index.js';
|
|
3
3
|
interface UseDrawerGuardsArgs {
|
|
4
|
-
elRef: Ref<HTMLElement |
|
|
4
|
+
elRef: Ref<HTMLElement | null>;
|
|
5
5
|
absDirectionX: MaybeRef<'with' | 'against' | undefined>;
|
|
6
6
|
absDirectionY: MaybeRef<'with' | 'against' | undefined>;
|
|
7
7
|
position: MaybeRef<DrawerDefaultOptions['position']>;
|
|
@@ -8,6 +8,20 @@ export function useDrawerGuards(args) {
|
|
|
8
8
|
const canSnap = computed(() => {
|
|
9
9
|
return toValue(activeSnapPoint) !== 1 && !!toValue(activeSnapPoint);
|
|
10
10
|
});
|
|
11
|
+
function canScrollY(element) {
|
|
12
|
+
const style = window.getComputedStyle(element);
|
|
13
|
+
const overflowY = style.overflowY;
|
|
14
|
+
const canScroll = ["auto", "scroll"].includes(overflowY);
|
|
15
|
+
const hasOverflow = Math.round(element.scrollHeight) > Math.round(element.clientHeight);
|
|
16
|
+
return canScroll && hasOverflow;
|
|
17
|
+
}
|
|
18
|
+
function canScrollX(element) {
|
|
19
|
+
const style = window.getComputedStyle(element);
|
|
20
|
+
const overflowX = style.overflowX;
|
|
21
|
+
const canScroll = ["auto", "scroll"].includes(overflowX);
|
|
22
|
+
const hasOverflow = Math.round(element.scrollWidth) > Math.round(element.clientWidth);
|
|
23
|
+
return canScroll && hasOverflow;
|
|
24
|
+
}
|
|
11
25
|
function canDrag(el) {
|
|
12
26
|
let element = el;
|
|
13
27
|
if (hasCursor.value) {
|
|
@@ -22,7 +36,7 @@ export function useDrawerGuards(args) {
|
|
|
22
36
|
}
|
|
23
37
|
switch (position) {
|
|
24
38
|
case "bottom":
|
|
25
|
-
if (element
|
|
39
|
+
if (canScrollY(element)) {
|
|
26
40
|
if (element.scrollTop > 0) {
|
|
27
41
|
return false;
|
|
28
42
|
}
|
|
@@ -35,7 +49,7 @@ export function useDrawerGuards(args) {
|
|
|
35
49
|
}
|
|
36
50
|
break;
|
|
37
51
|
case "top":
|
|
38
|
-
if (element
|
|
52
|
+
if (canScrollY(element)) {
|
|
39
53
|
const maxScroll = element.scrollHeight - element.clientHeight;
|
|
40
54
|
if (element.scrollTop < maxScroll) {
|
|
41
55
|
return false;
|
|
@@ -49,7 +63,7 @@ export function useDrawerGuards(args) {
|
|
|
49
63
|
}
|
|
50
64
|
break;
|
|
51
65
|
case "right":
|
|
52
|
-
if (element
|
|
66
|
+
if (canScrollX(element)) {
|
|
53
67
|
if (element.scrollLeft > 0) {
|
|
54
68
|
return false;
|
|
55
69
|
}
|
|
@@ -62,7 +76,7 @@ export function useDrawerGuards(args) {
|
|
|
62
76
|
}
|
|
63
77
|
break;
|
|
64
78
|
case "left":
|
|
65
|
-
if (element
|
|
79
|
+
if (canScrollX(element)) {
|
|
66
80
|
const maxScroll = element.scrollWidth - element.clientWidth;
|
|
67
81
|
if (element.scrollLeft < maxScroll) {
|
|
68
82
|
return false;
|
|
@@ -89,13 +103,13 @@ export function useDrawerGuards(args) {
|
|
|
89
103
|
switch (position) {
|
|
90
104
|
case "bottom":
|
|
91
105
|
case "top":
|
|
92
|
-
if (element
|
|
106
|
+
if (canScrollY(element)) {
|
|
93
107
|
return false;
|
|
94
108
|
}
|
|
95
109
|
break;
|
|
96
110
|
case "left":
|
|
97
111
|
case "right":
|
|
98
|
-
if (element
|
|
112
|
+
if (canScrollX(element)) {
|
|
99
113
|
return false;
|
|
100
114
|
}
|
|
101
115
|
break;
|
|
@@ -117,41 +131,45 @@ export function useDrawerGuards(args) {
|
|
|
117
131
|
}
|
|
118
132
|
switch (position) {
|
|
119
133
|
case "bottom":
|
|
120
|
-
if (element
|
|
134
|
+
if (canScrollY(element)) {
|
|
121
135
|
if (element.scrollTop === 0 || canSnap.value) {
|
|
122
136
|
if (toValue(absDirectionY) === "against") {
|
|
123
137
|
return element;
|
|
124
138
|
}
|
|
125
139
|
}
|
|
140
|
+
return void 0;
|
|
126
141
|
}
|
|
127
142
|
break;
|
|
128
143
|
case "top":
|
|
129
|
-
if (element
|
|
144
|
+
if (canScrollY(element)) {
|
|
130
145
|
const maxScroll = element.scrollHeight - element.clientHeight;
|
|
131
146
|
if (element.scrollTop === maxScroll || canSnap.value) {
|
|
132
147
|
if (toValue(absDirectionY) === "against") {
|
|
133
148
|
return element;
|
|
134
149
|
}
|
|
135
150
|
}
|
|
151
|
+
return void 0;
|
|
136
152
|
}
|
|
137
153
|
break;
|
|
138
154
|
case "right":
|
|
139
|
-
if (element
|
|
155
|
+
if (canScrollX(element)) {
|
|
140
156
|
if (element.scrollLeft === 0 || canSnap.value) {
|
|
141
157
|
if (toValue(absDirectionX) === "against") {
|
|
142
158
|
return element;
|
|
143
159
|
}
|
|
144
160
|
}
|
|
161
|
+
return void 0;
|
|
145
162
|
}
|
|
146
163
|
break;
|
|
147
164
|
case "left":
|
|
148
|
-
if (element
|
|
165
|
+
if (canScrollX(element)) {
|
|
149
166
|
const maxScroll = element.scrollWidth - element.clientWidth;
|
|
150
167
|
if (element.scrollLeft === maxScroll || canSnap.value) {
|
|
151
168
|
if (toValue(absDirectionX) === "against") {
|
|
152
169
|
return element;
|
|
153
170
|
}
|
|
154
171
|
}
|
|
172
|
+
return void 0;
|
|
155
173
|
}
|
|
156
174
|
break;
|
|
157
175
|
}
|
|
@@ -2,8 +2,8 @@ import { type Ref, type MaybeRef } from 'vue';
|
|
|
2
2
|
import type { DrawerDefaultOptions } from '../../types/index.js';
|
|
3
3
|
interface UseDrawerProgressArgs {
|
|
4
4
|
id: MaybeRef<string>;
|
|
5
|
-
elRef: Ref<HTMLElement |
|
|
6
|
-
drawerRef: Ref<HTMLDivElement |
|
|
5
|
+
elRef: Ref<HTMLElement | null>;
|
|
6
|
+
drawerRef: Ref<HTMLDivElement | null>;
|
|
7
7
|
position: MaybeRef<DrawerDefaultOptions['position']>;
|
|
8
8
|
overshoot: MaybeRef<number>;
|
|
9
9
|
}
|
|
@@ -11,7 +11,7 @@ import { useElementBounding, useRafFn } from "@vueuse/core";
|
|
|
11
11
|
import { clampValue, mapValue } from "@maas/vue-equipment/utils";
|
|
12
12
|
import {
|
|
13
13
|
useMagicEmitter
|
|
14
|
-
} from "@maas/vue-equipment/plugins";
|
|
14
|
+
} from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
15
15
|
import { useDrawerState } from "./useDrawerState.mjs";
|
|
16
16
|
export function useDrawerProgress(args) {
|
|
17
17
|
const { id, drawerRef, elRef, position, overshoot } = args;
|
|
@@ -27,9 +27,9 @@ type InterpolateDraggedArgs = {
|
|
|
27
27
|
easing?: (t: number) => number;
|
|
28
28
|
};
|
|
29
29
|
export declare function useDrawerSnap(args: UseDrawerSnapArgs): {
|
|
30
|
-
snappedY:
|
|
31
|
-
snappedX:
|
|
32
|
-
activeSnapPoint:
|
|
30
|
+
snappedY: import("vue").ShallowRef<number, number>;
|
|
31
|
+
snappedX: import("vue").ShallowRef<number, number>;
|
|
32
|
+
activeSnapPoint: import("vue").ShallowRef<DrawerSnapPoint | undefined, DrawerSnapPoint | undefined>;
|
|
33
33
|
snapTo: (args: SnapToArgs) => Promise<void>;
|
|
34
34
|
findClosestSnapPoint: (args: FindClosestSnapPointArgs) => number | undefined;
|
|
35
35
|
interpolateDragged: (args: InterpolateDraggedArgs) => void;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
shallowRef,
|
|
3
|
+
computed,
|
|
4
|
+
toValue,
|
|
5
|
+
nextTick
|
|
6
|
+
} from "vue";
|
|
2
7
|
import { computedWithControl } from "@vueuse/core";
|
|
3
8
|
import { mapValue, interpolate } from "@maas/vue-equipment/utils";
|
|
4
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
9
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
5
10
|
export function useDrawerSnap(args) {
|
|
6
11
|
const {
|
|
7
12
|
id,
|
|
@@ -44,9 +49,9 @@ export function useDrawerSnap(args) {
|
|
|
44
49
|
return mapped;
|
|
45
50
|
}
|
|
46
51
|
);
|
|
47
|
-
const snappedY =
|
|
48
|
-
const snappedX =
|
|
49
|
-
const activeSnapPoint =
|
|
52
|
+
const snappedY = shallowRef(0);
|
|
53
|
+
const snappedX = shallowRef(0);
|
|
54
|
+
const activeSnapPoint = shallowRef(void 0);
|
|
50
55
|
const drawerHeight = computed(() => {
|
|
51
56
|
const rect = toValue(wrapperRect);
|
|
52
57
|
if (rect === void 0) {
|
|
@@ -102,30 +107,54 @@ export function useDrawerSnap(args) {
|
|
|
102
107
|
switch (position) {
|
|
103
108
|
case "bottom": {
|
|
104
109
|
const rect = toValue(wrapperRect);
|
|
105
|
-
if (reversedSnapPoint === 1)
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
if (reversedSnapPoint === 1) {
|
|
111
|
+
return drawerHeight.value;
|
|
112
|
+
}
|
|
113
|
+
if (reversedSnapPoint === 0) {
|
|
114
|
+
return 0;
|
|
115
|
+
}
|
|
116
|
+
if (!rect) {
|
|
117
|
+
return 0;
|
|
118
|
+
}
|
|
108
119
|
return vh * reversedSnapPoint - rect.top;
|
|
109
120
|
}
|
|
110
121
|
case "top": {
|
|
111
122
|
const rect = toValue(wrapperRect);
|
|
112
|
-
if (reversedSnapPoint === 1)
|
|
113
|
-
|
|
114
|
-
|
|
123
|
+
if (reversedSnapPoint === 1) {
|
|
124
|
+
return drawerHeight.value * -1;
|
|
125
|
+
}
|
|
126
|
+
if (reversedSnapPoint === 0) {
|
|
127
|
+
return 0;
|
|
128
|
+
}
|
|
129
|
+
if (!rect) {
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
115
132
|
return vh * reversedSnapPoint - rect.bottom;
|
|
116
133
|
}
|
|
117
134
|
case "right": {
|
|
118
135
|
const rect = toValue(wrapperRect);
|
|
119
|
-
if (reversedSnapPoint === 1)
|
|
120
|
-
|
|
121
|
-
|
|
136
|
+
if (reversedSnapPoint === 1) {
|
|
137
|
+
return drawerWidth.value;
|
|
138
|
+
}
|
|
139
|
+
if (reversedSnapPoint === 0) {
|
|
140
|
+
return 0;
|
|
141
|
+
}
|
|
142
|
+
if (!rect) {
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
122
145
|
return vw * reversedSnapPoint - rect.left;
|
|
123
146
|
}
|
|
124
147
|
case "left": {
|
|
125
148
|
const rect = toValue(wrapperRect);
|
|
126
|
-
if (reversedSnapPoint === 1)
|
|
127
|
-
|
|
128
|
-
|
|
149
|
+
if (reversedSnapPoint === 1) {
|
|
150
|
+
return drawerWidth.value * -1;
|
|
151
|
+
}
|
|
152
|
+
if (reversedSnapPoint === 0) {
|
|
153
|
+
return 0;
|
|
154
|
+
}
|
|
155
|
+
if (!rect) {
|
|
156
|
+
return 0;
|
|
157
|
+
}
|
|
129
158
|
return vw * reversedSnapPoint - rect.right;
|
|
130
159
|
}
|
|
131
160
|
default:
|
|
@@ -157,7 +186,9 @@ export function useDrawerSnap(args) {
|
|
|
157
186
|
case "top":
|
|
158
187
|
case "bottom": {
|
|
159
188
|
const mappedSnapPointY = mapSnapPoint(snapPoint);
|
|
160
|
-
if (!mappedSnapPointY && mappedSnapPointY !== 0)
|
|
189
|
+
if (!mappedSnapPointY && mappedSnapPointY !== 0) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
161
192
|
const closestY = findClosestSnapPoint({
|
|
162
193
|
draggedX,
|
|
163
194
|
draggedY: mappedSnapPointY
|
|
@@ -174,7 +205,9 @@ export function useDrawerSnap(args) {
|
|
|
174
205
|
case "left":
|
|
175
206
|
case "right": {
|
|
176
207
|
const mappedSnapPointX = mapSnapPoint(toValue(snapPoint));
|
|
177
|
-
if (!mappedSnapPointX && mappedSnapPointX !== 0)
|
|
208
|
+
if (!mappedSnapPointX && mappedSnapPointX !== 0) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
178
211
|
const closestX = findClosestSnapPoint({
|
|
179
212
|
draggedX: mappedSnapPointX,
|
|
180
213
|
draggedY
|
|
@@ -198,6 +231,9 @@ export function useDrawerSnap(args) {
|
|
|
198
231
|
easing
|
|
199
232
|
} = args2;
|
|
200
233
|
const snapPoint = snapPointsMap.value[to];
|
|
234
|
+
if (!snapPoint && snapPoint !== 0) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
201
237
|
emitter.emit("beforeSnap", { id: toValue(id), snapPoint });
|
|
202
238
|
switch (position) {
|
|
203
239
|
case "bottom":
|
|
@@ -38,7 +38,9 @@ export function useDrawerState(id) {
|
|
|
38
38
|
let state = drawerStateStore.value.find((entry) => {
|
|
39
39
|
return entry.id === id;
|
|
40
40
|
});
|
|
41
|
-
if (!state)
|
|
41
|
+
if (!state) {
|
|
42
|
+
state = addState(toValue(id));
|
|
43
|
+
}
|
|
42
44
|
return state;
|
|
43
45
|
}
|
|
44
46
|
function deleteState() {
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
export function useDrawerUtils() {
|
|
2
2
|
function clamp(value, from, to) {
|
|
3
3
|
if (from > to) {
|
|
4
|
-
if (value > from)
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
if (value > from) {
|
|
5
|
+
return value;
|
|
6
|
+
}
|
|
7
|
+
if (value < to) {
|
|
8
|
+
return to;
|
|
9
|
+
} else {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
7
12
|
} else if (from < to) {
|
|
8
|
-
if (value < from)
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
if (value < from) {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
if (value > to) {
|
|
17
|
+
return to;
|
|
18
|
+
} else {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
11
21
|
} else {
|
|
12
|
-
if (value < to)
|
|
13
|
-
|
|
22
|
+
if (value < to) {
|
|
23
|
+
return to;
|
|
24
|
+
} else {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
14
27
|
}
|
|
15
28
|
}
|
|
16
29
|
return {
|
|
@@ -2,7 +2,7 @@ import { type Ref, type MaybeRef, type ComputedRef } from 'vue';
|
|
|
2
2
|
import type { DrawerDefaultOptions } from '../../types/index.js';
|
|
3
3
|
type UseDrawerWheelArgs = {
|
|
4
4
|
id: MaybeRef<string>;
|
|
5
|
-
elRef: Ref<HTMLElement |
|
|
5
|
+
elRef: Ref<HTMLElement | null>;
|
|
6
6
|
position: MaybeRef<DrawerDefaultOptions['position']>;
|
|
7
7
|
disabled: ComputedRef<boolean>;
|
|
8
8
|
};
|
|
@@ -4,10 +4,15 @@ import {
|
|
|
4
4
|
toRefs
|
|
5
5
|
} from "vue";
|
|
6
6
|
import { unrefElement } from "@vueuse/core";
|
|
7
|
-
import WheelGestures from "wheel-gestures";
|
|
7
|
+
import WheelGestures, {} from "wheel-gestures";
|
|
8
|
+
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
8
9
|
import { useDrawerState } from "./useDrawerState.mjs";
|
|
9
10
|
export function useDrawerWheel(args) {
|
|
10
11
|
const { id, elRef, position, disabled } = args;
|
|
12
|
+
const { logError } = useMagicError({
|
|
13
|
+
prefix: "MagicDrawer",
|
|
14
|
+
source: "useDrawerWheel"
|
|
15
|
+
});
|
|
11
16
|
const { initializeState } = useDrawerState(toValue(id));
|
|
12
17
|
const state = initializeState();
|
|
13
18
|
const { dragging, wheeling } = toRefs(state);
|
|
@@ -56,7 +61,7 @@ export function useDrawerWheel(args) {
|
|
|
56
61
|
dispatchEvent(startEvent);
|
|
57
62
|
wheeling.value = true;
|
|
58
63
|
} catch (e) {
|
|
59
|
-
|
|
64
|
+
logError(String(e));
|
|
60
65
|
return destroyWheelListener();
|
|
61
66
|
}
|
|
62
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, toValue, toRefs } from "vue";
|
|
2
|
-
import { useMagicEmitter } from "
|
|
2
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
3
3
|
import { useDrawerState } from "./private/useDrawerState.mjs";
|
|
4
4
|
export function useMagicDrawer(id) {
|
|
5
5
|
const { initializeState } = useDrawerState(toValue(id));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {} from "focus-trap";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("nuxt/schema").NuxtModule<import("nuxt/schema").ModuleOptions, import("nuxt/schema").ModuleOptions, false>;
|
|
2
2
|
export default _default;
|