@maas/vue-equipment 1.0.0-beta.5 → 1.0.0-beta.7
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/dist/composables/index.d.ts +5 -5
- package/dist/composables/index.js +14 -8
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +2 -2
- package/dist/plugins/.turbo/turbo-lint.log +2 -2
- package/dist/plugins/MagicAccordion/demo/data/footer.json +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +3 -3
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +4 -5
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +11 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +32 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +0 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +3 -8
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +3 -6
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +3 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +7 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +1 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +3 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +3 -3
- 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 +1 -1
- package/dist/plugins/MagicCommand/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +3 -3
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +3 -3
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +10 -12
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +3 -24
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +3 -3
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +3 -3
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +12 -15
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +20 -21
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +188 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +2 -2
- 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/MagicMarquee/src/components/MagicMarquee.vue +15 -15
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +25 -0
- 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/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +27 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +3 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +56 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +5 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +53 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +1 -12
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +3 -8
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +6 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +1 -85
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +3 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +3 -3
- 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 +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +6 -6
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +60 -0
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +2 -2
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +13 -13
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -5
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +14 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +20 -20
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +34 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +19 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +35 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +5 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +6 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +23 -24
- 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.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 +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +10 -10
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +15 -9
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +13 -13
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +18 -11
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +6 -6
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +4 -4
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +20 -20
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +17 -8
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +4 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +7 -7
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +4 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +3 -3
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +18 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +4 -9
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +3 -3
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +14 -4
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +9 -10
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -59
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +5 -8
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +3 -8
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +21 -21
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +2 -2
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import IconPlay from './icons/Play.vue.js';
|
|
2
|
+
import IconPause from './icons/Pause.vue.js';
|
|
3
|
+
interface MagicAudioPlayerControlsProps {
|
|
4
|
+
id?: 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,5 +1,5 @@
|
|
|
1
1
|
interface MagicPlayerDisplayTimeProps {
|
|
2
2
|
type?: 'current' | 'remaining' | 'duration';
|
|
3
3
|
}
|
|
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, {},
|
|
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>;
|
|
5
5
|
export default _default;
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
4
|
const _hoisted_1 = ["width", "height"];
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
shallowRef,
|
|
7
|
+
onMounted,
|
|
8
|
+
watch,
|
|
9
|
+
computed,
|
|
10
|
+
inject,
|
|
11
|
+
useTemplateRef
|
|
12
|
+
} from "vue";
|
|
6
13
|
import { useDevicePixelRatio } from "@vueuse/core";
|
|
7
14
|
import { usePlayerControlsApi } from "../composables/private/usePlayerControlsApi";
|
|
8
15
|
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
@@ -21,7 +28,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
21
28
|
}
|
|
22
29
|
const { seekedTime } = usePlayerControlsApi({ id: instanceId });
|
|
23
30
|
const { pixelRatio } = useDevicePixelRatio();
|
|
24
|
-
const canvasRef =
|
|
31
|
+
const canvasRef = useTemplateRef("canvas");
|
|
25
32
|
const storyboard = shallowRef();
|
|
26
33
|
let context = void 0;
|
|
27
34
|
let image = void 0;
|
|
@@ -35,12 +42,17 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
35
42
|
});
|
|
36
43
|
function getMuxId(url) {
|
|
37
44
|
const match = url?.match(/mux\.com\/([^\/]+)/);
|
|
38
|
-
return match?.[1];
|
|
45
|
+
return match?.[1]?.replace(/\.(m3u8|mp4)$/, "");
|
|
39
46
|
}
|
|
40
47
|
async function init() {
|
|
41
48
|
const parsedPlaybackId = getMuxId(injectedOptions?.src);
|
|
42
49
|
const mappedPlaybackId = __props.playbackId ?? parsedPlaybackId;
|
|
43
|
-
if (!mappedPlaybackId)
|
|
50
|
+
if (!mappedPlaybackId) {
|
|
51
|
+
console.error(
|
|
52
|
+
"MagicPlayerMuxPopover must be nested inside MagicPlayerProvider or a playbackId must be provided"
|
|
53
|
+
);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
44
56
|
try {
|
|
45
57
|
storyboard.value = await fetch(
|
|
46
58
|
`https://image.mux.com/${mappedPlaybackId}/storyboard.json`
|
|
@@ -49,8 +61,8 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
49
61
|
image = new Image();
|
|
50
62
|
image.src = storyboard.value.url;
|
|
51
63
|
await image.decode();
|
|
52
|
-
context = canvasRef.value
|
|
53
|
-
context
|
|
64
|
+
context = canvasRef.value?.getContext("2d");
|
|
65
|
+
context?.drawImage(image, 0, 0);
|
|
54
66
|
} catch (e) {
|
|
55
67
|
console.error("Can not initialize timeine preview.", e);
|
|
56
68
|
}
|
|
@@ -95,8 +107,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
95
107
|
},
|
|
96
108
|
[
|
|
97
109
|
_createElementVNode("canvas", {
|
|
98
|
-
|
|
99
|
-
ref: canvasRef,
|
|
110
|
+
ref: "canvas",
|
|
100
111
|
width: storyboard.value?.tile_width,
|
|
101
112
|
height: storyboard.value?.tile_height
|
|
102
113
|
}, null, 8, _hoisted_1)
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
interface MagicPlayerMuxPopoverProps {
|
|
2
2
|
playbackId?: string;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
canvasRef: typeof __VLS_nativeElements['canvas'];
|
|
6
|
-
};
|
|
7
|
-
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, __VLS_TemplateRefs, HTMLDivElement>;
|
|
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>;
|
|
8
5
|
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import IconPlay from './icons/Play.vue.js';
|
|
2
|
+
import IconPause from './icons/Pause.vue.js';
|
|
3
|
+
import IconWaiting from './icons/Waiting.vue.js';
|
|
4
|
+
declare const playing: import("vue").ShallowRef<boolean, boolean>, waiting: import("vue").ShallowRef<boolean, boolean>;
|
|
5
|
+
declare const mouseEntered: import("vue").ShallowRef<boolean, boolean>, togglePlay: () => void;
|
|
6
|
+
declare const idle: import("vue").Ref<boolean, boolean>;
|
|
7
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
8
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_8: {}, __VLS_13: {};
|
|
9
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
10
|
+
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
} & {
|
|
12
|
+
waitingIcon?: (props: typeof __VLS_3) => any;
|
|
13
|
+
} & {
|
|
14
|
+
playIcon?: (props: typeof __VLS_8) => any;
|
|
15
|
+
} & {
|
|
16
|
+
pauseIcon?: (props: typeof __VLS_13) => any;
|
|
17
|
+
}>;
|
|
18
|
+
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
19
|
+
IconPlay: typeof IconPlay;
|
|
20
|
+
IconPause: typeof IconPause;
|
|
21
|
+
IconWaiting: typeof IconWaiting;
|
|
22
|
+
playing: typeof playing;
|
|
23
|
+
waiting: typeof waiting;
|
|
24
|
+
mouseEntered: typeof mouseEntered;
|
|
25
|
+
togglePlay: typeof togglePlay;
|
|
26
|
+
idle: typeof idle;
|
|
27
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
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>;
|
|
29
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
declare const loaded: import("vue").
|
|
2
|
-
declare const touched: import("vue").
|
|
1
|
+
declare const loaded: import("vue").ShallowRef<boolean, boolean>;
|
|
2
|
+
declare const touched: import("vue").ShallowRef<boolean, boolean>;
|
|
3
3
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
5
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
7
|
}>;
|
|
8
8
|
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
9
9
|
loaded: typeof loaded;
|
|
10
10
|
touched: typeof touched;
|
|
11
11
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
13
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
14
14
|
export default _default;
|
|
15
15
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
4
|
const _hoisted_1 = ["data-mode", "data-fullscreen", "data-touched", "data-playing", "data-paused", "data-waiting", "data-loaded", "data-muted"];
|
|
5
|
-
import {
|
|
5
|
+
import { useTemplateRef, provide } from "vue";
|
|
6
6
|
import defu from "defu";
|
|
7
7
|
import { usePlayerVideoApi } from "../composables/private/usePlayerVideoApi";
|
|
8
8
|
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
@@ -17,7 +17,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
17
17
|
},
|
|
18
18
|
setup(__props) {
|
|
19
19
|
const mappedOptions = defu(__props.options, defaultOptions);
|
|
20
|
-
const playerRef =
|
|
20
|
+
const playerRef = useTemplateRef("player");
|
|
21
21
|
const { playing, waiting, muted } = usePlayerMediaApi({
|
|
22
22
|
id: __props.id
|
|
23
23
|
});
|
|
@@ -36,8 +36,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
36
36
|
provide(MagicPlayerOptionsKey, mappedOptions);
|
|
37
37
|
return (_ctx, _cache) => {
|
|
38
38
|
return _openBlock(), _createElementBlock("div", {
|
|
39
|
-
|
|
40
|
-
ref: playerRef,
|
|
39
|
+
ref: "player",
|
|
41
40
|
class: "magic-player-provider",
|
|
42
41
|
"data-mode": _unref(mappedOptions).mode,
|
|
43
42
|
"data-fullscreen": _unref(isFullscreen),
|
|
@@ -5,21 +5,16 @@ interface MagicPlayerProps {
|
|
|
5
5
|
options?: MagicPlayerOptions;
|
|
6
6
|
}
|
|
7
7
|
declare const mappedOptions: MagicPlayerOptions;
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const onMouseenter: () => void, onMouseleave: () => void, isFullscreen: import("vue").Ref<boolean, boolean>, touched: import("vue").Ref<boolean, boolean>;
|
|
8
|
+
declare const playing: import("vue").ShallowRef<boolean, boolean>, waiting: import("vue").ShallowRef<boolean, boolean>, muted: import("vue").ShallowRef<boolean, boolean>;
|
|
9
|
+
declare const loaded: import("vue").ShallowRef<boolean, boolean>;
|
|
10
|
+
declare const onMouseenter: () => void, onMouseleave: () => void, isFullscreen: import("vue").Ref<boolean, boolean>, touched: import("vue").ShallowRef<boolean, boolean>;
|
|
12
11
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
13
|
-
declare var
|
|
12
|
+
declare var __VLS_1: {};
|
|
14
13
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
15
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
15
|
}>;
|
|
17
|
-
type __VLS_TemplateRefs = {
|
|
18
|
-
playerRef: typeof __VLS_nativeElements['div'];
|
|
19
|
-
};
|
|
20
16
|
declare const __VLS_self: import("vue").DefineComponent<MagicPlayerProps, {
|
|
21
17
|
mappedOptions: typeof mappedOptions;
|
|
22
|
-
playerRef: typeof playerRef;
|
|
23
18
|
playing: typeof playing;
|
|
24
19
|
waiting: typeof waiting;
|
|
25
20
|
muted: typeof muted;
|
|
@@ -29,7 +24,7 @@ declare const __VLS_self: import("vue").DefineComponent<MagicPlayerProps, {
|
|
|
29
24
|
isFullscreen: typeof isFullscreen;
|
|
30
25
|
touched: typeof touched;
|
|
31
26
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicPlayerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false,
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicPlayerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
28
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
34
29
|
export default _default;
|
|
35
30
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
4
|
const _hoisted_1 = ["preload", "loop", "muted"];
|
|
5
|
-
import {
|
|
5
|
+
import { useTemplateRef, watch, onMounted, inject, onBeforeUnmount } from "vue";
|
|
6
6
|
import {
|
|
7
7
|
useElementVisibility,
|
|
8
8
|
useEventListener,
|
|
@@ -23,7 +23,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
23
23
|
if (!injectedOptions) {
|
|
24
24
|
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
25
25
|
}
|
|
26
|
-
const elRef =
|
|
26
|
+
const elRef = useTemplateRef("el");
|
|
27
27
|
const isVisible = useElementVisibility(elRef);
|
|
28
28
|
const { initialize, destroy } = usePlayerRuntime({
|
|
29
29
|
id: injectedId,
|
|
@@ -69,8 +69,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
69
69
|
});
|
|
70
70
|
return (_ctx, _cache) => {
|
|
71
71
|
return _openBlock(), _createElementBlock("video", {
|
|
72
|
-
|
|
73
|
-
ref: elRef,
|
|
72
|
+
ref: "el",
|
|
74
73
|
class: "magic-player-video",
|
|
75
74
|
playsinline: "",
|
|
76
75
|
disablePictureInPicture: "",
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
elRef: typeof __VLS_nativeElements['video'];
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, __VLS_TemplateRefs, HTMLVideoElement>;
|
|
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>;
|
|
5
2
|
export default _default;
|
|
@@ -3,11 +3,19 @@ import { defineComponent as _defineComponent } from "vue";
|
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, vShow as _vShow, normalizeStyle as _normalizeStyle, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, Transition as _Transition, withCtx as _withCtx } from "vue";
|
|
4
4
|
const _hoisted_1 = ["data-fullscreen", "data-touched", "data-playing", "data-paused", "data-waiting", "data-muted", "data-idle", "data-hover", "data-standalone"];
|
|
5
5
|
const _hoisted_2 = { class: "magic-player-video-controls__bar" };
|
|
6
|
-
const _hoisted_3 = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const _hoisted_3 = {
|
|
7
|
+
ref: "bar",
|
|
8
|
+
class: "magic-player-video-controls__bar--inner"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_4 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
11
|
+
const _hoisted_5 = { class: "magic-player-video-controls__item -grow" };
|
|
12
|
+
const _hoisted_6 = {
|
|
13
|
+
ref: "track",
|
|
14
|
+
class: "magic-player-video-controls__timeline"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_7 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
17
|
+
const _hoisted_8 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
18
|
+
import { computed, inject, provide, useTemplateRef } from "vue";
|
|
11
19
|
import { useIdle } from "@vueuse/core";
|
|
12
20
|
import IconPlay from "./icons/Play.vue";
|
|
13
21
|
import IconPause from "./icons/Pause.vue";
|
|
@@ -40,9 +48,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
40
48
|
const mappedTransition = computed(
|
|
41
49
|
() => __props.transition ?? injectedOptions?.transition?.videoControls
|
|
42
50
|
);
|
|
43
|
-
const barRef =
|
|
44
|
-
const trackRef =
|
|
45
|
-
const popoverRef =
|
|
51
|
+
const barRef = useTemplateRef("bar");
|
|
52
|
+
const trackRef = useTemplateRef("track");
|
|
53
|
+
const popoverRef = useTemplateRef("popover");
|
|
46
54
|
const { playing, waiting, muted } = usePlayerMediaApi({
|
|
47
55
|
id: mappedId.value
|
|
48
56
|
});
|
|
@@ -106,8 +114,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
106
114
|
"div",
|
|
107
115
|
{
|
|
108
116
|
key: 0,
|
|
109
|
-
|
|
110
|
-
ref: popoverRef,
|
|
117
|
+
ref: "popover",
|
|
111
118
|
class: "magic-player-video-controls__popover",
|
|
112
119
|
style: _normalizeStyle({ marginLeft: `${_unref(popoverOffsetX)}%` })
|
|
113
120
|
},
|
|
@@ -121,13 +128,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
121
128
|
]) : _createCommentVNode("v-if", true),
|
|
122
129
|
_createElementVNode(
|
|
123
130
|
"div",
|
|
124
|
-
|
|
125
|
-
ref_key: "barRef",
|
|
126
|
-
ref: barRef,
|
|
127
|
-
class: "magic-player-video-controls__bar--inner"
|
|
128
|
-
},
|
|
131
|
+
_hoisted_3,
|
|
129
132
|
[
|
|
130
|
-
_createElementVNode("div",
|
|
133
|
+
_createElementVNode("div", _hoisted_4, [
|
|
131
134
|
!_unref(playing) ? (_openBlock(), _createElementBlock("button", {
|
|
132
135
|
key: 0,
|
|
133
136
|
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
@@ -146,15 +149,11 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
146
149
|
])
|
|
147
150
|
]))
|
|
148
151
|
]),
|
|
149
|
-
_createElementVNode("div",
|
|
152
|
+
_createElementVNode("div", _hoisted_5, [
|
|
150
153
|
_renderSlot(_ctx.$slots, "timelineBefore"),
|
|
151
154
|
_createElementVNode(
|
|
152
155
|
"div",
|
|
153
|
-
|
|
154
|
-
ref_key: "trackRef",
|
|
155
|
-
ref: trackRef,
|
|
156
|
-
class: "magic-player-video-controls__timeline"
|
|
157
|
-
},
|
|
156
|
+
_hoisted_6,
|
|
158
157
|
[
|
|
159
158
|
_createVNode(_component_magic_player_timeline)
|
|
160
159
|
],
|
|
@@ -163,7 +162,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
163
162
|
),
|
|
164
163
|
_renderSlot(_ctx.$slots, "timelineAfter")
|
|
165
164
|
]),
|
|
166
|
-
_createElementVNode("div",
|
|
165
|
+
_createElementVNode("div", _hoisted_7, [
|
|
167
166
|
_unref(muted) ? (_openBlock(), _createElementBlock("button", {
|
|
168
167
|
key: 0,
|
|
169
168
|
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
@@ -182,7 +181,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
182
181
|
])
|
|
183
182
|
]))
|
|
184
183
|
]),
|
|
185
|
-
_createElementVNode("div",
|
|
184
|
+
_createElementVNode("div", _hoisted_8, [
|
|
186
185
|
_unref(isFullscreen) ? (_openBlock(), _createElementBlock("button", {
|
|
187
186
|
key: 0,
|
|
188
187
|
onClick: _cache[4] || (_cache[4] = //@ts-ignore
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import IconPlay from './icons/Play.vue.js';
|
|
2
|
+
import IconPause from './icons/Pause.vue.js';
|
|
3
|
+
import IconVolumeOn from './icons/VolumeOn.vue.js';
|
|
4
|
+
import IconVolumeOff from './icons/VolumeOff.vue.js';
|
|
5
|
+
import IconFullscreenEnter from './icons/FullscreenEnter.vue.js';
|
|
6
|
+
import IconFullscreenExit from './icons/FullscreenExit.vue.js';
|
|
7
|
+
import '@maas/vue-equipment/utils/css/animations/fade-up-in.css';
|
|
8
|
+
import '@maas/vue-equipment/utils/css/animations/fade-up-out.css';
|
|
9
|
+
interface MagicPlayerControlsProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
standalone?: boolean;
|
|
12
|
+
transition?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const mappedTransition: import("vue").ComputedRef<string | undefined>;
|
|
15
|
+
declare const playing: import("vue").ShallowRef<boolean, boolean>, waiting: import("vue").ShallowRef<boolean, boolean>, muted: import("vue").ShallowRef<boolean, boolean>;
|
|
16
|
+
declare const touched: import("vue").ShallowRef<boolean, boolean>, mouseEntered: import("vue").ShallowRef<boolean, boolean>, isFullscreen: import("vue").Ref<boolean, boolean>, play: () => void, pause: () => void, mute: () => void, unmute: () => void, enterFullscreen: () => void, exitFullscreen: () => void;
|
|
17
|
+
declare const popoverOffsetX: import("vue").ShallowRef<number, number>, seekedTime: import("vue").ShallowRef<number, number>;
|
|
18
|
+
declare const idle: import("vue").Ref<boolean, boolean>;
|
|
19
|
+
declare const hidden: import("vue").ComputedRef<boolean>;
|
|
20
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
21
|
+
declare var __VLS_5: {}, __VLS_7: {}, __VLS_12: {}, __VLS_17: {}, __VLS_23: {}, __VLS_25: {}, __VLS_30: {}, __VLS_35: {}, __VLS_40: {};
|
|
22
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
23
|
+
popover?: (props: typeof __VLS_5) => any;
|
|
24
|
+
} & {
|
|
25
|
+
playIcon?: (props: typeof __VLS_7) => any;
|
|
26
|
+
} & {
|
|
27
|
+
pauseIcon?: (props: typeof __VLS_12) => any;
|
|
28
|
+
} & {
|
|
29
|
+
timelineBefore?: (props: typeof __VLS_17) => any;
|
|
30
|
+
} & {
|
|
31
|
+
timelineAfter?: (props: typeof __VLS_23) => any;
|
|
32
|
+
} & {
|
|
33
|
+
volumeOffIcon?: (props: typeof __VLS_25) => any;
|
|
34
|
+
} & {
|
|
35
|
+
volumeOnIcon?: (props: typeof __VLS_30) => any;
|
|
36
|
+
} & {
|
|
37
|
+
fullscreenExitIcon?: (props: typeof __VLS_35) => any;
|
|
38
|
+
} & {
|
|
39
|
+
fullscreenEnterIcon?: (props: typeof __VLS_40) => any;
|
|
40
|
+
}>;
|
|
41
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicPlayerControlsProps, {
|
|
42
|
+
IconPlay: typeof IconPlay;
|
|
43
|
+
IconPause: typeof IconPause;
|
|
44
|
+
IconVolumeOn: typeof IconVolumeOn;
|
|
45
|
+
IconVolumeOff: typeof IconVolumeOff;
|
|
46
|
+
IconFullscreenEnter: typeof IconFullscreenEnter;
|
|
47
|
+
IconFullscreenExit: typeof IconFullscreenExit;
|
|
48
|
+
mappedTransition: typeof mappedTransition;
|
|
49
|
+
playing: typeof playing;
|
|
50
|
+
waiting: typeof waiting;
|
|
51
|
+
muted: typeof muted;
|
|
52
|
+
touched: typeof touched;
|
|
53
|
+
mouseEntered: typeof mouseEntered;
|
|
54
|
+
isFullscreen: typeof isFullscreen;
|
|
55
|
+
play: typeof play;
|
|
56
|
+
pause: typeof pause;
|
|
57
|
+
mute: typeof mute;
|
|
58
|
+
unmute: typeof unmute;
|
|
59
|
+
enterFullscreen: typeof enterFullscreen;
|
|
60
|
+
exitFullscreen: typeof exitFullscreen;
|
|
61
|
+
popoverOffsetX: typeof popoverOffsetX;
|
|
62
|
+
seekedTime: typeof seekedTime;
|
|
63
|
+
idle: typeof idle;
|
|
64
|
+
hidden: typeof hidden;
|
|
65
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicPlayerControlsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
68
|
+
export default _default;
|
|
69
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -1,2 +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, {},
|
|
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
2
|
export default _default;
|
|
@@ -3,8 +3,8 @@ export type UsePlayerAudioApiArgs = {
|
|
|
3
3
|
id: MaybeRef<string>;
|
|
4
4
|
};
|
|
5
5
|
export declare function usePlayerAudioApi(args: UsePlayerAudioApiArgs): {
|
|
6
|
-
mouseEntered: import("vue").
|
|
7
|
-
touched: import("vue").
|
|
6
|
+
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
7
|
+
touched: import("vue").ShallowRef<boolean, boolean>;
|
|
8
8
|
play: () => void;
|
|
9
9
|
pause: () => void;
|
|
10
10
|
togglePlay: () => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { shallowRef, watch, toValue } from "vue";
|
|
2
2
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
3
3
|
import { usePlayerMediaApi } from "./usePlayerMediaApi.mjs";
|
|
4
4
|
export function usePlayerAudioApi(args) {
|
|
5
5
|
const { id } = args;
|
|
6
6
|
const { playing, currentTime, muted } = usePlayerMediaApi({ id });
|
|
7
|
-
const touched =
|
|
8
|
-
const mouseEntered =
|
|
7
|
+
const touched = shallowRef(false);
|
|
8
|
+
const mouseEntered = shallowRef(false);
|
|
9
9
|
function play() {
|
|
10
10
|
playing.value = true;
|
|
11
11
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { type MaybeRef, type Ref } from 'vue';
|
|
2
2
|
export type UsePlayerControlsApiArgs = {
|
|
3
3
|
id: MaybeRef<string>;
|
|
4
|
-
barRef?: Ref<HTMLDivElement |
|
|
5
|
-
trackRef?: Ref<HTMLDivElement |
|
|
6
|
-
popoverRef?: Ref<HTMLDivElement |
|
|
4
|
+
barRef?: Ref<HTMLDivElement | null>;
|
|
5
|
+
trackRef?: Ref<HTMLDivElement | null>;
|
|
6
|
+
popoverRef?: Ref<HTMLDivElement | null>;
|
|
7
7
|
};
|
|
8
8
|
export declare function usePlayerControlsApi(args: UsePlayerControlsApiArgs): {
|
|
9
|
-
mouseEntered:
|
|
10
|
-
dragging:
|
|
11
|
-
seekedTime:
|
|
12
|
-
seekedPercentage:
|
|
13
|
-
scrubbedPercentage:
|
|
9
|
+
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
10
|
+
dragging: import("vue").ShallowRef<boolean, boolean>;
|
|
11
|
+
seekedTime: import("vue").ShallowRef<number, number>;
|
|
12
|
+
seekedPercentage: import("vue").ShallowRef<number, number>;
|
|
13
|
+
scrubbedPercentage: import("vue").ShallowRef<number, number>;
|
|
14
14
|
bufferedPercentage: import("vue").ComputedRef<number>;
|
|
15
|
-
thumbPercentage:
|
|
16
|
-
popoverOffsetX:
|
|
15
|
+
thumbPercentage: import("vue").ShallowRef<number, number>;
|
|
16
|
+
popoverOffsetX: import("vue").ShallowRef<number, number>;
|
|
17
17
|
onMouseenter: () => void;
|
|
18
18
|
onMouseleave: () => void;
|
|
19
19
|
onPointerdown: (e: MouseEvent | TouchEvent) => void;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
shallowRef,
|
|
4
|
+
computed,
|
|
5
|
+
watch,
|
|
6
|
+
toValue
|
|
7
|
+
} from "vue";
|
|
2
8
|
import {
|
|
3
9
|
useResizeObserver,
|
|
4
10
|
useEventListener,
|
|
@@ -9,20 +15,20 @@ import { usePlayerMediaApi } from "./usePlayerMediaApi.mjs";
|
|
|
9
15
|
import { usePlayerVideoApi } from "./usePlayerVideoApi.mjs";
|
|
10
16
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
11
17
|
export function usePlayerControlsApi(args) {
|
|
12
|
-
const resumePlay =
|
|
18
|
+
const resumePlay = shallowRef(false);
|
|
13
19
|
const barRect = ref(void 0);
|
|
14
20
|
const trackRect = ref(void 0);
|
|
15
21
|
const popoverRect = ref(void 0);
|
|
16
22
|
const { id, trackRef, barRef, popoverRef } = args;
|
|
17
23
|
const { buffered, duration, playing, currentTime } = usePlayerMediaApi({ id });
|
|
18
24
|
const { play, pause, seek } = usePlayerVideoApi({ id });
|
|
19
|
-
const dragging =
|
|
20
|
-
const mouseEntered =
|
|
21
|
-
const seekedTime =
|
|
22
|
-
const seekedPercentage =
|
|
23
|
-
const scrubbedPercentage =
|
|
24
|
-
const thumbPercentage =
|
|
25
|
-
const popoverOffsetX =
|
|
25
|
+
const dragging = shallowRef(false);
|
|
26
|
+
const mouseEntered = shallowRef(false);
|
|
27
|
+
const seekedTime = shallowRef(0);
|
|
28
|
+
const seekedPercentage = shallowRef(0);
|
|
29
|
+
const scrubbedPercentage = shallowRef(0);
|
|
30
|
+
const thumbPercentage = shallowRef(0);
|
|
31
|
+
const popoverOffsetX = shallowRef(0);
|
|
26
32
|
const bufferedPercentage = computed(() => {
|
|
27
33
|
if (!buffered) return 0;
|
|
28
34
|
const endBuffer = buffered.value?.length > 0 ? buffered.value[0][1] : 0;
|