nuxt-hs-ui 2.1.13 → 2.1.15

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.1.13",
7
+ "version": "2.1.15",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -151,6 +151,7 @@ const isChangeData = computed(() => {
151
151
  const displayData = ref<DisplaySelectItem | null>(null);
152
152
  watch(displayData, (v) => {
153
153
  const before = props.data;
154
+ if (v === before) return;
154
155
  if (v === null) {
155
156
  emit("update:data", null);
156
157
  emit("value-change", null, before);
@@ -19,22 +19,16 @@ export const useHsMisc = defineStore("HsMisc", () => {
19
19
  return "";
20
20
  }
21
21
  };
22
- const IsTouchDevice = () => {
23
- try {
24
- if (import.meta.client) return "ontouchend" in document;
25
- return false;
26
- } catch (err) {
27
- console.error(err);
28
- return false;
29
- }
30
- };
31
22
  const IsMobile = () => {
32
23
  const ua = GetUa();
33
- if (/android|ipod|ipad|iphone|macintosh/.test(ua) || IsTouchDevice()) {
34
- return true;
35
- } else {
36
- return false;
24
+ if (/\(iPad.*OS/i.test(ua)) return true;
25
+ if (/iP(?:ad|hone|od)/i.test(ua)) return true;
26
+ if (/android|ipod|ipad|iphone|mobile/i.test(ua)) return true;
27
+ if (/Macintosh/.test(ua) && import.meta.client) {
28
+ if (navigator === void 0) return false;
29
+ return navigator.maxTouchPoints > 1;
37
30
  }
31
+ return false;
38
32
  };
39
33
  const state = reactive({
40
34
  isInit: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",