@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,152 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="magic-auto-size"
|
|
4
|
-
ref="elRef"
|
|
5
|
-
:style="{
|
|
6
|
-
'--magic-auto-size-width': mappedSize?.width,
|
|
7
|
-
'--magic-auto-size-height': mappedSize?.height,
|
|
8
|
-
}"
|
|
9
|
-
>
|
|
10
|
-
<slot />
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script lang="ts" setup>
|
|
15
|
-
import { ref, computed, onMounted } from 'vue'
|
|
16
|
-
import { useResizeObserver, useMutationObserver } from '@vueuse/core'
|
|
17
|
-
|
|
18
|
-
import '@maas/vue-equipment/utils/css/easings.css'
|
|
19
|
-
|
|
20
|
-
interface MagicAutoSizeProps {
|
|
21
|
-
width?: boolean
|
|
22
|
-
height?: boolean
|
|
23
|
-
immediate?: boolean
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const props = withDefaults(defineProps<MagicAutoSizeProps>(), {
|
|
27
|
-
width: true,
|
|
28
|
-
height: true,
|
|
29
|
-
immediate: false,
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const elRef = ref<HTMLElement | undefined>(undefined)
|
|
33
|
-
|
|
34
|
-
const size = ref<{ width: number; height: number }>()
|
|
35
|
-
const content = ref<HTMLElement | undefined>(undefined)
|
|
36
|
-
|
|
37
|
-
const mappedSize = computed(() => {
|
|
38
|
-
if (size.value) {
|
|
39
|
-
switch (true) {
|
|
40
|
-
case props.width && props.height:
|
|
41
|
-
return {
|
|
42
|
-
width: `${size.value.width}px`,
|
|
43
|
-
height: `${size.value.height}px`,
|
|
44
|
-
}
|
|
45
|
-
case props.width:
|
|
46
|
-
return {
|
|
47
|
-
width: `${size.value.width}px`,
|
|
48
|
-
}
|
|
49
|
-
case props.height:
|
|
50
|
-
return {
|
|
51
|
-
height: `${size.value.height}px`,
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
} else {
|
|
55
|
-
return undefined
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const padding = computed(() => {
|
|
60
|
-
if (elRef.value) {
|
|
61
|
-
const style = getComputedStyle(elRef.value, null)
|
|
62
|
-
const top = parseFloat(style.getPropertyValue('padding-top'))
|
|
63
|
-
const left = parseFloat(style.getPropertyValue('padding-left'))
|
|
64
|
-
const right = parseFloat(style.getPropertyValue('padding-right'))
|
|
65
|
-
const bottom = parseFloat(style.getPropertyValue('padding-bottom'))
|
|
66
|
-
return { x: right + left, y: top + bottom }
|
|
67
|
-
} else {
|
|
68
|
-
return { x: 0, y: 0 }
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
const child = computed(() => {
|
|
73
|
-
return Array.from(elRef.value?.childNodes ?? []).find(
|
|
74
|
-
(n) => n instanceof HTMLElement
|
|
75
|
-
)
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
useMutationObserver(
|
|
79
|
-
elRef,
|
|
80
|
-
(mutations) => {
|
|
81
|
-
const addedNode = mutations
|
|
82
|
-
.flatMap((m) => [...m.addedNodes])
|
|
83
|
-
.find((n) => n instanceof HTMLElement)
|
|
84
|
-
|
|
85
|
-
const addedComment = mutations
|
|
86
|
-
.flatMap((m) => [...m.addedNodes])
|
|
87
|
-
.find((n) => n instanceof Comment)
|
|
88
|
-
|
|
89
|
-
if (!!addedNode && addedNode instanceof HTMLElement) {
|
|
90
|
-
content.value = addedNode
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// If immediate is true, reset the size when a comment is added and no children are present
|
|
94
|
-
// Vue sets a placeholder comment for a v-if
|
|
95
|
-
if (props.immediate && !!addedComment && !child.value) {
|
|
96
|
-
content.value = undefined
|
|
97
|
-
size.value = {
|
|
98
|
-
width: 0,
|
|
99
|
-
height: 0,
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// If the node is removed, reset the size
|
|
104
|
-
if (!child.value) {
|
|
105
|
-
content.value = undefined
|
|
106
|
-
size.value = {
|
|
107
|
-
width: 0,
|
|
108
|
-
height: 0,
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
childList: true,
|
|
114
|
-
subtree: true,
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
useResizeObserver(content, () => {
|
|
119
|
-
if (content.value) {
|
|
120
|
-
size.value = {
|
|
121
|
-
width: content.value.offsetWidth + padding.value.x,
|
|
122
|
-
height: content.value.offsetHeight + padding.value.y,
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
onMounted(() => {
|
|
128
|
-
if (elRef.value) {
|
|
129
|
-
const elements = elRef.value.querySelectorAll('*')
|
|
130
|
-
const filtered = Array.from(elements).find(
|
|
131
|
-
(node) => node instanceof HTMLElement
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
if (!!filtered && filtered instanceof HTMLElement) {
|
|
135
|
-
content.value = filtered
|
|
136
|
-
size.value = {
|
|
137
|
-
width: filtered.offsetWidth + padding.value.x,
|
|
138
|
-
height: filtered.offsetHeight + padding.value.y,
|
|
139
|
-
}
|
|
140
|
-
} else {
|
|
141
|
-
size.value = {
|
|
142
|
-
width: 0,
|
|
143
|
-
height: 0,
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
})
|
|
148
|
-
</script>
|
|
149
|
-
|
|
150
|
-
<style>
|
|
151
|
-
.magic-auto-size{height:var(--magic-auto-size-height);transition:var(--magic-auto-size-transition,all .15s var(--ease-in-out));transition-delay:var(--magic-auto-size-transition-delay,0s);width:var(--magic-auto-size-width)}
|
|
152
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import '@maas/vue-equipment/utils/css/easings.css';
|
|
2
|
-
interface MagicAutoSizeProps {
|
|
3
|
-
width?: boolean;
|
|
4
|
-
height?: boolean;
|
|
5
|
-
immediate?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare function __VLS_template(): {
|
|
8
|
-
attrs: Partial<{}>;
|
|
9
|
-
slots: {
|
|
10
|
-
default?(_: {}): any;
|
|
11
|
-
};
|
|
12
|
-
refs: {
|
|
13
|
-
elRef: HTMLDivElement;
|
|
14
|
-
};
|
|
15
|
-
rootEl: HTMLDivElement;
|
|
16
|
-
};
|
|
17
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicAutoSizeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAutoSizeProps> & Readonly<{}>, {
|
|
19
|
-
immediate: boolean;
|
|
20
|
-
width: boolean;
|
|
21
|
-
height: boolean;
|
|
22
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
-
export default _default;
|
|
25
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
-
new (): {
|
|
27
|
-
$slots: S;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="magic-command-body" ref="elRef">
|
|
3
|
-
<slot />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
<script lang="ts" setup>
|
|
7
|
-
import { inject, ref, watch, nextTick } from 'vue'
|
|
8
|
-
import { useMagicKeys } from '@vueuse/core'
|
|
9
|
-
|
|
10
|
-
import { useCommandItem } from '../composables/private/useCommandItem'
|
|
11
|
-
import { useCommandScroll } from '../composables/private/useCommandScroll'
|
|
12
|
-
import { MagicCommandInstanceId, MagicCommandProviderOptions } from '../symbols'
|
|
13
|
-
|
|
14
|
-
import type { MagicCommandOptions } from '../types'
|
|
15
|
-
|
|
16
|
-
const elRef = ref<HTMLElement | undefined>(undefined)
|
|
17
|
-
|
|
18
|
-
const commandId = inject(MagicCommandInstanceId, '')
|
|
19
|
-
const options = inject(MagicCommandProviderOptions, {} as MagicCommandOptions)
|
|
20
|
-
|
|
21
|
-
const { activeItem, nextItem, prevItem } = useCommandItem(commandId)
|
|
22
|
-
const {
|
|
23
|
-
findElement,
|
|
24
|
-
isElementAbove,
|
|
25
|
-
isElementBelow,
|
|
26
|
-
scrollInFromBottom,
|
|
27
|
-
scrollInFromTop,
|
|
28
|
-
} = useCommandScroll(elRef)
|
|
29
|
-
|
|
30
|
-
const keys = useMagicKeys()
|
|
31
|
-
|
|
32
|
-
const nextTimeout = ref<ReturnType<typeof setTimeout> | undefined>(undefined)
|
|
33
|
-
const prevTimeout = ref<ReturnType<typeof setTimeout> | undefined>(undefined)
|
|
34
|
-
const nextInterval = ref<ReturnType<typeof setInterval> | undefined>(undefined)
|
|
35
|
-
const prevInterval = ref<ReturnType<typeof setInterval> | undefined>(undefined)
|
|
36
|
-
|
|
37
|
-
if (options.keys?.next) {
|
|
38
|
-
for (const key of options.keys.next) {
|
|
39
|
-
watch(keys[key], (value) => {
|
|
40
|
-
if (value) {
|
|
41
|
-
nextItem(options.loop)
|
|
42
|
-
nextTimeout.value = setTimeout(() => {
|
|
43
|
-
nextInterval.value = setInterval(() => {
|
|
44
|
-
nextItem(options.loop)
|
|
45
|
-
}, 100)
|
|
46
|
-
}, 500)
|
|
47
|
-
} else {
|
|
48
|
-
clearTimeout(nextTimeout.value)
|
|
49
|
-
clearInterval(nextInterval.value)
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (options.keys?.prev) {
|
|
56
|
-
for (const key of options.keys.prev) {
|
|
57
|
-
watch(keys[key], (value) => {
|
|
58
|
-
if (value) {
|
|
59
|
-
prevItem(options.loop)
|
|
60
|
-
prevTimeout.value = setTimeout(() => {
|
|
61
|
-
prevInterval.value = setInterval(() => {
|
|
62
|
-
prevItem(options.loop)
|
|
63
|
-
}, 100)
|
|
64
|
-
}, 500)
|
|
65
|
-
} else {
|
|
66
|
-
clearTimeout(prevTimeout.value)
|
|
67
|
-
clearInterval(prevInterval.value)
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
watch(activeItem, async (value) => {
|
|
74
|
-
if (!value) return
|
|
75
|
-
|
|
76
|
-
nextTick(() => {
|
|
77
|
-
const element = findElement(value)
|
|
78
|
-
if (element) {
|
|
79
|
-
if (isElementAbove(element)) {
|
|
80
|
-
scrollInFromTop(element)
|
|
81
|
-
} else if (isElementBelow(element)) {
|
|
82
|
-
scrollInFromBottom(element)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
})
|
|
86
|
-
})
|
|
87
|
-
</script>
|
|
88
|
-
|
|
89
|
-
<style>
|
|
90
|
-
.magic-command-body{height:var(--magic-command-body-height,100%);overflow-y:var(--magic-command-body-overflow-y,auto)}
|
|
91
|
-
</style>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {
|
|
7
|
-
elRef: HTMLDivElement;
|
|
8
|
-
};
|
|
9
|
-
rootEl: HTMLDivElement;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
13
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
14
|
-
export default _default;
|
|
15
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
16
|
-
new (): {
|
|
17
|
-
$slots: S;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: HTMLDivElement;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: HTMLDivElement;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: HTMLDivElement;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
type Item = {
|
|
2
|
-
index: number;
|
|
3
|
-
id: string;
|
|
4
|
-
};
|
|
5
|
-
type CommandInstance = {
|
|
6
|
-
id: string;
|
|
7
|
-
items: Item[];
|
|
8
|
-
views: string[];
|
|
9
|
-
};
|
|
10
|
-
export declare function useCommandStore(): {
|
|
11
|
-
commandStore: import("vue").Ref<{
|
|
12
|
-
id: string;
|
|
13
|
-
items: {
|
|
14
|
-
index: number;
|
|
15
|
-
id: string;
|
|
16
|
-
}[];
|
|
17
|
-
views: string[];
|
|
18
|
-
}[], CommandInstance[] | {
|
|
19
|
-
id: string;
|
|
20
|
-
items: {
|
|
21
|
-
index: number;
|
|
22
|
-
id: string;
|
|
23
|
-
}[];
|
|
24
|
-
views: string[];
|
|
25
|
-
}[]>;
|
|
26
|
-
addInstance: (id: string) => void;
|
|
27
|
-
findInstance: (id: string) => CommandInstance;
|
|
28
|
-
removeInstance: (id: string) => void;
|
|
29
|
-
addItem: (id: string, item: string) => void;
|
|
30
|
-
removeItem: (id: string, item: string) => void;
|
|
31
|
-
sortItems: (id: string, parent: HTMLElement) => void;
|
|
32
|
-
addView: (id: string, view: string) => void;
|
|
33
|
-
removeView: (id: string, view: string) => void;
|
|
34
|
-
};
|
|
35
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
2
|
-
let commandStore = ref([]);
|
|
3
|
-
export function useCommandStore() {
|
|
4
|
-
function addInstance(id) {
|
|
5
|
-
commandStore.value.push({ id, items: [], views: [] });
|
|
6
|
-
}
|
|
7
|
-
function findInstance(id) {
|
|
8
|
-
const instance = commandStore.value.find((instance2) => {
|
|
9
|
-
return instance2.id === id;
|
|
10
|
-
});
|
|
11
|
-
return instance;
|
|
12
|
-
}
|
|
13
|
-
function removeInstance(id) {
|
|
14
|
-
commandStore.value = commandStore.value.filter(
|
|
15
|
-
(x) => x.id !== id
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
function sortItems(id, parent) {
|
|
19
|
-
const instance = findInstance(id);
|
|
20
|
-
if (instance) {
|
|
21
|
-
const itemElements = parent.querySelectorAll("[data-id]");
|
|
22
|
-
itemElements.forEach((el, index) => {
|
|
23
|
-
const itemId = el.dataset.itemId;
|
|
24
|
-
const item = instance.items?.find((item2) => item2.id === itemId);
|
|
25
|
-
if (item) {
|
|
26
|
-
item.index = index;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
instance.items?.sort((a, b) => a.index - b.index);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function addItem(id, item) {
|
|
33
|
-
const instance = findInstance(id);
|
|
34
|
-
if (instance) {
|
|
35
|
-
instance.items?.push({ index: -1, id: item });
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function removeItem(id, item) {
|
|
39
|
-
const instance = findInstance(id);
|
|
40
|
-
if (instance) {
|
|
41
|
-
instance.items = instance.items?.filter((x) => x.id !== item);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function addView(id, view) {
|
|
45
|
-
const instance = findInstance(id);
|
|
46
|
-
if (instance) {
|
|
47
|
-
instance.views?.push(view);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function removeView(id, view) {
|
|
51
|
-
const instance = findInstance(id);
|
|
52
|
-
if (instance) {
|
|
53
|
-
instance.views = instance.views?.filter((x) => x !== view);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
commandStore,
|
|
58
|
-
addInstance,
|
|
59
|
-
findInstance,
|
|
60
|
-
removeInstance,
|
|
61
|
-
addItem,
|
|
62
|
-
removeItem,
|
|
63
|
-
sortItems,
|
|
64
|
-
addView,
|
|
65
|
-
removeView
|
|
66
|
-
};
|
|
67
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<client-only>
|
|
3
|
-
<div class="magic-cookie">
|
|
4
|
-
<div class="magic-cookie__container">
|
|
5
|
-
<div class="magic-cookie__body">
|
|
6
|
-
<slot />
|
|
7
|
-
<div v-show="preferencesVisible" class="magic-cookie__preferences">
|
|
8
|
-
<ul class="magic-cookie__cookies">
|
|
9
|
-
<li
|
|
10
|
-
v-for="cookie in cookies"
|
|
11
|
-
:key="cookie.key"
|
|
12
|
-
class="magic-cookie__cookie"
|
|
13
|
-
>
|
|
14
|
-
<div class="magic-cookie-checkbox">
|
|
15
|
-
<input
|
|
16
|
-
:id="cookie.key"
|
|
17
|
-
type="checkbox"
|
|
18
|
-
:checked="
|
|
19
|
-
cookie.optional === false
|
|
20
|
-
? true
|
|
21
|
-
: selectedCookies[cookie.key]
|
|
22
|
-
"
|
|
23
|
-
@change="toggleSelection(cookie.key)"
|
|
24
|
-
:disabled="cookie.optional === false"
|
|
25
|
-
/>
|
|
26
|
-
</div>
|
|
27
|
-
<div>
|
|
28
|
-
<slot :name="cookie.key" :cookie="cookie">
|
|
29
|
-
<div class="magic-cookie__cookie__content">
|
|
30
|
-
<div class="magic-cookie__cookie__title">
|
|
31
|
-
<span v-text="cookie.title" />
|
|
32
|
-
</div>
|
|
33
|
-
<div
|
|
34
|
-
v-if="cookie.text"
|
|
35
|
-
class="magic-cookie__cookie__text"
|
|
36
|
-
v-html="cookie.text"
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
</slot>
|
|
40
|
-
</div>
|
|
41
|
-
</li>
|
|
42
|
-
</ul>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="magic-cookie__footer">
|
|
46
|
-
<slot name="actions">
|
|
47
|
-
<div class="magic-cookie__actions">
|
|
48
|
-
<template v-if="preferencesVisible">
|
|
49
|
-
<button
|
|
50
|
-
class="magic-cookie-button -secondary"
|
|
51
|
-
@click="preferencesVisible = !preferencesVisible"
|
|
52
|
-
>
|
|
53
|
-
Close
|
|
54
|
-
</button>
|
|
55
|
-
<button
|
|
56
|
-
class="magic-cookie-button -secondary"
|
|
57
|
-
@click="acceptSelected"
|
|
58
|
-
>
|
|
59
|
-
Accept selected
|
|
60
|
-
</button>
|
|
61
|
-
</template>
|
|
62
|
-
<template v-else>
|
|
63
|
-
<button
|
|
64
|
-
class="magic-cookie-button -secondary"
|
|
65
|
-
@click="preferencesVisible = true"
|
|
66
|
-
>
|
|
67
|
-
Preferences
|
|
68
|
-
</button>
|
|
69
|
-
<button class="magic-cookie-button -secondary" @click="reject">
|
|
70
|
-
Reject
|
|
71
|
-
</button>
|
|
72
|
-
</template>
|
|
73
|
-
<button class="magic-cookie-button -primary" @click="accept">
|
|
74
|
-
Accept
|
|
75
|
-
</button>
|
|
76
|
-
</div>
|
|
77
|
-
</slot>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</client-only>
|
|
82
|
-
</template>
|
|
83
|
-
|
|
84
|
-
<script lang="ts" setup>
|
|
85
|
-
import { useCookieApi } from '../composables/private/useCookieApi'
|
|
86
|
-
import { useMagicCookie } from '../composables/useMagicCookie'
|
|
87
|
-
import type { MagicCookieRecord } from '../types'
|
|
88
|
-
|
|
89
|
-
// Define the props and their default values
|
|
90
|
-
type MagicCookieProps = {
|
|
91
|
-
cookies: MagicCookieRecord[]
|
|
92
|
-
maxAge?: number
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const props = withDefaults(defineProps<MagicCookieProps>(), {
|
|
96
|
-
maxAge: 60 * 60 * 24 * 30,
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
// Initialize the Cookie API
|
|
100
|
-
useCookieApi({
|
|
101
|
-
cookies: props.cookies,
|
|
102
|
-
maxAge: props.maxAge,
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
const {
|
|
106
|
-
preferencesVisible,
|
|
107
|
-
selectedCookies,
|
|
108
|
-
accept,
|
|
109
|
-
acceptSelected,
|
|
110
|
-
reject,
|
|
111
|
-
toggleSelection,
|
|
112
|
-
} = useMagicCookie()
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<style>
|
|
116
|
-
:root{--magic-cookie-preferences-mask:linear-gradient(0deg,hsla(0,0%,100%,0),#fff 1.5rem);--magic-cookie-checkbox-size:0.875rem;--magic-cookie-checkbox-border-width:1px;--magic-cookie-checkbox-border-color:currentColor;--magic-cookie-checkbox-border-radius:0;--magic-cookie-button-width:auto;--magic-cookie-button-height:2.5rem;--magic-cookie-button-spacing:1rem;--magic-cookie-button-border-width:1px;--magic-cookie-button-border-radius:0.25rem;--magic-cookie-button-backdrop-filter:none;--magic-cookie-button-primary-color:#000;--magic-cookie-button-primary-background:#fff;--magic-cookie-button-primary-border-color:transparent;--magic-cookie-button-secondary-color:#fff;--magic-cookie-button-secondary-background:transparent;--magic-cookie-button-secondary-border-color:transparent}.magic-cookie{-webkit-backdrop-filter:var(--magic-cookie-backdrop-filter,unset);backdrop-filter:var(--magic-cookie-backdrop-filter,unset);background-color:var(--magic-cookie-background,rgba(75,75,75,.5));border-radius:var(--magic-cookie-border-radius,0);box-shadow:var(--magic-cookie-box-shadow,unset);color:var(--magic-cookie-color,inherit);max-width:var(--magic-cookie-max-width,480px);overflow:hidden}.magic-cookie,.magic-cookie__container{display:flex;flex-direction:column;width:100%}.magic-cookie__container{max-height:var(--magic-cookie-max-height,calc(100vh - 2rem))}.magic-cookie__body{display:flex;flex-direction:column;gap:1rem;height:100%;mask:var(--magic-cookie-preferences-mask);-webkit-mask:var(--magic-cookie-preferences-mask);overflow-y:scroll;padding:1rem;width:100%;-webkit-overflow-scrolling:touch;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none}.magic-cookie__body::-webkit-scrollbar{display:none}.magic-cookie__footer{padding:1rem;width:100%}.magic-cookie__preferences{flex-direction:column;height:100%}.magic-cookie__actions,.magic-cookie__preferences{display:flex;gap:1rem;width:100%}ul.magic-cookie__cookies{display:flex;flex-direction:column;gap:1rem;list-style:none;margin:0;padding:0}li.magic-cookie__cookie{align-items:flex-start;display:flex;gap:1rem;margin:0;padding:0}.magic-cookie__cookie__content{align-items:flex-start;display:flex;flex-direction:column;gap:.25rem}.magic-cookie__cookie__title{display:inline-flex}.magic-cookie__cookie__text{white-space:pre-line}.magic-cookie-checkbox{align-items:center;display:flex;gap:.625rem}.magic-cookie-checkbox input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--magic-cookie-checkbox-border-width) var(--magic-cookie-checkbox-border-color) solid;border-radius:var(--magic-cookie-checkbox-border-radius);cursor:pointer;flex-shrink:0;height:var(--magic-cookie-checkbox-size);position:relative;vertical-align:middle;width:var(--magic-cookie-checkbox-size)}.magic-cookie-checkbox input[type=checkbox]:checked:after{background-color:var(--magic-cookie-checkbox-border-color);border-radius:var(--magic-cookie-checkbox-border-radius);content:"";display:block;height:calc(var(--magic-cookie-checkbox-size)/2);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:calc(var(--magic-cookie-checkbox-size)/2)}.magic-cookie-checkbox:disabled{cursor:not-allowed}.magic-cookie-button{align-items:center;backdrop-filter:var(--magic-cookie-button-backdrop-filter);-webkit-backdrop-filter:var(--magic-cookie-button-backdrop-filter);border:var(--magic-cookie-button-border-width) solid;border-radius:var(--magic-cookie-button-border-radius);display:inline-flex;gap:var(--magic-cookie-button-spacing);height:var(--magic-cookie-button-height);justify-content:center;padding:0 var(--magic-cookie-button-spacing);width:var(--magic-cookie-button-width)}.magic-cookie-button.-primary{background-color:var(--magic-cookie-button-primary-background);border-color:var(--magic-cookie-button-primary-border-color);color:var(--magic-cookie-button-primary-color)}.magic-cookie-button.-secondary{background-color:var(--magic-cookie-button-secondary-background);border-color:var(--magic-cookie-button-secondary-border-color);color:var(--magic-cookie-button-secondary-color)}
|
|
117
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { MagicCookieRecord } from '../types';
|
|
2
|
-
type MagicCookieProps = {
|
|
3
|
-
cookies: MagicCookieRecord[];
|
|
4
|
-
maxAge?: number;
|
|
5
|
-
};
|
|
6
|
-
declare function __VLS_template(): {
|
|
7
|
-
attrs: Partial<{}>;
|
|
8
|
-
slots: Partial<Record<string, (_: {
|
|
9
|
-
cookie: MagicCookieRecord;
|
|
10
|
-
}) => any>> & {
|
|
11
|
-
default?(_: {}): any;
|
|
12
|
-
actions?(_: {}): any;
|
|
13
|
-
};
|
|
14
|
-
refs: {};
|
|
15
|
-
rootEl: any;
|
|
16
|
-
};
|
|
17
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicCookieProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieProps> & Readonly<{}>, {
|
|
19
|
-
maxAge: number;
|
|
20
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
-
new (): {
|
|
25
|
-
$slots: S;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { MagicCookieRecord } from '../../types/index.js';
|
|
2
|
-
type UseCookieApiArgs = {
|
|
3
|
-
cookies: MagicCookieRecord[];
|
|
4
|
-
maxAge?: number;
|
|
5
|
-
};
|
|
6
|
-
export declare const cookieApiStore: import("vue").Ref<{
|
|
7
|
-
cookies: {
|
|
8
|
-
[x: string]: unknown;
|
|
9
|
-
key: string;
|
|
10
|
-
optional?: boolean | undefined;
|
|
11
|
-
title?: string | undefined;
|
|
12
|
-
text?: string | undefined;
|
|
13
|
-
}[];
|
|
14
|
-
maxAge: number | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
cookies: MagicCookieRecord[];
|
|
17
|
-
maxAge: number | undefined;
|
|
18
|
-
} | {
|
|
19
|
-
cookies: {
|
|
20
|
-
[x: string]: unknown;
|
|
21
|
-
key: string;
|
|
22
|
-
optional?: boolean | undefined;
|
|
23
|
-
title?: string | undefined;
|
|
24
|
-
text?: string | undefined;
|
|
25
|
-
}[];
|
|
26
|
-
maxAge: number | undefined;
|
|
27
|
-
}>;
|
|
28
|
-
export declare function useCookieApi({ cookies, maxAge }: UseCookieApiArgs): void;
|
|
29
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
2
|
-
import { slugify } from "@maas/vue-equipment/utils";
|
|
3
|
-
export const cookieApiStore = ref({
|
|
4
|
-
cookies: [],
|
|
5
|
-
maxAge: void 0
|
|
6
|
-
});
|
|
7
|
-
export function useCookieApi({ cookies, maxAge }) {
|
|
8
|
-
if (!Array.isArray(cookies)) {
|
|
9
|
-
console.warn('Invalid configuration. "cookies" must be an array.');
|
|
10
|
-
}
|
|
11
|
-
cookieApiStore.value.cookies = cookies?.map((cookie) => {
|
|
12
|
-
return {
|
|
13
|
-
...cookie,
|
|
14
|
-
key: slugify(cookie.key, {
|
|
15
|
-
separator: "_",
|
|
16
|
-
lowercase: true,
|
|
17
|
-
strict: true
|
|
18
|
-
})
|
|
19
|
-
};
|
|
20
|
-
});
|
|
21
|
-
cookieApiStore.value.maxAge = maxAge;
|
|
22
|
-
}
|