@maas/vue-equipment 1.0.0-beta.2 → 1.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/composables/index.d.ts +5 -5
- package/dist/composables/index.js +23 -13
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.d.mts +2 -1
- package/dist/nuxt/module.json +2 -2
- package/dist/nuxt/module.mjs +9 -2
- package/dist/nuxt/types.d.mts +3 -1
- package/dist/plugins/.turbo/turbo-lint.log +2 -10
- package/dist/plugins/MagicAccordion/nuxt.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +59 -82
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +35 -22
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +17 -31
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +12 -21
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +57 -62
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +23 -59
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +34 -45
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +17 -22
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +146 -152
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +24 -13
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +42 -52
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +72 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +29 -28
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +37 -47
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +61 -77
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +23 -39
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +80 -86
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +25 -60
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +36 -48
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +15 -22
- package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.mjs +1 -0
- package/dist/plugins/MagicCommand/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicCookie/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +34 -41
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +13 -22
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +19 -36
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +9 -21
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +40 -72
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +21 -12
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +0 -1
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +81 -100
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +94 -22
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +43 -63
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +2 -15
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +117 -64
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +6 -5
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +2 -1
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/MagicDrawer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +271 -308
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +165 -23
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +34 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.mjs +28 -10
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +16 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/types/index.mjs +1 -0
- package/dist/plugins/MagicEmitter/nuxt.d.ts +1 -1
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +100 -100
- package/dist/plugins/MagicMarquee/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +38 -72
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +14 -25
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +8 -2
- package/dist/plugins/MagicMarquee/src/composables/useMagicMarquee.d.ts +1 -1
- package/dist/plugins/MagicMenu/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +51 -63
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +18 -21
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +178 -214
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +41 -24
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +171 -198
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +40 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +87 -113
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +31 -28
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +82 -81
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +63 -86
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +19 -23
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +94 -97
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +27 -60
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +49 -61
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +15 -22
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +15 -5
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +4 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +35 -15
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +6 -2
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +2 -0
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +18 -6
- package/dist/plugins/MagicMenu/src/composables/useMagicMenu.mjs +1 -0
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.mjs +2 -2
- package/dist/plugins/MagicModal/nuxt.d.ts +1 -1
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +133 -168
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +44 -21
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
- package/dist/plugins/MagicModal/src/types/index.mjs +1 -0
- package/dist/plugins/MagicNoise/nuxt.d.ts +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +50 -81
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -10
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +2 -2
- package/dist/plugins/MagicPie/index.d.ts +7 -0
- package/dist/plugins/MagicPie/index.mjs +8 -0
- package/dist/plugins/MagicPie/nuxt.d.ts +2 -0
- package/dist/plugins/MagicPie/nuxt.mjs +23 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +168 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +7 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.d.ts +6 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +33 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.d.ts +13 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.mjs +43 -0
- package/dist/plugins/MagicPie/src/types/index.d.ts +9 -0
- package/dist/plugins/MagicPie/src/types/index.mjs +0 -0
- package/dist/plugins/MagicPlayer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +58 -63
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +99 -127
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +30 -26
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +32 -42
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +106 -105
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +51 -76
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +29 -14
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +18 -37
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +12 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +41 -55
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +23 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +60 -109
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +74 -71
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +163 -209
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +63 -33
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +0 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +6 -47
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +7 -34
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +154 -235
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +3 -17
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +17 -157
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +2 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +7 -25
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +7 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +56 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +3 -8
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +7 -62
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +32 -51
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +49 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +5 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +10 -1
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +29 -0
- package/dist/plugins/MagicScroll/nuxt.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +54 -61
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +56 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +26 -33
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +45 -37
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +63 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +13 -24
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +16 -6
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +41 -26
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/nuxt.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +94 -118
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -10
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +54 -81
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +24 -23
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +2 -2
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +5 -5
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +22 -22
- package/dist/plugins/MagicToast/src/composables/private/useToastListener.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +33 -15
- package/dist/plugins/MagicToast/src/composables/private/useToastView.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.d.ts +1 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +10 -2
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/utils/index.d.ts +9 -4
- package/dist/utils/index.js +39 -3
- package/dist/utils/index.js.map +1 -1
- package/package.json +17 -8
- package/dist/nuxt/module.cjs +0 -5
- package/dist/nuxt/module.d.ts +0 -9
- package/dist/nuxt/types.d.ts +0 -1
- package/dist/plugins/MagicAccordion/demo/data/footer.json +0 -117
- package/dist/plugins/MagicCommand/demo/data/about.json +0 -3
- package/dist/plugins/MagicCommand/demo/data/search.json +0 -594
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +0 -15
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.mjs +0 -9
|
@@ -1,89 +1,62 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<li
|
|
3
|
+
class="magic-toast-view"
|
|
4
|
+
:data-id="id"
|
|
5
|
+
:data-expanded="state.expanded"
|
|
6
|
+
:data-dragging="view.dragging"
|
|
7
|
+
:data-position="state.options.position"
|
|
8
|
+
:data-debug="state.options.debug"
|
|
9
|
+
:style="{
|
|
10
|
+
'--mt-index': reversedIndex,
|
|
11
|
+
'--mt-offset': offset,
|
|
12
|
+
'--mt-height': height
|
|
13
|
+
}"
|
|
14
|
+
>
|
|
15
|
+
<div
|
|
16
|
+
class="magic-toast-view__inner"
|
|
17
|
+
@pointerdown="onPointerdown"
|
|
18
|
+
@click="onClick"
|
|
19
|
+
>
|
|
20
|
+
<div :style="style" class="magic-toast-view__drag">
|
|
21
|
+
<slot />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</li>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { computed, inject } from "vue";
|
|
6
29
|
import { MagicToastInstanceId } from "../../symbols";
|
|
7
30
|
import { useToastState } from "../composables/private/useToastState";
|
|
8
31
|
import { useToastDrag } from "../composables/private/useToastDrag";
|
|
9
32
|
import "@maas/vue-equipment/utils/css/transitions/fade.css";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
const { style, onPointerdown, onClick } = useToastDrag({
|
|
33
|
-
view: view.value,
|
|
34
|
-
instanceId
|
|
35
|
-
});
|
|
36
|
-
return (_ctx, _cache) => {
|
|
37
|
-
return _openBlock(), _createElementBlock("li", {
|
|
38
|
-
id: _ctx.id,
|
|
39
|
-
ref_key: "elRef",
|
|
40
|
-
ref: elRef,
|
|
41
|
-
class: "magic-toast-view",
|
|
42
|
-
"data-expanded": _unref(state).expanded,
|
|
43
|
-
"data-dragging": view.value.dragging,
|
|
44
|
-
"data-position": _unref(state).options.position,
|
|
45
|
-
"data-debug": _unref(state).options.debug,
|
|
46
|
-
style: _normalizeStyle({
|
|
47
|
-
"--mt-index": reversedIndex.value,
|
|
48
|
-
"--mt-offset": offset.value,
|
|
49
|
-
"--mt-height": height.value
|
|
50
|
-
})
|
|
51
|
-
}, [
|
|
52
|
-
_createElementVNode(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
class: "magic-toast-view__inner",
|
|
56
|
-
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
57
|
-
(...args) => _unref(onPointerdown) && _unref(onPointerdown)(...args)),
|
|
58
|
-
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
59
|
-
(...args) => _unref(onClick) && _unref(onClick)(...args))
|
|
60
|
-
},
|
|
61
|
-
[
|
|
62
|
-
_createElementVNode(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
style: _normalizeStyle(_unref(style)),
|
|
66
|
-
class: "magic-toast-view__drag"
|
|
67
|
-
},
|
|
68
|
-
[
|
|
69
|
-
_renderSlot(_ctx.$slots, "default")
|
|
70
|
-
],
|
|
71
|
-
4
|
|
72
|
-
/* STYLE */
|
|
73
|
-
)
|
|
74
|
-
],
|
|
75
|
-
32
|
|
76
|
-
/* NEED_HYDRATION */
|
|
77
|
-
)
|
|
78
|
-
], 12, _hoisted_1);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
33
|
+
const { id, index } = defineProps({
|
|
34
|
+
id: { type: String, required: true },
|
|
35
|
+
index: { type: Number, required: true }
|
|
36
|
+
});
|
|
37
|
+
const instanceId = inject(MagicToastInstanceId, void 0);
|
|
38
|
+
if (!instanceId) {
|
|
39
|
+
throw new Error("MagicToastView must be used within a MagicToastProvider");
|
|
40
|
+
}
|
|
41
|
+
const { initializeState } = useToastState(instanceId);
|
|
42
|
+
const state = initializeState();
|
|
43
|
+
const count = computed(() => state.views.length);
|
|
44
|
+
const view = computed(() => state.views[index]);
|
|
45
|
+
const reversedIndex = computed(() => count.value - index - 1);
|
|
46
|
+
const height = computed(() => `${view.value.dimensions?.height}px`);
|
|
47
|
+
const offset = computed(() => {
|
|
48
|
+
const mapped = state.views.slice(0, reversedIndex.value).reduce((acc, view2) => acc + (view2.dimensions?.height ?? 0), 0);
|
|
49
|
+
return `${mapped}px`;
|
|
50
|
+
});
|
|
51
|
+
const { style, onPointerdown, onClick } = useToastDrag({
|
|
52
|
+
view: view.value,
|
|
53
|
+
instanceId
|
|
81
54
|
});
|
|
82
55
|
</script>
|
|
83
56
|
|
|
84
57
|
<style>
|
|
85
58
|
:root {
|
|
86
|
-
--magic-toast-view-transition: all var(--magic-toast-duration)
|
|
59
|
+
--magic-toast-view-transition: all var(--magic-toast-animation-duration)
|
|
87
60
|
var(--ease-in-out);
|
|
88
61
|
}
|
|
89
62
|
|
|
@@ -94,13 +67,13 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
94
67
|
user-select: none;
|
|
95
68
|
|
|
96
69
|
&[data-position='bottom-left'],
|
|
97
|
-
&[data-position='bottom
|
|
70
|
+
&[data-position='bottom'],
|
|
98
71
|
&[data-position='bottom-right'] {
|
|
99
72
|
padding-top: var(--magic-toast-gap);
|
|
100
73
|
}
|
|
101
74
|
|
|
102
75
|
&[data-position='top-left'],
|
|
103
|
-
&[data-position='top
|
|
76
|
+
&[data-position='top'],
|
|
104
77
|
&[data-position='top-right'] {
|
|
105
78
|
padding-bottom: var(--magic-toast-gap);
|
|
106
79
|
}
|
|
@@ -138,11 +111,11 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
138
111
|
cursor: var(--magic-toast-view-cursor-dragging, grabbing);
|
|
139
112
|
}
|
|
140
113
|
|
|
141
|
-
.magic-toast-view[data-position='
|
|
114
|
+
.magic-toast-view[data-position='left'] {
|
|
142
115
|
position: absolute;
|
|
143
116
|
}
|
|
144
117
|
|
|
145
|
-
.magic-toast-view[data-position='
|
|
118
|
+
.magic-toast-view[data-position='right'] {
|
|
146
119
|
position: absolute;
|
|
147
120
|
}
|
|
148
121
|
|
|
@@ -3,30 +3,31 @@ interface MagicToastViewProps {
|
|
|
3
3
|
id: string;
|
|
4
4
|
index: number;
|
|
5
5
|
}
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
declare const
|
|
18
|
-
|
|
6
|
+
declare const state: import("../types/index.js").ToastState;
|
|
7
|
+
declare const view: import("vue").ComputedRef<import("../types/index.js").ToastView>;
|
|
8
|
+
declare const reversedIndex: import("vue").ComputedRef<number>;
|
|
9
|
+
declare const height: import("vue").ComputedRef<string>;
|
|
10
|
+
declare const offset: import("vue").ComputedRef<string>;
|
|
11
|
+
declare const style: import("vue").ComputedRef<string>, onPointerdown: (e: PointerEvent) => void, onClick: (e: MouseEvent) => Promise<void>;
|
|
12
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
13
|
+
declare var __VLS_1: {};
|
|
14
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
15
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
|
+
}>;
|
|
17
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicToastViewProps, {
|
|
18
|
+
state: typeof state;
|
|
19
|
+
view: typeof view;
|
|
20
|
+
reversedIndex: typeof reversedIndex;
|
|
21
|
+
height: typeof height;
|
|
22
|
+
offset: typeof offset;
|
|
23
|
+
style: typeof style;
|
|
24
|
+
onPointerdown: typeof onPointerdown;
|
|
25
|
+
onClick: typeof onClick;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicToastViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicToastViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicToastViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
29
|
export default _default;
|
|
20
|
-
type
|
|
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 & {
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
31
|
new (): {
|
|
31
32
|
$slots: S;
|
|
32
33
|
};
|
|
@@ -2,8 +2,8 @@ import { type MaybeRef } from 'vue';
|
|
|
2
2
|
export declare function useToastCallback(instanceId: MaybeRef<string>): {
|
|
3
3
|
onBeforeEnter: () => void;
|
|
4
4
|
onEnter: () => void;
|
|
5
|
-
onAfterEnter: (el:
|
|
5
|
+
onAfterEnter: (el: HTMLElement) => void;
|
|
6
6
|
onBeforeLeave: () => void;
|
|
7
7
|
onLeave: () => void;
|
|
8
|
-
onAfterLeave: (el:
|
|
8
|
+
onAfterLeave: (el: HTMLElement) => void;
|
|
9
9
|
};
|
|
@@ -12,10 +12,13 @@ export function useToastCallback(instanceId) {
|
|
|
12
12
|
}
|
|
13
13
|
function onEnter() {
|
|
14
14
|
emitter.emit("enter", toValue(instanceId));
|
|
15
|
+
if (state.views.length && state.options.layout?.max && state.views.length > state.options.layout.max) {
|
|
16
|
+
deleteView(state.views[0].id);
|
|
17
|
+
}
|
|
15
18
|
}
|
|
16
19
|
function onAfterEnter(el) {
|
|
17
20
|
emitter.emit("afterEnter", toValue(instanceId));
|
|
18
|
-
const view = getView(el.id);
|
|
21
|
+
const view = getView(el.dataset.id ?? "");
|
|
19
22
|
if (view) {
|
|
20
23
|
const mappedEl = el;
|
|
21
24
|
const style = window.getComputedStyle(mappedEl);
|
|
@@ -28,9 +31,6 @@ export function useToastCallback(instanceId) {
|
|
|
28
31
|
};
|
|
29
32
|
view.dimensions = dimensions;
|
|
30
33
|
}
|
|
31
|
-
if (state.views.length && state.options.layout?.max && state.views.length > state.options.layout.max) {
|
|
32
|
-
deleteView(state.views[0].id);
|
|
33
|
-
}
|
|
34
34
|
}
|
|
35
35
|
function onBeforeLeave() {
|
|
36
36
|
emitter.emit("beforeLeave", toValue(instanceId));
|
|
@@ -39,7 +39,7 @@ export function useToastCallback(instanceId) {
|
|
|
39
39
|
emitter.emit("leave", toValue(instanceId));
|
|
40
40
|
}
|
|
41
41
|
function onAfterLeave(el) {
|
|
42
|
-
const view = getView(el.id);
|
|
42
|
+
const view = getView(el.dataset.id ?? "");
|
|
43
43
|
if (view) {
|
|
44
44
|
deleteView(view.id);
|
|
45
45
|
}
|
|
@@ -64,10 +64,10 @@ export function useToastDrag(args) {
|
|
|
64
64
|
easing
|
|
65
65
|
} = args2;
|
|
66
66
|
switch (position) {
|
|
67
|
-
case "top
|
|
67
|
+
case "top":
|
|
68
68
|
case "top-left":
|
|
69
69
|
case "top-right":
|
|
70
|
-
case "bottom
|
|
70
|
+
case "bottom":
|
|
71
71
|
case "bottom-left":
|
|
72
72
|
case "bottom-right":
|
|
73
73
|
interpolate({
|
|
@@ -80,8 +80,8 @@ export function useToastDrag(args) {
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
break;
|
|
83
|
-
case "
|
|
84
|
-
case "
|
|
83
|
+
case "left":
|
|
84
|
+
case "right":
|
|
85
85
|
interpolate({
|
|
86
86
|
from: draggedX.value,
|
|
87
87
|
to,
|
|
@@ -98,10 +98,10 @@ export function useToastDrag(args) {
|
|
|
98
98
|
const distanceX = Math.abs(draggedX.value - lastDraggedX.value);
|
|
99
99
|
const distanceY = Math.abs(draggedY.value - lastDraggedY.value);
|
|
100
100
|
switch (position) {
|
|
101
|
-
case "top
|
|
101
|
+
case "top":
|
|
102
102
|
case "top-left":
|
|
103
103
|
case "top-right":
|
|
104
|
-
case "bottom
|
|
104
|
+
case "bottom":
|
|
105
105
|
case "bottom-left":
|
|
106
106
|
case "bottom-right":
|
|
107
107
|
if (distanceY > toValue(threshold).distance) {
|
|
@@ -110,8 +110,8 @@ export function useToastDrag(args) {
|
|
|
110
110
|
interpolateTo.value = 0;
|
|
111
111
|
}
|
|
112
112
|
break;
|
|
113
|
-
case "
|
|
114
|
-
case "
|
|
113
|
+
case "left":
|
|
114
|
+
case "right":
|
|
115
115
|
if (distanceX > toValue(threshold).distance) {
|
|
116
116
|
shouldClose.value = true;
|
|
117
117
|
} else {
|
|
@@ -127,10 +127,10 @@ export function useToastDrag(args) {
|
|
|
127
127
|
const velocityX = elapsed && distanceX ? distanceX / elapsed : 0;
|
|
128
128
|
const velocityY = elapsed && distanceY ? distanceY / elapsed : 0;
|
|
129
129
|
switch (position) {
|
|
130
|
-
case "top
|
|
130
|
+
case "top":
|
|
131
131
|
case "top-left":
|
|
132
132
|
case "top-right":
|
|
133
|
-
case "bottom
|
|
133
|
+
case "bottom":
|
|
134
134
|
case "bottom-left":
|
|
135
135
|
case "bottom-right":
|
|
136
136
|
if (velocityY > 0.5) {
|
|
@@ -139,8 +139,8 @@ export function useToastDrag(args) {
|
|
|
139
139
|
interpolateTo.value = 0;
|
|
140
140
|
}
|
|
141
141
|
break;
|
|
142
|
-
case "
|
|
143
|
-
case "
|
|
142
|
+
case "left":
|
|
143
|
+
case "right":
|
|
144
144
|
if (velocityX > 0.5) {
|
|
145
145
|
shouldClose.value = true;
|
|
146
146
|
} else {
|
|
@@ -151,7 +151,7 @@ export function useToastDrag(args) {
|
|
|
151
151
|
}
|
|
152
152
|
function setDragged({ x, y }) {
|
|
153
153
|
switch (position) {
|
|
154
|
-
case "top
|
|
154
|
+
case "top":
|
|
155
155
|
const newDraggedTC = Math.min(y - originY.value, 0);
|
|
156
156
|
draggedY.value = newDraggedTC;
|
|
157
157
|
break;
|
|
@@ -163,7 +163,7 @@ export function useToastDrag(args) {
|
|
|
163
163
|
const newDraggedTR = Math.min(y - originY.value, 0);
|
|
164
164
|
draggedY.value = newDraggedTR;
|
|
165
165
|
break;
|
|
166
|
-
case "bottom
|
|
166
|
+
case "bottom":
|
|
167
167
|
const newDraggedBC = Math.max(y - originY.value, 0);
|
|
168
168
|
draggedY.value = newDraggedBC;
|
|
169
169
|
break;
|
|
@@ -175,11 +175,11 @@ export function useToastDrag(args) {
|
|
|
175
175
|
const newDraggedBR = Math.max(y - originY.value, 0);
|
|
176
176
|
draggedY.value = newDraggedBR;
|
|
177
177
|
break;
|
|
178
|
-
case "
|
|
178
|
+
case "left":
|
|
179
179
|
const newDraggedCL = Math.min(x - originX.value, 0);
|
|
180
180
|
draggedX.value = newDraggedCL;
|
|
181
181
|
break;
|
|
182
|
-
case "
|
|
182
|
+
case "right":
|
|
183
183
|
const newDraggedCR = Math.max(x - originX.value, 0);
|
|
184
184
|
draggedX.value = newDraggedCR;
|
|
185
185
|
break;
|
|
@@ -202,18 +202,18 @@ export function useToastDrag(args) {
|
|
|
202
202
|
});
|
|
203
203
|
} else {
|
|
204
204
|
switch (position) {
|
|
205
|
-
case "top
|
|
205
|
+
case "top":
|
|
206
206
|
case "top-left":
|
|
207
207
|
case "top-right":
|
|
208
|
-
case "bottom
|
|
208
|
+
case "bottom":
|
|
209
209
|
case "bottom-left":
|
|
210
210
|
case "bottom-right":
|
|
211
211
|
interpolateDragged({
|
|
212
212
|
to: lastDraggedY.value
|
|
213
213
|
});
|
|
214
214
|
break;
|
|
215
|
-
case "
|
|
216
|
-
case "
|
|
215
|
+
case "left":
|
|
216
|
+
case "right":
|
|
217
217
|
interpolateDragged({
|
|
218
218
|
to: lastDraggedX.value
|
|
219
219
|
});
|
|
@@ -257,10 +257,10 @@ export function useToastDrag(args) {
|
|
|
257
257
|
function onPointerdown(e) {
|
|
258
258
|
const scrollLockValue = toValue(scrollLock);
|
|
259
259
|
if (scrollLockValue) {
|
|
260
|
-
lockScroll();
|
|
261
260
|
if (typeof scrollLockValue === "object" && scrollLockValue.padding) {
|
|
262
261
|
addScrollLockPadding();
|
|
263
262
|
}
|
|
263
|
+
lockScroll();
|
|
264
264
|
}
|
|
265
265
|
if (dragging.value) {
|
|
266
266
|
return;
|
|
@@ -297,7 +297,7 @@ export function useToastDrag(args) {
|
|
|
297
297
|
e.preventDefault();
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
if (position === "
|
|
300
|
+
if (position === "left" || position === "right") {
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
303
|
if (state.options.layout?.expand === "click") {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
1
|
+
import { ref, shallowRef } from "vue";
|
|
2
2
|
import { useScrollLock } from "@vueuse/core";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
scrollbarGutterSupport,
|
|
5
|
+
scrollbarWidth
|
|
6
|
+
} from "@maas/vue-equipment/utils";
|
|
7
|
+
const scrollLock = typeof window !== "undefined" ? useScrollLock(document?.documentElement) : shallowRef(false);
|
|
5
8
|
export function useToastScrollLock() {
|
|
6
9
|
const positionFixedElements = ref([]);
|
|
7
10
|
function lockScroll() {
|
|
@@ -12,25 +15,40 @@ export function useToastScrollLock() {
|
|
|
12
15
|
}
|
|
13
16
|
function addScrollLockPadding() {
|
|
14
17
|
if (typeof window === "undefined") return;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
document.body.style.setProperty(
|
|
19
|
+
"--scrollbar-width",
|
|
20
|
+
`${scrollbarWidth()}px`
|
|
21
|
+
);
|
|
19
22
|
positionFixedElements.value = [
|
|
20
23
|
...document.body.getElementsByTagName("*")
|
|
21
24
|
].filter(
|
|
22
|
-
(x) => getComputedStyle(x, null).getPropertyValue("position") === "fixed" &&
|
|
23
|
-
);
|
|
24
|
-
positionFixedElements.value.forEach(
|
|
25
|
-
(elem) => elem.style.paddingRight = "var(--scrollbar-width)"
|
|
25
|
+
(x) => getComputedStyle(x, null).getPropertyValue("position") === "fixed" && getComputedStyle(x, null).getPropertyValue("right") === "0px"
|
|
26
26
|
);
|
|
27
|
+
switch (scrollbarGutterSupport()) {
|
|
28
|
+
case true:
|
|
29
|
+
document.documentElement.style.scrollbarGutter = "stable";
|
|
30
|
+
positionFixedElements.value.forEach((elem) => {
|
|
31
|
+
elem.style.scrollbarGutter = "stable";
|
|
32
|
+
elem.style.overflow = "auto";
|
|
33
|
+
});
|
|
34
|
+
break;
|
|
35
|
+
case false:
|
|
36
|
+
document.body.style.paddingRight = "var(--scrollbar-width)";
|
|
37
|
+
positionFixedElements.value.forEach(
|
|
38
|
+
(elem) => elem.style.paddingRight = "var(--scrollbar-width)"
|
|
39
|
+
);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
27
42
|
}
|
|
28
43
|
function removeScrollLockPadding() {
|
|
29
|
-
document.
|
|
44
|
+
document.documentElement.style.scrollbarGutter = "";
|
|
30
45
|
document.body.style.removeProperty("--scrollbar-width");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
46
|
+
document.body.style.paddingRight = "";
|
|
47
|
+
positionFixedElements.value.forEach((elem) => {
|
|
48
|
+
elem.style.paddingRight = "";
|
|
49
|
+
elem.style.scrollbarGutter = "";
|
|
50
|
+
elem.style.overflow = "";
|
|
51
|
+
});
|
|
34
52
|
}
|
|
35
53
|
return {
|
|
36
54
|
lockScroll,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { reactive, markRaw } from "vue";
|
|
2
2
|
import { useToastState } from "./useToastState.mjs";
|
|
3
|
+
import {} from "../../types/index.mjs";
|
|
3
4
|
export function useToastView(instanceId) {
|
|
4
5
|
const { initializeState } = useToastState(instanceId);
|
|
5
6
|
const state = initializeState();
|
|
@@ -11,6 +11,7 @@ export declare function useMagicToast(id: MaybeRef<string>): {
|
|
|
11
11
|
count: import("vue").ComputedRef<number>;
|
|
12
12
|
add: (args: AddArgs) => string;
|
|
13
13
|
remove: (id: string) => void;
|
|
14
|
+
clear: (transition?: string) => Promise<void>;
|
|
14
15
|
expand: () => void;
|
|
15
16
|
collapse: () => void;
|
|
16
17
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed, toValue } from "vue";
|
|
1
|
+
import { computed, toValue, nextTick } from "vue";
|
|
2
2
|
import { useToastState } from "./private/useToastState.mjs";
|
|
3
3
|
import { useToastView } from "./private/useToastView.mjs";
|
|
4
4
|
export function useMagicToast(id) {
|
|
5
5
|
const { initializeState } = useToastState(toValue(id));
|
|
6
6
|
const state = initializeState();
|
|
7
7
|
const { initializeView, deleteView } = useToastView(id);
|
|
8
|
-
const toasts = computed(() => state
|
|
8
|
+
const toasts = computed(() => state.views);
|
|
9
9
|
const count = computed(() => toasts.value?.length);
|
|
10
10
|
function add(args) {
|
|
11
11
|
const { id: id2, component, props, duration } = args;
|
|
@@ -21,6 +21,13 @@ export function useMagicToast(id) {
|
|
|
21
21
|
function remove(id2) {
|
|
22
22
|
deleteView(id2);
|
|
23
23
|
}
|
|
24
|
+
async function clear(transition) {
|
|
25
|
+
const lastTransition = state.options.transition;
|
|
26
|
+
state.options.transition = transition ?? "";
|
|
27
|
+
state.views = [];
|
|
28
|
+
await nextTick();
|
|
29
|
+
state.options.transition = lastTransition;
|
|
30
|
+
}
|
|
24
31
|
function expand() {
|
|
25
32
|
state.expanded = true;
|
|
26
33
|
}
|
|
@@ -32,6 +39,7 @@ export function useMagicToast(id) {
|
|
|
32
39
|
count,
|
|
33
40
|
add,
|
|
34
41
|
remove,
|
|
42
|
+
clear,
|
|
35
43
|
expand,
|
|
36
44
|
collapse
|
|
37
45
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MaybeRef } from 'vue';
|
|
2
2
|
import type { RequireAll } from '@maas/vue-equipment/utils';
|
|
3
|
-
type Position = 'top-left' | 'top
|
|
3
|
+
type Position = 'top-left' | 'top' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right';
|
|
4
4
|
export type ToastView = {
|
|
5
5
|
id: string;
|
|
6
6
|
component: object;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './MagicMarquee/index.js';
|
|
|
8
8
|
export * from './MagicMenu/index.js';
|
|
9
9
|
export * from './MagicModal/index.js';
|
|
10
10
|
export * from './MagicNoise/index.js';
|
|
11
|
+
export * from './MagicPie/index.js';
|
|
11
12
|
export * from './MagicPlayer/index.js';
|
|
12
13
|
export * from './MagicScroll/index.js';
|
|
13
14
|
export * from './MagicToast/index.js';
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./MagicMarquee/index.mjs";
|
|
|
8
8
|
export * from "./MagicMenu/index.mjs";
|
|
9
9
|
export * from "./MagicModal/index.mjs";
|
|
10
10
|
export * from "./MagicNoise/index.mjs";
|
|
11
|
+
export * from "./MagicPie/index.mjs";
|
|
11
12
|
export * from "./MagicPlayer/index.mjs";
|
|
12
13
|
export * from "./MagicScroll/index.mjs";
|
|
13
14
|
export * from "./MagicToast/index.mjs";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -23,8 +23,9 @@ type InterpolateArgs = {
|
|
|
23
23
|
duration: number;
|
|
24
24
|
easing?: (t: number) => number;
|
|
25
25
|
callback: (result: number) => void;
|
|
26
|
+
interpolationIdCallback?: (id: number) => void;
|
|
26
27
|
};
|
|
27
|
-
declare function interpolate(args: InterpolateArgs):
|
|
28
|
+
declare function interpolate(args: InterpolateArgs): number;
|
|
28
29
|
|
|
29
30
|
declare function isIOS(): boolean;
|
|
30
31
|
|
|
@@ -41,16 +42,20 @@ declare function matchClass(el: Element, regex: RegExp): boolean;
|
|
|
41
42
|
|
|
42
43
|
interface GuardedSetPointerCaptureArgs {
|
|
43
44
|
event: PointerEvent;
|
|
44
|
-
element?: Element;
|
|
45
|
+
element?: Element | null;
|
|
45
46
|
debug?: boolean;
|
|
46
47
|
}
|
|
47
48
|
interface GuardedReleasePointerCaptureArgs {
|
|
48
49
|
event: PointerEvent;
|
|
49
|
-
element?: Element;
|
|
50
|
+
element?: Element | null;
|
|
50
51
|
}
|
|
51
52
|
declare function guardedSetPointerCapture(args: GuardedSetPointerCaptureArgs): void;
|
|
52
53
|
declare function guardedReleasePointerCapture(args: GuardedReleasePointerCaptureArgs): void;
|
|
53
54
|
|
|
55
|
+
declare function scrollbarGutterSupport(): boolean;
|
|
56
|
+
|
|
57
|
+
declare function scrollbarWidth(): number;
|
|
58
|
+
|
|
54
59
|
interface SlugifyOptions {
|
|
55
60
|
separator?: string;
|
|
56
61
|
trim?: boolean;
|
|
@@ -76,4 +81,4 @@ type RequireAllNested<T> = {
|
|
|
76
81
|
|
|
77
82
|
type ValueOf<T> = T[keyof T];
|
|
78
83
|
|
|
79
|
-
export { type InterpolateArgs, type PickPartial, type RequireAll, type RequireAllNested, type SlugifyOptions, type ValueOf, clampValue, easeInCubic, easeInOutCubic, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInQuad, easeInQuart, easeInQuint, easeOutBack, easeOutCubic, easeOutQuad, easeOutQuart, easeOutQuint, formatTime, guardedReleasePointerCapture, guardedSetPointerCapture, interpolate, isIOS, isWithinRange, linear, mapValue, matchClass, slugify, uniq };
|
|
84
|
+
export { type InterpolateArgs, type PickPartial, type RequireAll, type RequireAllNested, type SlugifyOptions, type ValueOf, clampValue, easeInCubic, easeInOutCubic, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInQuad, easeInQuart, easeInQuint, easeOutBack, easeOutCubic, easeOutQuad, easeOutQuart, easeOutQuint, formatTime, guardedReleasePointerCapture, guardedSetPointerCapture, interpolate, isIOS, isWithinRange, linear, mapValue, matchClass, scrollbarGutterSupport, scrollbarWidth, slugify, uniq };
|