@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,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,84 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
ref: "el",
|
|
6
|
+
class: "magic-player-audio"
|
|
7
|
+
};
|
|
8
|
+
import {
|
|
9
|
+
useTemplateRef,
|
|
10
|
+
shallowRef,
|
|
11
|
+
inject,
|
|
12
|
+
onMounted,
|
|
13
|
+
onBeforeUnmount
|
|
14
|
+
} from "vue";
|
|
15
|
+
import { useIntersectionObserver } from "@vueuse/core";
|
|
16
|
+
import { usePlayerAudioApi } from "../composables/private/usePlayerAudioApi";
|
|
17
|
+
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
18
|
+
import { usePlayerRuntime } from "../composables/private/usePlayerRuntime";
|
|
19
|
+
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
20
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
21
|
+
__name: "MagicPlayerAudio",
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const injectedId = inject(MagicPlayerInstanceId, void 0);
|
|
24
|
+
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
25
|
+
if (!injectedId) {
|
|
26
|
+
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
27
|
+
}
|
|
28
|
+
if (!injectedOptions) {
|
|
29
|
+
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
30
|
+
}
|
|
31
|
+
const elRef = useTemplateRef("el");
|
|
32
|
+
const pausedByIntersection = shallowRef(false);
|
|
33
|
+
const { initialize, destroy } = usePlayerRuntime({
|
|
34
|
+
id: injectedId,
|
|
35
|
+
mediaRef: elRef,
|
|
36
|
+
src: injectedOptions.src,
|
|
37
|
+
srcType: injectedOptions.srcType
|
|
38
|
+
});
|
|
39
|
+
const { playing } = usePlayerMediaApi({
|
|
40
|
+
id: injectedId,
|
|
41
|
+
mediaRef: elRef
|
|
42
|
+
});
|
|
43
|
+
const { play, pause } = usePlayerAudioApi({
|
|
44
|
+
id: injectedId
|
|
45
|
+
});
|
|
46
|
+
useIntersectionObserver(
|
|
47
|
+
elRef,
|
|
48
|
+
([{ isIntersecting }]) => {
|
|
49
|
+
if (!isIntersecting && playing.value) {
|
|
50
|
+
pause();
|
|
51
|
+
pausedByIntersection.value = true;
|
|
52
|
+
} else if (isIntersecting && !playing.value && pausedByIntersection.value) {
|
|
53
|
+
pausedByIntersection.value = false;
|
|
54
|
+
play();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
immediate: true
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
onMounted(() => {
|
|
62
|
+
initialize();
|
|
63
|
+
});
|
|
64
|
+
onBeforeUnmount(() => {
|
|
65
|
+
destroy();
|
|
66
|
+
});
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
return _openBlock(), _createElementBlock(
|
|
69
|
+
"audio",
|
|
70
|
+
_hoisted_1,
|
|
71
|
+
null,
|
|
72
|
+
512
|
|
73
|
+
/* NEED_PATCH */
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<style>
|
|
81
|
+
.magic-player-audio {
|
|
82
|
+
width: 100%;
|
|
83
|
+
}
|
|
84
|
+
</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,128 @@
|
|
|
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
|
+
ref: "bar",
|
|
8
|
+
class: "magic-player-audio-controls__bar--inner"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
class: "magic-player-audio-controls__item -shrink-0",
|
|
12
|
+
"data-slot": "play-toggle"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_5 = {
|
|
15
|
+
class: "magic-player-audio-controls__item -shrink-0",
|
|
16
|
+
"data-slot": "display-time-current"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_6 = {
|
|
19
|
+
class: "magic-player-audio-controls__item -grow",
|
|
20
|
+
"data-slot": "timeline"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_7 = {
|
|
23
|
+
ref: "track",
|
|
24
|
+
class: "magic-player-audio-controls__timeline"
|
|
25
|
+
};
|
|
26
|
+
const _hoisted_8 = {
|
|
27
|
+
class: "magic-player-audio-controls__item -shrink-0",
|
|
28
|
+
"data-slot": "display-time-duration"
|
|
29
|
+
};
|
|
30
|
+
import { computed, inject, provide, useTemplateRef } from "vue";
|
|
31
|
+
import { useIdle } from "@vueuse/core";
|
|
32
|
+
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
33
|
+
import { usePlayerAudioApi } from "../composables/private/usePlayerAudioApi";
|
|
34
|
+
import { usePlayerControlsApi } from "../composables/private/usePlayerControlsApi";
|
|
35
|
+
import IconPlay from "./icons/Play.vue";
|
|
36
|
+
import IconPause from "./icons/Pause.vue";
|
|
37
|
+
import { MagicPlayerInstanceId } from "../symbols";
|
|
38
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
39
|
+
__name: "MagicPlayerAudioControls",
|
|
40
|
+
props: {
|
|
41
|
+
instanceId: { type: String, required: false }
|
|
42
|
+
},
|
|
43
|
+
setup(__props) {
|
|
44
|
+
const injectedInstanceId = inject(MagicPlayerInstanceId, void 0);
|
|
45
|
+
const mappedInstanceId = computed(() => __props.instanceId ?? injectedInstanceId);
|
|
46
|
+
if (!mappedInstanceId.value) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
"MagicAudioPlayerControls must be nested inside MagicAudioPlayer or an instanceId must be provided."
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
const barRef = useTemplateRef("bar");
|
|
52
|
+
const trackRef = useTemplateRef("track");
|
|
53
|
+
const { playing, waiting } = usePlayerMediaApi({
|
|
54
|
+
id: mappedInstanceId.value
|
|
55
|
+
});
|
|
56
|
+
const { play, pause, touched, mouseEntered } = usePlayerAudioApi({
|
|
57
|
+
id: mappedInstanceId.value
|
|
58
|
+
});
|
|
59
|
+
usePlayerControlsApi({
|
|
60
|
+
id: mappedInstanceId.value,
|
|
61
|
+
barRef,
|
|
62
|
+
trackRef
|
|
63
|
+
});
|
|
64
|
+
const { idle } = useIdle(3e3);
|
|
65
|
+
provide(MagicPlayerInstanceId, mappedInstanceId.value);
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
const _component_magic_player_display_time = _resolveComponent("magic-player-display-time");
|
|
68
|
+
const _component_magic_player_timeline = _resolveComponent("magic-player-timeline");
|
|
69
|
+
return _openBlock(), _createElementBlock("div", {
|
|
70
|
+
class: "magic-player-audio-controls",
|
|
71
|
+
"data-touched": _unref(touched),
|
|
72
|
+
"data-playing": _unref(playing),
|
|
73
|
+
"data-paused": !_unref(playing),
|
|
74
|
+
"data-waiting": _unref(waiting),
|
|
75
|
+
"data-idle": _unref(idle),
|
|
76
|
+
"data-hover": _unref(mouseEntered)
|
|
77
|
+
}, [
|
|
78
|
+
_createElementVNode("div", _hoisted_2, [
|
|
79
|
+
_createElementVNode(
|
|
80
|
+
"div",
|
|
81
|
+
_hoisted_3,
|
|
82
|
+
[
|
|
83
|
+
_createElementVNode("div", _hoisted_4, [
|
|
84
|
+
!_unref(playing) ? (_openBlock(), _createElementBlock("button", {
|
|
85
|
+
key: 0,
|
|
86
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
87
|
+
(...args) => _unref(play) && _unref(play)(...args))
|
|
88
|
+
}, [
|
|
89
|
+
_renderSlot(_ctx.$slots, "playIcon", {}, () => [
|
|
90
|
+
_createVNode(IconPlay)
|
|
91
|
+
])
|
|
92
|
+
])) : (_openBlock(), _createElementBlock("button", {
|
|
93
|
+
key: 1,
|
|
94
|
+
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
95
|
+
(...args) => _unref(pause) && _unref(pause)(...args))
|
|
96
|
+
}, [
|
|
97
|
+
_renderSlot(_ctx.$slots, "pauseIcon", {}, () => [
|
|
98
|
+
_createVNode(IconPause)
|
|
99
|
+
])
|
|
100
|
+
]))
|
|
101
|
+
]),
|
|
102
|
+
_createElementVNode("div", _hoisted_5, [
|
|
103
|
+
_createVNode(_component_magic_player_display_time, { type: "current" })
|
|
104
|
+
]),
|
|
105
|
+
_createElementVNode("div", _hoisted_6, [
|
|
106
|
+
_createElementVNode(
|
|
107
|
+
"div",
|
|
108
|
+
_hoisted_7,
|
|
109
|
+
[
|
|
110
|
+
_createVNode(_component_magic_player_timeline)
|
|
111
|
+
],
|
|
112
|
+
512
|
|
113
|
+
/* NEED_PATCH */
|
|
114
|
+
)
|
|
115
|
+
]),
|
|
116
|
+
_createElementVNode("div", _hoisted_8, [
|
|
117
|
+
_createVNode(_component_magic_player_display_time, { type: "duration" })
|
|
118
|
+
])
|
|
119
|
+
],
|
|
120
|
+
512
|
|
121
|
+
/* NEED_PATCH */
|
|
122
|
+
)
|
|
123
|
+
])
|
|
124
|
+
], 8, _hoisted_1);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import IconPlay from './icons/Play.vue.js';
|
|
2
|
+
import IconPause from './icons/Pause.vue.js';
|
|
3
|
+
interface MagicAudioPlayerControlsProps {
|
|
4
|
+
instanceId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const playing: import("vue").ShallowRef<boolean, boolean>, waiting: import("vue").ShallowRef<boolean, boolean>;
|
|
7
|
+
declare const play: () => void, pause: () => void, touched: import("vue").ShallowRef<boolean, boolean>, mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
8
|
+
declare const idle: import("vue").Ref<boolean, boolean>;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_1: {}, __VLS_6: {};
|
|
11
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
12
|
+
playIcon?: (props: typeof __VLS_1) => any;
|
|
13
|
+
} & {
|
|
14
|
+
pauseIcon?: (props: typeof __VLS_6) => any;
|
|
15
|
+
}>;
|
|
16
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicAudioPlayerControlsProps, {
|
|
17
|
+
IconPlay: typeof IconPlay;
|
|
18
|
+
IconPause: typeof IconPause;
|
|
19
|
+
playing: typeof playing;
|
|
20
|
+
waiting: typeof waiting;
|
|
21
|
+
play: typeof play;
|
|
22
|
+
pause: typeof pause;
|
|
23
|
+
touched: typeof touched;
|
|
24
|
+
mouseEntered: typeof mouseEntered;
|
|
25
|
+
idle: typeof idle;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAudioPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicAudioPlayerControlsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAudioPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -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,5 @@
|
|
|
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, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerDisplayTimeProps> & Readonly<{}>, {
|
|
6
|
-
type: "current" | "remaining" | "duration";
|
|
7
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
4
|
+
declare const _default: import("vue").DefineComponent<MagicPlayerDisplayTimeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerDisplayTimeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
5
|
export default _default;
|
|
@@ -1,120 +1,133 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
image = new Image()
|
|
71
|
-
image.src = storyboard.value.url
|
|
72
|
-
await image.decode()
|
|
73
|
-
|
|
74
|
-
context = canvasRef.value.getContext('2d')!
|
|
75
|
-
context.drawImage(image, 0, 0)
|
|
76
|
-
} catch (e: any) {
|
|
77
|
-
console.error('Can not initialize timeine preview.', e)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function drawFrame(time: number) {
|
|
82
|
-
if (!storyboard.value || !context || !image) return
|
|
83
|
-
|
|
84
|
-
const { tile_height, tile_width, tiles } = storyboard.value
|
|
85
|
-
|
|
86
|
-
let closestIndex = -1
|
|
87
|
-
let minDifference = Infinity
|
|
88
|
-
|
|
89
|
-
for (let i = 0; i < tiles.length; i++) {
|
|
90
|
-
const { start } = tiles[i]
|
|
91
|
-
const difference = Math.abs(start - time)
|
|
92
|
-
|
|
93
|
-
if (difference < minDifference) {
|
|
94
|
-
minDifference = difference
|
|
95
|
-
closestIndex = i
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
3
|
+
import { createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
|
+
const _hoisted_1 = ["width", "height"];
|
|
5
|
+
import {
|
|
6
|
+
shallowRef,
|
|
7
|
+
onMounted,
|
|
8
|
+
watch,
|
|
9
|
+
computed,
|
|
10
|
+
inject,
|
|
11
|
+
useTemplateRef
|
|
12
|
+
} from "vue";
|
|
13
|
+
import { useDevicePixelRatio } from "@vueuse/core";
|
|
14
|
+
import { usePlayerControlsApi } from "../composables/private/usePlayerControlsApi";
|
|
15
|
+
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
16
|
+
export default /* @__PURE__ */ _defineComponent({
|
|
17
|
+
__name: "MagicPlayerMuxPopover",
|
|
18
|
+
props: {
|
|
19
|
+
playbackId: { type: String, required: false }
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const instanceId = inject(MagicPlayerInstanceId, void 0);
|
|
23
|
+
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
24
|
+
if (!instanceId || !injectedOptions) {
|
|
25
|
+
throw new Error(
|
|
26
|
+
"MagicPlayerMuxPopover must be nested inside MagicPlayerVideoControls."
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
const { seekedTime } = usePlayerControlsApi({ id: instanceId });
|
|
30
|
+
const { pixelRatio } = useDevicePixelRatio();
|
|
31
|
+
const canvasRef = useTemplateRef("canvas");
|
|
32
|
+
const storyboard = shallowRef();
|
|
33
|
+
let context = void 0;
|
|
34
|
+
let image = void 0;
|
|
35
|
+
const thumbWidth = computed(() => {
|
|
36
|
+
if (!storyboard.value) return 0;
|
|
37
|
+
return storyboard.value.tile_width / pixelRatio.value;
|
|
38
|
+
});
|
|
39
|
+
const thumbHeight = computed(() => {
|
|
40
|
+
if (!storyboard.value) return 0;
|
|
41
|
+
return storyboard.value.tile_height / pixelRatio.value;
|
|
42
|
+
});
|
|
43
|
+
function getMuxId(url) {
|
|
44
|
+
const match = url?.match(/mux\.com\/([^\/]+)/);
|
|
45
|
+
return match?.[1]?.replace(/\.(m3u8|mp4)$/, "");
|
|
46
|
+
}
|
|
47
|
+
async function init() {
|
|
48
|
+
const parsedPlaybackId = getMuxId(injectedOptions?.src);
|
|
49
|
+
const mappedPlaybackId = __props.playbackId ?? parsedPlaybackId;
|
|
50
|
+
if (!mappedPlaybackId) {
|
|
51
|
+
console.error(
|
|
52
|
+
"MagicPlayerMuxPopover must be nested inside MagicPlayerProvider or a playbackId must be provided"
|
|
53
|
+
);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
storyboard.value = await fetch(
|
|
58
|
+
`https://image.mux.com/${mappedPlaybackId}/storyboard.json`
|
|
59
|
+
).then((res) => res.json());
|
|
60
|
+
if (!storyboard.value) throw new Error();
|
|
61
|
+
image = new Image();
|
|
62
|
+
image.src = storyboard.value.url;
|
|
63
|
+
await image.decode();
|
|
64
|
+
context = canvasRef.value?.getContext("2d");
|
|
65
|
+
context?.drawImage(image, 0, 0);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
console.error("Can not initialize timeine preview.", e);
|
|
68
|
+
}
|
|
96
69
|
}
|
|
70
|
+
function drawFrame(time) {
|
|
71
|
+
if (!storyboard.value || !context || !image) return;
|
|
72
|
+
const { tile_height, tile_width, tiles } = storyboard.value;
|
|
73
|
+
let closestIndex = -1;
|
|
74
|
+
let minDifference = Infinity;
|
|
75
|
+
for (let i = 0; i < tiles.length; i++) {
|
|
76
|
+
const { start } = tiles[i];
|
|
77
|
+
const difference = Math.abs(start - time);
|
|
78
|
+
if (difference < minDifference) {
|
|
79
|
+
minDifference = difference;
|
|
80
|
+
closestIndex = i;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const tile = tiles[closestIndex];
|
|
84
|
+
context.drawImage(
|
|
85
|
+
image,
|
|
86
|
+
tile.x,
|
|
87
|
+
tile.y,
|
|
88
|
+
tile_width,
|
|
89
|
+
tile_height,
|
|
90
|
+
0,
|
|
91
|
+
0,
|
|
92
|
+
tile_width,
|
|
93
|
+
tile_height
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
onMounted(init);
|
|
97
|
+
watch(() => seekedTime?.value, drawFrame);
|
|
98
|
+
return (_ctx, _cache) => {
|
|
99
|
+
return _openBlock(), _createElementBlock(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
style: _normalizeStyle({
|
|
103
|
+
width: `${thumbWidth.value}px`,
|
|
104
|
+
height: `${thumbHeight.value}px`
|
|
105
|
+
}),
|
|
106
|
+
class: "magic-player-mux-popover"
|
|
107
|
+
},
|
|
108
|
+
[
|
|
109
|
+
_createElementVNode("canvas", {
|
|
110
|
+
ref: "canvas",
|
|
111
|
+
width: storyboard.value?.tile_width,
|
|
112
|
+
height: storyboard.value?.tile_height
|
|
113
|
+
}, null, 8, _hoisted_1)
|
|
114
|
+
],
|
|
115
|
+
4
|
|
116
|
+
/* STYLE */
|
|
117
|
+
);
|
|
118
|
+
};
|
|
97
119
|
}
|
|
98
|
-
|
|
99
|
-
const tile = tiles[closestIndex]
|
|
100
|
-
|
|
101
|
-
context.drawImage(
|
|
102
|
-
image,
|
|
103
|
-
tile.x,
|
|
104
|
-
tile.y,
|
|
105
|
-
tile_width,
|
|
106
|
-
tile_height,
|
|
107
|
-
0,
|
|
108
|
-
0,
|
|
109
|
-
tile_width,
|
|
110
|
-
tile_height
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
onMounted(init)
|
|
115
|
-
watch(() => seekedTime?.value, drawFrame)
|
|
120
|
+
});
|
|
116
121
|
</script>
|
|
117
122
|
|
|
118
123
|
<style>
|
|
119
|
-
.magic-player-mux-popover
|
|
124
|
+
.magic-player-mux-popover {
|
|
125
|
+
border-radius: var(--magic-player-popover-border-radius, 0.25rem);
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.magic-player-mux-popover canvas {
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: auto;
|
|
132
|
+
}
|
|
120
133
|
</style>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<MagicPlayerMuxPopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerMuxPopoverProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
1
|
+
interface MagicPlayerMuxPopoverProps {
|
|
2
|
+
playbackId?: string;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<MagicPlayerMuxPopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerMuxPopoverProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
5
|
export default _default;
|