@maas/vue-equipment 0.16.8 → 0.16.9
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
CHANGED
|
@@ -2,13 +2,15 @@ import { computed, toValue } from "vue";
|
|
|
2
2
|
import { unrefElement } from "@vueuse/core";
|
|
3
3
|
export function useDrawerGuards(args) {
|
|
4
4
|
const { elRef, absDirectionX, absDirectionY, position, activeSnapPoint } = args;
|
|
5
|
-
const isHoverSupported =
|
|
5
|
+
const isHoverSupported = computed(() => {
|
|
6
|
+
return typeof window !== "undefined" && matchMedia("(hover: hover)").matches;
|
|
7
|
+
});
|
|
6
8
|
const canSnap = computed(() => {
|
|
7
9
|
return toValue(activeSnapPoint) !== 1 && !!toValue(activeSnapPoint);
|
|
8
10
|
});
|
|
9
11
|
function canDrag(el) {
|
|
10
12
|
let element = el;
|
|
11
|
-
if (isHoverSupported) {
|
|
13
|
+
if (isHoverSupported.value) {
|
|
12
14
|
return true;
|
|
13
15
|
}
|
|
14
16
|
if (canSnap.value) {
|
|
@@ -68,7 +70,7 @@ export function useDrawerGuards(args) {
|
|
|
68
70
|
}
|
|
69
71
|
function canInterpolate(el) {
|
|
70
72
|
let element = el;
|
|
71
|
-
if (isHoverSupported) {
|
|
73
|
+
if (isHoverSupported.value) {
|
|
72
74
|
return true;
|
|
73
75
|
}
|
|
74
76
|
while (element) {
|
|
@@ -94,7 +96,7 @@ export function useDrawerGuards(args) {
|
|
|
94
96
|
}
|
|
95
97
|
function lockScroll(el) {
|
|
96
98
|
let element = el;
|
|
97
|
-
if (isHoverSupported) {
|
|
99
|
+
if (isHoverSupported.value) {
|
|
98
100
|
return void 0;
|
|
99
101
|
}
|
|
100
102
|
while (element) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "A magic collection of Vue composables, plugins, components and directives",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.9",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@antfu/ni": "^0.21.12",
|