@maas/vue-equipment 1.0.0-beta.2 → 1.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/README.md +2 -2
  2. package/dist/composables/index.d.ts +5 -5
  3. package/dist/composables/index.js +23 -13
  4. package/dist/composables/index.js.map +1 -1
  5. package/dist/nuxt/module.d.mts +2 -1
  6. package/dist/nuxt/module.json +2 -2
  7. package/dist/nuxt/module.mjs +9 -2
  8. package/dist/nuxt/types.d.mts +3 -1
  9. package/dist/plugins/.turbo/turbo-lint.log +2 -10
  10. package/dist/plugins/MagicAccordion/nuxt.d.ts +1 -1
  11. package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +59 -82
  12. package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +35 -22
  13. package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +17 -31
  14. package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +12 -21
  15. package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +57 -62
  16. package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +23 -59
  17. package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +34 -45
  18. package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +17 -22
  19. package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
  20. package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.mjs +1 -0
  21. package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.mjs +1 -0
  22. package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.mjs +1 -0
  23. package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
  24. package/dist/plugins/MagicCommand/nuxt.d.ts +1 -1
  25. package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +146 -152
  26. package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +24 -13
  27. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +42 -52
  28. package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +12 -21
  29. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +72 -87
  30. package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +29 -28
  31. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +37 -47
  32. package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +12 -21
  33. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +61 -77
  34. package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +12 -58
  35. package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +23 -39
  36. package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +80 -86
  37. package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +25 -60
  38. package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +36 -48
  39. package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +15 -22
  40. package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.d.ts +2 -2
  41. package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +1 -1
  42. package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +1 -1
  43. package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.mjs +1 -0
  44. package/dist/plugins/MagicCommand/src/symbols/index.d.ts +4 -4
  45. package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -1
  46. package/dist/plugins/MagicCookie/nuxt.d.ts +1 -1
  47. package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +34 -41
  48. package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +13 -22
  49. package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +19 -36
  50. package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +9 -21
  51. package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +40 -72
  52. package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +21 -12
  53. package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +0 -1
  54. package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
  55. package/dist/plugins/MagicDraggable/nuxt.d.ts +1 -1
  56. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +81 -100
  57. package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +94 -22
  58. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
  59. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +43 -63
  60. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
  61. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +2 -15
  62. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +117 -64
  63. package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +6 -5
  64. package/dist/plugins/MagicDraggable/src/types/index.d.ts +2 -1
  65. package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +1 -1
  66. package/dist/plugins/MagicDrawer/nuxt.d.ts +1 -1
  67. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +271 -308
  68. package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +165 -23
  69. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +34 -14
  70. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -2
  71. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +3 -3
  72. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +1 -1
  73. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.mjs +28 -10
  74. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +2 -2
  75. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +3 -3
  76. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +16 -14
  77. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +1 -1
  78. package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +1 -1
  79. package/dist/plugins/MagicDrawer/src/types/index.mjs +1 -0
  80. package/dist/plugins/MagicEmitter/nuxt.d.ts +1 -1
  81. package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +100 -100
  82. package/dist/plugins/MagicMarquee/nuxt.d.ts +1 -1
  83. package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +38 -72
  84. package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +14 -25
  85. package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +1 -1
  86. package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +8 -2
  87. package/dist/plugins/MagicMarquee/src/composables/useMagicMarquee.d.ts +1 -1
  88. package/dist/plugins/MagicMenu/nuxt.d.ts +1 -1
  89. package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +51 -63
  90. package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +18 -21
  91. package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +178 -214
  92. package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +41 -24
  93. package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +171 -198
  94. package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +40 -25
  95. package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +87 -113
  96. package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +31 -28
  97. package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +82 -81
  98. package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +12 -58
  99. package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +63 -86
  100. package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +19 -23
  101. package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +94 -97
  102. package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +27 -60
  103. package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +49 -61
  104. package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +15 -22
  105. package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +1 -1
  106. package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +15 -5
  107. package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +3 -3
  108. package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +4 -4
  109. package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +35 -15
  110. package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +6 -2
  111. package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
  112. package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +2 -0
  113. package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +18 -6
  114. package/dist/plugins/MagicMenu/src/composables/useMagicMenu.mjs +1 -0
  115. package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
  116. package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.d.ts +2 -2
  117. package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.mjs +2 -2
  118. package/dist/plugins/MagicModal/nuxt.d.ts +1 -1
  119. package/dist/plugins/MagicModal/src/components/MagicModal.vue +133 -168
  120. package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +44 -21
  121. package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
  122. package/dist/plugins/MagicModal/src/types/index.mjs +1 -0
  123. package/dist/plugins/MagicNoise/nuxt.d.ts +1 -1
  124. package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +50 -81
  125. package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -10
  126. package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
  127. package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +2 -2
  128. package/dist/plugins/MagicPie/index.d.ts +7 -0
  129. package/dist/plugins/MagicPie/index.mjs +8 -0
  130. package/dist/plugins/MagicPie/nuxt.d.ts +2 -0
  131. package/dist/plugins/MagicPie/nuxt.mjs +23 -0
  132. package/dist/plugins/MagicPie/src/components/MagicPie.vue +168 -0
  133. package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +7 -0
  134. package/dist/plugins/MagicPie/src/composables/private/usePieState.d.ts +6 -0
  135. package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +33 -0
  136. package/dist/plugins/MagicPie/src/composables/useMagicPie.d.ts +13 -0
  137. package/dist/plugins/MagicPie/src/composables/useMagicPie.mjs +43 -0
  138. package/dist/plugins/MagicPie/src/types/index.d.ts +9 -0
  139. package/dist/plugins/MagicPie/src/types/index.mjs +0 -0
  140. package/dist/plugins/MagicPlayer/nuxt.d.ts +1 -1
  141. package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +58 -63
  142. package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +99 -127
  143. package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +30 -26
  144. package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +32 -42
  145. package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -10
  146. package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +106 -105
  147. package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -10
  148. package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +51 -76
  149. package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +29 -14
  150. package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +18 -37
  151. package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +12 -11
  152. package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +41 -55
  153. package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +23 -23
  154. package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +60 -109
  155. package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +74 -71
  156. package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +163 -209
  157. package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +63 -33
  158. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +0 -4
  159. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +6 -47
  160. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +7 -34
  161. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +154 -235
  162. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +3 -17
  163. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +17 -157
  164. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +2 -3
  165. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +7 -25
  166. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +7 -0
  167. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +56 -0
  168. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +3 -8
  169. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +7 -62
  170. package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +32 -51
  171. package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +49 -2
  172. package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +5 -2
  173. package/dist/plugins/MagicPlayer/src/symbols/index.mjs +10 -1
  174. package/dist/plugins/MagicPlayer/src/types/index.d.ts +29 -0
  175. package/dist/plugins/MagicScroll/nuxt.d.ts +1 -1
  176. package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +54 -61
  177. package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +9 -23
  178. package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +56 -71
  179. package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +9 -23
  180. package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +26 -33
  181. package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +45 -37
  182. package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +63 -71
  183. package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +13 -24
  184. package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
  185. package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +16 -6
  186. package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +2 -2
  187. package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +41 -26
  188. package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
  189. package/dist/plugins/MagicToast/nuxt.d.ts +1 -1
  190. package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +94 -118
  191. package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -10
  192. package/dist/plugins/MagicToast/src/components/MagicToastView.vue +54 -81
  193. package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +24 -23
  194. package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +2 -2
  195. package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +5 -5
  196. package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +22 -22
  197. package/dist/plugins/MagicToast/src/composables/private/useToastListener.mjs +1 -0
  198. package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +33 -15
  199. package/dist/plugins/MagicToast/src/composables/private/useToastView.mjs +1 -0
  200. package/dist/plugins/MagicToast/src/composables/useMagicToast.d.ts +1 -0
  201. package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +10 -2
  202. package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
  203. package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
  204. package/dist/plugins/index.d.ts +1 -0
  205. package/dist/plugins/index.mjs +1 -0
  206. package/dist/utils/index.d.ts +9 -4
  207. package/dist/utils/index.js +39 -3
  208. package/dist/utils/index.js.map +1 -1
  209. package/package.json +17 -8
  210. package/dist/nuxt/module.cjs +0 -5
  211. package/dist/nuxt/module.d.ts +0 -9
  212. package/dist/nuxt/types.d.ts +0 -1
  213. package/dist/plugins/MagicAccordion/demo/data/footer.json +0 -117
  214. package/dist/plugins/MagicCommand/demo/data/about.json +0 -3
  215. package/dist/plugins/MagicCommand/demo/data/search.json +0 -594
  216. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +0 -15
  217. package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.mjs +0 -9
