@maas/vue-equipment 1.0.0-beta.1 → 1.0.0-beta.10
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/README.md +2 -2
- package/dist/composables/index.d.ts +5 -5
- package/dist/composables/index.js +23 -13
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +9 -2
- package/dist/plugins/.turbo/turbo-lint.log +1 -9
- package/dist/plugins/MagicAccordion/demo/data/footer.json +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +33 -22
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +2 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +12 -21
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +15 -13
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +23 -59
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +2 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +17 -22
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +11 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +24 -13
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +0 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +29 -28
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +5 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +7 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +7 -6
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +25 -60
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +15 -22
- package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +13 -22
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +9 -21
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +21 -12
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +18 -24
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +94 -23
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +9 -5
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +6 -4
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +54 -19
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +4 -4
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +33 -24
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +165 -24
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +34 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.mjs +28 -10
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +16 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +15 -15
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +14 -25
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +8 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +4 -5
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +18 -21
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +3 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +41 -24
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +5 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +40 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +3 -14
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +31 -28
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +19 -8
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +28 -38
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +19 -23
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +29 -19
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +27 -60
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +15 -22
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +15 -5
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +4 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +35 -15
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +18 -6
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.mjs +2 -2
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +9 -9
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +44 -22
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +14 -14
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -10
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +2 -2
- package/dist/plugins/MagicPie/index.d.ts +7 -0
- package/dist/plugins/MagicPie/index.mjs +8 -0
- package/dist/plugins/MagicPie/nuxt.d.ts +2 -0
- package/dist/plugins/MagicPie/nuxt.mjs +23 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +202 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +7 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.d.ts +6 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +33 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.d.ts +13 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.mjs +43 -0
- package/dist/plugins/MagicPie/src/types/index.d.ts +9 -0
- package/dist/plugins/MagicPie/src/types/index.mjs +0 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +14 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +32 -38
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +27 -26
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +19 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +29 -14
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +13 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +23 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +24 -25
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +61 -33
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +10 -10
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +15 -9
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +13 -13
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +18 -11
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +6 -6
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +4 -4
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +20 -20
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +17 -8
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +11 -11
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +45 -37
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +18 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +13 -24
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +3 -3
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +14 -4
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +23 -29
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -10
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +8 -11
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +24 -23
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +2 -2
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +5 -5
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +22 -22
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +33 -15
- package/dist/plugins/MagicToast/src/composables/useMagicToast.d.ts +1 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +10 -2
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/utils/index.d.ts +9 -4
- package/dist/utils/index.js +39 -3
- package/dist/utils/index.js.map +1 -1
- package/package.json +16 -7
|
@@ -1,32 +1,27 @@
|
|
|
1
|
+
import { Primitive } from '@maas/vue-primitive';
|
|
1
2
|
interface MagicAccordionViewProps {
|
|
2
3
|
id?: string;
|
|
3
4
|
asChild?: boolean;
|
|
4
5
|
active?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {};
|
|
14
|
-
rootEl: any;
|
|
7
|
+
declare const mappedId: import("vue").ComputedRef<string>;
|
|
8
|
+
declare const view: import("../types").AccordionView;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_6: {
|
|
11
|
+
viewActive: boolean;
|
|
15
12
|
};
|
|
16
|
-
type
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
14
|
+
default?: (props: typeof __VLS_6) => any;
|
|
15
|
+
}>;
|
|
16
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicAccordionViewProps, {
|
|
17
|
+
Primitive: typeof Primitive;
|
|
18
|
+
mappedId: typeof mappedId;
|
|
19
|
+
view: typeof view;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicAccordionViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
23
|
export default _default;
|
|
20
|
-
type
|
|
21
|
-
type __VLS_TypePropsToOption<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
25
|
new (): {
|
|
31
26
|
$slots: S;
|
|
32
27
|
};
|
|
@@ -6,7 +6,7 @@ interface UseAccordionTriggerArgs {
|
|
|
6
6
|
viewId: string;
|
|
7
7
|
trigger: Interaction;
|
|
8
8
|
disabled: MaybeRef<boolean>;
|
|
9
|
-
elRef: Ref<InstanceType<typeof Primitive> |
|
|
9
|
+
elRef: Ref<InstanceType<typeof Primitive> | null>;
|
|
10
10
|
}
|
|
11
11
|
export declare function useAccordionTrigger(args: UseAccordionTriggerArgs): {
|
|
12
12
|
onMouseenter: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InjectionKey, MaybeRef } from 'vue';
|
|
1
|
+
import type { InjectionKey, MaybeRef, Ref } from 'vue';
|
|
2
2
|
declare const MagicAccordionInstanceId: InjectionKey<MaybeRef<string>>;
|
|
3
3
|
declare const MagicAccordionViewId: InjectionKey<string>;
|
|
4
|
-
declare const MagicAccordionViewActive: InjectionKey<
|
|
4
|
+
declare const MagicAccordionViewActive: InjectionKey<Ref<boolean>>;
|
|
5
5
|
export { MagicAccordionInstanceId, MagicAccordionViewId, MagicAccordionViewActive, };
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, vShow as _vShow, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, Teleport as _Teleport, createBlock as _createBlock } from "vue";
|
|
4
4
|
const _hoisted_1 = ["data-id", "data-idle"];
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ref,
|
|
7
|
+
inject,
|
|
8
|
+
watch,
|
|
9
|
+
nextTick,
|
|
10
|
+
provide,
|
|
11
|
+
computed,
|
|
12
|
+
useTemplateRef
|
|
13
|
+
} from "vue";
|
|
6
14
|
import { useMagicKeys } from "@vueuse/core";
|
|
7
15
|
import { useCommandItem } from "../composables/private/useCommandItem";
|
|
8
16
|
import { useCommandScroll } from "../composables/private/useCommandScroll";
|
|
@@ -25,7 +33,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
25
33
|
setup(__props) {
|
|
26
34
|
const instanceId = inject(MagicCommandInstanceId, void 0);
|
|
27
35
|
const viewId = inject(MagicCommandViewId, void 0);
|
|
28
|
-
const elRef =
|
|
36
|
+
const elRef = useTemplateRef("el");
|
|
29
37
|
if (!instanceId) {
|
|
30
38
|
throw new Error(
|
|
31
39
|
"MagicCommandContent must be nested inside MagicCommandProvider"
|
|
@@ -151,8 +159,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
151
159
|
}, {
|
|
152
160
|
default: _withCtx(() => [
|
|
153
161
|
isActive.value ? _withDirectives((_openBlock(), _createElementBlock("div", _mergeProps({
|
|
154
|
-
|
|
155
|
-
ref: elRef,
|
|
162
|
+
ref: "el",
|
|
156
163
|
key: `${_unref(viewId)}-content`,
|
|
157
164
|
class: "magic-command-content",
|
|
158
165
|
"data-id": `${_unref(viewId)}-content`,
|
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
import '@maas/vue-equipment/utils/css/animations/fade-in.css';
|
|
2
2
|
import '@maas/vue-equipment/utils/css/animations/fade-out.css';
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
3
|
+
declare const viewId: string | undefined;
|
|
4
|
+
declare const state: import("../types").CommandState;
|
|
5
|
+
declare const isActive: import("vue").ComputedRef<false | HTMLElement | null | undefined>;
|
|
6
|
+
declare const isIdle: import("vue").ComputedRef<boolean>;
|
|
7
|
+
declare const onBeforeEnter: () => void, onEnter: () => void, onAfterEnter: () => void, onBeforeLeave: () => void, onLeave: () => void, onAfterLeave: () => void;
|
|
8
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
9
|
+
declare var __VLS_9: {};
|
|
10
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
11
|
+
default?: (props: typeof __VLS_9) => any;
|
|
12
|
+
}>;
|
|
13
|
+
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
14
|
+
viewId: typeof viewId;
|
|
15
|
+
state: typeof state;
|
|
16
|
+
isActive: typeof isActive;
|
|
17
|
+
isIdle: typeof isIdle;
|
|
18
|
+
onBeforeEnter: typeof onBeforeEnter;
|
|
19
|
+
onEnter: typeof onEnter;
|
|
20
|
+
onAfterEnter: typeof onAfterEnter;
|
|
21
|
+
onBeforeLeave: typeof onBeforeLeave;
|
|
22
|
+
onLeave: typeof onLeave;
|
|
23
|
+
onAfterLeave: typeof onAfterLeave;
|
|
24
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
25
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
-
declare const _default:
|
|
26
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
27
|
export default _default;
|
|
17
|
-
type
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
29
|
new (): {
|
|
19
30
|
$slots: S;
|
|
20
31
|
};
|
|
@@ -2,28 +2,19 @@ import type { MagicCommandDrawerOptions } from '../types/index.js';
|
|
|
2
2
|
interface MagicCommandDrawerProps {
|
|
3
3
|
options?: MagicCommandDrawerOptions;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
15
|
-
declare const _default:
|
|
5
|
+
declare const instanceId: import("vue").MaybeRef<string>;
|
|
6
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
|
+
declare var __VLS_6: {};
|
|
8
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
9
|
+
default?: (props: typeof __VLS_6) => any;
|
|
10
|
+
}>;
|
|
11
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicCommandDrawerProps, {
|
|
12
|
+
instanceId: typeof instanceId;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
16
|
export default _default;
|
|
17
|
-
type
|
|
18
|
-
type __VLS_TypePropsToOption<T> = {
|
|
19
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
-
} : {
|
|
22
|
-
type: import('vue').PropType<T[K]>;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
18
|
new (): {
|
|
28
19
|
$slots: S;
|
|
29
20
|
};
|
|
@@ -7,7 +7,6 @@ const _hoisted_2 = {
|
|
|
7
7
|
class: "magic-command-item__pointer-guard"
|
|
8
8
|
};
|
|
9
9
|
import {
|
|
10
|
-
ref,
|
|
11
10
|
computed,
|
|
12
11
|
inject,
|
|
13
12
|
provide,
|
|
@@ -38,7 +37,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
38
37
|
const instanceId = inject(MagicCommandInstanceId, void 0);
|
|
39
38
|
const viewId = inject(MagicCommandViewId, void 0);
|
|
40
39
|
const contentId = inject(MagicCommandContentId, void 0);
|
|
41
|
-
const elRef = ref(void 0);
|
|
42
40
|
if (!instanceId) {
|
|
43
41
|
throw new Error("MagicCommandItem must be nested inside MagicCommandProvider");
|
|
44
42
|
}
|
|
@@ -84,8 +82,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
84
82
|
});
|
|
85
83
|
return (_ctx, _cache) => {
|
|
86
84
|
return _openBlock(), _createElementBlock("div", {
|
|
87
|
-
ref_key: "elRef",
|
|
88
|
-
ref: elRef,
|
|
89
85
|
class: "magic-command-item",
|
|
90
86
|
"data-id": mappedId.value,
|
|
91
87
|
"data-disabled": _ctx.disabled,
|
|
@@ -3,37 +3,38 @@ interface MagicCommandItemProps {
|
|
|
3
3
|
initial?: boolean;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
elRef: HTMLDivElement;
|
|
16
|
-
};
|
|
17
|
-
rootEl: HTMLDivElement;
|
|
6
|
+
declare const mappedId: import("vue").ComputedRef<string>;
|
|
7
|
+
declare const item: import("../types").CommandItem;
|
|
8
|
+
declare const pointerDisabled: import("vue").ComputedRef<boolean>;
|
|
9
|
+
declare function guardedSelect(): void;
|
|
10
|
+
declare function onClick(event: MouseEvent): void;
|
|
11
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
12
|
+
declare var __VLS_1: {
|
|
13
|
+
itemActive: boolean;
|
|
14
|
+
itemDisabled: boolean;
|
|
18
15
|
};
|
|
19
|
-
type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
17
|
+
default?: (props: typeof __VLS_1) => any;
|
|
18
|
+
}>;
|
|
19
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicCommandItemProps, {
|
|
20
|
+
mappedId: typeof mappedId;
|
|
21
|
+
item: typeof item;
|
|
22
|
+
pointerDisabled: typeof pointerDisabled;
|
|
23
|
+
guardedSelect: typeof guardedSelect;
|
|
24
|
+
onClick: typeof onClick;
|
|
25
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
26
|
+
click: (event: MouseEvent) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
|
|
28
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
29
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
31
|
+
click: (event: MouseEvent) => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
|
|
23
33
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
24
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
25
|
-
declare const _default:
|
|
34
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
36
|
export default _default;
|
|
27
|
-
type
|
|
28
|
-
type __VLS_TypePropsToOption<T> = {
|
|
29
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
30
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
31
|
-
} : {
|
|
32
|
-
type: import('vue').PropType<T[K]>;
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
38
|
new (): {
|
|
38
39
|
$slots: S;
|
|
39
40
|
};
|
|
@@ -2,28 +2,19 @@ import type { MagicCommandModalOptions } from '../types/index.js';
|
|
|
2
2
|
interface MagicCommandProps {
|
|
3
3
|
options?: MagicCommandModalOptions;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
15
|
-
declare const _default:
|
|
5
|
+
declare const instanceId: import("vue").MaybeRef<string>;
|
|
6
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
|
+
declare var __VLS_6: {};
|
|
8
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
9
|
+
default?: (props: typeof __VLS_6) => any;
|
|
10
|
+
}>;
|
|
11
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicCommandProps, {
|
|
12
|
+
instanceId: typeof instanceId;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicCommandProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
16
|
export default _default;
|
|
17
|
-
type
|
|
18
|
-
type __VLS_TypePropsToOption<T> = {
|
|
19
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
-
} : {
|
|
22
|
-
type: import('vue').PropType<T[K]>;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
18
|
new (): {
|
|
28
19
|
$slots: S;
|
|
29
20
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { renderSlot as _renderSlot, unref as _unref, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
4
|
-
import {
|
|
4
|
+
import { shallowRef, provide, watch, onBeforeUnmount } from "vue";
|
|
5
5
|
import { useMagicKeys, usePointer } from "@vueuse/core";
|
|
6
6
|
import { Primitive } from "@maas/vue-primitive";
|
|
7
7
|
import { createDefu } from "defu";
|
|
@@ -17,7 +17,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
17
17
|
options: { type: Object, required: false, default: () => ({}) }
|
|
18
18
|
},
|
|
19
19
|
setup(__props) {
|
|
20
|
-
const elRef = ref(void 0);
|
|
21
20
|
const customDefu = createDefu((obj, key, value) => {
|
|
22
21
|
if (key === "open" || key === "close" || key === "next" || key === "prev") {
|
|
23
22
|
obj[key] = value;
|
|
@@ -27,8 +26,8 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
27
26
|
const mappedOptions = customDefu(__props.options, defaultOptions);
|
|
28
27
|
const { initializeState, deleteState } = useCommandState(__props.id);
|
|
29
28
|
const state = initializeState(mappedOptions);
|
|
30
|
-
const lastX =
|
|
31
|
-
const lastY =
|
|
29
|
+
const lastX = shallowRef(0);
|
|
30
|
+
const lastY = shallowRef(0);
|
|
32
31
|
const { x, y } = usePointer();
|
|
33
32
|
watch(
|
|
34
33
|
() => state?.input.type,
|
|
@@ -74,8 +73,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
74
73
|
provide(MagicCommandProviderOptions, mappedOptions);
|
|
75
74
|
return (_ctx, _cache) => {
|
|
76
75
|
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
77
|
-
|
|
78
|
-
ref: elRef,
|
|
76
|
+
"data-id": _ctx.id,
|
|
79
77
|
"as-child": _ctx.asChild,
|
|
80
78
|
class: "magic-command-provider"
|
|
81
79
|
}, {
|
|
@@ -84,7 +82,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
84
82
|
]),
|
|
85
83
|
_: 3
|
|
86
84
|
/* FORWARDED */
|
|
87
|
-
}, 8, ["as-child"]);
|
|
85
|
+
}, 8, ["data-id", "as-child"]);
|
|
88
86
|
};
|
|
89
87
|
}
|
|
90
88
|
});
|
|
@@ -1,69 +1,23 @@
|
|
|
1
1
|
import { type MaybeRef } from 'vue';
|
|
2
|
+
import { Primitive } from '@maas/vue-primitive';
|
|
2
3
|
import type { MagicCommandOptions } from '../types/index.js';
|
|
3
4
|
interface MagicCommandProviderProps {
|
|
4
5
|
id: MaybeRef<string>;
|
|
5
6
|
asChild?: boolean;
|
|
6
7
|
options?: MagicCommandOptions;
|
|
7
8
|
}
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
as: {
|
|
20
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
26
|
-
asChild: boolean;
|
|
27
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
28
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
29
|
-
P: {};
|
|
30
|
-
B: {};
|
|
31
|
-
D: {};
|
|
32
|
-
C: {};
|
|
33
|
-
M: {};
|
|
34
|
-
Defaults: {};
|
|
35
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
36
|
-
asChild: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
as: {
|
|
41
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
42
|
-
default: string;
|
|
43
|
-
};
|
|
44
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}>, {}, {}, {}, {
|
|
47
|
-
asChild: boolean;
|
|
48
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
49
|
-
}> | null;
|
|
50
|
-
};
|
|
51
|
-
rootEl: any;
|
|
52
|
-
};
|
|
53
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
54
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCommandProviderProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCommandProviderProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
55
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_6: {};
|
|
11
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
12
|
+
default?: (props: typeof __VLS_6) => any;
|
|
13
|
+
}>;
|
|
14
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicCommandProviderProps, {
|
|
15
|
+
Primitive: typeof Primitive;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicCommandProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
56
19
|
export default _default;
|
|
57
|
-
type
|
|
58
|
-
type __VLS_TypePropsToOption<T> = {
|
|
59
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
60
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
61
|
-
} : {
|
|
62
|
-
type: import('vue').PropType<T[K]>;
|
|
63
|
-
required: true;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
67
21
|
new (): {
|
|
68
22
|
$slots: S;
|
|
69
23
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
|
-
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
ref: "el",
|
|
6
|
+
class: "magic-command-renderer"
|
|
7
|
+
};
|
|
8
|
+
import { inject, onBeforeUnmount, useTemplateRef } from "vue";
|
|
5
9
|
import {
|
|
6
10
|
useMagicEmitter
|
|
7
11
|
} from "@maas/vue-equipment/plugins";
|
|
@@ -17,7 +21,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
17
21
|
"MagicCommandRenderer must be nested inside MagicCommandProvider"
|
|
18
22
|
);
|
|
19
23
|
}
|
|
20
|
-
const elRef =
|
|
24
|
+
const elRef = useTemplateRef("el");
|
|
21
25
|
const { initializeState } = useCommandState(instanceId);
|
|
22
26
|
const state = initializeState();
|
|
23
27
|
function enterCallback(payload) {
|
|
@@ -32,11 +36,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
32
36
|
return (_ctx, _cache) => {
|
|
33
37
|
return _openBlock(), _createElementBlock(
|
|
34
38
|
"div",
|
|
35
|
-
|
|
36
|
-
ref_key: "elRef",
|
|
37
|
-
ref: elRef,
|
|
38
|
-
class: "magic-command-renderer"
|
|
39
|
-
},
|
|
39
|
+
_hoisted_1,
|
|
40
40
|
null,
|
|
41
41
|
512
|
|
42
42
|
/* NEED_PATCH */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
4
|
-
import { computed, inject,
|
|
4
|
+
import { computed, inject, useTemplateRef, toValue, watch } from "vue";
|
|
5
5
|
import { Primitive } from "@maas/vue-primitive";
|
|
6
6
|
import { useCommandView } from "../composables/private/useCommandView";
|
|
7
7
|
import { useCommandTrigger } from "../composables/private/useCommandTrigger";
|
|
@@ -24,7 +24,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
24
24
|
asChild: { type: Boolean, required: false }
|
|
25
25
|
},
|
|
26
26
|
setup(__props) {
|
|
27
|
-
const elRef =
|
|
27
|
+
const elRef = useTemplateRef("el");
|
|
28
28
|
const instanceId = inject(MagicCommandInstanceId, void 0);
|
|
29
29
|
const itemActive = inject(MagicCommandItemActive, void 0);
|
|
30
30
|
const itemDisabled = inject(MagicCommandItemDisabled, void 0);
|
|
@@ -36,7 +36,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
if (!mappedViewId.value) {
|
|
39
|
-
throw new Error(
|
|
39
|
+
throw new Error(
|
|
40
|
+
"MagicCommandTrigger must be nested inside MagicCommandView or a viewId must be provided"
|
|
41
|
+
);
|
|
40
42
|
}
|
|
41
43
|
const { getView } = useCommandView(instanceId);
|
|
42
44
|
const view = getView(mappedViewId.value);
|
|
@@ -75,8 +77,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
75
77
|
}
|
|
76
78
|
return (_ctx, _cache) => {
|
|
77
79
|
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
78
|
-
|
|
79
|
-
ref: elRef,
|
|
80
|
+
ref: "el",
|
|
80
81
|
"data-id": `${mappedViewId.value}-trigger`,
|
|
81
82
|
"data-active": mappedActive.value,
|
|
82
83
|
"data-disabled": mappedDisabled.value,
|
|
@@ -104,7 +105,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
104
105
|
cursor: var(--magic-command-trigger-cursor, pointer);
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
.magic-menu-trigger
|
|
108
|
+
.magic-menu-trigger[data-disabled='true'] {
|
|
108
109
|
pointer-events: none;
|
|
109
110
|
}
|
|
110
111
|
</style>
|