@maas/vue-equipment 1.0.0-beta.36 → 1.0.0-beta.38

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.
Files changed (123) hide show
  1. package/dist/nuxt/module.json +1 -1
  2. package/dist/plugins/.turbo/turbo-build.log +5 -0
  3. package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.d.vue.ts +26 -0
  4. package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +4 -3
  5. package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.d.vue.ts +20 -0
  6. package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +1 -1
  7. package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +3 -2
  8. package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.d.vue.ts +23 -0
  9. package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +4 -3
  10. package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.d.vue.ts +20 -0
  11. package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +4 -4
  12. package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +4 -3
  13. package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.d.ts +1 -5
  14. package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.mjs +2 -3
  15. package/dist/plugins/MagicCommand/src/components/MagicCommandContent.d.vue.ts +15 -0
  16. package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +3 -2
  17. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.d.vue.ts +17 -0
  18. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +3 -2
  19. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.d.vue.ts +27 -0
  20. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +8 -1
  21. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +6 -3
  22. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.d.vue.ts +17 -0
  23. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +3 -2
  24. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.d.vue.ts +20 -0
  25. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +3 -2
  26. package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.d.vue.ts +3 -0
  27. package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +2 -1
  28. package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.d.vue.ts +24 -0
  29. package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +1 -3
  30. package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +5 -5
  31. package/dist/plugins/MagicCommand/src/components/MagicCommandView.d.vue.ts +19 -0
  32. package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +4 -3
  33. package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.mjs +8 -12
  34. package/dist/plugins/MagicCookie/src/components/MagicCookieItem.d.vue.ts +20 -0
  35. package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +4 -3
  36. package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.d.vue.ts +19 -0
  37. package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +3 -2
  38. package/dist/plugins/MagicCookie/src/components/MagicCookieView.d.vue.ts +17 -0
  39. package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +4 -3
  40. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.d.vue.ts +19 -0
  41. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +3 -2
  42. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.d.vue.ts +31 -0
  43. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +3 -2
  44. package/dist/plugins/MagicMarquee/src/components/MagicMarquee.d.vue.ts +21 -0
  45. package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +3 -2
  46. package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.d.vue.ts +17 -0
  47. package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +3 -2
  48. package/dist/plugins/MagicMenu/src/components/MagicMenuContent.d.vue.ts +25 -0
  49. package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +3 -2
  50. package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.d.vue.ts +24 -0
  51. package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +3 -2
  52. package/dist/plugins/MagicMenu/src/components/MagicMenuItem.d.vue.ts +26 -0
  53. package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +8 -1
  54. package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +6 -3
  55. package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.d.vue.ts +20 -0
  56. package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +3 -2
  57. package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.d.vue.ts +25 -0
  58. package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +4 -3
  59. package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.d.vue.ts +24 -0
  60. package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +5 -4
  61. package/dist/plugins/MagicMenu/src/components/MagicMenuView.d.vue.ts +20 -0
  62. package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +4 -3
  63. package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.d.ts +1 -1
  64. package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +16 -5
  65. package/dist/plugins/MagicModal/src/components/MagicModal.d.vue.ts +24 -0
  66. package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +3 -2
  67. package/dist/plugins/MagicNoise/src/components/MagicNoise.d.vue.ts +8 -0
  68. package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +2 -1
  69. package/dist/plugins/MagicPie/src/components/MagicPie.d.vue.ts +8 -0
  70. package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +2 -1
  71. package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.d.vue.ts +3 -0
  72. package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +2 -1
  73. package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.d.vue.ts +18 -0
  74. package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +3 -2
  75. package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.d.vue.ts +6 -0
  76. package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +2 -1
  77. package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.d.vue.ts +6 -0
  78. package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +2 -1
  79. package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.d.vue.ts +25 -0
  80. package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +3 -2
  81. package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.d.vue.ts +13 -0
  82. package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +3 -2
  83. package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.d.vue.ts +19 -0
  84. package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +3 -2
  85. package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.d.vue.ts +3 -0
  86. package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +2 -1
  87. package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.d.vue.ts +3 -0
  88. package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +2 -1
  89. package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.d.vue.ts +36 -0
  90. package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +3 -2
  91. package/dist/plugins/MagicPlayer/src/components/icons/FullscreenEnter.d.vue.ts +3 -0
  92. package/dist/plugins/MagicPlayer/src/components/icons/FullscreenEnter.vue.d.ts +2 -1
  93. package/dist/plugins/MagicPlayer/src/components/icons/FullscreenExit.d.vue.ts +3 -0
  94. package/dist/plugins/MagicPlayer/src/components/icons/FullscreenExit.vue.d.ts +2 -1
  95. package/dist/plugins/MagicPlayer/src/components/icons/Pause.d.vue.ts +3 -0
  96. package/dist/plugins/MagicPlayer/src/components/icons/Pause.vue.d.ts +2 -1
  97. package/dist/plugins/MagicPlayer/src/components/icons/Play.d.vue.ts +3 -0
  98. package/dist/plugins/MagicPlayer/src/components/icons/Play.vue.d.ts +2 -1
  99. package/dist/plugins/MagicPlayer/src/components/icons/VolumeOff.d.vue.ts +3 -0
  100. package/dist/plugins/MagicPlayer/src/components/icons/VolumeOff.vue.d.ts +2 -1
  101. package/dist/plugins/MagicPlayer/src/components/icons/VolumeOn.d.vue.ts +3 -0
  102. package/dist/plugins/MagicPlayer/src/components/icons/VolumeOn.vue.d.ts +2 -1
  103. package/dist/plugins/MagicPlayer/src/components/icons/Waiting.d.vue.ts +3 -0
  104. package/dist/plugins/MagicPlayer/src/components/icons/Waiting.vue.d.ts +2 -1
  105. package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.d.vue.ts +18 -0
  106. package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +3 -2
  107. package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.d.vue.ts +20 -0
  108. package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +3 -2
  109. package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.d.vue.ts +19 -0
  110. package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +4 -20
  111. package/dist/plugins/MagicScroll/src/components/MagicScrollScene.d.vue.ts +20 -0
  112. package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +4 -3
  113. package/dist/plugins/MagicToast/src/components/MagicToastProvider.d.vue.ts +15 -0
  114. package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +1 -1
  115. package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +2 -1
  116. package/dist/plugins/MagicToast/src/components/MagicToastView.d.vue.ts +17 -0
  117. package/dist/plugins/MagicToast/src/components/MagicToastView.vue +7 -3
  118. package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +3 -2
  119. package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +1 -1
  120. package/dist/plugins/MagicToast/src/types/index.d.ts +8 -8
  121. package/package.json +10 -13
  122. /package/dist/plugins/MagicToast/{symbols → src/symbols}/index.d.ts +0 -0
  123. /package/dist/plugins/MagicToast/{symbols → src/symbols}/index.mjs +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "1.0.0-beta.35",
