@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,9 +1,44 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<teleport v-if="state.renderer && state.active" :to="state.renderer">
|
|
3
|
+
<transition
|
|
4
|
+
:name="state.options.transition?.content"
|
|
5
|
+
@before-enter="onBeforeEnter"
|
|
6
|
+
@enter="onEnter"
|
|
7
|
+
@after-enter="onAfterEnter"
|
|
8
|
+
@before-leave="onBeforeLeave"
|
|
9
|
+
@leave="onLeave"
|
|
10
|
+
@after-leave="onAfterLeave"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
v-if="isActive"
|
|
14
|
+
v-show="!isIdle"
|
|
15
|
+
ref="el"
|
|
16
|
+
:key="`${viewId}-content`"
|
|
17
|
+
class="magic-command-content"
|
|
18
|
+
:data-id="`${viewId}-content`"
|
|
19
|
+
:data-idle="isIdle"
|
|
20
|
+
v-bind="$attrs"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</div>
|
|
24
|
+
</transition>
|
|
25
|
+
</teleport>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup>
|
|
29
|
+
import {
|
|
30
|
+
ref,
|
|
31
|
+
inject,
|
|
32
|
+
watch,
|
|
33
|
+
nextTick,
|
|
34
|
+
provide,
|
|
35
|
+
computed,
|
|
36
|
+
useTemplateRef
|
|
37
|
+
} from "vue";
|
|
6
38
|
import { useMagicKeys } from "@vueuse/core";
|
|
39
|
+
import {
|
|
40
|
+
useMagicError
|
|
41
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
7
42
|
import { useCommandItem } from "../composables/private/useCommandItem";
|
|
8
43
|
import { useCommandScroll } from "../composables/private/useCommandScroll";
|
|
9
44
|
import { useCommandCallback } from "../composables/private/useCommandCallback";
|
|
@@ -15,161 +50,138 @@ import {
|
|
|
15
50
|
} from "../symbols";
|
|
16
51
|
import { useCommandView } from "../composables/private/useCommandView";
|
|
17
52
|
import { useCommandState } from "../composables/private/useCommandState";
|
|
18
|
-
import "@maas/vue-equipment/utils/css/
|
|
19
|
-
import "@maas/vue-equipment/utils/css/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
import "@maas/vue-equipment/utils/css/keyframes/fade-in.css";
|
|
54
|
+
import "@maas/vue-equipment/utils/css/keyframes/fade-out.css";
|
|
55
|
+
defineOptions({
|
|
56
|
+
inheritAttrs: false
|
|
57
|
+
});
|
|
58
|
+
const magicError = useMagicError({
|
|
59
|
+
prefix: "MagicCommand",
|
|
60
|
+
source: "MagicCommandContent"
|
|
61
|
+
});
|
|
62
|
+
const instanceId = inject(MagicCommandInstanceId, void 0);
|
|
63
|
+
const viewId = inject(MagicCommandViewId, void 0);
|
|
64
|
+
const elRef = useTemplateRef("el");
|
|
65
|
+
magicError.assert(instanceId, {
|
|
66
|
+
message: "MagicCommandContent must be nested inside MagicCommandProvider",
|
|
67
|
+
errorCode: "missing_instance_id"
|
|
68
|
+
});
|
|
69
|
+
magicError.assert(viewId, {
|
|
70
|
+
message: "MagicCommandContent must be nested inside MagicCommandView",
|
|
71
|
+
errorCode: "missing_view_id"
|
|
72
|
+
});
|
|
73
|
+
const { getView } = useCommandView(instanceId);
|
|
74
|
+
const view = getView(viewId);
|
|
75
|
+
const { initializeState } = useCommandState(instanceId);
|
|
76
|
+
const state = initializeState();
|
|
77
|
+
const isActive = computed(() => view?.active && state.active && state.renderer);
|
|
78
|
+
const isIdle = computed(() => state.input.view !== viewId);
|
|
79
|
+
const options = inject(MagicCommandProviderOptions, void 0);
|
|
80
|
+
const { activeItem, selectNextItem, selectPrevItem } = useCommandItem({
|
|
81
|
+
instanceId,
|
|
82
|
+
viewId
|
|
83
|
+
});
|
|
84
|
+
const {
|
|
85
|
+
onBeforeEnter,
|
|
86
|
+
onEnter,
|
|
87
|
+
onAfterEnter,
|
|
88
|
+
onBeforeLeave,
|
|
89
|
+
onLeave,
|
|
90
|
+
onAfterLeave
|
|
91
|
+
} = useCommandCallback({
|
|
92
|
+
instanceId,
|
|
93
|
+
viewId
|
|
94
|
+
});
|
|
95
|
+
const {
|
|
96
|
+
findElement,
|
|
97
|
+
findScrollableAncestor,
|
|
98
|
+
isElementAbove,
|
|
99
|
+
isElementBelow,
|
|
100
|
+
scrollInFromBottom,
|
|
101
|
+
scrollInFromTop
|
|
102
|
+
} = useCommandScroll(elRef);
|
|
103
|
+
const keys = useMagicKeys();
|
|
104
|
+
const { logWarning } = magicError;
|
|
105
|
+
const nextTimeout = ref(void 0);
|
|
106
|
+
const prevTimeout = ref(void 0);
|
|
107
|
+
const nextInterval = ref(void 0);
|
|
108
|
+
const prevInterval = ref(void 0);
|
|
109
|
+
if (options?.keyListener?.next) {
|
|
110
|
+
for (const key of options.keyListener.next) {
|
|
111
|
+
const mappedKey = keys[key];
|
|
112
|
+
if (!mappedKey) {
|
|
113
|
+
logWarning(`The key \u201C${key}\u201D is not supported by MagicCommand`);
|
|
114
|
+
continue;
|
|
36
115
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
viewId
|
|
47
|
-
});
|
|
48
|
-
const {
|
|
49
|
-
onBeforeEnter,
|
|
50
|
-
onEnter,
|
|
51
|
-
onAfterEnter,
|
|
52
|
-
onBeforeLeave,
|
|
53
|
-
onLeave,
|
|
54
|
-
onAfterLeave
|
|
55
|
-
} = useCommandCallback({
|
|
56
|
-
instanceId,
|
|
57
|
-
viewId
|
|
58
|
-
});
|
|
59
|
-
const {
|
|
60
|
-
findElement,
|
|
61
|
-
findScrollableAncestor,
|
|
62
|
-
isElementAbove,
|
|
63
|
-
isElementBelow,
|
|
64
|
-
scrollInFromBottom,
|
|
65
|
-
scrollInFromTop
|
|
66
|
-
} = useCommandScroll(elRef);
|
|
67
|
-
const keys = useMagicKeys();
|
|
68
|
-
const nextTimeout = ref(void 0);
|
|
69
|
-
const prevTimeout = ref(void 0);
|
|
70
|
-
const nextInterval = ref(void 0);
|
|
71
|
-
const prevInterval = ref(void 0);
|
|
72
|
-
if (options?.keyListener?.next) {
|
|
73
|
-
for (const key of options.keyListener.next) {
|
|
74
|
-
watch(keys[key], (value) => {
|
|
75
|
-
if (isIdle.value) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (value) {
|
|
79
|
-
state.input.type = "keyboard";
|
|
116
|
+
watch(mappedKey, (value) => {
|
|
117
|
+
if (isIdle.value) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (value) {
|
|
121
|
+
state.input.type = "keyboard";
|
|
122
|
+
selectNextItem(options.loop);
|
|
123
|
+
nextTimeout.value = setTimeout(() => {
|
|
124
|
+
nextInterval.value = setInterval(() => {
|
|
80
125
|
selectNextItem(options.loop);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
} else {
|
|
87
|
-
clearTimeout(nextTimeout.value);
|
|
88
|
-
clearInterval(nextInterval.value);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
126
|
+
}, 100);
|
|
127
|
+
}, 500);
|
|
128
|
+
} else {
|
|
129
|
+
clearTimeout(nextTimeout.value);
|
|
130
|
+
clearInterval(nextInterval.value);
|
|
91
131
|
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (options?.keyListener?.prev) {
|
|
136
|
+
for (const key of options.keyListener.prev) {
|
|
137
|
+
const mappedKey = keys[key];
|
|
138
|
+
if (!mappedKey) {
|
|
139
|
+
logWarning(`The key \u201C${key}\u201D is not supported by MagicCommand`);
|
|
140
|
+
continue;
|
|
92
141
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
142
|
+
watch(mappedKey, (value) => {
|
|
143
|
+
if (isIdle.value) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (value) {
|
|
147
|
+
state.input.type = "keyboard";
|
|
148
|
+
selectPrevItem(options.loop);
|
|
149
|
+
prevTimeout.value = setTimeout(() => {
|
|
150
|
+
prevInterval.value = setInterval(() => {
|
|
101
151
|
selectPrevItem(options.loop);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} else {
|
|
108
|
-
clearTimeout(prevTimeout.value);
|
|
109
|
-
clearInterval(prevInterval.value);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
152
|
+
}, 100);
|
|
153
|
+
}, 500);
|
|
154
|
+
} else {
|
|
155
|
+
clearTimeout(prevTimeout.value);
|
|
156
|
+
clearInterval(prevInterval.value);
|
|
112
157
|
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
watch(
|
|
162
|
+
activeItem,
|
|
163
|
+
async (value) => {
|
|
164
|
+
if (!value || isIdle.value || state.input.type !== "keyboard") {
|
|
165
|
+
return;
|
|
113
166
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
167
|
+
nextTick(() => {
|
|
168
|
+
const element = findElement(value.id);
|
|
169
|
+
if (element) {
|
|
170
|
+
const ancestor = findScrollableAncestor(element);
|
|
171
|
+
switch (true) {
|
|
172
|
+
case isElementAbove({ element, ancestor }):
|
|
173
|
+
scrollInFromTop({ element, ancestor });
|
|
174
|
+
break;
|
|
175
|
+
case isElementBelow({ element, ancestor }):
|
|
176
|
+
scrollInFromBottom({ element, ancestor });
|
|
177
|
+
break;
|
|
119
178
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
scrollInFromTop({ element, ancestor });
|
|
127
|
-
break;
|
|
128
|
-
case isElementBelow({ element, ancestor }):
|
|
129
|
-
scrollInFromBottom({ element, ancestor });
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
{ deep: true }
|
|
136
|
-
);
|
|
137
|
-
provide(MagicCommandContentId, `${viewId}-content`);
|
|
138
|
-
return (_ctx, _cache) => {
|
|
139
|
-
return _unref(state).renderer && _unref(state).active ? (_openBlock(), _createBlock(_Teleport, {
|
|
140
|
-
key: 0,
|
|
141
|
-
to: _unref(state).renderer
|
|
142
|
-
}, [
|
|
143
|
-
_createVNode(_Transition, {
|
|
144
|
-
name: _unref(state).options.transition?.content,
|
|
145
|
-
"on-before-enter": _unref(onBeforeEnter),
|
|
146
|
-
"on-enter": _unref(onEnter),
|
|
147
|
-
"on-after-enter": _unref(onAfterEnter),
|
|
148
|
-
"on-before-leave": _unref(onBeforeLeave),
|
|
149
|
-
"on-leave": _unref(onLeave),
|
|
150
|
-
"on-after-leave": _unref(onAfterLeave)
|
|
151
|
-
}, {
|
|
152
|
-
default: _withCtx(() => [
|
|
153
|
-
isActive.value ? _withDirectives((_openBlock(), _createElementBlock("div", _mergeProps({
|
|
154
|
-
ref_key: "elRef",
|
|
155
|
-
ref: elRef,
|
|
156
|
-
key: `${_unref(viewId)}-content`,
|
|
157
|
-
class: "magic-command-content",
|
|
158
|
-
"data-id": `${_unref(viewId)}-content`,
|
|
159
|
-
"data-idle": isIdle.value
|
|
160
|
-
}, _ctx.$attrs), [
|
|
161
|
-
_renderSlot(_ctx.$slots, "default")
|
|
162
|
-
], 16, _hoisted_1)), [
|
|
163
|
-
[_vShow, !isIdle.value]
|
|
164
|
-
]) : _createCommentVNode("v-if", true)
|
|
165
|
-
]),
|
|
166
|
-
_: 3
|
|
167
|
-
/* FORWARDED */
|
|
168
|
-
}, 8, ["name", "on-before-enter", "on-enter", "on-after-enter", "on-before-leave", "on-leave", "on-after-leave"])
|
|
169
|
-
], 8, ["to"])) : _createCommentVNode("v-if", true);
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
});
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
{ deep: true }
|
|
183
|
+
);
|
|
184
|
+
provide(MagicCommandContentId, `${viewId}-content`);
|
|
173
185
|
</script>
|
|
174
186
|
|
|
175
187
|
<style>
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import '@maas/vue-equipment/utils/css/
|
|
2
|
-
import '@maas/vue-equipment/utils/css/
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
default?(_: {}): any;
|
|
7
|
-
};
|
|
8
|
-
refs: {
|
|
9
|
-
elRef: HTMLDivElement;
|
|
10
|
-
};
|
|
11
|
-
rootEl: any;
|
|
1
|
+
import '@maas/vue-equipment/utils/css/keyframes/fade-in.css';
|
|
2
|
+
import '@maas/vue-equipment/utils/css/keyframes/fade-out.css';
|
|
3
|
+
declare var __VLS_19: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
default?: (props: typeof __VLS_19) => any;
|
|
12
6
|
};
|
|
13
|
-
|
|
14
|
-
declare const
|
|
15
|
-
declare const _default:
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
16
10
|
export default _default;
|
|
17
|
-
type
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
12
|
new (): {
|
|
19
13
|
$slots: S;
|
|
20
14
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MagicCommandDrawerOptions } from '../types/index.js';
|
|
2
|
+
interface MagicCommandDrawerProps {
|
|
3
|
+
options?: MagicCommandDrawerOptions;
|
|
4
|
+
}
|
|
5
|
+
declare var __VLS_7: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_7) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,62 +1,58 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<magic-drawer
|
|
3
|
+
:id="instanceId"
|
|
4
|
+
class="magic-command-drawer"
|
|
5
|
+
:options="options"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
>
|
|
8
|
+
<slot />
|
|
9
|
+
</magic-drawer>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
4
13
|
import { inject, watch, onBeforeUnmount } from "vue";
|
|
14
|
+
import { useMagicDrawer } from "@maas/vue-equipment/plugins/MagicDrawer";
|
|
5
15
|
import {
|
|
6
|
-
useMagicDrawer,
|
|
7
16
|
useMagicEmitter
|
|
8
|
-
} from "@maas/vue-equipment/plugins";
|
|
17
|
+
} from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
18
|
+
import {
|
|
19
|
+
useMagicError
|
|
20
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
9
21
|
import { useMagicCommand } from "../composables/useMagicCommand";
|
|
10
22
|
import { MagicCommandInstanceId } from "../symbols";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
emitter.on("afterLeave", afterLeaveCallback);
|
|
42
|
-
onBeforeUnmount(() => {
|
|
43
|
-
emitter.off("afterLeave", afterLeaveCallback);
|
|
44
|
-
close();
|
|
45
|
-
});
|
|
46
|
-
return (_ctx, _cache) => {
|
|
47
|
-
const _component_magic_drawer = _resolveComponent("magic-drawer");
|
|
48
|
-
return _openBlock(), _createBlock(_component_magic_drawer, _mergeProps({
|
|
49
|
-
id: _unref(instanceId),
|
|
50
|
-
class: "magic-command-drawer",
|
|
51
|
-
options: _ctx.options
|
|
52
|
-
}, _ctx.$attrs), {
|
|
53
|
-
default: _withCtx(() => [
|
|
54
|
-
_renderSlot(_ctx.$slots, "default")
|
|
55
|
-
]),
|
|
56
|
-
_: 3
|
|
57
|
-
/* FORWARDED */
|
|
58
|
-
}, 16, ["id", "options"]);
|
|
59
|
-
};
|
|
23
|
+
defineOptions({
|
|
24
|
+
inheritAttrs: false
|
|
25
|
+
});
|
|
26
|
+
defineProps({
|
|
27
|
+
options: { type: null, required: false }
|
|
28
|
+
});
|
|
29
|
+
const magicError = useMagicError({
|
|
30
|
+
prefix: "MagicCommand",
|
|
31
|
+
source: "MagicCommandDrawer"
|
|
32
|
+
});
|
|
33
|
+
const instanceId = inject(MagicCommandInstanceId, "");
|
|
34
|
+
const emitter = useMagicEmitter();
|
|
35
|
+
magicError.assert(instanceId, {
|
|
36
|
+
message: "MagicCommandDrawer must be nested inside MagicCommandProvider",
|
|
37
|
+
errorCode: "missing_instance_id"
|
|
38
|
+
});
|
|
39
|
+
function afterLeaveCallback(payload) {
|
|
40
|
+
if (typeof payload === "string" && payload === instanceId) {
|
|
41
|
+
close();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const { close, isActive } = useMagicCommand(instanceId);
|
|
45
|
+
const drawerApi = useMagicDrawer(instanceId);
|
|
46
|
+
watch(isActive, (value) => {
|
|
47
|
+
if (value) {
|
|
48
|
+
drawerApi.open();
|
|
49
|
+
} else {
|
|
50
|
+
drawerApi.close();
|
|
60
51
|
}
|
|
61
52
|
});
|
|
53
|
+
emitter.on("afterLeave", afterLeaveCallback);
|
|
54
|
+
onBeforeUnmount(() => {
|
|
55
|
+
emitter.off("afterLeave", afterLeaveCallback);
|
|
56
|
+
close();
|
|
57
|
+
});
|
|
62
58
|
</script>
|
|
@@ -2,28 +2,15 @@ import type { MagicCommandDrawerOptions } from '../types/index.js';
|
|
|
2
2
|
interface MagicCommandDrawerProps {
|
|
3
3
|
options?: MagicCommandDrawerOptions;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
default?(_: {}): any;
|
|
9
|
-
};
|
|
10
|
-
refs: {};
|
|
11
|
-
rootEl: any;
|
|
5
|
+
declare var __VLS_7: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_7) => any;
|
|
12
8
|
};
|
|
13
|
-
|
|
14
|
-
declare const
|
|
15
|
-
declare const _default:
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
16
12
|
export default _default;
|
|
17
|
-
type
|
|
18
|
-
type __VLS_TypePropsToOption<T> = {
|
|
19
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
-
} : {
|
|
22
|
-
type: import('vue').PropType<T[K]>;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
14
|
new (): {
|
|
28
15
|
$slots: S;
|
|
29
16
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface MagicCommandItemProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
initial?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {
|
|
7
|
+
itemActive: boolean;
|
|
8
|
+
itemDisabled: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
enter: () => any;
|
|
15
|
+
click: (event: MouseEvent) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
|
|
17
|
+
onEnter?: (() => any) | undefined;
|
|
18
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|