@maas/vue-equipment 1.0.0-beta.2 → 1.0.0-beta.21
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.d.mts +2 -1
- package/dist/nuxt/module.json +2 -2
- package/dist/nuxt/module.mjs +9 -2
- package/dist/nuxt/types.d.mts +3 -1
- package/dist/plugins/.turbo/turbo-lint.log +2 -10
- package/dist/plugins/MagicAccordion/nuxt.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +59 -82
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +35 -22
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +17 -31
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +12 -21
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +57 -62
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +23 -59
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +34 -45
- 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/composables/private/useAccordionTrigger.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +146 -152
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +24 -13
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +42 -52
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +72 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +29 -28
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +37 -47
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +61 -77
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +23 -39
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +80 -86
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +25 -60
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +36 -48
- 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/composables/private/useCommandTrigger.mjs +1 -0
- 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/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +34 -41
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +13 -22
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +19 -36
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +9 -21
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +40 -72
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +21 -12
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +0 -1
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +81 -100
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +94 -22
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +43 -63
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +2 -15
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +117 -64
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +6 -5
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +2 -1
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/MagicDrawer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +271 -308
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +165 -23
- 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/MagicDrawer/src/composables/private/useDrawerWheel.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/types/index.mjs +1 -0
- package/dist/plugins/MagicEmitter/nuxt.d.ts +1 -1
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +100 -100
- package/dist/plugins/MagicMarquee/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +38 -72
- 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/MagicMarquee/src/composables/useMagicMarquee.d.ts +1 -1
- package/dist/plugins/MagicMenu/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +51 -63
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +18 -21
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +178 -214
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +41 -24
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +171 -198
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +40 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +87 -113
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +31 -28
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +82 -81
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +63 -86
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +19 -23
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +94 -97
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +27 -60
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +49 -61
- 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/useMenuKeyListener.mjs +6 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +2 -0
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +18 -6
- package/dist/plugins/MagicMenu/src/composables/useMagicMenu.mjs +1 -0
- 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/nuxt.d.ts +1 -1
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +133 -168
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +44 -21
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
- package/dist/plugins/MagicModal/src/types/index.mjs +1 -0
- package/dist/plugins/MagicNoise/nuxt.d.ts +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +50 -81
- 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 +168 -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/nuxt.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +58 -63
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +99 -127
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +30 -26
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +32 -42
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +106 -105
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +51 -76
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +29 -14
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +18 -37
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +12 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +41 -55
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +23 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +60 -109
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +74 -71
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +163 -209
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +63 -33
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +0 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +6 -47
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +7 -34
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +154 -235
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +3 -17
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +17 -157
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +2 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +7 -25
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +7 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +56 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +3 -8
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +7 -62
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +32 -51
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +49 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +5 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +10 -1
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +29 -0
- package/dist/plugins/MagicScroll/nuxt.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +54 -61
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +56 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +26 -33
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +45 -37
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +63 -71
- 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 +16 -6
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +41 -26
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/nuxt.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +94 -118
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -10
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +54 -81
- 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/useToastListener.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +33 -15
- package/dist/plugins/MagicToast/src/composables/private/useToastView.mjs +1 -0
- 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 +17 -8
- package/dist/nuxt/module.cjs +0 -5
- package/dist/nuxt/module.d.ts +0 -9
- package/dist/nuxt/types.d.ts +0 -1
- package/dist/plugins/MagicAccordion/demo/data/footer.json +0 -117
- package/dist/plugins/MagicCommand/demo/data/about.json +0 -3
- package/dist/plugins/MagicCommand/demo/data/search.json +0 -594
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +0 -15
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.mjs +0 -9
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="magic-command-item"
|
|
4
|
+
:data-id="mappedId"
|
|
5
|
+
:data-disabled="disabled"
|
|
6
|
+
:data-active="item.active"
|
|
7
|
+
:data-pointer-disabled="pointerDisabled"
|
|
8
|
+
@mouseenter="guardedSelect"
|
|
9
|
+
@mousemove="guardedSelect"
|
|
10
|
+
@touchstart.passive="guardedSelect"
|
|
11
|
+
@click="onClick"
|
|
12
|
+
>
|
|
13
|
+
<slot :item-active="item.active" :item-disabled="disabled" />
|
|
14
|
+
<div v-if="pointerDisabled" class="magic-command-item__pointer-guard" />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
9
19
|
import {
|
|
10
|
-
ref,
|
|
11
20
|
computed,
|
|
12
21
|
inject,
|
|
13
22
|
provide,
|
|
@@ -25,85 +34,61 @@ import {
|
|
|
25
34
|
MagicCommandItemActive,
|
|
26
35
|
MagicCommandItemDisabled
|
|
27
36
|
} from "../symbols";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
selectItem(mappedId.value);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function onClick(event) {
|
|
71
|
-
emit("click", event);
|
|
72
|
-
guardedSelect();
|
|
73
|
-
}
|
|
74
|
-
provide(MagicCommandItemId, mappedId.value);
|
|
75
|
-
provide(MagicCommandItemActive, mappedActive);
|
|
76
|
-
provide(MagicCommandItemDisabled, mappedDisabled);
|
|
77
|
-
onMounted(() => {
|
|
78
|
-
if (__props.initial) {
|
|
79
|
-
selectItem(mappedId.value);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
onBeforeUnmount(() => {
|
|
83
|
-
deleteItem(mappedId.value);
|
|
84
|
-
});
|
|
85
|
-
return (_ctx, _cache) => {
|
|
86
|
-
return _openBlock(), _createElementBlock("div", {
|
|
87
|
-
ref_key: "elRef",
|
|
88
|
-
ref: elRef,
|
|
89
|
-
class: "magic-command-item",
|
|
90
|
-
"data-id": mappedId.value,
|
|
91
|
-
"data-disabled": _ctx.disabled,
|
|
92
|
-
"data-active": _unref(item).active,
|
|
93
|
-
"data-pointer-disabled": pointerDisabled.value,
|
|
94
|
-
onMouseenter: guardedSelect,
|
|
95
|
-
onMousemove: guardedSelect,
|
|
96
|
-
onTouchstartPassive: guardedSelect,
|
|
97
|
-
onClick
|
|
98
|
-
}, [
|
|
99
|
-
_renderSlot(_ctx.$slots, "default", {
|
|
100
|
-
itemActive: _unref(item).active,
|
|
101
|
-
itemDisabled: _ctx.disabled
|
|
102
|
-
}),
|
|
103
|
-
pointerDisabled.value ? (_openBlock(), _createElementBlock("div", _hoisted_2)) : _createCommentVNode("v-if", true)
|
|
104
|
-
], 40, _hoisted_1);
|
|
105
|
-
};
|
|
37
|
+
const {
|
|
38
|
+
id,
|
|
39
|
+
initial = false,
|
|
40
|
+
disabled = false
|
|
41
|
+
} = defineProps({
|
|
42
|
+
id: { type: String, required: false },
|
|
43
|
+
initial: { type: Boolean, required: false },
|
|
44
|
+
disabled: { type: Boolean, required: false }
|
|
45
|
+
});
|
|
46
|
+
const emit = defineEmits(["click"]);
|
|
47
|
+
const instanceId = inject(MagicCommandInstanceId, void 0);
|
|
48
|
+
const viewId = inject(MagicCommandViewId, void 0);
|
|
49
|
+
const contentId = inject(MagicCommandContentId, void 0);
|
|
50
|
+
if (!instanceId) {
|
|
51
|
+
throw new Error("MagicCommandItem must be nested inside MagicCommandProvider");
|
|
52
|
+
}
|
|
53
|
+
if (!viewId) {
|
|
54
|
+
throw new Error("MagicCommandItem must be nested inside MagicCommandView");
|
|
55
|
+
}
|
|
56
|
+
if (!contentId) {
|
|
57
|
+
throw new Error("MagicCommandItem must be nested inside MagicCommandContent");
|
|
58
|
+
}
|
|
59
|
+
const mappedId = computed(() => id ?? `magic-command-item-${useId()}`);
|
|
60
|
+
const { initializeItem, deleteItem, selectItem } = useCommandItem({
|
|
61
|
+
instanceId,
|
|
62
|
+
viewId
|
|
63
|
+
});
|
|
64
|
+
const { initializeState } = useCommandState(instanceId);
|
|
65
|
+
const state = initializeState();
|
|
66
|
+
const item = initializeItem({
|
|
67
|
+
id: mappedId.value,
|
|
68
|
+
disabled: disabled ?? false
|
|
69
|
+
});
|
|
70
|
+
const pointerDisabled = computed(() => state.input.type !== "pointer");
|
|
71
|
+
const mappedDisabled = computed(() => disabled ?? item?.disabled);
|
|
72
|
+
const mappedActive = computed(() => item?.active);
|
|
73
|
+
function guardedSelect() {
|
|
74
|
+
if (state.input.type === "pointer" && !item.disabled && !item.active) {
|
|
75
|
+
selectItem(mappedId.value);
|
|
106
76
|
}
|
|
77
|
+
}
|
|
78
|
+
function onClick(event) {
|
|
79
|
+
emit("click", event);
|
|
80
|
+
guardedSelect();
|
|
81
|
+
}
|
|
82
|
+
provide(MagicCommandItemId, mappedId.value);
|
|
83
|
+
provide(MagicCommandItemActive, mappedActive);
|
|
84
|
+
provide(MagicCommandItemDisabled, mappedDisabled);
|
|
85
|
+
onMounted(() => {
|
|
86
|
+
if (initial) {
|
|
87
|
+
selectItem(mappedId.value);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
onBeforeUnmount(() => {
|
|
91
|
+
deleteItem(mappedId.value);
|
|
107
92
|
});
|
|
108
93
|
</script>
|
|
109
94
|
|
|
@@ -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/index.js").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
|
};
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<magic-modal
|
|
3
|
+
:id="instanceId"
|
|
4
|
+
class="magic-command-modal"
|
|
5
|
+
:options="options"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
>
|
|
8
|
+
<slot />
|
|
9
|
+
</magic-modal>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
4
13
|
import { inject, watch, onBeforeUnmount } from "vue";
|
|
5
14
|
import {
|
|
6
15
|
useMagicModal,
|
|
@@ -8,50 +17,31 @@ import {
|
|
|
8
17
|
} from "@maas/vue-equipment/plugins";
|
|
9
18
|
import { useMagicCommand } from "../composables/useMagicCommand";
|
|
10
19
|
import { MagicCommandInstanceId } from "../symbols";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function afterLeaveCallback(payload) {
|
|
23
|
-
if (typeof payload === "string" && payload === instanceId) {
|
|
24
|
-
close();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const { close, isActive } = useMagicCommand(instanceId);
|
|
28
|
-
const modalApi = useMagicModal(instanceId);
|
|
29
|
-
watch(isActive, (value) => {
|
|
30
|
-
if (value) {
|
|
31
|
-
modalApi.open();
|
|
32
|
-
} else {
|
|
33
|
-
modalApi.close();
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
emitter.on("afterLeave", afterLeaveCallback);
|
|
37
|
-
onBeforeUnmount(() => {
|
|
38
|
-
emitter.off("afterLeave", afterLeaveCallback);
|
|
39
|
-
close();
|
|
40
|
-
});
|
|
41
|
-
return (_ctx, _cache) => {
|
|
42
|
-
const _component_magic_modal = _resolveComponent("magic-modal");
|
|
43
|
-
return _openBlock(), _createBlock(_component_magic_modal, _mergeProps({
|
|
44
|
-
id: _unref(instanceId),
|
|
45
|
-
class: "magic-command-modal",
|
|
46
|
-
options: _ctx.options
|
|
47
|
-
}, _ctx.$attrs), {
|
|
48
|
-
default: _withCtx(() => [
|
|
49
|
-
_renderSlot(_ctx.$slots, "default")
|
|
50
|
-
]),
|
|
51
|
-
_: 3
|
|
52
|
-
/* FORWARDED */
|
|
53
|
-
}, 16, ["id", "options"]);
|
|
54
|
-
};
|
|
20
|
+
defineOptions({
|
|
21
|
+
inheritAttrs: false
|
|
22
|
+
});
|
|
23
|
+
defineProps({
|
|
24
|
+
options: { type: null, required: false }
|
|
25
|
+
});
|
|
26
|
+
const instanceId = inject(MagicCommandInstanceId, "");
|
|
27
|
+
const emitter = useMagicEmitter();
|
|
28
|
+
function afterLeaveCallback(payload) {
|
|
29
|
+
if (typeof payload === "string" && payload === instanceId) {
|
|
30
|
+
close();
|
|
55
31
|
}
|
|
32
|
+
}
|
|
33
|
+
const { close, isActive } = useMagicCommand(instanceId);
|
|
34
|
+
const modalApi = useMagicModal(instanceId);
|
|
35
|
+
watch(isActive, (value) => {
|
|
36
|
+
if (value) {
|
|
37
|
+
modalApi.open();
|
|
38
|
+
} else {
|
|
39
|
+
modalApi.close();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
emitter.on("afterLeave", afterLeaveCallback);
|
|
43
|
+
onBeforeUnmount(() => {
|
|
44
|
+
emitter.off("afterLeave", afterLeaveCallback);
|
|
45
|
+
close();
|
|
56
46
|
});
|
|
57
47
|
</script>
|
|
@@ -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,11 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<primitive :data-id="id" :as-child="asChild" class="magic-command-provider">
|
|
3
|
+
<slot />
|
|
4
|
+
</primitive>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { shallowRef, provide, watch, onBeforeUnmount } from "vue";
|
|
5
9
|
import { useMagicKeys, usePointer } from "@vueuse/core";
|
|
6
10
|
import { Primitive } from "@maas/vue-primitive";
|
|
7
11
|
import { createDefu } from "defu";
|
|
@@ -9,85 +13,65 @@ import { useCommandState } from "../composables/private/useCommandState";
|
|
|
9
13
|
import { useMagicCommand } from "../composables/useMagicCommand";
|
|
10
14
|
import { defaultOptions } from "../utils/defaultOptions";
|
|
11
15
|
import { MagicCommandInstanceId, MagicCommandProviderOptions } from "../symbols";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
16
|
+
const { id, options = {} } = defineProps({
|
|
17
|
+
id: { type: null, required: true },
|
|
18
|
+
asChild: { type: Boolean, required: false },
|
|
19
|
+
options: { type: Object, required: false }
|
|
20
|
+
});
|
|
21
|
+
const customDefu = createDefu((obj, key, value) => {
|
|
22
|
+
if (key === "open" || key === "close" || key === "next" || key === "prev") {
|
|
23
|
+
obj[key] = value;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const mappedOptions = customDefu(options, defaultOptions);
|
|
28
|
+
const { initializeState, deleteState } = useCommandState(id);
|
|
29
|
+
const state = initializeState(mappedOptions);
|
|
30
|
+
const lastX = shallowRef(0);
|
|
31
|
+
const lastY = shallowRef(0);
|
|
32
|
+
const { x, y } = usePointer();
|
|
33
|
+
watch(
|
|
34
|
+
() => state?.input.type,
|
|
35
|
+
(value) => {
|
|
36
|
+
if (value === "keyboard") {
|
|
37
|
+
lastX.value = x.value;
|
|
38
|
+
lastY.value = y.value;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
watch([x, y], ([x2, y2]) => {
|
|
43
|
+
if (x2 !== lastX.value || y2 !== lastY.value) {
|
|
44
|
+
if (state) {
|
|
45
|
+
state.input.type = "pointer";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const keys = useMagicKeys();
|
|
50
|
+
const commandApi = useMagicCommand(id);
|
|
51
|
+
const { open, close } = commandApi;
|
|
52
|
+
if (mappedOptions.keyListener?.open) {
|
|
53
|
+
for (const key of mappedOptions.keyListener.open) {
|
|
54
|
+
watch(keys[key], (value) => {
|
|
55
|
+
if (value) {
|
|
56
|
+
open();
|
|
47
57
|
}
|
|
48
58
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
open();
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (mappedOptions.keyListener?.close) {
|
|
62
|
-
for (const key of mappedOptions.keyListener.close) {
|
|
63
|
-
watch(keys[key], (value) => {
|
|
64
|
-
if (value) {
|
|
65
|
-
close();
|
|
66
|
-
}
|
|
67
|
-
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (mappedOptions.keyListener?.close) {
|
|
62
|
+
for (const key of mappedOptions.keyListener.close) {
|
|
63
|
+
watch(keys[key], (value) => {
|
|
64
|
+
if (value) {
|
|
65
|
+
close();
|
|
68
66
|
}
|
|
69
|
-
}
|
|
70
|
-
onBeforeUnmount(() => {
|
|
71
|
-
deleteState();
|
|
72
67
|
});
|
|
73
|
-
provide(MagicCommandInstanceId, __props.id);
|
|
74
|
-
provide(MagicCommandProviderOptions, mappedOptions);
|
|
75
|
-
return (_ctx, _cache) => {
|
|
76
|
-
return _openBlock(), _createBlock(_unref(Primitive), {
|
|
77
|
-
ref_key: "elRef",
|
|
78
|
-
ref: elRef,
|
|
79
|
-
"as-child": _ctx.asChild,
|
|
80
|
-
class: "magic-command-provider"
|
|
81
|
-
}, {
|
|
82
|
-
default: _withCtx(() => [
|
|
83
|
-
_renderSlot(_ctx.$slots, "default")
|
|
84
|
-
]),
|
|
85
|
-
_: 3
|
|
86
|
-
/* FORWARDED */
|
|
87
|
-
}, 8, ["as-child"]);
|
|
88
|
-
};
|
|
89
68
|
}
|
|
69
|
+
}
|
|
70
|
+
onBeforeUnmount(() => {
|
|
71
|
+
deleteState();
|
|
90
72
|
});
|
|
73
|
+
provide(MagicCommandInstanceId, id);
|
|
74
|
+
provide(MagicCommandProviderOptions, mappedOptions);
|
|
91
75
|
</script>
|
|
92
76
|
|
|
93
77
|
<style>
|
|
@@ -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
|
};
|