@maas/vue-equipment 0.39.2 → 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 -17
- 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 +2 -4
- 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 -56
- 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
|
@@ -13,13 +13,9 @@ export function usePlayerControlsApi(args) {
|
|
|
13
13
|
const barRect = ref(void 0);
|
|
14
14
|
const trackRect = ref(void 0);
|
|
15
15
|
const popoverRect = ref(void 0);
|
|
16
|
-
const { trackRef, barRef, popoverRef } = args;
|
|
17
|
-
const { buffered, duration, playing, currentTime } = usePlayerMediaApi({
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
const { play, pause, seek } = usePlayerVideoApi({
|
|
21
|
-
id: args.id
|
|
22
|
-
});
|
|
16
|
+
const { id, trackRef, barRef, popoverRef } = args;
|
|
17
|
+
const { buffered, duration, playing, currentTime } = usePlayerMediaApi({ id });
|
|
18
|
+
const { play, pause, seek } = usePlayerVideoApi({ id });
|
|
23
19
|
const dragging = ref(false);
|
|
24
20
|
const mouseEntered = ref(false);
|
|
25
21
|
const seekedTime = ref(0);
|
|
@@ -119,8 +115,8 @@ export function usePlayerControlsApi(args) {
|
|
|
119
115
|
defaultWindow,
|
|
120
116
|
"resize",
|
|
121
117
|
() => {
|
|
122
|
-
getTimelineTrackSize;
|
|
123
|
-
getPopoverSizes;
|
|
118
|
+
getTimelineTrackSize();
|
|
119
|
+
getPopoverSizes();
|
|
124
120
|
},
|
|
125
121
|
{
|
|
126
122
|
passive: true
|
|
@@ -128,7 +124,7 @@ export function usePlayerControlsApi(args) {
|
|
|
128
124
|
);
|
|
129
125
|
const emitter = usePlayerStateEmitter();
|
|
130
126
|
emitter.on("update", (payload) => {
|
|
131
|
-
if (payload.id !== toValue(
|
|
127
|
+
if (payload.id !== toValue(id)) return;
|
|
132
128
|
if (payload.api === "controls") {
|
|
133
129
|
switch (payload.key) {
|
|
134
130
|
case "dragging": {
|
|
@@ -176,7 +172,7 @@ export function usePlayerControlsApi(args) {
|
|
|
176
172
|
});
|
|
177
173
|
watch(dragging, (value) => {
|
|
178
174
|
emitter.emit("update", {
|
|
179
|
-
id: toValue(
|
|
175
|
+
id: toValue(id),
|
|
180
176
|
api: "controls",
|
|
181
177
|
key: "dragging",
|
|
182
178
|
value
|
|
@@ -184,7 +180,7 @@ export function usePlayerControlsApi(args) {
|
|
|
184
180
|
});
|
|
185
181
|
watch(mouseEntered, (value) => {
|
|
186
182
|
emitter.emit("update", {
|
|
187
|
-
id: toValue(
|
|
183
|
+
id: toValue(id),
|
|
188
184
|
api: "controls",
|
|
189
185
|
key: "mouseEntered",
|
|
190
186
|
value
|
|
@@ -192,7 +188,7 @@ export function usePlayerControlsApi(args) {
|
|
|
192
188
|
});
|
|
193
189
|
watch(seekedTime, (value) => {
|
|
194
190
|
emitter.emit("update", {
|
|
195
|
-
id: toValue(
|
|
191
|
+
id: toValue(id),
|
|
196
192
|
api: "controls",
|
|
197
193
|
key: "seekedTime",
|
|
198
194
|
value
|
|
@@ -200,7 +196,7 @@ export function usePlayerControlsApi(args) {
|
|
|
200
196
|
});
|
|
201
197
|
watch(seekedPercentage, (value) => {
|
|
202
198
|
emitter.emit("update", {
|
|
203
|
-
id: toValue(
|
|
199
|
+
id: toValue(id),
|
|
204
200
|
api: "controls",
|
|
205
201
|
key: "seekedPercentage",
|
|
206
202
|
value
|
|
@@ -208,7 +204,7 @@ export function usePlayerControlsApi(args) {
|
|
|
208
204
|
});
|
|
209
205
|
watch(scrubbedPercentage, (value) => {
|
|
210
206
|
emitter.emit("update", {
|
|
211
|
-
id: toValue(
|
|
207
|
+
id: toValue(id),
|
|
212
208
|
api: "controls",
|
|
213
209
|
key: "scrubbedPercentage",
|
|
214
210
|
value
|
|
@@ -216,7 +212,7 @@ export function usePlayerControlsApi(args) {
|
|
|
216
212
|
});
|
|
217
213
|
watch(bufferedPercentage, (value) => {
|
|
218
214
|
emitter.emit("update", {
|
|
219
|
-
id: toValue(
|
|
215
|
+
id: toValue(id),
|
|
220
216
|
api: "controls",
|
|
221
217
|
key: "bufferedPercentage",
|
|
222
218
|
value
|
|
@@ -224,7 +220,7 @@ export function usePlayerControlsApi(args) {
|
|
|
224
220
|
});
|
|
225
221
|
watch(thumbPercentage, (value) => {
|
|
226
222
|
emitter.emit("update", {
|
|
227
|
-
id: toValue(
|
|
223
|
+
id: toValue(id),
|
|
228
224
|
api: "controls",
|
|
229
225
|
key: "thumbPercentage",
|
|
230
226
|
value
|
|
@@ -232,7 +228,7 @@ export function usePlayerControlsApi(args) {
|
|
|
232
228
|
});
|
|
233
229
|
watch(popoverOffsetX, (value) => {
|
|
234
230
|
emitter.emit("update", {
|
|
235
|
-
id: toValue(
|
|
231
|
+
id: toValue(id),
|
|
236
232
|
api: "controls",
|
|
237
233
|
key: "popoverOffsetX",
|
|
238
234
|
value
|
|
@@ -240,7 +236,7 @@ export function usePlayerControlsApi(args) {
|
|
|
240
236
|
});
|
|
241
237
|
watch(resumePlay, (value) => {
|
|
242
238
|
emitter.emit("update", {
|
|
243
|
-
id: toValue(
|
|
239
|
+
id: toValue(id),
|
|
244
240
|
api: "controls",
|
|
245
241
|
key: "resumePlay",
|
|
246
242
|
value
|
|
@@ -249,7 +245,7 @@ export function usePlayerControlsApi(args) {
|
|
|
249
245
|
watch(barRect, (value) => {
|
|
250
246
|
if (!value) return;
|
|
251
247
|
emitter.emit("update", {
|
|
252
|
-
id: toValue(
|
|
248
|
+
id: toValue(id),
|
|
253
249
|
api: "controls",
|
|
254
250
|
key: "barRect",
|
|
255
251
|
value
|
|
@@ -258,7 +254,7 @@ export function usePlayerControlsApi(args) {
|
|
|
258
254
|
watch(trackRect, (value) => {
|
|
259
255
|
if (!value) return;
|
|
260
256
|
emitter.emit("update", {
|
|
261
|
-
id: toValue(
|
|
257
|
+
id: toValue(id),
|
|
262
258
|
api: "controls",
|
|
263
259
|
key: "trackRect",
|
|
264
260
|
value
|
|
@@ -267,7 +263,7 @@ export function usePlayerControlsApi(args) {
|
|
|
267
263
|
watch(popoverRect, (value) => {
|
|
268
264
|
if (!value) return;
|
|
269
265
|
emitter.emit("update", {
|
|
270
|
-
id: toValue(
|
|
266
|
+
id: toValue(id),
|
|
271
267
|
api: "controls",
|
|
272
268
|
key: "popoverRect",
|
|
273
269
|
value
|
|
@@ -13,7 +13,7 @@ export function usePlayerMediaApi(args) {
|
|
|
13
13
|
const stalled = ref(false);
|
|
14
14
|
const buffered = ref([]);
|
|
15
15
|
const muted = ref(false);
|
|
16
|
-
const { mediaRef } = args;
|
|
16
|
+
const { mediaRef, id } = args;
|
|
17
17
|
const remainingTime = computed(() => duration.value - currentTime.value);
|
|
18
18
|
function timeRangeToArray(timeRanges) {
|
|
19
19
|
let ranges = [];
|
|
@@ -122,7 +122,7 @@ export function usePlayerMediaApi(args) {
|
|
|
122
122
|
});
|
|
123
123
|
const emitter = usePlayerStateEmitter();
|
|
124
124
|
emitter.on("update", (payload) => {
|
|
125
|
-
if (payload.id !== toValue(
|
|
125
|
+
if (payload.id !== toValue(id)) return;
|
|
126
126
|
if (payload.api === "media") {
|
|
127
127
|
switch (payload.key) {
|
|
128
128
|
case "currentTime":
|
|
@@ -163,7 +163,7 @@ export function usePlayerMediaApi(args) {
|
|
|
163
163
|
});
|
|
164
164
|
watch(currentTime, (value) => {
|
|
165
165
|
emitter.emit("update", {
|
|
166
|
-
id: toValue(
|
|
166
|
+
id: toValue(id),
|
|
167
167
|
api: "media",
|
|
168
168
|
key: "currentTime",
|
|
169
169
|
value
|
|
@@ -171,7 +171,7 @@ export function usePlayerMediaApi(args) {
|
|
|
171
171
|
});
|
|
172
172
|
watch(duration, (value) => {
|
|
173
173
|
emitter.emit("update", {
|
|
174
|
-
id: toValue(
|
|
174
|
+
id: toValue(id),
|
|
175
175
|
api: "media",
|
|
176
176
|
key: "duration",
|
|
177
177
|
value
|
|
@@ -179,7 +179,7 @@ export function usePlayerMediaApi(args) {
|
|
|
179
179
|
});
|
|
180
180
|
watch(seeking, (value) => {
|
|
181
181
|
emitter.emit("update", {
|
|
182
|
-
id: toValue(
|
|
182
|
+
id: toValue(id),
|
|
183
183
|
api: "media",
|
|
184
184
|
key: "seeking",
|
|
185
185
|
value
|
|
@@ -187,7 +187,7 @@ export function usePlayerMediaApi(args) {
|
|
|
187
187
|
});
|
|
188
188
|
watch(volume, (value) => {
|
|
189
189
|
emitter.emit("update", {
|
|
190
|
-
id: toValue(
|
|
190
|
+
id: toValue(id),
|
|
191
191
|
api: "media",
|
|
192
192
|
key: "volume",
|
|
193
193
|
value
|
|
@@ -195,7 +195,7 @@ export function usePlayerMediaApi(args) {
|
|
|
195
195
|
});
|
|
196
196
|
watch(rate, (value) => {
|
|
197
197
|
emitter.emit("update", {
|
|
198
|
-
id: toValue(
|
|
198
|
+
id: toValue(id),
|
|
199
199
|
api: "media",
|
|
200
200
|
key: "rate",
|
|
201
201
|
value
|
|
@@ -203,7 +203,7 @@ export function usePlayerMediaApi(args) {
|
|
|
203
203
|
});
|
|
204
204
|
watch(waiting, (value) => {
|
|
205
205
|
emitter.emit("update", {
|
|
206
|
-
id: toValue(
|
|
206
|
+
id: toValue(id),
|
|
207
207
|
api: "media",
|
|
208
208
|
key: "waiting",
|
|
209
209
|
value
|
|
@@ -211,7 +211,7 @@ export function usePlayerMediaApi(args) {
|
|
|
211
211
|
});
|
|
212
212
|
watch(ended, (value) => {
|
|
213
213
|
emitter.emit("update", {
|
|
214
|
-
id: toValue(
|
|
214
|
+
id: toValue(id),
|
|
215
215
|
api: "media",
|
|
216
216
|
key: "ended",
|
|
217
217
|
value
|
|
@@ -219,7 +219,7 @@ export function usePlayerMediaApi(args) {
|
|
|
219
219
|
});
|
|
220
220
|
watch(playing, (value) => {
|
|
221
221
|
emitter.emit("update", {
|
|
222
|
-
id: toValue(
|
|
222
|
+
id: toValue(id),
|
|
223
223
|
api: "media",
|
|
224
224
|
key: "playing",
|
|
225
225
|
value
|
|
@@ -227,7 +227,7 @@ export function usePlayerMediaApi(args) {
|
|
|
227
227
|
});
|
|
228
228
|
watch(stalled, (value) => {
|
|
229
229
|
emitter.emit("update", {
|
|
230
|
-
id: toValue(
|
|
230
|
+
id: toValue(id),
|
|
231
231
|
api: "media",
|
|
232
232
|
key: "stalled",
|
|
233
233
|
value
|
|
@@ -235,7 +235,7 @@ export function usePlayerMediaApi(args) {
|
|
|
235
235
|
});
|
|
236
236
|
watch(buffered, (value) => {
|
|
237
237
|
emitter.emit("update", {
|
|
238
|
-
id: toValue(
|
|
238
|
+
id: toValue(id),
|
|
239
239
|
api: "media",
|
|
240
240
|
key: "buffered",
|
|
241
241
|
value
|
|
@@ -243,7 +243,7 @@ export function usePlayerMediaApi(args) {
|
|
|
243
243
|
});
|
|
244
244
|
watch(muted, (value) => {
|
|
245
245
|
emitter.emit("update", {
|
|
246
|
-
id: toValue(
|
|
246
|
+
id: toValue(id),
|
|
247
247
|
api: "media",
|
|
248
248
|
key: "muted",
|
|
249
249
|
value
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type MaybeRef } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MagicPlayerOptions } from '../../types/index.js';
|
|
3
3
|
export type UsePlayerRuntimeArgs = {
|
|
4
4
|
id: MaybeRef<string>;
|
|
5
5
|
mediaRef?: MaybeRef<HTMLVideoElement | undefined>;
|
|
6
|
-
srcType?:
|
|
6
|
+
srcType?: MagicPlayerOptions['srcType'];
|
|
7
7
|
src?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare function usePlayerRuntime(args: UsePlayerRuntimeArgs): {
|
|
@@ -6,7 +6,7 @@ export function usePlayerRuntime(args) {
|
|
|
6
6
|
const loaded = ref(false);
|
|
7
7
|
const defferedLoading = ref(false);
|
|
8
8
|
const { mediaRef, srcType, src } = args;
|
|
9
|
-
|
|
9
|
+
function useNative() {
|
|
10
10
|
const el = toValue(mediaRef);
|
|
11
11
|
if (!el || !src) return;
|
|
12
12
|
el.src = src;
|
|
@@ -17,8 +17,8 @@ export function usePlayerRuntime(args) {
|
|
|
17
17
|
},
|
|
18
18
|
{ once: true }
|
|
19
19
|
);
|
|
20
|
-
}
|
|
21
|
-
|
|
20
|
+
}
|
|
21
|
+
async function useHlsJS() {
|
|
22
22
|
const el = toValue(mediaRef);
|
|
23
23
|
if (!el) return;
|
|
24
24
|
useEventListener(mediaRef, "play", () => {
|
|
@@ -49,7 +49,7 @@ export function usePlayerRuntime(args) {
|
|
|
49
49
|
hls.loadSource(src);
|
|
50
50
|
hls.attachMedia(el);
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|
|
53
53
|
function initialize() {
|
|
54
54
|
if (srcType === "native") {
|
|
55
55
|
useNative();
|
|
@@ -4,11 +4,9 @@ import { isIOS } from "@maas/vue-equipment/utils";
|
|
|
4
4
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
5
5
|
import { usePlayerMediaApi } from "./usePlayerMediaApi.mjs";
|
|
6
6
|
export function usePlayerVideoApi(args) {
|
|
7
|
+
const { id, playerRef, videoRef } = args;
|
|
7
8
|
const fullscreenTarget = ref(void 0);
|
|
8
|
-
const { playing, currentTime, muted } = usePlayerMediaApi({
|
|
9
|
-
id: args.id
|
|
10
|
-
});
|
|
11
|
-
const { playerRef, videoRef } = args;
|
|
9
|
+
const { playing, currentTime, muted } = usePlayerMediaApi({ id });
|
|
12
10
|
const touched = ref(false);
|
|
13
11
|
const mouseEntered = ref(false);
|
|
14
12
|
const { isFullscreen, enter, exit } = useFullscreen(fullscreenTarget);
|
|
@@ -82,7 +80,7 @@ export function usePlayerVideoApi(args) {
|
|
|
82
80
|
}
|
|
83
81
|
const emitter = usePlayerStateEmitter();
|
|
84
82
|
emitter.on("update", (payload) => {
|
|
85
|
-
if (payload.id !== toValue(
|
|
83
|
+
if (payload.id !== toValue(id)) return;
|
|
86
84
|
if (payload.api === "player") {
|
|
87
85
|
switch (payload.key) {
|
|
88
86
|
case "mouseEntered":
|
|
@@ -99,7 +97,7 @@ export function usePlayerVideoApi(args) {
|
|
|
99
97
|
});
|
|
100
98
|
watch(mouseEntered, (value) => {
|
|
101
99
|
emitter.emit("update", {
|
|
102
|
-
id: toValue(
|
|
100
|
+
id: toValue(id),
|
|
103
101
|
api: "player",
|
|
104
102
|
key: "mouseEntered",
|
|
105
103
|
value
|
|
@@ -107,7 +105,7 @@ export function usePlayerVideoApi(args) {
|
|
|
107
105
|
});
|
|
108
106
|
watch(touched, (value) => {
|
|
109
107
|
emitter.emit("update", {
|
|
110
|
-
id: toValue(
|
|
108
|
+
id: toValue(id),
|
|
111
109
|
api: "player",
|
|
112
110
|
key: "touched",
|
|
113
111
|
value
|
|
@@ -116,7 +114,7 @@ export function usePlayerVideoApi(args) {
|
|
|
116
114
|
watch(fullscreenTarget, (value) => {
|
|
117
115
|
if (!value) return;
|
|
118
116
|
emitter.emit("update", {
|
|
119
|
-
id: toValue(
|
|
117
|
+
id: toValue(id),
|
|
120
118
|
api: "player",
|
|
121
119
|
key: "fullscreenTarget",
|
|
122
120
|
value
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { MaybeRef } from '
|
|
2
|
-
|
|
3
|
-
id: MaybeRef<string>;
|
|
4
|
-
};
|
|
5
|
-
export declare function useMagicPlayer(args: usePlayerApiArgs): {
|
|
1
|
+
import type { MaybeRef } from 'vue';
|
|
2
|
+
export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
6
3
|
mediaApi: {
|
|
7
4
|
currentTime: import("vue").Ref<number, number>;
|
|
8
5
|
remainingTime: import("vue").ComputedRef<number>;
|
|
@@ -75,4 +72,3 @@ export declare function useMagicPlayer(args: usePlayerApiArgs): {
|
|
|
75
72
|
};
|
|
76
73
|
};
|
|
77
74
|
export type UseMagicPlayerReturn = ReturnType<typeof useMagicPlayer>;
|
|
78
|
-
export {};
|
|
@@ -2,11 +2,11 @@ import { usePlayerMediaApi } from "./private/usePlayerMediaApi.mjs";
|
|
|
2
2
|
import { usePlayerVideoApi } from "./private/usePlayerVideoApi.mjs";
|
|
3
3
|
import { usePlayerRuntime } from "./private/usePlayerRuntime.mjs";
|
|
4
4
|
import { usePlayerControlsApi } from "./private/usePlayerControlsApi.mjs";
|
|
5
|
-
export function useMagicPlayer(
|
|
6
|
-
const mediaApi = usePlayerMediaApi({ id
|
|
7
|
-
const videoApi = usePlayerVideoApi({ id
|
|
8
|
-
const controlsApi = usePlayerControlsApi({ id
|
|
9
|
-
const playerRuntime = usePlayerRuntime({ id
|
|
5
|
+
export function useMagicPlayer(id) {
|
|
6
|
+
const mediaApi = usePlayerMediaApi({ id });
|
|
7
|
+
const videoApi = usePlayerVideoApi({ id });
|
|
8
|
+
const controlsApi = usePlayerControlsApi({ id });
|
|
9
|
+
const playerRuntime = usePlayerRuntime({ id });
|
|
10
10
|
return {
|
|
11
11
|
mediaApi,
|
|
12
12
|
videoApi,
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@import './magic-player-timeline.css';
|
|
2
|
+
@import './magic-player-display-time.css';
|
|
3
|
+
|
|
4
|
+
/* We keep this variable since it's used in multiple places */
|
|
5
|
+
:root {
|
|
6
|
+
--magic-player-audio-controls-height: 3rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.magic-player-audio-controls {
|
|
10
|
+
width: 100%;
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.magic-player-audio-controls__bar {
|
|
15
|
+
width: 100%;
|
|
16
|
+
margin: 0 auto;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
pointer-events: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.magic-player-audio-controls__bar--inner {
|
|
24
|
+
width: 100%;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
height: var(--magic-player-audio-controls-height);
|
|
27
|
+
padding: 0;
|
|
28
|
+
color: inherit;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.magic-player-audio-controls__item {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
user-select: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.magic-player-audio-controls__item.-shrink-0 {
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.magic-player-audio-controls__item.-grow {
|
|
44
|
+
flex-grow: 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.magic-player-audio-controls__item button {
|
|
48
|
+
background-color: transparent;
|
|
49
|
+
color: inherit;
|
|
50
|
+
border: 0;
|
|
51
|
+
outline: none;
|
|
52
|
+
appearance: none;
|
|
53
|
+
padding: 0;
|
|
54
|
+
border-radius: 0;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
width: 3rem;
|
|
57
|
+
height: var(--magic-player-audio-controls-height);
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.magic-player-audio-controls__item button svg {
|
|
64
|
+
display: block;
|
|
65
|
+
width: 1.25rem;
|
|
66
|
+
height: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.magic-player-audio-controls__timeline {
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@container (max-width: 480px) {
|
|
74
|
+
.magic-player-audio-controls__item[data-slot='display-time-current'] {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@container (max-width: 320px) {
|
|
80
|
+
.magic-player-audio-controls__item[data-slot='display-time-duration'] {
|
|
81
|
+
display: none;
|
|
82
|
+
}
|
|
83
|
+
.magic-player-audio-controls__item[data-slot='timeline'] {
|
|
84
|
+
padding-right: 1rem;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@container (max-width: 240px) {
|
|
89
|
+
.magic-player-audio-controls__item[data-slot='timeline'] {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
.magic-player-audio-controls__bar--inner {
|
|
93
|
+
justify-content: center;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--magic-player-timeline-track-height: 0.25rem;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.magic-player-timeline {
|
|
6
|
+
position: relative;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: var(--magic-player-timeline-track-height);
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.magic-player-timeline__target {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 3.5rem;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.magic-player-timeline__track {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: var(--magic-player-timeline-track-height);
|
|
26
|
+
background: rgba(250, 250, 250, 0.15);
|
|
27
|
+
border-radius: 50rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.magic-player-timeline__inner-track {
|
|
31
|
+
position: relative;
|
|
32
|
+
border-radius: 50rem;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.magic-player-timeline__thumb {
|
|
42
|
+
position: absolute;
|
|
43
|
+
width: var(--magic-player-timeline-track-height);
|
|
44
|
+
height: var(--magic-player-timeline-track-height);
|
|
45
|
+
z-index: 10;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.magic-player-timeline__thumb-handle {
|
|
49
|
+
position: absolute;
|
|
50
|
+
width: 1rem;
|
|
51
|
+
height: 1rem;
|
|
52
|
+
top: 50%;
|
|
53
|
+
left: 50%;
|
|
54
|
+
transform: translate(-50%, -50%) scale(0);
|
|
55
|
+
transition: transform 300ms ease;
|
|
56
|
+
z-index: 10;
|
|
57
|
+
background-color: rgba(250, 250, 250, 1);
|
|
58
|
+
border-radius: 50rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.magic-player-timeline__scrubbed,
|
|
62
|
+
.magic-player-timeline__seeked,
|
|
63
|
+
.magic-player-timeline__buffered {
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 0;
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
margin-left: calc(-100% + var(--magic-player-timeline-track-height));
|
|
69
|
+
background: currentColor;
|
|
70
|
+
border-radius: 50rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.magic-player-timeline__scrubbed {
|
|
74
|
+
z-index: 1;
|
|
75
|
+
min-width: var(--magic-player-timeline-track-height);
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.magic-player-timeline__seeked {
|
|
80
|
+
opacity: 0.25;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.magic-player-timeline__buffered {
|
|
84
|
+
opacity: 0.15;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.magic-player-timeline:hover .magic-player-timeline__thumb-handle {
|
|
88
|
+
transform: translate3d(-50%, -50%, 0) scale(1);
|
|
89
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
@import './magic-player-timeline.css';
|
|
2
|
+
@import './magic-player-display-time.css';
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--magic-player-video-controls-left: 1.5rem;
|
|
6
|
+
--magic-player-video-controls-height: 3rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@media (max-width: 640px) {
|
|
10
|
+
:root {
|
|
11
|
+
--magic-player-video-controls-height: 2.5rem;
|
|
12
|
+
--magic-player-video-controls-left: 0.75rem;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.magic-player-video-controls {
|
|
17
|
+
position: absolute;
|
|
18
|
+
inset: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.magic-player-video-controls-enter-active {
|
|
24
|
+
animation: fade-up-in 150ms ease;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.magic-player-video-controls-leave-active {
|
|
28
|
+
animation: fade-up-out 150ms ease;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.magic-player-video-controls__bar {
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: calc(100% - (var(--magic-player-video-controls-left) * 2));
|
|
34
|
+
bottom: 1.5rem;
|
|
35
|
+
left: var(--magic-player-video-controls-left);
|
|
36
|
+
margin: 0 auto;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
gap: 1rem;
|
|
41
|
+
pointer-events: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.magic-player-video-controls__bar--inner {
|
|
45
|
+
width: 100%;
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
height: var(--magic-player-video-controls-height);
|
|
48
|
+
padding: 0 0.75rem;
|
|
49
|
+
background-color: rgba(32, 32, 32, 0.8);
|
|
50
|
+
backdrop-filter: blur(80px);
|
|
51
|
+
color: rgba(255, 255, 255, 1);
|
|
52
|
+
border-radius: 50rem;
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.magic-player-video-controls__item {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
user-select: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.magic-player-video-controls__item.-shrink-0 {
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.magic-player-video-controls__item.-grow {
|
|
68
|
+
flex-grow: 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.magic-player-video-controls__item button {
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
color: inherit;
|
|
74
|
+
border: 0;
|
|
75
|
+
outline: none;
|
|
76
|
+
appearance: none;
|
|
77
|
+
padding: 0;
|
|
78
|
+
border-radius: 0;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
width: 3rem;
|
|
81
|
+
height: var(--magic-player-video-controls-height);
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.magic-player-video-controls__item button svg {
|
|
88
|
+
display: block;
|
|
89
|
+
width: 1.25rem;
|
|
90
|
+
height: auto;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.magic-player-video-controls__timeline {
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.magic-player-video-controls[data-standalone='true'] {
|
|
98
|
+
position: relative;
|
|
99
|
+
inset: unset;
|
|
100
|
+
width: 100%;
|
|
101
|
+
--magic-player-video-controls-left: 0;
|
|
102
|
+
& .magic-player-video-controls__bar--inner {
|
|
103
|
+
background-color: transparent;
|
|
104
|
+
backdrop-filter: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
& .magic-player-video-controls__bar {
|
|
108
|
+
position: relative;
|
|
109
|
+
bottom: 0;
|
|
110
|
+
padding: 0;
|
|
111
|
+
background-color: transparent;
|
|
112
|
+
border-radius: unset;
|
|
113
|
+
backdrop-filter: none;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InjectionKey, MaybeRef } from 'vue';
|
|
2
|
+
import type { MagicPlayerOptions } from '../types/index.js';
|
|
3
|
+
declare const MagicPlayerInstanceId: InjectionKey<MaybeRef<string>>;
|
|
4
|
+
declare const MagicPlayerOptionsKey: InjectionKey<MagicPlayerOptions>;
|
|
5
|
+
export { MagicPlayerInstanceId, MagicPlayerOptionsKey };
|