@maas/vue-equipment 1.0.0-beta.23 → 1.0.0-beta.24
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/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +24 -24
- package/dist/plugins/.turbo/turbo-lint.log +2 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +2 -29
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +2 -7
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +2 -16
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +2 -11
- package/dist/plugins/MagicAccordion/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +2 -20
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +2 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +2 -19
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +2 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +2 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +2 -18
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +2 -9
- package/dist/plugins/MagicCommand/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +2 -7
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +2 -4
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +2 -16
- package/dist/plugins/MagicCookie/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +2 -92
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +12 -15
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +2 -161
- package/dist/plugins/MagicDrawer/src/composables/useMagicDrawer.mjs +1 -1
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +112 -10
- package/dist/plugins/MagicEmitter/src/types/index.d.ts +2 -0
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +2 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +2 -13
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +2 -34
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +2 -33
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +2 -21
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +2 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +2 -12
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +2 -18
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +2 -9
- package/dist/plugins/MagicMenu/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +2 -40
- package/dist/plugins/MagicModal/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +51 -18
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +12 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +2 -22
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +48 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +6 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +5 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +2 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +37 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +2 -18
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +47 -20
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +11 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +2 -42
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +5 -7
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +5 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.d.ts +8 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.mjs +103 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +22 -11
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +4 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +13 -9
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +1 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +39 -32
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +4 -1
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +6 -3
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +2 -1
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +2 -0
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +45 -19
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/utils/playbackDefaults.d.ts +3 -0
- package/dist/plugins/MagicPlayer/src/utils/playbackDefaults.mjs +7 -0
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +2 -4
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +2 -4
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +2 -24
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +2 -7
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +2 -19
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +1 -1
- package/dist/plugins/MagicToast/src/types/index.d.ts +2 -2
- package/package.json +5 -3
|
@@ -3,7 +3,7 @@ import { useEventListener } from "@vueuse/core";
|
|
|
3
3
|
import { usePlayerState } from "./usePlayerState.mjs";
|
|
4
4
|
export function usePlayerRuntime(args) {
|
|
5
5
|
let hls;
|
|
6
|
-
const
|
|
6
|
+
const deferredLoading = shallowRef(false);
|
|
7
7
|
const { id, mediaRef, srcType, src } = args;
|
|
8
8
|
const { initializeState } = usePlayerState(toValue(id));
|
|
9
9
|
const state = initializeState();
|
|
@@ -24,7 +24,7 @@ export function usePlayerRuntime(args) {
|
|
|
24
24
|
const el = toValue(mediaRef);
|
|
25
25
|
if (!el) return;
|
|
26
26
|
useEventListener(mediaRef, "play", () => {
|
|
27
|
-
|
|
27
|
+
deferredLoading.value = true;
|
|
28
28
|
});
|
|
29
29
|
const { default: Hls } = await import("hls.js");
|
|
30
30
|
hls = new Hls({ autoStartLoad: false });
|
|
@@ -38,7 +38,7 @@ export function usePlayerRuntime(args) {
|
|
|
38
38
|
toValue(mediaRef)?.dispatchEvent(new Event("suspend"));
|
|
39
39
|
});
|
|
40
40
|
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
|
41
|
-
if (
|
|
41
|
+
if (deferredLoading.value) {
|
|
42
42
|
hls?.startLoad();
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -61,7 +61,7 @@ export function usePlayerRuntime(args) {
|
|
|
61
61
|
}
|
|
62
62
|
function destroy() {
|
|
63
63
|
hls?.destroy();
|
|
64
|
-
|
|
64
|
+
deferredLoading.value = false;
|
|
65
65
|
}
|
|
66
66
|
return {
|
|
67
67
|
initialize,
|
|
@@ -4,29 +4,33 @@ export function usePlayerState(id) {
|
|
|
4
4
|
function createState(id2) {
|
|
5
5
|
const state = {
|
|
6
6
|
id: id2,
|
|
7
|
+
buffered: [],
|
|
7
8
|
currentTime: 0,
|
|
9
|
+
dragging: false,
|
|
8
10
|
duration: 0,
|
|
9
|
-
seeking: false,
|
|
10
|
-
volume: 1,
|
|
11
|
-
rate: 1,
|
|
12
|
-
loaded: false,
|
|
13
|
-
waiting: false,
|
|
14
11
|
ended: false,
|
|
12
|
+
fullscreen: false,
|
|
13
|
+
loaded: false,
|
|
14
|
+
muted: false,
|
|
15
|
+
paused: false,
|
|
15
16
|
playing: false,
|
|
17
|
+
rate: 1,
|
|
18
|
+
seeking: false,
|
|
16
19
|
stalled: false,
|
|
17
|
-
|
|
18
|
-
muted: false,
|
|
20
|
+
started: false,
|
|
19
21
|
touched: false,
|
|
20
|
-
|
|
22
|
+
volume: 1,
|
|
23
|
+
waiting: false,
|
|
21
24
|
fullscreenTarget: null,
|
|
22
25
|
mouseEntered: false,
|
|
23
26
|
controlsMouseEntered: false,
|
|
24
|
-
dragging: false,
|
|
25
27
|
seekedTime: 0,
|
|
26
28
|
seekedPercentage: 0,
|
|
27
29
|
scrubbedPercentage: 0,
|
|
28
30
|
thumbPercentage: 0,
|
|
29
31
|
popoverOffsetX: 0,
|
|
32
|
+
hasOverlay: false,
|
|
33
|
+
hasControls: false,
|
|
30
34
|
controlsBarRect: void 0,
|
|
31
35
|
controlsTrackRect: void 0,
|
|
32
36
|
controlsPopoverRect: void 0
|
|
@@ -6,16 +6,19 @@ export function usePlayerVideoApi(args) {
|
|
|
6
6
|
const { id, playerRef, videoRef } = args;
|
|
7
7
|
const { initializeState } = usePlayerState(toValue(id));
|
|
8
8
|
const state = initializeState();
|
|
9
|
-
const { currentTime, playing,
|
|
10
|
-
const { enter, exit } = useFullscreen(fullscreenTarget);
|
|
9
|
+
const { currentTime, playing, paused, muted, fullscreenTarget, fullscreen } = toRefs(state);
|
|
10
|
+
const { enter, exit, isFullscreen } = useFullscreen(fullscreenTarget);
|
|
11
11
|
function play() {
|
|
12
12
|
playing.value = true;
|
|
13
|
+
paused.value = false;
|
|
13
14
|
}
|
|
14
15
|
function pause() {
|
|
15
16
|
playing.value = false;
|
|
17
|
+
paused.value = true;
|
|
16
18
|
}
|
|
17
19
|
function togglePlay() {
|
|
18
20
|
playing.value = !playing.value;
|
|
21
|
+
paused.value = !playing.value;
|
|
19
22
|
}
|
|
20
23
|
function seek(time) {
|
|
21
24
|
currentTime.value = time;
|
|
@@ -26,6 +29,39 @@ export function usePlayerVideoApi(args) {
|
|
|
26
29
|
function unmute() {
|
|
27
30
|
muted.value = false;
|
|
28
31
|
}
|
|
32
|
+
function initializeFullscreen() {
|
|
33
|
+
if (!playerRef || !videoRef) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
watch(
|
|
37
|
+
[playerRef, videoRef],
|
|
38
|
+
([player, video]) => {
|
|
39
|
+
switch (true) {
|
|
40
|
+
case (!!video && !!player):
|
|
41
|
+
fullscreenTarget.value = isIOS() ? toValue(video) : toValue(player);
|
|
42
|
+
break;
|
|
43
|
+
case !!player:
|
|
44
|
+
fullscreenTarget.value = toValue(player);
|
|
45
|
+
break;
|
|
46
|
+
case !!video:
|
|
47
|
+
fullscreenTarget.value = toValue(video);
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
immediate: true
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
watch(
|
|
56
|
+
isFullscreen,
|
|
57
|
+
(newFullscreen) => {
|
|
58
|
+
fullscreen.value = newFullscreen;
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
immediate: true
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
29
65
|
function enterFullscreen() {
|
|
30
66
|
if (!fullscreenTarget.value) {
|
|
31
67
|
console.error("No fullscreen target found");
|
|
@@ -40,36 +76,6 @@ export function usePlayerVideoApi(args) {
|
|
|
40
76
|
}
|
|
41
77
|
exit();
|
|
42
78
|
}
|
|
43
|
-
watch(playing, (value) => {
|
|
44
|
-
if (!touched.value && value) {
|
|
45
|
-
touched.value = true;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
if (playerRef && !videoRef) {
|
|
49
|
-
watch(playerRef, (value) => {
|
|
50
|
-
if (value) {
|
|
51
|
-
fullscreenTarget.value = toValue(value);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
if (videoRef && !playerRef) {
|
|
56
|
-
watch(videoRef, (value) => {
|
|
57
|
-
if (value) {
|
|
58
|
-
fullscreenTarget.value = toValue(value);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
if (videoRef && playerRef) {
|
|
63
|
-
watch([playerRef, videoRef], ([player, video]) => {
|
|
64
|
-
if (player && video) {
|
|
65
|
-
fullscreenTarget.value = isIOS() ? toValue(video) : toValue(player);
|
|
66
|
-
} else if (player) {
|
|
67
|
-
fullscreenTarget.value = toValue(player);
|
|
68
|
-
} else if (video) {
|
|
69
|
-
fullscreenTarget.value = toValue(video);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
79
|
return {
|
|
74
80
|
play,
|
|
75
81
|
pause,
|
|
@@ -77,6 +83,7 @@ export function usePlayerVideoApi(args) {
|
|
|
77
83
|
seek,
|
|
78
84
|
mute,
|
|
79
85
|
unmute,
|
|
86
|
+
initializeFullscreen,
|
|
80
87
|
enterFullscreen,
|
|
81
88
|
exitFullscreen
|
|
82
89
|
};
|
|
@@ -8,12 +8,14 @@ export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
|
8
8
|
waiting: import("vue").Ref<boolean, boolean>;
|
|
9
9
|
ended: import("vue").Ref<boolean, boolean>;
|
|
10
10
|
playing: import("vue").Ref<boolean, boolean>;
|
|
11
|
+
started: import("vue").Ref<boolean, boolean>;
|
|
12
|
+
paused: import("vue").Ref<boolean, boolean>;
|
|
11
13
|
stalled: import("vue").Ref<boolean, boolean>;
|
|
12
14
|
buffered: import("vue").Ref<import("../types/index.js").Buffered, import("../types/index.js").Buffered>;
|
|
13
15
|
muted: import("vue").Ref<boolean, boolean>;
|
|
14
16
|
touched: import("vue").Ref<boolean, boolean>;
|
|
15
17
|
dragging: import("vue").Ref<boolean, boolean>;
|
|
16
|
-
|
|
18
|
+
fullscreen: import("vue").Ref<boolean, boolean>;
|
|
17
19
|
currentTime: import("vue").Ref<number, number>;
|
|
18
20
|
seekedTime: import("vue").Ref<number, number>;
|
|
19
21
|
seekedPercentage: import("vue").Ref<number, number>;
|
|
@@ -35,6 +37,7 @@ export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
|
35
37
|
seek: (time: number) => void;
|
|
36
38
|
mute: () => void;
|
|
37
39
|
unmute: () => void;
|
|
40
|
+
initializeFullscreen: () => void;
|
|
38
41
|
enterFullscreen: () => void;
|
|
39
42
|
exitFullscreen: () => void;
|
|
40
43
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { toRefs } from "vue";
|
|
2
|
-
import { usePlayerMediaApi } from "./private/usePlayerMediaApi.mjs";
|
|
3
2
|
import { usePlayerVideoApi } from "./private/usePlayerVideoApi.mjs";
|
|
4
3
|
import { usePlayerAudioApi } from "./private/usePlayerAudioApi.mjs";
|
|
5
4
|
import { usePlayerRuntime } from "./private/usePlayerRuntime.mjs";
|
|
@@ -22,12 +21,14 @@ export function useMagicPlayer(id) {
|
|
|
22
21
|
waiting,
|
|
23
22
|
ended,
|
|
24
23
|
playing,
|
|
24
|
+
started,
|
|
25
|
+
paused,
|
|
25
26
|
stalled,
|
|
26
27
|
buffered,
|
|
27
28
|
muted,
|
|
28
29
|
touched,
|
|
29
30
|
dragging,
|
|
30
|
-
|
|
31
|
+
fullscreen,
|
|
31
32
|
seekedTime,
|
|
32
33
|
seekedPercentage,
|
|
33
34
|
scrubbedPercentage,
|
|
@@ -43,12 +44,14 @@ export function useMagicPlayer(id) {
|
|
|
43
44
|
waiting,
|
|
44
45
|
ended,
|
|
45
46
|
playing,
|
|
47
|
+
started,
|
|
48
|
+
paused,
|
|
46
49
|
stalled,
|
|
47
50
|
buffered,
|
|
48
51
|
muted,
|
|
49
52
|
touched,
|
|
50
53
|
dragging,
|
|
51
|
-
|
|
54
|
+
fullscreen,
|
|
52
55
|
currentTime,
|
|
53
56
|
seekedTime,
|
|
54
57
|
seekedPercentage,
|
|
@@ -2,7 +2,8 @@ import type { InjectionKey, MaybeRef, Ref } from 'vue';
|
|
|
2
2
|
import type { MagicPlayerOptions } from '../types/index.js';
|
|
3
3
|
declare const MagicPlayerInstanceId: InjectionKey<MaybeRef<string>>;
|
|
4
4
|
declare const MagicPlayerOptionsKey: InjectionKey<MagicPlayerOptions>;
|
|
5
|
+
declare const MagicPlayerRef: InjectionKey<Ref<HTMLDivElement | null>>;
|
|
5
6
|
declare const MagicPlayerTrackRef: InjectionKey<Ref<HTMLDivElement | null>>;
|
|
6
7
|
declare const MagicPlayerBarRef: InjectionKey<Ref<HTMLDivElement | null>>;
|
|
7
8
|
declare const MagicPlayerPopoverRef: InjectionKey<Ref<HTMLDivElement | null>>;
|
|
8
|
-
export { MagicPlayerInstanceId, MagicPlayerOptionsKey, MagicPlayerTrackRef, MagicPlayerBarRef, MagicPlayerPopoverRef, };
|
|
9
|
+
export { MagicPlayerInstanceId, MagicPlayerOptionsKey, MagicPlayerRef, MagicPlayerTrackRef, MagicPlayerBarRef, MagicPlayerPopoverRef, };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const MagicPlayerInstanceId = Symbol();
|
|
2
2
|
const MagicPlayerOptionsKey = Symbol();
|
|
3
|
+
const MagicPlayerRef = Symbol();
|
|
3
4
|
const MagicPlayerTrackRef = Symbol();
|
|
4
5
|
const MagicPlayerBarRef = Symbol();
|
|
5
6
|
const MagicPlayerPopoverRef = Symbol();
|
|
6
7
|
export {
|
|
7
8
|
MagicPlayerInstanceId,
|
|
8
9
|
MagicPlayerOptionsKey,
|
|
10
|
+
MagicPlayerRef,
|
|
9
11
|
MagicPlayerTrackRef,
|
|
10
12
|
MagicPlayerBarRef,
|
|
11
13
|
MagicPlayerPopoverRef
|
|
@@ -1,51 +1,77 @@
|
|
|
1
|
+
type PlayerMode = 'audio' | 'video';
|
|
1
2
|
export interface MagicPlayerOptions {
|
|
2
3
|
src: string;
|
|
3
|
-
mode?:
|
|
4
|
+
mode?: PlayerMode;
|
|
4
5
|
srcType?: 'native' | 'hls';
|
|
5
6
|
preload?: 'auto' | 'metadata' | 'none';
|
|
6
7
|
autoplay?: boolean;
|
|
8
|
+
playback?: ('viewport' | 'window')[] | false;
|
|
7
9
|
loop?: boolean;
|
|
8
10
|
transition?: {
|
|
9
11
|
videoControls: string;
|
|
10
12
|
};
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
export interface RequiredMagicPlayerOptions {
|
|
15
|
+
src: string;
|
|
16
|
+
mode: 'audio' | 'video';
|
|
17
|
+
srcType: 'native' | 'hls';
|
|
18
|
+
preload: 'auto' | 'metadata' | 'none';
|
|
19
|
+
autoplay: boolean;
|
|
20
|
+
loop: boolean;
|
|
21
|
+
transition: {
|
|
22
|
+
videoControls: string;
|
|
20
23
|
};
|
|
21
|
-
}
|
|
24
|
+
}
|
|
25
|
+
export type Buffered = [number, number][];
|
|
22
26
|
export interface PlayerState {
|
|
23
27
|
id: string;
|
|
28
|
+
buffered: Buffered;
|
|
24
29
|
currentTime: number;
|
|
30
|
+
dragging: boolean;
|
|
25
31
|
duration: number;
|
|
26
|
-
seeking: boolean;
|
|
27
|
-
volume: number;
|
|
28
|
-
rate: number;
|
|
29
|
-
loaded: boolean;
|
|
30
|
-
waiting: boolean;
|
|
31
32
|
ended: boolean;
|
|
33
|
+
loaded: boolean;
|
|
34
|
+
muted: boolean;
|
|
35
|
+
paused: boolean;
|
|
32
36
|
playing: boolean;
|
|
37
|
+
rate: number;
|
|
38
|
+
seeking: boolean;
|
|
33
39
|
stalled: boolean;
|
|
34
|
-
|
|
35
|
-
muted: boolean;
|
|
40
|
+
started: boolean;
|
|
36
41
|
touched: boolean;
|
|
37
|
-
|
|
42
|
+
volume: number;
|
|
43
|
+
waiting: boolean;
|
|
44
|
+
fullscreen: boolean;
|
|
38
45
|
fullscreenTarget: HTMLElement | null;
|
|
39
46
|
mouseEntered: boolean;
|
|
40
47
|
controlsMouseEntered: boolean;
|
|
41
|
-
dragging: boolean;
|
|
42
48
|
seekedTime: number;
|
|
43
49
|
seekedPercentage: number;
|
|
44
50
|
scrubbedPercentage: number;
|
|
45
51
|
thumbPercentage: number;
|
|
46
52
|
popoverOffsetX: number;
|
|
53
|
+
hasOverlay: boolean;
|
|
54
|
+
hasControls: boolean;
|
|
47
55
|
controlsBarRect: DOMRect | undefined;
|
|
48
56
|
controlsTrackRect: DOMRect | undefined;
|
|
49
57
|
controlsPopoverRect: DOMRect | undefined;
|
|
50
58
|
}
|
|
59
|
+
export interface PlayerEvents {
|
|
60
|
+
onDragStart: string;
|
|
61
|
+
onDragEnd: string;
|
|
62
|
+
onEnd: string;
|
|
63
|
+
onFullscreenEnter: string;
|
|
64
|
+
onFullscreenLeave: string;
|
|
65
|
+
onLoad: string;
|
|
66
|
+
onMute: string;
|
|
67
|
+
onUnmute: string;
|
|
68
|
+
onPause: string;
|
|
69
|
+
onPlay: string;
|
|
70
|
+
onRateChange: string;
|
|
71
|
+
onStall: string;
|
|
72
|
+
onStart: string;
|
|
73
|
+
onTouch: string;
|
|
74
|
+
onVolumeChange: string;
|
|
75
|
+
onWait: string;
|
|
76
|
+
}
|
|
51
77
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const defaultOptions:
|
|
1
|
+
import type { RequiredMagicPlayerOptions } from '../types/index.js';
|
|
2
|
+
declare const defaultOptions: RequiredMagicPlayerOptions;
|
|
3
3
|
export { defaultOptions };
|
|
@@ -3,12 +3,10 @@ interface MagicScrollCollisionProps {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
offset?: CollisionOffset;
|
|
5
5
|
}
|
|
6
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
6
|
declare var __VLS_1: {};
|
|
8
|
-
type __VLS_Slots =
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
9
8
|
default?: (props: typeof __VLS_1) => any;
|
|
10
|
-
}
|
|
11
|
-
declare const __VLS_self: import("vue").DefineComponent<MagicScrollCollisionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollCollisionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
};
|
|
12
10
|
declare const __VLS_component: import("vue").DefineComponent<MagicScrollCollisionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollCollisionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
11
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
14
12
|
export default _default;
|
|
@@ -5,12 +5,10 @@ interface MagicScrollMotionProps {
|
|
|
5
5
|
sequenceOptions?: SequenceOptions;
|
|
6
6
|
progress?: number;
|
|
7
7
|
}
|
|
8
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
9
8
|
declare var __VLS_1: {};
|
|
10
|
-
type __VLS_Slots =
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
11
10
|
default?: (props: typeof __VLS_1) => any;
|
|
12
|
-
}
|
|
13
|
-
declare const __VLS_self: import("vue").DefineComponent<MagicScrollMotionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollMotionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
};
|
|
14
12
|
declare const __VLS_component: import("vue").DefineComponent<MagicScrollMotionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollMotionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
13
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
14
|
export default _default;
|
|
@@ -2,25 +2,6 @@ import { type MaybeElementRef } from '@vueuse/core';
|
|
|
2
2
|
interface MagicScrollProviderProps {
|
|
3
3
|
target?: MaybeElementRef<HTMLElement>;
|
|
4
4
|
}
|
|
5
|
-
declare const scrollReturn: {
|
|
6
|
-
x: import("vue").WritableComputedRef<number, number>;
|
|
7
|
-
y: import("vue").WritableComputedRef<number, number>;
|
|
8
|
-
isScrolling: import("vue").ShallowRef<boolean, boolean>;
|
|
9
|
-
arrivedState: {
|
|
10
|
-
left: boolean;
|
|
11
|
-
right: boolean;
|
|
12
|
-
top: boolean;
|
|
13
|
-
bottom: boolean;
|
|
14
|
-
};
|
|
15
|
-
directions: {
|
|
16
|
-
left: boolean;
|
|
17
|
-
right: boolean;
|
|
18
|
-
top: boolean;
|
|
19
|
-
bottom: boolean;
|
|
20
|
-
};
|
|
21
|
-
measure(): void;
|
|
22
|
-
};
|
|
23
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
24
5
|
declare var __VLS_1: {
|
|
25
6
|
scrollReturn: {
|
|
26
7
|
x: import("vue").WritableComputedRef<number, number>;
|
|
@@ -41,12 +22,9 @@ declare var __VLS_1: {
|
|
|
41
22
|
measure(): void;
|
|
42
23
|
};
|
|
43
24
|
};
|
|
44
|
-
type __VLS_Slots =
|
|
25
|
+
type __VLS_Slots = {} & {
|
|
45
26
|
default?: (props: typeof __VLS_1) => any;
|
|
46
|
-
}
|
|
47
|
-
declare const __VLS_self: import("vue").DefineComponent<MagicScrollProviderProps, {
|
|
48
|
-
scrollReturn: typeof scrollReturn;
|
|
49
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
};
|
|
50
28
|
declare const __VLS_component: import("vue").DefineComponent<MagicScrollProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
29
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
52
30
|
export default _default;
|
|
@@ -3,17 +3,12 @@ interface MagicScrollSceneProps {
|
|
|
3
3
|
from?: ScrollIntersection;
|
|
4
4
|
to?: ScrollIntersection;
|
|
5
5
|
}
|
|
6
|
-
declare const progress: import("vue").ShallowRef<number, number>;
|
|
7
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
8
6
|
declare var __VLS_1: {
|
|
9
7
|
progress: number;
|
|
10
8
|
};
|
|
11
|
-
type __VLS_Slots =
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
12
10
|
default?: (props: typeof __VLS_1) => any;
|
|
13
|
-
}
|
|
14
|
-
declare const __VLS_self: import("vue").DefineComponent<MagicScrollSceneProps, {
|
|
15
|
-
progress: typeof progress;
|
|
16
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollSceneProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
};
|
|
17
12
|
declare const __VLS_component: import("vue").DefineComponent<MagicScrollSceneProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollSceneProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
13
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
14
|
export default _default;
|
|
@@ -2,27 +2,10 @@ interface MagicToastViewProps {
|
|
|
2
2
|
id: string;
|
|
3
3
|
index: number;
|
|
4
4
|
}
|
|
5
|
-
declare const state: import("../types/index.js").ToastState;
|
|
6
|
-
declare const view: import("vue").ComputedRef<import("../types/index.js").ToastView>;
|
|
7
|
-
declare const reversedIndex: import("vue").ComputedRef<number>;
|
|
8
|
-
declare const height: import("vue").ComputedRef<string>;
|
|
9
|
-
declare const offset: import("vue").ComputedRef<string>;
|
|
10
|
-
declare const style: import("vue").ComputedRef<string>, onPointerdown: (e: PointerEvent) => void, onClick: (e: MouseEvent) => Promise<void>;
|
|
11
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
12
5
|
declare var __VLS_1: {};
|
|
13
|
-
type __VLS_Slots =
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
14
7
|
default?: (props: typeof __VLS_1) => any;
|
|
15
|
-
}
|
|
16
|
-
declare const __VLS_self: import("vue").DefineComponent<MagicToastViewProps, {
|
|
17
|
-
state: typeof state;
|
|
18
|
-
view: typeof view;
|
|
19
|
-
reversedIndex: typeof reversedIndex;
|
|
20
|
-
height: typeof height;
|
|
21
|
-
offset: typeof offset;
|
|
22
|
-
style: typeof style;
|
|
23
|
-
onPointerdown: typeof onPointerdown;
|
|
24
|
-
onClick: typeof onClick;
|
|
25
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicToastViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
};
|
|
26
9
|
declare const __VLS_component: import("vue").DefineComponent<MagicToastViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicToastViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
10
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
28
11
|
export default _default;
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
interpolate,
|
|
8
8
|
isWithinRange
|
|
9
9
|
} from "@maas/vue-equipment/utils";
|
|
10
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
10
11
|
import { useToastState } from "./useToastState.mjs";
|
|
11
|
-
import { useMagicEmitter } from "../../../../MagicEmitter/index.mjs";
|
|
12
12
|
import { useToastView } from "./useToastView.mjs";
|
|
13
13
|
import { useToastScrollLock } from "./useToastScrollLock.mjs";
|
|
14
14
|
export function useToastDrag(args) {
|
|
@@ -40,14 +40,14 @@ export type ActiveToast = {
|
|
|
40
40
|
bottom: number;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export interface ToastEvents {
|
|
44
44
|
beforeEnter: string;
|
|
45
45
|
enter: string;
|
|
46
46
|
afterEnter: string;
|
|
47
47
|
beforeLeave: string;
|
|
48
48
|
leave: string;
|
|
49
49
|
afterLeave: string;
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
51
|
export type MagicToastOptions = {
|
|
52
52
|
debug?: boolean;
|
|
53
53
|
position?: Position;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "Our Frontend Toolkit, Free and Open Source",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.24",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Robin Scholz",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"@maas/mirror": "catalog:",
|
|
18
18
|
"@release-it/bumper": "^7.0.2",
|
|
19
19
|
"@types/node": "catalog:",
|
|
20
|
+
"eslint": "^9.25.1",
|
|
21
|
+
"prettier": "catalog:",
|
|
20
22
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
21
23
|
"release-it": "^18.1.2",
|
|
22
24
|
"tailwindcss": "catalog:",
|
|
@@ -36,8 +38,8 @@
|
|
|
36
38
|
"types": "./dist/plugins/index.d.ts",
|
|
37
39
|
"import": "./dist/plugins/index.mjs"
|
|
38
40
|
},
|
|
39
|
-
"./plugins/MagicPlayer/css
|
|
40
|
-
"import": "./dist/plugins/MagicPlayer/src/css
|
|
41
|
+
"./plugins/MagicPlayer/css": {
|
|
42
|
+
"import": "./dist/plugins/MagicPlayer/src/css"
|
|
41
43
|
},
|
|
42
44
|
"./utils": {
|
|
43
45
|
"types": "./dist/utils/index.d.mts",
|