@maas/vue-equipment 1.0.0-beta.6 → 1.0.0-beta.7
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.ts +5 -5
- package/dist/composables/index.js +14 -8
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +2 -2
- package/dist/plugins/.turbo/turbo-lint.log +2 -2
- package/dist/plugins/MagicAccordion/demo/data/footer.json +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +3 -3
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +4 -5
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +2 -2
- 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 +32 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +0 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +3 -8
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +3 -6
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +3 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +7 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +1 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +3 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +3 -3
- 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 +3 -3
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +3 -3
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +10 -12
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +3 -24
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +3 -3
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +3 -3
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +12 -15
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +20 -21
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +188 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +2 -2
- 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 +25 -0
- 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.d.ts +27 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +3 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +56 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +5 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +53 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +1 -12
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +3 -8
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +6 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +1 -85
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +3 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +3 -3
- 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 +2 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +6 -6
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +60 -0
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +2 -2
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +13 -13
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -5
- 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/MagicPlayer/src/components/MagicPlayerAudio.vue +14 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +20 -20
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +34 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +19 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +35 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +5 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +6 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +23 -24
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +73 -0
- 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/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 +4 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +7 -7
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +4 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +3 -3
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +17 -9
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +4 -9
- 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 +8 -3
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +9 -10
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -59
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +5 -8
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +3 -8
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +21 -21
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +2 -2
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -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,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
74
73
|
provide(MagicCommandProviderOptions, mappedOptions);
|
|
75
74
|
return (_ctx, _cache) => {
|
|
76
75
|
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
77
|
-
ref_key: "elRef",
|
|
78
|
-
ref: elRef,
|
|
79
76
|
"as-child": _ctx.asChild,
|
|
80
77
|
class: "magic-command-provider"
|
|
81
78
|
}, {
|
|
@@ -6,99 +6,15 @@ interface MagicCommandProviderProps {
|
|
|
6
6
|
asChild?: boolean;
|
|
7
7
|
options?: MagicCommandOptions;
|
|
8
8
|
}
|
|
9
|
-
declare const elRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
10
9
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
11
|
-
declare
|
|
12
|
-
asChild: {
|
|
13
|
-
type: BooleanConstructor;
|
|
14
|
-
default: boolean;
|
|
15
|
-
};
|
|
16
|
-
as: {
|
|
17
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
-
asChild: {
|
|
24
|
-
type: BooleanConstructor;
|
|
25
|
-
default: boolean;
|
|
26
|
-
};
|
|
27
|
-
as: {
|
|
28
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
}>>, {
|
|
32
|
-
asChild: boolean;
|
|
33
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
34
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
|
-
declare const __VLS_2: import("vue/jsx-runtime").JSX.Element & {
|
|
36
|
-
__ctx?: ({
|
|
37
|
-
attrs?: any;
|
|
38
|
-
slots?: Readonly<{
|
|
39
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
40
|
-
}> | undefined;
|
|
41
|
-
emit?: ((event: string, ...args: any[]) => void) | undefined;
|
|
42
|
-
} & {
|
|
43
|
-
props?: (Partial<{
|
|
44
|
-
asChild: boolean;
|
|
45
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
46
|
-
}> & Omit<{
|
|
47
|
-
readonly asChild: boolean;
|
|
48
|
-
readonly as: import("@maas/vue-primitive").ElementOrComponent;
|
|
49
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "asChild" | "as"> & Record<string, unknown>) | undefined;
|
|
50
|
-
expose?(exposed: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
-
asChild: {
|
|
52
|
-
type: BooleanConstructor;
|
|
53
|
-
default: boolean;
|
|
54
|
-
};
|
|
55
|
-
as: {
|
|
56
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
57
|
-
default: string;
|
|
58
|
-
};
|
|
59
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
60
|
-
[key: string]: any;
|
|
61
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
62
|
-
asChild: boolean;
|
|
63
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
64
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
65
|
-
P: {};
|
|
66
|
-
B: {};
|
|
67
|
-
D: {};
|
|
68
|
-
C: {};
|
|
69
|
-
M: {};
|
|
70
|
-
Defaults: {};
|
|
71
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
72
|
-
asChild: {
|
|
73
|
-
type: BooleanConstructor;
|
|
74
|
-
default: boolean;
|
|
75
|
-
};
|
|
76
|
-
as: {
|
|
77
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
78
|
-
default: string;
|
|
79
|
-
};
|
|
80
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
81
|
-
[key: string]: any;
|
|
82
|
-
}>, {}, {}, {}, {
|
|
83
|
-
asChild: boolean;
|
|
84
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
85
|
-
}>): void;
|
|
86
|
-
}) | undefined;
|
|
87
|
-
};
|
|
88
|
-
declare var __VLS_6: (Parameters<NonNullable<(typeof __VLS_5)["expose"]>>[0] | null);
|
|
89
|
-
declare var __VLS_7: {};
|
|
90
|
-
declare var __VLS_5: __VLS_PickFunctionalComponentCtx<typeof __VLS_0, typeof __VLS_2>;
|
|
10
|
+
declare var __VLS_6: {};
|
|
91
11
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
92
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_6) => any;
|
|
93
13
|
}>;
|
|
94
|
-
type __VLS_TemplateRefs = {
|
|
95
|
-
elRef: typeof __VLS_6;
|
|
96
|
-
};
|
|
97
14
|
declare const __VLS_self: import("vue").DefineComponent<MagicCommandProviderProps, {
|
|
98
15
|
Primitive: typeof Primitive;
|
|
99
|
-
elRef: typeof elRef;
|
|
100
16
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
101
|
-
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,
|
|
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>;
|
|
102
18
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
103
19
|
export default _default;
|
|
104
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -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,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
elRef: typeof __VLS_nativeElements['div'];
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, __VLS_TemplateRefs, HTMLDivElement>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
2
|
export default _default;
|
|
@@ -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);
|
|
@@ -75,8 +75,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
75
75
|
}
|
|
76
76
|
return (_ctx, _cache) => {
|
|
77
77
|
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
78
|
-
|
|
79
|
-
ref: elRef,
|
|
78
|
+
ref: "el",
|
|
80
79
|
"data-id": `${mappedViewId.value}-trigger`,
|
|
81
80
|
"data-active": mappedActive.value,
|
|
82
81
|
"data-disabled": mappedDisabled.value,
|
|
@@ -8,175 +8,21 @@ interface MagicCommandTriggerProps {
|
|
|
8
8
|
trigger?: Interaction[];
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare const elRef: import("vue").Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
-
asChild: {
|
|
13
|
-
type: BooleanConstructor;
|
|
14
|
-
default: boolean;
|
|
15
|
-
};
|
|
16
|
-
as: {
|
|
17
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
23
|
-
asChild: boolean;
|
|
24
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
25
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
26
|
-
P: {};
|
|
27
|
-
B: {};
|
|
28
|
-
D: {};
|
|
29
|
-
C: {};
|
|
30
|
-
M: {};
|
|
31
|
-
Defaults: {};
|
|
32
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
-
asChild: {
|
|
34
|
-
type: BooleanConstructor;
|
|
35
|
-
default: boolean;
|
|
36
|
-
};
|
|
37
|
-
as: {
|
|
38
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
39
|
-
default: string;
|
|
40
|
-
};
|
|
41
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
}>, {}, {}, {}, {
|
|
44
|
-
asChild: boolean;
|
|
45
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
46
|
-
}> | undefined, import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
-
asChild: {
|
|
48
|
-
type: BooleanConstructor;
|
|
49
|
-
default: boolean;
|
|
50
|
-
};
|
|
51
|
-
as: {
|
|
52
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
53
|
-
default: string;
|
|
54
|
-
};
|
|
55
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
56
|
-
[key: string]: any;
|
|
57
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
58
|
-
asChild: boolean;
|
|
59
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
60
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
61
|
-
P: {};
|
|
62
|
-
B: {};
|
|
63
|
-
D: {};
|
|
64
|
-
C: {};
|
|
65
|
-
M: {};
|
|
66
|
-
Defaults: {};
|
|
67
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
68
|
-
asChild: {
|
|
69
|
-
type: BooleanConstructor;
|
|
70
|
-
default: boolean;
|
|
71
|
-
};
|
|
72
|
-
as: {
|
|
73
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
74
|
-
default: string;
|
|
75
|
-
};
|
|
76
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
77
|
-
[key: string]: any;
|
|
78
|
-
}>, {}, {}, {}, {
|
|
79
|
-
asChild: boolean;
|
|
80
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
81
|
-
}> | undefined>;
|
|
82
11
|
declare const mappedViewId: import("vue").ComputedRef<string | undefined>;
|
|
83
12
|
declare const view: import("../types").CommandView | undefined;
|
|
84
13
|
declare const mappedActive: import("vue").ComputedRef<boolean>;
|
|
85
14
|
declare const mappedDisabled: import("vue").ComputedRef<boolean>;
|
|
86
15
|
declare const onMouseenter: () => Promise<void>, onClick: (e: MouseEvent) => Promise<void>;
|
|
87
16
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
88
|
-
declare
|
|
89
|
-
asChild: {
|
|
90
|
-
type: BooleanConstructor;
|
|
91
|
-
default: boolean;
|
|
92
|
-
};
|
|
93
|
-
as: {
|
|
94
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
95
|
-
default: string;
|
|
96
|
-
};
|
|
97
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
98
|
-
[key: string]: any;
|
|
99
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
|
-
asChild: {
|
|
101
|
-
type: BooleanConstructor;
|
|
102
|
-
default: boolean;
|
|
103
|
-
};
|
|
104
|
-
as: {
|
|
105
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
106
|
-
default: string;
|
|
107
|
-
};
|
|
108
|
-
}>>, {
|
|
109
|
-
asChild: boolean;
|
|
110
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
111
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
112
|
-
declare const __VLS_2: import("vue/jsx-runtime").JSX.Element & {
|
|
113
|
-
__ctx?: ({
|
|
114
|
-
attrs?: any;
|
|
115
|
-
slots?: Readonly<{
|
|
116
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
117
|
-
}> | undefined;
|
|
118
|
-
emit?: ((event: string, ...args: any[]) => void) | undefined;
|
|
119
|
-
} & {
|
|
120
|
-
props?: (Partial<{
|
|
121
|
-
asChild: boolean;
|
|
122
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
123
|
-
}> & Omit<{
|
|
124
|
-
readonly asChild: boolean;
|
|
125
|
-
readonly as: import("@maas/vue-primitive").ElementOrComponent;
|
|
126
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "asChild" | "as"> & Record<string, unknown>) | undefined;
|
|
127
|
-
expose?(exposed: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
128
|
-
asChild: {
|
|
129
|
-
type: BooleanConstructor;
|
|
130
|
-
default: boolean;
|
|
131
|
-
};
|
|
132
|
-
as: {
|
|
133
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
134
|
-
default: string;
|
|
135
|
-
};
|
|
136
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
137
|
-
[key: string]: any;
|
|
138
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
139
|
-
asChild: boolean;
|
|
140
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
141
|
-
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
142
|
-
P: {};
|
|
143
|
-
B: {};
|
|
144
|
-
D: {};
|
|
145
|
-
C: {};
|
|
146
|
-
M: {};
|
|
147
|
-
Defaults: {};
|
|
148
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
149
|
-
asChild: {
|
|
150
|
-
type: BooleanConstructor;
|
|
151
|
-
default: boolean;
|
|
152
|
-
};
|
|
153
|
-
as: {
|
|
154
|
-
type: import("vue").PropType<import("@maas/vue-primitive").ElementOrComponent>;
|
|
155
|
-
default: string;
|
|
156
|
-
};
|
|
157
|
-
}>>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
}>, {}, {}, {}, {
|
|
160
|
-
asChild: boolean;
|
|
161
|
-
as: import("@maas/vue-primitive").ElementOrComponent;
|
|
162
|
-
}>): void;
|
|
163
|
-
}) | undefined;
|
|
164
|
-
};
|
|
165
|
-
declare var __VLS_6: (Parameters<NonNullable<(typeof __VLS_5)["expose"]>>[0] | null);
|
|
166
|
-
declare var __VLS_10: {
|
|
17
|
+
declare var __VLS_12: {
|
|
167
18
|
viewActive: boolean | undefined;
|
|
168
19
|
triggerDisabled: boolean;
|
|
169
20
|
};
|
|
170
|
-
declare var __VLS_5: __VLS_PickFunctionalComponentCtx<typeof __VLS_0, typeof __VLS_2>;
|
|
171
21
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
172
|
-
default?: (props: typeof
|
|
22
|
+
default?: (props: typeof __VLS_12) => any;
|
|
173
23
|
}>;
|
|
174
|
-
type __VLS_TemplateRefs = {
|
|
175
|
-
elRef: typeof __VLS_6;
|
|
176
|
-
};
|
|
177
24
|
declare const __VLS_self: import("vue").DefineComponent<MagicCommandTriggerProps, {
|
|
178
25
|
Primitive: typeof Primitive;
|
|
179
|
-
elRef: typeof elRef;
|
|
180
26
|
mappedViewId: typeof mappedViewId;
|
|
181
27
|
view: typeof view;
|
|
182
28
|
mappedActive: typeof mappedActive;
|
|
@@ -184,7 +30,7 @@ declare const __VLS_self: import("vue").DefineComponent<MagicCommandTriggerProps
|
|
|
184
30
|
onMouseenter: typeof onMouseenter;
|
|
185
31
|
onClick: typeof onClick;
|
|
186
32
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
187
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicCommandTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false,
|
|
33
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicCommandTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
188
34
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
189
35
|
export default _default;
|
|
190
36
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -5,17 +5,17 @@ interface MagicCommandViewProps {
|
|
|
5
5
|
declare const mappedId: import("vue").ComputedRef<string>;
|
|
6
6
|
declare const view: import("../types").CommandView;
|
|
7
7
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_1: {
|
|
9
9
|
viewActive: boolean;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_1) => any;
|
|
13
13
|
}>;
|
|
14
14
|
declare const __VLS_self: import("vue").DefineComponent<MagicCommandViewProps, {
|
|
15
15
|
mappedId: typeof mappedId;
|
|
16
16
|
view: typeof view;
|
|
17
17
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicCommandViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicCommandViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
20
20
|
export default _default;
|
|
21
21
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
1
|
+
import { type MaybeRef, type Ref } from 'vue';
|
|
2
2
|
interface IsElementAboveArgs {
|
|
3
3
|
element: MaybeRef<HTMLElement>;
|
|
4
4
|
ancestor?: HTMLElement;
|
|
@@ -15,7 +15,7 @@ interface ScrollInFromBottomArgs {
|
|
|
15
15
|
element: MaybeRef<HTMLElement>;
|
|
16
16
|
ancestor?: HTMLElement;
|
|
17
17
|
}
|
|
18
|
-
export declare function useCommandScroll(parent:
|
|
18
|
+
export declare function useCommandScroll(parent: Ref<HTMLElement | null>): {
|
|
19
19
|
findElement: (id: string) => HTMLElement | null;
|
|
20
20
|
findScrollableAncestor: (element: HTMLElement | null) => HTMLElement | undefined;
|
|
21
21
|
isElementAbove: (args: IsElementAboveArgs) => boolean;
|
|
@@ -8,7 +8,7 @@ type UseCommandTriggerArgs = {
|
|
|
8
8
|
mappedActive?: ComputedRef<boolean>;
|
|
9
9
|
trigger: Interaction[];
|
|
10
10
|
action: Action;
|
|
11
|
-
elRef: Ref<InstanceType<typeof Primitive> |
|
|
11
|
+
elRef: Ref<InstanceType<typeof Primitive> | null>;
|
|
12
12
|
};
|
|
13
13
|
export declare function useCommandTrigger(args: UseCommandTriggerArgs): {
|
|
14
14
|
onMouseenter: () => Promise<void>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { InjectionKey, MaybeRef } from 'vue';
|
|
1
|
+
import type { InjectionKey, MaybeRef, Ref } from 'vue';
|
|
2
2
|
import type { MagicCommandOptions } from '../types/index.js';
|
|
3
3
|
declare const MagicCommandInstanceId: InjectionKey<MaybeRef<string>>;
|
|
4
4
|
declare const MagicCommandParentTree: InjectionKey<string[]>;
|
|
5
5
|
declare const MagicCommandViewId: InjectionKey<string>;
|
|
6
|
-
declare const MagicCommandViewActive: InjectionKey<
|
|
6
|
+
declare const MagicCommandViewActive: InjectionKey<Ref<boolean>>;
|
|
7
7
|
declare const MagicCommandContentId: InjectionKey<string>;
|
|
8
8
|
declare const MagicCommandItemId: InjectionKey<string>;
|
|
9
|
-
declare const MagicCommandItemActive: InjectionKey<
|
|
10
|
-
declare const MagicCommandItemDisabled: InjectionKey<
|
|
9
|
+
declare const MagicCommandItemActive: InjectionKey<Ref<boolean>>;
|
|
10
|
+
declare const MagicCommandItemDisabled: InjectionKey<Ref<boolean>>;
|
|
11
11
|
declare const MagicCommandProviderOptions: InjectionKey<MagicCommandOptions>;
|
|
12
12
|
export { MagicCommandInstanceId, MagicCommandParentTree, MagicCommandViewId, MagicCommandViewActive, MagicCommandContentId, MagicCommandItemId, MagicCommandItemActive, MagicCommandItemDisabled, MagicCommandProviderOptions, };
|
|
@@ -5,16 +5,16 @@ interface MagicCookieItemProps {
|
|
|
5
5
|
}
|
|
6
6
|
declare const item: import("../types").CookieItem;
|
|
7
7
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_1: {
|
|
9
9
|
item: import("../types").CookieItem;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_1) => any;
|
|
13
13
|
}>;
|
|
14
14
|
declare const __VLS_self: import("vue").DefineComponent<MagicCookieItemProps, {
|
|
15
15
|
item: typeof item;
|
|
16
16
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicCookieItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicCookieItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
19
|
export default _default;
|
|
20
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -4,11 +4,11 @@ import '@maas/vue-equipment/utils/css/animations/auto-size-out.css';
|
|
|
4
4
|
declare const state: import("../types").CookieState;
|
|
5
5
|
declare const onBeforeEnter: () => void, onEnter: () => void, onAfterEnter: () => Promise<void>, onBeforeLeave: () => void, onLeave: () => void, onAfterLeave: () => void;
|
|
6
6
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
|
-
declare var
|
|
7
|
+
declare var __VLS_18: {
|
|
8
8
|
viewActive: boolean;
|
|
9
9
|
};
|
|
10
10
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
11
|
-
default?: (props: typeof
|
|
11
|
+
default?: (props: typeof __VLS_18) => any;
|
|
12
12
|
}>;
|
|
13
13
|
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
14
14
|
AutoSize: typeof AutoSize;
|
|
@@ -20,7 +20,7 @@ declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
|
20
20
|
onLeave: typeof onLeave;
|
|
21
21
|
onAfterLeave: typeof onAfterLeave;
|
|
22
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
|
-
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
23
|
+
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>;
|
|
24
24
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
25
25
|
export default _default;
|
|
26
26
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InjectionKey, MaybeRef } from 'vue';
|
|
1
|
+
import type { InjectionKey, MaybeRef, Ref } from 'vue';
|
|
2
2
|
declare const MagicCookieInstanceId: InjectionKey<MaybeRef<string>>;
|
|
3
3
|
declare const MagicCookieItemId: InjectionKey<string>;
|
|
4
|
-
declare const MagicCookieItemActive: InjectionKey<
|
|
4
|
+
declare const MagicCookieItemActive: InjectionKey<Ref<boolean>>;
|
|
5
5
|
export { MagicCookieInstanceId, MagicCookieItemId, MagicCookieItemActive };
|
|
@@ -3,10 +3,14 @@ import { defineComponent as _defineComponent } from "vue";
|
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, withCtx as _withCtx, createBlock as _createBlock, createElementVNode as _createElementVNode, mergeProps as _mergeProps } from "vue";
|
|
4
4
|
const _hoisted_1 = ["data-id", "data-dragging", "data-disabled"];
|
|
5
5
|
const _hoisted_2 = {
|
|
6
|
+
ref: "wrapper",
|
|
7
|
+
class: "magic-draggable__wrapper"
|
|
8
|
+
};
|
|
9
|
+
const _hoisted_3 = {
|
|
6
10
|
key: 0,
|
|
7
11
|
class: "magic-draggable__overlay"
|
|
8
12
|
};
|
|
9
|
-
import {
|
|
13
|
+
import { useTemplateRef, computed, toValue, toRefs } from "vue";
|
|
10
14
|
import { defu } from "defu";
|
|
11
15
|
import { useDraggableDrag } from "../composables/private/useDraggableDrag";
|
|
12
16
|
import { useDraggableState } from "../composables/private/useDraggableState";
|
|
@@ -22,8 +26,8 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
22
26
|
},
|
|
23
27
|
setup(__props) {
|
|
24
28
|
const mappedOptions = defu(__props.options, defaultOptions);
|
|
25
|
-
const elRef =
|
|
26
|
-
const wrapperRef =
|
|
29
|
+
const elRef = useTemplateRef("el");
|
|
30
|
+
const wrapperRef = useTemplateRef("wrapper");
|
|
27
31
|
const { initializeState } = useDraggableState(__props.id);
|
|
28
32
|
const state = initializeState();
|
|
29
33
|
const { dragging } = toRefs(state);
|
|
@@ -57,7 +61,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
57
61
|
}
|
|
58
62
|
return (_ctx, _cache) => {
|
|
59
63
|
return _openBlock(), _createElementBlock("div", _mergeProps({
|
|
60
|
-
ref: "drawerRef",
|
|
61
64
|
"data-id": toValue(_ctx.id),
|
|
62
65
|
"data-dragging": _unref(dragging),
|
|
63
66
|
"data-disabled": disabled.value,
|
|
@@ -65,15 +68,10 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
65
68
|
}, _ctx.$attrs), [
|
|
66
69
|
_createElementVNode(
|
|
67
70
|
"div",
|
|
68
|
-
|
|
69
|
-
ref_key: "wrapperRef",
|
|
70
|
-
ref: wrapperRef,
|
|
71
|
-
class: "magic-draggable__wrapper"
|
|
72
|
-
},
|
|
71
|
+
_hoisted_2,
|
|
73
72
|
[
|
|
74
73
|
(_openBlock(), _createBlock(_resolveDynamicComponent(_unref(mappedOptions).tag), {
|
|
75
|
-
|
|
76
|
-
ref: elRef,
|
|
74
|
+
ref: "el",
|
|
77
75
|
class: "magic-draggable__drag",
|
|
78
76
|
style: _normalizeStyle(_unref(style)),
|
|
79
77
|
onPointerdown: guardedPointerdown,
|
|
@@ -81,7 +79,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
81
79
|
}, {
|
|
82
80
|
default: _withCtx(() => [
|
|
83
81
|
_renderSlot(_ctx.$slots, "default"),
|
|
84
|
-
_unref(hasDragged) ? (_openBlock(), _createElementBlock("div",
|
|
82
|
+
_unref(hasDragged) ? (_openBlock(), _createElementBlock("div", _hoisted_3)) : _createCommentVNode("v-if", true)
|
|
85
83
|
]),
|
|
86
84
|
_: 3
|
|
87
85
|
/* FORWARDED */
|