@maas/vue-equipment 1.0.0-beta.84 → 1.0.0-beta.86
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/nuxt/module.json +1 -1
- package/dist/plugins/MagicCarousel/nuxt.mjs +10 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +6 -8
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +6 -8
- package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.d.ts +15 -11
- package/dist/plugins/MagicCommand/src/composables/private/useCommandItem.mjs +39 -29
- package/dist/plugins/MagicCommand/src/composables/useMagicCommand.mjs +7 -14
- package/dist/plugins/MagicMarquee/nuxt.mjs +10 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +8 -10
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +2 -5
- package/dist/plugins/MagicMenu/src/composables/private/useMenuItem.d.ts +8 -8
- package/dist/plugins/MagicMenu/src/composables/private/useMenuItem.mjs +32 -39
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +24 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +3 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +5 -2
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.d.vue.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +4 -3
package/dist/nuxt/module.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
addComponentsDir,
|
|
3
|
+
addImports,
|
|
4
|
+
createResolver,
|
|
5
|
+
defineNuxtModule
|
|
6
|
+
} from "@nuxt/kit";
|
|
2
7
|
export default defineNuxtModule({
|
|
3
8
|
meta: {
|
|
4
9
|
name: "@maas/vue-equipment/nuxt/MagicCarousel"
|
|
@@ -10,5 +15,9 @@ export default defineNuxtModule({
|
|
|
10
15
|
global: true,
|
|
11
16
|
pathPrefix: false
|
|
12
17
|
});
|
|
18
|
+
addImports({
|
|
19
|
+
from: "@maas/vue-equipment/plugins/MagicCarousel",
|
|
20
|
+
name: "useMagicCarousel"
|
|
21
|
+
});
|
|
13
22
|
}
|
|
14
23
|
});
|
|
@@ -75,10 +75,8 @@ const state = initializeState();
|
|
|
75
75
|
const isActive = computed(() => view?.active && state.active && state.renderer);
|
|
76
76
|
const isIdle = computed(() => state.input.view !== viewId);
|
|
77
77
|
const options = inject(MagicCommandProviderOptions, void 0);
|
|
78
|
-
const {
|
|
79
|
-
|
|
80
|
-
viewId
|
|
81
|
-
});
|
|
78
|
+
const { getActiveItem, selectNextItem, selectPrevItem } = useCommandItem(instanceId);
|
|
79
|
+
const activeItem = computed(() => getActiveItem(viewId));
|
|
82
80
|
const {
|
|
83
81
|
onBeforeEnter,
|
|
84
82
|
onEnter,
|
|
@@ -117,10 +115,10 @@ if (options?.keyListener?.next) {
|
|
|
117
115
|
}
|
|
118
116
|
if (value) {
|
|
119
117
|
state.input.type = "keyboard";
|
|
120
|
-
selectNextItem(options.loop);
|
|
118
|
+
selectNextItem({ viewId, loop: options.loop });
|
|
121
119
|
nextTimeout.value = setTimeout(() => {
|
|
122
120
|
nextInterval.value = setInterval(() => {
|
|
123
|
-
selectNextItem(options.loop);
|
|
121
|
+
selectNextItem({ viewId, loop: options.loop });
|
|
124
122
|
}, 100);
|
|
125
123
|
}, 500);
|
|
126
124
|
} else {
|
|
@@ -143,10 +141,10 @@ if (options?.keyListener?.prev) {
|
|
|
143
141
|
}
|
|
144
142
|
if (value) {
|
|
145
143
|
state.input.type = "keyboard";
|
|
146
|
-
selectPrevItem(options.loop);
|
|
144
|
+
selectPrevItem({ viewId, loop: options.loop });
|
|
147
145
|
prevTimeout.value = setTimeout(() => {
|
|
148
146
|
prevInterval.value = setInterval(() => {
|
|
149
|
-
selectPrevItem(options.loop);
|
|
147
|
+
selectPrevItem({ viewId, loop: options.loop });
|
|
150
148
|
}, 100);
|
|
151
149
|
}, 500);
|
|
152
150
|
} else {
|
|
@@ -67,14 +67,12 @@ magicError.assert(contentId, {
|
|
|
67
67
|
});
|
|
68
68
|
const uuid = useId();
|
|
69
69
|
const mappedId = computed(() => id ?? `magic-command-item-${uuid}`);
|
|
70
|
-
const { initializeItem, deleteItem, selectItem } = useCommandItem(
|
|
71
|
-
|
|
72
|
-
viewId
|
|
73
|
-
});
|
|
70
|
+
const { initializeItem, deleteItem, selectItem } = useCommandItem(instanceId);
|
|
71
|
+
const itemArgs = computed(() => ({ viewId, id: mappedId.value }));
|
|
74
72
|
const { initializeState } = useCommandState(instanceId);
|
|
75
73
|
const state = initializeState();
|
|
76
74
|
const item = initializeItem({
|
|
77
|
-
|
|
75
|
+
...itemArgs.value,
|
|
78
76
|
disabled: disabled ?? false
|
|
79
77
|
});
|
|
80
78
|
const pointerDisabled = computed(() => state.input.type !== "pointer");
|
|
@@ -82,7 +80,7 @@ const mappedDisabled = computed(() => disabled ?? item?.disabled);
|
|
|
82
80
|
const mappedActive = computed(() => item?.active);
|
|
83
81
|
function guardedSelect() {
|
|
84
82
|
if (state.input.type === "pointer" && !item.disabled && !item.active) {
|
|
85
|
-
selectItem(
|
|
83
|
+
selectItem(itemArgs.value);
|
|
86
84
|
}
|
|
87
85
|
}
|
|
88
86
|
function onClick(event) {
|
|
@@ -100,11 +98,11 @@ provide(MagicCommandItemDisabled, mappedDisabled);
|
|
|
100
98
|
onKeyStroke("Enter", onReturn);
|
|
101
99
|
onMounted(() => {
|
|
102
100
|
if (initial) {
|
|
103
|
-
selectItem(
|
|
101
|
+
selectItem(itemArgs.value);
|
|
104
102
|
}
|
|
105
103
|
});
|
|
106
104
|
onBeforeUnmount(() => {
|
|
107
|
-
deleteItem(
|
|
105
|
+
deleteItem(itemArgs.value);
|
|
108
106
|
});
|
|
109
107
|
</script>
|
|
110
108
|
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import type { MaybeRef } from 'vue';
|
|
2
2
|
import type { CommandItem } from '../../types/index.js';
|
|
3
|
-
type
|
|
4
|
-
instanceId: MaybeRef<string>;
|
|
3
|
+
type ItemArgs = {
|
|
5
4
|
viewId: string;
|
|
5
|
+
id: string;
|
|
6
6
|
};
|
|
7
|
-
type InitializeItemArgs = Pick<CommandItem, '
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
type InitializeItemArgs = ItemArgs & Pick<CommandItem, 'disabled'>;
|
|
8
|
+
type SelectSiblingArgs = {
|
|
9
|
+
viewId: string;
|
|
10
|
+
loop?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function useCommandItem(instanceId: MaybeRef<string>): {
|
|
13
|
+
getActiveItem: (viewId: string) => CommandItem | undefined;
|
|
10
14
|
initializeItem: (args: InitializeItemArgs) => CommandItem;
|
|
11
|
-
deleteItem: (
|
|
12
|
-
getItem: (
|
|
13
|
-
selectItem: (
|
|
14
|
-
selectNextItem: (
|
|
15
|
-
selectPrevItem: (
|
|
16
|
-
unselectItem: (
|
|
15
|
+
deleteItem: (args: ItemArgs) => void;
|
|
16
|
+
getItem: (args: ItemArgs) => CommandItem | undefined;
|
|
17
|
+
selectItem: (args: ItemArgs) => void;
|
|
18
|
+
selectNextItem: (args: SelectSiblingArgs) => void;
|
|
19
|
+
selectPrevItem: (args: SelectSiblingArgs) => void;
|
|
20
|
+
unselectItem: (args: ItemArgs) => void;
|
|
17
21
|
};
|
|
18
22
|
export {};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { reactive } from "vue";
|
|
2
2
|
import { useCommandView } from "./useCommandView.mjs";
|
|
3
|
-
export function useCommandItem(
|
|
4
|
-
const { instanceId, viewId } = args;
|
|
3
|
+
export function useCommandItem(instanceId) {
|
|
5
4
|
const { getView } = useCommandView(instanceId);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function createItem(args2) {
|
|
9
|
-
const { id, disabled } = args2;
|
|
5
|
+
function createItem(args) {
|
|
6
|
+
const { id, disabled } = args;
|
|
10
7
|
const item = {
|
|
11
8
|
id,
|
|
12
9
|
active: false,
|
|
@@ -14,69 +11,82 @@ export function useCommandItem(args) {
|
|
|
14
11
|
};
|
|
15
12
|
return reactive(item);
|
|
16
13
|
}
|
|
17
|
-
function addItem(
|
|
18
|
-
const
|
|
14
|
+
function addItem(args) {
|
|
15
|
+
const { viewId, id, disabled } = args;
|
|
16
|
+
const item = createItem({ id, disabled });
|
|
17
|
+
const view = getView(viewId);
|
|
19
18
|
if (view?.items) {
|
|
20
19
|
view.items = [...view.items, item];
|
|
21
20
|
}
|
|
22
21
|
return item;
|
|
23
22
|
}
|
|
24
|
-
function unselectSiblings(
|
|
25
|
-
|
|
23
|
+
function unselectSiblings(args) {
|
|
24
|
+
const { viewId, id } = args;
|
|
25
|
+
return getView(viewId)?.items.filter((item) => item.id !== id).forEach((item) => item.active = false);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
function getActiveItem(viewId) {
|
|
28
|
+
return getView(viewId)?.items.find((item) => item.active);
|
|
29
|
+
}
|
|
30
|
+
function initializeItem(args) {
|
|
31
|
+
const { viewId, id } = args;
|
|
32
|
+
const item = getItem({ viewId, id }) ?? addItem(args);
|
|
30
33
|
return item;
|
|
31
34
|
}
|
|
32
|
-
function deleteItem(
|
|
35
|
+
function deleteItem(args) {
|
|
36
|
+
const { viewId, id } = args;
|
|
37
|
+
const view = getView(viewId);
|
|
33
38
|
if (!view?.items) {
|
|
34
39
|
return;
|
|
35
40
|
}
|
|
36
41
|
view.items = view.items.filter((x) => x.id !== id);
|
|
37
42
|
}
|
|
38
|
-
function getItem(
|
|
39
|
-
|
|
43
|
+
function getItem(args) {
|
|
44
|
+
const { viewId, id } = args;
|
|
45
|
+
return getView(viewId)?.items.find((item) => {
|
|
40
46
|
return item.id === id;
|
|
41
47
|
});
|
|
42
48
|
}
|
|
43
|
-
function selectItem(
|
|
44
|
-
const item = getItem(
|
|
49
|
+
function selectItem(args) {
|
|
50
|
+
const item = getItem(args);
|
|
45
51
|
if (item) {
|
|
46
52
|
item.active = true;
|
|
47
|
-
unselectSiblings(
|
|
53
|
+
unselectSiblings(args);
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
|
-
function selectNextItem(
|
|
56
|
+
function selectNextItem(args) {
|
|
57
|
+
const { viewId, loop = false } = args;
|
|
58
|
+
const view = getView(viewId);
|
|
51
59
|
const index = view?.items.findIndex(
|
|
52
|
-
(item) => item.id ===
|
|
60
|
+
(item) => item.id === getActiveItem(viewId)?.id
|
|
53
61
|
);
|
|
54
62
|
if (index !== void 0 && view) {
|
|
55
63
|
const nextItem = view.items[index + 1] ?? (loop ? view.items[0] : void 0);
|
|
56
64
|
if (nextItem) {
|
|
57
|
-
selectItem(nextItem.id);
|
|
65
|
+
selectItem({ viewId, id: nextItem.id });
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
|
-
function selectPrevItem(
|
|
69
|
+
function selectPrevItem(args) {
|
|
70
|
+
const { viewId, loop = false } = args;
|
|
71
|
+
const view = getView(viewId);
|
|
62
72
|
const index = view?.items.findIndex(
|
|
63
|
-
(item) => item.id ===
|
|
73
|
+
(item) => item.id === getActiveItem(viewId)?.id
|
|
64
74
|
);
|
|
65
75
|
if (index !== void 0 && view) {
|
|
66
76
|
const prevItem = view.items[index - 1] ?? (loop ? view.items[view.items.length - 1] : void 0);
|
|
67
77
|
if (prevItem) {
|
|
68
|
-
selectItem(prevItem.id);
|
|
78
|
+
selectItem({ viewId, id: prevItem.id });
|
|
69
79
|
}
|
|
70
80
|
}
|
|
71
81
|
}
|
|
72
|
-
function unselectItem(
|
|
73
|
-
const item = getItem(
|
|
82
|
+
function unselectItem(args) {
|
|
83
|
+
const item = getItem(args);
|
|
74
84
|
if (item) {
|
|
75
85
|
item.active = false;
|
|
76
86
|
}
|
|
77
87
|
}
|
|
78
88
|
return {
|
|
79
|
-
|
|
89
|
+
getActiveItem,
|
|
80
90
|
initializeItem,
|
|
81
91
|
deleteItem,
|
|
82
92
|
getItem,
|
|
@@ -13,6 +13,7 @@ export function useMagicCommand(id) {
|
|
|
13
13
|
const isActive = computed(() => state.active);
|
|
14
14
|
const activeView = computed(() => state.views.find((view) => view.active)?.id);
|
|
15
15
|
const { selectView, unselectView, selectInitialView, unselectAllViews } = useCommandView(id);
|
|
16
|
+
const { selectItem: selectViewItem, unselectItem: unselectViewItem } = useCommandItem(id);
|
|
16
17
|
async function open() {
|
|
17
18
|
state.active = true;
|
|
18
19
|
await nextTick();
|
|
@@ -24,44 +25,36 @@ export function useMagicCommand(id) {
|
|
|
24
25
|
unselectAllViews();
|
|
25
26
|
}
|
|
26
27
|
function selectItem(args) {
|
|
27
|
-
const { id:
|
|
28
|
+
const { id: itemId, viewId } = args;
|
|
28
29
|
if (!viewId) {
|
|
29
30
|
throwError({
|
|
30
31
|
message: "viewId is required to select an item",
|
|
31
32
|
errorCode: "view_id_required"
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
if (!
|
|
35
|
+
if (!itemId) {
|
|
35
36
|
throwError({
|
|
36
37
|
message: "id is required to select an item",
|
|
37
38
|
errorCode: "id_required"
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
instanceId: id2,
|
|
42
|
-
viewId
|
|
43
|
-
});
|
|
44
|
-
return selectItem2(id2);
|
|
41
|
+
return selectViewItem({ viewId, id: itemId });
|
|
45
42
|
}
|
|
46
43
|
function unselectItem(args) {
|
|
47
|
-
const { id:
|
|
44
|
+
const { id: itemId, viewId } = args;
|
|
48
45
|
if (!viewId) {
|
|
49
46
|
throwError({
|
|
50
47
|
message: "viewId is required to select an item",
|
|
51
48
|
errorCode: "view_id_required"
|
|
52
49
|
});
|
|
53
50
|
}
|
|
54
|
-
if (!
|
|
51
|
+
if (!itemId) {
|
|
55
52
|
throwError({
|
|
56
53
|
message: "id is required to select an item",
|
|
57
54
|
errorCode: "id_required"
|
|
58
55
|
});
|
|
59
56
|
}
|
|
60
|
-
|
|
61
|
-
instanceId: id2,
|
|
62
|
-
viewId
|
|
63
|
-
});
|
|
64
|
-
return unselectItem2(id2);
|
|
57
|
+
return unselectViewItem({ viewId, id: itemId });
|
|
65
58
|
}
|
|
66
59
|
return {
|
|
67
60
|
isActive,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
addComponentsDir,
|
|
3
|
+
addImports,
|
|
4
|
+
createResolver,
|
|
5
|
+
defineNuxtModule
|
|
6
|
+
} from "@nuxt/kit";
|
|
2
7
|
export default defineNuxtModule({
|
|
3
8
|
meta: {
|
|
4
9
|
name: "@maas/vue-equipment/nuxt/MagicMarquee"
|
|
@@ -10,5 +15,9 @@ export default defineNuxtModule({
|
|
|
10
15
|
global: true,
|
|
11
16
|
pathPrefix: false
|
|
12
17
|
});
|
|
18
|
+
addImports({
|
|
19
|
+
from: "@maas/vue-equipment/plugins/MagicMarquee",
|
|
20
|
+
name: "useMagicMarquee"
|
|
21
|
+
});
|
|
13
22
|
}
|
|
14
23
|
});
|
|
@@ -57,33 +57,31 @@ magicError.assert(contentId, {
|
|
|
57
57
|
const uuid = useId();
|
|
58
58
|
const mappedId = computed(() => id ?? `magic-menu-item-${uuid}`);
|
|
59
59
|
const mappedActive = computed(() => item.active);
|
|
60
|
-
const { initializeItem, deleteItem, selectItem, unselectItem } = useMenuItem(
|
|
61
|
-
|
|
62
|
-
viewId
|
|
63
|
-
});
|
|
60
|
+
const { initializeItem, deleteItem, selectItem, unselectItem } = useMenuItem(instanceId);
|
|
61
|
+
const itemArgs = computed(() => ({ viewId, id: mappedId.value }));
|
|
64
62
|
const { initializeState } = useMenuState(instanceId);
|
|
65
63
|
const state = initializeState();
|
|
66
64
|
const item = initializeItem({
|
|
67
|
-
|
|
65
|
+
...itemArgs.value,
|
|
68
66
|
disabled: disabled ?? false
|
|
69
67
|
});
|
|
70
68
|
const pointerDisabled = computed(() => state.input.disabled.includes("pointer"));
|
|
71
69
|
function guardedSelect() {
|
|
72
70
|
if (state.input.type === "pointer" && !state.input.disabled.includes("pointer") && !item.active && !item.disabled) {
|
|
73
|
-
selectItem(
|
|
71
|
+
selectItem(itemArgs.value);
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
const { getNestedView, unselectAllViews } = useMenuView(instanceId);
|
|
77
75
|
const nestedView = computed(() => getNestedView(mappedId.value));
|
|
78
76
|
function guardedUnselect() {
|
|
79
77
|
if (!nestedView.value || !nestedView.value.active) {
|
|
80
|
-
unselectItem(
|
|
78
|
+
unselectItem(itemArgs.value);
|
|
81
79
|
} else {
|
|
82
80
|
watch(
|
|
83
81
|
() => nestedView.value?.active,
|
|
84
82
|
(value) => {
|
|
85
83
|
if (!value) {
|
|
86
|
-
unselectItem(
|
|
84
|
+
unselectItem(itemArgs.value);
|
|
87
85
|
}
|
|
88
86
|
},
|
|
89
87
|
{ once: true }
|
|
@@ -95,7 +93,7 @@ function onClick(event) {
|
|
|
95
93
|
state.input.type = "pointer";
|
|
96
94
|
state.input.disabled = [];
|
|
97
95
|
if (!item.disabled && !item.active) {
|
|
98
|
-
selectItem(
|
|
96
|
+
selectItem(itemArgs.value);
|
|
99
97
|
}
|
|
100
98
|
if (!nestedView.value) {
|
|
101
99
|
state.active = false;
|
|
@@ -111,7 +109,7 @@ provide(MagicMenuItemId, mappedId.value);
|
|
|
111
109
|
provide(MagicMenuItemActive, mappedActive);
|
|
112
110
|
onKeyStroke("Enter", onReturn);
|
|
113
111
|
onBeforeUnmount(() => {
|
|
114
|
-
deleteItem(
|
|
112
|
+
deleteItem(itemArgs.value);
|
|
115
113
|
});
|
|
116
114
|
</script>
|
|
117
115
|
|
|
@@ -59,11 +59,8 @@ const view = getView(mappedViewId.value);
|
|
|
59
59
|
const viewIndex = getRelativeViewIndex(mappedViewId.value);
|
|
60
60
|
const { initializeState } = useMenuState(mappedInstanceId.value);
|
|
61
61
|
const state = initializeState();
|
|
62
|
-
const { getItem } = useMenuItem(
|
|
63
|
-
|
|
64
|
-
viewId: mappedViewId.value
|
|
65
|
-
});
|
|
66
|
-
const item = getItem(itemId ?? "");
|
|
62
|
+
const { getItem } = useMenuItem(mappedInstanceId.value);
|
|
63
|
+
const item = getItem({ viewId: mappedViewId.value, id: itemId ?? "" });
|
|
67
64
|
const mappedDisabled = computed(() => disabled ?? item?.disabled ?? false);
|
|
68
65
|
const mappedTrigger = computed(() => {
|
|
69
66
|
if (trigger?.length) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { MaybeRef } from 'vue';
|
|
2
2
|
import type { MenuItem } from '../../types/index.js';
|
|
3
|
-
type
|
|
4
|
-
instanceId: MaybeRef<string>;
|
|
3
|
+
type ItemArgs = {
|
|
5
4
|
viewId: string;
|
|
5
|
+
id: string;
|
|
6
6
|
};
|
|
7
|
-
type InitializeItemArgs = Pick<MenuItem, '
|
|
8
|
-
export declare function useMenuItem(
|
|
7
|
+
type InitializeItemArgs = ItemArgs & Pick<MenuItem, 'disabled'>;
|
|
8
|
+
export declare function useMenuItem(instanceId: MaybeRef<string>): {
|
|
9
9
|
initializeItem: (args: InitializeItemArgs) => MenuItem;
|
|
10
|
-
deleteItem: (
|
|
11
|
-
getItem: (
|
|
12
|
-
selectItem: (
|
|
13
|
-
unselectItem: (
|
|
10
|
+
deleteItem: (args: ItemArgs) => void;
|
|
11
|
+
getItem: (args: ItemArgs) => MenuItem | undefined;
|
|
12
|
+
selectItem: (args: ItemArgs) => void;
|
|
13
|
+
unselectItem: (args: ItemArgs) => void;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { reactive } from "vue";
|
|
2
|
-
import { usePointer, watchOnce } from "@vueuse/core";
|
|
3
2
|
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
4
3
|
import { useMenuView } from "./useMenuView.mjs";
|
|
5
4
|
import { useMenuState } from "./useMenuState.mjs";
|
|
6
|
-
export function useMenuItem(
|
|
7
|
-
const { instanceId, viewId } = args;
|
|
5
|
+
export function useMenuItem(instanceId) {
|
|
8
6
|
const { throwError } = useMagicError({
|
|
9
7
|
prefix: "MagicMenu",
|
|
10
8
|
source: "useMenuItem"
|
|
@@ -12,15 +10,8 @@ export function useMenuItem(args) {
|
|
|
12
10
|
const { initializeState } = useMenuState(instanceId);
|
|
13
11
|
const state = initializeState();
|
|
14
12
|
const { getView, unselectDescendingViews } = useMenuView(instanceId);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
throwError({
|
|
18
|
-
message: `View ${viewId} not found`,
|
|
19
|
-
errorCode: "view_id_not_found"
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function createItem(args2) {
|
|
23
|
-
const { id, disabled } = args2;
|
|
13
|
+
function createItem(args) {
|
|
14
|
+
const { id, disabled } = args;
|
|
24
15
|
const item = {
|
|
25
16
|
id,
|
|
26
17
|
active: false,
|
|
@@ -28,54 +19,56 @@ export function useMenuItem(args) {
|
|
|
28
19
|
};
|
|
29
20
|
return reactive(item);
|
|
30
21
|
}
|
|
31
|
-
function addItem(
|
|
32
|
-
const
|
|
22
|
+
function addItem(args) {
|
|
23
|
+
const { viewId, id, disabled } = args;
|
|
24
|
+
const item = createItem({ id, disabled });
|
|
25
|
+
const view = getView(viewId);
|
|
33
26
|
if (view?.items) {
|
|
34
27
|
view.items = [...view.items, item];
|
|
35
28
|
}
|
|
36
29
|
return item;
|
|
37
30
|
}
|
|
38
|
-
function unselectSiblings(
|
|
39
|
-
|
|
31
|
+
function unselectSiblings(args) {
|
|
32
|
+
const { viewId, id } = args;
|
|
33
|
+
return getView(viewId)?.items.filter((item) => item.id !== id).forEach((item) => item.active = false);
|
|
40
34
|
}
|
|
41
|
-
function initializeItem(
|
|
42
|
-
const { id } =
|
|
43
|
-
|
|
35
|
+
function initializeItem(args) {
|
|
36
|
+
const { viewId, id } = args;
|
|
37
|
+
if (!getView(viewId)) {
|
|
38
|
+
throwError({
|
|
39
|
+
message: `View ${viewId} not found`,
|
|
40
|
+
errorCode: "view_id_not_found"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const item = getItem({ viewId, id }) ?? addItem(args);
|
|
44
44
|
return item;
|
|
45
45
|
}
|
|
46
|
-
function deleteItem(
|
|
46
|
+
function deleteItem(args) {
|
|
47
|
+
const { viewId, id } = args;
|
|
48
|
+
const view = getView(viewId);
|
|
47
49
|
if (!view?.items) {
|
|
48
50
|
return;
|
|
49
51
|
}
|
|
50
52
|
view.items = view.items.filter((x) => x.id !== id);
|
|
51
53
|
}
|
|
52
|
-
function getItem(
|
|
53
|
-
|
|
54
|
+
function getItem(args) {
|
|
55
|
+
const { viewId, id } = args;
|
|
56
|
+
return getView(viewId)?.items.find((item) => {
|
|
54
57
|
return item.id === id;
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
|
-
function selectItem(
|
|
58
|
-
const
|
|
60
|
+
function selectItem(args) {
|
|
61
|
+
const { viewId, id } = args;
|
|
62
|
+
const item = getItem({ viewId, id });
|
|
59
63
|
if (item) {
|
|
60
64
|
item.active = true;
|
|
61
|
-
unselectSiblings(id);
|
|
65
|
+
unselectSiblings({ viewId, id });
|
|
62
66
|
unselectDescendingViews(viewId);
|
|
63
|
-
|
|
64
|
-
state.input.view = view.id;
|
|
65
|
-
}
|
|
66
|
-
if (disablePointer) {
|
|
67
|
-
const { x, y } = usePointer();
|
|
68
|
-
state.input.disabled = [...state.input.disabled, "pointer"];
|
|
69
|
-
watchOnce([x, y], () => {
|
|
70
|
-
state.input.disabled = state.input.disabled.filter(
|
|
71
|
-
(x2) => x2 !== "pointer"
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
67
|
+
state.input.view = viewId;
|
|
75
68
|
}
|
|
76
69
|
}
|
|
77
|
-
function unselectItem(
|
|
78
|
-
const item = getItem(
|
|
70
|
+
function unselectItem(args) {
|
|
71
|
+
const item = getItem(args);
|
|
79
72
|
if (item) {
|
|
80
73
|
item.active = false;
|
|
81
74
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useEventListener } from "@vueuse/core";
|
|
1
2
|
import { useMagicError } from "@maas/vue-equipment/plugins/MagicError";
|
|
2
3
|
import { useMenuState } from "./useMenuState.mjs";
|
|
3
4
|
import { useMenuView } from "./useMenuView.mjs";
|
|
@@ -21,6 +22,8 @@ export function useMenuKeyListener(instanceId) {
|
|
|
21
22
|
getNestedView,
|
|
22
23
|
getParentView
|
|
23
24
|
} = useMenuView(instanceId);
|
|
25
|
+
const { selectItem } = useMenuItem(instanceId);
|
|
26
|
+
let pointerHeld = false;
|
|
24
27
|
function keyStrokeGuard(e) {
|
|
25
28
|
switch (true) {
|
|
26
29
|
case (!state.active && state.options.debug):
|
|
@@ -40,11 +43,26 @@ export function useMenuKeyListener(instanceId) {
|
|
|
40
43
|
function getEnabledItems(view) {
|
|
41
44
|
return view.items.filter((item) => !item.disabled);
|
|
42
45
|
}
|
|
46
|
+
function selectItemByKeyboard(args) {
|
|
47
|
+
selectItem(args);
|
|
48
|
+
if (!state.input.disabled.includes("pointer")) {
|
|
49
|
+
state.input.disabled = [...state.input.disabled, "pointer"];
|
|
50
|
+
}
|
|
51
|
+
pointerHeld = true;
|
|
52
|
+
}
|
|
53
|
+
function releasePointer() {
|
|
54
|
+
if (!pointerHeld) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
pointerHeld = false;
|
|
58
|
+
state.input.disabled = state.input.disabled.filter(
|
|
59
|
+
(input) => input !== "pointer"
|
|
60
|
+
);
|
|
61
|
+
}
|
|
43
62
|
function selectFirstItem(view) {
|
|
44
|
-
const { selectItem } = useMenuItem({ instanceId, viewId: view.id });
|
|
45
63
|
const firstItem = getEnabledItems(view)[0];
|
|
46
64
|
if (firstItem) {
|
|
47
|
-
|
|
65
|
+
selectItemByKeyboard({ viewId: view.id, id: firstItem.id });
|
|
48
66
|
}
|
|
49
67
|
}
|
|
50
68
|
async function onArrowRight(e) {
|
|
@@ -117,17 +135,15 @@ export function useMenuKeyListener(instanceId) {
|
|
|
117
135
|
const enabledItems = getEnabledItems(inputView);
|
|
118
136
|
const prevIndex = enabledItems.findIndex((item) => item.active) - 1;
|
|
119
137
|
if (prevIndex >= 0) {
|
|
120
|
-
const { selectItem } = useMenuItem({ instanceId, viewId });
|
|
121
138
|
const prevItem = enabledItems[prevIndex];
|
|
122
139
|
if (prevItem) {
|
|
123
|
-
|
|
140
|
+
selectItemByKeyboard({ viewId, id: prevItem.id });
|
|
124
141
|
}
|
|
125
142
|
unselectUnrelatedViews(viewId);
|
|
126
143
|
} else if (prevIndex !== -1) {
|
|
127
|
-
const { selectItem } = useMenuItem({ instanceId, viewId });
|
|
128
144
|
const lastItem = enabledItems[enabledItems.length - 1];
|
|
129
145
|
if (lastItem) {
|
|
130
|
-
|
|
146
|
+
selectItemByKeyboard({ viewId, id: lastItem.id });
|
|
131
147
|
}
|
|
132
148
|
unselectUnrelatedViews(viewId);
|
|
133
149
|
}
|
|
@@ -149,10 +165,9 @@ export function useMenuKeyListener(instanceId) {
|
|
|
149
165
|
const enabledItems = getEnabledItems(inputView);
|
|
150
166
|
const nextIndex = enabledItems.findIndex((item) => item.active) + 1;
|
|
151
167
|
if (nextIndex >= 0) {
|
|
152
|
-
const { selectItem } = useMenuItem({ instanceId, viewId });
|
|
153
168
|
const nextItem = enabledItems[nextIndex];
|
|
154
169
|
if (nextItem) {
|
|
155
|
-
|
|
170
|
+
selectItemByKeyboard({ viewId, id: nextItem.id });
|
|
156
171
|
}
|
|
157
172
|
unselectUnrelatedViews(viewId);
|
|
158
173
|
}
|
|
@@ -198,6 +213,7 @@ export function useMenuKeyListener(instanceId) {
|
|
|
198
213
|
}
|
|
199
214
|
}
|
|
200
215
|
}
|
|
216
|
+
useEventListener("pointermove", releasePointer, { passive: true });
|
|
201
217
|
return {
|
|
202
218
|
onArrowRight,
|
|
203
219
|
onArrowLeft,
|
|
@@ -64,8 +64,10 @@ const {
|
|
|
64
64
|
} = toRefs(state);
|
|
65
65
|
const rawSrc = options?.src ?? "";
|
|
66
66
|
const srcs = Array.isArray(rawSrc) ? rawSrc : [rawSrc];
|
|
67
|
-
state.playlistCount = srcs.length;
|
|
68
67
|
state.loop = state.options.loop;
|
|
68
|
+
onMounted(() => {
|
|
69
|
+
state.playlistCount = srcs.length;
|
|
70
|
+
});
|
|
69
71
|
const currentSrc = computed(() => srcs[state.playlistIndex] ?? "");
|
|
70
72
|
const { next } = usePlayerPlaylistApi({ id });
|
|
71
73
|
watch(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
playsinline
|
|
6
6
|
disablePictureInPicture
|
|
7
7
|
:preload="injectedOptions.preload"
|
|
8
|
-
:loop="
|
|
8
|
+
:loop="sourceCount <= 1 && injectedOptions.loop"
|
|
9
9
|
:muted="muted"
|
|
10
10
|
/>
|
|
11
11
|
</template>
|
|
@@ -66,7 +66,10 @@ const { initialize } = usePlayerRuntime({
|
|
|
66
66
|
});
|
|
67
67
|
const { initializeState } = usePlayerState(injectedInstanceId);
|
|
68
68
|
const state = initializeState();
|
|
69
|
-
const { muted, playing, started, loaded
|
|
69
|
+
const { muted, playing, started, loaded } = toRefs(state);
|
|
70
|
+
const sourceCount = computed(
|
|
71
|
+
() => Array.isArray(injectedOptions.src) ? injectedOptions.src.length : 1
|
|
72
|
+
);
|
|
70
73
|
usePlayerMediaApi({
|
|
71
74
|
id: injectedInstanceId,
|
|
72
75
|
mediaRef: elRef
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../packages/utils/src/functions/clampValue.ts","../../packages/utils/src/functions/convertToPixels.ts","../../packages/utils/src/functions/createStateStore.ts","../../packages/utils/src/functions/easings.ts","../../packages/utils/src/functions/edgeNavigation.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/rubberband.ts","../../packages/utils/src/functions/scrollbarGutterSupport.ts","../../packages/utils/src/functions/scrollbarWidth.ts","../../packages/utils/src/functions/selectionLock.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","// Converts a CSS length string in `px` or `rem` to an absolute pixel value.\n// Returns undefined for any other unit or an unparseable value, so callers can\n// warn with their own context.\nexport function convertToPixels(value: string): number | undefined {\n const match = value.trim().match(/^(\\d*\\.?\\d+)\\s*(rem|px)$/)\n if (!match) {\n return undefined\n }\n\n const numericValue = parseFloat(match[1] ?? '')\n\n if (match[2] === 'rem') {\n const rootFontSize =\n parseFloat(getComputedStyle(document.body).fontSize) || 16\n return numericValue * rootFontSize\n }\n\n return numericValue\n}\n","import { getCurrentInstance, ref } from 'vue'\nimport 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","interface CancelEdgeNavigationArgs {\n event: TouchEvent\n threshold?: number\n slop?: number\n exclude?: string[]\n}\n\ninterface RestoreClickArgs {\n target: HTMLElement\n touch: Touch\n slop: number\n}\n\n// iPadOS reports a Macintosh user agent, so touch support is the tell\nexport function hasEdgeNavigationGestures() {\n if (typeof window === 'undefined') {\n return false\n }\n\n return (\n /iPad|iPhone|iPod/.test(navigator?.userAgent) ||\n (/Macintosh/.test(navigator?.userAgent) && navigator?.maxTouchPoints > 1)\n )\n}\n\n// Canceling touchstart is the one signal WebKit honors to keep its edge\n// navigation swipe from arming; pointer events keep firing regardless\nexport function cancelEdgeNavigation(args: CancelEdgeNavigationArgs): boolean {\n const {\n event,\n threshold = 44,\n slop = 12,\n exclude = ['SELECT', 'OPTION', 'INPUT', 'TEXTAREA'],\n } = args\n\n if (!hasEdgeNavigationGestures() || !event.cancelable) {\n return false\n }\n\n if (event.touches.length !== 1) {\n return false\n }\n\n const touch = event.touches[0]\n const target = event.target\n\n if (!touch || !(target instanceof HTMLElement)) {\n return false\n }\n\n if (\n exclude.some((tag) => tag.toUpperCase() === target.tagName) ||\n target.isContentEditable\n ) {\n return false\n }\n\n if (\n touch.clientX > threshold &&\n touch.clientX < window.innerWidth - threshold\n ) {\n return false\n }\n\n event.preventDefault()\n restoreClick({ target, touch, slop })\n\n return true\n}\n\n// Canceling touchstart swallows the tap’s synthesized click; a touch that\n// ends within the slop dispatches a deferred replacement\nfunction restoreClick(args: RestoreClickArgs) {\n const { target, touch, slop } = args\n const { identifier, clientX, clientY } = touch\n\n function findTouch(list: TouchList) {\n for (let index = 0; index < list.length; index++) {\n const candidate = list[index]\n if (candidate?.identifier === identifier) {\n return candidate\n }\n }\n\n return undefined\n }\n\n function teardown() {\n document.removeEventListener('touchend', onTouchend, true)\n document.removeEventListener('touchcancel', onTouchcancel, true)\n }\n\n function onTouchend(event: TouchEvent) {\n const endTouch = findTouch(event.changedTouches)\n\n if (!endTouch) {\n return\n }\n\n teardown()\n\n const distance = Math.hypot(\n endTouch.clientX - clientX,\n endTouch.clientY - clientY\n )\n\n if (distance <= slop) {\n setTimeout(() => target.click())\n }\n }\n\n function onTouchcancel(event: TouchEvent) {\n if (findTouch(event.changedTouches)) {\n teardown()\n }\n }\n\n document.addEventListener('touchend', onTouchend, true)\n document.addEventListener('touchcancel', onTouchcancel, true)\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) {\n startTime = timestamp\n }\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 mouse?: boolean\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, mouse, debug } = args\n if (element && event.isPrimary && (mouse || event.pointerType !== 'mouse')) {\n try {\n const coalescedEvents: PointerEvent[] =\n 'getCoalescedEvents' in event ? event.getCoalescedEvents() : [event]\n\n if (coalescedEvents.length > 0 || mouse) {\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","// Maps overdrag distance onto a diminishing, ever-increasing offset that\n// approaches `max` but never reaches it, so resistance always keeps growing.\n// Higher `tightness` climbs toward the edge sooner while staying elastic.\nexport function rubberband(distance: number, max: number, tightness = 2) {\n if (max <= 0 || distance <= 0) {\n return 0\n }\n return (1 - 1 / ((distance * tightness) / max + 1)) * max\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","let lockCount = 0\nlet previousUserSelect = ''\nlet previousWebkitUserSelect = ''\n\nfunction onSelectstart(event: Event) {\n event.preventDefault()\n}\n\n// Blocks text selection page-wide, e.g. for the duration of a drag.\nexport function lockSelection(): () => void {\n if (typeof document === 'undefined') {\n return () => {}\n }\n\n if (lockCount === 0) {\n const { style } = document.documentElement\n previousUserSelect = style.userSelect\n previousWebkitUserSelect = style.webkitUserSelect\n style.userSelect = 'none'\n style.webkitUserSelect = 'none'\n document.addEventListener('selectstart', onSelectstart)\n }\n\n lockCount++\n\n let released = false\n\n return function releaseSelection() {\n if (released) {\n return\n }\n\n released = true\n lockCount--\n\n if (lockCount === 0) {\n const { style } = document.documentElement\n style.userSelect = previousUserSelect\n style.webkitUserSelect = previousWebkitUserSelect\n document.removeEventListener('selectstart', onSelectstart)\n }\n }\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) {\n appendChar = ch\n }\n if (appendChar === _options?.separator) {\n appendChar = ' '\n }\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,SAA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AAE,MAAM,IAAI,SAAS;AAC3B,YAAM,aAAa;AACnB,YAAM,mBAAmB;AACzB,eAAS,oBAAoB,eAAe,aAAa;AAAA,IAC3D;AAAA,EACF;AACF;;;AClCA,IAAM,iBAAiC;AAAA,EACrC,WAAW;AAAA,EACX,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AACb;AAEO,SAAS,QAAQ,QAAgB,SAAkC;AACxE,MAAI,OAAO,WAAW,UAAU;AAC9B,UAAM,IAAI,MAAM,mCAAmC;AAAA,EACrD;AAGA,QAAM,WAAW,EAAE,GAAG,gBAAgB,GAAG,QAAQ;AAEjD,QAAM,UAAqC,CAAC;AAE5C,MAAI,OAAO,OACR,UAAU,EACV,MAAM,EAAE,EACR,OAAO,SAAU,QAAQ,IAAI;AAC5B,QAAI,aAAa,QAAQ,EAAE;AAC3B,QAAI,eAAe,QAAW;AAC5B,mBAAa;AAAA,IACf;AACA,QAAI,gBAAe,qCAAU,YAAW;AACtC,mBAAa;AAAA,IACf;AACA,WACE,SACA,WAAW,SAAQ,qCAAU,WAAU,4BAA4B,EAAE;AAAA,EAEzE,GAAG,EAAE;AAEP,MAAI,SAAS,QAAQ;AACnB,WAAO,KAAK,QAAQ,mBAAmB,EAAE;AAAA,EAC3C;AAEA,MAAI,SAAS,MAAM;AACjB,WAAO,KAAK,KAAK;AAAA,EACnB;AAEA,MAAI,SAAS,WAAW;AACtB,WAAO,KAAK,QAAQ,OAAO,SAAS,SAAS;AAAA,EAC/C;AAEA,MAAI,SAAS,WAAW;AACtB,WAAO,KAAK,kBAAkB;AAAA,EAChC;AAEA,SAAO;AACT;;;AC5DO,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/convertToPixels.ts","../../packages/utils/src/functions/createStateStore.ts","../../packages/utils/src/functions/easings.ts","../../packages/utils/src/functions/edgeNavigation.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/rubberband.ts","../../packages/utils/src/functions/scrollbarGutterSupport.ts","../../packages/utils/src/functions/scrollbarWidth.ts","../../packages/utils/src/functions/selectionLock.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","// Converts a CSS length string in `px` or `rem` to an absolute pixel value.\n// Returns undefined for any other unit or an unparseable value, so callers can\n// warn with their own context.\nexport function convertToPixels(value: string): number | undefined {\n const match = value.trim().match(/^(\\d*\\.?\\d+)\\s*(rem|px)$/)\n if (!match) {\n return undefined\n }\n\n const numericValue = parseFloat(match[1] ?? '')\n\n if (match[2] === 'rem') {\n const rootFontSize =\n parseFloat(getComputedStyle(document.body).fontSize) || 16\n return numericValue * rootFontSize\n }\n\n return numericValue\n}\n","import { getCurrentInstance, ref } from 'vue'\nimport 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. Event handlers,\n // timers and watcher callbacks run without one, so composables that use\n // a store must be called during setup, never from inside those.\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","interface CancelEdgeNavigationArgs {\n event: TouchEvent\n threshold?: number\n slop?: number\n exclude?: string[]\n}\n\ninterface RestoreClickArgs {\n target: HTMLElement\n touch: Touch\n slop: number\n}\n\n// iPadOS reports a Macintosh user agent, so touch support is the tell\nexport function hasEdgeNavigationGestures() {\n if (typeof window === 'undefined') {\n return false\n }\n\n return (\n /iPad|iPhone|iPod/.test(navigator?.userAgent) ||\n (/Macintosh/.test(navigator?.userAgent) && navigator?.maxTouchPoints > 1)\n )\n}\n\n// Canceling touchstart is the one signal WebKit honors to keep its edge\n// navigation swipe from arming; pointer events keep firing regardless\nexport function cancelEdgeNavigation(args: CancelEdgeNavigationArgs): boolean {\n const {\n event,\n threshold = 44,\n slop = 12,\n exclude = ['SELECT', 'OPTION', 'INPUT', 'TEXTAREA'],\n } = args\n\n if (!hasEdgeNavigationGestures() || !event.cancelable) {\n return false\n }\n\n if (event.touches.length !== 1) {\n return false\n }\n\n const touch = event.touches[0]\n const target = event.target\n\n if (!touch || !(target instanceof HTMLElement)) {\n return false\n }\n\n if (\n exclude.some((tag) => tag.toUpperCase() === target.tagName) ||\n target.isContentEditable\n ) {\n return false\n }\n\n if (\n touch.clientX > threshold &&\n touch.clientX < window.innerWidth - threshold\n ) {\n return false\n }\n\n event.preventDefault()\n restoreClick({ target, touch, slop })\n\n return true\n}\n\n// Canceling touchstart swallows the tap’s synthesized click; a touch that\n// ends within the slop dispatches a deferred replacement\nfunction restoreClick(args: RestoreClickArgs) {\n const { target, touch, slop } = args\n const { identifier, clientX, clientY } = touch\n\n function findTouch(list: TouchList) {\n for (let index = 0; index < list.length; index++) {\n const candidate = list[index]\n if (candidate?.identifier === identifier) {\n return candidate\n }\n }\n\n return undefined\n }\n\n function teardown() {\n document.removeEventListener('touchend', onTouchend, true)\n document.removeEventListener('touchcancel', onTouchcancel, true)\n }\n\n function onTouchend(event: TouchEvent) {\n const endTouch = findTouch(event.changedTouches)\n\n if (!endTouch) {\n return\n }\n\n teardown()\n\n const distance = Math.hypot(\n endTouch.clientX - clientX,\n endTouch.clientY - clientY\n )\n\n if (distance <= slop) {\n setTimeout(() => target.click())\n }\n }\n\n function onTouchcancel(event: TouchEvent) {\n if (findTouch(event.changedTouches)) {\n teardown()\n }\n }\n\n document.addEventListener('touchend', onTouchend, true)\n document.addEventListener('touchcancel', onTouchcancel, true)\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) {\n startTime = timestamp\n }\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 mouse?: boolean\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, mouse, debug } = args\n if (element && event.isPrimary && (mouse || event.pointerType !== 'mouse')) {\n try {\n const coalescedEvents: PointerEvent[] =\n 'getCoalescedEvents' in event ? event.getCoalescedEvents() : [event]\n\n if (coalescedEvents.length > 0 || mouse) {\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","// Maps overdrag distance onto a diminishing, ever-increasing offset that\n// approaches `max` but never reaches it, so resistance always keeps growing.\n// Higher `tightness` climbs toward the edge sooner while staying elastic.\nexport function rubberband(distance: number, max: number, tightness = 2) {\n if (max <= 0 || distance <= 0) {\n return 0\n }\n return (1 - 1 / ((distance * tightness) / max + 1)) * max\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","let lockCount = 0\nlet previousUserSelect = ''\nlet previousWebkitUserSelect = ''\n\nfunction onSelectstart(event: Event) {\n event.preventDefault()\n}\n\n// Blocks text selection page-wide, e.g. for the duration of a drag.\nexport function lockSelection(): () => void {\n if (typeof document === 'undefined') {\n return () => {}\n }\n\n if (lockCount === 0) {\n const { style } = document.documentElement\n previousUserSelect = style.userSelect\n previousWebkitUserSelect = style.webkitUserSelect\n style.userSelect = 'none'\n style.webkitUserSelect = 'none'\n document.addEventListener('selectstart', onSelectstart)\n }\n\n lockCount++\n\n let released = false\n\n return function releaseSelection() {\n if (released) {\n return\n }\n\n released = true\n lockCount--\n\n if (lockCount === 0) {\n const { style } = document.documentElement\n style.userSelect = previousUserSelect\n style.webkitUserSelect = previousWebkitUserSelect\n document.removeEventListener('selectstart', onSelectstart)\n }\n }\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) {\n appendChar = ch\n }\n if (appendChar === _options?.separator) {\n appendChar = ' '\n }\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;;;ACCO,SAAS,gBAAgB,OAAmC;AACjE,QAAM,QAAQ,MAAM,KAAK,EAAE,MAAM,0BAA0B;AAC3D,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,WAAW,MAAM,CAAC,KAAK,EAAE;AAE9C,MAAI,MAAM,CAAC,MAAM,OAAO;AACtB,UAAM,eACJ,WAAW,iBAAiB,SAAS,IAAI,EAAE,QAAQ,KAAK;AAC1D,WAAO,eAAe;AAAA,EACxB;AAEA,SAAO;AACT;;;AClBA,SAAS,oBAAoB,WAAW;AAKjC,SAAS,iBACd,KACA,iBACgB;AAChB,SAAO,SAAS,mBAA2B;AACzC,UAAM,WAAW,mBAAmB;AACpC,UAAM,MAAM,qCAAU,WAAW;AAKjC,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;;;ACpCO,SAAS,OAAO,GAAW;AAChC,SAAO;AACT;AACO,SAAS,WAAW,GAAW;AACpC,SAAO,IAAI;AACb;AACO,SAAS,Y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,SAAO,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;AAC9B;","names":[]}
|
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.86",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Robin Scholz",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"hls.js": "^1",
|
|
88
88
|
"luxon": "^3",
|
|
89
89
|
"mitt": "^3",
|
|
90
|
-
"motion": "^12 || ^13",
|
|
90
|
+
"motion": "^12 || ^13 || ^14",
|
|
91
91
|
"nuxt": ">=3.15",
|
|
92
92
|
"universal-cookie": "^7 || ^8",
|
|
93
93
|
"vue": "^3.5",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"build": "turbo run build --filter=!playground",
|
|
139
139
|
"build:types": "turbo run build:types",
|
|
140
140
|
"build:docs": "pnpm exec playwright install chromium --with-deps && turbo run build --filter=docs",
|
|
141
|
-
"tokens": "
|
|
141
|
+
"tokens": "mirror tokens && mirror css",
|
|
142
142
|
"preview:docs": "turbo run preview --filter=docs",
|
|
143
143
|
"update:metadata": "turbo run update --filter=metadata",
|
|
144
144
|
"test": "turbo run test",
|
|
@@ -157,6 +157,7 @@
|
|
|
157
157
|
"onlyBuiltDependencies": [
|
|
158
158
|
"@bundled-es-modules/glob",
|
|
159
159
|
"@parcel/watcher",
|
|
160
|
+
"better-sqlite3",
|
|
160
161
|
"esbuild",
|
|
161
162
|
"style-dictionary",
|
|
162
163
|
"vue-demi"
|