@maas/vue-equipment 1.0.0-beta.33 → 1.0.0-beta.34
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/dist/composables/useCountdown/index.d.ts +23 -0
- package/dist/composables/useCountdown/index.js +133 -0
- package/dist/composables/useCountdown/index.js.map +1 -0
- package/dist/composables/useEasings/index.d.ts +21 -0
- package/dist/composables/useEasings/index.js +40 -0
- package/dist/composables/useEasings/index.js.map +1 -0
- package/dist/composables/useMetaViewport/index.d.ts +9 -0
- package/dist/composables/useMetaViewport/index.js +29 -0
- package/dist/composables/useMetaViewport/index.js.map +1 -0
- package/dist/composables/useScrollTo/index.d.ts +49 -0
- package/dist/composables/useScrollTo/index.js +148 -0
- package/dist/composables/useScrollTo/index.js.map +1 -0
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +15 -9
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionCallback.mjs +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandCallback.mjs +1 -1
- package/dist/plugins/MagicCookie/src/composables/private/useCookieCallback.mjs +1 -1
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.mjs +1 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +1 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +1 -1
- package/dist/plugins/MagicDraggable/src/composables/useMagicDraggable.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerCallback.mjs +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/composables/useMagicDrawer.mjs +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +1 -1
- package/dist/plugins/MagicModal/src/composables/private/useModalCallback.mjs +1 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.mjs +1 -1
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +1 -1
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +1 -1
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +1 -1
- package/package.json +11 -7
- package/dist/composables/index.d.ts +0 -97
- package/dist/composables/index.js +0 -344
- package/dist/composables/index.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -14
- package/dist/plugins/index.mjs +0 -14
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
} from "vue";
|
|
73
73
|
import { createDefu } from "defu";
|
|
74
74
|
import { onKeyStroke, unrefElement } from "@vueuse/core";
|
|
75
|
-
import { useMetaViewport } from "@maas/vue-equipment/composables";
|
|
75
|
+
import { useMetaViewport } from "@maas/vue-equipment/composables/useMetaViewport";
|
|
76
76
|
import { defaultOptions } from "./../utils/defaultOptions";
|
|
77
77
|
import { useDrawerDOM } from "../composables/private/useDrawerDOM";
|
|
78
78
|
import { useDrawerCallback } from "../composables/private/useDrawerCallback";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toValue, nextTick } from "vue";
|
|
2
|
-
import { useMetaViewport } from "@maas/vue-equipment/composables";
|
|
3
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
2
|
+
import { useMetaViewport } from "@maas/vue-equipment/composables/useMetaViewport";
|
|
3
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
4
4
|
export function useDrawerCallback(args) {
|
|
5
5
|
const {
|
|
6
6
|
id,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "@maas/vue-equipment/utils";
|
|
23
23
|
import {
|
|
24
24
|
useMagicEmitter
|
|
25
|
-
} from "@maas/vue-equipment/plugins";
|
|
25
|
+
} from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
26
26
|
import { useMagicDrawer } from "./../useMagicDrawer.mjs";
|
|
27
27
|
import { useDrawerSnap } from "./useDrawerSnap.mjs";
|
|
28
28
|
import { useDrawerGuards } from "./useDrawerGuards.mjs";
|
|
@@ -11,7 +11,7 @@ import { useElementBounding, useRafFn } from "@vueuse/core";
|
|
|
11
11
|
import { clampValue, mapValue } from "@maas/vue-equipment/utils";
|
|
12
12
|
import {
|
|
13
13
|
useMagicEmitter
|
|
14
|
-
} from "@maas/vue-equipment/plugins";
|
|
14
|
+
} from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
15
15
|
import { useDrawerState } from "./useDrawerState.mjs";
|
|
16
16
|
export function useDrawerProgress(args) {
|
|
17
17
|
const { id, drawerRef, elRef, position, overshoot } = args;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "vue";
|
|
7
7
|
import { computedWithControl } from "@vueuse/core";
|
|
8
8
|
import { mapValue, interpolate } from "@maas/vue-equipment/utils";
|
|
9
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
9
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
10
10
|
export function useDrawerSnap(args) {
|
|
11
11
|
const {
|
|
12
12
|
id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, toValue, toRefs } from "vue";
|
|
2
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
2
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
3
3
|
import { useDrawerState } from "./private/useDrawerState.mjs";
|
|
4
4
|
export function useMagicDrawer(id) {
|
|
5
5
|
const { initializeState } = useDrawerState(toValue(id));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toValue } from "vue";
|
|
2
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
2
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
3
3
|
import { ModeScrollLock } from "../../utils/modeScrollLockDefaults.mjs";
|
|
4
4
|
export function useMenuCallback(args) {
|
|
5
5
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toRefs, watch, toValue } from "vue";
|
|
2
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
2
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
3
3
|
import { usePlayerState } from "./usePlayerState.mjs";
|
|
4
4
|
export function usePlayerEmitter(args) {
|
|
5
5
|
const { id } = args;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef, reactive, computed, toValue } from "vue";
|
|
2
2
|
import { useElementBounding, useWindowSize } from "@vueuse/core";
|
|
3
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
3
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
4
4
|
export function useCollisionDetection(args) {
|
|
5
5
|
const { id, scrollY, child, parent, offset } = args;
|
|
6
6
|
const alerted = reactive({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toValue } from "vue";
|
|
2
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
2
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
3
3
|
import { useToastView } from "./useToastView.mjs";
|
|
4
4
|
import { useToastState } from "./useToastState.mjs";
|
|
5
5
|
export function useToastCallback(instanceId) {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
interpolate,
|
|
8
8
|
isWithinRange
|
|
9
9
|
} from "@maas/vue-equipment/utils";
|
|
10
|
-
import { useMagicEmitter } from "@maas/vue-equipment/plugins";
|
|
10
|
+
import { useMagicEmitter } from "@maas/vue-equipment/plugins/MagicEmitter";
|
|
11
11
|
import { useToastState } from "./useToastState.mjs";
|
|
12
12
|
import { useToastView } from "./useToastView.mjs";
|
|
13
13
|
import { useToastScrollLock } from "./useToastScrollLock.mjs";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "Our Frontend Toolkit, Free and Open Source",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.34",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Robin Scholz",
|
|
@@ -30,13 +30,17 @@
|
|
|
30
30
|
"types": "./dist/nuxt/types.d.mts",
|
|
31
31
|
"import": "./dist/nuxt/module.mjs"
|
|
32
32
|
},
|
|
33
|
-
"./composables": {
|
|
34
|
-
"types": "./dist/composables
|
|
35
|
-
"import": "./dist/composables
|
|
33
|
+
"./composables/*": {
|
|
34
|
+
"types": "./dist/composables/*/index.d.ts",
|
|
35
|
+
"import": "./dist/composables/*/index.js"
|
|
36
36
|
},
|
|
37
|
-
"./plugins": {
|
|
38
|
-
"types": "./dist/plugins
|
|
39
|
-
"import": "./dist/plugins
|
|
37
|
+
"./plugins/*/nuxt": {
|
|
38
|
+
"types": "./dist/plugins/*/nuxt.d.ts",
|
|
39
|
+
"import": "./dist/plugins/*/nuxt.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./plugins/*": {
|
|
42
|
+
"types": "./dist/plugins/*/index.d.ts",
|
|
43
|
+
"import": "./dist/plugins/*/index.mjs"
|
|
40
44
|
},
|
|
41
45
|
"./plugins/MagicPlayer/css/*.css": {
|
|
42
46
|
"import": "./dist/plugins/MagicPlayer/src/css/*.css"
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import * as vue from 'vue';
|
|
2
|
-
import { MaybeRef } from 'vue';
|
|
3
|
-
import { DateTime } from 'luxon';
|
|
4
|
-
import { linear, easeInQuad, easeOutQuad, easeInOutQuad, easeOutBack, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInQuint, easeOutQuint, easeInOutQuint } from '@maas/vue-equipment/utils';
|
|
5
|
-
import { MaybeElement, MaybeComputedElementRef } from '@vueuse/core';
|
|
6
|
-
|
|
7
|
-
type DateTimeArray = [number, number, number, number?, number?, number?];
|
|
8
|
-
interface CountdownOptions {
|
|
9
|
-
endDateTime: MaybeRef<DateTimeArray>;
|
|
10
|
-
timezone?: MaybeRef<string>;
|
|
11
|
-
zeroIndexedMonths?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare function useCountdown(options: CountdownOptions, callback?: () => void): {
|
|
14
|
-
years: vue.ShallowRef<number, number>;
|
|
15
|
-
days: vue.ShallowRef<number, number>;
|
|
16
|
-
hours: vue.ShallowRef<number, number>;
|
|
17
|
-
minutes: vue.ShallowRef<number, number>;
|
|
18
|
-
seconds: vue.ShallowRef<number, number>;
|
|
19
|
-
endDateTime: vue.ComputedRef<DateTime<true> | DateTime<false>>;
|
|
20
|
-
pad: (value: number) => string;
|
|
21
|
-
restart: () => void;
|
|
22
|
-
onTick: (callback: () => void) => void;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
type EasingKey = 'linear' | 'easeInQuad' | 'easeOutQuad' | 'easeInOutQuad' | 'easeOutBack' | 'easeInCubic' | 'easeOutCubic' | 'easeInOutCubic' | 'easeInQuart' | 'easeOutQuart' | 'easeInOutQuart' | 'easeInQuint' | 'easeOutQuint' | 'easeInOutQuint';
|
|
26
|
-
declare function useEasings(): {
|
|
27
|
-
linear: typeof linear;
|
|
28
|
-
easeInQuad: typeof easeInQuad;
|
|
29
|
-
easeOutQuad: typeof easeOutQuad;
|
|
30
|
-
easeInOutQuad: typeof easeInOutQuad;
|
|
31
|
-
easeOutBack: typeof easeOutBack;
|
|
32
|
-
easeInCubic: typeof easeInCubic;
|
|
33
|
-
easeOutCubic: typeof easeOutCubic;
|
|
34
|
-
easeInOutCubic: typeof easeInOutCubic;
|
|
35
|
-
easeInQuart: typeof easeInQuart;
|
|
36
|
-
easeOutQuart: typeof easeOutQuart;
|
|
37
|
-
easeInOutQuart: typeof easeInOutQuart;
|
|
38
|
-
easeInQuint: typeof easeInQuint;
|
|
39
|
-
easeOutQuint: typeof easeOutQuint;
|
|
40
|
-
easeInOutQuint: typeof easeInOutQuint;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
type UseMetaViewportArgs = {
|
|
44
|
-
content: string;
|
|
45
|
-
};
|
|
46
|
-
declare function useMetaViewport(args?: UseMetaViewportArgs): {
|
|
47
|
-
setMetaViewport: () => void;
|
|
48
|
-
resetMetaViewport: () => void;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
type ScrollToTarget = string | Element | MaybeElement | MaybeComputedElementRef;
|
|
52
|
-
type ScrollToParent = ScrollToTarget | Window;
|
|
53
|
-
type ScrollToParams = {
|
|
54
|
-
parent?: Element | Window;
|
|
55
|
-
left: number;
|
|
56
|
-
top: number;
|
|
57
|
-
duration?: {
|
|
58
|
-
x?: number;
|
|
59
|
-
y?: number;
|
|
60
|
-
};
|
|
61
|
-
easing?: (t: number) => number;
|
|
62
|
-
callback?: () => void;
|
|
63
|
-
};
|
|
64
|
-
type getScrollDurationParams = {
|
|
65
|
-
parent: Element | Window;
|
|
66
|
-
left: number;
|
|
67
|
-
top: number;
|
|
68
|
-
speed: number;
|
|
69
|
-
};
|
|
70
|
-
type scrollToTargetParams = {
|
|
71
|
-
target: ScrollToTarget;
|
|
72
|
-
parent?: ScrollToParent;
|
|
73
|
-
offset?: {
|
|
74
|
-
x?: number;
|
|
75
|
-
y?: number;
|
|
76
|
-
};
|
|
77
|
-
speed?: number;
|
|
78
|
-
easing?: (t: number) => number;
|
|
79
|
-
};
|
|
80
|
-
declare function useScrollTo(): {
|
|
81
|
-
getScrollPosition: (element: Element | Window) => {
|
|
82
|
-
x: number;
|
|
83
|
-
y: number;
|
|
84
|
-
};
|
|
85
|
-
getDistance: (target: Element, parent?: Element | Window) => {
|
|
86
|
-
top: number;
|
|
87
|
-
left: number;
|
|
88
|
-
};
|
|
89
|
-
getScrollDuration: ({ parent, left, top, speed, }: getScrollDurationParams) => {
|
|
90
|
-
x: number;
|
|
91
|
-
y: number;
|
|
92
|
-
};
|
|
93
|
-
scrollTo: ({ parent, top, left, duration, easing, callback, }: ScrollToParams) => void;
|
|
94
|
-
scrollToTarget: ({ target, parent, offset, speed, easing, }: scrollToTargetParams) => void;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export { type CountdownOptions, type DateTimeArray, type EasingKey, type ScrollToParams, type ScrollToParent, type ScrollToTarget, type UseMetaViewportArgs, type getScrollDurationParams, type scrollToTargetParams, useCountdown, useEasings, useMetaViewport, useScrollTo };
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
// useCountdown/index.ts
|
|
2
|
-
import {
|
|
3
|
-
computed,
|
|
4
|
-
onMounted,
|
|
5
|
-
shallowRef,
|
|
6
|
-
unref,
|
|
7
|
-
watch
|
|
8
|
-
} from "vue";
|
|
9
|
-
import { MagicTimer } from "@maas/magic-timer";
|
|
10
|
-
import { DateTime } from "luxon";
|
|
11
|
-
var defaultOptions = {
|
|
12
|
-
endDateTime: [1970, 1, 1, 0, 0, 0],
|
|
13
|
-
zeroIndexedMonths: false
|
|
14
|
-
};
|
|
15
|
-
function useCountdown(options, callback) {
|
|
16
|
-
options = { ...defaultOptions, ...options };
|
|
17
|
-
if (unref(options.endDateTime).length < 3) {
|
|
18
|
-
console.error(
|
|
19
|
-
"useCountdownClock: \u201CendDateTime\u201D needs to be an array [YYYY, MM, DD, HH?, MM?, SS?]"
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
const timezone = unref(options.timezone);
|
|
23
|
-
if (timezone) {
|
|
24
|
-
if (!DateTime.now().setZone(timezone).isValid) {
|
|
25
|
-
console.error(
|
|
26
|
-
`useCountdownClock: \u201C${timezone}\u201D is not a valid timezone. Did you mean ${DateTime.local().zoneName}? For more information see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones`
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const timer = new MagicTimer();
|
|
31
|
-
const years = shallowRef(0);
|
|
32
|
-
const days = shallowRef(0);
|
|
33
|
-
const hours = shallowRef(0);
|
|
34
|
-
const minutes = shallowRef(0);
|
|
35
|
-
const seconds = shallowRef(0);
|
|
36
|
-
const parseDateTimeArray = (dateTimeArr) => {
|
|
37
|
-
const [year, month, day, hour, minute, second] = dateTimeArr;
|
|
38
|
-
return {
|
|
39
|
-
year,
|
|
40
|
-
month: options.zeroIndexedMonths ? month + 1 : month,
|
|
41
|
-
day,
|
|
42
|
-
hour: hour ?? 0,
|
|
43
|
-
minute: minute ?? 0,
|
|
44
|
-
second: second ?? 0
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
const endDateTime = computed(() => {
|
|
48
|
-
const { year, month, day, hour, minute, second } = parseDateTimeArray(
|
|
49
|
-
unref(options.endDateTime)
|
|
50
|
-
);
|
|
51
|
-
return DateTime.fromObject(
|
|
52
|
-
{
|
|
53
|
-
year,
|
|
54
|
-
month,
|
|
55
|
-
day,
|
|
56
|
-
hour,
|
|
57
|
-
minute,
|
|
58
|
-
second
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
zone: unref(options.timezone)
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
function tick() {
|
|
66
|
-
const now = DateTime.now().setZone(unref(options.timezone));
|
|
67
|
-
const end = endDateTime.value;
|
|
68
|
-
if (end <= now) {
|
|
69
|
-
timer.stop();
|
|
70
|
-
reset();
|
|
71
|
-
if (callback) {
|
|
72
|
-
callback();
|
|
73
|
-
}
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const diff = end.diff(now, [
|
|
77
|
-
"years",
|
|
78
|
-
"days",
|
|
79
|
-
"hours",
|
|
80
|
-
"minutes",
|
|
81
|
-
"seconds",
|
|
82
|
-
"milliseconds"
|
|
83
|
-
]).toObject();
|
|
84
|
-
years.value = diff.years ?? 0;
|
|
85
|
-
days.value = diff.days ?? 0;
|
|
86
|
-
hours.value = diff.hours ?? 0;
|
|
87
|
-
minutes.value = diff.minutes ?? 0;
|
|
88
|
-
seconds.value = diff.seconds ?? 0;
|
|
89
|
-
}
|
|
90
|
-
function pad(value) {
|
|
91
|
-
return ("0" + value).slice(-2);
|
|
92
|
-
}
|
|
93
|
-
function onTick(callback2) {
|
|
94
|
-
timer.on("tick", callback2);
|
|
95
|
-
}
|
|
96
|
-
function reset() {
|
|
97
|
-
years.value = 0;
|
|
98
|
-
days.value = 0;
|
|
99
|
-
hours.value = 0;
|
|
100
|
-
minutes.value = 0;
|
|
101
|
-
seconds.value = 0;
|
|
102
|
-
}
|
|
103
|
-
function restart() {
|
|
104
|
-
timer.reset();
|
|
105
|
-
timer.start();
|
|
106
|
-
}
|
|
107
|
-
timer.on("tick", tick);
|
|
108
|
-
onMounted(() => {
|
|
109
|
-
tick();
|
|
110
|
-
timer.start();
|
|
111
|
-
});
|
|
112
|
-
watch(endDateTime, () => {
|
|
113
|
-
if (timer.state === "running") {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
restart();
|
|
117
|
-
});
|
|
118
|
-
return {
|
|
119
|
-
years,
|
|
120
|
-
days,
|
|
121
|
-
hours,
|
|
122
|
-
minutes,
|
|
123
|
-
seconds,
|
|
124
|
-
endDateTime,
|
|
125
|
-
pad,
|
|
126
|
-
restart,
|
|
127
|
-
onTick
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// useEasings/index.ts
|
|
132
|
-
import {
|
|
133
|
-
linear,
|
|
134
|
-
easeInQuad,
|
|
135
|
-
easeOutQuad,
|
|
136
|
-
easeInOutQuad,
|
|
137
|
-
easeOutBack,
|
|
138
|
-
easeInCubic,
|
|
139
|
-
easeOutCubic,
|
|
140
|
-
easeInOutCubic,
|
|
141
|
-
easeInQuart,
|
|
142
|
-
easeOutQuart,
|
|
143
|
-
easeInOutQuart,
|
|
144
|
-
easeInQuint,
|
|
145
|
-
easeOutQuint,
|
|
146
|
-
easeInOutQuint
|
|
147
|
-
} from "@maas/vue-equipment/utils";
|
|
148
|
-
function useEasings() {
|
|
149
|
-
const easings = {
|
|
150
|
-
linear,
|
|
151
|
-
easeInQuad,
|
|
152
|
-
easeOutQuad,
|
|
153
|
-
easeInOutQuad,
|
|
154
|
-
easeOutBack,
|
|
155
|
-
easeInCubic,
|
|
156
|
-
easeOutCubic,
|
|
157
|
-
easeInOutCubic,
|
|
158
|
-
easeInQuart,
|
|
159
|
-
easeOutQuart,
|
|
160
|
-
easeInOutQuart,
|
|
161
|
-
easeInQuint,
|
|
162
|
-
easeOutQuint,
|
|
163
|
-
easeInOutQuint
|
|
164
|
-
};
|
|
165
|
-
return easings;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// useMetaViewport/index.ts
|
|
169
|
-
import { shallowRef as shallowRef2 } from "vue";
|
|
170
|
-
function useMetaViewport(args) {
|
|
171
|
-
const content = args?.content || "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0";
|
|
172
|
-
const metaViewport = shallowRef2(void 0);
|
|
173
|
-
function setMetaViewport() {
|
|
174
|
-
const metaElement = document.querySelector(
|
|
175
|
-
'meta[name="viewport"]'
|
|
176
|
-
);
|
|
177
|
-
metaViewport.value = metaElement.content;
|
|
178
|
-
metaElement.setAttribute("content", content);
|
|
179
|
-
}
|
|
180
|
-
function resetMetaViewport() {
|
|
181
|
-
const metaElement = document.querySelector(
|
|
182
|
-
'meta[name="viewport"]'
|
|
183
|
-
);
|
|
184
|
-
if (metaViewport.value) {
|
|
185
|
-
metaElement.setAttribute("content", metaViewport.value);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return {
|
|
189
|
-
setMetaViewport,
|
|
190
|
-
resetMetaViewport
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// useScrollTo/index.ts
|
|
195
|
-
import {
|
|
196
|
-
unrefElement
|
|
197
|
-
} from "@vueuse/core";
|
|
198
|
-
import { easeOutQuad as easeOutQuad2 } from "@maas/vue-equipment/utils";
|
|
199
|
-
function min(a, b) {
|
|
200
|
-
return a < b ? a : b;
|
|
201
|
-
}
|
|
202
|
-
function unwrapParent(parent) {
|
|
203
|
-
if (parent === window) {
|
|
204
|
-
return parent;
|
|
205
|
-
} else if (typeof parent === "string") {
|
|
206
|
-
return document.querySelector(parent) || document.documentElement;
|
|
207
|
-
} else {
|
|
208
|
-
return unrefElement(parent) || document.documentElement;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
function unwrapTarget(target, parentEl) {
|
|
212
|
-
if (typeof target === "string") {
|
|
213
|
-
const queryTarget = parentEl === window ? document : parentEl;
|
|
214
|
-
return queryTarget.querySelector(target);
|
|
215
|
-
} else {
|
|
216
|
-
return unrefElement(target);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
function isHtmlElement(parentEl) {
|
|
220
|
-
return parentEl instanceof HTMLElement;
|
|
221
|
-
}
|
|
222
|
-
function disableScrollSnap(parentEl) {
|
|
223
|
-
if (isHtmlElement(parentEl)) {
|
|
224
|
-
parentEl.style.scrollSnapType = "none";
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function reenableScrollSnap(parentEl) {
|
|
228
|
-
if (isHtmlElement(parentEl)) {
|
|
229
|
-
parentEl.style.scrollSnapType = "";
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
function useScrollTo() {
|
|
233
|
-
function getScrollPosition(element) {
|
|
234
|
-
if (element === window) {
|
|
235
|
-
return { x: window.scrollX, y: window.scrollY };
|
|
236
|
-
} else if (element instanceof Element) {
|
|
237
|
-
return { x: element.scrollLeft, y: element.scrollTop };
|
|
238
|
-
} else {
|
|
239
|
-
return { x: 0, y: 0 };
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
function getDistance(target, parent) {
|
|
243
|
-
const rect = target.getBoundingClientRect();
|
|
244
|
-
const scrollEl = parent || document.scrollingElement || document.documentElement;
|
|
245
|
-
const scrollTop = scrollEl instanceof Window ? 0 : scrollEl.scrollTop;
|
|
246
|
-
const scrollLeft = scrollEl instanceof Window ? 0 : scrollEl.scrollLeft;
|
|
247
|
-
return {
|
|
248
|
-
top: rect.top + scrollTop,
|
|
249
|
-
left: rect.left + scrollLeft
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
function getScrollDuration({
|
|
253
|
-
parent = document.documentElement || document.body,
|
|
254
|
-
left = 0,
|
|
255
|
-
top = 0,
|
|
256
|
-
speed = 500
|
|
257
|
-
}) {
|
|
258
|
-
const currentPos = getScrollPosition(parent);
|
|
259
|
-
const distanceX = currentPos.x - left;
|
|
260
|
-
const distanceY = currentPos.y - top;
|
|
261
|
-
const durationX = Math.abs(distanceX / speed * 100);
|
|
262
|
-
const durationY = Math.abs(distanceY / speed * 100);
|
|
263
|
-
return { x: durationX, y: durationY };
|
|
264
|
-
}
|
|
265
|
-
function scrollTo({
|
|
266
|
-
parent = document.documentElement || document.body,
|
|
267
|
-
top,
|
|
268
|
-
left,
|
|
269
|
-
duration = {},
|
|
270
|
-
easing = easeOutQuad2,
|
|
271
|
-
callback
|
|
272
|
-
}) {
|
|
273
|
-
const startTime = Date.now();
|
|
274
|
-
const { x: fromX, y: fromY } = getScrollPosition(parent);
|
|
275
|
-
if (fromX === top && fromY === left) {
|
|
276
|
-
if (callback) callback();
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
const mappedDuration = { x: 500, y: 500, ...duration };
|
|
280
|
-
const scroll = () => {
|
|
281
|
-
const currentTime = Date.now();
|
|
282
|
-
const timeX = min(1, (currentTime - startTime) / mappedDuration.x);
|
|
283
|
-
const timeY = min(1, (currentTime - startTime) / mappedDuration.y);
|
|
284
|
-
const easedTimeX = easing(timeX);
|
|
285
|
-
const easedTimeY = easing(timeY);
|
|
286
|
-
const minTime = Math.min(easedTimeX, easedTimeY);
|
|
287
|
-
parent.scroll({
|
|
288
|
-
left: minTime * (left - fromX) + fromX,
|
|
289
|
-
top: minTime * (top - fromY) + fromY
|
|
290
|
-
});
|
|
291
|
-
if (easedTimeX < 1 || easedTimeY < 1) {
|
|
292
|
-
requestAnimationFrame(scroll);
|
|
293
|
-
} else if (callback) {
|
|
294
|
-
callback();
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
requestAnimationFrame(scroll);
|
|
298
|
-
}
|
|
299
|
-
function scrollToTarget({
|
|
300
|
-
target,
|
|
301
|
-
parent = document.documentElement || document.body,
|
|
302
|
-
offset = {},
|
|
303
|
-
speed = 500,
|
|
304
|
-
easing = easeOutQuad2
|
|
305
|
-
}) {
|
|
306
|
-
const parentEl = unwrapParent(parent);
|
|
307
|
-
if (!parentEl) return;
|
|
308
|
-
const targetEl = unwrapTarget(target, parentEl);
|
|
309
|
-
if (!targetEl) return;
|
|
310
|
-
disableScrollSnap(parentEl);
|
|
311
|
-
const mappedOffset = { x: 0, y: 0, ...offset };
|
|
312
|
-
const distance = getDistance(targetEl, parentEl);
|
|
313
|
-
const leftDistance = distance.left - mappedOffset.x;
|
|
314
|
-
const topDistance = distance.top - mappedOffset.y;
|
|
315
|
-
const scrollDuration = getScrollDuration({
|
|
316
|
-
parent: parentEl,
|
|
317
|
-
left: leftDistance,
|
|
318
|
-
top: topDistance,
|
|
319
|
-
speed
|
|
320
|
-
});
|
|
321
|
-
scrollTo({
|
|
322
|
-
parent: parentEl,
|
|
323
|
-
left: leftDistance,
|
|
324
|
-
top: topDistance,
|
|
325
|
-
duration: scrollDuration,
|
|
326
|
-
easing,
|
|
327
|
-
callback: () => reenableScrollSnap(parentEl)
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
return {
|
|
331
|
-
getScrollPosition,
|
|
332
|
-
getDistance,
|
|
333
|
-
getScrollDuration,
|
|
334
|
-
scrollTo,
|
|
335
|
-
scrollToTarget
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
export {
|
|
339
|
-
useCountdown,
|
|
340
|
-
useEasings,
|
|
341
|
-
useMetaViewport,
|
|
342
|
-
useScrollTo
|
|
343
|
-
};
|
|
344
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../packages/composables/useCountdown/index.ts","../../packages/composables/useEasings/index.ts","../../packages/composables/useMetaViewport/index.ts","../../packages/composables/useScrollTo/index.ts"],"sourcesContent":["import {\n computed,\n onMounted,\n shallowRef,\n unref,\n watch,\n type MaybeRef,\n} from 'vue'\nimport { MagicTimer } from '@maas/magic-timer'\nimport { DateTime } from 'luxon'\n\nexport type DateTimeArray = [number, number, number, number?, number?, number?]\n\nexport interface CountdownOptions {\n endDateTime: MaybeRef<DateTimeArray>\n timezone?: MaybeRef<string>\n zeroIndexedMonths?: boolean\n}\n\nconst defaultOptions: CountdownOptions = {\n endDateTime: [1970, 1, 1, 0, 0, 0],\n zeroIndexedMonths: false,\n}\n\nexport function useCountdown(options: CountdownOptions, callback?: () => void) {\n options = { ...defaultOptions, ...options }\n\n if (unref(options.endDateTime).length < 3) {\n console.error(\n 'useCountdownClock: “endDateTime” needs to be an array [YYYY, MM, DD, HH?, MM?, SS?]'\n )\n }\n\n const timezone = unref(options.timezone)\n if (timezone) {\n if (!DateTime.now().setZone(timezone).isValid) {\n console.error(\n `useCountdownClock: “${timezone}” is not a valid timezone. Did you mean ${\n DateTime.local().zoneName\n }? For more information see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones`\n )\n }\n }\n\n const timer = new MagicTimer()\n\n const years = shallowRef(0)\n const days = shallowRef(0)\n const hours = shallowRef(0)\n const minutes = shallowRef(0)\n const seconds = shallowRef(0)\n\n // Parse the end dateTime array into an date and time object\n // If hour, minute or second are not set, set them to 0\n // Optionally add +1 if month is not zero indexed\n const parseDateTimeArray = (dateTimeArr: DateTimeArray) => {\n const [year, month, day, hour, minute, second] = dateTimeArr\n return {\n year,\n month: options.zeroIndexedMonths ? month + 1 : month,\n day,\n hour: hour ?? 0,\n minute: minute ?? 0,\n second: second ?? 0,\n }\n }\n\n const endDateTime = computed(() => {\n const { year, month, day, hour, minute, second } = parseDateTimeArray(\n unref(options.endDateTime)\n )\n\n return DateTime.fromObject(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n },\n {\n zone: unref(options.timezone),\n }\n )\n })\n\n // Update the countdown values on each tick\n // If endDateTime is reached, stop the timer, reset the values and run the callback\n function tick() {\n const now = DateTime.now().setZone(unref(options.timezone))\n const end = endDateTime.value\n\n if (end <= now) {\n timer.stop()\n reset()\n\n if (callback) {\n callback()\n }\n\n return\n }\n\n const diff = end\n .diff(now, [\n 'years',\n 'days',\n 'hours',\n 'minutes',\n 'seconds',\n 'milliseconds',\n ])\n .toObject()\n\n years.value = diff.years ?? 0\n days.value = diff.days ?? 0\n hours.value = diff.hours ?? 0\n minutes.value = diff.minutes ?? 0\n seconds.value = diff.seconds ?? 0\n }\n\n function pad(value: number): string {\n return ('0' + value).slice(-2)\n }\n\n function onTick(callback: () => void) {\n timer.on('tick', callback)\n }\n\n function reset() {\n years.value = 0\n days.value = 0\n hours.value = 0\n minutes.value = 0\n seconds.value = 0\n }\n\n function restart() {\n timer.reset()\n timer.start()\n }\n\n timer.on('tick', tick)\n\n onMounted(() => {\n tick()\n timer.start()\n })\n\n // Watch for changes in the endDateTime\n // and restart the timer\n watch(endDateTime, () => {\n if (timer.state === 'running') {\n return\n }\n\n restart()\n })\n\n return {\n years,\n days,\n hours,\n minutes,\n seconds,\n endDateTime,\n pad,\n restart,\n onTick,\n }\n}\n","import {\n linear,\n easeInQuad,\n easeOutQuad,\n easeInOutQuad,\n easeOutBack,\n easeInCubic,\n easeOutCubic,\n easeInOutCubic,\n easeInQuart,\n easeOutQuart,\n easeInOutQuart,\n easeInQuint,\n easeOutQuint,\n easeInOutQuint,\n} from '@maas/vue-equipment/utils'\n\nexport type EasingKey =\n | 'linear'\n | 'easeInQuad'\n | 'easeOutQuad'\n | 'easeInOutQuad'\n | 'easeOutBack'\n | 'easeInCubic'\n | 'easeOutCubic'\n | 'easeInOutCubic'\n | 'easeInQuart'\n | 'easeOutQuart'\n | 'easeInOutQuart'\n | 'easeInQuint'\n | 'easeOutQuint'\n | 'easeInOutQuint'\n\nexport function useEasings() {\n const easings = {\n linear,\n easeInQuad,\n easeOutQuad,\n easeInOutQuad,\n easeOutBack,\n easeInCubic,\n easeOutCubic,\n easeInOutCubic,\n easeInQuart,\n easeOutQuart,\n easeInOutQuart,\n easeInQuint,\n easeOutQuint,\n easeInOutQuint,\n }\n\n return easings\n}\n","import { shallowRef } from 'vue'\n\nexport type UseMetaViewportArgs = {\n content: string\n}\n\nexport function useMetaViewport(args?: UseMetaViewportArgs) {\n const content =\n args?.content ||\n 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'\n\n const metaViewport = shallowRef<string | undefined>(undefined)\n\n function setMetaViewport() {\n const metaElement = document.querySelector(\n 'meta[name=\"viewport\"]'\n ) as HTMLMetaElement\n\n metaViewport.value = metaElement.content\n metaElement.setAttribute('content', content)\n }\n\n function resetMetaViewport() {\n const metaElement = document.querySelector(\n 'meta[name=\"viewport\"]'\n ) as HTMLMetaElement\n\n if (metaViewport.value) {\n metaElement.setAttribute('content', metaViewport.value)\n }\n }\n\n return {\n setMetaViewport,\n resetMetaViewport,\n }\n}\n","import {\n unrefElement,\n type MaybeComputedElementRef,\n type MaybeElement,\n} from '@vueuse/core'\nimport { easeOutQuad } from '@maas/vue-equipment/utils'\n\nexport type ScrollToTarget =\n | string\n | Element\n | MaybeElement\n | MaybeComputedElementRef\n\nexport type ScrollToParent = ScrollToTarget | Window\n\nexport type ScrollToParams = {\n parent?: Element | Window\n left: number\n top: number\n duration?: { x?: number; y?: number }\n easing?: (t: number) => number\n callback?: () => void\n}\n\nexport type getScrollDurationParams = {\n parent: Element | Window\n left: number\n top: number\n speed: number\n}\n\nexport type scrollToTargetParams = {\n target: ScrollToTarget\n parent?: ScrollToParent\n offset?: {\n x?: number\n y?: number\n }\n speed?: number\n easing?: (t: number) => number\n}\n\n// Private functions\nfunction min(a: number, b: number) {\n return a < b ? a : b\n}\n\nfunction unwrapParent(parent: ScrollToParent) {\n if (parent === window) {\n return parent\n } else if (typeof parent === 'string') {\n return document.querySelector(parent) || document.documentElement\n } else {\n return (\n unrefElement(parent as MaybeComputedElementRef<MaybeElement>) ||\n document.documentElement\n )\n }\n}\n\nfunction unwrapTarget(target: ScrollToTarget, parentEl: Element | Window) {\n if (typeof target === 'string') {\n const queryTarget = parentEl === window ? document : (parentEl as Element)\n return queryTarget.querySelector(target)\n } else {\n return unrefElement(target as MaybeComputedElementRef<MaybeElement>)\n }\n}\n\nfunction isHtmlElement(\n parentEl: Window | SVGElement | Element\n): parentEl is HTMLElement {\n return parentEl instanceof HTMLElement\n}\n\nfunction disableScrollSnap(parentEl: Window | SVGElement | Element) {\n if (isHtmlElement(parentEl)) {\n parentEl.style.scrollSnapType = 'none'\n }\n}\n\nfunction reenableScrollSnap(parentEl: Window | SVGElement | Element) {\n if (isHtmlElement(parentEl)) {\n parentEl.style.scrollSnapType = ''\n }\n}\n\n// Public composable\nexport function useScrollTo() {\n function getScrollPosition(element: Element | Window): {\n x: number\n y: number\n } {\n if (element === window) {\n return { x: window.scrollX, y: window.scrollY }\n } else if (element instanceof Element) {\n return { x: element.scrollLeft, y: element.scrollTop }\n } else {\n return { x: 0, y: 0 }\n }\n }\n\n function getDistance(\n target: Element,\n parent?: Element | Window\n ): { top: number; left: number } {\n const rect = target.getBoundingClientRect()\n const scrollEl =\n parent || document.scrollingElement || document.documentElement\n\n const scrollTop = scrollEl instanceof Window ? 0 : scrollEl.scrollTop\n const scrollLeft = scrollEl instanceof Window ? 0 : scrollEl.scrollLeft\n\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft,\n }\n }\n\n function getScrollDuration({\n parent = document.documentElement || document.body,\n left = 0,\n top = 0,\n speed = 500,\n }: getScrollDurationParams) {\n const currentPos = getScrollPosition(parent)\n const distanceX = currentPos.x - left\n const distanceY = currentPos.y - top\n const durationX = Math.abs((distanceX / speed) * 100)\n const durationY = Math.abs((distanceY / speed) * 100)\n\n return { x: durationX, y: durationY }\n }\n\n function scrollTo({\n parent = document.documentElement || document.body,\n top,\n left,\n duration = {},\n easing = easeOutQuad,\n callback,\n }: ScrollToParams) {\n const startTime = Date.now()\n const { x: fromX, y: fromY } = getScrollPosition(parent)\n\n if (fromX === top && fromY === left) {\n if (callback) callback()\n return\n }\n\n const mappedDuration = { x: 500, y: 500, ...duration }\n\n const scroll = () => {\n const currentTime = Date.now()\n\n const timeX = min(1, (currentTime - startTime) / mappedDuration.x)\n const timeY = min(1, (currentTime - startTime) / mappedDuration.y)\n const easedTimeX = easing(timeX)\n const easedTimeY = easing(timeY)\n\n // We use the min of the two times to make sure we scroll at the same speed\n const minTime = Math.min(easedTimeX, easedTimeY)\n\n parent.scroll({\n left: minTime * (left - fromX) + fromX,\n top: minTime * (top - fromY) + fromY,\n })\n\n if (easedTimeX < 1 || easedTimeY < 1) {\n requestAnimationFrame(scroll)\n } else if (callback) {\n callback()\n }\n }\n\n requestAnimationFrame(scroll)\n }\n\n function scrollToTarget({\n target,\n parent = document.documentElement || document.body,\n offset = {},\n speed = 500,\n easing = easeOutQuad,\n }: scrollToTargetParams) {\n const parentEl = unwrapParent(parent)\n if (!parentEl) return\n const targetEl = unwrapTarget(target, parentEl)\n if (!targetEl) return\n\n disableScrollSnap(parentEl)\n\n const mappedOffset = { x: 0, y: 0, ...offset }\n const distance = getDistance(targetEl, parentEl)\n const leftDistance = distance.left - mappedOffset.x\n const topDistance = distance.top - mappedOffset.y\n\n const scrollDuration = getScrollDuration({\n parent: parentEl,\n left: leftDistance,\n top: topDistance,\n speed: speed,\n })\n\n scrollTo({\n parent: parentEl,\n left: leftDistance,\n top: topDistance,\n duration: scrollDuration,\n easing: easing,\n callback: () => reenableScrollSnap(parentEl),\n })\n }\n\n return {\n getScrollPosition,\n getDistance,\n getScrollDuration,\n scrollTo,\n scrollToTarget,\n }\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AAUzB,IAAM,iBAAmC;AAAA,EACvC,aAAa,CAAC,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC;AAAA,EACjC,mBAAmB;AACrB;AAEO,SAAS,aAAa,SAA2B,UAAuB;AAC7E,YAAU,EAAE,GAAG,gBAAgB,GAAG,QAAQ;AAE1C,MAAI,MAAM,QAAQ,WAAW,EAAE,SAAS,GAAG;AACzC,YAAQ;AAAA,MACN;AAAA,IACF;AAAA,EACF;AAEA,QAAM,WAAW,MAAM,QAAQ,QAAQ;AACvC,MAAI,UAAU;AACZ,QAAI,CAAC,SAAS,IAAI,EAAE,QAAQ,QAAQ,EAAE,SAAS;AAC7C,cAAQ;AAAA,QACN,4BAAuB,QAAQ,gDAC7B,SAAS,MAAM,EAAE,QACnB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,QAAQ,IAAI,WAAW;AAE7B,QAAM,QAAQ,WAAW,CAAC;AAC1B,QAAM,OAAO,WAAW,CAAC;AACzB,QAAM,QAAQ,WAAW,CAAC;AAC1B,QAAM,UAAU,WAAW,CAAC;AAC5B,QAAM,UAAU,WAAW,CAAC;AAK5B,QAAM,qBAAqB,CAAC,gBAA+B;AACzD,UAAM,CAAC,MAAM,OAAO,KAAK,MAAM,QAAQ,MAAM,IAAI;AACjD,WAAO;AAAA,MACL;AAAA,MACA,OAAO,QAAQ,oBAAoB,QAAQ,IAAI;AAAA,MAC/C;AAAA,MACA,MAAM,QAAQ;AAAA,MACd,QAAQ,UAAU;AAAA,MAClB,QAAQ,UAAU;AAAA,IACpB;AAAA,EACF;AAEA,QAAM,c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M;AAAA,MAC9B,WAAW,UAAU;AACnB,iBAAS;AAAA,MACX;AAAA,IACF;AAEA,0BAAsB,MAAM;AAAA,EAC9B;AAEA,WAAS,eAAe;AAAA,IACtB;AAAA,IACA,SAAS,SAAS,mBAAmB,SAAS;AAAA,IAC9C,SAAS,CAAC;AAAA,IACV,QAAQ;AAAA,IACR,SAASA;AAAA,EACX,GAAyB;AACvB,UAAM,WAAW,aAAa,MAAM;AACpC,QAAI,CAAC,SAAU;AACf,UAAM,WAAW,aAAa,QAAQ,QAAQ;AAC9C,QAAI,CAAC,SAAU;AAEf,sBAAkB,QAAQ;AAE1B,UAAM,eAAe,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,OAAO;AAC7C,UAAM,WAAW,YAAY,UAAU,QAAQ;AAC/C,UAAM,eAAe,SAAS,OAAO,aAAa;AAClD,UAAM,cAAc,SAAS,MAAM,aAAa;AAEhD,UAAM,iBAAiB,kBAAkB;AAAA,MACvC,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,KAAK;AAAA,MACL;AAAA,IACF,CAAC;AAED,aAAS;AAAA,MACP,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,KAAK;AAAA,MACL,UAAU;AAAA,MACV;AAAA,MACA,UAAU,MAAM,mBAAmB,QAAQ;AAAA,IAC7C,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["callback","shallowRef","easeOutQuad"]}
|
package/dist/plugins/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './MagicAccordion/index.js';
|
|
2
|
-
export * from './MagicCommand/index.js';
|
|
3
|
-
export * from './MagicCookie/index.js';
|
|
4
|
-
export * from './MagicDraggable/index.js';
|
|
5
|
-
export * from './MagicDrawer/index.js';
|
|
6
|
-
export * from './MagicEmitter/index.js';
|
|
7
|
-
export * from './MagicMarquee/index.js';
|
|
8
|
-
export * from './MagicMenu/index.js';
|
|
9
|
-
export * from './MagicModal/index.js';
|
|
10
|
-
export * from './MagicNoise/index.js';
|
|
11
|
-
export * from './MagicPie/index.js';
|
|
12
|
-
export * from './MagicPlayer/index.js';
|
|
13
|
-
export * from './MagicScroll/index.js';
|
|
14
|
-
export * from './MagicToast/index.js';
|
package/dist/plugins/index.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from "./MagicAccordion/index.mjs";
|
|
2
|
-
export * from "./MagicCommand/index.mjs";
|
|
3
|
-
export * from "./MagicCookie/index.mjs";
|
|
4
|
-
export * from "./MagicDraggable/index.mjs";
|
|
5
|
-
export * from "./MagicDrawer/index.mjs";
|
|
6
|
-
export * from "./MagicEmitter/index.mjs";
|
|
7
|
-
export * from "./MagicMarquee/index.mjs";
|
|
8
|
-
export * from "./MagicMenu/index.mjs";
|
|
9
|
-
export * from "./MagicModal/index.mjs";
|
|
10
|
-
export * from "./MagicNoise/index.mjs";
|
|
11
|
-
export * from "./MagicPie/index.mjs";
|
|
12
|
-
export * from "./MagicPlayer/index.mjs";
|
|
13
|
-
export * from "./MagicScroll/index.mjs";
|
|
14
|
-
export * from "./MagicToast/index.mjs";
|