@maas/vue-equipment 1.0.0-beta.11 → 1.0.0-beta.13
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/plugins/.turbo/turbo-lint.log +2 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +11 -6
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +31 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +8 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +6 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +5 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +6 -6
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +3 -3
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +5 -9
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +1 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +17 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +5 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +91 -83
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +18 -7
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +53 -24
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +8 -6
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +0 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +6 -47
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +4 -31
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +147 -234
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +1 -15
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +17 -164
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +0 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +6 -24
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +7 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +56 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +0 -5
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +7 -62
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +32 -51
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +47 -0
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +5 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +10 -1
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +29 -0
- package/package.json +4 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +0 -15
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.mjs +0 -9
|
@@ -2,7 +2,14 @@
|
|
|
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 {
|
|
6
|
+
toRefs,
|
|
7
|
+
useTemplateRef,
|
|
8
|
+
watch,
|
|
9
|
+
onMounted,
|
|
10
|
+
inject,
|
|
11
|
+
onBeforeUnmount
|
|
12
|
+
} from "vue";
|
|
6
13
|
import {
|
|
7
14
|
useElementVisibility,
|
|
8
15
|
useEventListener,
|
|
@@ -11,13 +18,14 @@ import {
|
|
|
11
18
|
import { usePlayerVideoApi } from "../composables/private/usePlayerVideoApi";
|
|
12
19
|
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
13
20
|
import { usePlayerRuntime } from "../composables/private/usePlayerRuntime";
|
|
21
|
+
import { usePlayerState } from "../composables/private/usePlayerState";
|
|
14
22
|
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
15
23
|
export default /* @__PURE__ */ _defineComponent({
|
|
16
24
|
__name: "MagicPlayerVideo",
|
|
17
25
|
setup(__props) {
|
|
18
|
-
const
|
|
26
|
+
const injectedInstanceId = inject(MagicPlayerInstanceId, void 0);
|
|
19
27
|
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
20
|
-
if (!
|
|
28
|
+
if (!injectedInstanceId) {
|
|
21
29
|
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
22
30
|
}
|
|
23
31
|
if (!injectedOptions) {
|
|
@@ -26,17 +34,20 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
26
34
|
const elRef = useTemplateRef("el");
|
|
27
35
|
const isVisible = useElementVisibility(elRef);
|
|
28
36
|
const { initialize, destroy } = usePlayerRuntime({
|
|
29
|
-
id:
|
|
37
|
+
id: injectedInstanceId,
|
|
30
38
|
mediaRef: elRef,
|
|
31
39
|
src: injectedOptions.src,
|
|
32
40
|
srcType: injectedOptions.srcType
|
|
33
41
|
});
|
|
34
|
-
const {
|
|
35
|
-
|
|
42
|
+
const { initializeState } = usePlayerState(injectedInstanceId);
|
|
43
|
+
const state = initializeState();
|
|
44
|
+
const { muted, playing } = toRefs(state);
|
|
45
|
+
usePlayerMediaApi({
|
|
46
|
+
id: injectedInstanceId,
|
|
36
47
|
mediaRef: elRef
|
|
37
48
|
});
|
|
38
49
|
const { play, pause } = usePlayerVideoApi({
|
|
39
|
-
id:
|
|
50
|
+
id: injectedInstanceId,
|
|
40
51
|
videoRef: elRef
|
|
41
52
|
});
|
|
42
53
|
function onWindowFocus() {
|
|
@@ -15,18 +15,31 @@ const _hoisted_6 = {
|
|
|
15
15
|
};
|
|
16
16
|
const _hoisted_7 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
17
17
|
const _hoisted_8 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
18
|
-
import {
|
|
19
|
-
|
|
18
|
+
import {
|
|
19
|
+
toRefs,
|
|
20
|
+
computed,
|
|
21
|
+
inject,
|
|
22
|
+
provide,
|
|
23
|
+
useTemplateRef,
|
|
24
|
+
onBeforeUnmount
|
|
25
|
+
} from "vue";
|
|
26
|
+
import { useElementVisibility, useIdle } from "@vueuse/core";
|
|
20
27
|
import IconPlay from "./icons/Play.vue";
|
|
21
28
|
import IconPause from "./icons/Pause.vue";
|
|
22
29
|
import IconVolumeOn from "./icons/VolumeOn.vue";
|
|
23
30
|
import IconVolumeOff from "./icons/VolumeOff.vue";
|
|
24
31
|
import IconFullscreenEnter from "./icons/FullscreenEnter.vue";
|
|
25
32
|
import IconFullscreenExit from "./icons/FullscreenExit.vue";
|
|
26
|
-
import {
|
|
33
|
+
import { usePlayerState } from "../composables/private/usePlayerState";
|
|
27
34
|
import { usePlayerVideoApi } from "../composables/private/usePlayerVideoApi";
|
|
28
35
|
import { usePlayerControlsApi } from "../composables/private/usePlayerControlsApi";
|
|
29
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
MagicPlayerInstanceId,
|
|
38
|
+
MagicPlayerOptionsKey,
|
|
39
|
+
MagicPlayerTrackRef,
|
|
40
|
+
MagicPlayerPopoverRef,
|
|
41
|
+
MagicPlayerBarRef
|
|
42
|
+
} from "../symbols";
|
|
30
43
|
import "@maas/vue-equipment/utils/css/animations/fade-up-in.css";
|
|
31
44
|
import "@maas/vue-equipment/utils/css/animations/fade-up-out.css";
|
|
32
45
|
export default /* @__PURE__ */ _defineComponent({
|
|
@@ -37,9 +50,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
37
50
|
transition: { type: String, required: false }
|
|
38
51
|
},
|
|
39
52
|
setup(__props) {
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
53
|
+
const injectedInstanceId = inject(MagicPlayerInstanceId, void 0);
|
|
54
|
+
const mappedInstanceId = computed(() => __props.id ?? injectedInstanceId);
|
|
55
|
+
if (!mappedInstanceId.value) {
|
|
43
56
|
throw new Error(
|
|
44
57
|
"MagicPlayerVideoControls must be nested inside MagicPlayerProvider or be passed an id as a prop."
|
|
45
58
|
);
|
|
@@ -51,26 +64,28 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
51
64
|
const barRef = useTemplateRef("bar");
|
|
52
65
|
const trackRef = useTemplateRef("track");
|
|
53
66
|
const popoverRef = useTemplateRef("popover");
|
|
54
|
-
const {
|
|
55
|
-
|
|
56
|
-
});
|
|
67
|
+
const { initializeState } = usePlayerState(mappedInstanceId.value);
|
|
68
|
+
const state = initializeState();
|
|
57
69
|
const {
|
|
70
|
+
playing,
|
|
71
|
+
waiting,
|
|
72
|
+
muted,
|
|
58
73
|
touched,
|
|
59
74
|
mouseEntered,
|
|
75
|
+
controlsMouseEntered,
|
|
60
76
|
isFullscreen,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} = usePlayerVideoApi({ id: mappedId.value });
|
|
68
|
-
const { popoverOffsetX, seekedTime } = usePlayerControlsApi({
|
|
69
|
-
id: mappedId.value,
|
|
77
|
+
popoverOffsetX,
|
|
78
|
+
seekedTime
|
|
79
|
+
} = toRefs(state);
|
|
80
|
+
const { play, pause, mute, unmute, enterFullscreen, exitFullscreen } = usePlayerVideoApi({ id: mappedInstanceId.value });
|
|
81
|
+
const { initialize, destroy, onMouseenter, onMouseleave } = usePlayerControlsApi({
|
|
82
|
+
id: mappedInstanceId.value,
|
|
70
83
|
barRef,
|
|
71
84
|
trackRef,
|
|
72
85
|
popoverRef
|
|
73
86
|
});
|
|
87
|
+
const elRef = useTemplateRef("el");
|
|
88
|
+
const isVisible = useElementVisibility(elRef);
|
|
74
89
|
const { idle } = useIdle(3e3);
|
|
75
90
|
const hidden = computed(() => {
|
|
76
91
|
switch (true) {
|
|
@@ -78,7 +93,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
78
93
|
return false;
|
|
79
94
|
case (playing.value && idle.value):
|
|
80
95
|
return true;
|
|
81
|
-
case (playing.value && !mouseEntered.value):
|
|
96
|
+
case (playing.value && !controlsMouseEntered.value && !mouseEntered.value):
|
|
97
|
+
return true;
|
|
98
|
+
case !isVisible.value:
|
|
82
99
|
return true;
|
|
83
100
|
case !touched.value:
|
|
84
101
|
return true;
|
|
@@ -86,10 +103,18 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
86
103
|
return false;
|
|
87
104
|
}
|
|
88
105
|
});
|
|
89
|
-
|
|
106
|
+
initialize();
|
|
107
|
+
onBeforeUnmount(() => {
|
|
108
|
+
destroy();
|
|
109
|
+
});
|
|
110
|
+
provide(MagicPlayerInstanceId, mappedInstanceId.value);
|
|
111
|
+
provide(MagicPlayerTrackRef, trackRef);
|
|
112
|
+
provide(MagicPlayerPopoverRef, popoverRef);
|
|
113
|
+
provide(MagicPlayerBarRef, barRef);
|
|
90
114
|
return (_ctx, _cache) => {
|
|
91
115
|
const _component_magic_player_timeline = _resolveComponent("magic-player-timeline");
|
|
92
116
|
return _openBlock(), _createElementBlock("div", {
|
|
117
|
+
ref: "el",
|
|
93
118
|
class: "magic-player-video-controls",
|
|
94
119
|
"data-fullscreen": _unref(isFullscreen),
|
|
95
120
|
"data-touched": _unref(touched),
|
|
@@ -98,8 +123,12 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
98
123
|
"data-waiting": _unref(waiting),
|
|
99
124
|
"data-muted": _unref(muted),
|
|
100
125
|
"data-idle": _unref(idle),
|
|
101
|
-
"data-hover": _unref(
|
|
102
|
-
"data-standalone": _ctx.standalone
|
|
126
|
+
"data-hover": _unref(controlsMouseEntered),
|
|
127
|
+
"data-standalone": _ctx.standalone,
|
|
128
|
+
onMouseenter: _cache[6] || (_cache[6] = //@ts-ignore
|
|
129
|
+
(...args) => _unref(onMouseenter) && _unref(onMouseenter)(...args)),
|
|
130
|
+
onMouseleave: _cache[7] || (_cache[7] = //@ts-ignore
|
|
131
|
+
(...args) => _unref(onMouseleave) && _unref(onMouseleave)(...args))
|
|
103
132
|
}, [
|
|
104
133
|
_createVNode(_Transition, {
|
|
105
134
|
name: mappedTransition.value,
|
|
@@ -214,7 +243,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
214
243
|
_: 3
|
|
215
244
|
/* FORWARDED */
|
|
216
245
|
}, 8, ["name"])
|
|
217
|
-
],
|
|
246
|
+
], 40, _hoisted_1);
|
|
218
247
|
};
|
|
219
248
|
}
|
|
220
249
|
});
|
|
@@ -12,9 +12,9 @@ interface MagicPlayerControlsProps {
|
|
|
12
12
|
transition?: string;
|
|
13
13
|
}
|
|
14
14
|
declare const mappedTransition: import("vue").ComputedRef<string | undefined>;
|
|
15
|
-
declare const playing: import("vue").
|
|
16
|
-
declare const
|
|
17
|
-
declare const
|
|
15
|
+
declare const playing: import("vue").Ref<boolean, boolean>, waiting: import("vue").Ref<boolean, boolean>, muted: import("vue").Ref<boolean, boolean>, touched: import("vue").Ref<boolean, boolean>, controlsMouseEntered: import("vue").Ref<boolean, boolean>, isFullscreen: import("vue").Ref<boolean, boolean>, popoverOffsetX: import("vue").Ref<number, number>, seekedTime: import("vue").Ref<number, number>;
|
|
16
|
+
declare const play: () => void, pause: () => void, mute: () => void, unmute: () => void, enterFullscreen: () => void, exitFullscreen: () => void;
|
|
17
|
+
declare const onMouseenter: () => void, onMouseleave: () => void;
|
|
18
18
|
declare const idle: import("vue").Ref<boolean, boolean>;
|
|
19
19
|
declare const hidden: import("vue").ComputedRef<boolean>;
|
|
20
20
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
@@ -50,16 +50,18 @@ declare const __VLS_self: import("vue").DefineComponent<MagicPlayerControlsProps
|
|
|
50
50
|
waiting: typeof waiting;
|
|
51
51
|
muted: typeof muted;
|
|
52
52
|
touched: typeof touched;
|
|
53
|
-
|
|
53
|
+
controlsMouseEntered: typeof controlsMouseEntered;
|
|
54
54
|
isFullscreen: typeof isFullscreen;
|
|
55
|
+
popoverOffsetX: typeof popoverOffsetX;
|
|
56
|
+
seekedTime: typeof seekedTime;
|
|
55
57
|
play: typeof play;
|
|
56
58
|
pause: typeof pause;
|
|
57
59
|
mute: typeof mute;
|
|
58
60
|
unmute: typeof unmute;
|
|
59
61
|
enterFullscreen: typeof enterFullscreen;
|
|
60
62
|
exitFullscreen: typeof exitFullscreen;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
onMouseenter: typeof onMouseenter;
|
|
64
|
+
onMouseleave: typeof onMouseleave;
|
|
63
65
|
idle: typeof idle;
|
|
64
66
|
hidden: typeof hidden;
|
|
65
67
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,15 +3,11 @@ export type UsePlayerAudioApiArgs = {
|
|
|
3
3
|
id: MaybeRef<string>;
|
|
4
4
|
};
|
|
5
5
|
export declare function usePlayerAudioApi(args: UsePlayerAudioApiArgs): {
|
|
6
|
-
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
7
|
-
touched: import("vue").ShallowRef<boolean, boolean>;
|
|
8
6
|
play: () => void;
|
|
9
7
|
pause: () => void;
|
|
10
8
|
togglePlay: () => void;
|
|
11
9
|
seek: (time: number) => void;
|
|
12
10
|
mute: () => void;
|
|
13
11
|
unmute: () => void;
|
|
14
|
-
onMouseenter: () => void;
|
|
15
|
-
onMouseleave: () => void;
|
|
16
12
|
};
|
|
17
13
|
export type UsePlayerAudioApiReturn = ReturnType<typeof usePlayerAudioApi>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { usePlayerMediaApi } from "./usePlayerMediaApi.mjs";
|
|
1
|
+
import { toRefs, watch, toValue } from "vue";
|
|
2
|
+
import { usePlayerState } from "./usePlayerState.mjs";
|
|
4
3
|
export function usePlayerAudioApi(args) {
|
|
5
4
|
const { id } = args;
|
|
6
|
-
const {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const { initializeState } = usePlayerState(toValue(id));
|
|
6
|
+
const state = initializeState();
|
|
7
|
+
const { touched, currentTime, playing, muted } = toRefs(state);
|
|
9
8
|
function play() {
|
|
10
9
|
playing.value = true;
|
|
11
10
|
}
|
|
@@ -24,57 +23,17 @@ export function usePlayerAudioApi(args) {
|
|
|
24
23
|
function unmute() {
|
|
25
24
|
muted.value = false;
|
|
26
25
|
}
|
|
27
|
-
function onMouseenter() {
|
|
28
|
-
mouseEntered.value = true;
|
|
29
|
-
}
|
|
30
|
-
function onMouseleave() {
|
|
31
|
-
mouseEntered.value = false;
|
|
32
|
-
}
|
|
33
26
|
watch(playing, (value) => {
|
|
34
27
|
if (!touched.value && value) {
|
|
35
28
|
touched.value = true;
|
|
36
29
|
}
|
|
37
30
|
});
|
|
38
|
-
const emitter = usePlayerStateEmitter();
|
|
39
|
-
emitter.on("update", (payload) => {
|
|
40
|
-
if (payload.id !== toValue(id)) return;
|
|
41
|
-
if (payload.api === "player") {
|
|
42
|
-
switch (payload.key) {
|
|
43
|
-
case "mouseEntered":
|
|
44
|
-
mouseEntered.value = payload.value;
|
|
45
|
-
break;
|
|
46
|
-
case "touched":
|
|
47
|
-
touched.value = payload.value;
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
watch(mouseEntered, (value) => {
|
|
53
|
-
emitter.emit("update", {
|
|
54
|
-
id: toValue(id),
|
|
55
|
-
api: "player",
|
|
56
|
-
key: "mouseEntered",
|
|
57
|
-
value
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
watch(touched, (value) => {
|
|
61
|
-
emitter.emit("update", {
|
|
62
|
-
id: toValue(id),
|
|
63
|
-
api: "player",
|
|
64
|
-
key: "touched",
|
|
65
|
-
value
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
31
|
return {
|
|
69
|
-
mouseEntered,
|
|
70
|
-
touched,
|
|
71
32
|
play,
|
|
72
33
|
pause,
|
|
73
34
|
togglePlay,
|
|
74
35
|
seek,
|
|
75
36
|
mute,
|
|
76
|
-
unmute
|
|
77
|
-
onMouseenter,
|
|
78
|
-
onMouseleave
|
|
37
|
+
unmute
|
|
79
38
|
};
|
|
80
39
|
}
|
|
@@ -6,39 +6,12 @@ export type UsePlayerControlsApiArgs = {
|
|
|
6
6
|
popoverRef?: Ref<HTMLDivElement | null>;
|
|
7
7
|
};
|
|
8
8
|
export declare function usePlayerControlsApi(args: UsePlayerControlsApiArgs): {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
seekedTime: import("vue").ShallowRef<number, number>;
|
|
12
|
-
seekedPercentage: import("vue").ShallowRef<number, number>;
|
|
13
|
-
scrubbedPercentage: import("vue").ShallowRef<number, number>;
|
|
9
|
+
initialize: () => void;
|
|
10
|
+
destroy: () => void;
|
|
14
11
|
bufferedPercentage: import("vue").ComputedRef<number>;
|
|
15
|
-
thumbPercentage: import("vue").ShallowRef<number, number>;
|
|
16
|
-
popoverOffsetX: import("vue").ShallowRef<number, number>;
|
|
17
12
|
onMouseenter: () => void;
|
|
18
13
|
onMouseleave: () => void;
|
|
19
|
-
onPointerdown: (e:
|
|
20
|
-
|
|
21
|
-
onPointermove: (e: MouseEvent | TouchEvent) => void;
|
|
22
|
-
trackRect: Ref<{
|
|
23
|
-
height: number;
|
|
24
|
-
width: number;
|
|
25
|
-
x: number;
|
|
26
|
-
y: number;
|
|
27
|
-
readonly bottom: number;
|
|
28
|
-
readonly left: number;
|
|
29
|
-
readonly right: number;
|
|
30
|
-
readonly top: number;
|
|
31
|
-
toJSON: () => any;
|
|
32
|
-
} | undefined, DOMRect | {
|
|
33
|
-
height: number;
|
|
34
|
-
width: number;
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
readonly bottom: number;
|
|
38
|
-
readonly left: number;
|
|
39
|
-
readonly right: number;
|
|
40
|
-
readonly top: number;
|
|
41
|
-
toJSON: () => any;
|
|
42
|
-
} | undefined>;
|
|
14
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
15
|
+
onPointermove: (e: PointerEvent) => void;
|
|
43
16
|
};
|
|
44
17
|
export type UsePlayerControlsApiReturn = ReturnType<typeof usePlayerControlsApi>;
|