@maas/vue-equipment 0.26.5 → 0.27.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 (66) hide show
  1. package/dist/composables/index.d.mts +19 -18
  2. package/dist/composables/index.d.ts +19 -18
  3. package/dist/composables/index.js +20 -18
  4. package/dist/composables/index.js.map +1 -1
  5. package/dist/composables/index.mjs +38 -19
  6. package/dist/composables/index.mjs.map +1 -1
  7. package/dist/nuxt/module.json +1 -1
  8. package/dist/nuxt/module.mjs +9 -2
  9. package/dist/plugins/MagicCommand/nuxt.d.ts +2 -0
  10. package/dist/plugins/MagicCommand/src/components/MagicCommandBody.vue +4 -4
  11. package/dist/plugins/MagicCommand/src/components/MagicCommandBody.vue.d.ts +1 -0
  12. package/dist/plugins/MagicCookie/nuxt.d.ts +2 -0
  13. package/dist/plugins/MagicDraggable/index.d.ts +5 -0
  14. package/dist/plugins/MagicDraggable/index.mjs +8 -0
  15. package/dist/plugins/MagicDraggable/nuxt.d.ts +2 -0
  16. package/dist/plugins/MagicDraggable/nuxt.mjs +23 -0
  17. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +108 -0
  18. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +41 -0
  19. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +18 -0
  20. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +307 -0
  21. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +34 -0
  22. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +143 -0
  23. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.d.ts +108 -0
  24. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +46 -0
  25. package/dist/plugins/MagicDraggable/src/composables/useDraggableApi.d.ts +1 -0
  26. package/dist/plugins/MagicDraggable/src/composables/useDraggableApi.mjs +2 -0
  27. package/dist/plugins/MagicDraggable/src/types/index.d.ts +48 -0
  28. package/dist/plugins/MagicDraggable/src/types/index.mjs +0 -0
  29. package/dist/plugins/MagicDraggable/src/utils/defaultOptions.d.ts +5 -0
  30. package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +21 -0
  31. package/dist/plugins/MagicDrawer/nuxt.d.ts +2 -0
  32. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +30 -19
  33. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +1 -1
  34. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +4 -2
  35. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +15 -14
  36. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +4 -2
  37. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +13 -11
  38. package/dist/plugins/MagicDrawer/src/types/index.d.ts +21 -15
  39. package/dist/plugins/MagicDrawer/src/utils/defaultOptions.d.ts +4 -1
  40. package/dist/plugins/MagicDrawer/src/utils/defaultOptions.mjs +17 -14
  41. package/dist/plugins/MagicMarquee/nuxt.d.ts +2 -0
  42. package/dist/plugins/MagicModal/nuxt.d.ts +2 -0
  43. package/dist/plugins/MagicModal/src/components/MagicModal.vue +8 -5
  44. package/dist/plugins/MagicModal/src/types/index.d.ts +8 -5
  45. package/dist/plugins/MagicModal/src/utils/defaultOptions.mjs +6 -5
  46. package/dist/plugins/MagicNoise/nuxt.d.ts +2 -0
  47. package/dist/plugins/MagicPlayer/nuxt.d.ts +2 -0
  48. package/dist/plugins/MagicScroll/nuxt.d.ts +2 -0
  49. package/dist/plugins/MagicToast/nuxt.d.ts +2 -0
  50. package/dist/plugins/index.d.ts +1 -0
  51. package/dist/plugins/index.mjs +1 -0
  52. package/dist/utils/index.d.mts +16 -1
  53. package/dist/utils/index.d.ts +16 -1
  54. package/dist/utils/index.js +72 -0
  55. package/dist/utils/index.js.map +1 -1
  56. package/dist/utils/index.mjs +58 -0
  57. package/dist/utils/index.mjs.map +1 -1
  58. package/package.json +16 -4
  59. package/dist/plugins/MagicCommand/demo/DefaultView.vue +0 -84
  60. package/dist/plugins/MagicCommand/demo/DefaultView.vue.d.ts +0 -16
  61. package/dist/plugins/MagicCommand/demo/DemoItem.vue +0 -18
  62. package/dist/plugins/MagicCommand/demo/DemoItem.vue.d.ts +0 -21
  63. package/dist/plugins/MagicCommand/demo/ProjectView.vue +0 -63
  64. package/dist/plugins/MagicCommand/demo/ProjectView.vue.d.ts +0 -14
  65. package/dist/plugins/MagicToast/demo/DemoToast.vue +0 -22
  66. package/dist/plugins/MagicToast/demo/DemoToast.vue.d.ts +0 -18
