@maas/vue-equipment 1.0.0-beta.40 → 1.0.0-beta.42
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/nuxt/module.mjs +2 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +3 -3
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +7 -3
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +3 -3
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +3 -3
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.mjs +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.d.vue.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +7 -3
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +3 -3
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.mjs +1 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +12 -0
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +3 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +6 -0
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +4 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.d.vue.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +3 -3
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +3 -3
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +1 -1
- package/package.json +2 -2
package/dist/nuxt/module.json
CHANGED
package/dist/nuxt/module.mjs
CHANGED
|
@@ -141,7 +141,7 @@ functions.map((f) => f.name);
|
|
|
141
141
|
const plugins = functions.filter((p) => p.package === "plugins");
|
|
142
142
|
const composables = functions.filter((p) => p.package === "composables");
|
|
143
143
|
|
|
144
|
-
const module = defineNuxtModule({
|
|
144
|
+
const module$1 = defineNuxtModule({
|
|
145
145
|
meta: {
|
|
146
146
|
name: "@maas/vue-equipment/nuxt",
|
|
147
147
|
configKey: "vueEquipment"
|
|
@@ -194,4 +194,4 @@ const module = defineNuxtModule({
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
export { module as default };
|
|
197
|
+
export { module$1 as default };
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
@leave="onLeave"
|
|
20
20
|
@after-leave="onAfterLeave"
|
|
21
21
|
>
|
|
22
|
-
<primitive v-show="view?.active" :as-child="asChild">
|
|
22
|
+
<vue-primitive v-show="view?.active" :as-child="asChild">
|
|
23
23
|
<slot :view-active="view?.active" />
|
|
24
|
-
</primitive>
|
|
24
|
+
</vue-primitive>
|
|
25
25
|
</transition>
|
|
26
26
|
</auto-size>
|
|
27
27
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import { inject, computed } from "vue";
|
|
32
32
|
import { defu } from "defu";
|
|
33
33
|
import { AutoSize } from "@maas/vue-autosize";
|
|
34
|
-
import {
|
|
34
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
35
35
|
import {
|
|
36
36
|
useMagicError
|
|
37
37
|
} from "@maas/vue-equipment/plugins/MagicError";
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
|
+
:data-id="id"
|
|
4
|
+
:as-child="asChild"
|
|
5
|
+
class="magic-accordion-provider"
|
|
6
|
+
>
|
|
3
7
|
<slot />
|
|
4
|
-
</primitive>
|
|
8
|
+
</vue-primitive>
|
|
5
9
|
</template>
|
|
6
10
|
|
|
7
11
|
<script setup>
|
|
8
12
|
import { onBeforeUnmount, provide } from "vue";
|
|
9
|
-
import {
|
|
13
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
10
14
|
import { useAccordionState } from "../composables/private/useAccordionState";
|
|
11
15
|
import { MagicAccordionInstanceId } from "../symbols";
|
|
12
16
|
const { id, asChild, options } = defineProps({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
3
|
ref="el"
|
|
4
4
|
:as-child="asChild"
|
|
5
5
|
:data-id="`${mappedViewId}-trigger`"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
@click="onClick"
|
|
11
11
|
>
|
|
12
12
|
<slot :view-active="view?.active" />
|
|
13
|
-
</primitive>
|
|
13
|
+
</vue-primitive>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script setup>
|
|
17
17
|
import { useTemplateRef, inject, computed, toValue } from "vue";
|
|
18
|
-
import {
|
|
18
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
19
19
|
import { onKeyStroke } from "@vueuse/core";
|
|
20
20
|
import {
|
|
21
21
|
useMagicError
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
3
|
:as-child="asChild"
|
|
4
4
|
:data-id="mappedId"
|
|
5
5
|
:data-active="mappedActive"
|
|
6
6
|
class="magic-accordion-view"
|
|
7
7
|
>
|
|
8
8
|
<slot :view-active="mappedActive" />
|
|
9
|
-
</primitive>
|
|
9
|
+
</vue-primitive>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script setup>
|
|
13
13
|
import { computed, inject, onBeforeUnmount, provide, useId } from "vue";
|
|
14
|
-
import {
|
|
14
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
15
15
|
import {
|
|
16
16
|
useMagicError
|
|
17
17
|
} from "@maas/vue-equipment/plugins/MagicError";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type ComputedRef, type MaybeRef, type Ref } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { VuePrimitive } from '@maas/vue-primitive';
|
|
3
3
|
import type { Interaction } from '../../types/index.js';
|
|
4
4
|
interface UseAccordionTriggerArgs {
|
|
5
5
|
instanceId: MaybeRef<string>;
|
|
6
6
|
viewId: string;
|
|
7
7
|
trigger: Interaction;
|
|
8
8
|
mappedDisabled: ComputedRef<boolean>;
|
|
9
|
-
elRef: Ref<InstanceType<typeof
|
|
9
|
+
elRef: Ref<InstanceType<typeof VuePrimitive> | null>;
|
|
10
10
|
}
|
|
11
11
|
export declare function useAccordionTrigger(args: UseAccordionTriggerArgs): {
|
|
12
12
|
onMouseenter: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {} from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
3
3
|
import { useFocus } from "@vueuse/core";
|
|
4
4
|
import { useAccordionView } from "./useAccordionView.mjs";
|
|
5
5
|
export function useAccordionTrigger(args) {
|
|
@@ -11,11 +11,11 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
default?: (props: typeof __VLS_1) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
enter: () => any;
|
|
15
14
|
click: (event: MouseEvent) => any;
|
|
15
|
+
enter: () => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
|
|
17
|
-
onEnter?: (() => any) | undefined;
|
|
18
17
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
18
|
+
onEnter?: (() => any) | undefined;
|
|
19
19
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -11,11 +11,11 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
default?: (props: typeof __VLS_1) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
enter: () => any;
|
|
15
14
|
click: (event: MouseEvent) => any;
|
|
15
|
+
enter: () => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
|
|
17
|
-
onEnter?: (() => any) | undefined;
|
|
18
17
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
18
|
+
onEnter?: (() => any) | undefined;
|
|
19
19
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
|
+
:data-id="id"
|
|
4
|
+
:as-child="asChild"
|
|
5
|
+
class="magic-command-provider"
|
|
6
|
+
>
|
|
3
7
|
<slot />
|
|
4
|
-
</primitive>
|
|
8
|
+
</vue-primitive>
|
|
5
9
|
</template>
|
|
6
10
|
|
|
7
11
|
<script setup>
|
|
8
12
|
import { shallowRef, provide, watch, onBeforeUnmount } from "vue";
|
|
9
13
|
import { useMagicKeys, usePointer } from "@vueuse/core";
|
|
10
|
-
import {
|
|
14
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
11
15
|
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
12
16
|
import { createDefu } from "defu";
|
|
13
17
|
import { useCommandState } from "../composables/private/useCommandState";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
3
|
ref="el"
|
|
4
4
|
:data-id="`${mappedViewId}-trigger`"
|
|
5
5
|
:data-active="mappedActive"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
@mouseenter="onMouseenter"
|
|
11
11
|
>
|
|
12
12
|
<slot :view-active="view?.active" :trigger-disabled="mappedDisabled" />
|
|
13
|
-
</primitive>
|
|
13
|
+
</vue-primitive>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script setup>
|
|
17
17
|
import { computed, inject, useTemplateRef, toValue, watch } from "vue";
|
|
18
|
-
import {
|
|
18
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
19
19
|
import {
|
|
20
20
|
useMagicError
|
|
21
21
|
} from "@maas/vue-equipment/plugins/MagicError";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComputedRef, type MaybeRef, type Ref } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { VuePrimitive } from '@maas/vue-primitive';
|
|
3
3
|
import type { Action, Interaction } from '../../types/index.js';
|
|
4
4
|
type UseCommandTriggerArgs = {
|
|
5
5
|
instanceId: MaybeRef<string>;
|
|
@@ -8,7 +8,7 @@ type UseCommandTriggerArgs = {
|
|
|
8
8
|
mappedActive?: ComputedRef<boolean>;
|
|
9
9
|
trigger: Interaction[];
|
|
10
10
|
action: Action;
|
|
11
|
-
elRef: Ref<InstanceType<typeof
|
|
11
|
+
elRef: Ref<InstanceType<typeof VuePrimitive> | null>;
|
|
12
12
|
};
|
|
13
13
|
export declare function useCommandTrigger(args: UseCommandTriggerArgs): {
|
|
14
14
|
onMouseenter: () => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nextTick } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
3
3
|
import { useFocus } from "@vueuse/core";
|
|
4
4
|
import { useCommandView } from "./useCommandView.mjs";
|
|
5
5
|
import { useCommandState } from "./useCommandState.mjs";
|
|
@@ -214,6 +214,9 @@ export function useDraggableDrag(args) {
|
|
|
214
214
|
);
|
|
215
215
|
for (let i = 0; i < mappedSnapPoints.value.length; i++) {
|
|
216
216
|
const snapPoint = mappedSnapPoints.value[i];
|
|
217
|
+
if (!snapPoint) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
217
220
|
const targetVector = vectorBetweenCoordinates(
|
|
218
221
|
intermediateDraggedCoords,
|
|
219
222
|
snapPoint
|
|
@@ -238,6 +241,9 @@ export function useDraggableDrag(args) {
|
|
|
238
241
|
function findClosestSnapPoint() {
|
|
239
242
|
const draggedCoords = { x: draggedX.value, y: draggedY.value };
|
|
240
243
|
const closestSnapPoint = mappedSnapPoints.value.reduce((a, b) => {
|
|
244
|
+
if (!a) {
|
|
245
|
+
return b;
|
|
246
|
+
}
|
|
241
247
|
return calculateDistance(a, draggedCoords) < calculateDistance(b, draggedCoords) ? a : b;
|
|
242
248
|
}, mappedSnapPoints.value[0]);
|
|
243
249
|
return closestSnapPoint;
|
|
@@ -310,6 +316,12 @@ export function useDraggableDrag(args) {
|
|
|
310
316
|
});
|
|
311
317
|
}
|
|
312
318
|
function onPointerdown(e) {
|
|
319
|
+
const isSelect = ["SELECT", "OPTION"].includes(
|
|
320
|
+
e.target.tagName
|
|
321
|
+
);
|
|
322
|
+
if (isSelect) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
313
325
|
const scrollLockValue = toValue(scrollLock);
|
|
314
326
|
if (scrollLockValue) {
|
|
315
327
|
if (typeof scrollLockValue === "object" && scrollLockValue.padding) {
|
|
@@ -138,6 +138,9 @@ export function useDraggableSnap(args) {
|
|
|
138
138
|
easing = toValue(animation).snap?.easing
|
|
139
139
|
} = args2;
|
|
140
140
|
const snapPoint = snapPointsMap.value[`x${x}y${y}`];
|
|
141
|
+
if (!snapPoint) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
141
144
|
emitter.emit("beforeSnap", { id: toValue(id), snapPoint });
|
|
142
145
|
cancelInterpolation();
|
|
143
146
|
interpolationIdY.value = interpolate({
|
|
@@ -410,6 +410,12 @@ export function useDrawerDrag(args) {
|
|
|
410
410
|
if (dragging.value) {
|
|
411
411
|
return;
|
|
412
412
|
} else {
|
|
413
|
+
const isSelect = ["SELECT", "OPTION"].includes(
|
|
414
|
+
e.target.tagName
|
|
415
|
+
);
|
|
416
|
+
if (isSelect) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
413
419
|
dragging.value = true;
|
|
414
420
|
pointerdownTarget = e.target;
|
|
415
421
|
guardedSetPointerCapture({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function useMagicEmitter(): {
|
|
2
2
|
on: {
|
|
3
|
-
<Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents |
|
|
3
|
+
<Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, handler: import("mitt").Handler<({
|
|
4
4
|
beforeEnter: string | {
|
|
5
5
|
id: string;
|
|
6
6
|
viewId: string;
|
|
@@ -536,7 +536,7 @@ export declare function useMagicEmitter(): {
|
|
|
536
536
|
} & Omit<object, keyof import("../../../MagicToast/src/types/index.js").ToastEvents>, "collision">, keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents>, keyof import("../../../MagicMenu/src/types/index.js").MenuEvents>, keyof import("../../../MagicModal/src/types/index.js").ModalEvents>, keyof import("../../../MagicDrawer/src/types/index.js").DrawerEvents>, keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents>, keyof import("../../../MagicCookie/src/types/index.js").CookieEvents>, keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>>): void;
|
|
537
537
|
};
|
|
538
538
|
off: {
|
|
539
|
-
<Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents |
|
|
539
|
+
<Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, handler?: import("mitt").Handler<({
|
|
540
540
|
beforeEnter: string | {
|
|
541
541
|
id: string;
|
|
542
542
|
viewId: string;
|
|
@@ -1072,7 +1072,7 @@ export declare function useMagicEmitter(): {
|
|
|
1072
1072
|
} & Omit<object, keyof import("../../../MagicToast/src/types/index.js").ToastEvents>, "collision">, keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents>, keyof import("../../../MagicMenu/src/types/index.js").MenuEvents>, keyof import("../../../MagicModal/src/types/index.js").ModalEvents>, keyof import("../../../MagicDrawer/src/types/index.js").DrawerEvents>, keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents>, keyof import("../../../MagicCookie/src/types/index.js").CookieEvents>, keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>>): void;
|
|
1073
1073
|
};
|
|
1074
1074
|
emit: {
|
|
1075
|
-
<Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents |
|
|
1075
|
+
<Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, event: ({
|
|
1076
1076
|
beforeEnter: string | {
|
|
1077
1077
|
id: string;
|
|
1078
1078
|
viewId: string;
|
|
@@ -1339,7 +1339,7 @@ export declare function useMagicEmitter(): {
|
|
|
1339
1339
|
leave: string;
|
|
1340
1340
|
afterLeave: string;
|
|
1341
1341
|
} & Omit<object, keyof import("../../../MagicToast/src/types/index.js").ToastEvents>, "collision">, keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents>, keyof import("../../../MagicMenu/src/types/index.js").MenuEvents>, keyof import("../../../MagicModal/src/types/index.js").ModalEvents>, keyof import("../../../MagicDrawer/src/types/index.js").DrawerEvents>, keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents>, keyof import("../../../MagicCookie/src/types/index.js").CookieEvents>, keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>)[Key]): void;
|
|
1342
|
-
<Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents |
|
|
1342
|
+
<Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: undefined extends ({
|
|
1343
1343
|
beforeEnter: string | {
|
|
1344
1344
|
id: string;
|
|
1345
1345
|
viewId: string;
|
|
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<MagicMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
enter: () => any;
|
|
14
13
|
click: (event: MouseEvent) => any;
|
|
14
|
+
enter: () => any;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<MagicMenuItemProps> & Readonly<{
|
|
16
|
-
onEnter?: (() => any) | undefined;
|
|
17
16
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
17
|
+
onEnter?: (() => any) | undefined;
|
|
18
18
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<MagicMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
enter: () => any;
|
|
14
13
|
click: (event: MouseEvent) => any;
|
|
14
|
+
enter: () => any;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<MagicMenuItemProps> & Readonly<{
|
|
16
|
-
onEnter?: (() => any) | undefined;
|
|
17
16
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
17
|
+
onEnter?: (() => any) | undefined;
|
|
18
18
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
3
|
ref="el"
|
|
4
4
|
:as-child="asChild"
|
|
5
5
|
:data-id="id"
|
|
6
6
|
class="magic-menu-provider"
|
|
7
7
|
>
|
|
8
8
|
<slot />
|
|
9
|
-
</primitive>
|
|
9
|
+
</vue-primitive>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script setup>
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
onBeforeUnmount
|
|
20
20
|
} from "vue";
|
|
21
21
|
import { onClickOutside, onKeyStroke, usePointer } from "@vueuse/core";
|
|
22
|
-
import {
|
|
22
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
23
23
|
import { defu } from "defu";
|
|
24
24
|
import { useMenuState } from "../composables/private/useMenuState";
|
|
25
25
|
import { useMenuView } from "../composables/private/useMenuView";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
3
|
class="magic-menu-remote"
|
|
4
4
|
:data-id="`${channelId}-remote`"
|
|
5
5
|
:data-disabled="disabled"
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
@mouseenter="onMouseenter"
|
|
10
10
|
>
|
|
11
11
|
<slot :channel-active="channel?.active" :remote-disabled="disabled" />
|
|
12
|
-
</primitive>
|
|
12
|
+
</vue-primitive>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script setup>
|
|
16
16
|
import { computed, inject, watch } from "vue";
|
|
17
|
-
import {
|
|
17
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
18
18
|
import {
|
|
19
19
|
useMagicError
|
|
20
20
|
} from "@maas/vue-equipment/plugins/MagicError";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<primitive
|
|
2
|
+
<vue-primitive
|
|
3
3
|
ref="el"
|
|
4
4
|
:data-id="`${mappedViewId}-trigger`"
|
|
5
5
|
:data-active="view?.active"
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
@mouseenter="onMouseenter"
|
|
13
13
|
>
|
|
14
14
|
<slot :view-active="view?.active" :trigger-disabled="mappedDisabled" />
|
|
15
|
-
</primitive>
|
|
15
|
+
</vue-primitive>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script setup>
|
|
19
19
|
import { computed, inject, useTemplateRef, toValue, watch } from "vue";
|
|
20
|
-
import {
|
|
20
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
21
21
|
import {
|
|
22
22
|
useMagicError
|
|
23
23
|
} from "@maas/vue-equipment/plugins/MagicError";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComputedRef, type MaybeRef, type Ref } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { VuePrimitive } from '@maas/vue-primitive';
|
|
3
3
|
import type { Interaction } from '../../types/index.js';
|
|
4
4
|
type UseMenuTriggerArgs = {
|
|
5
5
|
instanceId: MaybeRef<string>;
|
|
@@ -7,7 +7,7 @@ type UseMenuTriggerArgs = {
|
|
|
7
7
|
itemId?: string;
|
|
8
8
|
mappedDisabled: ComputedRef<boolean>;
|
|
9
9
|
mappedTrigger: ComputedRef<Interaction[]>;
|
|
10
|
-
elRef: Ref<InstanceType<typeof
|
|
10
|
+
elRef: Ref<InstanceType<typeof VuePrimitive> | null>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useMenuTrigger(args: UseMenuTriggerArgs): {
|
|
13
13
|
onMouseenter: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {} from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { VuePrimitive } from "@maas/vue-primitive";
|
|
3
3
|
import { useMagicKeys, useFocus } from "@vueuse/core";
|
|
4
4
|
import { useMenuView } from "./useMenuView.mjs";
|
|
5
5
|
import { useMenuState } from "./useMenuState.mjs";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "Our Frontend Toolkit, Free and Open Source",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.42",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Robin Scholz",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@floating-ui/vue": "^1",
|
|
61
61
|
"@maas/magic-timer": "^1",
|
|
62
62
|
"@maas/vue-autosize": "^1",
|
|
63
|
-
"@maas/vue-primitive": "^1",
|
|
63
|
+
"@maas/vue-primitive": "^1.4",
|
|
64
64
|
"@nuxt/kit": ">=3",
|
|
65
65
|
"@vueuse/core": ">=12",
|
|
66
66
|
"@vueuse/integrations": ">=12",
|