@maas/vue-equipment 0.36.2 → 0.36.4
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/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +37 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +1 -1
- package/dist/plugins/MagicAutoSize/src/components/MagicAutoSize.vue +2 -2
- package/dist/plugins/MagicAutoSize/src/components/MagicAutoSize.vue.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandBody.vue.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookie.vue.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +3 -3
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +3 -3
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +38 -3
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayer.vue.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayerControls.vue.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue +24 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue.d.ts +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +2 -4
- 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 +18 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +3 -3
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/nuxt/module.json
CHANGED
|
@@ -8,11 +8,46 @@ interface MagicAccordionTriggerProps {
|
|
|
8
8
|
declare function __VLS_template(): {
|
|
9
9
|
slots: {
|
|
10
10
|
default?(_: {
|
|
11
|
-
isActive:
|
|
11
|
+
isActive: boolean | undefined;
|
|
12
12
|
}): any;
|
|
13
13
|
};
|
|
14
14
|
refs: {
|
|
15
|
-
elRef:
|
|
15
|
+
elRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
asChild: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
as: {
|
|
21
|
+
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
27
|
+
asChild: boolean;
|
|
28
|
+
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
29
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
30
|
+
P: {};
|
|
31
|
+
B: {};
|
|
32
|
+
D: {};
|
|
33
|
+
C: {};
|
|
34
|
+
M: {};
|
|
35
|
+
Defaults: {};
|
|
36
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
asChild: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
as: {
|
|
42
|
+
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}>, {}, {}, {}, {
|
|
48
|
+
asChild: boolean;
|
|
49
|
+
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
50
|
+
}> | null;
|
|
16
51
|
};
|
|
17
52
|
attrs: Partial<{}>;
|
|
18
53
|
};
|
|
@@ -90,9 +90,9 @@ useMutationObserver(
|
|
|
90
90
|
content.value = addedNode
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
// If immediate is true, reset the size when a comment is added
|
|
93
|
+
// If immediate is true, reset the size when a comment is added and no children are present
|
|
94
94
|
// Vue sets a placeholder comment for a v-if
|
|
95
|
-
if (props.immediate && !!addedComment) {
|
|
95
|
+
if (props.immediate && !!addedComment && !child.value) {
|
|
96
96
|
content.value = undefined
|
|
97
97
|
size.value = {
|
|
98
98
|
width: 0,
|
|
@@ -9,15 +9,15 @@ declare function __VLS_template(): {
|
|
|
9
9
|
default?(_: {}): any;
|
|
10
10
|
};
|
|
11
11
|
refs: {
|
|
12
|
-
elRef:
|
|
12
|
+
elRef: HTMLDivElement;
|
|
13
13
|
};
|
|
14
14
|
attrs: Partial<{}>;
|
|
15
15
|
};
|
|
16
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
17
|
declare const __VLS_component: import("vue").DefineComponent<MagicAutoSizeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAutoSizeProps> & Readonly<{}>, {
|
|
18
|
+
immediate: boolean;
|
|
18
19
|
width: boolean;
|
|
19
20
|
height: boolean;
|
|
20
|
-
immediate: boolean;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
23
|
export default _default;
|
|
@@ -4,8 +4,8 @@ type MagicCookieProps = {
|
|
|
4
4
|
maxAge?: number;
|
|
5
5
|
};
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
|
-
slots: Partial<Record<
|
|
8
|
-
cookie:
|
|
7
|
+
slots: Partial<Record<string, (_: {
|
|
8
|
+
cookie: MagicCookieRecord;
|
|
9
9
|
}) => any>> & {
|
|
10
10
|
default?(_: {}): any;
|
|
11
11
|
actions?(_: {}): any;
|
|
@@ -5,12 +5,12 @@ interface MagicMenuItemProps {
|
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
slots: {
|
|
7
7
|
default?(_: {
|
|
8
|
-
isActive:
|
|
9
|
-
isDisabled:
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
isDisabled: boolean | undefined;
|
|
10
10
|
}): any;
|
|
11
11
|
};
|
|
12
12
|
refs: {
|
|
13
|
-
elRef:
|
|
13
|
+
elRef: HTMLDivElement;
|
|
14
14
|
};
|
|
15
15
|
attrs: Partial<{}>;
|
|
16
16
|
};
|
|
@@ -7,12 +7,47 @@ interface MagicMenuTriggerProps {
|
|
|
7
7
|
declare function __VLS_template(): {
|
|
8
8
|
slots: {
|
|
9
9
|
default?(_: {
|
|
10
|
-
viewActive:
|
|
11
|
-
triggerDisabled:
|
|
10
|
+
viewActive: boolean | undefined;
|
|
11
|
+
triggerDisabled: boolean;
|
|
12
12
|
}): any;
|
|
13
13
|
};
|
|
14
14
|
refs: {
|
|
15
|
-
elRef:
|
|
15
|
+
elRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
asChild: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
as: {
|
|
21
|
+
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
27
|
+
asChild: boolean;
|
|
28
|
+
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
29
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
30
|
+
P: {};
|
|
31
|
+
B: {};
|
|
32
|
+
D: {};
|
|
33
|
+
C: {};
|
|
34
|
+
M: {};
|
|
35
|
+
Defaults: {};
|
|
36
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
asChild: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
as: {
|
|
42
|
+
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}>, {}, {}, {}, {
|
|
48
|
+
asChild: boolean;
|
|
49
|
+
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
50
|
+
}> | null;
|
|
16
51
|
};
|
|
17
52
|
attrs: Partial<{}>;
|
|
18
53
|
};
|
|
@@ -19,8 +19,12 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script setup lang="ts">
|
|
22
|
-
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
|
23
|
-
import {
|
|
22
|
+
import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
|
|
23
|
+
import {
|
|
24
|
+
useElementVisibility,
|
|
25
|
+
useEventListener,
|
|
26
|
+
defaultWindow,
|
|
27
|
+
} from '@vueuse/core'
|
|
24
28
|
import { usePlayerVideoApi } from '../composables/private/usePlayerVideoApi'
|
|
25
29
|
import { usePlayerMediaApi } from '../composables/private/usePlayerMediaApi'
|
|
26
30
|
import { usePlayerRuntime } from '../composables/private/usePlayerRuntime'
|
|
@@ -47,6 +51,8 @@ const props = withDefaults(defineProps<MagicPlayerProps>(), {
|
|
|
47
51
|
const playerRef = ref<HTMLDivElement | undefined>(undefined)
|
|
48
52
|
const videoRef = ref<HTMLVideoElement | undefined>(undefined)
|
|
49
53
|
|
|
54
|
+
const isVisible = useElementVisibility(playerRef)
|
|
55
|
+
|
|
50
56
|
const { playing, muted } = usePlayerMediaApi({
|
|
51
57
|
id: props.id,
|
|
52
58
|
mediaRef: videoRef,
|
|
@@ -65,13 +71,23 @@ const { onMouseenter, onMouseleave, play, pause } = usePlayerVideoApi({
|
|
|
65
71
|
playerRef: playerRef,
|
|
66
72
|
})
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
function onWindowFocus() {
|
|
75
|
+
if (isVisible.value && !playing.value && props.autoplay) {
|
|
76
|
+
play()
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Auto play when window is focused
|
|
81
|
+
useEventListener(defaultWindow, 'focus', onWindowFocus)
|
|
82
|
+
|
|
83
|
+
// Auto play when element is visible
|
|
84
|
+
watch(
|
|
85
|
+
isVisible,
|
|
86
|
+
(value) => {
|
|
87
|
+
if (value && !playing.value && props.autoplay) {
|
|
74
88
|
play()
|
|
89
|
+
} else if (!value && playing.value) {
|
|
90
|
+
pause()
|
|
75
91
|
}
|
|
76
92
|
},
|
|
77
93
|
{
|
|
@@ -18,9 +18,9 @@ declare function __VLS_template(): {
|
|
|
18
18
|
fullscreenEnterIcon?(_: {}): any;
|
|
19
19
|
};
|
|
20
20
|
refs: {
|
|
21
|
-
popoverRef:
|
|
22
|
-
barRef:
|
|
23
|
-
trackRef:
|
|
21
|
+
popoverRef: HTMLDivElement;
|
|
22
|
+
barRef: HTMLDivElement;
|
|
23
|
+
trackRef: HTMLDivElement;
|
|
24
24
|
};
|
|
25
25
|
attrs: Partial<{}>;
|
|
26
26
|
};
|
|
@@ -60,10 +60,8 @@ export function usePlayerMediaApi(args) {
|
|
|
60
60
|
if (!el) return;
|
|
61
61
|
if (isPlaying) {
|
|
62
62
|
const playPromise = el.play();
|
|
63
|
-
if (playPromise !== void 0)
|
|
64
|
-
|
|
65
|
-
console.warn("Playback error:", error);
|
|
66
|
-
});
|
|
63
|
+
if (playPromise !== void 0) playPromise.catch((error) => {
|
|
64
|
+
});
|
|
67
65
|
} else {
|
|
68
66
|
el.pause();
|
|
69
67
|
}
|
|
@@ -6,7 +6,24 @@ interface MagicScrollProviderProps {
|
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
slots: {
|
|
8
8
|
default?(_: {
|
|
9
|
-
scrollReturn:
|
|
9
|
+
scrollReturn: {
|
|
10
|
+
x: import("vue").WritableComputedRef<number>;
|
|
11
|
+
y: import("vue").WritableComputedRef<number>;
|
|
12
|
+
isScrolling: import("vue").Ref<boolean>;
|
|
13
|
+
arrivedState: {
|
|
14
|
+
left: boolean;
|
|
15
|
+
right: boolean;
|
|
16
|
+
top: boolean;
|
|
17
|
+
bottom: boolean;
|
|
18
|
+
};
|
|
19
|
+
directions: {
|
|
20
|
+
left: boolean;
|
|
21
|
+
right: boolean;
|
|
22
|
+
top: boolean;
|
|
23
|
+
bottom: boolean;
|
|
24
|
+
};
|
|
25
|
+
measure(): void;
|
|
26
|
+
};
|
|
10
27
|
}): any;
|
|
11
28
|
};
|
|
12
29
|
refs: {};
|
|
@@ -6,18 +6,18 @@ interface MagicScrollSceneProps {
|
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
slots: {
|
|
8
8
|
default?(_: {
|
|
9
|
-
progress:
|
|
9
|
+
progress: number;
|
|
10
10
|
}): any;
|
|
11
11
|
};
|
|
12
12
|
refs: {
|
|
13
|
-
elRef:
|
|
13
|
+
elRef: HTMLDivElement;
|
|
14
14
|
};
|
|
15
15
|
attrs: Partial<{}>;
|
|
16
16
|
};
|
|
17
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
18
|
declare const __VLS_component: import("vue").DefineComponent<MagicScrollSceneProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollSceneProps> & Readonly<{}>, {
|
|
19
|
-
from: FromTo;
|
|
20
19
|
to: FromTo;
|
|
20
|
+
from: FromTo;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
23
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "A magic collection of Vue composables, plugins, components and directives",
|
|
4
|
-
"version": "0.36.
|
|
4
|
+
"version": "0.36.4",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"devDependencies": {
|