@maas/vue-equipment 0.40.0 → 1.0.0-beta.10
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 +6 -16
- package/dist/composables/index.d.ts +7 -18
- package/dist/composables/index.js +79 -132
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +35 -42
- package/dist/plugins/.turbo/turbo-build.log +0 -0
- package/dist/plugins/.turbo/turbo-lint.log +5 -0
- package/dist/plugins/.turbo/turbo-release.log +7 -0
- package/dist/plugins/MagicAccordion/demo/data/footer.json +117 -0
- package/dist/plugins/MagicAccordion/index.d.ts +2 -0
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +103 -70
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +39 -13
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +36 -30
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +12 -12
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +73 -71
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +24 -55
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +52 -50
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +18 -14
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionCallback.d.ts +6 -6
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionCallback.mjs +6 -6
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionState.mjs +10 -10
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.mjs +11 -10
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/types/index.d.ts +4 -0
- package/dist/plugins/MagicAccordion/src/utils/defaultOptions.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/utils/defaultOptions.mjs +7 -2
- package/dist/plugins/MagicCommand/demo/data/about.json +3 -0
- package/dist/plugins/MagicCommand/demo/data/search.json +594 -0
- package/dist/plugins/MagicCommand/index.d.ts +2 -0
- package/dist/plugins/MagicCommand/index.mjs +9 -11
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +199 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +32 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +60 -53
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +14 -14
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +105 -80
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +32 -22
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +55 -53
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +12 -12
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +92 -62
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +15 -16
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +63 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +2 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +111 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +40 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +56 -73
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +16 -16
- package/dist/plugins/MagicCommand/src/composables/private/useCommandCallback.d.ts +14 -0
- package/dist/plugins/MagicCommand/src/composables/private/useCommandCallback.mjs +32 -0
- package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.d.ts +15 -6
- package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.mjs +77 -44
- package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.d.ts +24 -6
- package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.mjs +45 -28
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.d.ts +7 -0
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +49 -0
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +18 -0
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.mjs +76 -0
- package/dist/plugins/MagicCommand/src/composables/private/useCommandView.d.ts +21 -5
- package/dist/plugins/MagicCommand/src/composables/private/useCommandView.mjs +193 -18
- package/dist/plugins/MagicCommand/src/composables/useMagicCommand.d.ts +14 -5
- package/dist/plugins/MagicCommand/src/composables/useMagicCommand.mjs +43 -13
- package/dist/plugins/MagicCommand/src/symbols/index.d.ts +9 -2
- package/dist/plugins/MagicCommand/src/symbols/index.mjs +18 -1
- package/dist/plugins/MagicCommand/src/types/index.d.ts +73 -13
- package/dist/plugins/MagicCommand/src/utils/defaultOptions.d.ts +3 -5
- package/dist/plugins/MagicCommand/src/utils/defaultOptions.mjs +8 -3
- package/dist/plugins/MagicCookie/index.d.ts +5 -3
- package/dist/plugins/MagicCookie/index.mjs +7 -3
- package/dist/plugins/MagicCookie/nuxt.mjs +5 -9
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +56 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +24 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +43 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +20 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +96 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +30 -0
- package/dist/plugins/MagicCookie/src/composables/private/useCookieCallback.d.ts +9 -0
- package/dist/plugins/MagicCookie/src/composables/private/useCookieCallback.mjs +31 -0
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.d.ts +16 -0
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +87 -0
- package/dist/plugins/MagicCookie/src/composables/private/useCookieState.d.ts +7 -0
- package/dist/plugins/MagicCookie/src/composables/private/useCookieState.mjs +43 -0
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.d.ts +15 -15
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.mjs +59 -60
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +5 -0
- package/dist/plugins/MagicCookie/src/symbols/index.mjs +4 -0
- package/dist/plugins/MagicCookie/src/types/index.d.ts +31 -13
- package/dist/plugins/MagicCookie/src/utils/defaultOptions.d.ts +4 -0
- package/dist/plugins/MagicCookie/src/utils/defaultOptions.mjs +10 -0
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +136 -97
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +95 -18
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +8 -8
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +12 -6
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +9 -8
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +46 -8
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.d.ts +2 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +10 -10
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +11 -6
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.d.ts +3 -8
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +6 -6
- package/dist/plugins/MagicDrawer/nuxt.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +501 -337
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +166 -19
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerCallback.d.ts +6 -6
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerCallback.mjs +6 -6
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +34 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +9 -11
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +29 -19
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +3 -4
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.mjs +28 -10
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +4 -4
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.mjs +4 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +8 -9
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +45 -26
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.mjs +8 -8
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +23 -19
- package/dist/plugins/MagicDrawer/src/composables/useMagicDrawer.mjs +4 -3
- package/dist/plugins/MagicDrawer/src/types/index.d.ts +10 -3
- package/dist/plugins/MagicDrawer/src/utils/defaultOptions.d.ts +3 -11
- package/dist/plugins/MagicDrawer/src/utils/defaultOptions.mjs +1 -3
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +190 -46
- package/dist/plugins/MagicEmitter/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicMarquee/index.d.ts +4 -2
- package/dist/plugins/MagicMarquee/index.mjs +2 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +121 -50
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +18 -25
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +4 -8
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +57 -43
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeState.d.ts +7 -0
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeState.mjs +42 -0
- package/dist/plugins/MagicMarquee/src/composables/useMagicMarquee.d.ts +11 -0
- package/dist/plugins/MagicMarquee/src/composables/useMagicMarquee.mjs +45 -0
- package/dist/plugins/MagicMarquee/src/types/index.d.ts +9 -0
- package/dist/plugins/MagicMarquee/src/types/index.mjs +0 -0
- package/dist/plugins/MagicMarquee/src/utils/defaultOptions.d.ts +4 -0
- package/dist/plugins/MagicMarquee/src/utils/defaultOptions.mjs +5 -0
- package/dist/plugins/MagicMenu/index.d.ts +2 -0
- package/dist/plugins/MagicMenu/nuxt.mjs +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +78 -69
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +17 -11
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +245 -216
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +42 -14
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +234 -212
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +42 -17
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +115 -124
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +28 -16
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +105 -96
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +14 -15
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +88 -87
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +19 -14
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +121 -112
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +27 -51
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +67 -70
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +15 -11
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.d.ts +6 -6
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +9 -9
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +44 -25
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +16 -10
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +35 -15
- package/dist/plugins/MagicMenu/src/composables/private/useMenuItem.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuItem.mjs +20 -14
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +20 -13
- package/dist/plugins/MagicMenu/src/composables/private/useMenuState.mjs +10 -10
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +6 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +111 -75
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicMenu/src/types/index.d.ts +1 -2
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.mjs +2 -2
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +266 -166
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +45 -17
- package/dist/plugins/MagicModal/src/composables/private/useModalCallback.d.ts +6 -6
- package/dist/plugins/MagicModal/src/composables/private/useModalCallback.mjs +6 -6
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
- package/dist/plugins/MagicModal/src/composables/private/useModalStore.mjs +1 -1
- package/dist/plugins/MagicModal/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicModal/src/utils/defaultOptions.mjs +2 -2
- package/dist/plugins/MagicNoise/index.d.ts +3 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +120 -63
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +2 -4
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +4 -4
- package/dist/plugins/MagicPie/index.d.ts +7 -0
- package/dist/plugins/MagicPie/index.mjs +8 -0
- package/dist/plugins/MagicPie/nuxt.mjs +23 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +202 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +7 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.d.ts +6 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +33 -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/index.d.ts +4 -9
- package/dist/plugins/MagicPlayer/index.mjs +11 -17
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +84 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +2 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +128 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +34 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +45 -41
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +2 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +127 -114
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +4 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +111 -58
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +30 -18
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +42 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +14 -15
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +82 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +34 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +111 -65
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +93 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +2 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +221 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +73 -0
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenEnter.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenExit.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Pause.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Play.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOff.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOn.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Waiting.vue +23 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Waiting.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +8 -9
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +10 -10
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +33 -31
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +13 -13
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +31 -24
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +5 -5
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +7 -7
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +6 -6
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +10 -12
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +22 -26
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +5 -5
- package/dist/plugins/MagicPlayer/src/css/magic-player-audio-controls.css +95 -0
- package/dist/plugins/MagicPlayer/src/css/magic-player-display-time.css +10 -0
- package/dist/plugins/MagicPlayer/src/css/magic-player-timeline.css +89 -0
- package/dist/plugins/MagicPlayer/src/css/magic-player-video-controls.css +115 -0
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +5 -0
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +3 -0
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +11 -1
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.d.ts +3 -0
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.mjs +12 -0
- package/dist/plugins/MagicScroll/index.d.ts +4 -10
- package/dist/plugins/MagicScroll/index.mjs +2 -11
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +76 -31
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +13 -17
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +78 -64
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +13 -20
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +39 -39
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +48 -34
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +84 -73
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +16 -21
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +13 -0
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +130 -0
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +3 -3
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +19 -7
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/symbols/index.mjs +2 -2
- package/dist/plugins/MagicScroll/src/types/index.d.ts +12 -22
- package/dist/plugins/MagicToast/index.d.ts +3 -2
- package/dist/plugins/MagicToast/index.mjs +3 -3
- package/dist/plugins/MagicToast/nuxt.mjs +2 -2
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +290 -0
- package/dist/plugins/MagicToast/src/components/{MagicToast.vue.d.ts → MagicToastProvider.vue.d.ts} +4 -4
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +152 -0
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +34 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +8 -31
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +33 -28
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.d.ts +12 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +312 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastListener.d.ts +6 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastListener.mjs +25 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.d.ts +6 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +59 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastState.d.ts +7 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastState.mjs +45 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastView.d.ts +12 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastView.mjs +51 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.d.ts +14 -8
- package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +34 -23
- package/dist/plugins/MagicToast/src/types/index.d.ts +58 -17
- package/dist/plugins/MagicToast/src/utils/defaultOptions.d.ts +2 -3
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +21 -4
- package/dist/plugins/MagicToast/symbols/index.d.ts +3 -0
- package/dist/plugins/MagicToast/symbols/index.mjs +2 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.mjs +1 -1
- package/dist/utils/css/animations/auto-size-out.css +12 -0
- package/dist/utils/css/animations/squash-y.css +5 -0
- package/dist/utils/css/animations.css +2 -1
- package/dist/utils/index.d.ts +10 -6
- package/dist/utils/index.js +41 -56
- package/dist/utils/index.js.map +1 -1
- package/package.json +62 -58
- package/dist/composables/index.d.mts +0 -108
- package/dist/composables/index.mjs +0 -383
- package/dist/composables/index.mjs.map +0 -1
- package/dist/plugins/MagicAutoSize/index.d.ts +0 -4
- package/dist/plugins/MagicAutoSize/index.mjs +0 -7
- package/dist/plugins/MagicAutoSize/nuxt.mjs +0 -14
- package/dist/plugins/MagicAutoSize/src/components/MagicAutoSize.vue +0 -152
- package/dist/plugins/MagicAutoSize/src/components/MagicAutoSize.vue.d.ts +0 -29
- package/dist/plugins/MagicCommand/src/components/MagicCommandBody.vue +0 -91
- package/dist/plugins/MagicCommand/src/components/MagicCommandBody.vue.d.ts +0 -19
- package/dist/plugins/MagicCommand/src/components/MagicCommandFooter.vue +0 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandFooter.vue.d.ts +0 -17
- package/dist/plugins/MagicCommand/src/components/MagicCommandGroup.vue +0 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandGroup.vue.d.ts +0 -17
- package/dist/plugins/MagicCommand/src/components/MagicCommandHead.vue +0 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandHead.vue.d.ts +0 -17
- package/dist/plugins/MagicCommand/src/composables/private/useCommandStore.d.ts +0 -35
- package/dist/plugins/MagicCommand/src/composables/private/useCommandStore.mjs +0 -67
- package/dist/plugins/MagicCookie/src/components/MagicCookie.vue +0 -117
- package/dist/plugins/MagicCookie/src/components/MagicCookie.vue.d.ts +0 -27
- package/dist/plugins/MagicCookie/src/composables/private/useCookieApi.d.ts +0 -29
- package/dist/plugins/MagicCookie/src/composables/private/useCookieApi.mjs +0 -22
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayer.vue +0 -89
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayer.vue.d.ts +0 -28
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayerControls.vue +0 -95
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayerControls.vue.d.ts +0 -24
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue +0 -125
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue.d.ts +0 -35
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue +0 -152
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue.d.ts +0 -38
- package/dist/plugins/MagicScroll/src/components/MagicScrollTransform.vue +0 -42
- package/dist/plugins/MagicScroll/src/components/MagicScrollTransform.vue.d.ts +0 -36
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetect.d.ts +0 -56
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetect.mjs +0 -140
- package/dist/plugins/MagicToast/src/components/MagicToast.vue +0 -141
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue +0 -64
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue.d.ts +0 -30
- package/dist/plugins/MagicToast/src/composables/private/useToastApi.d.ts +0 -5
- package/dist/plugins/MagicToast/src/composables/private/useToastApi.mjs +0 -22
- package/dist/plugins/MagicToast/src/composables/private/useToastInternalApi.d.ts +0 -4
- package/dist/plugins/MagicToast/src/composables/private/useToastInternalApi.mjs +0 -28
- package/dist/plugins/MagicToast/src/composables/private/useToastStore.d.ts +0 -27
- package/dist/plugins/MagicToast/src/composables/private/useToastStore.mjs +0 -41
- package/dist/utils/index.d.mts +0 -80
- package/dist/utils/index.mjs +0 -200
- package/dist/utils/index.mjs.map +0 -1
- /package/dist/plugins/{MagicAutoSize → MagicPie}/nuxt.d.ts +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { type MaybeRef } from 'vue';
|
|
2
|
-
import
|
|
2
|
+
import { Primitive } from '@maas/vue-primitive';
|
|
3
|
+
import type { MagicAccordionOptions } from '../types/index.js';
|
|
3
4
|
interface MagicAccordionProviderProps {
|
|
4
5
|
id: MaybeRef<string>;
|
|
5
6
|
asChild?: boolean;
|
|
6
7
|
options?: MagicAccordionOptions;
|
|
7
8
|
}
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_6: {};
|
|
11
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
12
|
+
default?: (props: typeof __VLS_6) => any;
|
|
13
|
+
}>;
|
|
14
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicAccordionProviderProps, {
|
|
15
|
+
Primitive: typeof Primitive;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const __VLS_component: import("vue").DefineComponent<MagicAccordionProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
-
declare const _default:
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
19
|
export default _default;
|
|
20
|
-
type
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
21
|
new (): {
|
|
22
22
|
$slots: S;
|
|
23
23
|
};
|
|
@@ -1,75 +1,77 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
const
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { unref as _unref, renderSlot as _renderSlot, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
4
|
+
import { useTemplateRef, inject, computed, toValue } from "vue";
|
|
5
|
+
import { Primitive } from "@maas/vue-primitive";
|
|
6
|
+
import { onKeyStroke } from "@vueuse/core";
|
|
7
|
+
import { useAccordionTrigger } from "../composables/private/useAccordionTrigger";
|
|
8
|
+
import { useAccordionState } from "../composables/private/useAccordionState";
|
|
9
|
+
import { useAccordionView } from "../composables/private/useAccordionView";
|
|
10
|
+
import { MagicAccordionInstanceId, MagicAccordionViewId } from "../symbols";
|
|
11
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
12
|
+
__name: "MagicAccordionTrigger",
|
|
13
|
+
props: {
|
|
14
|
+
viewId: { type: String, required: false },
|
|
15
|
+
disabled: { type: null, required: false, default: false },
|
|
16
|
+
trigger: { type: String, required: false, default: "click" },
|
|
17
|
+
asChild: { type: Boolean, required: false, default: false }
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const elRef = useTemplateRef("el");
|
|
21
|
+
const instanceId = inject(MagicAccordionInstanceId, void 0);
|
|
22
|
+
const injectedViewId = inject(MagicAccordionViewId, void 0);
|
|
23
|
+
const mappedViewId = computed(() => __props.viewId ?? injectedViewId);
|
|
24
|
+
if (!instanceId) {
|
|
25
|
+
throw new Error(
|
|
26
|
+
"MagicAccordionTrigger must be nested inside MagicAccordionProvider"
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
if (!mappedViewId.value) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
"MagicAccordionTrigger must be nested inside MagicAccordionView or a viewId must be provided"
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const { initializeState } = useAccordionState(instanceId);
|
|
35
|
+
const state = initializeState();
|
|
36
|
+
const { getView } = useAccordionView(instanceId);
|
|
37
|
+
const view = getView(mappedViewId.value);
|
|
38
|
+
const mappedDisabled = computed(
|
|
39
|
+
() => toValue(__props.disabled) || state.options.disabled
|
|
40
|
+
);
|
|
41
|
+
const { onMouseenter, onClick, onEnter } = useAccordionTrigger({
|
|
42
|
+
elRef,
|
|
43
|
+
instanceId,
|
|
44
|
+
viewId: mappedViewId.value,
|
|
45
|
+
disabled: __props.disabled,
|
|
46
|
+
trigger: __props.trigger
|
|
47
|
+
});
|
|
48
|
+
onKeyStroke("Enter", onEnter);
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
51
|
+
ref: "el",
|
|
52
|
+
"as-child": _ctx.asChild,
|
|
53
|
+
"data-id": `${mappedViewId.value}-trigger`,
|
|
54
|
+
"data-disabled": mappedDisabled.value,
|
|
55
|
+
as: "button",
|
|
56
|
+
class: "magic-accordion-trigger",
|
|
57
|
+
onMouseenter: _unref(onMouseenter),
|
|
58
|
+
onClick: _unref(onClick)
|
|
59
|
+
}, {
|
|
60
|
+
default: _withCtx(() => [
|
|
61
|
+
_renderSlot(_ctx.$slots, "default", {
|
|
62
|
+
viewActive: _unref(view)?.active
|
|
63
|
+
})
|
|
64
|
+
]),
|
|
65
|
+
_: 3
|
|
66
|
+
/* FORWARDED */
|
|
67
|
+
}, 8, ["as-child", "data-id", "data-disabled", "onMouseenter", "onClick"]);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
73
|
<style>
|
|
74
|
-
.magic-accordion-trigger
|
|
74
|
+
.magic-accordion-trigger[data-disabled='true'] {
|
|
75
|
+
cursor: var(--magic-accordion-trigger-cursor-disabled, not-allowed);
|
|
76
|
+
}
|
|
75
77
|
</style>
|
|
@@ -1,66 +1,35 @@
|
|
|
1
1
|
import { type MaybeRef } from 'vue';
|
|
2
|
-
import
|
|
2
|
+
import { Primitive } from '@maas/vue-primitive';
|
|
3
|
+
import type { Interaction } from '../types/index.js';
|
|
3
4
|
interface MagicAccordionTriggerProps {
|
|
5
|
+
viewId?: string;
|
|
4
6
|
disabled?: MaybeRef<boolean>;
|
|
5
7
|
trigger?: Interaction;
|
|
6
8
|
asChild?: boolean;
|
|
7
9
|
}
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
refs: {
|
|
16
|
-
elRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
-
asChild: {
|
|
18
|
-
type: BooleanConstructor;
|
|
19
|
-
default: boolean;
|
|
20
|
-
};
|
|
21
|
-
as: {
|
|
22
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
23
|
-
default: string;
|
|
24
|
-
};
|
|
25
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
28
|
-
asChild: boolean;
|
|
29
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
30
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
31
|
-
P: {};
|
|
32
|
-
B: {};
|
|
33
|
-
D: {};
|
|
34
|
-
C: {};
|
|
35
|
-
M: {};
|
|
36
|
-
Defaults: {};
|
|
37
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
-
asChild: {
|
|
39
|
-
type: BooleanConstructor;
|
|
40
|
-
default: boolean;
|
|
41
|
-
};
|
|
42
|
-
as: {
|
|
43
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
44
|
-
default: string;
|
|
45
|
-
};
|
|
46
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
-
[key: string]: any;
|
|
48
|
-
}>, {}, {}, {}, {
|
|
49
|
-
asChild: boolean;
|
|
50
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
51
|
-
}> | null;
|
|
52
|
-
};
|
|
53
|
-
rootEl: any;
|
|
10
|
+
declare const mappedViewId: import("vue").ComputedRef<string | undefined>;
|
|
11
|
+
declare const view: import("../types").AccordionView | undefined;
|
|
12
|
+
declare const mappedDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
13
|
+
declare const onMouseenter: () => void, onClick: () => void;
|
|
14
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
15
|
+
declare var __VLS_12: {
|
|
16
|
+
viewActive: boolean | undefined;
|
|
54
17
|
};
|
|
55
|
-
type
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
18
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
19
|
+
default?: (props: typeof __VLS_12) => any;
|
|
20
|
+
}>;
|
|
21
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicAccordionTriggerProps, {
|
|
22
|
+
Primitive: typeof Primitive;
|
|
23
|
+
mappedViewId: typeof mappedViewId;
|
|
24
|
+
view: typeof view;
|
|
25
|
+
mappedDisabled: typeof mappedDisabled;
|
|
26
|
+
onMouseenter: typeof onMouseenter;
|
|
27
|
+
onClick: typeof onClick;
|
|
28
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicAccordionTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
62
31
|
export default _default;
|
|
63
|
-
type
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
64
33
|
new (): {
|
|
65
34
|
$slots: S;
|
|
66
35
|
};
|
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<slot :is-active="view?.active" />
|
|
7
|
-
</primitive>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script lang="ts" setup>
|
|
11
|
-
import { computed, inject, onBeforeUnmount, provide, useId } from 'vue'
|
|
12
|
-
import { Primitive } from '@maas/vue-primitive'
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { unref as _unref, renderSlot as _renderSlot, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
4
|
+
import { computed, inject, onBeforeUnmount, provide, useId } from "vue";
|
|
5
|
+
import { Primitive } from "@maas/vue-primitive";
|
|
13
6
|
import {
|
|
14
7
|
MagicAccordionInstanceId,
|
|
15
8
|
MagicAccordionViewActive,
|
|
16
|
-
MagicAccordionViewId
|
|
17
|
-
} from
|
|
18
|
-
import { useAccordionView } from
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
9
|
+
MagicAccordionViewId
|
|
10
|
+
} from "../symbols";
|
|
11
|
+
import { useAccordionView } from "../composables/private/useAccordionView";
|
|
12
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
13
|
+
__name: "MagicAccordionView",
|
|
14
|
+
props: {
|
|
15
|
+
id: { type: String, required: false },
|
|
16
|
+
asChild: { type: Boolean, required: false },
|
|
17
|
+
active: { type: Boolean, required: false }
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const instanceId = inject(MagicAccordionInstanceId, void 0);
|
|
21
|
+
if (!instanceId) {
|
|
22
|
+
throw new Error(
|
|
23
|
+
"MagicAccordionView must be nested inside MagicAccordionProvider"
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
const mappedId = computed(() => __props.id ?? `magic-accordion-view-${useId()}`);
|
|
27
|
+
const mappedActive = computed(() => view.active);
|
|
28
|
+
const { initializeView, deleteView } = useAccordionView(instanceId);
|
|
29
|
+
const view = initializeView({
|
|
30
|
+
id: mappedId.value,
|
|
31
|
+
active: __props.active ?? false
|
|
32
|
+
});
|
|
33
|
+
provide(MagicAccordionViewId, mappedId.value);
|
|
34
|
+
provide(MagicAccordionViewActive, mappedActive);
|
|
35
|
+
onBeforeUnmount(() => {
|
|
36
|
+
deleteView(mappedId.value);
|
|
37
|
+
});
|
|
38
|
+
return (_ctx, _cache) => {
|
|
39
|
+
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
40
|
+
"as-child": _ctx.asChild,
|
|
41
|
+
"data-id": mappedId.value,
|
|
42
|
+
"data-active": _unref(view)?.active,
|
|
43
|
+
class: "magic-accordion-view"
|
|
44
|
+
}, {
|
|
45
|
+
default: _withCtx(() => [
|
|
46
|
+
_renderSlot(_ctx.$slots, "default", {
|
|
47
|
+
viewActive: _unref(view)?.active
|
|
48
|
+
})
|
|
49
|
+
]),
|
|
50
|
+
_: 3
|
|
51
|
+
/* FORWARDED */
|
|
52
|
+
}, 8, ["as-child", "data-id", "data-active"]);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
54
56
|
</script>
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
+
import { Primitive } from '@maas/vue-primitive';
|
|
1
2
|
interface MagicAccordionViewProps {
|
|
2
|
-
asChild?: boolean;
|
|
3
3
|
id?: string;
|
|
4
|
-
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
active?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {};
|
|
14
|
-
rootEl: any;
|
|
7
|
+
declare const mappedId: import("vue").ComputedRef<string>;
|
|
8
|
+
declare const view: import("../types").AccordionView;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_6: {
|
|
11
|
+
viewActive: boolean;
|
|
15
12
|
};
|
|
16
|
-
type
|
|
13
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
14
|
+
default?: (props: typeof __VLS_6) => any;
|
|
15
|
+
}>;
|
|
16
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicAccordionViewProps, {
|
|
17
|
+
Primitive: typeof Primitive;
|
|
18
|
+
mappedId: typeof mappedId;
|
|
19
|
+
view: typeof view;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
21
|
declare const __VLS_component: import("vue").DefineComponent<MagicAccordionViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
-
declare const _default:
|
|
22
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
23
|
export default _default;
|
|
20
|
-
type
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
25
|
new (): {
|
|
22
26
|
$slots: S;
|
|
23
27
|
};
|
|
@@ -4,11 +4,11 @@ type UseModalCallbackArgs = {
|
|
|
4
4
|
instanceId: MaybeRef<string>;
|
|
5
5
|
};
|
|
6
6
|
export declare function useAccordionCallback(args: UseModalCallbackArgs): {
|
|
7
|
-
onBeforeEnter: (
|
|
8
|
-
onEnter: (
|
|
9
|
-
onAfterEnter: (
|
|
10
|
-
onBeforeLeave: (
|
|
11
|
-
onLeave: (
|
|
12
|
-
onAfterLeave: (
|
|
7
|
+
onBeforeEnter: () => void;
|
|
8
|
+
onEnter: () => void;
|
|
9
|
+
onAfterEnter: () => Promise<void>;
|
|
10
|
+
onBeforeLeave: () => void;
|
|
11
|
+
onLeave: () => void;
|
|
12
|
+
onAfterLeave: () => void;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -3,22 +3,22 @@ import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
|
3
3
|
export function useAccordionCallback(args) {
|
|
4
4
|
const { viewId, instanceId } = args;
|
|
5
5
|
const emitter = useMagicEmitter();
|
|
6
|
-
function onBeforeEnter(
|
|
6
|
+
function onBeforeEnter() {
|
|
7
7
|
emitter.emit("beforeEnter", { id: toValue(instanceId), viewId });
|
|
8
8
|
}
|
|
9
|
-
function onEnter(
|
|
9
|
+
function onEnter() {
|
|
10
10
|
emitter.emit("enter", { id: toValue(instanceId), viewId });
|
|
11
11
|
}
|
|
12
|
-
async function onAfterEnter(
|
|
12
|
+
async function onAfterEnter() {
|
|
13
13
|
emitter.emit("afterEnter", { id: toValue(instanceId), viewId });
|
|
14
14
|
}
|
|
15
|
-
function onBeforeLeave(
|
|
15
|
+
function onBeforeLeave() {
|
|
16
16
|
emitter.emit("beforeLeave", { id: toValue(instanceId), viewId });
|
|
17
17
|
}
|
|
18
|
-
function onLeave(
|
|
18
|
+
function onLeave() {
|
|
19
19
|
emitter.emit("leave", { id: toValue(instanceId), viewId });
|
|
20
20
|
}
|
|
21
|
-
function onAfterLeave(
|
|
21
|
+
function onAfterLeave() {
|
|
22
22
|
emitter.emit("afterLeave", { id: toValue(instanceId), viewId });
|
|
23
23
|
}
|
|
24
24
|
return {
|
|
@@ -6,28 +6,28 @@ export function useAccordionState(instanceId) {
|
|
|
6
6
|
function createState(id) {
|
|
7
7
|
const state = {
|
|
8
8
|
id,
|
|
9
|
-
options: defaultOptions,
|
|
9
|
+
options: { ...defaultOptions },
|
|
10
10
|
views: []
|
|
11
11
|
};
|
|
12
12
|
return reactive(state);
|
|
13
13
|
}
|
|
14
14
|
function addState(id) {
|
|
15
|
-
const
|
|
16
|
-
accordionStateStore.value = [...accordionStateStore.value,
|
|
17
|
-
return
|
|
15
|
+
const state = createState(id);
|
|
16
|
+
accordionStateStore.value = [...accordionStateStore.value, state];
|
|
17
|
+
return state;
|
|
18
18
|
}
|
|
19
19
|
function initializeState(options) {
|
|
20
|
-
let
|
|
21
|
-
return
|
|
20
|
+
let state = accordionStateStore.value.find((entry) => {
|
|
21
|
+
return entry.id === toValue(instanceId);
|
|
22
22
|
});
|
|
23
|
-
if (!
|
|
24
|
-
|
|
23
|
+
if (!state) {
|
|
24
|
+
state = addState(toValue(instanceId));
|
|
25
25
|
}
|
|
26
26
|
if (options) {
|
|
27
27
|
const mappedOptions = defu(options, defaultOptions);
|
|
28
|
-
|
|
28
|
+
state.options = mappedOptions;
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return state;
|
|
31
31
|
}
|
|
32
32
|
function deleteState() {
|
|
33
33
|
accordionStateStore.value = accordionStateStore.value.filter(
|
|
@@ -6,7 +6,7 @@ interface UseAccordionTriggerArgs {
|
|
|
6
6
|
viewId: string;
|
|
7
7
|
trigger: Interaction;
|
|
8
8
|
disabled: MaybeRef<boolean>;
|
|
9
|
-
elRef: Ref<InstanceType<typeof Primitive> |
|
|
9
|
+
elRef: Ref<InstanceType<typeof Primitive> | null>;
|
|
10
10
|
}
|
|
11
11
|
export declare function useAccordionTrigger(args: UseAccordionTriggerArgs): {
|
|
12
12
|
onMouseenter: () => void;
|
|
@@ -18,10 +18,11 @@ export function useAccordionView(instanceId) {
|
|
|
18
18
|
}
|
|
19
19
|
function initializeView(args) {
|
|
20
20
|
const { id, active } = args;
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const view = getView(id) ?? addView(args);
|
|
22
|
+
if (active) {
|
|
23
|
+
selectView(id);
|
|
24
|
+
}
|
|
25
|
+
return view;
|
|
25
26
|
}
|
|
26
27
|
function deleteView(id) {
|
|
27
28
|
state.views = state.views?.filter((view) => view.id !== id);
|
|
@@ -30,18 +31,18 @@ export function useAccordionView(instanceId) {
|
|
|
30
31
|
return state.views?.find((view) => view.id === id);
|
|
31
32
|
}
|
|
32
33
|
function selectView(id) {
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
34
|
+
const view = getView(id);
|
|
35
|
+
if (view) {
|
|
35
36
|
if (state.options.mode === "single") {
|
|
36
37
|
unselectAllViews();
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
view.active = true;
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
function unselectView(id) {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
|
|
43
|
+
const view = getView(id);
|
|
44
|
+
if (view) {
|
|
45
|
+
view.active = false;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
function unselectAllViews() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InjectionKey, MaybeRef } from 'vue';
|
|
1
|
+
import type { InjectionKey, MaybeRef, Ref } from 'vue';
|
|
2
2
|
declare const MagicAccordionInstanceId: InjectionKey<MaybeRef<string>>;
|
|
3
3
|
declare const MagicAccordionViewId: InjectionKey<string>;
|
|
4
|
-
declare const MagicAccordionViewActive: InjectionKey<boolean
|
|
4
|
+
declare const MagicAccordionViewActive: InjectionKey<Ref<boolean>>;
|
|
5
5
|
export { MagicAccordionInstanceId, MagicAccordionViewId, MagicAccordionViewActive, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MagicAccordionOptions } from '../types/index.js';
|
|
2
|
-
import type
|
|
3
|
-
declare const defaultOptions:
|
|
2
|
+
import { type RequireAll } from '@maas/vue-equipment/utils';
|
|
3
|
+
declare const defaultOptions: RequireAll<MagicAccordionOptions>;
|
|
4
4
|
export { defaultOptions };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { easeOutQuad } from "@maas/vue-equipment/utils";
|
|
1
2
|
const defaultOptions = {
|
|
2
|
-
mode: "
|
|
3
|
+
mode: "single",
|
|
3
4
|
transition: "magic-accordion",
|
|
4
|
-
disabled: false
|
|
5
|
+
disabled: false,
|
|
6
|
+
animation: {
|
|
7
|
+
duration: 200,
|
|
8
|
+
easing: easeOutQuad
|
|
9
|
+
}
|
|
5
10
|
};
|
|
6
11
|
export { defaultOptions };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{
|
|
2
|
+
"about": "Magic as a Service™ is a creative engineering company founded by the experience design studio International Magic. Our mission is to innovate on digital products and services to equip others with the tools and capabilities we wish we had ourselves. By combining design, engineering and culture into one stream, we produce powerful and sustainable outcomes for our users and clients."
|
|
3
|
+
}
|