@maas/vue-equipment 0.40.0 → 1.0.0-beta.1
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 +2 -13
- package/dist/composables/index.js +65 -128
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +26 -40
- package/dist/plugins/.turbo/turbo-build.log +0 -0
- package/dist/plugins/.turbo/turbo-lint.log +13 -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 +17 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +36 -30
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +11 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +71 -71
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +12 -7
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +51 -50
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +13 -4
- 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/useAccordionView.mjs +11 -10
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +1 -1
- 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 +192 -0
- package/dist/plugins/MagicCommand/src/components/{MagicCommandBody.vue.d.ts → MagicCommandContent.vue.d.ts} +4 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +60 -53
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +12 -3
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +108 -79
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +18 -9
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +55 -53
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +11 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +94 -62
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +52 -7
- 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 +110 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +75 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +56 -73
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +16 -9
- 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 +22 -4
- 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 +8 -1
- 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 +33 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +43 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +32 -0
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +96 -0
- package/dist/plugins/{MagicCommand/src/components/MagicCommandHead.vue.d.ts → MagicCookie/src/components/MagicCookieView.vue.d.ts} +6 -2
- 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 +142 -97
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +12 -6
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +6 -6
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +3 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +3 -4
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +11 -8
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.d.ts +2 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +8 -8
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +10 -5
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.d.ts +3 -8
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +5 -5
- package/dist/plugins/MagicDrawer/nuxt.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +491 -336
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +12 -6
- 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/useDrawerDrag.d.ts +7 -9
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +26 -16
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +2 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.mjs +4 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +5 -6
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +46 -29
- 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 +2 -2
- 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 +14 -10
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +3 -7
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +52 -44
- 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 +79 -69
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +10 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +247 -215
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +12 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +235 -211
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +12 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +126 -124
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +15 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +94 -96
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +49 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +98 -87
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +11 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +111 -112
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +11 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +67 -70
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +13 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.d.ts +6 -6
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +8 -8
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +35 -26
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +12 -6
- 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.mjs +6 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +99 -75
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/types/index.d.ts +1 -2
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +265 -165
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +12 -6
- 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/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 +11 -4
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +2 -2
- 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 +78 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +2 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +134 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +33 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +45 -41
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +11 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +116 -114
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +13 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +111 -58
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +42 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +83 -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 +94 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +2 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +222 -0
- package/dist/plugins/MagicPlayer/src/components/{MagicPlayerControls.vue.d.ts → MagicPlayerVideoControls.vue.d.ts} +12 -5
- 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.mjs +5 -6
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +18 -22
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +13 -13
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +4 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +6 -8
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +2 -6
- 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 +67 -31
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +14 -4
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +78 -64
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +14 -7
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +39 -39
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +15 -9
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +76 -73
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +13 -7
- 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 +5 -3
- 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 +296 -0
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +23 -0
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +155 -0
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +33 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +7 -30
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +34 -29
- 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 +41 -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 +13 -8
- package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +26 -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 +0 -1
- package/dist/plugins/index.mjs +0 -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 +1 -2
- package/dist/utils/index.js +2 -53
- package/dist/utils/index.js.map +1 -1
- package/package.json +52 -57
- 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.d.ts +0 -2
- 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/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/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/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/MagicToast.vue.d.ts +0 -14
- 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
|
@@ -1,72 +1,129 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
|
+
const _hoisted_1 = ["data-loading"];
|
|
5
|
+
const _hoisted_2 = { class: "magic-noise__inner" };
|
|
6
|
+
import { onMounted, onUnmounted, watch, shallowRef } from "vue";
|
|
7
|
+
import { useResizeObserver, useDebounceFn } from "@vueuse/core";
|
|
8
|
+
import { useNoiseApi } from "../composables/private/useNoiseApi";
|
|
9
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
10
|
+
__name: "MagicNoise",
|
|
11
|
+
props: {
|
|
12
|
+
options: { type: Object, required: false },
|
|
13
|
+
pause: { type: Boolean, required: false, default: false }
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const canvasRef = shallowRef(void 0);
|
|
17
|
+
const offCanvasRef = shallowRef(void 0);
|
|
18
|
+
const noiseApi = useNoiseApi({
|
|
19
|
+
canvasRef,
|
|
20
|
+
offCanvasRef,
|
|
21
|
+
options: __props.options
|
|
22
|
+
});
|
|
23
|
+
const {
|
|
24
|
+
initialize,
|
|
25
|
+
drawControls,
|
|
26
|
+
transferControls,
|
|
27
|
+
throttledDraw,
|
|
28
|
+
throttledRotateAndTransfer,
|
|
29
|
+
isReady
|
|
30
|
+
} = noiseApi;
|
|
31
|
+
useResizeObserver(canvasRef, useDebounceFn(initialize, 100));
|
|
32
|
+
watch(
|
|
33
|
+
() => __props.pause,
|
|
34
|
+
(pause) => {
|
|
35
|
+
if (pause) {
|
|
36
|
+
drawControls.value?.pause();
|
|
37
|
+
transferControls.value?.pause();
|
|
38
|
+
} else {
|
|
39
|
+
drawControls.value?.resume();
|
|
40
|
+
transferControls.value?.resume();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
throttledDraw();
|
|
46
|
+
throttledRotateAndTransfer();
|
|
47
|
+
});
|
|
48
|
+
onUnmounted(() => {
|
|
49
|
+
isReady.value = false;
|
|
50
|
+
transferControls.value?.pause();
|
|
51
|
+
drawControls.value?.pause();
|
|
52
|
+
});
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return _openBlock(), _createElementBlock("div", {
|
|
55
|
+
class: "magic-noise",
|
|
56
|
+
"data-loading": !_unref(isReady)
|
|
57
|
+
}, [
|
|
58
|
+
_createElementVNode("div", _hoisted_2, [
|
|
59
|
+
_createElementVNode(
|
|
60
|
+
"canvas",
|
|
61
|
+
{
|
|
62
|
+
ref_key: "canvasRef",
|
|
63
|
+
ref: canvasRef,
|
|
64
|
+
class: "magic-noise__canvas"
|
|
65
|
+
},
|
|
66
|
+
null,
|
|
67
|
+
512
|
|
68
|
+
/* NEED_PATCH */
|
|
69
|
+
),
|
|
70
|
+
_createElementVNode(
|
|
71
|
+
"canvas",
|
|
72
|
+
{
|
|
73
|
+
ref_key: "offCanvasRef",
|
|
74
|
+
ref: offCanvasRef,
|
|
75
|
+
class: "magic-noise__off-canvas"
|
|
76
|
+
},
|
|
77
|
+
null,
|
|
78
|
+
512
|
|
79
|
+
/* NEED_PATCH */
|
|
80
|
+
)
|
|
81
|
+
])
|
|
82
|
+
], 8, _hoisted_1);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
</script>
|
|
15
87
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
88
|
+
<style>
|
|
89
|
+
:root {
|
|
90
|
+
--magic-noise-loading-transition: color 300ms ease, opacity 300ms ease;
|
|
19
91
|
}
|
|
20
92
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
offCanvasRef,
|
|
31
|
-
options: props.options,
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
const {
|
|
35
|
-
initialize,
|
|
36
|
-
drawControls,
|
|
37
|
-
transferControls,
|
|
38
|
-
throttledDraw,
|
|
39
|
-
throttledRotateAndTransfer,
|
|
40
|
-
isReady,
|
|
41
|
-
} = noiseApi
|
|
42
|
-
|
|
43
|
-
useResizeObserver(canvasRef, useDebounceFn(initialize, 100))
|
|
44
|
-
|
|
45
|
-
watch(
|
|
46
|
-
() => props.pause,
|
|
47
|
-
(pause) => {
|
|
48
|
-
if (pause) {
|
|
49
|
-
drawControls.value?.pause()
|
|
50
|
-
transferControls.value?.pause()
|
|
51
|
-
} else {
|
|
52
|
-
drawControls.value?.resume()
|
|
53
|
-
transferControls.value?.resume()
|
|
93
|
+
.magic-noise {
|
|
94
|
+
position: relative;
|
|
95
|
+
user-select: none;
|
|
96
|
+
transition: var(--magic-noise-loading-transition);
|
|
97
|
+
background: var(--magic-noise-background, transparent);
|
|
98
|
+
&[data-loading='true'] {
|
|
99
|
+
background: var(--magic-noise-loading-background, #000);
|
|
100
|
+
& > .magic-noise__inner {
|
|
101
|
+
opacity: 0;
|
|
54
102
|
}
|
|
55
103
|
}
|
|
56
|
-
|
|
104
|
+
}
|
|
57
105
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
106
|
+
.magic-noise__inner {
|
|
107
|
+
position: relative;
|
|
108
|
+
width: 100%;
|
|
109
|
+
height: 100%;
|
|
110
|
+
transition: var(--magic-noise-loading-transition);
|
|
111
|
+
}
|
|
62
112
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
113
|
+
.magic-noise__canvas {
|
|
114
|
+
position: absolute;
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 100%;
|
|
117
|
+
top: 0;
|
|
118
|
+
left: 0;
|
|
119
|
+
object-fit: cover;
|
|
120
|
+
}
|
|
69
121
|
|
|
70
|
-
|
|
71
|
-
:
|
|
122
|
+
.magic-noise__off-canvas {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 0;
|
|
125
|
+
left: 0;
|
|
126
|
+
visibility: hidden;
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
}
|
|
72
129
|
</style>
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import type { MagicNoiseOptions } from '../types';
|
|
1
|
+
import type { MagicNoiseOptions } from '../types/index.js';
|
|
2
2
|
interface MagicNoiseProps {
|
|
3
3
|
options?: MagicNoiseOptions;
|
|
4
4
|
pause?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import("vue").DefineComponent<MagicNoiseProps
|
|
7
|
-
pause: boolean;
|
|
8
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicNoiseProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicNoiseProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
7
|
export default _default;
|
|
8
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
type __VLS_TypePropsToOption<T> = {
|
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
+
} : {
|
|
13
|
+
type: import('vue').PropType<T[K]>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -15,8 +15,8 @@ export function useNoiseApi({
|
|
|
15
15
|
const tiles = shallowRef([]);
|
|
16
16
|
const pixels = shallowRef([]);
|
|
17
17
|
const isReady = ref(false);
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const context = shallowRef(null);
|
|
19
|
+
const offContext = shallowRef(null);
|
|
20
20
|
const { width, height } = useElementSize(canvasRef);
|
|
21
21
|
const { pixelRatio } = useDevicePixelRatio();
|
|
22
22
|
const drawControls = shallowRef(void 0);
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import type { Plugin } from 'vue';
|
|
2
|
-
import MagicPlayer from './src/components/MagicPlayer.vue.js';
|
|
3
|
-
import MagicPlayerControls from './src/components/MagicPlayerControls.vue.js';
|
|
4
|
-
import MagicPlayerDisplayTime from './src/components/MagicPlayerDisplayTime.vue.js';
|
|
5
|
-
import MagicPlayerMuxPopover from './src/components/MagicPlayerMuxPopover.vue.js';
|
|
6
|
-
import MagicPlayerOverlay from './src/components/MagicPlayerOverlay.vue.js';
|
|
7
|
-
import MagicPlayerPoster from './src/components/MagicPlayerPoster.vue.js';
|
|
8
|
-
import MagicPlayerTimeline from './src/components/MagicPlayerTimeline.vue.js';
|
|
9
1
|
import { useMagicPlayer } from './src/composables/useMagicPlayer.js';
|
|
2
|
+
import type { Plugin } from 'vue';
|
|
3
|
+
import type { MagicPlayerOptions } from './src/types/index.js';
|
|
10
4
|
declare const MagicPlayerPlugin: Plugin;
|
|
11
|
-
export { MagicPlayerPlugin,
|
|
5
|
+
export { MagicPlayerPlugin, useMagicPlayer };
|
|
6
|
+
export type { MagicPlayerOptions };
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import MagicPlayerControls from "./src/components/MagicPlayerControls.vue";
|
|
1
|
+
import MagicPlayerAudio from "./src/components/MagicPlayerAudio.vue";
|
|
2
|
+
import MagicPlayerAudioControls from "./src/components/MagicPlayerAudioControls.vue";
|
|
4
3
|
import MagicPlayerDisplayTime from "./src/components/MagicPlayerDisplayTime.vue";
|
|
5
4
|
import MagicPlayerMuxPopover from "./src/components/MagicPlayerMuxPopover.vue";
|
|
6
5
|
import MagicPlayerOverlay from "./src/components/MagicPlayerOverlay.vue";
|
|
7
6
|
import MagicPlayerPoster from "./src/components/MagicPlayerPoster.vue";
|
|
7
|
+
import MagicPlayerProvider from "./src/components/MagicPlayerProvider.vue";
|
|
8
8
|
import MagicPlayerTimeline from "./src/components/MagicPlayerTimeline.vue";
|
|
9
|
+
import MagicPlayerVideo from "./src/components/MagicPlayerVideo.vue";
|
|
10
|
+
import MagicPlayerVideoControls from "./src/components/MagicPlayerVideoControls.vue";
|
|
9
11
|
import { useMagicPlayer } from "./src/composables/useMagicPlayer.mjs";
|
|
10
12
|
const MagicPlayerPlugin = {
|
|
11
13
|
install: (app) => {
|
|
12
|
-
app.component("
|
|
13
|
-
app.component("
|
|
14
|
-
app.component("MagicPlayerControls", MagicPlayerControls);
|
|
14
|
+
app.component("MagicPlayerAudio", MagicPlayerAudio);
|
|
15
|
+
app.component("MagicPlayerAudioControls", MagicPlayerAudioControls);
|
|
15
16
|
app.component("MagicPlayerDisplayTime", MagicPlayerDisplayTime);
|
|
16
17
|
app.component("MagicPlayerMuxPopover", MagicPlayerMuxPopover);
|
|
17
18
|
app.component("MagicPlayerOverlay", MagicPlayerOverlay);
|
|
18
19
|
app.component("MagicPlayerPoster", MagicPlayerPoster);
|
|
20
|
+
app.component("MagicPlayerProvider", MagicPlayerProvider);
|
|
19
21
|
app.component("MagicPlayerTimeline", MagicPlayerTimeline);
|
|
22
|
+
app.component("MagicPlayerVideo", MagicPlayerVideo);
|
|
23
|
+
app.component("MagicPlayerVideoControls", MagicPlayerVideoControls);
|
|
20
24
|
}
|
|
21
25
|
};
|
|
22
|
-
export {
|
|
23
|
-
MagicPlayerPlugin,
|
|
24
|
-
MagicPlayer,
|
|
25
|
-
MagicPlayerControls,
|
|
26
|
-
MagicPlayerDisplayTime,
|
|
27
|
-
MagicPlayerMuxPopover,
|
|
28
|
-
MagicPlayerPoster,
|
|
29
|
-
MagicPlayerOverlay,
|
|
30
|
-
MagicPlayerTimeline,
|
|
31
|
-
useMagicPlayer
|
|
32
|
-
};
|
|
26
|
+
export { MagicPlayerPlugin, useMagicPlayer };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
|
+
import { ref, inject, onMounted, onBeforeUnmount } from "vue";
|
|
5
|
+
import { useIntersectionObserver } from "@vueuse/core";
|
|
6
|
+
import { usePlayerAudioApi } from "../composables/private/usePlayerAudioApi";
|
|
7
|
+
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
8
|
+
import { usePlayerRuntime } from "../composables/private/usePlayerRuntime";
|
|
9
|
+
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
10
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
11
|
+
__name: "MagicPlayerAudio",
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const injectedId = inject(MagicPlayerInstanceId, void 0);
|
|
14
|
+
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
15
|
+
if (!injectedId) {
|
|
16
|
+
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
17
|
+
}
|
|
18
|
+
if (!injectedOptions) {
|
|
19
|
+
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
20
|
+
}
|
|
21
|
+
const elRef = ref(void 0);
|
|
22
|
+
const pausedByIntersection = ref(false);
|
|
23
|
+
const { initialize, destroy } = usePlayerRuntime({
|
|
24
|
+
id: injectedId,
|
|
25
|
+
mediaRef: elRef,
|
|
26
|
+
src: injectedOptions.src,
|
|
27
|
+
srcType: injectedOptions.srcType
|
|
28
|
+
});
|
|
29
|
+
const { playing } = usePlayerMediaApi({
|
|
30
|
+
id: injectedId,
|
|
31
|
+
mediaRef: elRef
|
|
32
|
+
});
|
|
33
|
+
const { play, pause } = usePlayerAudioApi({
|
|
34
|
+
id: injectedId
|
|
35
|
+
});
|
|
36
|
+
useIntersectionObserver(
|
|
37
|
+
elRef,
|
|
38
|
+
([{ isIntersecting }]) => {
|
|
39
|
+
if (!isIntersecting && playing.value) {
|
|
40
|
+
pause();
|
|
41
|
+
pausedByIntersection.value = true;
|
|
42
|
+
} else if (isIntersecting && !playing.value && pausedByIntersection.value) {
|
|
43
|
+
pausedByIntersection.value = false;
|
|
44
|
+
play();
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
immediate: true
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
onMounted(() => {
|
|
52
|
+
initialize();
|
|
53
|
+
});
|
|
54
|
+
onBeforeUnmount(() => {
|
|
55
|
+
destroy();
|
|
56
|
+
});
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return _openBlock(), _createElementBlock(
|
|
59
|
+
"audio",
|
|
60
|
+
{
|
|
61
|
+
ref_key: "elRef",
|
|
62
|
+
ref: elRef,
|
|
63
|
+
class: "magic-player-audio"
|
|
64
|
+
},
|
|
65
|
+
null,
|
|
66
|
+
512
|
|
67
|
+
/* NEED_PATCH */
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style>
|
|
75
|
+
.magic-player-audio {
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { unref as _unref, renderSlot as _renderSlot, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent } from "vue";
|
|
4
|
+
const _hoisted_1 = ["data-touched", "data-playing", "data-paused", "data-waiting", "data-idle", "data-hover"];
|
|
5
|
+
const _hoisted_2 = { class: "magic-player-audio-controls__bar" };
|
|
6
|
+
const _hoisted_3 = {
|
|
7
|
+
class: "magic-player-audio-controls__item -shrink-0",
|
|
8
|
+
"data-slot": "play-toggle"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
class: "magic-player-audio-controls__item -shrink-0",
|
|
12
|
+
"data-slot": "display-time-current"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_5 = {
|
|
15
|
+
class: "magic-player-audio-controls__item -grow",
|
|
16
|
+
"data-slot": "timeline"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_6 = {
|
|
19
|
+
class: "magic-player-audio-controls__item -shrink-0",
|
|
20
|
+
"data-slot": "display-time-duration"
|
|
21
|
+
};
|
|
22
|
+
import { computed, ref, inject, provide } from "vue";
|
|
23
|
+
import { useIdle } from "@vueuse/core";
|
|
24
|
+
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
25
|
+
import { usePlayerAudioApi } from "../composables/private/usePlayerAudioApi";
|
|
26
|
+
import { usePlayerControlsApi } from "../composables/private/usePlayerControlsApi";
|
|
27
|
+
import IconPlay from "./icons/Play.vue";
|
|
28
|
+
import IconPause from "./icons/Pause.vue";
|
|
29
|
+
import { MagicPlayerInstanceId } from "../symbols";
|
|
30
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
31
|
+
__name: "MagicPlayerAudioControls",
|
|
32
|
+
props: {
|
|
33
|
+
id: { type: String, required: false }
|
|
34
|
+
},
|
|
35
|
+
setup(__props) {
|
|
36
|
+
const instanceId = inject(MagicPlayerInstanceId, void 0);
|
|
37
|
+
const mappedId = computed(() => __props.id ?? instanceId);
|
|
38
|
+
if (!mappedId.value) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
"MagicAudioPlayerControls must be nested inside MagicAudioPlayer or be passed an id as a prop."
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
const barRef = ref(void 0);
|
|
44
|
+
const trackRef = ref(void 0);
|
|
45
|
+
const { playing, waiting } = usePlayerMediaApi({
|
|
46
|
+
id: mappedId.value
|
|
47
|
+
});
|
|
48
|
+
const { play, pause, touched, mouseEntered } = usePlayerAudioApi({
|
|
49
|
+
id: mappedId.value
|
|
50
|
+
});
|
|
51
|
+
usePlayerControlsApi({
|
|
52
|
+
id: mappedId.value,
|
|
53
|
+
barRef,
|
|
54
|
+
trackRef
|
|
55
|
+
});
|
|
56
|
+
const { idle } = useIdle(3e3);
|
|
57
|
+
provide(MagicPlayerInstanceId, mappedId.value);
|
|
58
|
+
return (_ctx, _cache) => {
|
|
59
|
+
const _component_magic_player_display_time = _resolveComponent("magic-player-display-time");
|
|
60
|
+
const _component_magic_player_timeline = _resolveComponent("magic-player-timeline");
|
|
61
|
+
return _openBlock(), _createElementBlock("div", {
|
|
62
|
+
class: "magic-player-audio-controls",
|
|
63
|
+
"data-touched": _unref(touched),
|
|
64
|
+
"data-playing": _unref(playing),
|
|
65
|
+
"data-paused": !_unref(playing),
|
|
66
|
+
"data-waiting": _unref(waiting),
|
|
67
|
+
"data-idle": _unref(idle),
|
|
68
|
+
"data-hover": _unref(mouseEntered)
|
|
69
|
+
}, [
|
|
70
|
+
_createElementVNode("div", _hoisted_2, [
|
|
71
|
+
_createElementVNode(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
ref_key: "barRef",
|
|
75
|
+
ref: barRef,
|
|
76
|
+
class: "magic-player-audio-controls__bar--inner"
|
|
77
|
+
},
|
|
78
|
+
[
|
|
79
|
+
_createElementVNode("div", _hoisted_3, [
|
|
80
|
+
!_unref(playing) ? (_openBlock(), _createElementBlock("button", {
|
|
81
|
+
key: 0,
|
|
82
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
83
|
+
(...args) => _unref(play) && _unref(play)(...args))
|
|
84
|
+
}, [
|
|
85
|
+
_renderSlot(_ctx.$slots, "playIcon", {}, () => [
|
|
86
|
+
_createVNode(IconPlay)
|
|
87
|
+
])
|
|
88
|
+
])) : (_openBlock(), _createElementBlock("button", {
|
|
89
|
+
key: 1,
|
|
90
|
+
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
91
|
+
(...args) => _unref(pause) && _unref(pause)(...args))
|
|
92
|
+
}, [
|
|
93
|
+
_renderSlot(_ctx.$slots, "pauseIcon", {}, () => [
|
|
94
|
+
_createVNode(IconPause)
|
|
95
|
+
])
|
|
96
|
+
]))
|
|
97
|
+
]),
|
|
98
|
+
_createElementVNode("div", _hoisted_4, [
|
|
99
|
+
_createVNode(_component_magic_player_display_time, {
|
|
100
|
+
id: _ctx.id,
|
|
101
|
+
type: "current"
|
|
102
|
+
}, null, 8, ["id"])
|
|
103
|
+
]),
|
|
104
|
+
_createElementVNode("div", _hoisted_5, [
|
|
105
|
+
_createElementVNode(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
ref_key: "trackRef",
|
|
109
|
+
ref: trackRef,
|
|
110
|
+
class: "magic-player-audio-controls__timeline"
|
|
111
|
+
},
|
|
112
|
+
[
|
|
113
|
+
_createVNode(_component_magic_player_timeline, { id: _ctx.id }, null, 8, ["id"])
|
|
114
|
+
],
|
|
115
|
+
512
|
|
116
|
+
/* NEED_PATCH */
|
|
117
|
+
)
|
|
118
|
+
]),
|
|
119
|
+
_createElementVNode("div", _hoisted_6, [
|
|
120
|
+
_createVNode(_component_magic_player_display_time, {
|
|
121
|
+
id: _ctx.id,
|
|
122
|
+
type: "duration"
|
|
123
|
+
}, null, 8, ["id"])
|
|
124
|
+
])
|
|
125
|
+
],
|
|
126
|
+
512
|
|
127
|
+
/* NEED_PATCH */
|
|
128
|
+
)
|
|
129
|
+
])
|
|
130
|
+
], 8, _hoisted_1);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface MagicAudioPlayerControlsProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
}
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
playIcon?(_: {}): any;
|
|
8
|
+
pauseIcon?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {
|
|
11
|
+
barRef: HTMLDivElement;
|
|
12
|
+
trackRef: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
rootEl: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicAudioPlayerControlsProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicAudioPlayerControlsProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToOption<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const { currentTime, remainingTime, duration } = usePlayerMediaApi({
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
|
+
const _hoisted_1 = { class: "magic-player-display-time" };
|
|
5
|
+
import { computed, inject } from "vue";
|
|
6
|
+
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
7
|
+
import { formatTime } from "@maas/vue-equipment/utils";
|
|
8
|
+
import { MagicPlayerInstanceId } from "../symbols";
|
|
9
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
10
|
+
__name: "MagicPlayerDisplayTime",
|
|
11
|
+
props: {
|
|
12
|
+
type: { type: String, required: false, default: "current" }
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const instanceId = inject(MagicPlayerInstanceId);
|
|
16
|
+
if (!instanceId) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
"MagicPlayerDisplayTime must be nested inside MagicPlayerVideoControls or MagicPlayerAudioControls."
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
const { currentTime, remainingTime, duration } = usePlayerMediaApi({
|
|
22
|
+
id: instanceId
|
|
23
|
+
});
|
|
24
|
+
const stringifiedTime = computed(() => {
|
|
25
|
+
switch (__props.type) {
|
|
26
|
+
case "current":
|
|
27
|
+
return formatTime(currentTime.value, currentTime.value);
|
|
28
|
+
case "remaining":
|
|
29
|
+
return `-${formatTime(remainingTime.value, remainingTime.value)}`;
|
|
30
|
+
case "duration":
|
|
31
|
+
return formatTime(duration.value, duration.value);
|
|
32
|
+
default:
|
|
33
|
+
return "";
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return _openBlock(), _createElementBlock(
|
|
38
|
+
"div",
|
|
39
|
+
_hoisted_1,
|
|
40
|
+
_toDisplayString(stringifiedTime.value),
|
|
41
|
+
1
|
|
42
|
+
/* TEXT */
|
|
43
|
+
);
|
|
44
|
+
};
|
|
35
45
|
}
|
|
36
|
-
})
|
|
46
|
+
});
|
|
37
47
|
</script>
|
|
38
|
-
|
|
39
|
-
<style>
|
|
40
|
-
.magic-player-time-display{align-items:center;color:var(--magic-player-time-display-color,inherit);display:flex;font-size:var(--magic-player-time-display-font-size,.875rem);font-variant-numeric:var(
|
|
41
|
-
--magic-player-time-display-font-variant-numeric,tabular-nums
|
|
42
|
-
);height:100%;justify-content:var(--magic-player-time-display-justify-content,center);width:var(--magic-player-time-display-width,4rem)}
|
|
43
|
-
</style>
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
interface MagicPlayerDisplayTimeProps {
|
|
2
|
-
|
|
3
|
-
type: 'current' | 'remaining' | 'duration';
|
|
2
|
+
type?: 'current' | 'remaining' | 'duration';
|
|
4
3
|
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<MagicPlayerDisplayTimeProps
|
|
6
|
-
type: "current" | "remaining" | "duration";
|
|
7
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicPlayerDisplayTimeProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicPlayerDisplayTimeProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
5
|
export default _default;
|
|
6
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
|
+
type __VLS_TypePropsToOption<T> = {
|
|
8
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
9
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
10
|
+
} : {
|
|
11
|
+
type: import('vue').PropType<T[K]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
};
|