@maas/vue-equipment 1.0.0-beta.43 → 1.0.0-beta.45
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/useScrollLockPadding/index.js +1 -0
- package/dist/composables/useScrollLockPadding/index.js.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +2 -5
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionState.d.ts +2 -3
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionState.mjs +38 -11
- package/dist/plugins/MagicAccordion/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.d.vue.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +2 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +1 -0
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.d.ts +2 -3
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +36 -11
- package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicCookie/src/composables/private/useCookieState.d.ts +2 -3
- package/dist/plugins/MagicCookie/src/composables/private/useCookieState.mjs +35 -12
- package/dist/plugins/MagicCookie/src/composables/useMagicCookie.mjs +6 -1
- package/dist/plugins/MagicCookie/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +28 -11
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +11 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +41 -11
- package/dist/plugins/MagicDraggable/src/composables/useMagicDraggable.mjs +2 -1
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.d.vue.ts +2 -2
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +11 -3
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -0
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +184 -29
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.d.ts +2 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerState.mjs +35 -10
- package/dist/plugins/MagicDrawer/src/composables/useMagicDrawer.mjs +2 -1
- package/dist/plugins/MagicDrawer/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.mjs +10 -5
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +2 -5
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeState.d.ts +2 -3
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeState.mjs +36 -11
- package/dist/plugins/MagicMarquee/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.d.vue.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +2 -6
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +13 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuState.d.ts +2 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuState.mjs +32 -12
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +1 -1
- package/dist/plugins/MagicMenu/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicModal/src/composables/private/useModalState.d.ts +6 -0
- package/dist/plugins/MagicModal/src/composables/private/useModalState.mjs +58 -0
- package/dist/plugins/MagicModal/src/composables/private/useModalStore.d.ts +1 -5
- package/dist/plugins/MagicModal/src/composables/private/useModalStore.mjs +1 -15
- package/dist/plugins/MagicModal/src/composables/useMagicModal.mjs +7 -6
- package/dist/plugins/MagicModal/src/types/index.d.ts +5 -0
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +14 -2
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +12 -6
- package/dist/plugins/MagicPie/src/composables/private/usePieState.d.ts +1 -1
- package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +33 -12
- package/dist/plugins/MagicPie/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +9 -6
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +4 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +8 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +2 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +10 -6
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +4 -8
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +0 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +20 -9
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerEmitter.mjs +124 -75
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +100 -32
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +0 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +33 -13
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +2 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +35 -10
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +0 -2
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +2 -2
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +13 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +9 -5
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +2 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +2 -11
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +1 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +13 -1
- package/dist/plugins/MagicToast/src/composables/private/useToastState.d.ts +2 -3
- package/dist/plugins/MagicToast/src/composables/private/useToastState.mjs +35 -12
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -0
- package/dist/utils/index.d.ts +8 -1
- package/dist/utils/index.js +31 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/plugins/MagicError/src/MagicError.d.ts +0 -0
- package/dist/plugins/MagicError/src/MagicError.mjs +0 -0
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
onScopeDispose,
|
|
3
|
+
shallowRef,
|
|
4
|
+
toRefs,
|
|
5
|
+
toValue
|
|
6
|
+
} from "vue";
|
|
2
7
|
import { useEventListener } from "@vueuse/core";
|
|
3
8
|
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
4
9
|
import { usePlayerState } from "./usePlayerState.mjs";
|
|
@@ -13,6 +18,9 @@ export function usePlayerRuntime(args) {
|
|
|
13
18
|
const { initializeState } = usePlayerState(toValue(id));
|
|
14
19
|
const state = initializeState();
|
|
15
20
|
const { loaded } = toRefs(state);
|
|
21
|
+
let cancelLoaded = void 0;
|
|
22
|
+
let cancelPlay = void 0;
|
|
23
|
+
let cancelPause = void 0;
|
|
16
24
|
function handleHlsRuntimeError(args2) {
|
|
17
25
|
const { data, hls: hls2 } = args2;
|
|
18
26
|
const error = new Error(data.details || "HLS error");
|
|
@@ -63,13 +71,18 @@ export function usePlayerRuntime(args) {
|
|
|
63
71
|
}
|
|
64
72
|
}
|
|
65
73
|
function useNative() {
|
|
74
|
+
if (!mediaRef) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
66
77
|
const el = toValue(mediaRef);
|
|
67
78
|
if (!el || !src) {
|
|
68
79
|
return;
|
|
69
80
|
}
|
|
70
81
|
try {
|
|
71
82
|
el.src = src;
|
|
72
|
-
|
|
83
|
+
cancelLoaded?.();
|
|
84
|
+
cancelLoaded = useEventListener(
|
|
85
|
+
mediaRef,
|
|
73
86
|
"loadeddata",
|
|
74
87
|
() => {
|
|
75
88
|
loaded.value = true;
|
|
@@ -114,10 +127,12 @@ export function usePlayerRuntime(args) {
|
|
|
114
127
|
hls.on(Hls.Events.ERROR, (_event, data) => {
|
|
115
128
|
handleHlsRuntimeError({ data, hls });
|
|
116
129
|
});
|
|
117
|
-
|
|
130
|
+
cancelPause?.();
|
|
131
|
+
cancelPause = useEventListener(mediaRef, "pause", () => {
|
|
118
132
|
hls?.stopLoad();
|
|
119
133
|
});
|
|
120
|
-
|
|
134
|
+
cancelPlay?.();
|
|
135
|
+
cancelPlay = useEventListener(mediaRef, "play", () => {
|
|
121
136
|
hls?.startLoad();
|
|
122
137
|
});
|
|
123
138
|
hls.loadSource(src);
|
|
@@ -130,14 +145,10 @@ export function usePlayerRuntime(args) {
|
|
|
130
145
|
});
|
|
131
146
|
}
|
|
132
147
|
}
|
|
133
|
-
function initialize(autoplay = false) {
|
|
134
|
-
if (srcType === "native") {
|
|
135
|
-
useNative();
|
|
136
|
-
} else if (srcType === "hls") {
|
|
137
|
-
useHlsJS(autoplay);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
148
|
function destroy() {
|
|
149
|
+
cancelLoaded?.();
|
|
150
|
+
cancelPlay?.();
|
|
151
|
+
cancelPause?.();
|
|
141
152
|
try {
|
|
142
153
|
hls?.destroy();
|
|
143
154
|
} finally {
|
|
@@ -145,8 +156,17 @@ export function usePlayerRuntime(args) {
|
|
|
145
156
|
deferredLoading.value = false;
|
|
146
157
|
}
|
|
147
158
|
}
|
|
159
|
+
function initialize(autoplay = false) {
|
|
160
|
+
if (srcType === "native") {
|
|
161
|
+
useNative();
|
|
162
|
+
} else if (srcType === "hls") {
|
|
163
|
+
useHlsJS(autoplay);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
onScopeDispose(() => {
|
|
167
|
+
destroy();
|
|
168
|
+
});
|
|
148
169
|
return {
|
|
149
|
-
initialize
|
|
150
|
-
destroy
|
|
170
|
+
initialize
|
|
151
171
|
};
|
|
152
172
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MaybeRef } from 'vue';
|
|
2
2
|
import type { PlayerState } from '../../types/index.js';
|
|
3
3
|
export declare function usePlayerState(id: MaybeRef<string>): {
|
|
4
4
|
initializeState: () => PlayerState;
|
|
5
|
-
|
|
6
|
-
playerStateStore: Ref<PlayerState[], PlayerState[]>;
|
|
5
|
+
playerStateStore: import("vue").Ref<PlayerState[], PlayerState[]>;
|
|
7
6
|
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { reactive, toValue, onScopeDispose } from "vue";
|
|
2
|
+
import { createStateStore } from "@maas/vue-equipment/utils";
|
|
3
|
+
const getPlayerStateStore = createStateStore(
|
|
4
|
+
"MagicPlayer",
|
|
5
|
+
() => []
|
|
6
|
+
);
|
|
3
7
|
export function usePlayerState(id) {
|
|
8
|
+
const playerStateStore = getPlayerStateStore();
|
|
9
|
+
let scopeCounted = false;
|
|
4
10
|
function createState(id2) {
|
|
5
11
|
const state = {
|
|
6
12
|
id: id2,
|
|
13
|
+
refCount: 0,
|
|
7
14
|
buffered: [],
|
|
8
15
|
currentTime: 0,
|
|
9
16
|
dragging: false,
|
|
@@ -42,21 +49,39 @@ export function usePlayerState(id) {
|
|
|
42
49
|
playerStateStore.value = [...playerStateStore.value, state];
|
|
43
50
|
return state;
|
|
44
51
|
}
|
|
52
|
+
function deleteState() {
|
|
53
|
+
const currentId = toValue(id);
|
|
54
|
+
playerStateStore.value = playerStateStore.value.filter(
|
|
55
|
+
(x) => x.id !== currentId
|
|
56
|
+
);
|
|
57
|
+
}
|
|
45
58
|
function initializeState() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
59
|
+
const currentId = toValue(id);
|
|
60
|
+
let state = playerStateStore.value.find((entry) => entry.id === currentId);
|
|
49
61
|
if (!state) {
|
|
50
|
-
state = addState(
|
|
62
|
+
state = addState(currentId);
|
|
63
|
+
}
|
|
64
|
+
if (!scopeCounted) {
|
|
65
|
+
state.refCount++;
|
|
66
|
+
scopeCounted = true;
|
|
51
67
|
}
|
|
52
68
|
return state;
|
|
53
69
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
70
|
+
onScopeDispose(() => {
|
|
71
|
+
if (!scopeCounted) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const currentId = toValue(id);
|
|
75
|
+
const state = playerStateStore.value.find((entry) => entry.id === currentId);
|
|
76
|
+
if (state) {
|
|
77
|
+
state.refCount--;
|
|
78
|
+
if (state.refCount <= 0) {
|
|
79
|
+
deleteState();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
57
83
|
return {
|
|
58
84
|
initializeState,
|
|
59
|
-
deleteState,
|
|
60
85
|
playerStateStore
|
|
61
86
|
};
|
|
62
87
|
}
|
|
@@ -43,7 +43,6 @@ export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
|
43
43
|
};
|
|
44
44
|
controlsApi: {
|
|
45
45
|
initialize: () => void;
|
|
46
|
-
destroy: () => void;
|
|
47
46
|
bufferedPercentage: import("vue").ComputedRef<number>;
|
|
48
47
|
onMouseenter: () => void;
|
|
49
48
|
onMouseleave: () => void;
|
|
@@ -53,7 +52,6 @@ export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
|
53
52
|
};
|
|
54
53
|
playerRuntime: {
|
|
55
54
|
initialize: (autoplay?: boolean) => void;
|
|
56
|
-
destroy: () => void;
|
|
57
55
|
};
|
|
58
56
|
};
|
|
59
57
|
export type UseMagicPlayerReturn = ReturnType<typeof useMagicPlayer>;
|
|
@@ -56,8 +56,8 @@ watch(
|
|
|
56
56
|
);
|
|
57
57
|
useIntersectionObserver(
|
|
58
58
|
elRef,
|
|
59
|
-
([
|
|
60
|
-
intersecting.value = isIntersecting;
|
|
59
|
+
([entry]) => {
|
|
60
|
+
intersecting.value = entry?.isIntersecting ?? intersecting.value;
|
|
61
61
|
},
|
|
62
62
|
{ rootMargin: "150% 0px 150% 0px", immediate: true }
|
|
63
63
|
);
|
|
@@ -5,7 +5,15 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
ref,
|
|
10
|
+
inject,
|
|
11
|
+
computed,
|
|
12
|
+
onMounted,
|
|
13
|
+
watch,
|
|
14
|
+
useTemplateRef,
|
|
15
|
+
onUnmounted
|
|
16
|
+
} from "vue";
|
|
9
17
|
import { unrefElement } from "@vueuse/core";
|
|
10
18
|
import defu from "defu";
|
|
11
19
|
import {
|
|
@@ -63,4 +71,8 @@ watch(
|
|
|
63
71
|
onMounted(() => {
|
|
64
72
|
createAnimation();
|
|
65
73
|
});
|
|
74
|
+
onUnmounted(() => {
|
|
75
|
+
animation.value?.cancel();
|
|
76
|
+
animation.value = void 0;
|
|
77
|
+
});
|
|
66
78
|
</script>
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
watch,
|
|
13
13
|
nextTick,
|
|
14
14
|
readonly,
|
|
15
|
-
useTemplateRef
|
|
15
|
+
useTemplateRef,
|
|
16
|
+
onBeforeUnmount
|
|
16
17
|
} from "vue";
|
|
17
18
|
import { useIntersectionObserver } from "@vueuse/core";
|
|
18
19
|
import {
|
|
@@ -67,15 +68,18 @@ watch(
|
|
|
67
68
|
},
|
|
68
69
|
{ once: true }
|
|
69
70
|
);
|
|
70
|
-
useIntersectionObserver(
|
|
71
|
+
const intersectionObserver = useIntersectionObserver(
|
|
71
72
|
elRef,
|
|
72
|
-
([
|
|
73
|
-
intersecting.value = isIntersecting;
|
|
74
|
-
if (isIntersecting) {
|
|
73
|
+
([entry]) => {
|
|
74
|
+
intersecting.value = entry?.isIntersecting ?? intersecting.value;
|
|
75
|
+
if (entry?.isIntersecting) {
|
|
75
76
|
calculate();
|
|
76
77
|
}
|
|
77
78
|
},
|
|
78
79
|
{ rootMargin: "150% 0px 150% 0px", immediate: true }
|
|
79
80
|
);
|
|
81
|
+
onBeforeUnmount(() => {
|
|
82
|
+
intersectionObserver.stop();
|
|
83
|
+
});
|
|
80
84
|
provide(MagicScrollProgress, readonly(progress));
|
|
81
85
|
</script>
|
|
@@ -3,6 +3,7 @@ import { useElementBounding, useWindowSize } from "@vueuse/core";
|
|
|
3
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
|
+
const magicEmitter = useMagicEmitter();
|
|
6
7
|
const alerted = reactive({
|
|
7
8
|
up: {
|
|
8
9
|
top: {
|
|
@@ -114,7 +115,7 @@ export function useCollisionDetection(args) {
|
|
|
114
115
|
const mappedParentEdge = toValue(mappedParentBoundingRect[parentEdge]) + offset2;
|
|
115
116
|
if (direction === "down" && mappedChildEdge <= mappedParentEdge || direction === "up" && mappedChildEdge >= mappedParentEdge) {
|
|
116
117
|
alerted[direction][childEdge][parentEdge] = true;
|
|
117
|
-
|
|
118
|
+
magicEmitter.emit("collision", {
|
|
118
119
|
id,
|
|
119
120
|
direction,
|
|
120
121
|
parentEdge,
|
|
@@ -42,13 +42,7 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<script setup>
|
|
45
|
-
import {
|
|
46
|
-
toValue,
|
|
47
|
-
useTemplateRef,
|
|
48
|
-
provide,
|
|
49
|
-
watch,
|
|
50
|
-
onBeforeUnmount
|
|
51
|
-
} from "vue";
|
|
45
|
+
import { toValue, useTemplateRef, provide, watch } from "vue";
|
|
52
46
|
import { onClickOutside } from "@vueuse/core";
|
|
53
47
|
import { useToastState } from "../composables/private/useToastState";
|
|
54
48
|
import { useToastView } from "../composables/private/useToastView";
|
|
@@ -71,7 +65,7 @@ defineOptions({
|
|
|
71
65
|
inheritAttrs: false
|
|
72
66
|
});
|
|
73
67
|
const { deleteView } = useToastView(id);
|
|
74
|
-
const {
|
|
68
|
+
const { initializeState } = useToastState(id);
|
|
75
69
|
const state = initializeState(options);
|
|
76
70
|
const listRef = useTemplateRef("list");
|
|
77
71
|
const {
|
|
@@ -93,9 +87,6 @@ watch(
|
|
|
93
87
|
deep: true
|
|
94
88
|
}
|
|
95
89
|
);
|
|
96
|
-
onBeforeUnmount(() => {
|
|
97
|
-
deleteState();
|
|
98
|
-
});
|
|
99
90
|
provide(MagicToastInstanceId, id);
|
|
100
91
|
</script>
|
|
101
92
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, toRefs, toValue } from "vue";
|
|
1
|
+
import { computed, onScopeDispose, toRefs, toValue } from "vue";
|
|
2
2
|
import { useEventListener } from "@vueuse/core";
|
|
3
3
|
import {
|
|
4
4
|
guardedReleasePointerCapture,
|
|
@@ -34,6 +34,7 @@ export function useToastDrag(args) {
|
|
|
34
34
|
let cancelPointerup = void 0;
|
|
35
35
|
let cancelPointermove = void 0;
|
|
36
36
|
let cancelTouchend = void 0;
|
|
37
|
+
let cancelTouchcancel = void 0;
|
|
37
38
|
const hasDragged = computed(() => {
|
|
38
39
|
const hasDraggedX = !isWithinRange({
|
|
39
40
|
input: draggedX.value,
|
|
@@ -187,6 +188,7 @@ export function useToastDrag(args) {
|
|
|
187
188
|
cancelTouchend?.();
|
|
188
189
|
cancelPointerup?.();
|
|
189
190
|
cancelPointermove?.();
|
|
191
|
+
cancelTouchcancel?.();
|
|
190
192
|
}
|
|
191
193
|
function onPointerup(e) {
|
|
192
194
|
if (shouldClose.value) {
|
|
@@ -248,6 +250,12 @@ export function useToastDrag(args) {
|
|
|
248
250
|
y: draggedY.value
|
|
249
251
|
});
|
|
250
252
|
}
|
|
253
|
+
function destroy() {
|
|
254
|
+
cancelPointermove?.();
|
|
255
|
+
cancelPointerup?.();
|
|
256
|
+
cancelTouchend?.();
|
|
257
|
+
cancelTouchcancel?.();
|
|
258
|
+
}
|
|
251
259
|
function onPointerdown(e) {
|
|
252
260
|
const scrollLockValue = toValue(scrollLock);
|
|
253
261
|
if (scrollLockValue) {
|
|
@@ -270,6 +278,7 @@ export function useToastDrag(args) {
|
|
|
270
278
|
lastDraggedX.value = draggedX.value;
|
|
271
279
|
lastDraggedY.value = draggedY.value;
|
|
272
280
|
cancelPointerup = useEventListener(document, "pointerup", onPointerup);
|
|
281
|
+
cancelTouchcancel = useEventListener(document, "touchcancel", onPointerup);
|
|
273
282
|
cancelPointermove = useEventListener(
|
|
274
283
|
document,
|
|
275
284
|
"pointermove",
|
|
@@ -295,6 +304,9 @@ export function useToastDrag(args) {
|
|
|
295
304
|
state.expanded = true;
|
|
296
305
|
}
|
|
297
306
|
}
|
|
307
|
+
onScopeDispose(() => {
|
|
308
|
+
destroy();
|
|
309
|
+
});
|
|
298
310
|
return {
|
|
299
311
|
onPointerdown,
|
|
300
312
|
onClick,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MaybeRef } from 'vue';
|
|
2
2
|
import type { ToastState, MagicToastOptions } from '../../types/index.js';
|
|
3
3
|
export declare function useToastState(instanceId: MaybeRef<string>): {
|
|
4
4
|
initializeState: (options?: MagicToastOptions) => ToastState;
|
|
5
|
-
|
|
6
|
-
toastStateStore: Ref<ToastState[], ToastState[]>;
|
|
5
|
+
toastStateStore: import("vue").Ref<ToastState[], ToastState[]>;
|
|
7
6
|
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { reactive, toValue, onScopeDispose } from "vue";
|
|
2
2
|
import { defu } from "defu";
|
|
3
|
+
import { createStateStore } from "@maas/vue-equipment/utils";
|
|
3
4
|
import { defaultOptions } from "../../utils/defaultOptions.mjs";
|
|
4
|
-
const
|
|
5
|
+
const getToastStateStore = createStateStore(
|
|
6
|
+
"MagicToast",
|
|
7
|
+
() => []
|
|
8
|
+
);
|
|
5
9
|
export function useToastState(instanceId) {
|
|
10
|
+
const toastStateStore = getToastStateStore();
|
|
11
|
+
let scopeCounted = false;
|
|
6
12
|
function createState(id) {
|
|
7
13
|
const state = {
|
|
8
14
|
id,
|
|
15
|
+
refCount: 0,
|
|
9
16
|
options: { ...defaultOptions },
|
|
10
17
|
views: [],
|
|
11
18
|
expanded: false,
|
|
@@ -18,12 +25,21 @@ export function useToastState(instanceId) {
|
|
|
18
25
|
toastStateStore.value = [...toastStateStore.value, state];
|
|
19
26
|
return state;
|
|
20
27
|
}
|
|
28
|
+
function deleteState() {
|
|
29
|
+
const currentId = toValue(instanceId);
|
|
30
|
+
toastStateStore.value = toastStateStore.value.filter(
|
|
31
|
+
(x) => x.id !== currentId
|
|
32
|
+
);
|
|
33
|
+
}
|
|
21
34
|
function initializeState(options) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
35
|
+
const currentId = toValue(instanceId);
|
|
36
|
+
let state = toastStateStore.value.find((entry) => entry.id === currentId);
|
|
25
37
|
if (!state) {
|
|
26
|
-
state = addState(
|
|
38
|
+
state = addState(currentId);
|
|
39
|
+
}
|
|
40
|
+
if (!scopeCounted) {
|
|
41
|
+
state.refCount++;
|
|
42
|
+
scopeCounted = true;
|
|
27
43
|
}
|
|
28
44
|
if (options) {
|
|
29
45
|
const mappedOptions = defu(options, defaultOptions);
|
|
@@ -32,14 +48,21 @@ export function useToastState(instanceId) {
|
|
|
32
48
|
}
|
|
33
49
|
return state;
|
|
34
50
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
onScopeDispose(() => {
|
|
52
|
+
if (!scopeCounted) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const currentId = toValue(instanceId);
|
|
56
|
+
const state = toastStateStore.value.find((entry) => entry.id === currentId);
|
|
57
|
+
if (state) {
|
|
58
|
+
state.refCount--;
|
|
59
|
+
if (state.refCount <= 0) {
|
|
60
|
+
deleteState();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
40
64
|
return {
|
|
41
65
|
initializeState,
|
|
42
|
-
deleteState,
|
|
43
66
|
toastStateStore
|
|
44
67
|
};
|
|
45
68
|
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
|
|
1
3
|
declare function clampValue(value: number, min: number, max: number): number;
|
|
2
4
|
|
|
5
|
+
type CreateStore<T> = () => Ref<T>;
|
|
6
|
+
declare function createStateStore<T>(key: string, setInitialValue: () => T): CreateStore<T>;
|
|
7
|
+
|
|
3
8
|
declare function linear(t: number): number;
|
|
4
9
|
declare function easeInQuad(t: number): number;
|
|
5
10
|
declare function easeOutQuad(t: number): number;
|
|
@@ -27,6 +32,8 @@ type InterpolateArgs = {
|
|
|
27
32
|
};
|
|
28
33
|
declare function interpolate(args: InterpolateArgs): number;
|
|
29
34
|
|
|
35
|
+
declare function isAndroid(): boolean;
|
|
36
|
+
|
|
30
37
|
declare function isIOS(): boolean;
|
|
31
38
|
|
|
32
39
|
interface isWithinRangeArgs {
|
|
@@ -81,4 +88,4 @@ type RequireAllNested<T> = {
|
|
|
81
88
|
|
|
82
89
|
type ValueOf<T> = T[keyof T];
|
|
83
90
|
|
|
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 };
|
|
91
|
+
export { type CreateStore, type InterpolateArgs, type PickPartial, type RequireAll, type RequireAllNested, type SlugifyOptions, type ValueOf, clampValue, createStateStore, easeInCubic, easeInOutCubic, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInQuad, easeInQuart, easeInQuint, easeOutBack, easeOutCubic, easeOutQuad, easeOutQuart, easeOutQuint, formatTime, guardedReleasePointerCapture, guardedSetPointerCapture, interpolate, isAndroid, isIOS, isWithinRange, linear, mapValue, matchClass, scrollbarGutterSupport, scrollbarWidth, slugify, uniq };
|
package/dist/utils/index.js
CHANGED
|
@@ -3,6 +3,27 @@ function clampValue(value, min, max) {
|
|
|
3
3
|
return value <= min ? min : value >= max ? max : value;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
// src/functions/createStateStore.ts
|
|
7
|
+
import { getCurrentInstance, ref } from "vue";
|
|
8
|
+
function createStateStore(key, setInitialValue) {
|
|
9
|
+
return function getOrCreateStore() {
|
|
10
|
+
const instance = getCurrentInstance();
|
|
11
|
+
const app = instance == null ? void 0 : instance.appContext.app;
|
|
12
|
+
if (!app || !key) {
|
|
13
|
+
return ref(setInitialValue());
|
|
14
|
+
}
|
|
15
|
+
if (!app.config.globalProperties.__VEStateStores) {
|
|
16
|
+
app.config.globalProperties.__VEStateStores = /* @__PURE__ */ new Map();
|
|
17
|
+
}
|
|
18
|
+
let store = app.config.globalProperties.__VEStateStores.get(key);
|
|
19
|
+
if (!store) {
|
|
20
|
+
store = ref(setInitialValue());
|
|
21
|
+
app.config.globalProperties.__VEStateStores.set(key, store);
|
|
22
|
+
}
|
|
23
|
+
return store;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
6
27
|
// src/functions/easings.ts
|
|
7
28
|
function linear(t) {
|
|
8
29
|
return t;
|
|
@@ -97,6 +118,14 @@ function interpolate(args) {
|
|
|
97
118
|
return interpolationId;
|
|
98
119
|
}
|
|
99
120
|
|
|
121
|
+
// src/functions/isAndroid.ts
|
|
122
|
+
function isAndroid() {
|
|
123
|
+
if (typeof window === "undefined") {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
return /android/i.test(navigator == null ? void 0 : navigator.userAgent);
|
|
127
|
+
}
|
|
128
|
+
|
|
100
129
|
// src/functions/isIOS.ts
|
|
101
130
|
function isIOS() {
|
|
102
131
|
if (typeof window === "undefined") {
|
|
@@ -208,6 +237,7 @@ function uniq(a) {
|
|
|
208
237
|
}
|
|
209
238
|
export {
|
|
210
239
|
clampValue,
|
|
240
|
+
createStateStore,
|
|
211
241
|
easeInCubic,
|
|
212
242
|
easeInOutCubic,
|
|
213
243
|
easeInOutQuad,
|
|
@@ -225,6 +255,7 @@ export {
|
|
|
225
255
|
guardedReleasePointerCapture,
|
|
226
256
|
guardedSetPointerCapture,
|
|
227
257
|
interpolate,
|
|
258
|
+
isAndroid,
|
|
228
259
|
isIOS,
|
|
229
260
|
isWithinRange,
|
|
230
261
|
linear,
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/easings.ts","../../packages/utils/src/functions/toNumber.ts","../../packages/utils/src/functions/formatTime.ts","../../packages/utils/src/functions/interpolate.ts","../../packages/utils/src/functions/isIOS.ts","../../packages/utils/src/functions/isWithinRange.ts","../../packages/utils/src/functions/mapValue.ts","../../packages/utils/src/functions/matchClass.ts","../../packages/utils/src/functions/pointerCapture.ts","../../packages/utils/src/functions/scrollbarGutterSupport.ts","../../packages/utils/src/functions/scrollbarWidth.ts","../../packages/utils/src/functions/slugify.ts","../../packages/utils/src/functions/uniq.ts"],"sourcesContent":["export function clampValue(value: number, min: number, max: number) {\n return value <= min ? min : value >= max ? max : value\n}\n","export function linear(t: number) {\n return t\n}\nexport function easeInQuad(t: number) {\n return t * t\n}\nexport function easeOutQuad(t: number) {\n return t * (2 - t)\n}\nexport function easeInOutQuad(t: number) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t\n}\nexport function easeOutBack(t: number, o: number = 1.25) {\n return 1 + (t - 1) * (t - 1) * ((o + 1) * (t - 1) + o)\n}\nexport function easeInCubic(t: number) {\n return t * t * t\n}\nexport function easeOutCubic(t: number) {\n return --t * t * t + 1\n}\nexport function easeInOutCubic(t: number) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1\n}\nexport function easeInQuart(t: number) {\n return t * t * t * t\n}\nexport function easeOutQuart(t: number) {\n return 1 - --t * t * t * t\n}\nexport function easeInOutQuart(t: number) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t\n}\nexport function easeInQuint(t: number) {\n return t * t * t * t * t\n}\nexport function easeOutQuint(t: number) {\n return 1 + --t * t * t * t * t\n}\nexport function easeInOutQuint(t: number) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t\n}\n","export function toNumber(value: string | number): number {\n return typeof value === 'string' ? parseFloat(value) : Number(value)\n}\n","import { toNumber } from './toNumber'\n\nexport function formatTime(seconds: number, guide: number) {\n seconds = seconds < 0 ? 0 : seconds\n let s: string | number = Math.floor(seconds % 60)\n let m: string | number = Math.floor((seconds / 60) % 60)\n let h: string | number = Math.floor(seconds / 3600)\n const gm = Math.floor((guide / 60) % 60)\n const gh = Math.floor(guide / 3600)\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-'\n }\n\n // Check if we need to show hours\n h = toNumber(h) > 0 || gh > 0 ? h + ':' : ''\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = ((h || gm >= 10) && toNumber(m) < 10 ? '0' + m : m) + ':'\n\n // Check if leading zero is need for seconds\n s = toNumber(s) < 10 ? '0' + s : s\n\n return h + m + s\n}\n","export type InterpolateArgs = {\n from: number\n to: number\n duration: number\n easing?: (t: number) => number\n callback: (result: number) => void\n interpolationIdCallback?: (id: number) => void\n}\n\nexport function interpolate(args: InterpolateArgs) {\n const {\n from,\n to,\n duration,\n callback,\n interpolationIdCallback = () => {},\n easing = (t) => t * (2 - t),\n } = args\n\n let startTime: number\n let interpolationId: number\n\n function animate(timestamp: number) {\n if (!startTime) startTime = timestamp\n\n const progress = Math.min(1, (timestamp - startTime) / duration)\n const easedProgress = easing(progress)\n const value = from + (to - from) * easedProgress\n\n callback(value)\n\n if (progress < 1) {\n interpolationId = requestAnimationFrame(animate)\n interpolationIdCallback(interpolationId)\n }\n }\n\n interpolationId = requestAnimationFrame(animate)\n\n return interpolationId\n}\n","export function isIOS() {\n if (typeof window === 'undefined') {\n return false\n }\n return /iPad|iPhone|iPod/.test(navigator?.userAgent)\n}\n","interface isWithinRangeArgs {\n input: number\n base: number\n threshold: number\n}\n\nexport function isWithinRange(args: isWithinRangeArgs): boolean {\n const { input, base, threshold } = args\n return input >= base - threshold && input <= base + threshold\n}\n","export function mapValue(\n value: number,\n inMin: number,\n inMax: number,\n outMin: number,\n outMax: number\n) {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin\n}\n","export function matchClass(el: Element, regex: RegExp) {\n return Array.from(el.classList).some((className) => regex.test(className))\n}\n","interface GuardedSetPointerCaptureArgs {\n event: PointerEvent\n element?: Element | null\n debug?: boolean\n}\n\ninterface GuardedReleasePointerCaptureArgs {\n event: PointerEvent\n element?: Element | null\n}\n\nexport function guardedSetPointerCapture(\n args: GuardedSetPointerCaptureArgs\n): void {\n const { event, element, debug } = args\n if (element && event.isPrimary && event.pointerType !== 'mouse') {\n try {\n const coalescedEvents: PointerEvent[] =\n 'getCoalescedEvents' in event ? event.getCoalescedEvents() : [event]\n\n if (coalescedEvents.length > 0) {\n element?.setPointerCapture(event.pointerId)\n }\n } catch (error) {\n if (debug) {\n console.warn('Failed to set pointer capture:', error)\n }\n }\n }\n}\n\nexport function guardedReleasePointerCapture(\n args: GuardedReleasePointerCaptureArgs\n): void {\n const { event, element } = args\n if (element?.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId)\n }\n}\n","export function scrollbarGutterSupport() {\n return CSS.supports('scrollbar-gutter', 'stable')\n}\n","export function scrollbarWidth() {\n const wrapper = document.createElement('div')\n wrapper.style.position = 'absolute'\n wrapper.style.visibility = 'hidden'\n wrapper.style.overflow = 'hidden'\n wrapper.style.width = '100px'\n wrapper.style.height = '100px'\n wrapper.style.top = '-9999px'\n\n wrapper.innerHTML = '<div style=\"width: 200px; height: 200px;\"></div>'\n document.body.appendChild(wrapper)\n\n // Get the scrollbar width\n const withoutScrollbar = wrapper.clientWidth\n wrapper.style.overflow = 'scroll'\n const withScrollbar = wrapper.clientWidth\n\n // Clean up\n document.body.removeChild(wrapper)\n\n return Math.round(withoutScrollbar - withScrollbar)\n}\n","export interface SlugifyOptions {\n separator?: string\n trim?: boolean\n remove?: RegExp\n strict?: boolean\n lowercase?: boolean\n}\n\nconst defaultOptions: SlugifyOptions = {\n separator: '-',\n trim: true,\n remove: undefined,\n strict: true,\n lowercase: true,\n}\n\nexport function slugify(string: string, options?: SlugifyOptions): string {\n if (typeof string !== 'string') {\n throw new Error('slugify: string argument expected')\n }\n\n // Merge provided options with default options\n const _options = { ...defaultOptions, ...options }\n\n const charMap: { [key: string]: string } = {}\n\n let slug = string\n .normalize()\n .split('')\n .reduce(function (result, ch) {\n let appendChar = charMap[ch]\n if (appendChar === undefined) appendChar = ch\n if (appendChar === _options?.separator) appendChar = ' '\n return (\n result +\n appendChar.replace(_options?.remove || /[^\\w\\s$*_+~.()'\"!\\-:@]+/g, '')\n )\n }, '')\n\n if (_options.strict) {\n slug = slug.replace(/[^A-Za-z0-9\\s]/g, '')\n }\n\n if (_options.trim) {\n slug = slug.trim()\n }\n\n if (_options.separator) {\n slug = slug.replace(/ +/g, _options.separator)\n }\n\n if (_options.lowercase) {\n slug = slug.toLocaleLowerCase()\n }\n\n return slug\n}\n","export function uniq<T extends unknown[]>(a: T) {\n return Array.from(new Set(a))\n}\n"],"mappings":";AAAO,SAAS,WAAW,OAAe,KAAa,KAAa;AAClE,SAAO,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM;AACnD;;;ACFO,SAAS,OAAO,GAAW;AAChC,SAAO;AACT;AACO,SAAS,WAAW,GAAW;AACpC,SAAO,IAAI;AACb;AACO,SAAS,YAAY,GAAW;AACrC,SAAO,KAAK,IAAI;AAClB;AACO,SAAS,cAAc,GAAW;AACvC,SAAO,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,KAAK;AAClD;AACO,SAAS,YAAY,GAAW,IAAY,MAAM;AACvD,SAAO,KAAK,IAAI,MAAM,IAAI,OAAO,IAAI,MAAM,IAAI,KAAK;AACtD;AACO,SAAS,YAAY,GAAW;AACrC,SAAO,IAAI,IAAI;AACjB;AACO,SAAS,aAAa,GAAW;AACtC,SAAO,EAAE,IAAI,IAAI,IAAI;AACvB;AACO,SAAS,eAAe,GAAW;AACxC,SAAO,IAAI,MAAM,IAAI,IAAI,IAAI,KAAK,IAAI,MAAM,IAAI,IAAI,MAAM,IAAI,IAAI,KAAK;AACzE;AACO,SAAS,YAAY,GAAW;AACrC,SAAO,IAAI,IAAI,IAAI;AACrB;AACO,SAAS,aAAa,GAAW;AACtC,SAAO,IAAI,EAAE,IAAI,IAAI,IAAI;AAC3B;AACO,SAAS,eAAe,GAAW;AACxC,SAAO,IAAI,MAAM,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI;AAC7D;AACO,SAAS,YAAY,GAAW;AACrC,SAAO,IAAI,IAAI,IAAI,IAAI;AACzB;AACO,SAAS,aAAa,GAAW;AACtC,SAAO,IAAI,EAAE,IAAI,IAAI,IAAI,IAAI;AAC/B;AACO,SAAS,eAAe,GAAW;AACxC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;AACT;;;ACxDO,SAAS,KAA0B,GAAM;AAC9C,SAAO,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;AAC9B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/createStateStore.ts","../../packages/utils/src/functions/easings.ts","../../packages/utils/src/functions/toNumber.ts","../../packages/utils/src/functions/formatTime.ts","../../packages/utils/src/functions/interpolate.ts","../../packages/utils/src/functions/isAndroid.ts","../../packages/utils/src/functions/isIOS.ts","../../packages/utils/src/functions/isWithinRange.ts","../../packages/utils/src/functions/mapValue.ts","../../packages/utils/src/functions/matchClass.ts","../../packages/utils/src/functions/pointerCapture.ts","../../packages/utils/src/functions/scrollbarGutterSupport.ts","../../packages/utils/src/functions/scrollbarWidth.ts","../../packages/utils/src/functions/slugify.ts","../../packages/utils/src/functions/uniq.ts"],"sourcesContent":["export function clampValue(value: number, min: number, max: number) {\n return value <= min ? min : value >= max ? max : value\n}\n","import { getCurrentInstance, ref, type Ref } from 'vue'\n\nexport type CreateStore<T> = () => Ref<T>\n\nexport function createStateStore<T>(\n key: string,\n setInitialValue: () => T\n): CreateStore<T> {\n return function getOrCreateStore(): Ref<T> {\n const instance = getCurrentInstance()\n const app = instance?.appContext.app\n\n // If no app instance is found, return a fresh store\n if (!app || !key) {\n return ref(setInitialValue()) as Ref<T>\n }\n\n // Create a global Map to hold all state stores\n if (!app.config.globalProperties.__VEStateStores) {\n app.config.globalProperties.__VEStateStores = new Map<string, Ref<T>>()\n }\n\n // Check if a store already exists for this app instance\n let store = app.config.globalProperties.__VEStateStores.get(key)\n\n // If no store exists for this app instance, create one\n if (!store) {\n store = ref(setInitialValue()) as Ref<T>\n app.config.globalProperties.__VEStateStores.set(key, store)\n }\n\n return store\n }\n}\n","export function linear(t: number) {\n return t\n}\nexport function easeInQuad(t: number) {\n return t * t\n}\nexport function easeOutQuad(t: number) {\n return t * (2 - t)\n}\nexport function easeInOutQuad(t: number) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t\n}\nexport function easeOutBack(t: number, o: number = 1.25) {\n return 1 + (t - 1) * (t - 1) * ((o + 1) * (t - 1) + o)\n}\nexport function easeInCubic(t: number) {\n return t * t * t\n}\nexport function easeOutCubic(t: number) {\n return --t * t * t + 1\n}\nexport function easeInOutCubic(t: number) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1\n}\nexport function easeInQuart(t: number) {\n return t * t * t * t\n}\nexport function easeOutQuart(t: number) {\n return 1 - --t * t * t * t\n}\nexport function easeInOutQuart(t: number) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t\n}\nexport function easeInQuint(t: number) {\n return t * t * t * t * t\n}\nexport function easeOutQuint(t: number) {\n return 1 + --t * t * t * t * t\n}\nexport function easeInOutQuint(t: number) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t\n}\n","export function toNumber(value: string | number): number {\n return typeof value === 'string' ? parseFloat(value) : Number(value)\n}\n","import { toNumber } from './toNumber'\n\nexport function formatTime(seconds: number, guide: number) {\n seconds = seconds < 0 ? 0 : seconds\n let s: string | number = Math.floor(seconds % 60)\n let m: string | number = Math.floor((seconds / 60) % 60)\n let h: string | number = Math.floor(seconds / 3600)\n const gm = Math.floor((guide / 60) % 60)\n const gh = Math.floor(guide / 3600)\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-'\n }\n\n // Check if we need to show hours\n h = toNumber(h) > 0 || gh > 0 ? h + ':' : ''\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = ((h || gm >= 10) && toNumber(m) < 10 ? '0' + m : m) + ':'\n\n // Check if leading zero is need for seconds\n s = toNumber(s) < 10 ? '0' + s : s\n\n return h + m + s\n}\n","export type InterpolateArgs = {\n from: number\n to: number\n duration: number\n easing?: (t: number) => number\n callback: (result: number) => void\n interpolationIdCallback?: (id: number) => void\n}\n\nexport function interpolate(args: InterpolateArgs) {\n const {\n from,\n to,\n duration,\n callback,\n interpolationIdCallback = () => {},\n easing = (t) => t * (2 - t),\n } = args\n\n let startTime: number\n let interpolationId: number\n\n function animate(timestamp: number) {\n if (!startTime) startTime = timestamp\n\n const progress = Math.min(1, (timestamp - startTime) / duration)\n const easedProgress = easing(progress)\n const value = from + (to - from) * easedProgress\n\n callback(value)\n\n if (progress < 1) {\n interpolationId = requestAnimationFrame(animate)\n interpolationIdCallback(interpolationId)\n }\n }\n\n interpolationId = requestAnimationFrame(animate)\n\n return interpolationId\n}\n","export function isAndroid() {\n if (typeof window === 'undefined') {\n return false\n }\n return /android/i.test(navigator?.userAgent)\n}\n","export function isIOS() {\n if (typeof window === 'undefined') {\n return false\n }\n return /iPad|iPhone|iPod/.test(navigator?.userAgent)\n}\n","interface isWithinRangeArgs {\n input: number\n base: number\n threshold: number\n}\n\nexport function isWithinRange(args: isWithinRangeArgs): boolean {\n const { input, base, threshold } = args\n return input >= base - threshold && input <= base + threshold\n}\n","export function mapValue(\n value: number,\n inMin: number,\n inMax: number,\n outMin: number,\n outMax: number\n) {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin\n}\n","export function matchClass(el: Element, regex: RegExp) {\n return Array.from(el.classList).some((className) => regex.test(className))\n}\n","interface GuardedSetPointerCaptureArgs {\n event: PointerEvent\n element?: Element | null\n debug?: boolean\n}\n\ninterface GuardedReleasePointerCaptureArgs {\n event: PointerEvent\n element?: Element | null\n}\n\nexport function guardedSetPointerCapture(\n args: GuardedSetPointerCaptureArgs\n): void {\n const { event, element, debug } = args\n if (element && event.isPrimary && event.pointerType !== 'mouse') {\n try {\n const coalescedEvents: PointerEvent[] =\n 'getCoalescedEvents' in event ? event.getCoalescedEvents() : [event]\n\n if (coalescedEvents.length > 0) {\n element?.setPointerCapture(event.pointerId)\n }\n } catch (error) {\n if (debug) {\n console.warn('Failed to set pointer capture:', error)\n }\n }\n }\n}\n\nexport function guardedReleasePointerCapture(\n args: GuardedReleasePointerCaptureArgs\n): void {\n const { event, element } = args\n if (element?.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId)\n }\n}\n","export function scrollbarGutterSupport() {\n return CSS.supports('scrollbar-gutter', 'stable')\n}\n","export function scrollbarWidth() {\n const wrapper = document.createElement('div')\n wrapper.style.position = 'absolute'\n wrapper.style.visibility = 'hidden'\n wrapper.style.overflow = 'hidden'\n wrapper.style.width = '100px'\n wrapper.style.height = '100px'\n wrapper.style.top = '-9999px'\n\n wrapper.innerHTML = '<div style=\"width: 200px; height: 200px;\"></div>'\n document.body.appendChild(wrapper)\n\n // Get the scrollbar width\n const withoutScrollbar = wrapper.clientWidth\n wrapper.style.overflow = 'scroll'\n const withScrollbar = wrapper.clientWidth\n\n // Clean up\n document.body.removeChild(wrapper)\n\n return Math.round(withoutScrollbar - withScrollbar)\n}\n","export interface SlugifyOptions {\n separator?: string\n trim?: boolean\n remove?: RegExp\n strict?: boolean\n lowercase?: boolean\n}\n\nconst defaultOptions: SlugifyOptions = {\n separator: '-',\n trim: true,\n remove: undefined,\n strict: true,\n lowercase: true,\n}\n\nexport function slugify(string: string, options?: SlugifyOptions): string {\n if (typeof string !== 'string') {\n throw new Error('slugify: string argument expected')\n }\n\n // Merge provided options with default options\n const _options = { ...defaultOptions, ...options }\n\n const charMap: { [key: string]: string } = {}\n\n let slug = string\n .normalize()\n .split('')\n .reduce(function (result, ch) {\n let appendChar = charMap[ch]\n if (appendChar === undefined) appendChar = ch\n if (appendChar === _options?.separator) appendChar = ' '\n return (\n result +\n appendChar.replace(_options?.remove || /[^\\w\\s$*_+~.()'\"!\\-:@]+/g, '')\n )\n }, '')\n\n if (_options.strict) {\n slug = slug.replace(/[^A-Za-z0-9\\s]/g, '')\n }\n\n if (_options.trim) {\n slug = slug.trim()\n }\n\n if (_options.separator) {\n slug = slug.replace(/ +/g, _options.separator)\n }\n\n if (_options.lowercase) {\n slug = slug.toLocaleLowerCase()\n }\n\n return slug\n}\n","export function uniq<T extends unknown[]>(a: T) {\n return Array.from(new Set(a))\n}\n"],"mappings":";AAAO,SAAS,WAAW,OAAe,KAAa,KAAa;AAClE,SAAO,SAAS,MAAM,MAAM,SAAS,MAAM,MAAM;AACnD;;;ACFA,SAAS,oBAAoB,WAAqB;AAI3C,SAAS,iBACd,KACA,iBACgB;AAChB,SAAO,SAAS,mBAA2B;AACzC,UAAM,WAAW,mBAAmB;AACpC,UAAM,MAAM,qCAAU,WAAW;AAGjC,QAAI,CAAC,OAAO,CAAC,KAAK;AAChB,aAAO,IAAI,gBAAgB,CAAC;AAAA,IAC9B;AAGA,QAAI,CAAC,IAAI,OAAO,iBAAiB,iBAAiB;AAChD,UAAI,OAAO,iBAAiB,kBAAkB,oBAAI,IAAoB;AAAA,IACxE;AAGA,QAAI,QAAQ,IAAI,OAAO,iBAAiB,gBAAgB,IAAI,GAAG;AAG/D,QAAI,CAAC,OAAO;AACV,cAAQ,IAAI,gBAAgB,CAAC;AAC7B,UAAI,OAAO,iBAAiB,gBAAgB,IAAI,KAAK,KAAK;AAAA,IAC5D;AAEA,WAAO;AAAA,EACT;AACF;;;ACjCO,SAAS,OAAO,GAAW;AAChC,SAAO;AACT;AACO,SAAS,WAAW,GAAW;AACpC,SAAO,IAAI;AACb;AACO,SAAS,YAAY,GAAW;AACrC,SAAO,KAAK,IAAI;AAClB;AACO,SAAS,cAAc,GAAW;AACvC,SAAO,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,KAAK;AAClD;AACO,SAAS,YAAY,GAAW,IAAY,MAAM;AACvD,SAAO,KAAK,IAAI,MAAM,IAAI,OAAO,IAAI,MAAM,IAAI,KAAK;AACtD;AACO,SAAS,YAAY,GAAW;AACrC,SAAO,IAAI,IAAI;AACjB;AACO,SAAS,aAAa,GAAW;AACtC,SAAO,EAAE,IAAI,IAAI,IAAI;A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