@@ -1,84 +0,0 @@
1
- <template>
2
- <magic-command-view
3
- id="default-view"
4
- :default="true"
5
- :class="{
6
- 'w-[40rem] max-h-[30rem] rounded-xl overflow-hidden': isModal,
7
- 'w-full h-full': !isModal,
8
- }"
9
- class="bg-neutral-800 border border-solid border-neutral-600 flex flex-col"
10
- >
11
- <magic-command-head class="px-2 pt-2">
12
- <div class="w-full border border-neutral-600 p-3 border-b-solid">
13
- <input type="text" placeholder="Search" />
14
- </div>
15
- </magic-command-head>
16
- <magic-command-body class="h-full py-2">
17
- <magic-command-group>
18
- <span class="p-4 text-xs text-neutral-600">Suggestions</span>
19
- <magic-command-item
20
- v-slot="{ isActive }"
21
- :default="true"
22
- :callback="projectItemCallback"
23
- >
24
- <demo-item :is-active="isActive">View Projects</demo-item>
25
- </magic-command-item>
26
- <magic-command-item v-slot="{ isActive }" :callback="toggleDynamicItem">
27
- <demo-item :is-active="isActive"
28
- >{{ dynamic ? 'Remove' : 'Add ' }} Filter</demo-item
29
- >
30
- </magic-command-item>
31
- </magic-command-group>
32
- <magic-command-group>
33
- <span class="p-4 text-xs text-neutral-600">Filter</span>
34
- <magic-command-item
35
- v-slot="{ isActive }"
36
- v-if="dynamic"
37
- :callback="() => itemCallback('dynamic')"
38
- >
39
- <demo-item :is-active="isActive">All</demo-item>
40
- </magic-command-item>
41
- <magic-command-item
42
- v-for="nth in 20"
43
- :key="nth"
44
- :callback="() => itemCallback(nth)"
45
- v-slot="{ isActive }"
46
- >
47
- <demo-item :is-active="isActive">{{ nth }}</demo-item>
48
- </magic-command-item>
49
- </magic-command-group>
50
- </magic-command-body>
51
- </magic-command-view>
52
- </template>
53
-
54
- <script setup lang="ts">
55
- import { ref, inject } from 'vue'
56
- import { useCommandApi, CommandInstanceId } from '@maas/vue-equipment/plugins'
57
- import DemoItem from './DemoItem.vue'
58
-
59
- interface Props {
60
- hasDynamicItem?: boolean
61
- isModal?: boolean
62
- }
63
-
64
- defineProps<Props>()
65
-
66
- const commandId = inject(CommandInstanceId, '')
67
-
68
- const commandApi = useCommandApi(commandId)
69
- const { selectView } = commandApi
70
-
71
- const dynamic = ref(false)
72
-
73
- function toggleDynamicItem() {
74
- dynamic.value = !dynamic.value
75
- }
76
-
77
- function itemCallback(nth: number | string) {
78
- console.log(nth)
79
- }
80
-
81
- function projectItemCallback() {
82
- selectView('project-view')
83
- }
84
- </script>
@@ -1,16 +0,0 @@
1
- interface Props {
2
- hasDynamicItem?: boolean;
3
- isModal?: boolean;
4
- }
5
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
6
- export default _default;
7
-
8
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
- type __VLS_TypePropsToOption<T> = {
10
- [K in keyof T]-?: {} extends Pick<T, K> ? {
11
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
- } : {
13
- type: import('vue').PropType<T[K]>;
14
- required: true;
15
- };
16
- };
@@ -1,18 +0,0 @@
1
- <template>
2
- <div class="px-2">
3
- <span
4
- class="p-2 flex items-center rounded-md"
5
- :class="{ 'bg-neutral-700': isActive }"
6
- >
7
- <slot />
8
- </span>
9
- </div>
10
- </template>
11
-
12
- <script setup lang="ts">
13
- interface Props {
14
- isActive: boolean
15
- }
16
-
17
- defineProps<Props>()
18
- </script>
@@ -1,21 +0,0 @@
1
- interface Props {
2
- isActive: boolean;
3
- }
4
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>, {
5
- default?(_: {}): any;
6
- }>;
7
- export default _default;
8
- type __VLS_WithTemplateSlots<T, S> = T & {
9
- new (): {
10
- $slots: S;
11
- };
12
- };
13
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
- type __VLS_TypePropsToOption<T> = {
15
- [K in keyof T]-?: {} extends Pick<T, K> ? {
16
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
- } : {
18
- type: import('vue').PropType<T[K]>;
19
- required: true;
20
- };
21
- };
@@ -1,63 +0,0 @@
1
- <template>
2
- <magic-command-view
3
- id="project-view"
4
- :class="{
5
- 'w-[40rem] max-h-[30rem] rounded-xl': isModal,
6
- 'w-full h-full': !isModal,
7
- }"
8
- class="bg-neutral-800 border border-solid border-neutral-600 overflow-hidden flex flex-col"
9
- >
10
- <magic-command-head class="p-2">
11
- <div class="w-full border border-neutral-600 p-3 border-b-solid">
12
- <input type="text" placeholder="Search Projects" />
13
- </div>
14
- </magic-command-head>
15
- <magic-command-body class="h-full pb-2">
16
- <magic-command-group>
17
- <magic-command-item
18
- v-for="nth in 10"
19
- :key="nth"
20
- :callback="() => itemCallback(nth)"
21
- :default="nth === 1"
22
- v-slot="{ isActive }"
23
- >
24
- <demo-item :is-active="isActive">Project {{ nth }}</demo-item>
25
- </magic-command-item>
26
- </magic-command-group>
27
- </magic-command-body>
28
- <magic-command-footer class="px-2">
29
- <div
30
- class="w-full border border-neutral-600 p-2 border-t-solid flex items-center"
31
- >
32
- <button
33
- @click="selectLastView"
34
- class="leading-none text-xs text-neutral-600"
35
- >
36
- Go Back
37
- </button>
38
- </div>
39
- </magic-command-footer>
40
- </magic-command-view>
41
- </template>
42
-
43
- <script setup lang="ts">
44
- import { inject } from 'vue'
45
- import { useCommandApi, CommandInstanceId } from '@maas/vue-equipment/plugins'
46
-
47
- import DemoItem from './DemoItem.vue'
48
-
49
- interface Props {
50
- isModal?: boolean
51
- }
52
-
53
- defineProps<Props>()
54
-
55
- const commandId = inject(CommandInstanceId, '')
56
-
57
- const commandApi = useCommandApi(commandId)
58
- const { selectLastView } = commandApi
59
-
60
- function itemCallback(nth: number) {
61
- console.log(nth)
62
- }
63
- </script>
@@ -1,14 +0,0 @@
1
- interface Props {
2
- isModal?: boolean;
3
- }
4
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
5
- export default _default;
6
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
7
- type __VLS_TypePropsToOption<T> = {
8
- [K in keyof T]-?: {} extends Pick<T, K> ? {
9
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
10
- } : {
11
- type: import('vue').PropType<T[K]>;
12
- required: true;
13
- };
14
- };
@@ -1,22 +0,0 @@
1
- <template>
2
- <div
3
- class="bg-gray-300 text-black rounded-md p-3 w-[250px] max-w-sm text-sm pointer-events-auto cursor-pointer flex items-center"
4
- >
5
- {{ message }}
6
- <button
7
- @click="emit('close')"
8
- class="text-xs bg-gray-900/5 ml-auto p-2 rounded-full"
9
- >
10
- Close
11
- </button>
12
- </div>
13
- </template>
14
-
15
- <script setup lang="ts">
16
- interface Props {
17
- message: string
18
- }
19
-
20
- const emit = defineEmits(['close'])
21
- const props = defineProps<Props>()
22
- </script>
@@ -1,18 +0,0 @@
1
- interface Props {
2
- message: string;
3
- }
4
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
- close: (...args: any[]) => void;
6
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
7
- onClose?: ((...args: any[]) => any) | undefined;
8
- }, {}, {}>;
9
- export default _default;
10
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
- type __VLS_TypePropsToOption<T> = {
12
- [K in keyof T]-?: {} extends Pick<T, K> ? {
13
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
14
- } : {
15
- type: import('vue').PropType<T[K]>;
16
- required: true;
17
- };
18
- };