@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
|
@@ -5,65 +5,15 @@ interface MagicCommandProviderProps {
|
|
|
5
5
|
asChild?: boolean;
|
|
6
6
|
options?: MagicCommandOptions;
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
default?(_: {}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {
|
|
14
|
-
elRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
asChild: {
|
|
16
|
-
type: BooleanConstructor;
|
|
17
|
-
default: boolean;
|
|
18
|
-
};
|
|
19
|
-
as: {
|
|
20
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
26
|
-
asChild: boolean;
|
|
27
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
28
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
29
|
-
P: {};
|
|
30
|
-
B: {};
|
|
31
|
-
D: {};
|
|
32
|
-
C: {};
|
|
33
|
-
M: {};
|
|
34
|
-
Defaults: {};
|
|
35
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
36
|
-
asChild: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
as: {
|
|
41
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
42
|
-
default: string;
|
|
43
|
-
};
|
|
44
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}>, {}, {}, {}, {
|
|
47
|
-
asChild: boolean;
|
|
48
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
49
|
-
}> | null;
|
|
50
|
-
};
|
|
51
|
-
rootEl: any;
|
|
8
|
+
declare var __VLS_7: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_7) => any;
|
|
52
11
|
};
|
|
53
|
-
|
|
54
|
-
declare const
|
|
55
|
-
declare const _default:
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
56
15
|
export default _default;
|
|
57
|
-
type
|
|
58
|
-
type __VLS_TypePropsToOption<T> = {
|
|
59
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
60
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
61
|
-
} : {
|
|
62
|
-
type: import('vue').PropType<T[K]>;
|
|
63
|
-
required: true;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
67
17
|
new (): {
|
|
68
18
|
$slots: S;
|
|
69
19
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -1,48 +1,38 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="el" class="magic-command-renderer" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { inject, onBeforeUnmount, useTemplateRef } from "vue";
|
|
7
|
+
import {
|
|
8
|
+
useMagicError
|
|
9
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
5
10
|
import {
|
|
6
11
|
useMagicEmitter
|
|
7
|
-
} from "@maas/vue-equipment/plugins";
|
|
12
|
+
} from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
8
13
|
import { MagicCommandInstanceId } from "./../symbols";
|
|
9
14
|
import { useCommandState } from "../composables/private/useCommandState";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
emitter.on("enter", enterCallback);
|
|
29
|
-
onBeforeUnmount(() => {
|
|
30
|
-
emitter.off("enter", enterCallback);
|
|
31
|
-
});
|
|
32
|
-
return (_ctx, _cache) => {
|
|
33
|
-
return _openBlock(), _createElementBlock(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
ref_key: "elRef",
|
|
37
|
-
ref: elRef,
|
|
38
|
-
class: "magic-command-renderer"
|
|
39
|
-
},
|
|
40
|
-
null,
|
|
41
|
-
512
|
|
42
|
-
/* NEED_PATCH */
|
|
43
|
-
);
|
|
44
|
-
};
|
|
15
|
+
const magicError = useMagicError({
|
|
16
|
+
prefix: "MagicCommand",
|
|
17
|
+
source: "MagicCommand"
|
|
18
|
+
});
|
|
19
|
+
const instanceId = inject(MagicCommandInstanceId, "");
|
|
20
|
+
const emitter = useMagicEmitter();
|
|
21
|
+
magicError.assert(instanceId, {
|
|
22
|
+
message: "MagicCommandRenderer must be nested inside MagicCommandProvider",
|
|
23
|
+
errorCode: "missing_instance_id"
|
|
24
|
+
});
|
|
25
|
+
const elRef = useTemplateRef("el");
|
|
26
|
+
const { initializeState } = useCommandState(instanceId);
|
|
27
|
+
const state = initializeState();
|
|
28
|
+
function enterCallback(payload) {
|
|
29
|
+
if (typeof payload === "string" && payload === instanceId) {
|
|
30
|
+
state.renderer = elRef.value;
|
|
45
31
|
}
|
|
32
|
+
}
|
|
33
|
+
emitter.on("enter", enterCallback);
|
|
34
|
+
onBeforeUnmount(() => {
|
|
35
|
+
emitter.off("enter", enterCallback);
|
|
46
36
|
});
|
|
47
37
|
</script>
|
|
48
38
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Interaction, Action } from '../types/index.js';
|
|
2
|
+
interface MagicCommandTriggerProps {
|
|
3
|
+
viewId?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
action?: Action;
|
|
6
|
+
trigger?: Interaction[];
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare var __VLS_12: {
|
|
10
|
+
viewActive: boolean | undefined;
|
|
11
|
+
triggerDisabled: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_12) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<primitive
|
|
3
|
+
ref="el"
|
|
4
|
+
:data-id="`${mappedViewId}-trigger`"
|
|
5
|
+
:data-active="mappedActive"
|
|
6
|
+
:data-disabled="mappedDisabled"
|
|
7
|
+
:as-child="asChild"
|
|
8
|
+
class="magic-command-trigger"
|
|
9
|
+
@click="onClick"
|
|
10
|
+
@mouseenter="onMouseenter"
|
|
11
|
+
>
|
|
12
|
+
<slot :view-active="view?.active" :trigger-disabled="mappedDisabled" />
|
|
13
|
+
</primitive>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { computed, inject, useTemplateRef, toValue, watch } from "vue";
|
|
5
18
|
import { Primitive } from "@maas/vue-primitive";
|
|
19
|
+
import {
|
|
20
|
+
useMagicError
|
|
21
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
6
22
|
import { useCommandView } from "../composables/private/useCommandView";
|
|
7
23
|
import { useCommandTrigger } from "../composables/private/useCommandTrigger";
|
|
8
24
|
import {
|
|
@@ -13,90 +29,77 @@ import {
|
|
|
13
29
|
MagicCommandProviderOptions
|
|
14
30
|
} from "../symbols";
|
|
15
31
|
import { useMagicKeys } from "@vueuse/core";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const {
|
|
33
|
+
viewId,
|
|
34
|
+
disabled = void 0,
|
|
35
|
+
action = "open",
|
|
36
|
+
trigger = ["click"]
|
|
37
|
+
} = defineProps({
|
|
38
|
+
viewId: { type: String, required: false },
|
|
39
|
+
disabled: { type: Boolean, required: false },
|
|
40
|
+
action: { type: String, required: false },
|
|
41
|
+
trigger: { type: Array, required: false },
|
|
42
|
+
asChild: { type: Boolean, required: false }
|
|
43
|
+
});
|
|
44
|
+
const magicError = useMagicError({
|
|
45
|
+
prefix: "MagicCommand",
|
|
46
|
+
source: "MagicCommandTrigger"
|
|
47
|
+
});
|
|
48
|
+
const elRef = useTemplateRef("el");
|
|
49
|
+
const instanceId = inject(MagicCommandInstanceId, void 0);
|
|
50
|
+
const itemActive = inject(MagicCommandItemActive, void 0);
|
|
51
|
+
const itemDisabled = inject(MagicCommandItemDisabled, void 0);
|
|
52
|
+
const injectedViewId = inject(MagicCommandViewId, void 0);
|
|
53
|
+
const mappedViewId = computed(() => viewId ?? injectedViewId);
|
|
54
|
+
magicError.assert(instanceId, {
|
|
55
|
+
message: "MagicCommandTrigger must be nested inside MagicCommandProvider",
|
|
56
|
+
errorCode: "missing_instance_id"
|
|
57
|
+
});
|
|
58
|
+
magicError.assert(mappedViewId.value, {
|
|
59
|
+
message: "MagicCommandTrigger must be nested inside MagicCommandView or a viewId must be provided",
|
|
60
|
+
errorCode: "missing_view_id"
|
|
61
|
+
});
|
|
62
|
+
const { getView } = useCommandView(instanceId);
|
|
63
|
+
const view = getView(mappedViewId.value);
|
|
64
|
+
const mappedActive = computed(() => toValue(itemActive) ?? false);
|
|
65
|
+
const mappedDisabled = computed(
|
|
66
|
+
() => disabled ?? toValue(itemDisabled) ?? false
|
|
67
|
+
);
|
|
68
|
+
const options = inject(MagicCommandProviderOptions, void 0);
|
|
69
|
+
const { onMouseenter, onClick, onKeypress } = useCommandTrigger({
|
|
70
|
+
instanceId,
|
|
71
|
+
viewId: mappedViewId.value,
|
|
72
|
+
mappedActive,
|
|
73
|
+
mappedDisabled,
|
|
74
|
+
trigger,
|
|
75
|
+
action,
|
|
76
|
+
elRef
|
|
77
|
+
});
|
|
78
|
+
watch(
|
|
79
|
+
() => view?.active,
|
|
80
|
+
async (value) => {
|
|
81
|
+
if (value) {
|
|
82
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
83
|
+
toValue(elRef)?.$el?.blur();
|
|
37
84
|
}
|
|
38
|
-
|
|
39
|
-
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
const keys = useMagicKeys();
|
|
88
|
+
const { logWarning } = magicError;
|
|
89
|
+
if (options?.keyListener?.enter) {
|
|
90
|
+
for (const key of options.keyListener.enter) {
|
|
91
|
+
const mappedKey = keys[key];
|
|
92
|
+
if (!mappedKey) {
|
|
93
|
+
logWarning(`The key \u201C${key}\u201D is not supported by MagicCommand`);
|
|
94
|
+
continue;
|
|
40
95
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const mappedDisabled = computed(
|
|
45
|
-
() => __props.disabled ?? toValue(itemDisabled) ?? false
|
|
46
|
-
);
|
|
47
|
-
const options = inject(MagicCommandProviderOptions, void 0);
|
|
48
|
-
const { onMouseenter, onClick, onEnter } = useCommandTrigger({
|
|
49
|
-
instanceId,
|
|
50
|
-
viewId: mappedViewId.value,
|
|
51
|
-
mappedActive,
|
|
52
|
-
mappedDisabled,
|
|
53
|
-
trigger: __props.trigger,
|
|
54
|
-
action: __props.action,
|
|
55
|
-
elRef
|
|
56
|
-
});
|
|
57
|
-
watch(
|
|
58
|
-
() => view?.active,
|
|
59
|
-
async (value) => {
|
|
60
|
-
if (value) {
|
|
61
|
-
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
62
|
-
toValue(elRef)?.$el?.blur();
|
|
63
|
-
}
|
|
96
|
+
watch(mappedKey, (value) => {
|
|
97
|
+
if (value) {
|
|
98
|
+
onKeypress();
|
|
64
99
|
}
|
|
65
|
-
);
|
|
66
|
-
const keys = useMagicKeys();
|
|
67
|
-
if (options?.keyListener?.enter) {
|
|
68
|
-
for (const key of options.keyListener.enter) {
|
|
69
|
-
watch(keys[key], (value) => {
|
|
70
|
-
if (value) {
|
|
71
|
-
onEnter();
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return (_ctx, _cache) => {
|
|
77
|
-
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
78
|
-
ref_key: "elRef",
|
|
79
|
-
ref: elRef,
|
|
80
|
-
"data-id": `${mappedViewId.value}-trigger`,
|
|
81
|
-
"data-active": mappedActive.value,
|
|
82
|
-
"data-disabled": mappedDisabled.value,
|
|
83
|
-
"as-child": _ctx.asChild,
|
|
84
|
-
class: "magic-command-trigger",
|
|
85
|
-
onClick: _unref(onClick),
|
|
86
|
-
onMouseenter: _unref(onMouseenter)
|
|
87
|
-
}, {
|
|
88
|
-
default: _withCtx(() => [
|
|
89
|
-
_renderSlot(_ctx.$slots, "default", {
|
|
90
|
-
viewActive: _unref(view)?.active,
|
|
91
|
-
triggerDisabled: mappedDisabled.value
|
|
92
|
-
})
|
|
93
|
-
]),
|
|
94
|
-
_: 3
|
|
95
|
-
/* FORWARDED */
|
|
96
|
-
}, 8, ["data-id", "data-active", "data-disabled", "as-child", "onClick", "onMouseenter"]);
|
|
97
|
-
};
|
|
100
|
+
});
|
|
98
101
|
}
|
|
99
|
-
}
|
|
102
|
+
}
|
|
100
103
|
</script>
|
|
101
104
|
|
|
102
105
|
<style>
|
|
@@ -104,7 +107,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
104
107
|
cursor: var(--magic-command-trigger-cursor, pointer);
|
|
105
108
|
}
|
|
106
109
|
|
|
107
|
-
.magic-menu-trigger
|
|
110
|
+
.magic-menu-trigger[data-disabled='true'] {
|
|
108
111
|
pointer-events: none;
|
|
109
112
|
}
|
|
110
113
|
</style>
|
|
@@ -1,74 +1,23 @@
|
|
|
1
1
|
import type { Interaction, Action } from '../types/index.js';
|
|
2
2
|
interface MagicCommandTriggerProps {
|
|
3
3
|
viewId?: string;
|
|
4
|
-
active?: boolean;
|
|
5
4
|
disabled?: boolean;
|
|
6
5
|
action?: Action;
|
|
7
6
|
trigger?: Interaction[];
|
|
8
7
|
asChild?: boolean;
|
|
9
8
|
}
|
|
10
|
-
declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
default?(_: {
|
|
14
|
-
viewActive: boolean | undefined;
|
|
15
|
-
triggerDisabled: boolean;
|
|
16
|
-
}): any;
|
|
17
|
-
};
|
|
18
|
-
refs: {
|
|
19
|
-
elRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
-
asChild: {
|
|
21
|
-
type: BooleanConstructor;
|
|
22
|
-
default: boolean;
|
|
23
|
-
};
|
|
24
|
-
as: {
|
|
25
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
26
|
-
default: string;
|
|
27
|
-
};
|
|
28
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
31
|
-
asChild: boolean;
|
|
32
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
33
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
34
|
-
P: {};
|
|
35
|
-
B: {};
|
|
36
|
-
D: {};
|
|
37
|
-
C: {};
|
|
38
|
-
M: {};
|
|
39
|
-
Defaults: {};
|
|
40
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
-
asChild: {
|
|
42
|
-
type: BooleanConstructor;
|
|
43
|
-
default: boolean;
|
|
44
|
-
};
|
|
45
|
-
as: {
|
|
46
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
47
|
-
default: string;
|
|
48
|
-
};
|
|
49
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
50
|
-
[key: string]: any;
|
|
51
|
-
}>, {}, {}, {}, {
|
|
52
|
-
asChild: boolean;
|
|
53
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
54
|
-
}> | null;
|
|
55
|
-
};
|
|
56
|
-
rootEl: any;
|
|
9
|
+
declare var __VLS_12: {
|
|
10
|
+
viewActive: boolean | undefined;
|
|
11
|
+
triggerDisabled: boolean;
|
|
57
12
|
};
|
|
58
|
-
type
|
|
59
|
-
|
|
60
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
61
|
-
export default _default;
|
|
62
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
63
|
-
type __VLS_TypePropsToOption<T> = {
|
|
64
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
65
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
66
|
-
} : {
|
|
67
|
-
type: import('vue').PropType<T[K]>;
|
|
68
|
-
required: true;
|
|
69
|
-
};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_12) => any;
|
|
70
15
|
};
|
|
71
|
-
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
72
21
|
new (): {
|
|
73
22
|
$slots: S;
|
|
74
23
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface MagicCommandViewProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
initial?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare var __VLS_1: {
|
|
6
|
+
viewActive: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_1) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div :data-id="mappedId" class="magic-menu-view">
|
|
3
|
+
<slot :view-active="view.active" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
5
8
|
import { computed, inject, onBeforeUnmount, provide, useId, watch } from "vue";
|
|
9
|
+
import {
|
|
10
|
+
useMagicError
|
|
11
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
6
12
|
import { useCommandView } from "../composables/private/useCommandView";
|
|
7
13
|
import {
|
|
8
14
|
MagicCommandInstanceId,
|
|
@@ -11,50 +17,40 @@ import {
|
|
|
11
17
|
MagicCommandItemId,
|
|
12
18
|
MagicCommandViewActive
|
|
13
19
|
} from "../symbols";
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
);
|
|
45
|
-
onBeforeUnmount(() => {
|
|
46
|
-
deleteView(mappedId.value);
|
|
47
|
-
});
|
|
48
|
-
return (_ctx, _cache) => {
|
|
49
|
-
return _openBlock(), _createElementBlock("div", {
|
|
50
|
-
id: mappedId.value,
|
|
51
|
-
class: "magic-menu-view"
|
|
52
|
-
}, [
|
|
53
|
-
_renderSlot(_ctx.$slots, "default", {
|
|
54
|
-
viewActive: _unref(view).active
|
|
55
|
-
})
|
|
56
|
-
], 8, _hoisted_1);
|
|
57
|
-
};
|
|
20
|
+
const { id, initial = false } = defineProps({
|
|
21
|
+
id: { type: String, required: false },
|
|
22
|
+
initial: { type: Boolean, required: false }
|
|
23
|
+
});
|
|
24
|
+
const magicError = useMagicError({
|
|
25
|
+
prefix: "MagicCommand",
|
|
26
|
+
source: "MagicCommandView"
|
|
27
|
+
});
|
|
28
|
+
const parentTree = inject(MagicCommandParentTree, []);
|
|
29
|
+
const instanceId = inject(MagicCommandInstanceId, void 0);
|
|
30
|
+
const itemId = inject(MagicCommandItemId, void 0);
|
|
31
|
+
magicError.assert(instanceId, {
|
|
32
|
+
message: "MagicCommandView must be nested inside MagicCommandProvider",
|
|
33
|
+
errorCode: "missing_instance_id"
|
|
34
|
+
});
|
|
35
|
+
const mappedId = computed(() => id ?? `magic-command-view-${useId()}`);
|
|
36
|
+
const mappedParentTree = computed(() => [...parentTree, mappedId.value]);
|
|
37
|
+
const mappedActive = computed(() => view.active);
|
|
38
|
+
const { initializeView, deleteView, sortViewItems } = useCommandView(instanceId);
|
|
39
|
+
const view = initializeView({
|
|
40
|
+
id: mappedId.value,
|
|
41
|
+
parent: { views: parentTree, item: itemId ?? "" },
|
|
42
|
+
initial
|
|
43
|
+
});
|
|
44
|
+
provide(MagicCommandViewId, mappedId.value);
|
|
45
|
+
provide(MagicCommandViewActive, mappedActive);
|
|
46
|
+
provide(MagicCommandParentTree, mappedParentTree.value);
|
|
47
|
+
watch(
|
|
48
|
+
() => view?.items,
|
|
49
|
+
() => {
|
|
50
|
+
sortViewItems(mappedId.value);
|
|
58
51
|
}
|
|
52
|
+
);
|
|
53
|
+
onBeforeUnmount(() => {
|
|
54
|
+
deleteView(mappedId.value);
|
|
59
55
|
});
|
|
60
56
|
</script>
|
|
@@ -2,30 +2,17 @@ interface MagicCommandViewProps {
|
|
|
2
2
|
id?: string;
|
|
3
3
|
initial?: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
slots: {
|
|
8
|
-
default?(_: {
|
|
9
|
-
viewActive: boolean;
|
|
10
|
-
}): any;
|
|
11
|
-
};
|
|
12
|
-
refs: {};
|
|
13
|
-
rootEl: HTMLDivElement;
|
|
5
|
+
declare var __VLS_1: {
|
|
6
|
+
viewActive: boolean;
|
|
14
7
|
};
|
|
15
|
-
type
|
|
16
|
-
|
|
17
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
-
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToOption<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_1) => any;
|
|
27
10
|
};
|
|
28
|
-
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<MagicCommandViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
16
|
new (): {
|
|
30
17
|
$slots: S;
|
|
31
18
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toValue } from "vue";
|
|
2
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
2
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
3
3
|
export function useCommandCallback(args) {
|
|
4
4
|
const { instanceId, viewId } = args;
|
|
5
5
|
const emitter = useMagicEmitter();
|