@maas/vue-equipment 0.19.0 → 0.20.0
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/index.d.mts +2 -2
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js.map +1 -1
- package/dist/composables/index.mjs.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +10 -10
- package/dist/plugins/MagicCookie/index.d.ts +8 -0
- package/dist/plugins/MagicCookie/index.mjs +9 -0
- package/dist/plugins/{MagicConsent → MagicCookie}/nuxt.mjs +7 -7
- package/dist/plugins/MagicCookie/src/components/MagicCookie.vue +118 -0
- package/dist/plugins/{MagicConsent/src/components/MagicConsent.vue.d.ts → MagicCookie/src/components/MagicCookie.vue.d.ts} +4 -4
- package/dist/plugins/{MagicConsent/src/composables/private/defineConsentApi.d.ts → MagicCookie/src/composables/private/defineCookieApi.d.ts} +2 -2
- package/dist/plugins/{MagicConsent/src/composables/private/defineConsentApi.mjs → MagicCookie/src/composables/private/defineCookieApi.mjs} +12 -10
- package/dist/plugins/MagicCookie/src/composables/useCookieApi.d.ts +15 -0
- package/dist/plugins/{MagicConsent/src/composables/useConsentApi.mjs → MagicCookie/src/composables/useCookieApi.mjs} +21 -27
- package/dist/plugins/MagicCookie/src/composables/useCookieEmitter.d.ts +15 -0
- package/dist/plugins/{MagicConsent/src/composables/useConsentEmitter.mjs → MagicCookie/src/composables/useCookieEmitter.mjs} +1 -1
- package/dist/plugins/MagicCookie/src/types/index.d.ts +20 -0
- package/dist/plugins/MagicDrawer/index.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +3 -2
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +18 -17
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +1 -1
- package/dist/plugins/MagicModal/index.d.ts +1 -1
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/index.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.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/MagicScroll/index.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollTransform.vue.d.ts +1 -1
- package/dist/plugins/MagicToast/demo/DemoToast.vue.d.ts +1 -1
- package/dist/plugins/MagicToast/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToast.vue.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/plugins/MagicConsent/index.d.ts +0 -8
- package/dist/plugins/MagicConsent/index.mjs +0 -9
- package/dist/plugins/MagicConsent/src/components/MagicConsent.vue +0 -118
- package/dist/plugins/MagicConsent/src/composables/useConsentApi.d.ts +0 -15
- package/dist/plugins/MagicConsent/src/composables/useConsentEmitter.d.ts +0 -15
- package/dist/plugins/MagicConsent/src/types/index.d.ts +0 -20
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerEventHandler.d.ts +0 -68
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerEventHandler.mjs +0 -14
- package/dist/plugins/MagicDrawer/src/index.d.ts +0 -0
- package/dist/plugins/MagicDrawer/src/index.mjs +0 -0
- /package/dist/plugins/{MagicConsent → MagicCookie}/nuxt.d.ts +0 -0
- /package/dist/plugins/{MagicConsent → MagicCookie}/src/types/index.mjs +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed, ref } from "vue";
|
|
2
2
|
import { useCookies } from "@vueuse/integrations/useCookies";
|
|
3
3
|
import { toValue } from "@vueuse/core";
|
|
4
|
-
import { globalApiState } from "./private/
|
|
5
|
-
import {
|
|
4
|
+
import { globalApiState } from "./private/defineCookieApi.mjs";
|
|
5
|
+
import { useCookieEmitter } from "./useCookieEmitter.mjs";
|
|
6
6
|
const preferencesVisible = ref(false);
|
|
7
7
|
const selectedCookies = ref({});
|
|
8
|
-
export function
|
|
8
|
+
export function useCookieApi() {
|
|
9
9
|
const universalCookies = useCookies(["cookie_consent"]);
|
|
10
|
-
const
|
|
10
|
+
const cookieConsent = computed({
|
|
11
11
|
get: () => {
|
|
12
12
|
return universalCookies.get("cookie_consent");
|
|
13
13
|
},
|
|
@@ -17,8 +17,8 @@ export function useConsentApi() {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
const emitter =
|
|
21
|
-
selectedCookies.value =
|
|
20
|
+
const emitter = useCookieEmitter();
|
|
21
|
+
selectedCookies.value = cookieConsent.value?.cookies || {};
|
|
22
22
|
function toggleSelection(key) {
|
|
23
23
|
selectedCookies.value = {
|
|
24
24
|
...selectedCookies.value,
|
|
@@ -26,38 +26,32 @@ export function useConsentApi() {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function accept() {
|
|
29
|
-
const cookies = globalApiState.value?.cookies?.reduce(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
{}
|
|
35
|
-
);
|
|
29
|
+
const cookies = globalApiState.value?.cookies?.reduce((result, cookie) => {
|
|
30
|
+
result[cookie.key] = true;
|
|
31
|
+
return result;
|
|
32
|
+
}, {});
|
|
36
33
|
selectedCookies.value = cookies;
|
|
37
34
|
const timestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
38
|
-
|
|
39
|
-
emitter.emit("accept",
|
|
35
|
+
cookieConsent.value = { timestamp, cookies };
|
|
36
|
+
emitter.emit("accept", cookieConsent.value);
|
|
40
37
|
}
|
|
41
38
|
function acceptSelected() {
|
|
42
39
|
const timestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
43
|
-
|
|
40
|
+
cookieConsent.value = {
|
|
44
41
|
timestamp,
|
|
45
42
|
cookies: selectedCookies.value
|
|
46
43
|
};
|
|
47
|
-
emitter.emit("acceptSelected",
|
|
44
|
+
emitter.emit("acceptSelected", cookieConsent.value);
|
|
48
45
|
}
|
|
49
46
|
function reject() {
|
|
50
|
-
const cookies = globalApiState.value?.cookies?.reduce(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
{}
|
|
56
|
-
);
|
|
47
|
+
const cookies = globalApiState.value?.cookies?.reduce((result, cookie) => {
|
|
48
|
+
result[cookie.key] = cookie.optional === false ? true : false;
|
|
49
|
+
return result;
|
|
50
|
+
}, {});
|
|
57
51
|
selectedCookies.value = cookies;
|
|
58
52
|
const timestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
59
|
-
|
|
60
|
-
emitter.emit("reject",
|
|
53
|
+
cookieConsent.value = { timestamp, cookies };
|
|
54
|
+
emitter.emit("reject", cookieConsent.value);
|
|
61
55
|
}
|
|
62
56
|
function onAccept(handler) {
|
|
63
57
|
emitter.on("accept", (args) => handler(toValue(args)));
|
|
@@ -74,7 +68,7 @@ export function useConsentApi() {
|
|
|
74
68
|
return {
|
|
75
69
|
preferencesVisible,
|
|
76
70
|
selectedCookies,
|
|
77
|
-
|
|
71
|
+
cookieConsent,
|
|
78
72
|
toggleSelection,
|
|
79
73
|
accept,
|
|
80
74
|
acceptSelected,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CookieEvents } from '../types.js';
|
|
2
|
+
export declare function useCookieEmitter(): {
|
|
3
|
+
on: {
|
|
4
|
+
<Key extends keyof CookieEvents>(type: Key, handler: import("mitt").Handler<CookieEvents[Key]>): void;
|
|
5
|
+
(type: "*", handler: import("mitt").WildcardHandler<CookieEvents>): void;
|
|
6
|
+
};
|
|
7
|
+
off: {
|
|
8
|
+
<Key_1 extends keyof CookieEvents>(type: Key_1, handler?: import("mitt").Handler<CookieEvents[Key_1]> | undefined): void;
|
|
9
|
+
(type: "*", handler: import("mitt").WildcardHandler<CookieEvents>): void;
|
|
10
|
+
};
|
|
11
|
+
emit: {
|
|
12
|
+
<Key_2 extends keyof CookieEvents>(type: Key_2, event: CookieEvents[Key_2]): void;
|
|
13
|
+
<Key_3 extends keyof CookieEvents>(type: undefined extends CookieEvents[Key_3] ? Key_3 : never): void;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type CookieApiDefinition = {
|
|
2
|
+
cookies: CookieRecord[];
|
|
3
|
+
maxAge?: number;
|
|
4
|
+
};
|
|
5
|
+
export type CookieRecord = {
|
|
6
|
+
key: string;
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
export type CookieConsent = {
|
|
13
|
+
timestamp: number | undefined;
|
|
14
|
+
cookies: Record<string, boolean>;
|
|
15
|
+
};
|
|
16
|
+
export type CookieEvents = {
|
|
17
|
+
accept: CookieConsent;
|
|
18
|
+
reject: CookieConsent;
|
|
19
|
+
acceptSelected: CookieConsent;
|
|
20
|
+
};
|
|
@@ -2,7 +2,7 @@ import MagicDrawer from './src/components/MagicDrawer.vue.js';
|
|
|
2
2
|
import { useDrawerApi } from './src/composables/useDrawerApi.js';
|
|
3
3
|
import { useDrawerEmitter } from './src/composables/useDrawerEmitter.js';
|
|
4
4
|
import type { Plugin } from 'vue';
|
|
5
|
-
import type { DrawerEvents } from './src/types.js';
|
|
5
|
+
import type { DrawerEvents } from './src/types/index.js';
|
|
6
6
|
declare const MagicDrawerPlugin: Plugin;
|
|
7
7
|
export { MagicDrawerPlugin, MagicDrawer, useDrawerApi, useDrawerEmitter };
|
|
8
8
|
export type { DrawerEvents };
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
@close="closeIfAllowed"
|
|
56
56
|
/>
|
|
57
57
|
<slot v-else />
|
|
58
|
+
<div v-if="hasDragged" class="magic-drawer__overlay" />
|
|
58
59
|
</div>
|
|
59
60
|
</div>
|
|
60
61
|
</transition>
|
|
@@ -141,7 +142,7 @@ const {
|
|
|
141
142
|
removeScrollLockPadding,
|
|
142
143
|
} = drawerApi
|
|
143
144
|
|
|
144
|
-
const { onPointerdown, onClick, dragging, style } = useDrawerDrag({
|
|
145
|
+
const { onPointerdown, onClick, dragging, hasDragged, style } = useDrawerDrag({
|
|
145
146
|
id: props.id,
|
|
146
147
|
isActive,
|
|
147
148
|
elRef,
|
|
@@ -290,5 +291,5 @@ onBeforeUnmount(() => {
|
|
|
290
291
|
</script>
|
|
291
292
|
|
|
292
293
|
<style>
|
|
293
|
-
:root{--magic-drawer-height:75svh;--magic-drawer-width:100%;--magic-drawer-z-index:999;--magic-drawer-justify-content:center;--magic-drawer-align-items:flex-end;--magic-drawer-backdrop-color:rgba(0,0,0,.5);--magic-drawer-backdrop-filter:unset;--magic-drawer-content-overflow-x:hidden;--magic-drawer-content-overflow-y:hidden;--magic-drawer-handle-wrapper-height:2rem;--magic-drawer-handle-width:3rem;--magic-drawer-handle-height:0.375rem;--magic-drawer-handle-color:#d4d4d8;--magic-drawer-handle-border-radius:0.25rem;--magic-drawer-enter-animation:slide-btt-in 300ms ease;--magic-drawer-leave-animation:slide-btt-out 300ms ease;--magic-drawer-drag-overshoot:4rem;--magic-drawer-drag-overshoot-x:0rem;--magic-drawer-drag-overshoot-y:0rem;--magic-drawer-padding:0rem}.magic-drawer{align-items:var(--magic-drawer-align-items);background:transparent;border:none;color:inherit;display:flex;height:100%;inset:0;justify-content:var(--magic-drawer-justify-content);padding:0;pointer-events:none;position:fixed;width:100%;z-index:var(--magic-drawer-z-index)}.magic-drawer.-bottom{--magic-drawer-drag-overshoot-y:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 0 var(--magic-drawer-drag-overshoot-y) 0}.magic-drawer.-top{--magic-drawer-enter-animation:slide-ttb-in 300ms ease;--magic-drawer-leave-animation:slide-ttb-out 300ms ease;--magic-drawer-align-items:flex-start;--magic-drawer-drag-overshoot-y:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:var(--magic-drawer-drag-overshoot-y) 0 0 0}.magic-drawer.-right{--magic-drawer-enter-animation:slide-rtl-in 300ms ease;--magic-drawer-leave-animation:slide-rtl-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-end;--magic-drawer-drag-overshoot-x:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 var(--magic-drawer-drag-overshoot-x) 0 0}.magic-drawer.-left{--magic-drawer-enter-animation:slide-ltr-in 300ms ease;--magic-drawer-leave-animation:slide-ltr-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-start;--magic-drawer-drag-overshoot-x:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:0 0 0 var(--magic-drawer-drag-overshoot-x)}.magic-drawer__wrapper{height:calc(var(--magic-drawer-height) + var(--magic-drawer-drag-overshoot-y));pointer-events:none;transform:translate(var(--magic-drawer-drag-overshoot-x),var(--magic-drawer-drag-overshoot-y));width:calc(var(--magic-drawer-width) + var(--magic-drawer-drag-overshoot-x))}.magic-drawer__content{height:100%;max-height:100%;position:relative;width:100%}.magic-drawer__drag{-webkit-overflow-scrolling:touch;align-items:var(--magic-drawer-align-items);cursor:grab;display:flex;height:100%;justify-content:var(--magic-drawer-justify-content);overflow-x:var(--magic-drawer-content-overflow-x);overflow-y:var(--magic-drawer-content-overflow-y);pointer-events:auto;position:relative;scroll-behavior:smooth;width:100%}.magic-drawer.-dragging .magic-drawer__drag{cursor:grabbing}.magic-drawer__drag>*{padding:var(--magic-drawer-padding)}.magic-drawer__backdrop{-webkit-backdrop-filter:var(--magic-drawer-backdrop-filter);backdrop-filter:var(--magic-drawer-backdrop-filter);background-color:var(--magic-drawer-backdrop-color);bottom:0;height:100%;left:0;pointer-events:auto;position:fixed;right:0;top:0;width:100%;z-index:-1}.magic-drawer--content-enter-active{animation:var(--magic-drawer-enter-animation)}.magic-drawer--content-leave-active{animation:var(--magic-drawer-leave-animation)}.magic-drawer--backdrop-enter-active{animation:fade-in .3s ease}.magic-drawer--backdrop-leave-active{animation:fade-out .3s ease}
|
|
294
|
+
:root{--magic-drawer-height:75svh;--magic-drawer-width:100%;--magic-drawer-z-index:999;--magic-drawer-justify-content:center;--magic-drawer-align-items:flex-end;--magic-drawer-backdrop-color:rgba(0,0,0,.5);--magic-drawer-backdrop-filter:unset;--magic-drawer-content-overflow-x:hidden;--magic-drawer-content-overflow-y:hidden;--magic-drawer-handle-wrapper-height:2rem;--magic-drawer-handle-width:3rem;--magic-drawer-handle-height:0.375rem;--magic-drawer-handle-color:#d4d4d8;--magic-drawer-handle-border-radius:0.25rem;--magic-drawer-enter-animation:slide-btt-in 300ms ease;--magic-drawer-leave-animation:slide-btt-out 300ms ease;--magic-drawer-drag-overshoot:4rem;--magic-drawer-drag-overshoot-x:0rem;--magic-drawer-drag-overshoot-y:0rem;--magic-drawer-padding:0rem}.magic-drawer{align-items:var(--magic-drawer-align-items);background:transparent;border:none;color:inherit;display:flex;height:100%;inset:0;justify-content:var(--magic-drawer-justify-content);padding:0;pointer-events:none;position:fixed;width:100%;z-index:var(--magic-drawer-z-index)}.magic-drawer.-bottom{--magic-drawer-drag-overshoot-y:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 0 var(--magic-drawer-drag-overshoot-y) 0}.magic-drawer.-top{--magic-drawer-enter-animation:slide-ttb-in 300ms ease;--magic-drawer-leave-animation:slide-ttb-out 300ms ease;--magic-drawer-align-items:flex-start;--magic-drawer-drag-overshoot-y:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:var(--magic-drawer-drag-overshoot-y) 0 0 0}.magic-drawer.-right{--magic-drawer-enter-animation:slide-rtl-in 300ms ease;--magic-drawer-leave-animation:slide-rtl-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-end;--magic-drawer-drag-overshoot-x:var(--magic-drawer-drag-overshoot);--magic-drawer-padding:0 var(--magic-drawer-drag-overshoot-x) 0 0}.magic-drawer.-left{--magic-drawer-enter-animation:slide-ltr-in 300ms ease;--magic-drawer-leave-animation:slide-ltr-out 300ms ease;--magic-drawer-align-items:center;--magic-drawer-justify-content:flex-start;--magic-drawer-drag-overshoot-x:calc(var(--magic-drawer-drag-overshoot)*-1);--magic-drawer-padding:0 0 0 var(--magic-drawer-drag-overshoot-x)}.magic-drawer__wrapper{height:calc(var(--magic-drawer-height) + var(--magic-drawer-drag-overshoot-y));pointer-events:none;transform:translate(var(--magic-drawer-drag-overshoot-x),var(--magic-drawer-drag-overshoot-y));width:calc(var(--magic-drawer-width) + var(--magic-drawer-drag-overshoot-x))}.magic-drawer__content{height:100%;max-height:100%;position:relative;width:100%}.magic-drawer__drag{-webkit-overflow-scrolling:touch;align-items:var(--magic-drawer-align-items);cursor:grab;display:flex;height:100%;justify-content:var(--magic-drawer-justify-content);overflow-x:var(--magic-drawer-content-overflow-x);overflow-y:var(--magic-drawer-content-overflow-y);pointer-events:auto;position:relative;scroll-behavior:smooth;width:100%}.magic-drawer.-dragging .magic-drawer__drag{cursor:grabbing;-webkit-user-select:none;-moz-user-select:none;user-select:none}.magic-drawer__drag>*{padding:var(--magic-drawer-padding)}.magic-drawer__overlay{inset:0;position:absolute;z-index:9999}.magic-drawer__backdrop{-webkit-backdrop-filter:var(--magic-drawer-backdrop-filter);backdrop-filter:var(--magic-drawer-backdrop-filter);background-color:var(--magic-drawer-backdrop-color);bottom:0;height:100%;left:0;pointer-events:auto;position:fixed;right:0;top:0;width:100%;z-index:-1}.magic-drawer--content-enter-active{animation:var(--magic-drawer-enter-animation)}.magic-drawer--content-leave-active{animation:var(--magic-drawer-leave-animation)}.magic-drawer--backdrop-enter-active{animation:fade-in .3s ease}.magic-drawer--backdrop-leave-active{animation:fade-out .3s ease}
|
|
294
295
|
</style>
|
|
@@ -19,7 +19,7 @@ interface MagicDrawerProps {
|
|
|
19
19
|
}
|
|
20
20
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MagicDrawerProps>, {
|
|
21
21
|
options: () => DrawerOptions;
|
|
22
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
22
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MagicDrawerProps>, {
|
|
23
23
|
options: () => DrawerOptions;
|
|
24
24
|
}>>>, {
|
|
25
25
|
options: DrawerOptions;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Ref, type MaybeRef } from 'vue';
|
|
2
2
|
import { type DefaultOptions } from '../../utils/defaultOptions.js';
|
|
3
|
-
import type { CustomMouseEvent } from '../../types.js';
|
|
4
3
|
type UseDrawerDragArgs = {
|
|
5
4
|
id: MaybeRef<string>;
|
|
6
5
|
isActive: MaybeRef<boolean>;
|
|
@@ -18,7 +17,8 @@ export declare function useDrawerDrag(args: UseDrawerDragArgs): {
|
|
|
18
17
|
draggedX: Ref<number>;
|
|
19
18
|
draggedY: Ref<number>;
|
|
20
19
|
dragging: Ref<boolean>;
|
|
20
|
+
hasDragged: import("vue").ComputedRef<boolean>;
|
|
21
21
|
onPointerdown: (e: PointerEvent) => void;
|
|
22
|
-
onClick: (e:
|
|
22
|
+
onClick: (e: MouseEvent) => Promise<void>;
|
|
23
23
|
};
|
|
24
24
|
export {};
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
import { useDrawerEmitter } from "../useDrawerEmitter.mjs";
|
|
18
18
|
import { useDrawerSnap } from "./useDrawerSnap.mjs";
|
|
19
19
|
import { useDrawerGuards } from "./useDrawerGuards.mjs";
|
|
20
|
-
import { useDrawerEventHandler } from "./useDrawerEventHandler.mjs";
|
|
21
20
|
import { isIOS } from "@maas/vue-equipment/utils";
|
|
22
21
|
export function useDrawerDrag(args) {
|
|
23
22
|
const {
|
|
@@ -44,6 +43,8 @@ export function useDrawerDrag(args) {
|
|
|
44
43
|
const originY = ref(0);
|
|
45
44
|
const pointerdownX = ref(0);
|
|
46
45
|
const pointerdownY = ref(0);
|
|
46
|
+
const lastDraggedX = ref(0);
|
|
47
|
+
const lastDraggedY = ref(0);
|
|
47
48
|
const relDirectionY = ref("absolute");
|
|
48
49
|
const relDirectionX = ref("absolute");
|
|
49
50
|
const absDirectionY = ref(void 0);
|
|
@@ -53,8 +54,9 @@ export function useDrawerDrag(args) {
|
|
|
53
54
|
const duration = computed(() => toValue(snap)?.duration);
|
|
54
55
|
const draggedX = ref(0);
|
|
55
56
|
const draggedY = ref(0);
|
|
56
|
-
const
|
|
57
|
-
|
|
57
|
+
const hasDragged = computed(() => {
|
|
58
|
+
return lastDraggedX.value !== draggedX.value || lastDraggedY.value !== draggedY.value;
|
|
59
|
+
});
|
|
58
60
|
const style = computed(
|
|
59
61
|
() => `transform: translate(${draggedX.value}px, ${draggedY.value}px)`
|
|
60
62
|
);
|
|
@@ -85,7 +87,6 @@ export function useDrawerDrag(args) {
|
|
|
85
87
|
position,
|
|
86
88
|
activeSnapPoint
|
|
87
89
|
});
|
|
88
|
-
const { clickEvent, dispatchEvent } = useDrawerEventHandler();
|
|
89
90
|
async function getSizes() {
|
|
90
91
|
elRect.value = unrefElement(elRef)?.getBoundingClientRect();
|
|
91
92
|
wrapperRect.value = unrefElement(wrapperRef)?.getBoundingClientRect();
|
|
@@ -242,6 +243,8 @@ export function useDrawerDrag(args) {
|
|
|
242
243
|
function resetDragged() {
|
|
243
244
|
draggedX.value = 0;
|
|
244
245
|
draggedY.value = 0;
|
|
246
|
+
lastDraggedX.value = 0;
|
|
247
|
+
lastDraggedY.value = 0;
|
|
245
248
|
}
|
|
246
249
|
function resetSnapped() {
|
|
247
250
|
snappedX.value = 0;
|
|
@@ -307,6 +310,9 @@ export function useDrawerDrag(args) {
|
|
|
307
310
|
}
|
|
308
311
|
resetStateAndListeners();
|
|
309
312
|
resetScrollLock();
|
|
313
|
+
if (hasDragged.value) {
|
|
314
|
+
e.preventDefault();
|
|
315
|
+
}
|
|
310
316
|
}
|
|
311
317
|
function onPointermove(e) {
|
|
312
318
|
shouldClose.value = false;
|
|
@@ -326,10 +332,6 @@ export function useDrawerDrag(args) {
|
|
|
326
332
|
checkPosition({ x: e.screenX, y: e.screenY });
|
|
327
333
|
}
|
|
328
334
|
function onPointerdown(e) {
|
|
329
|
-
const tag = e.target.tagName;
|
|
330
|
-
if (tag === "A") {
|
|
331
|
-
e.preventDefault();
|
|
332
|
-
}
|
|
333
335
|
if (dragging.value) {
|
|
334
336
|
return;
|
|
335
337
|
} else {
|
|
@@ -337,7 +339,6 @@ export function useDrawerDrag(args) {
|
|
|
337
339
|
}
|
|
338
340
|
lastDraggedX.value = draggedX.value;
|
|
339
341
|
lastDraggedY.value = draggedY.value;
|
|
340
|
-
e.target.setPointerCapture(e.pointerId);
|
|
341
342
|
cancelPointerup = useEventListener(document, "pointerup", onPointerup);
|
|
342
343
|
cancelPointermove = useEventListener(document, "pointermove", onPointermove);
|
|
343
344
|
cancelTouchend = isIOS() ? useEventListener(document, "touchend", onPointerup) : void 0;
|
|
@@ -349,16 +350,9 @@ export function useDrawerDrag(args) {
|
|
|
349
350
|
onPointermove(e);
|
|
350
351
|
}
|
|
351
352
|
async function onClick(e) {
|
|
352
|
-
if (
|
|
353
|
-
clickEvent.value = void 0;
|
|
354
|
-
return;
|
|
355
|
-
} else {
|
|
356
|
-
clickEvent.value = e;
|
|
353
|
+
if (hasDragged.value) {
|
|
357
354
|
e.preventDefault();
|
|
358
355
|
}
|
|
359
|
-
if (lastDraggedX.value === draggedX.value && lastDraggedY.value === draggedY.value) {
|
|
360
|
-
dispatchEvent(clickEvent.value);
|
|
361
|
-
}
|
|
362
356
|
}
|
|
363
357
|
onMounted(async () => {
|
|
364
358
|
await getSizes();
|
|
@@ -372,6 +366,12 @@ export function useDrawerDrag(args) {
|
|
|
372
366
|
snapTo({ snapPoint, interpolate: false });
|
|
373
367
|
}
|
|
374
368
|
);
|
|
369
|
+
watch(snappedX, (value) => {
|
|
370
|
+
lastDraggedX.value = value;
|
|
371
|
+
});
|
|
372
|
+
watch(snappedY, (value) => {
|
|
373
|
+
lastDraggedY.value = value;
|
|
374
|
+
});
|
|
375
375
|
useResizeObserver(elRef, async () => {
|
|
376
376
|
useThrottleFn(async () => {
|
|
377
377
|
await getSizes();
|
|
@@ -389,6 +389,7 @@ export function useDrawerDrag(args) {
|
|
|
389
389
|
draggedX,
|
|
390
390
|
draggedY,
|
|
391
391
|
dragging,
|
|
392
|
+
hasDragged,
|
|
392
393
|
onPointerdown,
|
|
393
394
|
onClick
|
|
394
395
|
};
|
|
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
playing: import("vue").Ref<boolean>;
|
|
10
10
|
play: () => void;
|
|
11
11
|
pause: () => void;
|
|
12
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
13
13
|
direction: string;
|
|
14
14
|
speed: number;
|
|
15
15
|
}>>>, {
|
|
@@ -2,7 +2,7 @@ import MagicModal from './src/components/MagicModal.vue.js';
|
|
|
2
2
|
import { useModalApi } from './src/composables/useModalApi.js';
|
|
3
3
|
import { useModalEmitter } from './src/composables/useModalEmitter.js';
|
|
4
4
|
import type { Plugin } from 'vue';
|
|
5
|
-
import type { ModalEvents } from './src/types.js';
|
|
5
|
+
import type { ModalEvents } from './src/types/index.js';
|
|
6
6
|
declare const MagicModalPlugin: Plugin;
|
|
7
7
|
export { MagicModalPlugin, MagicModal, useModalEmitter, useModalApi };
|
|
8
8
|
export type { ModalEvents };
|
|
@@ -11,7 +11,7 @@ interface MagicModalProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MagicModalProps>, {
|
|
13
13
|
options: () => ModalOptions;
|
|
14
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
14
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MagicModalProps>, {
|
|
15
15
|
options: () => ModalOptions;
|
|
16
16
|
}>>>, {
|
|
17
17
|
options: ModalOptions;
|
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
}
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
7
7
|
pause: boolean;
|
|
8
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
8
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
9
9
|
pause: boolean;
|
|
10
10
|
}>>>, {
|
|
11
11
|
pause: boolean;
|
|
@@ -7,4 +7,4 @@ import MagicPlayerMuxPopover from './src/components/MagicPlayerMuxPopover.vue.js
|
|
|
7
7
|
import { usePlayerApi } from './src/composables/usePlayerApi.js';
|
|
8
8
|
declare const MagicPlayerPlugin: Plugin;
|
|
9
9
|
export { MagicPlayerPlugin, MagicPlayer, MagicPlayerControls, MagicPlayerOverlay, MagicPlayerTimeline, MagicPlayerMuxPopover, usePlayerApi, };
|
|
10
|
-
export type * from './src/types';
|
|
10
|
+
export type * from './src/types/index';
|
|
@@ -13,7 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
13
13
|
ratio: string;
|
|
14
14
|
fill: boolean;
|
|
15
15
|
autoplay: boolean;
|
|
16
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
16
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MagicPlayerProps>, {
|
|
17
17
|
srcType: string;
|
|
18
18
|
src: string;
|
|
19
19
|
ratio: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
id: string;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>, {
|
|
5
5
|
seekPopover?(_: {}): any;
|
|
6
6
|
playIcon?(_: {}): any;
|
|
7
7
|
pauseIcon?(_: {}): any;
|
|
@@ -2,7 +2,7 @@ type Props = {
|
|
|
2
2
|
id: string;
|
|
3
3
|
playbackId: string;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
6
6
|
export default _default;
|
|
7
7
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
8
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
id: string;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>, {
|
|
5
5
|
waitingIcon?(_: {}): any;
|
|
6
6
|
playIcon?(_: {}): any;
|
|
7
7
|
pauseIcon?(_: {}): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
id: string;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
5
5
|
export default _default;
|
|
6
6
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
7
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -11,4 +11,4 @@ import type { Plugin } from 'vue';
|
|
|
11
11
|
declare const MagicScrollPlugin: Plugin;
|
|
12
12
|
export { MagicScrollPlugin, MagicScrollProvider, MagicScrollScene, MagicScrollTransform, MagicScrollMotion, MagicScrollCollision, useCollisionEmitter, useScrollApi, useCollisionDetect, ScrollParentKey, ScrollPositionKey, ScrollProgressKey, };
|
|
13
13
|
export * from './src/symbols.js';
|
|
14
|
-
export type * from './src/types';
|
|
14
|
+
export type * from './src/types/index';
|
|
@@ -2,7 +2,7 @@ import type { CollisionEntry } from '../types';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
collisionEntries: CollisionEntry[];
|
|
4
4
|
}
|
|
5
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>, {
|
|
6
6
|
default?(_: {}): any;
|
|
7
7
|
}>;
|
|
8
8
|
export default _default;
|
|
@@ -8,7 +8,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
8
8
|
keyframes: undefined;
|
|
9
9
|
offset: undefined;
|
|
10
10
|
easing: string;
|
|
11
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
11
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
12
|
keyframes: undefined;
|
|
13
13
|
offset: undefined;
|
|
14
14
|
easing: string;
|
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
}
|
|
6
6
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
7
7
|
active: () => true;
|
|
8
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
8
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
9
9
|
active: () => true;
|
|
10
10
|
}>>>, {
|
|
11
11
|
active: Boolean;
|
|
@@ -8,7 +8,7 @@ interface Props {
|
|
|
8
8
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
9
9
|
from: string;
|
|
10
10
|
to: string;
|
|
11
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
11
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
12
|
from: string;
|
|
13
13
|
to: string;
|
|
14
14
|
}>>>, {
|
|
@@ -17,7 +17,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
17
17
|
skewY: number;
|
|
18
18
|
translateX: number;
|
|
19
19
|
translateY: number;
|
|
20
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
20
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
21
21
|
as: string;
|
|
22
22
|
scale: number;
|
|
23
23
|
scaleX: number;
|
|
@@ -3,7 +3,7 @@ interface Props {
|
|
|
3
3
|
}
|
|
4
4
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
5
|
close: (...args: any[]) => void;
|
|
6
|
-
}, string, import("vue").
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
|
|
7
7
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
8
8
|
}, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import MagicToast from './src/components/MagicToast.vue.js';
|
|
|
2
2
|
import { useToastApi } from './src/composables/useToastApi.js';
|
|
3
3
|
import { useToastEmitter } from './src/composables/useToastEmitter.js';
|
|
4
4
|
import type { Plugin } from 'vue';
|
|
5
|
-
import type { ToastEvents } from './src/types.js';
|
|
5
|
+
import type { ToastEvents } from './src/types/index.js';
|
|
6
6
|
declare const MagicToastPlugin: Plugin;
|
|
7
7
|
export { MagicToastPlugin, MagicToast, useToastApi, useToastEmitter };
|
|
8
8
|
export type { ToastEvents };
|
|
@@ -10,7 +10,7 @@ interface MagicToastProps {
|
|
|
10
10
|
class: MaybeRef<string>;
|
|
11
11
|
options?: ToastOptions;
|
|
12
12
|
}
|
|
13
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<MagicToastProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
13
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<MagicToastProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MagicToastProps>>>, {}, {}>;
|
|
14
14
|
export default _default;
|
|
15
15
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
16
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -7,7 +7,7 @@ interface Props {
|
|
|
7
7
|
}
|
|
8
8
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
mouseenter: (event: Event) => void;
|
|
10
|
-
}, string, import("vue").
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
|
|
11
11
|
onMouseenter?: ((event: Event) => any) | undefined;
|
|
12
12
|
}, {}, {}>, {
|
|
13
13
|
default?(_: {}): any;
|
package/dist/plugins/index.d.ts
CHANGED
package/dist/plugins/index.mjs
CHANGED
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.
|
|
4
|
+
"version": "0.20.0",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@antfu/ni": "^0.21.12",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vue';
|
|
2
|
-
import MagicConsent from './src/components/MagicConsent.vue.js';
|
|
3
|
-
import { useConsentApi } from './src/composables/useConsentApi.js';
|
|
4
|
-
import { useConsentEmitter } from './src/composables/useConsentEmitter.js';
|
|
5
|
-
import type { ConsentEvents } from './src/types.js';
|
|
6
|
-
declare const MagicConsentPlugin: Plugin;
|
|
7
|
-
export { MagicConsentPlugin, MagicConsent, useConsentApi, useConsentEmitter };
|
|
8
|
-
export type { ConsentEvents };
|