@maas/vue-equipment 1.0.0-beta.3 → 1.0.0-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/composables/index.d.ts +5 -5
- package/dist/composables/index.js +23 -13
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.d.mts +2 -1
- package/dist/nuxt/module.json +2 -2
- package/dist/nuxt/module.mjs +32 -25
- package/dist/nuxt/types.d.mts +3 -1
- package/dist/plugins/.turbo/turbo-lint.log +1 -9
- package/dist/plugins/MagicAccordion/nuxt.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +61 -84
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +10 -24
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +17 -31
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +6 -20
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +57 -62
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +9 -24
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +34 -45
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +8 -22
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.mjs +4 -3
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +148 -154
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +7 -14
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +42 -52
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +6 -20
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +72 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +13 -25
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +37 -47
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +6 -20
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +61 -77
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +6 -22
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +23 -39
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +80 -86
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +9 -25
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +36 -48
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +8 -22
- package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.mjs +3 -2
- package/dist/plugins/MagicCommand/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicCommand/src/types/index.d.ts +3 -3
- package/dist/plugins/MagicCookie/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +34 -41
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +8 -22
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +19 -36
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +6 -20
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +42 -74
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +9 -14
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +3 -2
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.d.ts +2 -1
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.mjs +9 -5
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCookie/src/types/index.d.ts +3 -2
- package/dist/plugins/MagicDraggable/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +82 -100
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +6 -24
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +43 -63
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +2 -15
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +103 -53
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +6 -5
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +4 -3
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/MagicDrawer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +284 -323
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +18 -35
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +34 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.mjs +28 -10
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +16 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/composables/useMagicDrawer.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/types/index.mjs +1 -0
- package/dist/plugins/MagicDrawer/src/utils/defaultOptions.mjs +2 -2
- package/dist/plugins/MagicEmitter/nuxt.d.ts +1 -1
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +202 -100
- package/dist/plugins/MagicEmitter/src/types/index.d.ts +2 -0
- package/dist/plugins/MagicMarquee/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +38 -72
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +8 -24
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +8 -2
- package/dist/plugins/MagicMarquee/src/composables/useMagicMarquee.d.ts +1 -1
- package/dist/plugins/MagicMenu/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +51 -63
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +6 -20
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +180 -216
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +10 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +171 -198
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +8 -24
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +87 -113
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +13 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +82 -81
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +6 -22
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +63 -86
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +9 -23
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +94 -97
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +11 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +49 -61
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +8 -22
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +15 -5
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +4 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +35 -15
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +8 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +4 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +18 -6
- package/dist/plugins/MagicMenu/src/composables/useMagicMenu.mjs +1 -0
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicMenu/src/types/index.d.ts +2 -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/nuxt.d.ts +1 -1
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +134 -171
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +10 -25
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
- package/dist/plugins/MagicModal/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicModal/src/types/index.mjs +1 -0
- package/dist/plugins/MagicNoise/nuxt.d.ts +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +50 -81
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -10
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +10 -6
- package/dist/plugins/MagicNoise/src/types/index.d.ts +2 -0
- package/dist/plugins/MagicNoise/src/utils/defaultOptions.mjs +3 -1
- package/dist/plugins/MagicPie/index.d.ts +7 -0
- package/dist/plugins/MagicPie/index.mjs +8 -0
- package/dist/plugins/MagicPie/nuxt.d.ts +2 -0
- package/dist/plugins/MagicPie/nuxt.mjs +23 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +168 -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/nuxt.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +93 -65
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +123 -127
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +9 -25
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +32 -42
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +117 -103
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +134 -82
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +17 -13
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +20 -36
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +5 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +66 -56
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +6 -22
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +60 -109
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +118 -68
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +179 -210
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +24 -34
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +0 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +9 -52
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +8 -34
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +170 -234
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.d.ts +8 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.mjs +103 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +3 -17
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +59 -176
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerProvider.d.ts +6 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerProvider.mjs +34 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +3 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +19 -35
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +7 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +60 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +4 -8
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +43 -91
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +37 -52
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +53 -3
- package/dist/plugins/MagicPlayer/src/css/magic-player-audio-controls.css +0 -1
- package/dist/plugins/MagicPlayer/src/css/magic-player-timeline.css +5 -0
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +6 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +12 -1
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +75 -10
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.mjs +6 -1
- package/dist/plugins/MagicPlayer/src/utils/playbackDefaults.d.ts +3 -0
- package/dist/plugins/MagicPlayer/src/utils/playbackDefaults.mjs +7 -0
- package/dist/plugins/MagicScroll/nuxt.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +54 -61
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +6 -22
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +56 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +6 -22
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +26 -33
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +24 -21
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +63 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +8 -24
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +16 -6
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +41 -26
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/nuxt.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +90 -109
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +7 -16
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +53 -81
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +6 -23
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +2 -2
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +5 -5
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +23 -23
- package/dist/plugins/MagicToast/src/composables/private/useToastListener.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +33 -15
- package/dist/plugins/MagicToast/src/composables/private/useToastView.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.d.ts +1 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +10 -2
- package/dist/plugins/MagicToast/src/types/index.d.ts +3 -3
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/utils/css/animations/fade-down.css +9 -0
- package/dist/utils/css/animations.css +9 -22
- package/dist/utils/css/easings.css +9 -1
- package/dist/utils/css/keyframes.css +22 -0
- package/dist/utils/index.d.ts +9 -4
- package/dist/utils/index.js +39 -3
- package/dist/utils/index.js.map +1 -1
- package/package.json +13 -9
- package/dist/nuxt/module.cjs +0 -5
- package/dist/nuxt/module.d.ts +0 -9
- package/dist/nuxt/types.d.ts +0 -1
- package/dist/plugins/MagicAccordion/demo/data/footer.json +0 -117
- package/dist/plugins/MagicCommand/demo/data/about.json +0 -3
- package/dist/plugins/MagicCommand/demo/data/search.json +0 -594
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +0 -15
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.mjs +0 -9
- package/dist/utils/css/transitions.css +0 -8
- /package/dist/utils/css/{transitions → animations}/clip.css +0 -0
- /package/dist/utils/css/{transitions → animations}/fade-up.css +0 -0
- /package/dist/utils/css/{transitions → animations}/fade.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-btt.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-ltr.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-rtl.css +0 -0
- /package/dist/utils/css/{transitions → animations}/slide-ttb.css +0 -0
- /package/dist/utils/css/{transitions → animations}/zoom.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/auto-size-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/clip-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/clip-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-down-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-down-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-up-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/fade-up-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/flip-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/flip-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-btt-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-btt-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ltr-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ltr-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-rtl-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-rtl-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ttb-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/slide-ttb-out.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/squash-y.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/zoom-in.css +0 -0
- /package/dist/utils/css/{animations → keyframes}/zoom-out.css +0 -0
|
@@ -1,112 +1,126 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{
|
|
4
|
+
width: `${thumbWidth}px`,
|
|
5
|
+
height: `${thumbHeight}px`
|
|
6
|
+
}"
|
|
7
|
+
class="magic-player-mux-popover"
|
|
8
|
+
>
|
|
9
|
+
<canvas
|
|
10
|
+
ref="canvas"
|
|
11
|
+
:width="storyboard?.tile_width"
|
|
12
|
+
:height="storyboard?.tile_height"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
import {
|
|
19
|
+
toRefs,
|
|
20
|
+
shallowRef,
|
|
21
|
+
onMounted,
|
|
22
|
+
watch,
|
|
23
|
+
computed,
|
|
24
|
+
inject,
|
|
25
|
+
useTemplateRef
|
|
26
|
+
} from "vue";
|
|
6
27
|
import { useDevicePixelRatio } from "@vueuse/core";
|
|
7
|
-
import {
|
|
28
|
+
import { usePlayerState } from "../composables/private/usePlayerState";
|
|
8
29
|
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
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
|
-
}
|
|
30
|
+
const { playbackId } = defineProps({
|
|
31
|
+
playbackId: { type: String, required: false }
|
|
32
|
+
});
|
|
33
|
+
const instanceId = inject(MagicPlayerInstanceId, void 0);
|
|
34
|
+
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
35
|
+
if (!instanceId || !injectedOptions) {
|
|
36
|
+
throw new Error(
|
|
37
|
+
"MagicPlayerMuxPopover must be nested inside MagicPlayerVideoControls."
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
const { initializeState } = usePlayerState(instanceId);
|
|
41
|
+
const state = initializeState();
|
|
42
|
+
const { seekedTime } = toRefs(state);
|
|
43
|
+
const { pixelRatio } = useDevicePixelRatio();
|
|
44
|
+
const canvasRef = useTemplateRef("canvas");
|
|
45
|
+
const storyboard = shallowRef();
|
|
46
|
+
let context = void 0;
|
|
47
|
+
let image = void 0;
|
|
48
|
+
const thumbWidth = computed(() => {
|
|
49
|
+
if (!storyboard.value) {
|
|
50
|
+
return 0;
|
|
51
|
+
}
|
|
52
|
+
return storyboard.value.tile_width / pixelRatio.value;
|
|
53
|
+
});
|
|
54
|
+
const thumbHeight = computed(() => {
|
|
55
|
+
if (!storyboard.value) {
|
|
56
|
+
return 0;
|
|
57
|
+
}
|
|
58
|
+
return storyboard.value.tile_height / pixelRatio.value;
|
|
59
|
+
});
|
|
60
|
+
function getMuxId(url) {
|
|
61
|
+
const match = url?.match(/mux\.com\/([^\/]+)/);
|
|
62
|
+
return match?.[1]?.replace(/\.(m3u8|mp4)$/, "");
|
|
63
|
+
}
|
|
64
|
+
function drawFrame(time) {
|
|
65
|
+
if (!storyboard.value || !context || !image || !time) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const { tile_height, tile_width, tiles } = storyboard.value;
|
|
69
|
+
let closestIndex = -1;
|
|
70
|
+
let minDifference = Infinity;
|
|
71
|
+
for (let i = 0; i < tiles.length; i++) {
|
|
72
|
+
const { start } = tiles[i];
|
|
73
|
+
const difference = Math.abs(start - time);
|
|
74
|
+
if (difference < minDifference) {
|
|
75
|
+
minDifference = difference;
|
|
76
|
+
closestIndex = i;
|
|
57
77
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
}
|
|
79
|
+
const tile = tiles[closestIndex];
|
|
80
|
+
context.drawImage(
|
|
81
|
+
image,
|
|
82
|
+
tile.x,
|
|
83
|
+
tile.y,
|
|
84
|
+
tile_width,
|
|
85
|
+
tile_height,
|
|
86
|
+
0,
|
|
87
|
+
0,
|
|
88
|
+
tile_width,
|
|
89
|
+
tile_height
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
async function initialize() {
|
|
93
|
+
const parsedPlaybackId = getMuxId(injectedOptions?.src);
|
|
94
|
+
const mappedPlaybackId = playbackId ?? parsedPlaybackId;
|
|
95
|
+
if (!mappedPlaybackId) {
|
|
96
|
+
console.error(
|
|
97
|
+
"MagicPlayerMuxPopover must be nested inside MagicPlayerProvider or a playbackId must be provided"
|
|
98
|
+
);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
storyboard.value = await fetch(
|
|
103
|
+
`https://image.mux.com/${mappedPlaybackId}/storyboard.json`
|
|
104
|
+
).then((res) => res.json());
|
|
105
|
+
if (!storyboard.value) {
|
|
106
|
+
throw new Error();
|
|
83
107
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
width: `${thumbWidth.value}px`,
|
|
92
|
-
height: `${thumbHeight.value}px`
|
|
93
|
-
}),
|
|
94
|
-
class: "magic-player-mux-popover"
|
|
95
|
-
},
|
|
96
|
-
[
|
|
97
|
-
_createElementVNode("canvas", {
|
|
98
|
-
ref_key: "canvasRef",
|
|
99
|
-
ref: canvasRef,
|
|
100
|
-
width: storyboard.value?.tile_width,
|
|
101
|
-
height: storyboard.value?.tile_height
|
|
102
|
-
}, null, 8, _hoisted_1)
|
|
103
|
-
],
|
|
104
|
-
4
|
|
105
|
-
/* STYLE */
|
|
106
|
-
);
|
|
107
|
-
};
|
|
108
|
+
image = new Image();
|
|
109
|
+
image.src = storyboard.value.url;
|
|
110
|
+
await image.decode();
|
|
111
|
+
context = canvasRef.value?.getContext("2d");
|
|
112
|
+
drawFrame(seekedTime.value);
|
|
113
|
+
} catch (e) {
|
|
114
|
+
console.error("Can not initialize timeline preview", e);
|
|
108
115
|
}
|
|
116
|
+
}
|
|
117
|
+
onMounted(() => {
|
|
118
|
+
initialize();
|
|
109
119
|
});
|
|
120
|
+
watch(
|
|
121
|
+
() => seekedTime?.value,
|
|
122
|
+
(value) => drawFrame(value)
|
|
123
|
+
);
|
|
110
124
|
</script>
|
|
111
125
|
|
|
112
126
|
<style>
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
interface MagicPlayerMuxPopoverProps {
|
|
2
2
|
playbackId?: string;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<
|
|
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>;
|
|
5
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
|
-
};
|
|
@@ -1,84 +1,121 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="magic-player-overlay"
|
|
4
|
+
:data-playing="playing"
|
|
5
|
+
:data-touched="touched"
|
|
6
|
+
:data-paused="paused"
|
|
7
|
+
:data-started="started"
|
|
8
|
+
:data-waiting="waiting"
|
|
9
|
+
:data-loaded="loaded"
|
|
10
|
+
:data-muted="muted"
|
|
11
|
+
:data-idle="idle"
|
|
12
|
+
:data-hover="mouseEntered"
|
|
13
|
+
@click.stop="togglePlay"
|
|
14
|
+
>
|
|
15
|
+
<transition :name="mappedOverlayTransition">
|
|
16
|
+
<div v-if="isVisible">
|
|
17
|
+
<slot>
|
|
18
|
+
<transition :name="mappedIconsTransition">
|
|
19
|
+
<button
|
|
20
|
+
v-if="defferedWaiting && started"
|
|
21
|
+
class="magic-player-overlay__button"
|
|
22
|
+
>
|
|
23
|
+
<slot name="waitingIcon">
|
|
24
|
+
<icon-waiting />
|
|
25
|
+
</slot>
|
|
26
|
+
</button>
|
|
27
|
+
<button
|
|
28
|
+
v-else-if="paused || !started"
|
|
29
|
+
class="magic-player-overlay__button"
|
|
30
|
+
>
|
|
31
|
+
<slot name="playIcon">
|
|
32
|
+
<icon-play />
|
|
33
|
+
</slot>
|
|
34
|
+
</button>
|
|
35
|
+
<button
|
|
36
|
+
v-else-if="started && !paused"
|
|
37
|
+
class="magic-player-overlay__button"
|
|
38
|
+
>
|
|
39
|
+
<slot name="pauseIcon">
|
|
40
|
+
<icon-pause />
|
|
41
|
+
</slot>
|
|
42
|
+
</button>
|
|
43
|
+
</transition>
|
|
44
|
+
</slot>
|
|
45
|
+
</div>
|
|
46
|
+
</transition>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script setup>
|
|
51
|
+
import { watch, ref, computed, inject, toRefs } from "vue";
|
|
18
52
|
import { useIdle } from "@vueuse/core";
|
|
19
53
|
import IconPlay from "./icons/Play.vue";
|
|
20
54
|
import IconPause from "./icons/Pause.vue";
|
|
21
55
|
import IconWaiting from "./icons/Waiting.vue";
|
|
22
|
-
import {
|
|
56
|
+
import { usePlayerState } from "../composables/private/usePlayerState";
|
|
23
57
|
import { usePlayerVideoApi } from "../composables/private/usePlayerVideoApi";
|
|
24
|
-
import { MagicPlayerInstanceId } from "../symbols";
|
|
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
|
-
])) : (_openBlock(), _createElementBlock("button", _hoisted_4, [
|
|
69
|
-
_renderSlot(_ctx.$slots, "pauseIcon", {}, () => [
|
|
70
|
-
_createVNode(IconPause)
|
|
71
|
-
])
|
|
72
|
-
]))
|
|
73
|
-
],
|
|
74
|
-
64
|
|
75
|
-
/* STABLE_FRAGMENT */
|
|
76
|
-
))
|
|
77
|
-
])
|
|
78
|
-
], 8, _hoisted_1);
|
|
79
|
-
};
|
|
58
|
+
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
59
|
+
const { transition } = defineProps({
|
|
60
|
+
transition: { type: Object, required: false }
|
|
61
|
+
});
|
|
62
|
+
const instanceId = inject(MagicPlayerInstanceId, void 0);
|
|
63
|
+
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
64
|
+
if (!instanceId) {
|
|
65
|
+
throw new Error(
|
|
66
|
+
"MagicPlayerOverlay must be nested inside MagicPlayerProvider."
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
const { initializeState } = usePlayerState(instanceId);
|
|
70
|
+
const state = initializeState();
|
|
71
|
+
const {
|
|
72
|
+
mouseEntered,
|
|
73
|
+
playing,
|
|
74
|
+
paused,
|
|
75
|
+
started,
|
|
76
|
+
touched,
|
|
77
|
+
muted,
|
|
78
|
+
loaded,
|
|
79
|
+
waiting,
|
|
80
|
+
hasOverlay
|
|
81
|
+
} = toRefs(state);
|
|
82
|
+
hasOverlay.value = true;
|
|
83
|
+
const mappedOverlayTransition = computed(
|
|
84
|
+
() => transition?.overlay ?? injectedOptions?.transition?.overlay
|
|
85
|
+
);
|
|
86
|
+
const mappedIconsTransition = computed(
|
|
87
|
+
() => transition?.icons ?? injectedOptions?.transition?.icons
|
|
88
|
+
);
|
|
89
|
+
const { togglePlay } = usePlayerVideoApi({
|
|
90
|
+
id: instanceId
|
|
91
|
+
});
|
|
92
|
+
const { idle } = useIdle(injectedOptions?.threshold?.idle);
|
|
93
|
+
const isVisible = computed(() => {
|
|
94
|
+
switch (true) {
|
|
95
|
+
case (playing.value && idle.value):
|
|
96
|
+
case (playing.value && !mouseEntered.value):
|
|
97
|
+
case (injectedOptions?.autoplay && (!started.value || !mouseEntered.value)):
|
|
98
|
+
return false;
|
|
99
|
+
default:
|
|
100
|
+
return true;
|
|
80
101
|
}
|
|
81
102
|
});
|
|
103
|
+
const defferedWaiting = ref(false);
|
|
104
|
+
watch(
|
|
105
|
+
() => waiting.value,
|
|
106
|
+
(value) => {
|
|
107
|
+
switch (value) {
|
|
108
|
+
case true:
|
|
109
|
+
defferedWaiting.value = true;
|
|
110
|
+
break;
|
|
111
|
+
case false:
|
|
112
|
+
setTimeout(() => {
|
|
113
|
+
defferedWaiting.value = false;
|
|
114
|
+
}, 500);
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
);
|
|
82
119
|
</script>
|
|
83
120
|
|
|
84
121
|
<style>
|
|
@@ -87,11 +124,16 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
87
124
|
inset: 0;
|
|
88
125
|
background-color: var(--magic-player-overlay-background, rgba(0, 0, 0, 0.3));
|
|
89
126
|
color: var(--magic-player-overlay-color, rgba(255, 255, 255, 1));
|
|
90
|
-
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.magic-player-overlay div {
|
|
131
|
+
position: relative;
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 100%;
|
|
91
134
|
display: flex;
|
|
92
135
|
align-items: center;
|
|
93
136
|
justify-content: center;
|
|
94
|
-
cursor: pointer;
|
|
95
137
|
}
|
|
96
138
|
|
|
97
139
|
.magic-player-overlay__button {
|
|
@@ -103,15 +145,25 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
103
145
|
outline: none;
|
|
104
146
|
appearance: none;
|
|
105
147
|
cursor: pointer;
|
|
106
|
-
width: var(--magic-player-overlay-button-size,
|
|
107
|
-
height: var(--magic-player-overlay-button-size,
|
|
148
|
+
width: var(--magic-player-overlay-button-size, 2rem);
|
|
149
|
+
height: var(--magic-player-overlay-button-size, 2rem);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.magic-player-overlay-enter-active {
|
|
153
|
+
animation: fade-in 150ms ease;
|
|
108
154
|
}
|
|
109
155
|
|
|
110
|
-
.magic-player-overlay
|
|
111
|
-
|
|
156
|
+
.magic-player-overlay-leave-active {
|
|
157
|
+
animation: fade-out 150ms ease;
|
|
112
158
|
}
|
|
113
159
|
|
|
114
|
-
.magic-player-
|
|
115
|
-
|
|
160
|
+
.magic-player-icons-enter-active {
|
|
161
|
+
animation: none;
|
|
162
|
+
position: absolute;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.magic-player-icons-leave-active {
|
|
166
|
+
animation: none;
|
|
167
|
+
position: absolute;
|
|
116
168
|
}
|
|
117
169
|
</style>
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
waitingIcon?(_: {}): any;
|
|
6
|
-
playIcon?(_: {}): any;
|
|
7
|
-
pauseIcon?(_: {}): any;
|
|
1
|
+
interface MagicPlayerOverlayProps {
|
|
2
|
+
transition?: {
|
|
3
|
+
overlay?: string;
|
|
4
|
+
icons?: string;
|
|
8
5
|
};
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
}
|
|
7
|
+
declare var __VLS_5: {}, __VLS_11: {}, __VLS_16: {}, __VLS_21: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_5) => any;
|
|
10
|
+
} & {
|
|
11
|
+
waitingIcon?: (props: typeof __VLS_11) => any;
|
|
12
|
+
} & {
|
|
13
|
+
playIcon?: (props: typeof __VLS_16) => any;
|
|
14
|
+
} & {
|
|
15
|
+
pauseIcon?: (props: typeof __VLS_21) => any;
|
|
11
16
|
};
|
|
12
|
-
|
|
13
|
-
declare const
|
|
14
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicPlayerOverlayProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerOverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
15
19
|
export default _default;
|
|
16
|
-
type
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
21
|
new (): {
|
|
18
22
|
$slots: S;
|
|
19
23
|
};
|
|
@@ -1,40 +1,24 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div v-show="isVisible" class="magic-player-poster">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { inject, toRefs, computed } from "vue";
|
|
9
|
+
import { usePlayerState } from "../composables/private/usePlayerState";
|
|
8
10
|
import { MagicPlayerInstanceId } from "../symbols";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
const { touched } = usePlayerVideoApi({
|
|
22
|
-
id: instanceId
|
|
23
|
-
});
|
|
24
|
-
return (_ctx, _cache) => {
|
|
25
|
-
return _withDirectives((_openBlock(), _createElementBlock(
|
|
26
|
-
"div",
|
|
27
|
-
_hoisted_1,
|
|
28
|
-
[
|
|
29
|
-
_renderSlot(_ctx.$slots, "default")
|
|
30
|
-
],
|
|
31
|
-
512
|
|
32
|
-
/* NEED_PATCH */
|
|
33
|
-
)), [
|
|
34
|
-
[_vShow, !_unref(loaded) || !_unref(touched)]
|
|
35
|
-
]);
|
|
36
|
-
};
|
|
37
|
-
}
|
|
11
|
+
const instanceId = inject(MagicPlayerInstanceId, void 0);
|
|
12
|
+
if (!instanceId) {
|
|
13
|
+
throw new Error(
|
|
14
|
+
"MagicPlayerPoster must be nested inside MagicPlayerProvider."
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
const { initializeState } = usePlayerState(instanceId);
|
|
18
|
+
const state = initializeState();
|
|
19
|
+
const { loaded, started } = toRefs(state);
|
|
20
|
+
const isVisible = computed(() => {
|
|
21
|
+
return !loaded.value || !started.value;
|
|
38
22
|
});
|
|
39
23
|
</script>
|
|
40
24
|
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: any;
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
4
|
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
5
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
-
declare const _default:
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
12
7
|
export default _default;
|
|
13
|
-
type
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
9
|
new (): {
|
|
15
10
|
$slots: S;
|
|
16
11
|
};
|