4
+ "version": "1.0.0-beta.37",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > plugins@1.0.0-beta.37 build /Users/robinscholz/Repositories/@maas/vue-equipment/packages/plugins
4
+ > esno ./scripts/build.ts
5
+
@@ -0,0 +1,26 @@
1
+ import '@maas/vue-equipment/utils/css/keyframes/fade-in.css';
2
+ import '@maas/vue-equipment/utils/css/keyframes/auto-size-out.css';
3
+ import '@maas/vue-equipment/utils/css/easings.css';
4
+ interface MagicAccordionContentProps {
5
+ asChild?: boolean;
6
+ transition?: string;
7
+ animation?: {
8
+ duration: number;
9
+ easing: (t: number) => number;
10
+ };
11
+ }
12
+ declare var __VLS_24: {
13
+ viewActive: any;
14
+ };
15
+ type __VLS_Slots = {} & {
16
+ default?: (props: typeof __VLS_24) => any;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -10,13 +10,14 @@ interface MagicAccordionContentProps {
10
10
  };
11
11
  }
12
12
  declare var __VLS_24: {
13
- viewActive: boolean | undefined;
13
+ viewActive: any;
14
14
  };
15
15
  type __VLS_Slots = {} & {
16
16
  default?: (props: typeof __VLS_24) => any;
17
17
  };
