adverich-kun-ui 0.1.561 → 0.1.562

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.
@@ -1,12 +1,15 @@
1
- import { computed as i, ref as w } from "vue";
2
- function m() {
3
- var s, t, a, u, v;
1
+ import { computed as i, ref as c } from "vue";
2
+ const s = typeof window < "u";
3
+ function f() {
4
+ var t, a, u, r, v;
5
+ if (!s)
6
+ return { os: "Server", osVersion: "Unknown" };
4
7
  const l = window.navigator.userAgent;
5
- let d = "Unknown OS", o = "Unknown Version";
6
- return /Mac/.test(l) ? (d = "Mac OS", o = (t = (s = l.match(/Mac OS X (\d+[\._]\d+[\._]\d+)/)) == null ? void 0 : s[1]) == null ? void 0 : t.replace(/_/g, ".")) : /iPhone|iPad|iPod/.test(l) ? (d = "iOS", o = ((a = l.match(/OS (\d+)[._](\d+)[._]?(\d+)?/)) == null ? void 0 : a.slice(1, 4).join(".")) || "Unknown") : /Windows/.test(l) ? (d = "Windows", o = (u = l.match(/Windows NT (\d+\.\d+)/)) == null ? void 0 : u[1]) : /Android/.test(l) ? (d = "Android", o = (v = l.match(/Android (\d+\.\d+)/)) == null ? void 0 : v[1]) : /Linux/.test(l) && (d = "Linux"), { os: d, osVersion: o };
8
+ let o = "Unknown OS", d = "Unknown Version";
9
+ return /Mac/.test(l) ? (o = "Mac OS", d = (a = (t = l.match(/Mac OS X (\d+[\._]\d+[\._]\d+)/)) == null ? void 0 : t[1]) == null ? void 0 : a.replace(/_/g, ".")) : /iPhone|iPad|iPod/.test(l) ? (o = "iOS", d = ((u = l.match(/OS (\d+)[._](\d+)[._]?(\d+)?/)) == null ? void 0 : u.slice(1, 4).join(".")) || "Unknown") : /Windows/.test(l) ? (o = "Windows", d = (r = l.match(/Windows NT (\d+\.\d+)/)) == null ? void 0 : r[1]) : /Android/.test(l) ? (o = "Android", d = (v = l.match(/Android (\d+\.\d+)/)) == null ? void 0 : v[1]) : /Linux/.test(l) && (o = "Linux"), { os: o, osVersion: d };
7
10
  }
8
- const e = w(window.innerWidth), x = w(window.innerHeight), r = m(), h = i(
9
- () => r.os === "iOS" || r.os === "Android" || x.value > e.value
11
+ const e = c(s ? window.innerWidth : 1024), m = c(s ? window.innerHeight : 768), w = f(), h = i(
12
+ () => w.os === "iOS" || w.os === "Android" || m.value > e.value
10
13
  ), n = {
11
14
  xs: 475,
12
15
  sm: 640,
@@ -33,16 +36,15 @@ i(() => e.value < n.lg);
33
36
  i(() => e.value < n.xl);
34
37
  i(() => e.value < n.xxl);
35
38
  i(() => e.value < n.xxl);
36
- function c() {
37
- e.value = window.innerWidth, x.value = window.innerHeight;
39
+ function x() {
40
+ s && (e.value = window.innerWidth, m.value = window.innerHeight);
38
41
  }
39
- window.addEventListener("resize", c);
40
- window.addEventListener("beforeunload", () => {
41
- window.removeEventListener("resize", c);
42
- });
42
+ s && (window.addEventListener("resize", x), window.addEventListener("beforeunload", () => {
43
+ window.removeEventListener("resize", x);
44
+ }));
43
45
  export {
44
46
  h as isMobile,
45
- r as kunOS,
46
- x as screenHeight,
47
+ w as kunOS,
48
+ m as screenHeight,
47
49
  e as screenWidth
48
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.561",
3
+ "version": "0.1.562",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",