@maas/vue-equipment 0.34.0 → 0.35.0

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 (138) hide show
  1. package/README.md +4 -1
  2. package/dist/composables/index.d.mts +5 -5
  3. package/dist/composables/index.d.ts +5 -5
  4. package/dist/nuxt/module.d.mts +1 -1
  5. package/dist/nuxt/module.d.ts +1 -1
  6. package/dist/nuxt/module.json +2 -2
  7. package/dist/plugins/MagicAccordion/nuxt.d.ts +1 -1
  8. package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +10 -15
  9. package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +8 -12
  10. package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +57 -31
  11. package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +2 -3
  12. package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +10 -14
  13. package/dist/plugins/MagicAccordion/src/composables/private/useAccordionState.d.ts +1 -1
  14. package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
  15. package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.d.ts +1 -1
  16. package/dist/plugins/MagicAccordion/src/utils/defaultOptions.d.ts +1 -1
  17. package/dist/plugins/MagicAutoSize/nuxt.d.ts +1 -1
  18. package/dist/plugins/MagicAutoSize/src/components/MagicAutoSize.vue.d.ts +11 -29
  19. package/dist/plugins/MagicCommand/nuxt.d.ts +1 -1
  20. package/dist/plugins/MagicCommand/src/components/MagicCommandBody.vue.d.ts +10 -3
  21. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +2 -2
  22. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +8 -12
  23. package/dist/plugins/MagicCommand/src/components/MagicCommandFooter.vue.d.ts +8 -3
  24. package/dist/plugins/MagicCommand/src/components/MagicCommandGroup.vue.d.ts +8 -3
  25. package/dist/plugins/MagicCommand/src/components/MagicCommandHead.vue.d.ts +8 -3
  26. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +2 -2
  27. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +13 -29
  28. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +8 -12
  29. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +9 -25
  30. package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +2 -2
  31. package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +11 -25
  32. package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.d.ts +2 -2
  33. package/dist/plugins/MagicCommand/src/composables/private/useCommandStore.d.ts +7 -0
  34. package/dist/plugins/MagicCommand/src/composables/private/useCommandView.d.ts +2 -2
  35. package/dist/plugins/MagicCommand/src/symbols/index.d.ts +1 -1
  36. package/dist/plugins/MagicCommand/src/types/index.d.ts +2 -2
  37. package/dist/plugins/MagicCommand/src/utils/defaultOptions.d.ts +1 -1
  38. package/dist/plugins/MagicCookie/nuxt.d.ts +1 -1
  39. package/dist/plugins/MagicCookie/src/components/MagicCookie.vue.d.ts +13 -29
  40. package/dist/plugins/MagicCookie/src/composables/private/useCookieApi.d.ts +16 -4
  41. package/dist/plugins/MagicCookie/src/composables/useMagicCookie.d.ts +5 -3
  42. package/dist/plugins/MagicDraggable/index.d.ts +1 -1
  43. package/dist/plugins/MagicDraggable/nuxt.d.ts +1 -1
  44. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +13 -25
  45. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +9 -2
  46. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +7 -1
  47. package/dist/plugins/MagicDraggable/src/utils/defaultOptions.d.ts +1 -1
  48. package/dist/plugins/MagicDrawer/nuxt.d.ts +1 -1
  49. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +7 -2
  50. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +14 -26
  51. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerCallback.d.ts +1 -1
  52. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +12 -1
  53. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +1 -1
  54. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +3 -0
  55. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +4 -4
  56. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.d.ts +1 -1
  57. package/dist/plugins/MagicDrawer/src/composables/useMagicDrawer.d.ts +3 -0
  58. package/dist/plugins/MagicDrawer/src/utils/defaultOptions.d.ts +1 -1
  59. package/dist/plugins/MagicEmitter/nuxt.d.ts +1 -1
  60. package/dist/plugins/MagicMarquee/nuxt.d.ts +1 -1
  61. package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +1 -1
  62. package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +15 -30
  63. package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +2 -2
  64. package/dist/plugins/MagicMenu/nuxt.d.ts +1 -1
  65. package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +8 -12
  66. package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +12 -26
  67. package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +12 -13
  68. package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +2 -3
  69. package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +16 -18
  70. package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +10 -12
  71. package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +11 -15
  72. package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +57 -15
  73. package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +2 -3
  74. package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +8 -12
  75. package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.d.ts +1 -1
  76. package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.d.ts +1 -1
  77. package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +7 -4
  78. package/dist/plugins/MagicMenu/src/composables/private/useMenuRemote.d.ts +1 -1
  79. package/dist/plugins/MagicMenu/src/composables/private/useMenuState.d.ts +1 -1
  80. package/dist/plugins/MagicMenu/src/utils/defaultOptions.d.ts +1 -1
  81. package/dist/plugins/MagicModal/nuxt.d.ts +1 -1
  82. package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +12 -26
  83. package/dist/plugins/MagicModal/src/composables/private/useModalCallback.d.ts +1 -1
  84. package/dist/plugins/MagicModal/src/composables/private/useModalStore.d.ts +1 -1
  85. package/dist/plugins/MagicModal/src/utils/defaultOptions.d.ts +1 -1
  86. package/dist/plugins/MagicNoise/nuxt.d.ts +1 -1
  87. package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +2 -23
  88. package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +2 -2
  89. package/dist/plugins/MagicPlayer/nuxt.d.ts +1 -1
  90. package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayer.vue.d.ts +12 -27
  91. package/dist/plugins/MagicPlayer/src/components/MagicAudioPlayerControls.vue.d.ts +12 -13
  92. package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue +1 -1
  93. package/dist/plugins/MagicPlayer/src/components/MagicPlayer.vue.d.ts +12 -33
  94. package/dist/plugins/MagicPlayer/src/components/MagicPlayerControls.vue.d.ts +21 -33
  95. package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +2 -23
  96. package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -10
  97. package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +11 -15
  98. package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +8 -12
  99. package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +1 -10
  100. package/dist/plugins/MagicPlayer/src/components/icons/FullscreenEnter.vue.d.ts +1 -1
  101. package/dist/plugins/MagicPlayer/src/components/icons/FullscreenExit.vue.d.ts +1 -1
  102. package/dist/plugins/MagicPlayer/src/components/icons/Pause.vue.d.ts +1 -1
  103. package/dist/plugins/MagicPlayer/src/components/icons/Play.vue.d.ts +1 -1
  104. package/dist/plugins/MagicPlayer/src/components/icons/VolumeOff.vue.d.ts +1 -1
  105. package/dist/plugins/MagicPlayer/src/components/icons/VolumeOn.vue.d.ts +1 -1
  106. package/dist/plugins/MagicPlayer/src/components/icons/Waiting.vue.d.ts +1 -1
  107. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +2 -2
  108. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +17 -7
  109. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +12 -11
  110. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +2 -2
  111. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +1 -1
  112. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +3 -3
  113. package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +32 -22
  114. package/dist/plugins/MagicScroll/nuxt.d.ts +1 -1
  115. package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +10 -12
  116. package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +11 -25
  117. package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +27 -43
  118. package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +13 -29
  119. package/dist/plugins/MagicScroll/src/components/MagicScrollTransform.vue.d.ts +9 -39
  120. package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetect.d.ts +29 -1
  121. package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +1 -1
  122. package/dist/plugins/MagicToast/nuxt.d.ts +1 -1
  123. package/dist/plugins/MagicToast/src/components/MagicToast.vue +4 -4
  124. package/dist/plugins/MagicToast/src/components/MagicToast.vue.d.ts +1 -10
  125. package/dist/plugins/MagicToast/src/components/MagicToastComponent.vue.d.ts +13 -15
  126. package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +8 -1
  127. package/dist/plugins/MagicToast/src/composables/private/useToastInternalApi.d.ts +1 -1
  128. package/dist/plugins/MagicToast/src/composables/private/useToastInternalApi.mjs +3 -1
  129. package/dist/plugins/MagicToast/src/composables/private/useToastStore.d.ts +11 -1
  130. package/dist/plugins/MagicToast/src/composables/useMagicToast.d.ts +1 -1
  131. package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
  132. package/dist/utils/index.d.mts +1 -3
  133. package/dist/utils/index.d.ts +1 -3
  134. package/dist/utils/index.js +2 -12
  135. package/dist/utils/index.js.map +1 -1
  136. package/dist/utils/index.mjs +1 -10
  137. package/dist/utils/index.mjs.map +1 -1
  138. package/package.json +7 -7
