@maas/vue-equipment 1.0.0-beta.34 → 1.0.0-beta.36
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/useScrollTo/index.js +6 -2
- package/dist/composables/useScrollTo/index.js.map +1 -1
- package/dist/nuxt/module.d.mts +2 -2
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +8 -1
- package/dist/plugins/.turbo/turbo-lint.log +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +15 -6
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +17 -12
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +11 -5
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.mjs +5 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +28 -10
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +11 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +19 -9
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +17 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +11 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +22 -11
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +11 -3
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.mjs +3 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandView.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandView.mjs +63 -44
- package/dist/plugins/MagicCommand/src/composables/useMagicCommand.mjs +21 -4
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +12 -3
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +11 -5
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +9 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +11 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +8 -3
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +3 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +7 -2
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +7 -2
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +3 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +6 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +55 -21
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.mjs +3 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerUtils.mjs +21 -8
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +6 -1
- package/dist/plugins/MagicError/index.d.ts +5 -0
- package/dist/plugins/MagicError/index.mjs +3 -0
- package/dist/plugins/MagicError/nuxt.d.ts +2 -0
- package/dist/plugins/MagicError/nuxt.mjs +12 -0
- package/dist/plugins/MagicError/package.json +40 -0
- package/dist/plugins/MagicError/src/MagicError.d.ts +0 -0
- package/dist/plugins/MagicError/src/MagicError.mjs +0 -0
- package/dist/plugins/MagicError/src/class/MagicError.d.ts +6 -0
- package/dist/plugins/MagicError/src/class/MagicError.mjs +15 -0
- package/dist/plugins/MagicError/src/composables/useMagicError.d.ts +18 -0
- package/dist/plugins/MagicError/src/composables/useMagicError.mjs +31 -0
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +22 -10
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +15 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +4 -3
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +19 -9
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +19 -13
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +15 -10
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +12 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +3 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuItem.mjs +12 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +22 -10
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +13 -4
- package/dist/plugins/MagicMenu/src/types/index.d.ts +2 -2
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +1 -1
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +3 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -1
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +7 -3
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +15 -2
- package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +1 -1
- package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +3 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +17 -7
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +11 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +11 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +29 -14
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +11 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +11 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +11 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +17 -7
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +11 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +1 -1
- 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/usePlayerMediaApi.mjs +65 -11
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +1 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +96 -16
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +3 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +7 -2
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +2 -0
- package/dist/plugins/MagicPlayer/src/utils/defaultOptions.mjs +1 -0
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +12 -6
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +11 -3
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +11 -3
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +1 -1
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +2 -2
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +7 -5
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +3 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +16 -21
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
<script setup>
|
|
20
20
|
import { computed, inject, provide, onBeforeUnmount, watch, useId } from "vue";
|
|
21
|
+
import {
|
|
22
|
+
useMagicError
|
|
23
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
21
24
|
import { useMenuItem } from "../composables/private/useMenuItem";
|
|
22
25
|
import { useMenuState } from "../composables/private/useMenuState";
|
|
23
26
|
import { useMenuView } from "../composables/private/useMenuView";
|
|
@@ -33,18 +36,25 @@ const { id, disabled } = defineProps({
|
|
|
33
36
|
disabled: { type: Boolean, required: false }
|
|
34
37
|
});
|
|
35
38
|
const emit = defineEmits(["click"]);
|
|
39
|
+
const magicError = useMagicError({
|
|
40
|
+
prefix: "MagicMenu",
|
|
41
|
+
source: "MagicMenu"
|
|
42
|
+
});
|
|
36
43
|
const instanceId = inject(MagicMenuInstanceId, void 0);
|
|
37
44
|
const viewId = inject(MagicMenuViewId, void 0);
|
|
38
45
|
const contentId = inject(MagicMenuContentId, void 0);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
magicError.assert(instanceId, {
|
|
47
|
+
message: "MagicMenuItem must be nested inside MagicMenuProvider",
|
|
48
|
+
errorCode: "missing_instance_id"
|
|
49
|
+
});
|
|
50
|
+
magicError.assert(viewId, {
|
|
51
|
+
message: "MagicMenuItem must be nested inside MagicMenuView",
|
|
52
|
+
errorCode: "missing_view_id"
|
|
53
|
+
});
|
|
54
|
+
magicError.assert(contentId, {
|
|
55
|
+
message: "MagicMenuItem must be nested inside MagicMenuContent",
|
|
56
|
+
errorCode: "missing_content_id"
|
|
57
|
+
});
|
|
48
58
|
const mappedId = computed(() => id ?? `magic-menu-item-${useId()}`);
|
|
49
59
|
const mappedActive = computed(() => item.active);
|
|
50
60
|
const { initializeItem, deleteItem, selectItem, unselectItem } = useMenuItem({
|
|
@@ -9,7 +9,7 @@ declare var __VLS_1: {
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicMenuItemProps,
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
13
|
click: (event: MouseEvent) => any;
|
|
14
14
|
}, string, import("vue").PublicProps, Readonly<MagicMenuItemProps> & Readonly<{
|
|
15
15
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
@@ -9,7 +9,7 @@ declare var __VLS_8: {};
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_8) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicMenuProviderProps,
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicMenuProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicMenuProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, 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 & {
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
<script setup>
|
|
16
16
|
import { computed, inject, watch } from "vue";
|
|
17
17
|
import { Primitive } from "@maas/vue-primitive";
|
|
18
|
+
import {
|
|
19
|
+
useMagicError
|
|
20
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
18
21
|
import { useMenuView } from "../composables/private/useMenuView";
|
|
19
22
|
import { useMenuChannel } from "../composables/private/useMenuChannel";
|
|
20
23
|
import { MagicMenuInstanceId, MagicMenuViewId } from "../symbols";
|
|
@@ -27,23 +30,26 @@ const { disabled, channelId, instanceId, viewId, trigger } = defineProps({
|
|
|
27
30
|
trigger: { type: Array, required: false },
|
|
28
31
|
asChild: { type: Boolean, required: false }
|
|
29
32
|
});
|
|
33
|
+
const magicError = useMagicError({
|
|
34
|
+
prefix: "MagicMenu",
|
|
35
|
+
source: "MagicMenu"
|
|
36
|
+
});
|
|
30
37
|
const injectedInstanceId = inject(MagicMenuInstanceId, instanceId);
|
|
31
38
|
const injectedViewId = inject(MagicMenuViewId, viewId);
|
|
32
39
|
const mappedInstanceId = computed(() => instanceId ?? injectedInstanceId);
|
|
33
40
|
const mappedViewId = computed(() => viewId ?? injectedViewId);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
41
|
+
magicError.assert(mappedInstanceId.value, {
|
|
42
|
+
message: "MagicMenuRemote must be nested inside MagicMenuProvider or an instanceId must be provided",
|
|
43
|
+
errorCode: "missing_instance_id"
|
|
44
|
+
});
|
|
45
|
+
magicError.assert(mappedViewId.value, {
|
|
46
|
+
message: "MagicMenuRemote must be nested inside MagicMenuView or a viewId must be provided",
|
|
47
|
+
errorCode: "missing_view_id"
|
|
48
|
+
});
|
|
49
|
+
magicError.assert(channelId, {
|
|
50
|
+
message: "MagicMenuRemote requires a channelId",
|
|
51
|
+
errorCode: "id_required"
|
|
52
|
+
});
|
|
47
53
|
const mappedChannelId = computed(() => `magic-menu-channel-${channelId}`);
|
|
48
54
|
const mappedTrigger = computed(() => trigger ?? ["mouseenter"]);
|
|
49
55
|
const { getView } = useMenuView(mappedInstanceId.value);
|
|
@@ -14,7 +14,7 @@ declare var __VLS_11: {
|
|
|
14
14
|
type __VLS_Slots = {} & {
|
|
15
15
|
default?: (props: typeof __VLS_11) => any;
|
|
16
16
|
};
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicMenuRemoteProps,
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicMenuRemoteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicMenuRemoteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
19
|
export default _default;
|
|
20
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
<script setup>
|
|
19
19
|
import { computed, inject, useTemplateRef, toValue, watch } from "vue";
|
|
20
20
|
import { Primitive } from "@maas/vue-primitive";
|
|
21
|
+
import {
|
|
22
|
+
useMagicError
|
|
23
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
21
24
|
import { useMenuState } from "../composables/private/useMenuState";
|
|
22
25
|
import { useMenuView } from "../composables/private/useMenuView";
|
|
23
26
|
import { useMenuItem } from "../composables/private/useMenuItem";
|
|
@@ -35,22 +38,24 @@ const { instanceId, viewId, disabled, trigger } = defineProps({
|
|
|
35
38
|
trigger: { type: Array, required: false },
|
|
36
39
|
asChild: { type: Boolean, required: false }
|
|
37
40
|
});
|
|
41
|
+
const magicError = useMagicError({
|
|
42
|
+
prefix: "MagicMenu",
|
|
43
|
+
source: "MagicMenu"
|
|
44
|
+
});
|
|
38
45
|
const elRef = useTemplateRef("el");
|
|
39
46
|
const injectedInstanceId = inject(MagicMenuInstanceId, void 0);
|
|
40
47
|
const injectedViewId = inject(MagicMenuViewId, void 0);
|
|
41
48
|
const itemId = inject(MagicMenuItemId, void 0);
|
|
42
49
|
const mappedInstanceId = computed(() => instanceId ?? injectedInstanceId);
|
|
43
50
|
const mappedViewId = computed(() => viewId ?? injectedViewId);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
);
|
|
53
|
-
}
|
|
51
|
+
magicError.assert(mappedInstanceId.value, {
|
|
52
|
+
message: "MagicMenuTrigger must be nested inside MagicMenuProvider or an instanceId must be provided",
|
|
53
|
+
errorCode: "missing_instance_id"
|
|
54
|
+
});
|
|
55
|
+
magicError.assert(mappedViewId.value, {
|
|
56
|
+
message: "MagicMenuTrigger must be nested inside MagicMenuView or a viewId must be provided",
|
|
57
|
+
errorCode: "missing_view_id"
|
|
58
|
+
});
|
|
54
59
|
const { getView, getRelativeViewIndex } = useMenuView(mappedInstanceId.value);
|
|
55
60
|
const view = getView(mappedViewId.value);
|
|
56
61
|
const viewIndex = getRelativeViewIndex(mappedViewId.value);
|
|
@@ -13,7 +13,7 @@ declare var __VLS_13: {
|
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
14
|
default?: (props: typeof __VLS_13) => any;
|
|
15
15
|
};
|
|
16
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicMenuTriggerProps,
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicMenuTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicMenuTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
18
|
export default _default;
|
|
19
19
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -14,17 +14,25 @@ import {
|
|
|
14
14
|
MagicMenuItemId,
|
|
15
15
|
MagicMenuViewActive
|
|
16
16
|
} from "../symbols";
|
|
17
|
+
import {
|
|
18
|
+
useMagicError
|
|
19
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
17
20
|
import { useMenuState } from "../composables/private/useMenuState";
|
|
18
21
|
const { id, placement } = defineProps({
|
|
19
22
|
id: { type: String, required: false },
|
|
20
|
-
placement: { type:
|
|
23
|
+
placement: { type: String, required: false }
|
|
24
|
+
});
|
|
25
|
+
const magicError = useMagicError({
|
|
26
|
+
prefix: "MagicMenu",
|
|
27
|
+
source: "MagicMenu"
|
|
21
28
|
});
|
|
22
29
|
const parentTree = inject(MagicMenuParentTree, []);
|
|
23
30
|
const instanceId = inject(MagicMenuInstanceId, void 0);
|
|
24
31
|
const itemId = inject(MagicMenuItemId, void 0);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
magicError.assert(instanceId, {
|
|
33
|
+
message: "MagicMenuView must be nested inside MagicMenuProvider",
|
|
34
|
+
errorCode: "missing_instance_id"
|
|
35
|
+
});
|
|
28
36
|
const mappedId = computed(() => id ?? `magic-menu-view-${useId()}`);
|
|
29
37
|
const mappedParentTree = computed(() => [...parentTree, mappedId.value]);
|
|
30
38
|
const mappedActive = computed(() => view.active);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MenuPlacement } from '../types/index.js';
|
|
2
2
|
interface MagicMenuViewProps {
|
|
3
3
|
id?: string;
|
|
4
|
-
placement?:
|
|
4
|
+
placement?: MenuPlacement;
|
|
5
5
|
}
|
|
6
6
|
declare var __VLS_1: {
|
|
7
7
|
viewActive: boolean;
|
|
@@ -9,7 +9,7 @@ declare var __VLS_1: {
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicMenuViewProps,
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicMenuViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicMenuViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, 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 & {
|
|
@@ -15,7 +15,9 @@ export function useMenuDOM() {
|
|
|
15
15
|
scrollLock.value = false;
|
|
16
16
|
}
|
|
17
17
|
function addScrollLockPadding() {
|
|
18
|
-
if (typeof window === "undefined")
|
|
18
|
+
if (typeof window === "undefined") {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
19
21
|
const exclude = new RegExp(/magic-menu/);
|
|
20
22
|
document.body.style.setProperty(
|
|
21
23
|
"--scrollbar-width",
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { reactive } from "vue";
|
|
2
2
|
import { usePointer, watchOnce } from "@vueuse/core";
|
|
3
|
+
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
3
4
|
import { useMenuView } from "./useMenuView.mjs";
|
|
4
5
|
import { useMenuState } from "./useMenuState.mjs";
|
|
5
6
|
export function useMenuItem(args) {
|
|
6
7
|
const { instanceId, viewId } = args;
|
|
8
|
+
const { throwError } = useMagicError({
|
|
9
|
+
prefix: "MagicMenu",
|
|
10
|
+
source: "useMenuItem"
|
|
11
|
+
});
|
|
7
12
|
const { initializeState } = useMenuState(instanceId);
|
|
8
13
|
const state = initializeState();
|
|
9
14
|
const { getView, unselectDescendingViews } = useMenuView(instanceId);
|
|
10
15
|
const view = getView(viewId);
|
|
11
16
|
if (!view) {
|
|
12
|
-
|
|
17
|
+
throwError({
|
|
18
|
+
message: `View ${viewId} not found`,
|
|
19
|
+
errorCode: "view_id_not_found"
|
|
20
|
+
});
|
|
13
21
|
}
|
|
14
22
|
function createItem(args2) {
|
|
15
23
|
const { id, disabled } = args2;
|
|
@@ -36,7 +44,9 @@ export function useMenuItem(args) {
|
|
|
36
44
|
return item;
|
|
37
45
|
}
|
|
38
46
|
function deleteItem(id) {
|
|
39
|
-
if (!view?.items)
|
|
47
|
+
if (!view?.items) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
40
50
|
view.items = view.items.filter((x) => x.id !== id);
|
|
41
51
|
}
|
|
42
52
|
function getItem(id) {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import {} from "vue";
|
|
2
|
+
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
2
3
|
import { useMenuState } from "./useMenuState.mjs";
|
|
3
4
|
import { useMenuView } from "./useMenuView.mjs";
|
|
4
5
|
import { useMenuItem } from "./useMenuItem.mjs";
|
|
5
6
|
export function useMenuKeyListener(instanceId) {
|
|
6
7
|
const { initializeState } = useMenuState(instanceId);
|
|
7
8
|
const state = initializeState();
|
|
9
|
+
const { throwError, logWarning } = useMagicError({
|
|
10
|
+
prefix: "MagicMenu",
|
|
11
|
+
source: "useMenuKeyListener"
|
|
12
|
+
});
|
|
8
13
|
const {
|
|
9
14
|
selectView,
|
|
10
15
|
unselectView,
|
|
@@ -20,7 +25,10 @@ export function useMenuKeyListener(instanceId) {
|
|
|
20
25
|
function keyStrokeGuard(e) {
|
|
21
26
|
switch (true) {
|
|
22
27
|
case (!state.active && state.options.debug):
|
|
23
|
-
|
|
28
|
+
throwError({
|
|
29
|
+
message: `'MagicMenu ${state.id} is not active'`,
|
|
30
|
+
errorCode: "menu_not_active"
|
|
31
|
+
});
|
|
24
32
|
case state.active:
|
|
25
33
|
state.input.type = "keyboard";
|
|
26
34
|
e.stopPropagation();
|
|
@@ -41,7 +49,7 @@ export function useMenuKeyListener(instanceId) {
|
|
|
41
49
|
try {
|
|
42
50
|
keyStrokeGuard(e);
|
|
43
51
|
} catch (e2) {
|
|
44
|
-
|
|
52
|
+
logWarning(String(e2));
|
|
45
53
|
}
|
|
46
54
|
if (!state.input.view) {
|
|
47
55
|
return;
|
|
@@ -70,7 +78,7 @@ export function useMenuKeyListener(instanceId) {
|
|
|
70
78
|
try {
|
|
71
79
|
keyStrokeGuard(e);
|
|
72
80
|
} catch (e2) {
|
|
73
|
-
|
|
81
|
+
logWarning(String(e2));
|
|
74
82
|
}
|
|
75
83
|
if (!state.input.view) {
|
|
76
84
|
return;
|
|
@@ -94,14 +102,16 @@ export function useMenuKeyListener(instanceId) {
|
|
|
94
102
|
try {
|
|
95
103
|
keyStrokeGuard(e);
|
|
96
104
|
} catch (e2) {
|
|
97
|
-
|
|
105
|
+
logWarning(String(e2));
|
|
98
106
|
}
|
|
99
107
|
if (!state.input.view) {
|
|
100
108
|
return;
|
|
101
109
|
}
|
|
102
110
|
const viewId = state.input.view;
|
|
103
111
|
const inputView = getView(viewId);
|
|
104
|
-
if (!inputView)
|
|
112
|
+
if (!inputView) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
105
115
|
const enabledItems = getEnabledItems(inputView);
|
|
106
116
|
const prevIndex = enabledItems.findIndex((item) => item.active) - 1;
|
|
107
117
|
if (prevIndex >= 0) {
|
|
@@ -118,14 +128,16 @@ export function useMenuKeyListener(instanceId) {
|
|
|
118
128
|
try {
|
|
119
129
|
keyStrokeGuard(e);
|
|
120
130
|
} catch (e2) {
|
|
121
|
-
|
|
131
|
+
logWarning(String(e2));
|
|
122
132
|
}
|
|
123
133
|
if (!state.input.view) {
|
|
124
134
|
return;
|
|
125
135
|
}
|
|
126
136
|
const viewId = state.input.view;
|
|
127
137
|
const inputView = getView(viewId);
|
|
128
|
-
if (!inputView)
|
|
138
|
+
if (!inputView) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
129
141
|
const enabledItems = getEnabledItems(inputView);
|
|
130
142
|
const nextIndex = enabledItems.findIndex((item) => item.active) + 1;
|
|
131
143
|
if (nextIndex >= 0) {
|
|
@@ -138,7 +150,7 @@ export function useMenuKeyListener(instanceId) {
|
|
|
138
150
|
try {
|
|
139
151
|
keyStrokeGuard(e);
|
|
140
152
|
} catch (e2) {
|
|
141
|
-
|
|
153
|
+
logWarning(String(e2));
|
|
142
154
|
}
|
|
143
155
|
state.active = false;
|
|
144
156
|
state.input.view = "";
|
|
@@ -148,7 +160,7 @@ export function useMenuKeyListener(instanceId) {
|
|
|
148
160
|
try {
|
|
149
161
|
keyStrokeGuard(e);
|
|
150
162
|
} catch (e2) {
|
|
151
|
-
|
|
163
|
+
logWarning(String(e2));
|
|
152
164
|
}
|
|
153
165
|
if (!state.input.view) {
|
|
154
166
|
return;
|
|
@@ -171,7 +183,7 @@ export function useMenuKeyListener(instanceId) {
|
|
|
171
183
|
try {
|
|
172
184
|
keyStrokeGuard(e);
|
|
173
185
|
} catch (e2) {
|
|
174
|
-
|
|
186
|
+
logWarning(String(e2));
|
|
175
187
|
}
|
|
176
188
|
}
|
|
177
189
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { reactive, computed, toValue } from "vue";
|
|
2
|
+
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
2
3
|
import { useMenuState } from "./useMenuState.mjs";
|
|
3
4
|
function isAbortError(error) {
|
|
4
5
|
return error instanceof DOMException && error.name === "AbortError";
|
|
@@ -6,11 +7,19 @@ function isAbortError(error) {
|
|
|
6
7
|
export function useMenuView(instanceId) {
|
|
7
8
|
const { initializeState } = useMenuState(instanceId);
|
|
8
9
|
const state = initializeState();
|
|
10
|
+
const { logWarning } = useMagicError({
|
|
11
|
+
prefix: "MagicMenu",
|
|
12
|
+
source: "useMenuView"
|
|
13
|
+
});
|
|
9
14
|
const currentInstanceId = toValue(instanceId);
|
|
10
15
|
const currentView = computed(() => {
|
|
11
16
|
const activeViews = state.views.filter((view) => view.active);
|
|
12
|
-
if (activeViews.length === 0)
|
|
13
|
-
|
|
17
|
+
if (activeViews.length === 0) {
|
|
18
|
+
return void 0;
|
|
19
|
+
}
|
|
20
|
+
if (activeViews.length === 1) {
|
|
21
|
+
return activeViews[0];
|
|
22
|
+
}
|
|
14
23
|
return activeViews.reduce(
|
|
15
24
|
(a, b) => a.parent.views.length >= b.parent.views.length ? a : b
|
|
16
25
|
);
|
|
@@ -132,7 +141,7 @@ export function useMenuView(instanceId) {
|
|
|
132
141
|
unselectUnrelatedViews(id);
|
|
133
142
|
} catch (error) {
|
|
134
143
|
if (isAbortError(error) && state.options.debug) {
|
|
135
|
-
|
|
144
|
+
logWarning("selectView() was interrupted by a call to unselectView()");
|
|
136
145
|
}
|
|
137
146
|
}
|
|
138
147
|
}
|
|
@@ -153,7 +162,7 @@ export function useMenuView(instanceId) {
|
|
|
153
162
|
view.active = false;
|
|
154
163
|
} catch (error) {
|
|
155
164
|
if (isAbortError(error) && state.options.debug) {
|
|
156
|
-
|
|
165
|
+
logWarning("unselectView() was interrupted by a call to selectView()");
|
|
157
166
|
}
|
|
158
167
|
}
|
|
159
168
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Placement } from '@floating-ui/vue';
|
|
2
1
|
type MenuMode = 'dropdown' | 'menubar' | 'context' | 'navigation';
|
|
3
2
|
export interface MagicMenuOptions {
|
|
4
3
|
mode?: MenuMode;
|
|
@@ -41,6 +40,7 @@ export type Coordinates = {
|
|
|
41
40
|
x: number;
|
|
42
41
|
y: number;
|
|
43
42
|
};
|
|
43
|
+
export type MenuPlacement = 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end';
|
|
44
44
|
export interface MenuItem {
|
|
45
45
|
id: string;
|
|
46
46
|
active: boolean;
|
|
@@ -59,7 +59,7 @@ export interface MenuView {
|
|
|
59
59
|
item: string;
|
|
60
60
|
views: string[];
|
|
61
61
|
};
|
|
62
|
-
placement:
|
|
62
|
+
placement: MenuPlacement;
|
|
63
63
|
state: {
|
|
64
64
|
selectAbortController: AbortController;
|
|
65
65
|
unselectAbortController: AbortController;
|
|
@@ -13,7 +13,7 @@ type __VLS_Slots = {} & {
|
|
|
13
13
|
} & {
|
|
14
14
|
default?: (props: typeof __VLS_34) => any;
|
|
15
15
|
};
|
|
16
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicModalProps,
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicModalProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
18
|
export default _default;
|
|
19
19
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -38,7 +38,9 @@ export function useModalDOM(args) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
function addScrollLockPadding() {
|
|
41
|
-
if (typeof window === "undefined")
|
|
41
|
+
if (typeof window === "undefined") {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
42
44
|
const exclude = new RegExp(/magic-modal(__backdrop)?/);
|
|
43
45
|
document.body.style.setProperty(
|
|
44
46
|
"--scrollbar-width",
|
|
@@ -3,5 +3,5 @@ interface MagicNoiseProps {
|
|
|
3
3
|
options?: MagicNoiseOptions;
|
|
4
4
|
pause?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import("vue").DefineComponent<MagicNoiseProps,
|
|
6
|
+
declare const _default: import("vue").DefineComponent<MagicNoiseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicNoiseProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
export default _default;
|
|
@@ -57,7 +57,7 @@ export function useNoiseApi({
|
|
|
57
57
|
for (let x = 0; x < width2; x += pixelSize) {
|
|
58
58
|
let radian;
|
|
59
59
|
if (rotation) {
|
|
60
|
-
const angle = getRandomRotationAngle();
|
|
60
|
+
const angle = getRandomRotationAngle() ?? 0;
|
|
61
61
|
radian = getRadianFromAngle(angle);
|
|
62
62
|
}
|
|
63
63
|
const pixel = {
|
|
@@ -75,7 +75,9 @@ export function useNoiseApi({
|
|
|
75
75
|
function calculate() {
|
|
76
76
|
const offCanvasHeight = offCanvasRef.value?.height;
|
|
77
77
|
const offCanvasWidth = offCanvasRef.value?.width;
|
|
78
|
-
if (!offCanvasHeight || !offCanvasWidth)
|
|
78
|
+
if (!offCanvasHeight || !offCanvasWidth) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
79
81
|
pixels.value = calculatePixels({
|
|
80
82
|
width: offCanvasWidth,
|
|
81
83
|
height: offCanvasHeight,
|
|
@@ -144,7 +146,9 @@ export function useNoiseApi({
|
|
|
144
146
|
transferControls.value = useRafFn(throttled);
|
|
145
147
|
}
|
|
146
148
|
function draw() {
|
|
147
|
-
if (!offContext.value || !offCanvasRef.value)
|
|
149
|
+
if (!offContext.value || !offCanvasRef.value) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
148
152
|
offContext.value.clearRect(
|
|
149
153
|
0,
|
|
150
154
|
0,
|
|
@@ -18,17 +18,27 @@
|
|
|
18
18
|
|
|
19
19
|
<script setup>
|
|
20
20
|
import { computed, toRefs, onBeforeUnmount } from "vue";
|
|
21
|
+
import {
|
|
22
|
+
useMagicError
|
|
23
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
21
24
|
import { usePieState } from "../composables/private/usePieState";
|
|
22
25
|
const { id, options } = defineProps({
|
|
23
26
|
id: { type: String, required: true },
|
|
24
27
|
options: { type: Object, required: false }
|
|
25
28
|
});
|
|
29
|
+
const magicError = useMagicError({
|
|
30
|
+
prefix: "MagicPie",
|
|
31
|
+
source: "MagicPie"
|
|
32
|
+
});
|
|
26
33
|
const { initializeState, deleteState } = usePieState(id);
|
|
27
34
|
const state = initializeState();
|
|
28
35
|
const { percentage } = toRefs(state);
|
|
29
36
|
function generatePath(points) {
|
|
30
37
|
if (points.length < 2) {
|
|
31
|
-
|
|
38
|
+
magicError.throwError({
|
|
39
|
+
message: "At least two points are required to generate a path",
|
|
40
|
+
errorCode: "missing_points"
|
|
41
|
+
});
|
|
32
42
|
}
|
|
33
43
|
let path2 = `M ${points[0][0]} ${points[0][1]}`;
|
|
34
44
|
for (let i = 1; i < points.length; i++) {
|
|
@@ -38,7 +48,10 @@ function generatePath(points) {
|
|
|
38
48
|
}
|
|
39
49
|
function generatePie(percentage2, flip) {
|
|
40
50
|
if (percentage2 < 0 || percentage2 > 100) {
|
|
41
|
-
|
|
51
|
+
magicError.throwError({
|
|
52
|
+
message: "percentage needs to be between 0 and 100",
|
|
53
|
+
errorCode: "invalid_percentage"
|
|
54
|
+
});
|
|
42
55
|
}
|
|
43
56
|
const size = 100;
|
|
44
57
|
const points = [
|
|
@@ -3,5 +3,5 @@ interface MagicPieProps {
|
|
|
3
3
|
id: string;
|
|
4
4
|
options?: MagicPieOptions;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import("vue").DefineComponent<MagicPieProps,
|
|
6
|
+
declare const _default: import("vue").DefineComponent<MagicPieProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPieProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
export default _default;
|
|
@@ -18,7 +18,9 @@ export function usePieState(id) {
|
|
|
18
18
|
let state = pieStateStore.value.find((entry) => {
|
|
19
19
|
return entry.id === id;
|
|
20
20
|
});
|
|
21
|
-
if (!state)
|
|
21
|
+
if (!state) {
|
|
22
|
+
state = addState(toValue(id));
|
|
23
|
+
}
|
|
22
24
|
return state;
|
|
23
25
|
}
|
|
24
26
|
function deleteState() {
|
|
@@ -18,6 +18,9 @@ import {
|
|
|
18
18
|
useEventListener,
|
|
19
19
|
defaultWindow
|
|
20
20
|
} from "@vueuse/core";
|
|
21
|
+
import {
|
|
22
|
+
useMagicError
|
|
23
|
+
} from "@maas/vue-equipment/plugins/MagicError";
|
|
21
24
|
import { usePlayerAudioApi } from "../composables/private/usePlayerAudioApi";
|
|
22
25
|
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
23
26
|
import { usePlayerRuntime } from "../composables/private/usePlayerRuntime";
|
|
@@ -28,21 +31,28 @@ import {
|
|
|
28
31
|
MagicPlayerOptionsKey,
|
|
29
32
|
MagicPlayerRef
|
|
30
33
|
} from "../symbols";
|
|
34
|
+
const magicError = useMagicError({
|
|
35
|
+
prefix: "MagicPlayer",
|
|
36
|
+
source: "MagicPlayerAudio"
|
|
37
|
+
});
|
|
31
38
|
const injectedInstanceId = inject(MagicPlayerInstanceId, void 0);
|
|
32
39
|
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
33
40
|
const injectedPlayerRef = inject(MagicPlayerRef, void 0);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
magicError.assert(injectedInstanceId, {
|
|
42
|
+
message: "MagicPlayerAudio must be used within a MagicPlayerProvider",
|
|
43
|
+
errorCode: "missing_instance_id"
|
|
44
|
+
});
|
|
45
|
+
magicError.assert(injectedOptions, {
|
|
46
|
+
message: "MagicPlayerAudio must be used within a MagicPlayerProvider",
|
|
47
|
+
errorCode: "missing_options"
|
|
48
|
+
});
|
|
40
49
|
const elRef = useTemplateRef("el");
|
|
41
50
|
const { initialize, destroy } = usePlayerRuntime({
|
|
42
51
|
id: injectedInstanceId,
|
|
43
52
|
mediaRef: elRef,
|
|
44
53
|
src: injectedOptions.src,
|
|
45
|
-
srcType: injectedOptions.srcType
|
|
54
|
+
srcType: injectedOptions.srcType,
|
|
55
|
+
debug: injectedOptions.debug
|
|
46
56
|
});
|
|
47
57
|
usePlayerMediaApi({
|
|
48
58
|
id: injectedInstanceId,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{},
|
|
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;
|