@maas/vue-equipment 1.0.0-beta.2 → 1.0.0-beta.20
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 +1 -0
- 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
|
@@ -3,32 +3,21 @@ interface MagicScrollSceneProps {
|
|
|
3
3
|
from?: ScrollIntersection;
|
|
4
4
|
to?: ScrollIntersection;
|
|
5
5
|
}
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
progress: number;
|
|
11
|
-
}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {
|
|
14
|
-
elRef: HTMLDivElement;
|
|
15
|
-
};
|
|
16
|
-
rootEl: HTMLDivElement;
|
|
6
|
+
declare const progress: import("vue").ShallowRef<number, number>;
|
|
7
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
8
|
+
declare var __VLS_1: {
|
|
9
|
+
progress: number;
|
|
17
10
|
};
|
|
18
|
-
type
|
|
19
|
-
|
|
20
|
-
|
|
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<MagicScrollSceneProps, {
|
|
15
|
+
progress: typeof progress;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollSceneProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicScrollSceneProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicScrollSceneProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
21
19
|
export default _default;
|
|
22
|
-
type
|
|
23
|
-
type __VLS_TypePropsToOption<T> = {
|
|
24
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
25
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
26
|
-
} : {
|
|
27
|
-
type: import('vue').PropType<T[K]>;
|
|
28
|
-
required: true;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
21
|
new (): {
|
|
33
22
|
$slots: S;
|
|
34
23
|
};
|
|
@@ -2,8 +2,8 @@ import { type MaybeRef } from 'vue';
|
|
|
2
2
|
import type { CollisionOffset } from '../../types/index.js';
|
|
3
3
|
type UseCollisionDetectionArgs = {
|
|
4
4
|
id: string;
|
|
5
|
-
child: MaybeRef<HTMLElement |
|
|
6
|
-
parent: MaybeRef<HTMLElement | undefined>;
|
|
5
|
+
child: MaybeRef<HTMLElement | null>;
|
|
6
|
+
parent: MaybeRef<HTMLElement | null | undefined>;
|
|
7
7
|
scrollY: MaybeRef<number>;
|
|
8
8
|
offset?: CollisionOffset;
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useElementBounding } from "@vueuse/core";
|
|
1
|
+
import { shallowRef, reactive, computed, toValue } from "vue";
|
|
2
|
+
import { useElementBounding, useWindowSize } from "@vueuse/core";
|
|
3
3
|
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
4
4
|
export function useCollisionDetection(args) {
|
|
5
5
|
const { id, scrollY, child, parent, offset } = args;
|
|
@@ -25,11 +25,21 @@ export function useCollisionDetection(args) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
+
const { width, height } = useWindowSize();
|
|
29
|
+
const windowBoundingRect = {
|
|
30
|
+
width,
|
|
31
|
+
height,
|
|
32
|
+
right: width,
|
|
33
|
+
bottom: height,
|
|
34
|
+
top: shallowRef(0),
|
|
35
|
+
left: shallowRef(0)
|
|
36
|
+
};
|
|
28
37
|
const childBoundingRect = useElementBounding(child);
|
|
29
38
|
const parentBoundingRect = useElementBounding(parent);
|
|
39
|
+
const mappedParentBoundingRect = toValue(parent) ? parentBoundingRect : windowBoundingRect;
|
|
30
40
|
const mappedOffset = { top: 0, bottom: 0, ...offset };
|
|
31
|
-
const lastScrollY =
|
|
32
|
-
const scrollDirection =
|
|
41
|
+
const lastScrollY = shallowRef(0);
|
|
42
|
+
const scrollDirection = shallowRef();
|
|
33
43
|
const oppositeScrollDirection = computed(
|
|
34
44
|
() => scrollDirection.value === "up" ? "down" : "up"
|
|
35
45
|
);
|
|
@@ -101,7 +111,7 @@ export function useCollisionDetection(args) {
|
|
|
101
111
|
}
|
|
102
112
|
const offset2 = mappedOffset[parentEdge];
|
|
103
113
|
const mappedChildEdge = toValue(childBoundingRect[childEdge]);
|
|
104
|
-
const mappedParentEdge = toValue(
|
|
114
|
+
const mappedParentEdge = toValue(mappedParentBoundingRect[parentEdge]) + offset2;
|
|
105
115
|
if (direction === "down" && mappedChildEdge <= mappedParentEdge || direction === "up" && mappedChildEdge >= mappedParentEdge) {
|
|
106
116
|
alerted[direction][childEdge][parentEdge] = true;
|
|
107
117
|
useMagicEmitter().emit("collision", {
|
|
@@ -119,7 +129,7 @@ export function useCollisionDetection(args) {
|
|
|
119
129
|
}
|
|
120
130
|
const offset2 = mappedOffset[parentEdge];
|
|
121
131
|
const mappedChildEdge = toValue(childBoundingRect[childEdge]);
|
|
122
|
-
const mappedParentEdge = toValue(
|
|
132
|
+
const mappedParentEdge = toValue(mappedParentBoundingRect[parentEdge]) + offset2;
|
|
123
133
|
if (direction === "down" && mappedChildEdge >= mappedParentEdge || direction === "up" && mappedChildEdge <= mappedParentEdge) {
|
|
124
134
|
alerted[direction][childEdge][parentEdge] = false;
|
|
125
135
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type MaybeRef, type MaybeRefOrGetter } from 'vue';
|
|
2
2
|
import type { ScrollIntersection } from '../../types/index.js';
|
|
3
|
-
type
|
|
3
|
+
type UseScrollApiArgs = {
|
|
4
4
|
child: MaybeRef<HTMLElement | null | undefined>;
|
|
5
5
|
parent: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
6
6
|
from: ScrollIntersection;
|
|
7
7
|
to: ScrollIntersection;
|
|
8
8
|
};
|
|
9
|
-
export declare function useScrollApi(
|
|
9
|
+
export declare function useScrollApi(args: UseScrollApiArgs): {
|
|
10
10
|
getCalculations: () => void;
|
|
11
11
|
getProgress: () => number;
|
|
12
12
|
};
|
|
@@ -1,14 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
shallowRef,
|
|
3
|
+
inject,
|
|
4
|
+
toValue
|
|
5
|
+
} from "vue";
|
|
6
|
+
import { useElementBounding, useWindowSize } from "@vueuse/core";
|
|
4
7
|
import { clampValue } from "@maas/vue-equipment/utils";
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
import { MagicScrollReturn } from "../../symbols/index.mjs";
|
|
9
|
+
export function useScrollApi(args) {
|
|
10
|
+
const { child, parent, from, to } = args;
|
|
7
11
|
const scrollReturn = inject(MagicScrollReturn, void 0);
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
+
const start = shallowRef(0);
|
|
13
|
+
const end = shallowRef(0);
|
|
14
|
+
const { width, height } = useWindowSize();
|
|
15
|
+
const windowBoundingRect = {
|
|
16
|
+
width,
|
|
17
|
+
height,
|
|
18
|
+
right: width,
|
|
19
|
+
bottom: height,
|
|
20
|
+
top: shallowRef(0),
|
|
21
|
+
left: shallowRef(0)
|
|
22
|
+
};
|
|
23
|
+
const childBoundingRect = useElementBounding(child);
|
|
24
|
+
const parentBoundingRect = useElementBounding(parent);
|
|
25
|
+
const mappedParentBoundingRect = toValue(parent) ? parentBoundingRect : windowBoundingRect;
|
|
12
26
|
function splitLocation(location) {
|
|
13
27
|
return {
|
|
14
28
|
child: location.match(/^[a-z]+/)[0],
|
|
@@ -17,51 +31,52 @@ export function useScrollApi(params) {
|
|
|
17
31
|
}
|
|
18
32
|
function getOffsetTop(points) {
|
|
19
33
|
let y = 0;
|
|
20
|
-
if (!childRect.value) return y;
|
|
21
34
|
const scrollY = toValue(scrollReturn?.y) || 0;
|
|
35
|
+
const parentTop = mappedParentBoundingRect.top.value;
|
|
36
|
+
const parentHeight = mappedParentBoundingRect.height.value;
|
|
37
|
+
const childTop = childBoundingRect.top.value;
|
|
38
|
+
const childHeight = childBoundingRect.height.value;
|
|
39
|
+
if (!childHeight) {
|
|
40
|
+
return y;
|
|
41
|
+
}
|
|
22
42
|
switch (points.child) {
|
|
23
43
|
case "top":
|
|
24
|
-
y +=
|
|
44
|
+
y += childTop + scrollY;
|
|
25
45
|
break;
|
|
26
46
|
case "center":
|
|
27
|
-
y +=
|
|
47
|
+
y += childTop + childHeight / 2 + scrollY;
|
|
28
48
|
break;
|
|
29
49
|
case "bottom":
|
|
30
|
-
y +=
|
|
50
|
+
y += childTop + childHeight + scrollY;
|
|
31
51
|
break;
|
|
32
52
|
}
|
|
33
|
-
if (!
|
|
53
|
+
if (!mappedParentBoundingRect.height.value) {
|
|
34
54
|
return y;
|
|
35
55
|
}
|
|
36
|
-
const dimensions = {
|
|
37
|
-
width: toValue(parentRect.value.width),
|
|
38
|
-
height: toValue(parentRect.value.height),
|
|
39
|
-
top: toValue(parentRect.value.top)
|
|
40
|
-
};
|
|
41
56
|
switch (points.parent) {
|
|
42
57
|
case "top":
|
|
43
|
-
y -=
|
|
58
|
+
y -= parentTop;
|
|
44
59
|
break;
|
|
45
60
|
case "center":
|
|
46
|
-
y -=
|
|
61
|
+
y -= parentTop + parentHeight / 2;
|
|
47
62
|
break;
|
|
48
63
|
case "bottom":
|
|
49
|
-
y -=
|
|
64
|
+
y -= parentTop + parentHeight;
|
|
50
65
|
break;
|
|
51
66
|
case "initial":
|
|
52
|
-
y -=
|
|
67
|
+
y -= childTop + scrollY;
|
|
53
68
|
break;
|
|
54
69
|
}
|
|
55
70
|
return y;
|
|
56
71
|
}
|
|
57
72
|
function getCalculations() {
|
|
58
|
-
|
|
59
|
-
|
|
73
|
+
childBoundingRect.update();
|
|
74
|
+
parentBoundingRect.update();
|
|
60
75
|
start.value = getOffsetTop(splitLocation(from));
|
|
61
76
|
end.value = getOffsetTop(splitLocation(to));
|
|
62
77
|
}
|
|
63
78
|
function getProgress() {
|
|
64
|
-
const scrollY = toValue(scrollReturn?.y)
|
|
79
|
+
const scrollY = toValue(scrollReturn?.y) ?? 0;
|
|
65
80
|
const total = Math.abs(end.value - start.value);
|
|
66
81
|
const current = scrollY - start.value;
|
|
67
82
|
return clampValue(current / total, 0, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InjectionKey, Ref, MaybeRef } from 'vue';
|
|
2
2
|
import type { UseScrollReturn } from '@vueuse/core';
|
|
3
|
-
declare const MagicScrollTarget: InjectionKey<MaybeRef<HTMLElement | undefined>>;
|
|
3
|
+
declare const MagicScrollTarget: InjectionKey<MaybeRef<HTMLElement | null | undefined>>;
|
|
4
4
|
declare const MagicScrollProgress: InjectionKey<Ref<number>>;
|
|
5
5
|
declare const MagicScrollReturn: InjectionKey<UseScrollReturn | undefined>;
|
|
6
6
|
export { MagicScrollTarget, MagicScrollProgress, MagicScrollReturn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("nuxt/schema").NuxtModule<import("nuxt/schema").ModuleOptions, import("nuxt/schema").ModuleOptions, false>;
|
|
2
2
|
export default _default;
|
|
@@ -1,17 +1,55 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<teleport
|
|
3
|
+
:to="state.options.teleport?.target"
|
|
4
|
+
:disabled="state.options.teleport?.disabled"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
:data-id="mappedId"
|
|
8
|
+
:data-position="state.options.position"
|
|
9
|
+
:data-expanded="state.expanded"
|
|
10
|
+
class="magic-toast-provider"
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
>
|
|
13
|
+
<transition-group
|
|
14
|
+
ref="list"
|
|
15
|
+
tag="ol"
|
|
16
|
+
class="magic-toast-provider__list"
|
|
17
|
+
:name="state.options.transition"
|
|
18
|
+
:on-before-enter="onBeforeEnter"
|
|
19
|
+
:on-enter="onEnter"
|
|
20
|
+
:on-after-enter="onAfterEnter"
|
|
21
|
+
:on-before-leave="onBeforeLeave"
|
|
22
|
+
:on-leave="onLeave"
|
|
23
|
+
:on-after-leave="onAfterLeave"
|
|
24
|
+
@mouseenter="onMouseenter"
|
|
25
|
+
@mouseleave="onMouseleave"
|
|
26
|
+
>
|
|
27
|
+
<magic-toast-view
|
|
28
|
+
v-for="(view, index) in state.views"
|
|
29
|
+
:id="view.id"
|
|
30
|
+
:key="view.id"
|
|
31
|
+
:index="index"
|
|
32
|
+
>
|
|
33
|
+
<component
|
|
34
|
+
:is="view.component"
|
|
35
|
+
v-bind="view.props"
|
|
36
|
+
@remove="deleteView(view.id)"
|
|
37
|
+
/>
|
|
38
|
+
</magic-toast-view>
|
|
39
|
+
</transition-group>
|
|
40
|
+
</div>
|
|
41
|
+
</teleport>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script setup>
|
|
5
45
|
import {
|
|
6
46
|
toValue,
|
|
7
|
-
|
|
47
|
+
useTemplateRef,
|
|
8
48
|
provide,
|
|
9
|
-
useId,
|
|
10
49
|
watch,
|
|
11
50
|
onBeforeUnmount
|
|
12
51
|
} from "vue";
|
|
13
52
|
import { onClickOutside } from "@vueuse/core";
|
|
14
|
-
import { defu } from "defu";
|
|
15
53
|
import { useToastState } from "../composables/private/useToastState";
|
|
16
54
|
import { useToastView } from "../composables/private/useToastView";
|
|
17
55
|
import { useToastCallback } from "../composables/private/useToastCallback";
|
|
@@ -24,103 +62,41 @@ import "@maas/vue-equipment/utils/css/animations/slide-ltr-out.css";
|
|
|
24
62
|
import "@maas/vue-equipment/utils/css/animations/slide-rtl-in.css";
|
|
25
63
|
import "@maas/vue-equipment/utils/css/animations/slide-rtl-out.css";
|
|
26
64
|
import { useToastListener } from "../composables/private/useToastListener";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
65
|
+
const { id, options } = defineProps({
|
|
66
|
+
id: { type: null, required: true },
|
|
67
|
+
options: { type: Object, required: false }
|
|
68
|
+
});
|
|
69
|
+
const mappedId = toValue(id);
|
|
70
|
+
defineOptions({
|
|
71
|
+
inheritAttrs: false
|
|
72
|
+
});
|
|
73
|
+
const { deleteView } = useToastView(id);
|
|
74
|
+
const { deleteState, initializeState } = useToastState(id);
|
|
75
|
+
const state = initializeState(options);
|
|
76
|
+
const listRef = useTemplateRef("list");
|
|
77
|
+
const {
|
|
78
|
+
onBeforeEnter,
|
|
79
|
+
onEnter,
|
|
80
|
+
onAfterEnter,
|
|
81
|
+
onBeforeLeave,
|
|
82
|
+
onLeave,
|
|
83
|
+
onAfterLeave
|
|
84
|
+
} = useToastCallback(id);
|
|
85
|
+
const { onMouseenter, onMouseleave, outsideClickCallback } = useToastListener(id);
|
|
86
|
+
onClickOutside(listRef, outsideClickCallback);
|
|
87
|
+
watch(
|
|
88
|
+
() => options,
|
|
89
|
+
(value) => {
|
|
90
|
+
initializeState(value);
|
|
35
91
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const { deleteView } = useToastView(__props.id);
|
|
39
|
-
const { deleteState, initializeState } = useToastState(__props.id);
|
|
40
|
-
const state = initializeState(__props.options);
|
|
41
|
-
const listRef = ref(void 0);
|
|
42
|
-
const {
|
|
43
|
-
onBeforeEnter,
|
|
44
|
-
onEnter,
|
|
45
|
-
onAfterEnter,
|
|
46
|
-
onBeforeLeave,
|
|
47
|
-
onLeave,
|
|
48
|
-
onAfterLeave
|
|
49
|
-
} = useToastCallback(__props.id);
|
|
50
|
-
const { onMouseenter, onMouseleave, outsideClickCallback } = useToastListener(__props.id);
|
|
51
|
-
onClickOutside(listRef, outsideClickCallback);
|
|
52
|
-
watch(
|
|
53
|
-
() => __props.options,
|
|
54
|
-
(value) => {
|
|
55
|
-
state.options = defu(value, state.options);
|
|
56
|
-
teleportId.value = useId();
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
deep: true
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
onBeforeUnmount(() => {
|
|
63
|
-
deleteState();
|
|
64
|
-
});
|
|
65
|
-
provide(MagicToastInstanceId, __props.id);
|
|
66
|
-
return (_ctx, _cache) => {
|
|
67
|
-
return _openBlock(), _createBlock(_Teleport, {
|
|
68
|
-
key: teleportId.value,
|
|
69
|
-
to: _unref(state).options.teleport?.target,
|
|
70
|
-
disabled: _unref(state).options.teleport?.disabled
|
|
71
|
-
}, [
|
|
72
|
-
_createElementVNode("div", _mergeProps({
|
|
73
|
-
id: toValue(_ctx.id),
|
|
74
|
-
"data-position": _unref(state).options.position,
|
|
75
|
-
"data-expanded": _unref(state).expanded,
|
|
76
|
-
class: "magic-toast-provider"
|
|
77
|
-
}, _ctx.$attrs), [
|
|
78
|
-
_createVNode(_TransitionGroup, {
|
|
79
|
-
ref_key: "listRef",
|
|
80
|
-
ref: listRef,
|
|
81
|
-
tag: "ol",
|
|
82
|
-
class: "magic-toast-provider__list",
|
|
83
|
-
name: _unref(state).options.transition,
|
|
84
|
-
"on-before-enter": _unref(onBeforeEnter),
|
|
85
|
-
"on-enter": _unref(onEnter),
|
|
86
|
-
"on-after-enter": _unref(onAfterEnter),
|
|
87
|
-
"on-before-leave": _unref(onBeforeLeave),
|
|
88
|
-
"on-leave": _unref(onLeave),
|
|
89
|
-
"on-after-leave": _unref(onAfterLeave),
|
|
90
|
-
onMouseenter: _unref(onMouseenter),
|
|
91
|
-
onMouseleave: _unref(onMouseleave)
|
|
92
|
-
}, {
|
|
93
|
-
default: _withCtx(() => [
|
|
94
|
-
(_openBlock(true), _createElementBlock(
|
|
95
|
-
_Fragment,
|
|
96
|
-
null,
|
|
97
|
-
_renderList(_unref(state).views, (view, index) => {
|
|
98
|
-
return _openBlock(), _createBlock(MagicToastView, {
|
|
99
|
-
id: view.id,
|
|
100
|
-
key: view.id,
|
|
101
|
-
index
|
|
102
|
-
}, {
|
|
103
|
-
default: _withCtx(() => [
|
|
104
|
-
(_openBlock(), _createBlock(_resolveDynamicComponent(view.component), _mergeProps({ ref_for: true }, view.props, {
|
|
105
|
-
onRemove: ($event) => _unref(deleteView)(view.id)
|
|
106
|
-
}), null, 16, ["onRemove"]))
|
|
107
|
-
]),
|
|
108
|
-
_: 2
|
|
109
|
-
/* DYNAMIC */
|
|
110
|
-
}, 1032, ["id", "index"]);
|
|
111
|
-
}),
|
|
112
|
-
128
|
|
113
|
-
/* KEYED_FRAGMENT */
|
|
114
|
-
))
|
|
115
|
-
]),
|
|
116
|
-
_: 1
|
|
117
|
-
/* STABLE */
|
|
118
|
-
}, 8, ["name", "on-before-enter", "on-enter", "on-after-enter", "on-before-leave", "on-leave", "on-after-leave", "onMouseenter", "onMouseleave"])
|
|
119
|
-
], 16, _hoisted_1)
|
|
120
|
-
], 8, ["to", "disabled"]);
|
|
121
|
-
};
|
|
92
|
+
{
|
|
93
|
+
deep: true
|
|
122
94
|
}
|
|
95
|
+
);
|
|
96
|
+
onBeforeUnmount(() => {
|
|
97
|
+
deleteState();
|
|
123
98
|
});
|
|
99
|
+
provide(MagicToastInstanceId, id);
|
|
124
100
|
</script>
|
|
125
101
|
|
|
126
102
|
<style>
|
|
@@ -164,7 +140,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
164
140
|
--magic-toast-padding-y: 1rem;
|
|
165
141
|
--magic-toast-padding-x: 1rem;
|
|
166
142
|
--magic-toast-gap: 0.75rem;
|
|
167
|
-
--magic-toast-duration: 175ms;
|
|
143
|
+
--magic-toast-animation-duration: 175ms;
|
|
168
144
|
--magic-toast-scale-factor: 0.05;
|
|
169
145
|
--magic-toast-overlap-y: 1rem;
|
|
170
146
|
|
|
@@ -213,11 +189,11 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
213
189
|
}
|
|
214
190
|
|
|
215
191
|
.magic-toast-provider[data-position='top-left'],
|
|
216
|
-
.magic-toast-provider[data-position='top
|
|
192
|
+
.magic-toast-provider[data-position='top'],
|
|
217
193
|
.magic-toast-provider[data-position='top-right'] {
|
|
218
|
-
--mt-enter-animation: mt-slide-ttb-in var(--magic-toast-duration)
|
|
194
|
+
--mt-enter-animation: mt-slide-ttb-in var(--magic-toast-animation-duration)
|
|
219
195
|
var(--ease-in-out);
|
|
220
|
-
--mt-leave-animation: mt-slide-ttb-out var(--magic-toast-duration)
|
|
196
|
+
--mt-leave-animation: mt-slide-ttb-out var(--magic-toast-animation-duration)
|
|
221
197
|
var(--ease-in-out);
|
|
222
198
|
--mt-multiplier-y: 1;
|
|
223
199
|
--mt-justify-content: flex-end;
|
|
@@ -225,11 +201,11 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
225
201
|
}
|
|
226
202
|
|
|
227
203
|
.magic-toast-provider[data-position='bottom-left'],
|
|
228
|
-
.magic-toast-provider[data-position='bottom
|
|
204
|
+
.magic-toast-provider[data-position='bottom'],
|
|
229
205
|
.magic-toast-provider[data-position='bottom-right'] {
|
|
230
|
-
--mt-enter-animation: mt-slide-btt-in var(--magic-toast-duration)
|
|
206
|
+
--mt-enter-animation: mt-slide-btt-in var(--magic-toast-animation-duration)
|
|
231
207
|
var(--ease-in-out);
|
|
232
|
-
--mt-leave-animation: mt-slide-btt-out var(--magic-toast-duration)
|
|
208
|
+
--mt-leave-animation: mt-slide-btt-out var(--magic-toast-animation-duration)
|
|
233
209
|
var(--ease-in-out);
|
|
234
210
|
--mt-multiplier-y: -1;
|
|
235
211
|
--mt-justify-content: flex-end;
|
|
@@ -245,21 +221,21 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
245
221
|
--mt-align-items: flex-end;
|
|
246
222
|
}
|
|
247
223
|
|
|
248
|
-
.magic-toast-provider[data-position='
|
|
224
|
+
.magic-toast-provider[data-position='left'] {
|
|
249
225
|
--mt-justify-content: center;
|
|
250
226
|
--mt-align-items: flex-start;
|
|
251
|
-
--mt-enter-animation: slide-ltr-in var(--magic-toast-duration)
|
|
227
|
+
--mt-enter-animation: slide-ltr-in var(--magic-toast-animation-duration)
|
|
252
228
|
var(--ease-in-out);
|
|
253
|
-
--mt-leave-animation: slide-ltr-out var(--magic-toast-duration)
|
|
229
|
+
--mt-leave-animation: slide-ltr-out var(--magic-toast-animation-duration)
|
|
254
230
|
var(--ease-in-out);
|
|
255
231
|
}
|
|
256
232
|
|
|
257
|
-
.magic-toast-provider[data-position='
|
|
233
|
+
.magic-toast-provider[data-position='right'] {
|
|
258
234
|
--mt-justify-content: center;
|
|
259
235
|
--mt-align-items: flex-end;
|
|
260
|
-
--mt-enter-animation: slide-rtl-in var(--magic-toast-duration)
|
|
236
|
+
--mt-enter-animation: slide-rtl-in var(--magic-toast-animation-duration)
|
|
261
237
|
var(--ease-in-out);
|
|
262
|
-
--mt-leave-animation: slide-rtl-out var(--magic-toast-duration)
|
|
238
|
+
--mt-leave-animation: slide-rtl-out var(--magic-toast-animation-duration)
|
|
263
239
|
var(--ease-in-out);
|
|
264
240
|
}
|
|
265
241
|
|
|
@@ -268,20 +244,20 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
268
244
|
position: absolute;
|
|
269
245
|
|
|
270
246
|
&[data-position='bottom-left'],
|
|
271
|
-
&[data-position='bottom
|
|
247
|
+
&[data-position='bottom'],
|
|
272
248
|
&[data-position='bottom-right'] {
|
|
273
249
|
bottom: calc(var(--mt-height) * var(--mt-index) * 1px);
|
|
274
250
|
}
|
|
275
251
|
|
|
276
252
|
&[data-position='top-left'],
|
|
277
|
-
&[data-position='top
|
|
253
|
+
&[data-position='top'],
|
|
278
254
|
&[data-position='top-right'] {
|
|
279
255
|
top: calc(var(--mt-height) * var(--mt-index) * 1px);
|
|
280
256
|
}
|
|
281
257
|
}
|
|
282
258
|
|
|
283
259
|
.magic-toast-leave-active {
|
|
284
|
-
animation: fade-out var(--magic-toast-duration) var(--ease-in-out);
|
|
260
|
+
animation: fade-out var(--magic-toast-animation-duration) var(--ease-in-out);
|
|
285
261
|
position: absolute;
|
|
286
262
|
}
|
|
287
263
|
|
|
@@ -291,6 +267,6 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
291
267
|
}
|
|
292
268
|
|
|
293
269
|
.magic-toast-move {
|
|
294
|
-
transition: all var(--magic-toast-duration) var(--ease-in-out);
|
|
270
|
+
transition: all var(--magic-toast-animation-duration) var(--ease-in-out);
|
|
295
271
|
}
|
|
296
272
|
</style>
|
|
@@ -10,14 +10,5 @@ interface MagicToastProps {
|
|
|
10
10
|
id: MaybeRef<string>;
|
|
11
11
|
options?: MagicToastOptions;
|
|
12
12
|
}
|
|
13
|
-
declare const _default: import("vue").DefineComponent<
|
|
13
|
+
declare const _default: import("vue").DefineComponent<MagicToastProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicToastProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToOption<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
};
|