@maas/vue-equipment 0.30.3 → 0.30.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/MagicAutoSize/src/components/MagicAutoSize.vue +1 -0
- package/dist/plugins/MagicAutoSize/src/components/MagicAutoSize.vue.d.ts +6 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandBody.vue.d.ts +4 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +4 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandFooter.vue.d.ts +4 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandGroup.vue.d.ts +4 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandHead.vue.d.ts +4 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +8 -6
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +4 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +6 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +6 -4
- package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.mjs +1 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandView.mjs +1 -2
- package/dist/plugins/MagicCookie/src/components/MagicCookie.vue.d.ts +9 -7
- package/dist/plugins/MagicCookie/src/composables/private/useCookieApi.d.ts +3 -3
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +6 -4
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +1 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +1 -2
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +7 -5
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +1 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +4 -8
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +14 -28
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.d.ts +1 -64
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.mjs +1 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerUtils.mjs +8 -16
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +30 -30
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +7 -5
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +21 -15
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +4 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +16 -11
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +7 -5
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +7 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +4 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +8 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +4 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +11 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +4 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +4 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +4 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +4 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +1 -8
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +29 -10
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +1 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuItem.mjs +1 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +2 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +16 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +53 -13
- package/dist/plugins/MagicMenu/src/composables/useMagicMenu.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/types/index.d.ts +11 -4
- package/dist/plugins/MagicMenu/src/utils/defaultOptions.mjs +6 -3
- package/dist/plugins/MagicMenu/src/utils/modeTransitions.d.ts +6 -0
- package/dist/plugins/MagicMenu/src/utils/modeTransitions.mjs +7 -0
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +7 -5
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +1 -2
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +3 -6
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayer.vue.d.ts +6 -4
- package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayerControls.vue.d.ts +4 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue.d.ts +7 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue.d.ts +10 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +4 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +4 -2
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +1 -2
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +5 -10
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +8 -16
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +3 -6
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +2 -4
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +4 -2
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +6 -4
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +10 -8
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +8 -6
- package/dist/plugins/MagicScroll/src/components/MagicScrollTransform.vue.d.ts +6 -4
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetect.mjs +4 -8
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +2 -4
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +2 -18
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue.d.ts +6 -4
- package/dist/plugins/MagicToast/src/composables/private/useToastApi.mjs +1 -2
- package/dist/plugins/MagicToast/src/composables/private/useToastStore.d.ts +1 -1
- package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +1 -2
- package/package.json +2 -1
|
@@ -28,8 +28,7 @@ export function usePlayerControlsApi(args) {
|
|
|
28
28
|
const thumbPercentage = ref(0);
|
|
29
29
|
const popoverOffsetX = ref(0);
|
|
30
30
|
const bufferedPercentage = computed(() => {
|
|
31
|
-
if (!buffered)
|
|
32
|
-
return 0;
|
|
31
|
+
if (!buffered) return 0;
|
|
33
32
|
const endBuffer = buffered.value?.length > 0 ? buffered.value[0][1] : 0;
|
|
34
33
|
const percentage = endBuffer / duration.value * 100;
|
|
35
34
|
return clampValue(percentage, 0, thumbPercentage.value);
|
|
@@ -129,8 +128,7 @@ export function usePlayerControlsApi(args) {
|
|
|
129
128
|
);
|
|
130
129
|
const emitter = usePlayerStateEmitter();
|
|
131
130
|
emitter.on("update", (payload) => {
|
|
132
|
-
if (payload.id !== toValue(args.id))
|
|
133
|
-
return;
|
|
131
|
+
if (payload.id !== toValue(args.id)) return;
|
|
134
132
|
if (payload.api === "controls") {
|
|
135
133
|
switch (payload.key) {
|
|
136
134
|
case "dragging": {
|
|
@@ -249,8 +247,7 @@ export function usePlayerControlsApi(args) {
|
|
|
249
247
|
});
|
|
250
248
|
});
|
|
251
249
|
watch(barRect, (value) => {
|
|
252
|
-
if (!value)
|
|
253
|
-
return;
|
|
250
|
+
if (!value) return;
|
|
254
251
|
emitter.emit("update", {
|
|
255
252
|
id: toValue(args.id),
|
|
256
253
|
api: "controls",
|
|
@@ -259,8 +256,7 @@ export function usePlayerControlsApi(args) {
|
|
|
259
256
|
});
|
|
260
257
|
});
|
|
261
258
|
watch(trackRect, (value) => {
|
|
262
|
-
if (!value)
|
|
263
|
-
return;
|
|
259
|
+
if (!value) return;
|
|
264
260
|
emitter.emit("update", {
|
|
265
261
|
id: toValue(args.id),
|
|
266
262
|
api: "controls",
|
|
@@ -269,8 +265,7 @@ export function usePlayerControlsApi(args) {
|
|
|
269
265
|
});
|
|
270
266
|
});
|
|
271
267
|
watch(popoverRect, (value) => {
|
|
272
|
-
if (!value)
|
|
273
|
-
return;
|
|
268
|
+
if (!value) return;
|
|
274
269
|
emitter.emit("update", {
|
|
275
270
|
id: toValue(args.id),
|
|
276
271
|
api: "controls",
|
|
@@ -23,27 +23,23 @@ export function usePlayerMediaApi(args) {
|
|
|
23
23
|
}
|
|
24
24
|
watch(volume, () => {
|
|
25
25
|
const el = toValue(mediaRef);
|
|
26
|
-
if (!el)
|
|
27
|
-
return;
|
|
26
|
+
if (!el) return;
|
|
28
27
|
el.volume = volume.value;
|
|
29
28
|
});
|
|
30
29
|
watch(muted, () => {
|
|
31
30
|
const el = toValue(mediaRef);
|
|
32
|
-
if (!el)
|
|
33
|
-
return;
|
|
31
|
+
if (!el) return;
|
|
34
32
|
el.muted = muted.value;
|
|
35
33
|
});
|
|
36
34
|
watch(rate, () => {
|
|
37
35
|
const el = toValue(mediaRef);
|
|
38
|
-
if (!el)
|
|
39
|
-
return;
|
|
36
|
+
if (!el) return;
|
|
40
37
|
el.playbackRate = rate.value;
|
|
41
38
|
});
|
|
42
39
|
if (toValue(mediaRef)) {
|
|
43
40
|
watch([mediaRef], () => {
|
|
44
41
|
const el = toValue(mediaRef);
|
|
45
|
-
if (!el)
|
|
46
|
-
return;
|
|
42
|
+
if (!el) return;
|
|
47
43
|
el.volume = volume.value;
|
|
48
44
|
el.muted = muted.value;
|
|
49
45
|
el.playbackRate = rate.value;
|
|
@@ -53,8 +49,7 @@ export function usePlayerMediaApi(args) {
|
|
|
53
49
|
currentTime,
|
|
54
50
|
(time) => {
|
|
55
51
|
const el = toValue(mediaRef);
|
|
56
|
-
if (!el)
|
|
57
|
-
return;
|
|
52
|
+
if (!el) return;
|
|
58
53
|
el.currentTime = unref(time);
|
|
59
54
|
}
|
|
60
55
|
);
|
|
@@ -62,8 +57,7 @@ export function usePlayerMediaApi(args) {
|
|
|
62
57
|
playing,
|
|
63
58
|
(isPlaying) => {
|
|
64
59
|
const el = toValue(mediaRef);
|
|
65
|
-
if (!el)
|
|
66
|
-
return;
|
|
60
|
+
if (!el) return;
|
|
67
61
|
if (isPlaying) {
|
|
68
62
|
const playPromise = el.play();
|
|
69
63
|
if (playPromise !== void 0)
|
|
@@ -124,15 +118,13 @@ export function usePlayerMediaApi(args) {
|
|
|
124
118
|
});
|
|
125
119
|
useEventListener(mediaRef, "volumechange", () => {
|
|
126
120
|
const el = toValue(mediaRef);
|
|
127
|
-
if (!el)
|
|
128
|
-
return;
|
|
121
|
+
if (!el) return;
|
|
129
122
|
volume.value = el.volume;
|
|
130
123
|
muted.value = el.muted;
|
|
131
124
|
});
|
|
132
125
|
const emitter = usePlayerStateEmitter();
|
|
133
126
|
emitter.on("update", (payload) => {
|
|
134
|
-
if (payload.id !== toValue(args.id))
|
|
135
|
-
return;
|
|
127
|
+
if (payload.id !== toValue(args.id)) return;
|
|
136
128
|
if (payload.api === "media") {
|
|
137
129
|
switch (payload.key) {
|
|
138
130
|
case "currentTime":
|
|
@@ -8,8 +8,7 @@ export function usePlayerRuntime(args) {
|
|
|
8
8
|
const { mediaRef, srcType, src } = args;
|
|
9
9
|
const useNative = () => {
|
|
10
10
|
const el = toValue(mediaRef);
|
|
11
|
-
if (!el || !src)
|
|
12
|
-
return;
|
|
11
|
+
if (!el || !src) return;
|
|
13
12
|
el.src = src;
|
|
14
13
|
el.addEventListener(
|
|
15
14
|
"loadeddata",
|
|
@@ -21,8 +20,7 @@ export function usePlayerRuntime(args) {
|
|
|
21
20
|
};
|
|
22
21
|
const useHlsJS = async () => {
|
|
23
22
|
const el = toValue(mediaRef);
|
|
24
|
-
if (!el)
|
|
25
|
-
return;
|
|
23
|
+
if (!el) return;
|
|
26
24
|
useEventListener(mediaRef, "play", () => {
|
|
27
25
|
defferedLoading.value = true;
|
|
28
26
|
});
|
|
@@ -65,8 +63,7 @@ export function usePlayerRuntime(args) {
|
|
|
65
63
|
}
|
|
66
64
|
const emitter = usePlayerStateEmitter();
|
|
67
65
|
emitter.on("update", (payload) => {
|
|
68
|
-
if (payload.id !== toValue(args.id))
|
|
69
|
-
return;
|
|
66
|
+
if (payload.id !== toValue(args.id)) return;
|
|
70
67
|
if (payload.api === "runtime") {
|
|
71
68
|
switch (payload.key) {
|
|
72
69
|
case "loaded":
|
|
@@ -5,11 +5,11 @@ export declare function usePlayerStateEmitter(): {
|
|
|
5
5
|
(type: "*", handler: import("mitt").WildcardHandler<PlayerPrivateEvents>): void;
|
|
6
6
|
};
|
|
7
7
|
off: {
|
|
8
|
-
<
|
|
8
|
+
<Key extends "update">(type: Key, handler?: import("mitt").Handler<PlayerPrivateEvents[Key]> | undefined): void;
|
|
9
9
|
(type: "*", handler: import("mitt").WildcardHandler<PlayerPrivateEvents>): void;
|
|
10
10
|
};
|
|
11
11
|
emit: {
|
|
12
|
-
<
|
|
13
|
-
<
|
|
12
|
+
<Key extends "update">(type: Key, event: PlayerPrivateEvents[Key]): void;
|
|
13
|
+
<Key extends "update">(type: undefined extends PlayerPrivateEvents[Key] ? Key : never): void;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -82,8 +82,7 @@ export function usePlayerVideoApi(args) {
|
|
|
82
82
|
}
|
|
83
83
|
const emitter = usePlayerStateEmitter();
|
|
84
84
|
emitter.on("update", (payload) => {
|
|
85
|
-
if (payload.id !== toValue(args.id))
|
|
86
|
-
return;
|
|
85
|
+
if (payload.id !== toValue(args.id)) return;
|
|
87
86
|
if (payload.api === "player") {
|
|
88
87
|
switch (payload.key) {
|
|
89
88
|
case "mouseEntered":
|
|
@@ -115,8 +114,7 @@ export function usePlayerVideoApi(args) {
|
|
|
115
114
|
});
|
|
116
115
|
});
|
|
117
116
|
watch(fullscreenTarget, (value) => {
|
|
118
|
-
if (!value)
|
|
119
|
-
return;
|
|
117
|
+
if (!value) return;
|
|
120
118
|
emitter.emit("update", {
|
|
121
119
|
id: toValue(args.id),
|
|
122
120
|
api: "player",
|
|
@@ -2,9 +2,11 @@ import type { MagicScrollCollisionEntry } from '../types';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
entries: MagicScrollCollisionEntry[];
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
6
|
default?(_: {}): any;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
8
10
|
export default _default;
|
|
9
11
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
10
12
|
new (): {
|
|
@@ -5,15 +5,17 @@ interface MagicScrollMotionProps {
|
|
|
5
5
|
easing?: Easing;
|
|
6
6
|
progress?: number;
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollMotionProps>, {
|
|
9
12
|
easing: string;
|
|
10
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollMotionProps>, {
|
|
11
14
|
easing: string;
|
|
12
15
|
}>>>, {
|
|
13
16
|
easing: Easing;
|
|
14
|
-
}, {}
|
|
15
|
-
|
|
16
|
-
}>;
|
|
17
|
+
}, {}>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
17
19
|
export default _default;
|
|
18
20
|
type __VLS_WithDefaults<P, D> = {
|
|
19
21
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
@@ -3,13 +3,7 @@ interface MagicScrollProviderProps {
|
|
|
3
3
|
active?: Boolean;
|
|
4
4
|
el?: MaybeComputedElementRef<HTMLElement>;
|
|
5
5
|
}
|
|
6
|
-
declare
|
|
7
|
-
active: () => true;
|
|
8
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollProviderProps>, {
|
|
9
|
-
active: () => true;
|
|
10
|
-
}>>>, {
|
|
11
|
-
active: Boolean;
|
|
12
|
-
}, {}>, {
|
|
6
|
+
declare function __VLS_template(): {
|
|
13
7
|
default?(_: {
|
|
14
8
|
scrollReturn: {
|
|
15
9
|
x: import("vue").WritableComputedRef<number>;
|
|
@@ -30,7 +24,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
30
24
|
measure(): void;
|
|
31
25
|
};
|
|
32
26
|
}): any;
|
|
33
|
-
}
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollProviderProps>, {
|
|
29
|
+
active: () => true;
|
|
30
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollProviderProps>, {
|
|
31
|
+
active: () => true;
|
|
32
|
+
}>>>, {
|
|
33
|
+
active: Boolean;
|
|
34
|
+
}, {}>;
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
34
36
|
export default _default;
|
|
35
37
|
type __VLS_WithDefaults<P, D> = {
|
|
36
38
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
@@ -4,7 +4,12 @@ interface MagicScrollSceneProps {
|
|
|
4
4
|
to?: FromTo;
|
|
5
5
|
debug?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
default?(_: {
|
|
9
|
+
progress: number;
|
|
10
|
+
}): any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollSceneProps>, {
|
|
8
13
|
from: string;
|
|
9
14
|
to: string;
|
|
10
15
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollSceneProps>, {
|
|
@@ -13,11 +18,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
13
18
|
}>>>, {
|
|
14
19
|
to: FromTo;
|
|
15
20
|
from: FromTo;
|
|
16
|
-
}, {}
|
|
17
|
-
|
|
18
|
-
progress: number;
|
|
19
|
-
}): any;
|
|
20
|
-
}>;
|
|
21
|
+
}, {}>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
21
23
|
export default _default;
|
|
22
24
|
type __VLS_WithDefaults<P, D> = {
|
|
23
25
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
@@ -8,7 +8,10 @@ interface MagicScrollTransformProps {
|
|
|
8
8
|
translateX?: number;
|
|
9
9
|
translateY?: number;
|
|
10
10
|
}
|
|
11
|
-
declare
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
default?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicScrollTransformProps>, {
|
|
12
15
|
as: string;
|
|
13
16
|
scale: number;
|
|
14
17
|
scaleX: number;
|
|
@@ -35,9 +38,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
35
38
|
as: string;
|
|
36
39
|
translateX: number;
|
|
37
40
|
translateY: number;
|
|
38
|
-
}, {}
|
|
39
|
-
|
|
40
|
-
}>;
|
|
41
|
+
}, {}>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
41
43
|
export default _default;
|
|
42
44
|
type __VLS_WithDefaults<P, D> = {
|
|
43
45
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
@@ -18,8 +18,7 @@ export function useCollisionDetect(args) {
|
|
|
18
18
|
}) : payload ?? 0;
|
|
19
19
|
}
|
|
20
20
|
function initialize() {
|
|
21
|
-
if (!parent)
|
|
22
|
-
return;
|
|
21
|
+
if (!parent) return;
|
|
23
22
|
mappedEntries.value = entries.map((entry) => {
|
|
24
23
|
const alerted = {
|
|
25
24
|
up: {
|
|
@@ -59,8 +58,7 @@ export function useCollisionDetect(args) {
|
|
|
59
58
|
let i = mappedEntries.value.length;
|
|
60
59
|
while (i--) {
|
|
61
60
|
const entry = mappedEntries.value[i];
|
|
62
|
-
if (!entry.element)
|
|
63
|
-
return;
|
|
61
|
+
if (!entry.element) return;
|
|
64
62
|
const boundingRect = entry.element.getBoundingClientRect();
|
|
65
63
|
if (scrollDirection.value) {
|
|
66
64
|
observeEntry({
|
|
@@ -108,8 +106,7 @@ export function useCollisionDetect(args) {
|
|
|
108
106
|
function observeEntry(args2) {
|
|
109
107
|
const { position, direction, boundingRect, entry } = args2;
|
|
110
108
|
const offset = getOffset(entry.offset[position] ?? 0);
|
|
111
|
-
if (entry.alerted[direction][position])
|
|
112
|
-
return;
|
|
109
|
+
if (entry.alerted[direction][position]) return;
|
|
113
110
|
if (direction === "down" && boundingRect[position] <= offset || direction === "up" && boundingRect[position] >= offset) {
|
|
114
111
|
entry.alerted[direction][position] = true;
|
|
115
112
|
useMagicEmitter().emit("collision", {
|
|
@@ -123,8 +120,7 @@ export function useCollisionDetect(args) {
|
|
|
123
120
|
function resetEntry(args2) {
|
|
124
121
|
const { position, direction, boundingRect, entry } = args2;
|
|
125
122
|
const offset = getOffset(entry.offset[position] ?? 0);
|
|
126
|
-
if (!entry.alerted[direction][position])
|
|
127
|
-
return;
|
|
123
|
+
if (!entry.alerted[direction][position]) return;
|
|
128
124
|
if (direction === "down" && boundingRect[position] >= offset || direction === "up" && boundingRect[position] <= offset) {
|
|
129
125
|
entry.alerted[direction][position] = false;
|
|
130
126
|
}
|
|
@@ -17,8 +17,7 @@ export function useScrollApi(params) {
|
|
|
17
17
|
}
|
|
18
18
|
function getOffsetTop(points) {
|
|
19
19
|
let y = 0;
|
|
20
|
-
if (!childRect.value)
|
|
21
|
-
return y;
|
|
20
|
+
if (!childRect.value) return y;
|
|
22
21
|
const scrollY = toValue(scrollReturn?.y) || 0;
|
|
23
22
|
switch (points.child) {
|
|
24
23
|
case "top":
|
|
@@ -31,8 +30,7 @@ export function useScrollApi(params) {
|
|
|
31
30
|
y += childRect.value.top + childRect.value.height + scrollY;
|
|
32
31
|
break;
|
|
33
32
|
}
|
|
34
|
-
if (!parentRect.value)
|
|
35
|
-
return y;
|
|
33
|
+
if (!parentRect.value) return y;
|
|
36
34
|
const dimensions = {
|
|
37
35
|
width: toValue(parentRect.value.width),
|
|
38
36
|
height: toValue(parentRect.value.height),
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
import type { InjectionKey, Ref, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { UseScrollReturn } from '@vueuse/core';
|
|
2
3
|
declare const MagicScrollParent: InjectionKey<MaybeRefOrGetter<HTMLElement | undefined>>;
|
|
3
4
|
declare const MagicScrollProgress: InjectionKey<Ref<number>>;
|
|
4
|
-
declare const MagicScrollReturn: InjectionKey<
|
|
5
|
-
x: import("vue").WritableComputedRef<number>;
|
|
6
|
-
y: import("vue").WritableComputedRef<number>;
|
|
7
|
-
isScrolling: Ref<boolean>;
|
|
8
|
-
arrivedState: {
|
|
9
|
-
left: boolean;
|
|
10
|
-
right: boolean;
|
|
11
|
-
top: boolean;
|
|
12
|
-
bottom: boolean;
|
|
13
|
-
};
|
|
14
|
-
directions: {
|
|
15
|
-
left: boolean;
|
|
16
|
-
right: boolean;
|
|
17
|
-
top: boolean;
|
|
18
|
-
bottom: boolean;
|
|
19
|
-
};
|
|
20
|
-
measure(): void;
|
|
21
|
-
} | undefined>;
|
|
5
|
+
declare const MagicScrollReturn: InjectionKey<UseScrollReturn | undefined>;
|
|
22
6
|
export { MagicScrollParent, MagicScrollProgress, MagicScrollReturn };
|
|
@@ -5,13 +5,15 @@ interface MagicToastComponentProps {
|
|
|
5
5
|
id: string;
|
|
6
6
|
siblings: ActiveToast[];
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<MagicToastComponentProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
12
|
mouseenter: (event: Event) => void;
|
|
10
13
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicToastComponentProps>>> & {
|
|
11
14
|
onMouseenter?: ((event: Event) => any) | undefined;
|
|
12
|
-
}, {}, {}
|
|
13
|
-
|
|
14
|
-
}>;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
15
17
|
export default _default;
|
|
16
18
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
19
|
new (): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MagicToastInstance } from '../../types.js';
|
|
2
2
|
export declare function useToastStore(): {
|
|
3
|
-
toastStore: import("vue").Ref<any
|
|
3
|
+
toastStore: import("vue").Ref<any>;
|
|
4
4
|
findInstance: (id: string) => MagicToastInstance | undefined;
|
|
5
5
|
addInstance: (id: string) => MagicToastInstance;
|
|
6
6
|
removeInstance: (id: string) => void;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "A magic collection of Vue composables, plugins, components and directives",
|
|
4
|
-
"version": "0.30.
|
|
4
|
+
"version": "0.30.4",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"devDependencies": {
|
|
7
8
|
"@antfu/ni": "^0.21.12",
|
|
8
9
|
"@release-it/bumper": "^6.0.1",
|