@@ -3,22 +3,18 @@ interface MagicCommandProps {
3
3
  options?: MagicCommandModalOptions;
4
4
  }
5
5
  declare function __VLS_template(): {
6
- default?(_: {}): any;
6
+ slots: {
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ attrs: Partial<{}>;
7
11
  };
8
- declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<MagicCommandProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCommandProps>>>, {}, {}>;
9
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ 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>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
10
15
  export default _default;
11
16
  type __VLS_WithTemplateSlots<T, S> = T & {
12
17
  new (): {
13
18
  $slots: S;
14
19
  };
15
20
  };
16
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
- type __VLS_TypePropsToOption<T> = {
18
- [K in keyof T]-?: {} extends Pick<T, K> ? {
19
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
- } : {
21
- type: import('vue').PropType<T[K]>;
22
- required: true;
23
- };
24
- };
@@ -5,36 +5,20 @@ interface MagicCommandProps {
5
5
  options?: MagicCommandOptions;
6
6
  }
7
7
  declare function __VLS_template(): {
8
- default?(_: {}): any;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ attrs: Partial<{}>;
9
13
  };
10
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCommandProps>, {
11
- options: () => MagicCommandOptions;
12
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCommandProps>, {
13
- options: () => MagicCommandOptions;
14
- }>>>, {
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import("vue").DefineComponent<MagicCommandProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandProps> & Readonly<{}>, {
15
16
  options: MagicCommandOptions;
16
- }, {}>;
17
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
19
  export default _default;
19
- type __VLS_WithDefaults<P, D> = {
20
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
21
- default: D[K];
22
- }> : P[K];
23
- };
24
- type __VLS_Prettify<T> = {
25
- [K in keyof T]: T[K];
26
- } & {};
27
20
  type __VLS_WithTemplateSlots<T, S> = T & {
28
21
  new (): {
29
22
  $slots: S;
30
23
  };
31
24
  };
32
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
- type __VLS_TypePropsToOption<T> = {
34
- [K in keyof T]-?: {} extends Pick<T, K> ? {
35
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
- } : {
37
- type: import('vue').PropType<T[K]>;
38
- required: true;
39
- };
40
- };
@@ -14,8 +14,8 @@ import {
14
14
  onUnmounted,
15
15
  watch,
16
16
  nextTick,
17
+ useId,
17
18
  } from 'vue'
18
- import { uuid } from '@maas/vue-equipment/utils'
19
19
  import { useCommandStore } from '../composables/private/useCommandStore'
20
20
  import { useCommandView } from '../composables/private/useCommandView'
21
21
  import { MagicCommandInstanceId } from '../symbols'
@@ -34,7 +34,7 @@ const elRef = ref<HTMLElement | undefined>(undefined)
34
34
  const { activeView, selectView } = useCommandView()
35
35
 
36
36
  const mappedId = computed(() => {
37
- return props.id ?? uuid()
37
+ return props.id ?? useId() ?? ''
38
38
  })
39
39
 
40
40
  const isActive = computed(() => {
@@ -3,36 +3,22 @@ interface MagicCommandViewProps {
3
3
  default?: boolean;
4
4
  }
5
5
  declare function __VLS_template(): {
6
- default?(_: {}): any;
6
+ slots: {
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {
10
+ elRef: HTMLDivElement;
11
+ };
12
+ attrs: Partial<{}>;
7
13
  };
8
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCommandViewProps>, {
9
- default: boolean;
10
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCommandViewProps>, {
11
- default: boolean;
12
- }>>>, {
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import("vue").DefineComponent<MagicCommandViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCommandViewProps> & Readonly<{}>, {
13
16
  default: boolean;
14
- }, {}>;
15
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
19
  export default _default;
17
- type __VLS_WithDefaults<P, D> = {
18
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
19
- default: D[K];
20
- }> : P[K];
21
- };
22
- type __VLS_Prettify<T> = {
23
- [K in keyof T]: T[K];
24
- } & {};
25
20
  type __VLS_WithTemplateSlots<T, S> = T & {
26
21
  new (): {
27
22
  $slots: S;
28
23
  };
29
24
  };
30
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
- type __VLS_TypePropsToOption<T> = {
32
- [K in keyof T]-?: {} extends Pick<T, K> ? {
33
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
34
- } : {
35
- type: import('vue').PropType<T[K]>;
36
- required: true;
37
- };
38
- };
@@ -4,6 +4,6 @@ export declare function useCommandItem(id: MaybeRef<string>): {
4
4
  prevItem: (loop?: boolean) => void;
5
5
  selectItem: (id: string) => void;
6
6
  selectLastItem: () => void;
7
- activeItem: import("vue").Ref<string | undefined>;
8
- lastActiveItem: import("vue").Ref<string | undefined>;
7
+ activeItem: import("vue").Ref<string | undefined, string | undefined>;
8
+ lastActiveItem: import("vue").Ref<string | undefined, string | undefined>;
9
9
  };
@@ -15,6 +15,13 @@ export declare function useCommandStore(): {
15
15
  id: string;
16
16
  }[];
17
17
  views: string[];
18
+ }[], CommandInstance[] | {
19
+ id: string;
20
+ items: {
21
+ index: number;
22
+ id: string;
23
+ }[];
24
+ views: string[];
18
25
  }[]>;
19
26
  addInstance: (id: string) => void;
20
27
  findInstance: (id: string) => CommandInstance;
@@ -1,6 +1,6 @@
1
1
  export declare function useCommandView(): {
2
2
  selectView: (id: string) => void;
3
3
  selectLastView: () => void;
4
- activeView: import("vue").Ref<string | undefined>;
5
- lastActiveView: import("vue").Ref<string | undefined>;
4
+ activeView: import("vue").Ref<string | undefined, string | undefined>;
5
+ lastActiveView: import("vue").Ref<string | undefined, string | undefined>;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import type { InjectionKey, MaybeRef } from 'vue';
2
- import type { MagicCommandOptions } from '../types.js';
2
+ import type { MagicCommandOptions } from '../types/index.js';
3
3
  declare const MagicCommandInstanceId: InjectionKey<MaybeRef<string>>;
4
4
  declare const MagicCommandProviderOptions: InjectionKey<MagicCommandOptions>;
5
5
  export { MagicCommandInstanceId, MagicCommandProviderOptions };
@@ -1,5 +1,5 @@
1
- import type { MagicModalOptions } from '../../../MagicModal.js';
2
- import type { MagicDrawerOptions } from '../../../MagicDrawer.js';
1
+ import type { MagicModalOptions } from '../../../MagicModal/index.js';
2
+ import type { MagicDrawerOptions } from '../../../MagicDrawer/index.js';
3
3
  export type MagicCommandOptions = {
4
4
  keys?: {
5
5
  open?: string[] | false;
@@ -1,4 +1,4 @@
1
- import type { MagicCommandOptions } from '../types.js';
1
+ import type { MagicCommandOptions } from '../types/index.js';
2
2
  import type { RequireAllNested } from '@maas/vue-equipment/utils';
3
3
  declare const defaultOptions: RequireAllNested<MagicCommandOptions>;
4
4
  type DefaultOptions = typeof defaultOptions;
@@ -1,2 +1,2 @@
1
- declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions>;
1
+ declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions, import("@nuxt/schema").ModuleOptions, false>;
2
2
  export default _default;
@@ -3,40 +3,24 @@ type MagicCookieProps = {
3
3
  cookies: MagicCookieRecord[];
4
4
  maxAge?: number;
5
5
  };
6
- declare function __VLS_template(): Partial<Record<string, (_: {
7
- cookie: MagicCookieRecord;
8
- }) => any>> & {
9
- default?(_: {}): any;
10
- actions?(_: {}): any;
6
+ declare function __VLS_template(): {
7
+ slots: Partial<Record<string, (_: {
8
+ cookie: MagicCookieRecord;
9
+ }) => any>> & {
10
+ default?(_: {}): any;
11
+ actions?(_: {}): any;
12
+ };
13
+ refs: {};
14
+ attrs: Partial<{}>;
11
15
  };
12
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCookieProps>, {
13
- maxAge: number;
14
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicCookieProps>, {
15
- maxAge: number;
16
- }>>>, {
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: import("vue").DefineComponent<MagicCookieProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieProps> & Readonly<{}>, {
17
18
  maxAge: number;
18
- }, {}>;
19
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
21
  export default _default;
21
- type __VLS_WithDefaults<P, D> = {
22
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
23
- default: D[K];
24
- }> : P[K];
25
- };
26
- type __VLS_Prettify<T> = {
27
- [K in keyof T]: T[K];
28
- } & {};
29
22
  type __VLS_WithTemplateSlots<T, S> = T & {
30
23
  new (): {
31
24
  $slots: S;
32
25
  };
33
26
  };
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
- };
@@ -1,4 +1,4 @@
1
- import type { MagicCookieRecord } from '../../types.js';
1
+ import type { MagicCookieRecord } from '../../types/index.js';
2
2
  type UseCookieApiArgs = {
3
3
  cookies: MagicCookieRecord[];
4
4
  maxAge?: number;
@@ -7,9 +7,21 @@ export declare const cookieApiStore: import("vue").Ref<{
7
7
  cookies: {
8
8
  [x: string]: unknown;
9
9
  key: string;
10
- optional?: boolean;
11
- title?: string;
12
- text?: string;
10
+ optional?: boolean | undefined;
11
+ title?: string | undefined;
12
+ text?: string | undefined;
13
+ }[];
14
+ maxAge: number | undefined;
15
+ }, {
16
+ cookies: MagicCookieRecord[];
17
+ maxAge: number | undefined;
18
+ } | {
19
+ cookies: {
20
+ [x: string]: unknown;
21
+ key: string;
22
+ optional?: boolean | undefined;
23
+ title?: string | undefined;
24
+ text?: string | undefined;
13
25
  }[];
14
26
  maxAge: number | undefined;
15
27
  }>;
@@ -1,10 +1,12 @@
1
- import type { MagicCookieConsent } from '../types.js';
1
+ import type { MagicCookieConsent } from '../types/index.js';
2
2
  export declare function useMagicCookie(): {
3
- preferencesVisible: import("vue").Ref<boolean>;
3
+ preferencesVisible: import("vue").Ref<boolean, boolean>;
4
4
  selectedCookies: import("vue").Ref<{
5
5
  [key: string]: boolean;
6
+ }, {
7
+ [key: string]: boolean;
6
8
  }>;
7
- cookieConsent: import("vue").WritableComputedRef<MagicCookieConsent>;
9
+ cookieConsent: import("vue").WritableComputedRef<MagicCookieConsent, MagicCookieConsent>;
8
10
  toggleSelection: (key: string) => void;
9
11
  accept: () => void;
10
12
  acceptSelected: () => void;
@@ -1,6 +1,6 @@
1
1
  import type { Plugin } from 'vue';
2
2
  import MagicDraggable from './src/components/MagicDraggable.vue.js';
3
- import type { MagicDraggableOptions } from './src/types.js';
3
+ import type { MagicDraggableOptions } from './src/types/index.js';
4
4
  declare const MagicDraggablePlugin: Plugin;
5
5
  export { MagicDraggablePlugin, MagicDraggable };
6
6
  export type { MagicDraggableOptions };
@@ -1,2 +1,2 @@
1
- declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions>;
1
+ declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions, import("@nuxt/schema").ModuleOptions, false>;
2
2
  export default _default;
@@ -6,36 +6,24 @@ interface MagicDraggableProps {
6
6
  options?: MagicDraggableOptions;
7
7
  }
8
8
  declare function __VLS_template(): {
9
- default?(_: {}): any;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {
13
+ drawerRef: HTMLDivElement;
14
+ wrapperRef: HTMLDivElement;
15
+ elRef: unknown;
16
+ };
17
+ attrs: Partial<{}>;
10
18
  };
11
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicDraggableProps>, {
12
- options: () => any;
13
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicDraggableProps>, {
14
- options: () => any;
15
- }>>>, {
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import("vue").DefineComponent<MagicDraggableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicDraggableProps> & Readonly<{}>, {
16
21
  options: MagicDraggableOptions;
17
- }, {}>;
18
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
24
  export default _default;
20
- type __VLS_WithDefaults<P, D> = {
21
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
22
- default: D[K];
23
- }> : P[K];
24
- };
25
- type __VLS_Prettify<T> = {
26
- [K in keyof T]: T[K];
27
- } & {};
28
25
  type __VLS_WithTemplateSlots<T, S> = T & {
29
26
  new (): {
30
27
  $slots: S;
31
28
  };
32
29
  };
33
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
- type __VLS_TypePropsToOption<T> = {
35
- [K in keyof T]-?: {} extends Pick<T, K> ? {
36
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
37
- } : {
38
- type: import('vue').PropType<T[K]>;
39
- required: true;
40
- };
41
- };
@@ -227,7 +227,7 @@ export function useDraggableDrag(args) {
227
227
  });
228
228
  return closestSnapPoint;
229
229
  }
230
- function onPointerup(_e) {
230
+ function onPointerup(e) {
231
231
  if (!momentumThresholdReached.value && distanceThresholdReached.value) {
232
232
  interpolateTo.value = findClosestSnapPoint();
233
233
  }
@@ -255,6 +255,7 @@ export function useDraggableDrag(args) {
255
255
  resetStateAndListeners();
256
256
  unlockScroll();
257
257
  removeScrollLockPadding();
258
+ elRef.value?.releasePointerCapture(e.pointerId);
258
259
  }
259
260
  function onPointermove(e) {
260
261
  if (!e.isPrimary) {
@@ -297,6 +298,7 @@ export function useDraggableDrag(args) {
297
298
  if (dragging.value) {
298
299
  return;
299
300
  } else {
301
+ elRef.value?.setPointerCapture(e.pointerId);
300
302
  dragging.value = true;
301
303
  emitter.emit("beforeDrag", {
302
304
  id: toValue(id),
@@ -309,7 +311,12 @@ export function useDraggableDrag(args) {
309
311
  lastDraggedX.value = draggedX.value;
310
312
  lastDraggedY.value = draggedY.value;
311
313
  cancelPointerup = useEventListener(document, "pointerup", onPointerup);
312
- cancelPointermove = useEventListener(document, "pointermove", onPointermove);
314
+ cancelPointermove = useEventListener(
315
+ document,
316
+ "pointermove",
317
+ onPointermove,
318
+ { passive: false }
319
+ );
313
320
  cancelTouchend = isIOS() ? useEventListener(document, "touchend", onPointerup) : void 0;
314
321
  originX.value = e.screenX - draggedX.value;
315
322
  originY.value = e.screenY - draggedY.value;
@@ -1,6 +1,6 @@
1
1
  import { type MaybeRef, type Ref } from 'vue';
2
2
  import { type DefaultOptions } from '../../utils/defaultOptions.js';
3
- import type { DraggableSnapPoint, Coordinates } from '../../types.js';
3
+ import type { DraggableSnapPoint, Coordinates } from '../../types/index.js';
4
4
  type UseDraggableSnapArgs = {
5
5
  id: MaybeRef<string>;
6
6
  elRect: Ref<DOMRect | undefined>;
@@ -24,8 +24,14 @@ type SnapToArgs = {
24
24
  export declare function useDraggableSnap(args: UseDraggableSnapArgs): {
25
25
  mappedSnapPoints: import("@vueuse/core").ComputedRefWithControl<Coordinates[]>;
26
26
  activeSnapPoint: Ref<("center" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right") | ["center" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right", offset?: {
27
+ x?: number | undefined;
28
+ y?: number | undefined;
29
+ } | undefined] | undefined, "center" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right" | ["center" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right", offset?: {
27
30
  x?: number;
28
31
  y?: number;
32
+ } | undefined] | ["center" | "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right", offset?: {
33
+ x?: number | undefined;
34
+ y?: number | undefined;
29
35
  } | undefined] | undefined>;
30
36
  snapPointsMap: import("@vueuse/core").ComputedRefWithControl<Record<string, DraggableSnapPoint>>;
31
37
  mapSnapPoint: (snapPoint: DraggableSnapPoint) => Coordinates | undefined;
@@ -1,4 +1,4 @@
1
- import type { MagicDraggableOptions } from '../types.js';
1
+ import type { MagicDraggableOptions } from '../types/index.js';
2
2
  import type { RequireAll } from '@maas/vue-equipment/utils';
3
3
  type DefaultOptions = RequireAll<MagicDraggableOptions> & {
4
4
  threshold: RequireAll<MagicDraggableOptions['threshold']>;
@@ -1,2 +1,2 @@
1
- declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions>;
1
+ declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions, import("@nuxt/schema").ModuleOptions, false>;
2
2
  export default _default;
@@ -90,6 +90,7 @@ import { useDrawerProgress } from '../composables/private/useDrawerProgress'
90
90
  import { useDrawerDrag } from '../composables/private/useDrawerDrag'
91
91
  import { useDrawerWheel } from '../composables/private/useDrawerWheel'
92
92
  import { useDrawerState } from '../composables/private/useDrawerState'
93
+ import { useMagicDrawer } from '../composables/useMagicDrawer'
93
94
 
94
95
  import type { MagicDrawerOptions } from '../types/index'
95
96
 
@@ -103,7 +104,6 @@ import '@maas/vue-equipment/utils/css/animations/slide-ltr-out.css'
103
104
  import '@maas/vue-equipment/utils/css/animations/slide-rtl-out.css'
104
105
  import '@maas/vue-equipment/utils/css/animations/slide-ttb-out.css'
105
106
  import '@maas/vue-equipment/utils/css/animations/slide-btt-out.css'
106
- import { useMagicDrawer } from '../composables/useMagicDrawer'
107
107
 
108
108
  defineOptions({
109
109
  inheritAttrs: false,
@@ -309,7 +309,12 @@ function guardedClose() {
309
309
 
310
310
  function saveOvershoot() {
311
311
  const element = unrefElement(drawerRef)
312
- const overshootVar = getComputedStyle(element!).getPropertyValue(
312
+
313
+ if (!element) {
314
+ return
315
+ }
316
+
317
+ const overshootVar = getComputedStyle(element, null).getPropertyValue(
313
318
  '--magic-drawer-drag-overshoot'
314
319
  )
315
320
  overshoot.value = convertToPixels(overshootVar) || 0
@@ -16,37 +16,25 @@ interface MagicDrawerProps {
16
16
  options?: MagicDrawerOptions;
17
17
  }
18
18
  declare function __VLS_template(): {
19
- backdrop?(_: {}): any;
20
- default?(_: {}): any;
19
+ slots: {
20
+ backdrop?(_: {}): any;
21
+ default?(_: {}): any;
22
+ };
23
+ refs: {
24
+ drawerRef: HTMLDivElement;
25
+ wrapperRef: HTMLDivElement;
26
+ elRef: unknown;
27
+ };
28
+ attrs: Partial<{}>;
21
29
  };
22
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicDrawerProps>, {
23
- options: () => any;
24
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MagicDrawerProps>, {
25
- options: () => any;
26
- }>>>, {
30
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
31
+ declare const __VLS_component: import("vue").DefineComponent<MagicDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicDrawerProps> & Readonly<{}>, {
27
32
  options: MagicDrawerOptions;
28
- }, {}>;
29
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
33
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
35
  export default _default;
31
- type __VLS_WithDefaults<P, D> = {
32
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
33
- default: D[K];
34
- }> : P[K];
35
- };
36
- type __VLS_Prettify<T> = {
37
- [K in keyof T]: T[K];
38
- } & {};
39
36
  type __VLS_WithTemplateSlots<T, S> = T & {
40
37
  new (): {
41
38
  $slots: S;
42
39
  };
43
40
  };
44
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
45
- type __VLS_TypePropsToOption<T> = {
46
- [K in keyof T]-?: {} extends Pick<T, K> ? {
47
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
48
- } : {
49
- type: import('vue').PropType<T[K]>;
50
- required: true;
51
- };
52
- };
@@ -1,5 +1,5 @@
1
1
  import { type Ref, type MaybeRef } from 'vue';
2
- import type { MagicDrawerOptions } from '../../types.js';
2
+ import type { MagicDrawerOptions } from '../../types/index.js';
3
3
  type UseDrawerCallbackArgs = {
4
4
  id: MaybeRef<string>;
5
5
  mappedOptions: MagicDrawerOptions;
@@ -344,14 +344,19 @@ export function useDrawerDrag(args) {
344
344
  if (hasDragged.value) {
345
345
  e.preventDefault();
346
346
  }
347
+ elRef.value?.releasePointerCapture(e.pointerId);
347
348
  }
348
349
  function onPointermove(e) {
350
+ console.log("onPointermove", e);
349
351
  if (e.isTrusted && wheeling.value) {
350
352
  return;
351
353
  }
352
354
  if (e.isTrusted && !e.isPrimary) {
353
355
  return;
354
356
  }
357
+ e.stopImmediatePropagation();
358
+ e.stopPropagation();
359
+ e.preventDefault();
355
360
  shouldClose.value = false;
356
361
  checkDirection({ x: e.screenX, y: e.screenY });
357
362
  if (!scrollLock) {
@@ -377,6 +382,7 @@ export function useDrawerDrag(args) {
377
382
  if (dragging.value) {
378
383
  return;
379
384
  } else {
385
+ elRef.value?.setPointerCapture(e.pointerId);
380
386
  dragging.value = true;
381
387
  emitter.emit("beforeDrag", {
382
388
  id: toValue(id),
@@ -387,7 +393,12 @@ export function useDrawerDrag(args) {
387
393
  lastDraggedX.value = draggedX.value;
388
394
  lastDraggedY.value = draggedY.value;
389
395
  cancelPointerup = useEventListener(document, "pointerup", onPointerup);
390
- cancelPointermove = useEventListener(document, "pointermove", onPointermove);
396
+ cancelPointermove = useEventListener(
397
+ document,
398
+ "pointermove",
399
+ onPointermove,
400
+ { passive: false }
401
+ );
391
402
  cancelTouchend = isIOS() ? useEventListener(document, "touchend", onPointerup) : void 0;
392
403
  originX.value = e.screenX - draggedX.value;
393
404
  originY.value = e.screenY - draggedY.value;
@@ -1,6 +1,6 @@
1
1
  import { type Ref, type MaybeRef } from 'vue';
2
2
  import { type DefaultOptions } from '../../utils/defaultOptions.js';
3
- import { type DrawerSnapPoint } from '../../types.js';
3
+ import { type DrawerSnapPoint } from '../../types/index.js';
4
4
  interface UseDrawerGuardsArgs {
5
5
  elRef: Ref<HTMLElement | undefined>;
6
6
  absDirectionX: MaybeRef<'with' | 'against' | undefined>;
@@ -11,6 +11,9 @@ export declare function useDrawerProgress(args: UseDrawerProgressArgs): {
11
11
  progress: Ref<{
12
12
  x: number;
13
13
  y: number;
14
+ }, {
15
+ x: number;
16
+ y: number;
14
17
  }>;
15
18
  };
16
19
  export {};
@@ -1,6 +1,6 @@
1
1
  import { type MaybeRef, type Ref } from 'vue';
2
2
  import { type DefaultOptions } from '../../utils/defaultOptions.js';
3
- import { type DrawerSnapPoint } from '../../types.js';
3
+ import { type DrawerSnapPoint } from '../../types/index.js';
4
4
  type UseDrawerSnapArgs = {
5
5
  id: MaybeRef<string>;
6
6
  wrapperRect: Ref<DOMRect | undefined>;
@@ -28,9 +28,9 @@ type InterpolateDraggedArgs = {
28
28
  easing?: (t: number) => number;
29
29
  };
30
30
  export declare function useDrawerSnap(args: UseDrawerSnapArgs): {
31
- snappedY: Ref<number>;
32
- snappedX: Ref<number>;
33
- activeSnapPoint: Ref<DrawerSnapPoint | undefined>;
31
+ snappedY: Ref<number, number>;
32
+ snappedX: Ref<number, number>;
33
+ activeSnapPoint: Ref<DrawerSnapPoint | undefined, DrawerSnapPoint | undefined>;
34
34
  snapTo: (args: SnapToArgs) => Promise<void>;
35
35
  findClosestSnapPoint: (args: FindClosestSnapPointArgs) => number | undefined;
36
36
  interpolateDragged: (args: InterpolateDraggedArgs) => void;
@@ -3,5 +3,5 @@ import type { DrawerState } from '../../types/index.js';
3
3
  export declare function useDrawerState(id: MaybeRef<string>): {
4
4
  initializeState: () => import("vue").ToRefs<DrawerState>;
5
5
  deleteState: () => void;
6
- drawerStateStore: Ref<DrawerState[]>;
6
+ drawerStateStore: Ref<DrawerState[], DrawerState[]>;
7
7
  };