18
- declare const __VLS_component: import("vue").DefineComponent<MagicAccordionContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
18
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
20
21
  export default _default;
21
22
  type __VLS_WithSlots<T, S> = T & {
22
23
  new (): {
@@ -0,0 +1,20 @@
1
+ import { type MaybeRef } from 'vue';
2
+ import type { MagicAccordionOptions } from '../types/index.js';
3
+ interface MagicAccordionProviderProps {
4
+ id: MaybeRef<string>;
5
+ asChild?: boolean;
6
+ options?: MagicAccordionOptions;
7
+ }
8
+ declare var __VLS_7: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_7) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -7,8 +7,8 @@
7
7
  <script setup>
8
8
  import { onBeforeUnmount, provide } from "vue";
9
9
  import { Primitive } from "@maas/vue-primitive";
10
- import { MagicAccordionInstanceId } from "../symbols";
11
10
  import { useAccordionState } from "../composables/private/useAccordionState";
11
+ import { MagicAccordionInstanceId } from "../symbols";
12
12
  const { id, asChild, options } = defineProps({
13
13
  id: { type: null, required: true },
14
14
  asChild: { type: Boolean, required: false },
@@ -9,8 +9,9 @@ declare var __VLS_7: {};
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_7) => any;
11
11
  };
12
- declare const __VLS_component: import("vue").DefineComponent<MagicAccordionProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
12
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
14
15
  export default _default;
15
16
  type __VLS_WithSlots<T, S> = T & {
16
17
  new (): {
@@ -0,0 +1,23 @@
1
+ import { type MaybeRef } from 'vue';
2
+ import type { Interaction } from '../types/index.js';
3
+ interface MagicAccordionTriggerProps {
4
+ viewId?: string;
5
+ disabled?: MaybeRef<boolean>;
6
+ trigger?: Interaction;
7
+ asChild?: boolean;
8
+ }
9
+ declare var __VLS_12: {
10
+ viewActive: any;
11
+ };
12
+ type __VLS_Slots = {} & {
13
+ default?: (props: typeof __VLS_12) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -7,13 +7,14 @@ interface MagicAccordionTriggerProps {
7
7
  asChild?: boolean;
8
8
  }
9
9
  declare var __VLS_12: {
10
- viewActive: boolean | undefined;
10
+ viewActive: any;
11
11
  };
12
12
  type __VLS_Slots = {} & {
13
13
  default?: (props: typeof __VLS_12) => any;
14
14
  };
15
- declare const __VLS_component: import("vue").DefineComponent<MagicAccordionTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
15
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
17
18
  export default _default;
18
19
  type __VLS_WithSlots<T, S> = T & {
19
20
  new (): {
@@ -0,0 +1,20 @@
1
+ interface MagicAccordionViewProps {
2
+ id?: string;
3
+ asChild?: boolean;
4
+ active?: boolean;
5
+ }
6
+ declare var __VLS_7: {
7
+ viewActive: any;
8
+ };
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_7) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -2,10 +2,10 @@
2
2
  <primitive
3
3
  :as-child="asChild"
4
4
  :data-id="mappedId"
5
- :data-active="view?.active"
5
+ :data-active="mappedActive"
6
6
  class="magic-accordion-view"
7
7
  >
8
- <slot :view-active="view?.active" />
8
+ <slot :view-active="mappedActive" />
9
9
  </primitive>
10
10
  </template>
11
11
 
@@ -21,7 +21,7 @@ import {
21
21
  MagicAccordionViewId
22
22
  } from "../symbols";
23
23
  import { useAccordionView } from "../composables/private/useAccordionView";
24
- const { id, active } = defineProps({
24
+ const { id, active = false } = defineProps({
25
25
  id: { type: String, required: false },
26
26
  asChild: { type: Boolean, required: false },
27
27
  active: { type: Boolean, required: false }
@@ -40,7 +40,7 @@ const mappedActive = computed(() => view.active);
40
40
  const { initializeView, deleteView } = useAccordionView(instanceId);
41
41
  const view = initializeView({
42
42
  id: mappedId.value,
43
- active: active ?? false
43
+ active
44
44
  });
45
45
  provide(MagicAccordionViewId, mappedId.value);
46
46
  provide(MagicAccordionViewActive, mappedActive);
@@ -4,13 +4,14 @@ interface MagicAccordionViewProps {
4
4
  active?: boolean;
5
5
  }
6
6
  declare var __VLS_7: {
7
- viewActive: boolean;
7
+ viewActive: any;
8
8
  };
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_7) => any;
11
11
  };
12
- declare const __VLS_component: import("vue").DefineComponent<MagicAccordionViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
12
+ declare const __VLS_base: import("vue").DefineComponent<MagicAccordionViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicAccordionViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
14
15
  export default _default;
15
16
  type __VLS_WithSlots<T, S> = T & {
16
17
  new (): {
@@ -1,10 +1,6 @@
1
1
  import { type MaybeRef } from 'vue';
2
- interface UseMagicAccordionArgs {
3
- instanceId: MaybeRef<string>;
4
- }
5
- export declare function useMagicAccordion(args: UseMagicAccordionArgs): {
2
+ export declare function useMagicAccordion(id: MaybeRef<string>): {
6
3
  selectView: (id: string) => void;
7
4
  unselectView: (id: string) => void;
8
5
  };
9
6
  export type UseMagicAccordionReturn = ReturnType<typeof useMagicAccordion>;
10
- export {};
@@ -1,8 +1,7 @@
1
1
  import {} from "vue";
2
2
  import { useAccordionView } from "./private/useAccordionView.mjs";
3
- export function useMagicAccordion(args) {
4
- const { instanceId } = args;
5
- const { selectView, unselectView } = useAccordionView(instanceId);
3
+ export function useMagicAccordion(id) {
4
+ const { selectView, unselectView } = useAccordionView(id);
6
5
  return {
7
6
  selectView,
8
7
  unselectView
@@ -0,0 +1,15 @@
1
+ import '@maas/vue-equipment/utils/css/keyframes/fade-in.css';
2
+ import '@maas/vue-equipment/utils/css/keyframes/fade-out.css';
3
+ declare var __VLS_19: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_19) => any;
6
+ };
7
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -4,8 +4,9 @@ declare var __VLS_19: {};
4
4
  type __VLS_Slots = {} & {
5
5
  default?: (props: typeof __VLS_19) => any;
6
6
  };
7
- 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>;
8
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
9
10
  export default _default;
10
11
  type __VLS_WithSlots<T, S> = T & {
11
12
  new (): {
@@ -0,0 +1,17 @@
1
+ import type { MagicCommandDrawerOptions } from '../types/index.js';
2
+ interface MagicCommandDrawerProps {
3
+ options?: MagicCommandDrawerOptions;
4
+ }
5
+ declare var __VLS_7: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_7) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -6,8 +6,9 @@ declare var __VLS_7: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_7) => any;
8
8
  };
9
- declare const __VLS_component: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
9
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandDrawerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
11
12
  export default _default;
12
13
  type __VLS_WithSlots<T, S> = T & {
13
14
  new (): {
@@ -0,0 +1,27 @@
1
+ interface MagicCommandItemProps {
2
+ id?: string;
3
+ initial?: boolean;
4
+ disabled?: boolean;
5
+ }
6
+ declare var __VLS_1: {
7
+ itemActive: any;
8
+ itemDisabled: boolean;
9
+ };
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_1) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
+ click: (event: MouseEvent) => any;
15
+ enter: () => any;
16
+ }, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
17
+ onClick?: ((event: MouseEvent) => any) | undefined;
18
+ onEnter?: (() => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -37,6 +37,7 @@ import {
37
37
  MagicCommandItemActive,
38
38
  MagicCommandItemDisabled
39
39
  } from "../symbols";
40
+ import { onKeyStroke } from "@vueuse/core";
40
41
  const {
41
42
  id,
42
43
  initial = false,
@@ -46,7 +47,7 @@ const {
46
47
  initial: { type: Boolean, required: false },
47
48
  disabled: { type: Boolean, required: false }
48
49
  });
49
- const emit = defineEmits(["click"]);
50
+ const emit = defineEmits(["click", "enter"]);
50
51
  const magicError = useMagicError({
51
52
  prefix: "MagicCommand",
52
53
  source: "MagicCommand"
@@ -89,9 +90,15 @@ function onClick(event) {
89
90
  emit("click", event);
90
91
  guardedSelect();
91
92
  }
93
+ function onReturn() {
94
+ if (!item.disabled && item.active) {
95
+ emit("enter");
96
+ }
97
+ }
92
98
  provide(MagicCommandItemId, mappedId.value);
93
99
  provide(MagicCommandItemActive, mappedActive);
94
100
  provide(MagicCommandItemDisabled, mappedDisabled);
101
+ onKeyStroke("Enter", onReturn);
95
102
  onMounted(() => {
96
103
  if (initial) {
97
104
  selectItem(mappedId.value);
@@ -4,18 +4,21 @@ interface MagicCommandItemProps {
4
4
  disabled?: boolean;
5
5
  }
6
6
  declare var __VLS_1: {
7
- itemActive: boolean;
7
+ itemActive: any;
8
8
  itemDisabled: boolean;
9
9
  };
10
10
  type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_1) => any;
12
12
  };
13
- declare const __VLS_component: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
14
  click: (event: MouseEvent) => any;
15
+ enter: () => any;
15
16
  }, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
16
17
  onClick?: ((event: MouseEvent) => any) | undefined;
18
+ onEnter?: (() => any) | undefined;
17
19
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
19
22
  export default _default;
20
23
  type __VLS_WithSlots<T, S> = T & {
21
24
  new (): {
@@ -0,0 +1,17 @@
1
+ import type { MagicCommandModalOptions } from '../types/index.js';
2
+ interface MagicCommandProps {
3
+ options?: MagicCommandModalOptions;
4
+ }
5
+ declare var __VLS_7: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_7) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -6,8 +6,9 @@ declare var __VLS_7: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_7) => any;
8
8
  };
9
- 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>;
10
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
9
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
11
12
  export default _default;
12
13
  type __VLS_WithSlots<T, S> = T & {
13
14
  new (): {
@@ -0,0 +1,20 @@
1
+ import { type MaybeRef } from 'vue';
2
+ import type { MagicCommandOptions } from '../types/index.js';
3
+ interface MagicCommandProviderProps {
4
+ id: MaybeRef<string>;
5
+ asChild?: boolean;
6
+ options?: MagicCommandOptions;
7
+ }
8
+ declare var __VLS_7: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_7) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -9,8 +9,9 @@ declare var __VLS_7: {};
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_7) => any;
11
11
  };
12
- 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>;
13
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
12
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
14
15
  export default _default;
15
16
  type __VLS_WithSlots<T, S> = T & {
16
17
  new (): {
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -1,2 +1,3 @@
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>;
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
2
3
  export default _default;
@@ -0,0 +1,24 @@
1
+ import type { Interaction, Action } from '../types/index.js';
2
+ interface MagicCommandTriggerProps {
3
+ viewId?: string;
4
+ disabled?: boolean;
5
+ action?: Action;
6
+ trigger?: Interaction[];
7
+ asChild?: boolean;
8
+ }
9
+ declare var __VLS_12: {
10
+ viewActive: any;
11
+ triggerDisabled: any;
12
+ };
13
+ type __VLS_Slots = {} & {
14
+ default?: (props: typeof __VLS_12) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -31,13 +31,11 @@ import {
31
31
  import { useMagicKeys } from "@vueuse/core";
32
32
  const {
33
33
  viewId,
34
- active = void 0,
35
34
  disabled = void 0,
36
35
  action = "open",
37
36
  trigger = ["click"]
38
37
  } = defineProps({
39
38
  viewId: { type: String, required: false },
40
- active: { type: Boolean, required: false },
41
39
  disabled: { type: Boolean, required: false },
42
40
  action: { type: String, required: false },
43
41
  trigger: { type: Array, required: false },
@@ -63,7 +61,7 @@ magicError.assert(mappedViewId.value, {
63
61
  });
64
62
  const { getView } = useCommandView(instanceId);
65
63
  const view = getView(mappedViewId.value);
66
- const mappedActive = computed(() => active ?? toValue(itemActive) ?? false);
64
+ const mappedActive = computed(() => toValue(itemActive) ?? false);
67
65
  const mappedDisabled = computed(
68
66
  () => disabled ?? toValue(itemDisabled) ?? false
69
67
  );
@@ -1,21 +1,21 @@
1
1
  import type { Interaction, Action } from '../types/index.js';
2
2
  interface MagicCommandTriggerProps {
3
3
  viewId?: string;
4
- active?: boolean;
5
4
  disabled?: boolean;
6
5
  action?: Action;
7
6
  trigger?: Interaction[];
8
7
  asChild?: boolean;
9
8
  }
10
9
  declare var __VLS_12: {
11
- viewActive: boolean | undefined;
12
- triggerDisabled: boolean;
10
+ viewActive: any;
11
+ triggerDisabled: any;
13
12
  };
14
13
  type __VLS_Slots = {} & {
15
14
  default?: (props: typeof __VLS_12) => any;
16
15
  };
17
- 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>;
18
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
16
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
19
  export default _default;
20
20
  type __VLS_WithSlots<T, S> = T & {
21
21
  new (): {
@@ -0,0 +1,19 @@
1
+ interface MagicCommandViewProps {
2
+ id?: string;
3
+ initial?: boolean;
4
+ }
5
+ declare var __VLS_1: {
6
+ viewActive: any;
7
+ };
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -3,13 +3,14 @@ interface MagicCommandViewProps {
3
3
  initial?: boolean;
4
4
  }
5
5
  declare var __VLS_1: {
6
- viewActive: boolean;
6
+ viewActive: any;
7
7
  };
8
8
  type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_1) => any;
10
10
  };
11
- 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>;
12
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
11
+ declare const __VLS_base: import("vue").DefineComponent<MagicCommandViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
13
14
  export default _default;
14
15
  type __VLS_WithSlots<T, S> = T & {
15
16
  new (): {
@@ -51,12 +51,10 @@ export function useCommandItem(args) {
51
51
  const index = view?.items.findIndex(
52
52
  (item) => item.id === activeItem.value?.id
53
53
  );
54
- if (index !== void 0) {
55
- const hasNext = view?.items[index + 1] !== void 0;
56
- if (hasNext) {
57
- selectItem(view?.items[index + 1].id);
58
- } else if (view && loop) {
59
- selectItem(view.items[0].id);
54
+ if (index !== void 0 && view) {
55
+ const nextItem = view.items[index + 1] ?? (loop ? view.items[0] : void 0);
56
+ if (nextItem) {
57
+ selectItem(nextItem.id);
60
58
  }
61
59
  }
62
60
  }
@@ -64,12 +62,10 @@ export function useCommandItem(args) {
64
62
  const index = view?.items.findIndex(
65
63
  (item) => item.id === activeItem.value?.id
66
64
  );
67
- if (index !== void 0) {
68
- const hasPrev = view?.items[index - 1] !== void 0;
69
- if (hasPrev) {
70
- selectItem(view?.items[index - 1].id);
71
- } else if (view && loop) {
72
- selectItem(view.items[view.items.length - 1].id);
65
+ if (index !== void 0 && view) {
66
+ const prevItem = view.items[index - 1] ?? (loop ? view.items[view.items.length - 1] : void 0);
67
+ if (prevItem) {
68
+ selectItem(prevItem.id);
73
69
  }
74
70
  }
75
71
  }