@@ -1,7 +1,14 @@
1
- <script>
2
- import { defineComponent as _defineComponent } from "vue";
3
- import { unref as _unref, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
4
- const _hoisted_1 = ["data-optional", "data-active"];
1
+ <template>
2
+ <div
3
+ class="magic-cookie-item"
4
+ :data-optional="item.optional"
5
+ :data-active="item.active"
6
+ >
7
+ <slot :item="item" />
8
+ </div>
9
+ </template>
10
+
11
+ <script setup>
5
12
  import { computed, inject, provide, onBeforeUnmount, useId } from "vue";
6
13
  import { useCookieItem } from "../composables/private/useCookieItem";
7
14
  import {
@@ -9,43 +16,29 @@ import {
9
16
  MagicCookieItemId,
10
17
  MagicCookieItemActive
11
18
  } from "../symbols";
12
- export default /* @__PURE__ */ _defineComponent({
13
- __name: "MagicCookieItem",
14
- props: {
15
- id: { type: String, required: false },
16
- optional: { type: Boolean, required: false },
17
- maxAge: { type: Number, required: false }
18
- },
19
- setup(__props) {
20
- const instanceId = inject(MagicCookieInstanceId, void 0);
21
- if (!instanceId) {
22
- throw new Error("MagicCookieItem must be nested inside MagicCookieProvider");
23
- }
24
- const mappedId = computed(() => __props.id ?? `magic-cookie-item-${useId()}`);
25
- const mappedActive = computed(() => item.active);
26
- const { initializeItem, deleteItem } = useCookieItem({
27
- instanceId
28
- });
29
- const item = initializeItem({
30
- id: mappedId.value,
31
- optional: __props.optional,
32
- maxAge: __props.maxAge
33
- });
34
- provide(MagicCookieItemId, mappedId.value);
35
- provide(MagicCookieItemActive, mappedActive);
36
- onBeforeUnmount(() => {
37
- deleteItem(mappedId.value);
38
- });
39
- return (_ctx, _cache) => {
40
- return _openBlock(), _createElementBlock("div", {
41
- class: "magic-cookie-item",
42
- "data-optional": _unref(item).optional,
43
- "data-active": _unref(item).active
44
- }, [
45
- _renderSlot(_ctx.$slots, "default", { item: _unref(item) })
46
- ], 8, _hoisted_1);
47
- };
48
- }
19
+ const { id, optional, maxAge } = defineProps({
20
+ id: { type: String, required: false },
21
+ optional: { type: Boolean, required: false },
22
+ maxAge: { type: Number, required: false }
23
+ });
24
+ const instanceId = inject(MagicCookieInstanceId, void 0);
25
+ if (!instanceId) {
26
+ throw new Error("MagicCookieItem must be nested inside MagicCookieProvider");
27
+ }
28
+ const mappedId = computed(() => id ?? `magic-cookie-item-${useId()}`);
29
+ const mappedActive = computed(() => item.active);
30
+ const { initializeItem, deleteItem } = useCookieItem({
31
+ instanceId
32
+ });
33
+ const item = initializeItem({
34
+ id: mappedId.value,
35
+ optional,
36
+ maxAge
37
+ });
38
+ provide(MagicCookieItemId, mappedId.value);
39
+ provide(MagicCookieItemActive, mappedActive);
40
+ onBeforeUnmount(() => {
41
+ deleteItem(mappedId.value);
49
42
  });
50
43
  </script>
51
44
 
@@ -3,30 +3,21 @@ interface MagicCookieItemProps {
3
3
  optional?: boolean;
4
4
  maxAge?: number;
5
5
  }
6
- declare function __VLS_template(): {
7
- attrs: Partial<{}>;
8
- slots: {
9
- default?(_: {
10
- item: import("../types").CookieItem;
11
- }): any;
12
- };
13
- refs: {};
14
- rootEl: HTMLDivElement;
6
+ declare const item: import("../types/index.js").CookieItem;
7
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
8
+ declare var __VLS_1: {
9
+ item: import("../types/index.js").CookieItem;
15
10
  };
16
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
- declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCookieItemProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCookieItemProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
11
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
12
+ default?: (props: typeof __VLS_1) => any;
13
+ }>;
14
+ declare const __VLS_self: import("vue").DefineComponent<MagicCookieItemProps, {
15
+ item: typeof item;
16
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_component: import("vue").DefineComponent<MagicCookieItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
19
19
  export default _default;
20
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
- type __VLS_TypePropsToOption<T> = {
22
- [K in keyof T]-?: {} extends Pick<T, K> ? {
23
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
- } : {
25
- type: import('vue').PropType<T[K]>;
26
- required: true;
27
- };
28
- };
29
- type __VLS_WithTemplateSlots<T, S> = T & {
20
+ type __VLS_WithSlots<T, S> = T & {
30
21
  new (): {
31
22
  $slots: S;
32
23
  };
@@ -1,43 +1,26 @@
1
- <script>
2
- import { defineComponent as _defineComponent } from "vue";
3
- import { renderSlot as _renderSlot, mergeProps as _mergeProps, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
1
+ <template>
2
+ <client-only>
3
+ <div class="magic-cookie-provider" v-bind="$attrs">
4
+ <slot />
5
+ </div>
6
+ </client-only>
7
+ </template>
8
+
9
+ <script setup>
4
10
  import { provide } from "vue";
5
11
  import { defu } from "defu";
6
12
  import { useCookieState } from "../composables/private/useCookieState";
7
13
  import { defaultOptions } from "../utils/defaultOptions";
8
14
  import { MagicCookieInstanceId } from "../symbols";
9
- export default /* @__PURE__ */ _defineComponent({
10
- ...{
11
- inheritAttrs: false
12
- },
13
- __name: "MagicCookieProvider",
14
- props: {
15
- id: { type: null, required: true },
16
- options: { type: Object, required: false }
17
- },
18
- setup(__props) {
19
- const mappedOptions = defu(__props.options, defaultOptions);
20
- const { initializeState } = useCookieState(__props.id);
21
- initializeState(mappedOptions);
22
- provide(MagicCookieInstanceId, __props.id);
23
- return (_ctx, _cache) => {
24
- const _component_client_only = _resolveComponent("client-only");
25
- return _openBlock(), _createBlock(_component_client_only, null, {
26
- default: _withCtx(() => [
27
- _createElementVNode(
28
- "div",
29
- _mergeProps({ class: "magic-cookie-provider" }, _ctx.$attrs),
30
- [
31
- _renderSlot(_ctx.$slots, "default")
32
- ],
33
- 16
34
- /* FULL_PROPS */
35
- )
36
- ]),
37
- _: 3
38
- /* FORWARDED */
39
- });
40
- };
41
- }
15
+ defineOptions({
16
+ inheritAttrs: false
42
17
  });
18
+ const { id, options } = defineProps({
19
+ id: { type: null, required: true },
20
+ options: { type: Object, required: false }
21
+ });
22
+ const mappedOptions = defu(options, defaultOptions);
23
+ const { initializeState } = useCookieState(id);
24
+ initializeState(mappedOptions);
25
+ provide(MagicCookieInstanceId, id);
43
26
  </script>
@@ -4,28 +4,16 @@ type MagicCookieProviderProps = {
4
4
  id: MaybeRef<string>;
5
5
  options?: MagicCookieOptions;
6
6
  };
7
- declare function __VLS_template(): {
8
- attrs: Partial<{}>;
9
- slots: {
10
- default?(_: {}): any;
11
- };
12
- refs: {};
13
- rootEl: any;
14
- };
15
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
- declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCookieProviderProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<MagicCookieProviderProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
17
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
7
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
8
+ declare var __VLS_6: {};
9
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
10
+ default?: (props: typeof __VLS_6) => any;
11
+ }>;
12
+ declare const __VLS_self: import("vue").DefineComponent<MagicCookieProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_component: import("vue").DefineComponent<MagicCookieProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicCookieProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
18
15
  export default _default;
19
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
- type __VLS_TypePropsToOption<T> = {
21
- [K in keyof T]-?: {} extends Pick<T, K> ? {
22
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
- } : {
24
- type: import('vue').PropType<T[K]>;
25
- required: true;
26
- };
27
- };
28
- type __VLS_WithTemplateSlots<T, S> = T & {
16
+ type __VLS_WithSlots<T, S> = T & {
29
17
  new (): {
30
18
  $slots: S;
31
19
  };
@@ -1,7 +1,27 @@
1
- <script>
2
- import { defineComponent as _defineComponent } from "vue";
3
- import { unref as _unref, renderSlot as _renderSlot, vShow as _vShow, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
4
- const _hoisted_1 = { class: "magic-cookie-view__inner" };
1
+ <template>
2
+ <div
3
+ class="magic-cookie-view"
4
+ :style="{ '--mc-duration': `${state.options.animation?.duration}ms` }"
5
+ >
6
+ <auto-size :width="false">
7
+ <transition
8
+ :name="state.options.transition"
9
+ @before-leave="onBeforeLeave"
10
+ @leave="onLeave"
11
+ @after-leave="onAfterLeave"
12
+ @before-enter="onBeforeEnter"
13
+ @enter="onEnter"
14
+ @after-enter="onAfterEnter"
15
+ >
16
+ <div v-show="state.viewActive" class="magic-cookie-view__inner">
17
+ <slot :view-active="state.viewActive" />
18
+ </div>
19
+ </transition>
20
+ </auto-size>
21
+ </div>
22
+ </template>
23
+
24
+ <script setup>
5
25
  import { inject } from "vue";
6
26
  import { AutoSize } from "@maas/vue-autosize";
7
27
  import { useCookieState } from "../composables/private/useCookieState";
@@ -9,74 +29,22 @@ import { useCookieCallback } from "../composables/private/useCookieCallback";
9
29
  import { MagicCookieInstanceId } from "../symbols";
10
30
  import "@maas/vue-equipment/utils/css/animations/fade-in.css";
11
31
  import "@maas/vue-equipment/utils/css/animations/auto-size-out.css";
12
- export default /* @__PURE__ */ _defineComponent({
13
- __name: "MagicCookieView",
14
- setup(__props) {
15
- const instanceId = inject(MagicCookieInstanceId, void 0);
16
- if (!instanceId) {
17
- throw new Error(
18
- "MagicCookiePreferences must be used within a MagicCookieProvider"
19
- );
20
- }
21
- const { initializeState } = useCookieState(instanceId);
22
- const state = initializeState();
23
- const {
24
- onBeforeEnter,
25
- onEnter,
26
- onAfterEnter,
27
- onBeforeLeave,
28
- onLeave,
29
- onAfterLeave
30
- } = useCookieCallback(instanceId);
31
- return (_ctx, _cache) => {
32
- return _openBlock(), _createElementBlock(
33
- "div",
34
- {
35
- class: "magic-cookie-view",
36
- style: _normalizeStyle({ "--mc-duration": `${_unref(state).options.animation?.duration}ms` })
37
- },
38
- [
39
- _createVNode(_unref(AutoSize), { width: false }, {
40
- default: _withCtx(() => [
41
- _createVNode(_Transition, {
42
- name: _unref(state).options.transition,
43
- onBeforeLeave: _unref(onBeforeLeave),
44
- onLeave: _unref(onLeave),
45
- onAfterLeave: _unref(onAfterLeave),
46
- onBeforeEnter: _unref(onBeforeEnter),
47
- onEnter: _unref(onEnter),
48
- onAfterEnter: _unref(onAfterEnter),
49
- persisted: ""
50
- }, {
51
- default: _withCtx(() => [
52
- _withDirectives(_createElementVNode(
53
- "div",
54
- _hoisted_1,
55
- [
56
- _renderSlot(_ctx.$slots, "default", {
57
- viewActive: _unref(state).viewActive
58
- })
59
- ],
60
- 512
61
- /* NEED_PATCH */
62
- ), [
63
- [_vShow, _unref(state).viewActive]
64
- ])
65
- ]),
66
- _: 3
67
- /* FORWARDED */
68
- }, 8, ["name", "onBeforeLeave", "onLeave", "onAfterLeave", "onBeforeEnter", "onEnter", "onAfterEnter"])
69
- ]),
70
- _: 3
71
- /* FORWARDED */
72
- })
73
- ],
74
- 4
75
- /* STYLE */
76
- );
77
- };
78
- }
79
- });
32
+ const instanceId = inject(MagicCookieInstanceId, void 0);
33
+ if (!instanceId) {
34
+ throw new Error(
35
+ "MagicCookiePreferences must be used within a MagicCookieProvider"
36
+ );
37
+ }
38
+ const { initializeState } = useCookieState(instanceId);
39
+ const state = initializeState();
40
+ const {
41
+ onBeforeEnter,
42
+ onEnter,
43
+ onAfterEnter,
44
+ onBeforeLeave,
45
+ onLeave,
46
+ onAfterLeave
47
+ } = useCookieCallback(instanceId);
80
48
  </script>
81
49
 
82
50
  <style>
@@ -1,20 +1,29 @@
1
+ import { AutoSize } from '@maas/vue-autosize';
1
2
  import '@maas/vue-equipment/utils/css/animations/fade-in.css';
2
3
  import '@maas/vue-equipment/utils/css/animations/auto-size-out.css';
3
- declare function __VLS_template(): {
4
- attrs: Partial<{}>;
5
- slots: {
6
- default?(_: {
7
- viewActive: boolean;
8
- }): any;
9
- };
10
- refs: {};
11
- rootEl: HTMLDivElement;
4
+ declare const state: import("../types/index.js").CookieState;
5
+ declare const onBeforeEnter: () => void, onEnter: () => void, onAfterEnter: () => Promise<void>, onBeforeLeave: () => void, onLeave: () => void, onAfterLeave: () => void;
6
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
7
+ declare var __VLS_18: {
8
+ viewActive: boolean;
12
9
  };
13
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
11
+ default?: (props: typeof __VLS_18) => any;
12
+ }>;
13
+ declare const __VLS_self: import("vue").DefineComponent<{}, {
14
+ AutoSize: typeof AutoSize;
15
+ state: typeof state;
16
+ onBeforeEnter: typeof onBeforeEnter;
17
+ onEnter: typeof onEnter;
18
+ onAfterEnter: typeof onAfterEnter;
19
+ onBeforeLeave: typeof onBeforeLeave;
20
+ onLeave: typeof onLeave;
21
+ onAfterLeave: typeof onAfterLeave;
22
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
23
  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>;
15
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
16
25
  export default _default;
17
- type __VLS_WithTemplateSlots<T, S> = T & {
26
+ type __VLS_WithSlots<T, S> = T & {
18
27
  new (): {
19
28
  $slots: S;
20
29
  };
@@ -22,7 +22,6 @@ export function useCookieItem(args) {
22
22
  timestamp,
23
23
  maxAge
24
24
  };
25
- console.log(item);
26
25
  return reactive(item);
27
26
  }
28
27
  function addItem(args2) {
@@ -1,5 +1,5 @@
1
- import type { InjectionKey, MaybeRef } from 'vue';
1
+ import type { InjectionKey, MaybeRef, Ref } from 'vue';
2
2
  declare const MagicCookieInstanceId: InjectionKey<MaybeRef<string>>;
3
3
  declare const MagicCookieItemId: InjectionKey<string>;
4
- declare const MagicCookieItemActive: InjectionKey<MaybeRef<boolean>>;
4
+ declare const MagicCookieItemActive: InjectionKey<Ref<boolean>>;
5
5
  export { MagicCookieInstanceId, MagicCookieItemId, MagicCookieItemActive };
@@ -1,2 +1,2 @@
1
- declare const _default: import("@nuxt/schema").NuxtModule<import("@nuxt/schema").ModuleOptions, import("@nuxt/schema").ModuleOptions, false>;
1
+ declare const _default: import("nuxt/schema").NuxtModule<import("nuxt/schema").ModuleOptions, import("nuxt/schema").ModuleOptions, false>;
2
2
  export default _default;
@@ -1,103 +1,84 @@
1
- <script>
2
- import { defineComponent as _defineComponent } from "vue";
3
- import { unref as _unref, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, withCtx as _withCtx, createBlock as _createBlock, createElementVNode as _createElementVNode, mergeProps as _mergeProps } from "vue";
4
- const _hoisted_1 = ["id"];
5
- const _hoisted_2 = {
6
- key: 0,
7
- class: "magic-draggable__overlay"
8
- };
9
- import { ref, computed, toValue, toRefs } from "vue";
10
- import { defu } from "defu";
1
+ <template>
2
+ <div
3
+ :data-id="mappedId"
4
+ :data-dragging="dragging"
5
+ :data-disabled="disabled"
6
+ class="magic-draggable"
7
+ v-bind="$attrs"
8
+ >
9
+ <div ref="wrapper" class="magic-draggable__wrapper">
10
+ <component
11
+ :is="mappedOptions.tag"
12
+ ref="el"
13
+ class="magic-draggable__drag"
14
+ :style="style"
15
+ @pointerdown="guardedPointerdown"
16
+ @click="guardedClick"
17
+ >
18
+ <slot />
19
+ <div v-if="hasDragged" class="magic-draggable__overlay" />
20
+ </component>
21
+ </div>
22
+ </div>
23
+ </template>
24
+
25
+ <script setup>
26
+ import { useTemplateRef, computed, toValue, toRefs } from "vue";
27
+ import { createDefu } from "defu";
11
28
  import { useDraggableDrag } from "../composables/private/useDraggableDrag";
12
29
  import { useDraggableState } from "../composables/private/useDraggableState";
13
30
  import { defaultOptions } from "../utils/defaultOptions";
14
- export default /* @__PURE__ */ _defineComponent({
15
- ...{
16
- inheritAttrs: false
17
- },
18
- __name: "MagicDraggable",
19
- props: {
20
- id: { type: null, required: true },
21
- options: { type: Object, required: false, default: () => ({}) }
22
- },
23
- setup(__props) {
24
- const mappedOptions = defu(__props.options, defaultOptions);
25
- const elRef = ref(void 0);
26
- const wrapperRef = ref(void 0);
27
- const { initializeState } = useDraggableState(__props.id);
28
- const state = initializeState();
29
- const { dragging } = toRefs(state);
30
- const disabled = computed(() => {
31
- if (__props.options.disabled === void 0) {
32
- return defaultOptions.disabled;
33
- } else {
34
- return __props.options.disabled;
35
- }
36
- });
37
- const { snapPoints, animation, initial, threshold, scrollLock } = mappedOptions;
38
- const { onPointerdown, onClick, style, hasDragged } = useDraggableDrag({
39
- id: __props.id,
40
- elRef,
41
- wrapperRef,
42
- threshold,
43
- snapPoints,
44
- animation,
45
- initial,
46
- scrollLock
47
- });
48
- function guardedPointerdown(event) {
49
- if (!disabled.value) {
50
- onPointerdown(event);
51
- }
52
- }
53
- function guardedClick(event) {
54
- if (!disabled.value) {
55
- onClick(event);
56
- }
57
- }
58
- return (_ctx, _cache) => {
59
- return _openBlock(), _createElementBlock("div", _mergeProps({
60
- id: toValue(_ctx.id),
61
- ref: "drawerRef",
62
- class: [
63
- "magic-draggable",
64
- {
65
- "-dragging": _unref(dragging),
66
- "-disabled": disabled.value
67
- }
68
- ]
69
- }, _ctx.$attrs), [
70
- _createElementVNode(
71
- "div",
72
- {
73
- ref_key: "wrapperRef",
74
- ref: wrapperRef,
75
- class: "magic-draggable__wrapper"
76
- },
77
- [
78
- (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(mappedOptions).tag), {
79
- ref_key: "elRef",
80
- ref: elRef,
81
- class: "magic-draggable__drag",
82
- style: _normalizeStyle(_unref(style)),
83
- onPointerdown: guardedPointerdown,
84
- onClick: guardedClick
85
- }, {
86
- default: _withCtx(() => [
87
- _renderSlot(_ctx.$slots, "default"),
88
- _unref(hasDragged) ? (_openBlock(), _createElementBlock("div", _hoisted_2)) : _createCommentVNode("v-if", true)
89
- ]),
90
- _: 3
91
- /* FORWARDED */
92
- }, 40, ["style"]))
93
- ],
94
- 512
95
- /* NEED_PATCH */
96
- )
97
- ], 16, _hoisted_1);
98
- };
31
+ defineOptions({
32
+ inheritAttrs: false
33
+ });
34
+ const { id, options = {} } = defineProps({
35
+ id: { type: null, required: true },
36
+ options: { type: Object, required: false }
37
+ });
38
+ const customDefu = createDefu((obj, key, value) => {
39
+ if (key === "snapPoints") {
40
+ obj[key] = value;
41
+ return true;
42
+ }
43
+ });
44
+ const mappedOptions = customDefu(options, defaultOptions);
45
+ const mappedId = toValue(id);
46
+ if (!mappedOptions.snapPoints.length) {
47
+ throw new Error("MagicDraggable must have at least one snap point set");
48
+ }
49
+ const elRef = useTemplateRef("el");
50
+ const wrapperRef = useTemplateRef("wrapper");
51
+ const { initializeState } = useDraggableState(id);
52
+ const state = initializeState();
53
+ const { dragging } = toRefs(state);
54
+ const disabled = computed(() => {
55
+ if (options.disabled === void 0) {
56
+ return defaultOptions.disabled;
57
+ } else {
58
+ return options.disabled;
99
59
  }
100
60
  });
61
+ const { snapPoints, animation, initial, threshold, scrollLock } = mappedOptions;
62
+ const { onPointerdown, onClick, style, hasDragged } = useDraggableDrag({
63
+ id,
64
+ elRef,
65
+ wrapperRef,
66
+ threshold,
67
+ snapPoints,
68
+ animation,
69
+ initial,
70
+ scrollLock
71
+ });
72
+ function guardedPointerdown(event) {
73
+ if (!disabled.value) {
74
+ onPointerdown(event);
75
+ }
76
+ }
77
+ function guardedClick(event) {
78
+ if (!disabled.value) {
79
+ onClick(event);
80
+ }
81
+ }
101
82
  </script>
102
83
 
103
84
  <style>
@@ -114,7 +95,7 @@ export default /* @__PURE__ */ _defineComponent({
114
95
  border: none;
115
96
  }
116
97
 
117
- .magic-draggable.-disabled {
98
+ .magic-draggable[data-disabled='true'] {
118
99
  pointer-events: none;
119
100
  }
120
101
 
@@ -125,7 +106,7 @@ export default /* @__PURE__ */ _defineComponent({
125
106
  }
126
107
 
127
108
  .magic-draggable__drag {
128
- cursor: grab;
109
+ cursor: var(--magic-draggable-cursor, grab);
129
110
  user-select: none;
130
111
  pointer-events: auto;
131
112
  position: relative;
@@ -136,12 +117,12 @@ export default /* @__PURE__ */ _defineComponent({
136
117
  touch-action: none;
137
118
  }
138
119
 
139
- .magic-draggable.-dragging .magic-draggable__drag {
140
- cursor: grabbing;
120
+ .magic-draggable[data-dragging='true'] .magic-draggable__drag {
121
+ cursor: var(--magic-draggable-cursor-dragging, grabbing);
141
122
  user-select: none;
142
123
  }
143
124
 
144
- .magic-draggable.-disabled .magic-draggable__drag {
125
+ .magic-draggable[data-disabled='true'] .magic-draggable__drag {
145
126
  cursor: default;
146
127
  }
147
128