geekin-devtoys 0.2.8 → 0.2.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/lib/GDialog/index.js +1 -1
- package/lib/GDialog/index.mjs +1 -1
- package/lib/GDialog/style.css +1 -1
- package/lib/GPluginVideo/index.js +6 -6
- package/lib/GPluginVideo/index.mjs +10 -7
- package/lib/GScreen/index.js +1 -1
- package/lib/GScreen/index.mjs +111 -92
- package/package.json +1 -1
|
@@ -3981,9 +3981,7 @@ Wn.version = "1.2.7";
|
|
|
3981
3981
|
const xr = {
|
|
3982
3982
|
id: "playWnd",
|
|
3983
3983
|
class: "playWnd"
|
|
3984
|
-
}, hn = 3, cn = 3e3, ve = "插件未启动,正在尝试启动,请稍候...", jt = "插件启动失败,请检查插件是否安装!", ye =
|
|
3985
|
-
name: "GPluginVideo"
|
|
3986
|
-
}, {
|
|
3984
|
+
}, hn = 3, cn = 3e3, ve = "插件未启动,正在尝试启动,请稍候...", jt = "插件启动失败,请检查插件是否安装!", ye = {
|
|
3987
3985
|
__name: "index",
|
|
3988
3986
|
props: {
|
|
3989
3987
|
// 是否播放
|
|
@@ -4040,6 +4038,11 @@ const xr = {
|
|
|
4040
4038
|
happenedTime: {
|
|
4041
4039
|
type: String,
|
|
4042
4040
|
default: ""
|
|
4041
|
+
},
|
|
4042
|
+
// 是否双击关闭视频
|
|
4043
|
+
isDoubleClickClose: {
|
|
4044
|
+
type: Boolean,
|
|
4045
|
+
default: !1
|
|
4043
4046
|
}
|
|
4044
4047
|
},
|
|
4045
4048
|
emits: ["closeVideoEmit"],
|
|
@@ -4076,8 +4079,8 @@ const xr = {
|
|
|
4076
4079
|
const v = new ki();
|
|
4077
4080
|
return v.setPublicKey(o.value), v.encrypt(w);
|
|
4078
4081
|
}
|
|
4079
|
-
function E() {
|
|
4080
|
-
r("closeVideoEmit"), s.value !== null && (s.value.JS_RequestInterface({ funcName: "stopAllPreview" }), s.value.JS_HideWnd(), s.value.JS_Disconnect().then(() => {
|
|
4082
|
+
function E(w) {
|
|
4083
|
+
r("closeVideoEmit", w), s.value !== null && (s.value.JS_RequestInterface({ funcName: "stopAllPreview" }), s.value.JS_HideWnd(), s.value.JS_Disconnect().then(() => {
|
|
4081
4084
|
}, () => {
|
|
4082
4085
|
}));
|
|
4083
4086
|
}
|
|
@@ -4187,7 +4190,7 @@ const xr = {
|
|
|
4187
4190
|
v.type === 6 && (h.value = i.multipPointsArr.length, p.value = 1, d.value = i.multipPointsArr, u.value = v.msg.layout, y.value = v.msg.wndNum, d.value = T(d.value, v.msg.wndNum), f.value = [...d.value[p.value - 1]], s.value.JS_Disconnect().then(() => {
|
|
4188
4191
|
N();
|
|
4189
4192
|
}, () => {
|
|
4190
|
-
})), v.type === 7 && E();
|
|
4193
|
+
})), v.type === 7 && i.isDoubleClickClose && E("doubleClick");
|
|
4191
4194
|
}
|
|
4192
4195
|
function N() {
|
|
4193
4196
|
s.value = new window.WebControl({
|
|
@@ -4267,7 +4270,7 @@ const xr = {
|
|
|
4267
4270
|
[Kn, !t.isFullScreen]
|
|
4268
4271
|
]);
|
|
4269
4272
|
}
|
|
4270
|
-
}
|
|
4273
|
+
};
|
|
4271
4274
|
ye.install = (t) => {
|
|
4272
4275
|
t.component(ye.name, ye);
|
|
4273
4276
|
};
|
package/lib/GScreen/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),p=new WeakMap,M=(...e)=>{var n;const i=e[0],o=(n=t.getCurrentInstance())===null||n===void 0?void 0:n.proxy,r=o??t.getCurrentScope();if(r==null&&!t.hasInjectionContext())throw new Error("injectLocal must be called in setup");return r&&p.has(r)&&i in p.get(r)?p.get(r)[i]:t.inject(...e)},V=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const W=Object.prototype.toString,I=e=>W.call(e)==="[object Object]",S=()=>{};function T(e,n){function i(...o){return new Promise((r,u)=>{Promise.resolve(e(()=>n.apply(this,o),{fn:n,thisArg:this,args:o})).then(r).catch(u)})}return i}function x(e,n={}){let i,o,r=S;const u=c=>{clearTimeout(c),r(),r=S};let a;return c=>{const s=t.toValue(e),l=t.toValue(n.maxWait);return i&&u(i),s<=0||l!==void 0&&l<=0?(o&&(u(o),o=void 0),Promise.resolve(c())):new Promise((d,f)=>{r=n.rejectOnCancel?f:d,a=c,l&&!o&&(o=setTimeout(()=>{i&&u(i),o=void 0,d(a())},l)),i=setTimeout(()=>{o&&u(o),o=void 0,d(c())},s)})}}function b(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function w(e){return Array.isArray(e)?e:[e]}function C(e){return t.getCurrentInstance()}function E(e,n=200,i={}){return T(x(n,i),e)}function R(e,n=!0,i){C()?t.onMounted(e,i):n?e():t.nextTick(e)}function j(e,n,i){return t.watch(e,n,{...i,immediate:!0})}const g=V?window:void 0;function O(e){var n;const i=t.toValue(e);return(n=i?.$el)!==null&&n!==void 0?n:i}function y(...e){const n=(o,r,u,a)=>(o.addEventListener(r,u,a),()=>o.removeEventListener(r,u,a)),i=t.computed(()=>{const o=w(t.toValue(e[0])).filter(r=>r!=null);return o.every(r=>typeof r!="string")?o:void 0});return j(()=>{var o,r;return[(o=(r=i.value)===null||r===void 0?void 0:r.map(u=>O(u)))!==null&&o!==void 0?o:[g].filter(u=>u!=null),w(t.toValue(i.value?e[1]:e[0])),w(t.unref(i.value?e[2]:e[1])),t.toValue(i.value?e[3]:e[2])]},([o,r,u,a],h,c)=>{if(!o?.length||!r?.length||!u?.length)return;const s=I(a)?{...a}:a,l=o.flatMap(d=>r.flatMap(f=>u.map(v=>n(d,f,v,s))));c(()=>{l.forEach(d=>d())})},{flush:"post"})}function P(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function F(e){const n=P();return t.computed(()=>(n.value,!!e()))}const N=Symbol("vueuse-ssr-width");function _(){const e=t.hasInjectionContext()?M(N,null):null;return typeof e=="number"?e:void 0}function $(e,n={}){const{window:i=g,ssrWidth:o=_()}=n,r=F(()=>i&&"matchMedia"in i&&typeof i.matchMedia=="function"),u=t.shallowRef(typeof o=="number"),a=t.shallowRef(),h=t.shallowRef(!1),c=s=>{h.value=s.matches};return t.watchEffect(()=>{if(u.value){u.value=!r.value,h.value=t.toValue(e).split(",").some(s=>{const l=s.includes("not all"),d=s.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),f=s.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let v=!!(d||f);return d&&v&&(v=o>=b(d[1])),f&&v&&(v=o<=b(f[1])),l?!v:v});return}r.value&&(a.value=i.matchMedia(t.toValue(e)),h.value=a.value.matches)}),y(a,"change",c,{passive:!0}),t.computed(()=>h.value)}function G(e={}){const{window:n=g,initialWidth:i=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:u=!0,type:a="inner"}=e,h=t.shallowRef(i),c=t.shallowRef(o),s=()=>{if(n)if(a==="outer")h.value=n.outerWidth,c.value=n.outerHeight;else if(a==="visual"&&n.visualViewport){const{width:d,height:f,scale:v}=n.visualViewport;h.value=Math.round(d*v),c.value=Math.round(f*v)}else u?(h.value=n.innerWidth,c.value=n.innerHeight):(h.value=n.document.documentElement.clientWidth,c.value=n.document.documentElement.clientHeight)};s(),R(s);const l={passive:!0};return y("resize",s,l),n&&a==="visual"&&n.visualViewport&&y(n.visualViewport,"resize",s,l),r&&t.watch($("(orientation: portrait)"),()=>s()),{width:h,height:c}}const k={style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"}},m=t.defineComponent({name:"GScreen",inheritAttrs:!1,__name:"index",props:{width:{default:1920},height:{default:1080},debounceDelay:{default:166}},setup(e,{expose:n}){const i=e,{width:o,height:r}=G(),u=()=>({x:o.value/i.width,y:r.value/i.height}),a=t.ref(u()),h=t.computed(()=>{const l=a.value.x||1;return Math.max(.1,Math.min(l,10))}),c=t.computed(()=>{const l=i.width/i.height,f=o.value/r.value/l;return isFinite(f)?f:1}),s=t.computed(()=>{const l=h.value,d=isFinite(100/l)?100/l:100;return{width:`${i.width}px`,height:`${d}vh`,transform:`scale(${l})`,transformOrigin:"0 0",willChange:"transform"}});if(t.provide("GScreen_scaleX",h),t.provide("GScreen_yScaleRatio",c),i.debounceDelay>0){const l=E(()=>{a.value=u()},i.debounceDelay);t.watch([o,r],l)}else t.watch([o,r],()=>{a.value=u()});return n({scale:a,safeScaleX:h,yScaleRatio:c}),(l,d)=>(t.openBlock(),t.createElementBlock("div",k,[t.createElementVNode("div",{style:t.normalizeStyle(s.value)},[t.renderSlot(l.$slots,"default")],4)]))}});m.install=e=>{e.component("GScreen",m)};exports.GScreen=m;exports.default=m;
|
package/lib/GScreen/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { onMounted as E, nextTick as
|
|
2
|
-
const
|
|
1
|
+
import { onMounted as E, nextTick as j, getCurrentInstance as b, watch as w, getCurrentScope as C, hasInjectionContext as V, inject as O, toValue as v, shallowRef as m, computed as p, watchEffect as P, unref as F, defineComponent as N, ref as R, provide as M, createElementBlock as $, openBlock as G, createElementVNode as k, normalizeStyle as z, renderSlot as L } from "vue";
|
|
2
|
+
const y = /* @__PURE__ */ new WeakMap(), _ = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
|
|
3
3
|
var t;
|
|
4
|
-
const i = e[0], n = (t =
|
|
5
|
-
if (o == null && !
|
|
6
|
-
return o &&
|
|
7
|
-
},
|
|
4
|
+
const i = e[0], n = (t = b()) === null || t === void 0 ? void 0 : t.proxy, o = n ?? C();
|
|
5
|
+
if (o == null && !V()) throw new Error("injectLocal must be called in setup");
|
|
6
|
+
return o && y.has(o) && i in y.get(o) ? y.get(o)[i] : O(...e);
|
|
7
|
+
}, A = typeof window < "u" && typeof document < "u";
|
|
8
8
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
9
|
-
const
|
|
9
|
+
const D = Object.prototype.toString, H = (e) => D.call(e) === "[object Object]", I = () => {
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function B(e, t) {
|
|
12
12
|
function i(...n) {
|
|
13
13
|
return new Promise((o, r) => {
|
|
14
14
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
@@ -20,159 +20,178 @@ function G(e, t) {
|
|
|
20
20
|
}
|
|
21
21
|
return i;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let i, n, o =
|
|
25
|
-
const r = (
|
|
26
|
-
clearTimeout(
|
|
23
|
+
function X(e, t = {}) {
|
|
24
|
+
let i, n, o = I;
|
|
25
|
+
const r = (a) => {
|
|
26
|
+
clearTimeout(a), o(), o = I;
|
|
27
27
|
};
|
|
28
28
|
let l;
|
|
29
|
-
return (
|
|
30
|
-
const
|
|
31
|
-
return i && r(i),
|
|
32
|
-
o = t.rejectOnCancel ? h :
|
|
33
|
-
i && r(i), n = void 0,
|
|
34
|
-
},
|
|
35
|
-
n && r(n), n = void 0,
|
|
36
|
-
},
|
|
29
|
+
return (a) => {
|
|
30
|
+
const s = v(e), u = v(t.maxWait);
|
|
31
|
+
return i && r(i), s <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = void 0), Promise.resolve(a())) : new Promise((c, h) => {
|
|
32
|
+
o = t.rejectOnCancel ? h : c, l = a, u && !n && (n = setTimeout(() => {
|
|
33
|
+
i && r(i), n = void 0, c(l());
|
|
34
|
+
}, u)), i = setTimeout(() => {
|
|
35
|
+
n && r(n), n = void 0, c(a());
|
|
36
|
+
}, s);
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function T(e) {
|
|
41
41
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function S(e) {
|
|
44
44
|
return Array.isArray(e) ? e : [e];
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
46
|
+
function Q(e) {
|
|
47
|
+
return b();
|
|
48
48
|
}
|
|
49
49
|
// @__NO_SIDE_EFFECTS__
|
|
50
|
-
function
|
|
51
|
-
return
|
|
50
|
+
function Y(e, t = 200, i = {}) {
|
|
51
|
+
return B(X(t, i), e);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
53
|
+
function U(e, t = !0, i) {
|
|
54
|
+
Q() ? E(e, i) : t ? e() : j(e);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return
|
|
56
|
+
function J(e, t, i) {
|
|
57
|
+
return w(e, t, {
|
|
58
58
|
...i,
|
|
59
59
|
immediate: !0
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
function
|
|
62
|
+
const W = A ? window : void 0;
|
|
63
|
+
function K(e) {
|
|
64
64
|
var t;
|
|
65
|
-
const i =
|
|
65
|
+
const i = v(e);
|
|
66
66
|
return (t = i?.$el) !== null && t !== void 0 ? t : i;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function g(...e) {
|
|
69
69
|
const t = (n, o, r, l) => (n.addEventListener(o, r, l), () => n.removeEventListener(o, r, l)), i = p(() => {
|
|
70
|
-
const n =
|
|
70
|
+
const n = S(v(e[0])).filter((o) => o != null);
|
|
71
71
|
return n.every((o) => typeof o != "string") ? n : void 0;
|
|
72
72
|
});
|
|
73
|
-
return
|
|
73
|
+
return J(() => {
|
|
74
74
|
var n, o;
|
|
75
75
|
return [
|
|
76
|
-
(n = (o = i.value) === null || o === void 0 ? void 0 : o.map((r) =>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
(n = (o = i.value) === null || o === void 0 ? void 0 : o.map((r) => K(r))) !== null && n !== void 0 ? n : [W].filter((r) => r != null),
|
|
77
|
+
S(v(i.value ? e[1] : e[0])),
|
|
78
|
+
S(F(i.value ? e[2] : e[1])),
|
|
79
|
+
v(i.value ? e[3] : e[2])
|
|
80
80
|
];
|
|
81
|
-
}, ([n, o, r, l],
|
|
81
|
+
}, ([n, o, r, l], d, a) => {
|
|
82
82
|
if (!n?.length || !o?.length || !r?.length) return;
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
const s = H(l) ? { ...l } : l, u = n.flatMap((c) => o.flatMap((h) => r.map((f) => t(c, h, f, s))));
|
|
84
|
+
a(() => {
|
|
85
|
+
u.forEach((c) => c());
|
|
86
86
|
});
|
|
87
87
|
}, { flush: "post" });
|
|
88
88
|
}
|
|
89
89
|
// @__NO_SIDE_EFFECTS__
|
|
90
|
-
function
|
|
91
|
-
const e =
|
|
90
|
+
function Z() {
|
|
91
|
+
const e = m(!1), t = b();
|
|
92
92
|
return t && E(() => {
|
|
93
93
|
e.value = !0;
|
|
94
94
|
}, t), e;
|
|
95
95
|
}
|
|
96
96
|
// @__NO_SIDE_EFFECTS__
|
|
97
|
-
function
|
|
98
|
-
const t = /* @__PURE__ */
|
|
97
|
+
function q(e) {
|
|
98
|
+
const t = /* @__PURE__ */ Z();
|
|
99
99
|
return p(() => (t.value, !!e()));
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const ee = /* @__PURE__ */ Symbol("vueuse-ssr-width");
|
|
102
102
|
// @__NO_SIDE_EFFECTS__
|
|
103
|
-
function
|
|
104
|
-
const e =
|
|
103
|
+
function te() {
|
|
104
|
+
const e = V() ? /* @__PURE__ */ _(ee, null) : null;
|
|
105
105
|
return typeof e == "number" ? e : void 0;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const { window: i =
|
|
109
|
-
|
|
107
|
+
function ne(e, t = {}) {
|
|
108
|
+
const { window: i = W, ssrWidth: n = /* @__PURE__ */ te() } = t, o = /* @__PURE__ */ q(() => i && "matchMedia" in i && typeof i.matchMedia == "function"), r = m(typeof n == "number"), l = m(), d = m(!1), a = (s) => {
|
|
109
|
+
d.value = s.matches;
|
|
110
110
|
};
|
|
111
|
-
return
|
|
111
|
+
return P(() => {
|
|
112
112
|
if (r.value) {
|
|
113
|
-
r.value = !o.value,
|
|
114
|
-
const
|
|
115
|
-
let f = !!(
|
|
116
|
-
return
|
|
113
|
+
r.value = !o.value, d.value = v(e).split(",").some((s) => {
|
|
114
|
+
const u = s.includes("not all"), c = s.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), h = s.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
115
|
+
let f = !!(c || h);
|
|
116
|
+
return c && f && (f = n >= T(c[1])), h && f && (f = n <= T(h[1])), u ? !f : f;
|
|
117
117
|
});
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
o.value && (l.value = i.matchMedia(
|
|
121
|
-
}),
|
|
120
|
+
o.value && (l.value = i.matchMedia(v(e)), d.value = l.value.matches);
|
|
121
|
+
}), g(l, "change", a, { passive: !0 }), p(() => d.value);
|
|
122
122
|
}
|
|
123
123
|
// @__NO_SIDE_EFFECTS__
|
|
124
|
-
function
|
|
125
|
-
const { window: t =
|
|
124
|
+
function ie(e = {}) {
|
|
125
|
+
const { window: t = W, initialWidth: i = Number.POSITIVE_INFINITY, initialHeight: n = Number.POSITIVE_INFINITY, listenOrientation: o = !0, includeScrollbar: r = !0, type: l = "inner" } = e, d = m(i), a = m(n), s = () => {
|
|
126
126
|
if (t) if (l === "outer")
|
|
127
|
-
|
|
127
|
+
d.value = t.outerWidth, a.value = t.outerHeight;
|
|
128
128
|
else if (l === "visual" && t.visualViewport) {
|
|
129
|
-
const { width:
|
|
130
|
-
|
|
131
|
-
} else r ? (
|
|
129
|
+
const { width: c, height: h, scale: f } = t.visualViewport;
|
|
130
|
+
d.value = Math.round(c * f), a.value = Math.round(h * f);
|
|
131
|
+
} else r ? (d.value = t.innerWidth, a.value = t.innerHeight) : (d.value = t.document.documentElement.clientWidth, a.value = t.document.documentElement.clientHeight);
|
|
132
132
|
};
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
return
|
|
136
|
-
width:
|
|
137
|
-
height:
|
|
133
|
+
s(), U(s);
|
|
134
|
+
const u = { passive: !0 };
|
|
135
|
+
return g("resize", s, u), t && l === "visual" && t.visualViewport && g(t.visualViewport, "resize", s, u), o && w(ne("(orientation: portrait)"), () => s()), {
|
|
136
|
+
width: d,
|
|
137
|
+
height: a
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const oe = { style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" } }, x = /* @__PURE__ */ N({
|
|
141
141
|
name: "GScreen",
|
|
142
142
|
inheritAttrs: !1,
|
|
143
143
|
__name: "index",
|
|
144
144
|
props: {
|
|
145
|
-
width: { default:
|
|
146
|
-
height: { default:
|
|
147
|
-
debounceDelay: { default:
|
|
145
|
+
width: { default: 1920 },
|
|
146
|
+
height: { default: 1080 },
|
|
147
|
+
debounceDelay: { default: 166 }
|
|
148
148
|
},
|
|
149
|
-
setup(e) {
|
|
150
|
-
const
|
|
151
|
-
x:
|
|
152
|
-
y:
|
|
153
|
-
})
|
|
154
|
-
const u =
|
|
149
|
+
setup(e, { expose: t }) {
|
|
150
|
+
const i = e, { width: n, height: o } = /* @__PURE__ */ ie(), r = () => ({
|
|
151
|
+
x: n.value / i.width,
|
|
152
|
+
y: o.value / i.height
|
|
153
|
+
}), l = R(r()), d = p(() => {
|
|
154
|
+
const u = l.value.x || 1;
|
|
155
|
+
return Math.max(0.1, Math.min(u, 10));
|
|
156
|
+
}), a = p(() => {
|
|
157
|
+
const u = i.width / i.height, h = n.value / o.value / u;
|
|
158
|
+
return isFinite(h) ? h : 1;
|
|
159
|
+
}), s = p(() => {
|
|
160
|
+
const u = d.value, c = isFinite(100 / u) ? 100 / u : 100;
|
|
155
161
|
return {
|
|
156
|
-
width: `${
|
|
157
|
-
height: `${
|
|
162
|
+
width: `${i.width}px`,
|
|
163
|
+
height: `${c}vh`,
|
|
158
164
|
transform: `scale(${u})`,
|
|
159
|
-
transformOrigin: "0 0"
|
|
165
|
+
transformOrigin: "0 0",
|
|
166
|
+
willChange: "transform"
|
|
160
167
|
};
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
});
|
|
169
|
+
if (M("GScreen_scaleX", d), M("GScreen_yScaleRatio", a), i.debounceDelay > 0) {
|
|
170
|
+
const u = /* @__PURE__ */ Y(() => {
|
|
171
|
+
l.value = r();
|
|
172
|
+
}, i.debounceDelay);
|
|
173
|
+
w([n, o], u);
|
|
174
|
+
} else
|
|
175
|
+
w([n, o], () => {
|
|
176
|
+
l.value = r();
|
|
177
|
+
});
|
|
178
|
+
return t({
|
|
179
|
+
scale: l,
|
|
180
|
+
safeScaleX: d,
|
|
181
|
+
yScaleRatio: a
|
|
182
|
+
}), (u, c) => (G(), $("div", oe, [
|
|
164
183
|
k("div", {
|
|
165
|
-
style: z(
|
|
184
|
+
style: z(s.value)
|
|
166
185
|
}, [
|
|
167
186
|
L(u.$slots, "default")
|
|
168
187
|
], 4)
|
|
169
188
|
]));
|
|
170
189
|
}
|
|
171
190
|
});
|
|
172
|
-
|
|
173
|
-
e.component(
|
|
191
|
+
x.install = (e) => {
|
|
192
|
+
e.component("GScreen", x);
|
|
174
193
|
};
|
|
175
194
|
export {
|
|
176
|
-
|
|
177
|
-
|
|
195
|
+
x as GScreen,
|
|
196
|
+
x as default
|
|
178
197
|
};
|