@maas/vue-equipment 1.0.0-beta.4 → 1.0.0-beta.6
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/nuxt/module.json +1 -1
- package/dist/plugins/.turbo/turbo-lint.log +2 -10
- 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.d.ts +139 -24
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +15 -22
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +0 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +34 -28
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +60 -22
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +4 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +144 -25
- 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/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 +22 -13
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +8 -12
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +114 -22
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +13 -3
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +0 -47
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +0 -36
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +2 -3
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +0 -30
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +0 -39
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +0 -38
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +36 -28
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +14 -3
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +60 -22
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +27 -37
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +19 -23
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +26 -15
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +146 -25
- 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/useMenuChannel.mjs +15 -5
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +18 -6
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +3 -3
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +0 -38
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +5 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +4 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +3 -9
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +0 -33
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +4 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +2 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +0 -20
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +14 -12
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +27 -22
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +4 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +0 -45
- 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/usePlayerMediaApi.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +14 -22
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +14 -22
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +45 -37
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +18 -24
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +6 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +2 -2
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +59 -10
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +2 -2
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +28 -22
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +2 -2
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +2 -2
- package/package.json +4 -2
|
@@ -1,35 +1,127 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
1
|
+
import { toValue, type MaybeRef } from 'vue';
|
|
2
2
|
import type { MagicDraggableOptions } from '../types/index.js';
|
|
3
3
|
interface MagicDraggableProps {
|
|
4
4
|
id: MaybeRef<string>;
|
|
5
5
|
options?: MagicDraggableOptions;
|
|
6
6
|
}
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
declare const mappedOptions: Omit<MagicDraggableOptions, keyof MagicDraggableOptions> & Omit<import("../types").DraggableDefaultOptions, keyof MagicDraggableOptions> & {
|
|
8
|
+
threshold: ({
|
|
9
|
+
lock?: number;
|
|
10
|
+
distance?: number;
|
|
11
|
+
momentum?: number;
|
|
12
|
+
idle?: number;
|
|
13
|
+
} & import("../../../../utils").RequireAll<{
|
|
14
|
+
lock?: number;
|
|
15
|
+
distance?: number;
|
|
16
|
+
momentum?: number;
|
|
17
|
+
idle?: number;
|
|
18
|
+
}>) | (Omit<{
|
|
19
|
+
lock?: number;
|
|
20
|
+
distance?: number;
|
|
21
|
+
momentum?: number;
|
|
22
|
+
idle?: number;
|
|
23
|
+
}, "lock" | "distance" | "momentum" | "idle"> & Omit<{
|
|
24
|
+
lock?: number;
|
|
25
|
+
distance?: number;
|
|
26
|
+
momentum?: number;
|
|
27
|
+
idle?: number;
|
|
28
|
+
} & import("../../../../utils").RequireAll<{
|
|
29
|
+
lock?: number;
|
|
30
|
+
distance?: number;
|
|
31
|
+
momentum?: number;
|
|
32
|
+
idle?: number;
|
|
33
|
+
}>, "lock" | "distance" | "momentum" | "idle"> & {
|
|
34
|
+
lock: number;
|
|
35
|
+
distance: number;
|
|
36
|
+
momentum: number;
|
|
37
|
+
idle: number;
|
|
38
|
+
});
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
animation: ({
|
|
41
|
+
snap?: {
|
|
42
|
+
duration?: number;
|
|
43
|
+
easing?: (t: number) => number;
|
|
44
|
+
};
|
|
45
|
+
} & import("../../../../utils").RequireAll<{
|
|
46
|
+
snap?: {
|
|
47
|
+
duration?: number;
|
|
48
|
+
easing?: (t: number) => number;
|
|
49
|
+
};
|
|
50
|
+
}>) | (Omit<{
|
|
51
|
+
snap?: {
|
|
52
|
+
duration?: number;
|
|
53
|
+
easing?: (t: number) => number;
|
|
54
|
+
};
|
|
55
|
+
}, "snap"> & Omit<{
|
|
56
|
+
snap?: {
|
|
57
|
+
duration?: number;
|
|
58
|
+
easing?: (t: number) => number;
|
|
59
|
+
};
|
|
60
|
+
} & import("../../../../utils").RequireAll<{
|
|
61
|
+
snap?: {
|
|
62
|
+
duration?: number;
|
|
63
|
+
easing?: (t: number) => number;
|
|
64
|
+
};
|
|
65
|
+
}>, "snap"> & {
|
|
66
|
+
snap: {
|
|
67
|
+
duration?: number;
|
|
68
|
+
easing?: (t: number) => number;
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
tag: "dialog" | "div";
|
|
72
|
+
scrollLock: boolean | {
|
|
73
|
+
padding: boolean;
|
|
11
74
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
elRef: unknown;
|
|
75
|
+
snapPoints: import("../types").DraggableSnapPoint[];
|
|
76
|
+
initial: {
|
|
77
|
+
snapPoint?: import("../types").DraggableSnapPoint;
|
|
16
78
|
};
|
|
17
|
-
rootEl: any;
|
|
18
79
|
};
|
|
19
|
-
|
|
20
|
-
declare const
|
|
21
|
-
declare const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
80
|
+
declare const elRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
81
|
+
declare const wrapperRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
82
|
+
declare const dragging: import("vue").Ref<boolean, boolean>;
|
|
83
|
+
declare const disabled: import("vue").ComputedRef<boolean>;
|
|
84
|
+
declare const style: import("vue").ComputedRef<string>, hasDragged: import("vue").ComputedRef<boolean>;
|
|
85
|
+
declare function guardedPointerdown(event: PointerEvent): void;
|
|
86
|
+
declare function guardedClick(event: PointerEvent): void;
|
|
87
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
88
|
+
declare const __VLS_0: "dialog" | "div";
|
|
89
|
+
declare const __VLS_2: {
|
|
90
|
+
__ctx?: {
|
|
91
|
+
attrs?: any;
|
|
92
|
+
expose?: any;
|
|
93
|
+
slots?: any;
|
|
94
|
+
emit?: any;
|
|
95
|
+
props?: {} & Record<string, unknown>;
|
|
30
96
|
};
|
|
31
97
|
};
|
|
32
|
-
|
|
98
|
+
declare var __VLS_6: (Parameters<NonNullable<(typeof __VLS_5)["expose"]>>[0] | null);
|
|
99
|
+
declare var __VLS_10: {};
|
|
100
|
+
declare var __VLS_5: __VLS_PickFunctionalComponentCtx<typeof __VLS_0, typeof __VLS_2>;
|
|
101
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
102
|
+
default?: (props: typeof __VLS_10) => any;
|
|
103
|
+
}>;
|
|
104
|
+
type __VLS_TemplateRefs = {
|
|
105
|
+
drawerRef: typeof __VLS_nativeElements['div'];
|
|
106
|
+
wrapperRef: typeof __VLS_nativeElements['div'];
|
|
107
|
+
elRef: typeof __VLS_6;
|
|
108
|
+
};
|
|
109
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicDraggableProps, {
|
|
110
|
+
toValue: typeof toValue;
|
|
111
|
+
mappedOptions: typeof mappedOptions;
|
|
112
|
+
elRef: typeof elRef;
|
|
113
|
+
wrapperRef: typeof wrapperRef;
|
|
114
|
+
dragging: typeof dragging;
|
|
115
|
+
disabled: typeof disabled;
|
|
116
|
+
style: typeof style;
|
|
117
|
+
hasDragged: typeof hasDragged;
|
|
118
|
+
guardedPointerdown: typeof guardedPointerdown;
|
|
119
|
+
guardedClick: typeof guardedClick;
|
|
120
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicDraggableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
121
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicDraggableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicDraggableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, __VLS_TemplateRefs, any>;
|
|
122
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
123
|
+
export default _default;
|
|
124
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
125
|
new (): {
|
|
34
126
|
$slots: S;
|
|
35
127
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, vShow as _vShow, withModifiers as _withModifiers, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, mergeProps as _mergeProps, Teleport as _Teleport } from "vue";
|
|
4
|
-
const _hoisted_1 = ["id", "data-dragging", "data-wheeling", "data-disabled", "data-position"];
|
|
4
|
+
const _hoisted_1 = ["data-id", "data-dragging", "data-wheeling", "data-disabled", "data-position"];
|
|
5
5
|
const _hoisted_2 = { class: "magic-drawer__content" };
|
|
6
6
|
const _hoisted_3 = {
|
|
7
7
|
key: 0,
|
|
@@ -250,10 +250,10 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
250
250
|
disabled: _unref(mappedOptions).teleport?.disabled
|
|
251
251
|
}, [
|
|
252
252
|
_createElementVNode("div", _mergeProps({
|
|
253
|
-
id: toValue(_ctx.id),
|
|
254
253
|
ref_key: "drawerRef",
|
|
255
254
|
ref: drawerRef,
|
|
256
255
|
class: "magic-drawer",
|
|
256
|
+
"data-id": toValue(_ctx.id),
|
|
257
257
|
"data-dragging": _unref(dragging),
|
|
258
258
|
"data-wheeling": _unref(wheeling),
|
|
259
259
|
"data-disabled": disabled.value,
|
|
@@ -345,7 +345,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
345
345
|
<style>
|
|
346
346
|
:root {
|
|
347
347
|
--magic-drawer-height: 75svh;
|
|
348
|
+
--magic-drawer-max-height: none;
|
|
348
349
|
--magic-drawer-width: 100%;
|
|
350
|
+
--magic-drawer-max-width: none;
|
|
349
351
|
--magic-drawer-justify-content: center;
|
|
350
352
|
--magic-drawer-align-items: flex-end;
|
|
351
353
|
--magic-drawer-enter-animation: slide-btt-in 300ms ease;
|
|
@@ -433,18 +435,26 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
433
435
|
|
|
434
436
|
.magic-drawer__wrapper {
|
|
435
437
|
height: var(--magic-drawer-height);
|
|
438
|
+
max-height: calc(
|
|
439
|
+
var(--magic-drawer-max-height) + var(--magic-drawer-drag-overshoot-y)
|
|
440
|
+
);
|
|
436
441
|
width: var(--magic-drawer-width);
|
|
442
|
+
max-width: calc(
|
|
443
|
+
var(--magic-drawer-max-width) + var(--magic-drawer-drag-overshoot-x)
|
|
444
|
+
);
|
|
437
445
|
transform: translate(
|
|
438
446
|
var(--magic-drawer-drag-overshoot-x),
|
|
439
447
|
var(--magic-drawer-drag-overshoot-y)
|
|
440
448
|
);
|
|
441
449
|
pointer-events: none;
|
|
450
|
+
display: flex;
|
|
451
|
+
min-height: 0;
|
|
442
452
|
}
|
|
443
453
|
|
|
444
454
|
.magic-drawer__content {
|
|
445
455
|
width: 100%;
|
|
446
|
-
height: 100%;
|
|
447
456
|
max-height: 100%;
|
|
457
|
+
height: var(--magic-drawer-content-height, 100%);
|
|
448
458
|
position: relative;
|
|
449
459
|
}
|
|
450
460
|
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
2
|
-
import type { MagicDrawerOptions } from '../types/index.js';
|
|
3
|
-
import '@maas/vue-equipment/utils/css/animations/fade-in.css';
|
|
4
|
-
import '@maas/vue-equipment/utils/css/animations/fade-out.css';
|
|
5
|
-
import '@maas/vue-equipment/utils/css/animations/slide-ltr-in.css';
|
|
6
|
-
import '@maas/vue-equipment/utils/css/animations/slide-rtl-in.css';
|
|
7
|
-
import '@maas/vue-equipment/utils/css/animations/slide-ttb-in.css';
|
|
8
|
-
import '@maas/vue-equipment/utils/css/animations/slide-btt-in.css';
|
|
9
|
-
import '@maas/vue-equipment/utils/css/animations/slide-ltr-out.css';
|
|
10
|
-
import '@maas/vue-equipment/utils/css/animations/slide-rtl-out.css';
|
|
11
|
-
import '@maas/vue-equipment/utils/css/animations/slide-ttb-out.css';
|
|
12
|
-
import '@maas/vue-equipment/utils/css/animations/slide-btt-out.css';
|
|
13
|
-
interface MagicDrawerProps {
|
|
14
|
-
id: MaybeRef<string>;
|
|
15
|
-
options?: MagicDrawerOptions;
|
|
16
|
-
}
|
|
17
|
-
declare function __VLS_template(): {
|
|
18
|
-
attrs: Partial<{}>;
|
|
19
|
-
slots: {
|
|
20
|
-
backdrop?(_: {}): any;
|
|
21
|
-
default?(_: {}): any;
|
|
22
|
-
};
|
|
23
|
-
refs: {
|
|
24
|
-
drawerRef: HTMLDivElement;
|
|
25
|
-
wrapperRef: HTMLDivElement;
|
|
26
|
-
elRef: unknown;
|
|
27
|
-
};
|
|
28
|
-
rootEl: any;
|
|
29
|
-
};
|
|
30
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicDrawerProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicDrawerProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
|
-
export default _default;
|
|
34
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
35
|
-
type __VLS_TypePropsToOption<T> = {
|
|
36
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
37
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
38
|
-
} : {
|
|
39
|
-
type: import('vue').PropType<T[K]>;
|
|
40
|
-
required: true;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
44
|
-
new (): {
|
|
45
|
-
$slots: S;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
2
|
-
import type { MagicMarqueeOptions } from '../types/index.js';
|
|
3
|
-
interface MagicMarqueeProps {
|
|
4
|
-
id: MaybeRef<string>;
|
|
5
|
-
options?: MagicMarqueeOptions;
|
|
6
|
-
}
|
|
7
|
-
declare function __VLS_template(): {
|
|
8
|
-
attrs: Partial<{}>;
|
|
9
|
-
slots: {
|
|
10
|
-
default?(_: {}): any;
|
|
11
|
-
default?(_: {}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {
|
|
14
|
-
parentRef: HTMLDivElement;
|
|
15
|
-
childRef: HTMLDivElement;
|
|
16
|
-
};
|
|
17
|
-
rootEl: HTMLDivElement;
|
|
18
|
-
};
|
|
19
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMarqueeProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMarqueeProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
-
type __VLS_TypePropsToOption<T> = {
|
|
25
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
-
} : {
|
|
28
|
-
type: import('vue').PropType<T[K]>;
|
|
29
|
-
required: true;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
-
new (): {
|
|
34
|
-
$slots: S;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock } from "vue";
|
|
4
|
-
const _hoisted_1 = ["
|
|
4
|
+
const _hoisted_1 = ["data-initialized", "data-id"];
|
|
5
5
|
import { computed, inject, provide } from "vue";
|
|
6
6
|
import { useMenuChannel } from "../composables/private/useMenuChannel";
|
|
7
7
|
import {
|
|
@@ -39,7 +39,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
const mappedId = computed(() => `magic-menu-channel-${__props.id}`);
|
|
42
|
-
const mappedActive = computed(() => channel.active);
|
|
43
42
|
const mappedTransition = computed(
|
|
44
43
|
() => __props.transition ?? state.options.transition.channel
|
|
45
44
|
);
|
|
@@ -50,6 +49,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
50
49
|
const channel = initializeChannel({
|
|
51
50
|
id: mappedId.value
|
|
52
51
|
});
|
|
52
|
+
const mappedActive = computed(() => channel.active);
|
|
53
53
|
provide(MagicMenuChannelId, mappedId.value);
|
|
54
54
|
provide(MagicMenuChannelActive, mappedActive);
|
|
55
55
|
return (_ctx, _cache) => {
|
|
@@ -57,7 +57,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
57
57
|
default: _withCtx(() => [
|
|
58
58
|
_unref(channel).active ? (_openBlock(), _createElementBlock("div", {
|
|
59
59
|
key: 0,
|
|
60
|
-
id: _ctx.id,
|
|
61
60
|
class: "magic-menu-channel",
|
|
62
61
|
"data-initialized": _unref(state).active,
|
|
63
62
|
"data-id": mappedId.value
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
interface MagicMenuChannelProps {
|
|
2
|
-
id: string;
|
|
3
|
-
transition?: string;
|
|
4
|
-
}
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
default?(_: {}): any;
|
|
9
|
-
};
|
|
10
|
-
refs: {};
|
|
11
|
-
rootEl: any;
|
|
12
|
-
};
|
|
13
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMenuChannelProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMenuChannelProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
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 & {
|
|
27
|
-
new (): {
|
|
28
|
-
$slots: S;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type MaybeRef, type ComponentPublicInstance } from 'vue';
|
|
2
|
-
import type { Middleware } from '@floating-ui/vue';
|
|
3
|
-
import '@maas/vue-equipment/utils/css/animations/fade-in.css';
|
|
4
|
-
import '@maas/vue-equipment/utils/css/animations/fade-out.css';
|
|
5
|
-
interface MagicMenuContentProps {
|
|
6
|
-
arrow?: boolean | undefined;
|
|
7
|
-
middleware?: Middleware[];
|
|
8
|
-
transition?: string;
|
|
9
|
-
referenceEl?: MaybeRef<HTMLElement | ComponentPublicInstance>;
|
|
10
|
-
}
|
|
11
|
-
declare function __VLS_template(): {
|
|
12
|
-
attrs: Partial<{}>;
|
|
13
|
-
slots: {
|
|
14
|
-
arrow?(_: {}): any;
|
|
15
|
-
default?(_: {}): any;
|
|
16
|
-
};
|
|
17
|
-
refs: {
|
|
18
|
-
contentRef: HTMLDivElement;
|
|
19
|
-
};
|
|
20
|
-
rootEl: any;
|
|
21
|
-
};
|
|
22
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMenuContentProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMenuContentProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
|
-
export default _default;
|
|
26
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
-
type __VLS_TypePropsToOption<T> = {
|
|
28
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
-
} : {
|
|
31
|
-
type: import('vue').PropType<T[K]>;
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
36
|
-
new (): {
|
|
37
|
-
$slots: S;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type MaybeRef, type ComponentPublicInstance } from 'vue';
|
|
2
|
-
import { type Placement, type Middleware } from '@floating-ui/vue';
|
|
3
|
-
interface MagicMenuFloatProps {
|
|
4
|
-
placement?: Placement;
|
|
5
|
-
middleware?: Middleware[];
|
|
6
|
-
arrow?: boolean;
|
|
7
|
-
referenceEl?: MaybeRef<HTMLElement | ComponentPublicInstance>;
|
|
8
|
-
}
|
|
9
|
-
declare function __VLS_template(): {
|
|
10
|
-
attrs: Partial<{}>;
|
|
11
|
-
slots: {
|
|
12
|
-
arrow?(_: {}): any;
|
|
13
|
-
default?(_: {}): any;
|
|
14
|
-
};
|
|
15
|
-
refs: {
|
|
16
|
-
elRef: HTMLDivElement;
|
|
17
|
-
arrowRef: HTMLDivElement;
|
|
18
|
-
};
|
|
19
|
-
rootEl: HTMLDivElement;
|
|
20
|
-
};
|
|
21
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMenuFloatProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicMenuFloatProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
-
export default _default;
|
|
25
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
26
|
-
type __VLS_TypePropsToOption<T> = {
|
|
27
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
28
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
29
|
-
} : {
|
|
30
|
-
type: import('vue').PropType<T[K]>;
|
|
31
|
-
required: true;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
-
new (): {
|
|
36
|
-
$slots: S;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
|
|
4
|
-
const _hoisted_1 = ["id", "data-disabled", "data-active", "data-pointer-disabled"];
|
|
4
|
+
const _hoisted_1 = ["data-id", "data-disabled", "data-active", "data-pointer-disabled"];
|
|
5
5
|
const _hoisted_2 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "magic-menu-item__pointer-guard"
|
|
@@ -101,10 +101,10 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
101
101
|
});
|
|
102
102
|
return (_ctx, _cache) => {
|
|
103
103
|
return _openBlock(), _createElementBlock("div", {
|
|
104
|
-
id: mappedId.value,
|
|
105
104
|
ref_key: "elRef",
|
|
106
105
|
ref: elRef,
|
|
107
106
|
class: "magic-menu-item",
|
|
107
|
+
"data-id": mappedId.value,
|
|
108
108
|
"data-disabled": _ctx.disabled,
|
|
109
109
|
"data-active": _unref(item).active,
|
|
110
110
|
"data-pointer-disabled": pointerDisabled.value,
|
|
@@ -2,37 +2,45 @@ interface MagicMenuItemProps {
|
|
|
2
2
|
id?: string;
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
declare const elRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
6
|
+
declare const mappedId: import("vue").ComputedRef<string>;
|
|
7
|
+
declare const item: import("../types").MenuItem;
|
|
8
|
+
declare const pointerDisabled: import("vue").ComputedRef<boolean>;
|
|
9
|
+
declare function guardedSelect(): void;
|
|
10
|
+
declare function guardedUnselect(): void;
|
|
11
|
+
declare function onClick(event: MouseEvent): void;
|
|
12
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
13
|
+
declare var __VLS_0: {
|
|
14
|
+
itemActive: boolean;
|
|
15
|
+
itemDisabled: boolean;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
18
|
+
default?: (props: typeof __VLS_0) => any;
|
|
19
|
+
}>;
|
|
20
|
+
type __VLS_TemplateRefs = {
|
|
21
|
+
elRef: typeof __VLS_nativeElements['div'];
|
|
17
22
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicMenuItemProps, {
|
|
24
|
+
elRef: typeof elRef;
|
|
25
|
+
mappedId: typeof mappedId;
|
|
26
|
+
item: typeof item;
|
|
27
|
+
pointerDisabled: typeof pointerDisabled;
|
|
28
|
+
guardedSelect: typeof guardedSelect;
|
|
29
|
+
guardedUnselect: typeof guardedUnselect;
|
|
30
|
+
onClick: typeof onClick;
|
|
31
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
32
|
+
click: (event: MouseEvent) => any;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<MagicMenuItemProps> & Readonly<{
|
|
22
34
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
23
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
24
|
-
declare const
|
|
35
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
37
|
+
click: (event: MouseEvent) => any;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<MagicMenuItemProps> & Readonly<{
|
|
39
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
40
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, __VLS_TemplateRefs, HTMLDivElement>;
|
|
41
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
25
42
|
export default _default;
|
|
26
|
-
type
|
|
27
|
-
type __VLS_TypePropsToOption<T> = {
|
|
28
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
-
} : {
|
|
31
|
-
type: import('vue').PropType<T[K]>;
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
44
|
new (): {
|
|
37
45
|
$slots: S;
|
|
38
46
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
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 {
|
|
5
|
+
ref,
|
|
6
|
+
provide,
|
|
7
|
+
watch,
|
|
8
|
+
toValue,
|
|
9
|
+
onBeforeUnmount
|
|
10
|
+
} from "vue";
|
|
5
11
|
import { onClickOutside, onKeyStroke, usePointer } from "@vueuse/core";
|
|
6
12
|
import { Primitive } from "@maas/vue-primitive";
|
|
7
13
|
import { defu } from "defu";
|
|
@@ -67,7 +73,11 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
67
73
|
unselectAllViews();
|
|
68
74
|
},
|
|
69
75
|
{
|
|
70
|
-
ignore: [
|
|
76
|
+
ignore: [
|
|
77
|
+
`[data-id='${toValue(__props.id)}'] .magic-menu-trigger`,
|
|
78
|
+
`[data-id='${toValue(__props.id)}'] .magic-menu-item`,
|
|
79
|
+
`.magic-menu-float`
|
|
80
|
+
]
|
|
71
81
|
}
|
|
72
82
|
);
|
|
73
83
|
onBeforeUnmount(() => {
|
|
@@ -79,6 +89,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
79
89
|
ref_key: "elRef",
|
|
80
90
|
ref: elRef,
|
|
81
91
|
"as-child": _ctx.asChild,
|
|
92
|
+
"data-id": _ctx.id,
|
|
82
93
|
class: "magic-menu-provider"
|
|
83
94
|
}, {
|
|
84
95
|
default: _withCtx(() => [
|
|
@@ -86,7 +97,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
86
97
|
]),
|
|
87
98
|
_: 3
|
|
88
99
|
/* FORWARDED */
|
|
89
|
-
}, 8, ["as-child"]);
|
|
100
|
+
}, 8, ["as-child", "data-id"]);
|
|
90
101
|
};
|
|
91
102
|
}
|
|
92
103
|
});
|