geekin-devtoys 0.1.9 → 0.1.10

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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),I=require("../_plugin-vue_export-helper-BHFhmbuH.js"),p=new WeakMap,V=(...e)=>{var t;const i=e[0],n=(t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy,u=n??o.getCurrentScope();if(u==null&&!o.hasInjectionContext())throw new Error("injectLocal must be called in setup");return u&&p.has(u)&&i in p.get(u)?p.get(u)[i]:o.inject(...e)},W=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const M=Object.prototype.toString,T=e=>M.call(e)==="[object Object]",y=()=>{};function x(e,t){function i(...n){return new Promise((u,r)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(u).catch(r)})}return i}function E(e,t={}){let i,n,u=y;const r=a=>{clearTimeout(a),u(),u=y};let l;return a=>{const c=o.toValue(e),f=o.toValue(t.maxWait);return i&&r(i),c<=0||f!==void 0&&f<=0?(n&&(r(n),n=void 0),Promise.resolve(a())):new Promise((d,m)=>{u=t.rejectOnCancel?m:d,l=a,f&&!n&&(n=setTimeout(()=>{i&&r(i),n=void 0,d(l())},f)),i=setTimeout(()=>{n&&r(n),n=void 0,d(a())},c)})}}function S(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function w(e){return Array.isArray(e)?e:[e]}function j(e){return o.getCurrentInstance()}function C(e,t=200,i={}){return x(E(t,i),e)}function N(e,t=!0,i){j()?o.onMounted(e,i):t?e():o.nextTick(e)}function _(e,t,i){return o.watch(e,t,{...i,immediate:!0})}const g=W?window:void 0;function O(e){var t;const i=o.toValue(e);return(t=i?.$el)!==null&&t!==void 0?t:i}function b(...e){const t=(n,u,r,l)=>(n.addEventListener(u,r,l),()=>n.removeEventListener(u,r,l)),i=o.computed(()=>{const n=w(o.toValue(e[0])).filter(u=>u!=null);return n.every(u=>typeof u!="string")?n:void 0});return _(()=>{var n,u;return[(n=(u=i.value)===null||u===void 0?void 0:u.map(r=>O(r)))!==null&&n!==void 0?n:[g].filter(r=>r!=null),w(o.toValue(i.value?e[1]:e[0])),w(o.unref(i.value?e[2]:e[1])),o.toValue(i.value?e[3]:e[2])]},([n,u,r,l],s,a)=>{if(!n?.length||!u?.length||!r?.length)return;const c=T(l)?{...l}:l,f=n.flatMap(d=>u.flatMap(m=>r.map(h=>t(d,m,h,c))));a(()=>{f.forEach(d=>d())})},{flush:"post"})}function P(){const e=o.shallowRef(!1),t=o.getCurrentInstance();return t&&o.onMounted(()=>{e.value=!0},t),e}function R(e){const t=P();return o.computed(()=>(t.value,!!e()))}const $=Symbol("vueuse-ssr-width");function F(){const e=o.hasInjectionContext()?V($,null):null;return typeof e=="number"?e:void 0}function k(e,t={}){const{window:i=g,ssrWidth:n=F()}=t,u=R(()=>i&&"matchMedia"in i&&typeof i.matchMedia=="function"),r=o.shallowRef(typeof n=="number"),l=o.shallowRef(),s=o.shallowRef(!1),a=c=>{s.value=c.matches};return o.watchEffect(()=>{if(r.value){r.value=!u.value,s.value=o.toValue(e).split(",").some(c=>{const f=c.includes("not all"),d=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),m=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let h=!!(d||m);return d&&h&&(h=n>=S(d[1])),m&&h&&(h=n<=S(m[1])),f?!h:h});return}u.value&&(l.value=i.matchMedia(o.toValue(e)),s.value=l.value.matches)}),b(l,"change",a,{passive:!0}),o.computed(()=>s.value)}function z(e={}){const{window:t=g,initialWidth:i=Number.POSITIVE_INFINITY,initialHeight:n=Number.POSITIVE_INFINITY,listenOrientation:u=!0,includeScrollbar:r=!0,type:l="inner"}=e,s=o.shallowRef(i),a=o.shallowRef(n),c=()=>{if(t)if(l==="outer")s.value=t.outerWidth,a.value=t.outerHeight;else if(l==="visual"&&t.visualViewport){const{width:d,height:m,scale:h}=t.visualViewport;s.value=Math.round(d*h),a.value=Math.round(m*h)}else r?(s.value=t.innerWidth,a.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight)};c(),N(c);const f={passive:!0};return b("resize",c,f),t&&l==="visual"&&t.visualViewport&&b(t.visualViewport,"resize",c,f),u&&o.watch(k("(orientation: portrait)"),()=>c()),{width:s,height:a}}const H={class:"g-screen-container"},L=o.defineComponent({name:"GScreen",inheritAttrs:!1,__name:"index",props:{width:{default:()=>"1920"},height:{default:()=>"1080"},debounceDelay:{default:()=>"166"}},setup(e){const t=e,{width:i,height:n}=z(),u=()=>({x:i.value/Number(t.width),y:n.value/Number(t.height)}),r=o.computed(u),l=o.computed(()=>({width:`${t.width}px`,height:`${100/r.value.x}vh`,transform:`scale(${r.value.x})`,transformOrigin:"0 0"})),s=C(()=>{},Number(t.debounceDelay));return o.watch([i,n],s,{deep:!0}),(a,c)=>(o.openBlock(),o.createElementBlock("div",H,[o.createElementVNode("div",{style:o.normalizeStyle(l.value)},[o.renderSlot(a.$slots,"default",{},void 0,!0)],4)]))}}),v=I._export_sfc(L,[["__scopeId","data-v-01f611a2"]]);v.install=e=>{e.component(v.name,v)};exports.GScreen=v;exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),p=new WeakMap,W=(...e)=>{var t;const i=e[0],n=(t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy,u=n??o.getCurrentScope();if(u==null&&!o.hasInjectionContext())throw new Error("injectLocal must be called in setup");return u&&p.has(u)&&i in p.get(u)?p.get(u)[i]:o.inject(...e)},I=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const M=Object.prototype.toString,V=e=>M.call(e)==="[object Object]",g=()=>{};function T(e,t){function i(...n){return new Promise((u,r)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(u).catch(r)})}return i}function E(e,t={}){let i,n,u=g;const r=l=>{clearTimeout(l),u(),u=g};let a;return l=>{const c=o.toValue(e),h=o.toValue(t.maxWait);return i&&r(i),c<=0||h!==void 0&&h<=0?(n&&(r(n),n=void 0),Promise.resolve(l())):new Promise((d,m)=>{u=t.rejectOnCancel?m:d,a=l,h&&!n&&(n=setTimeout(()=>{i&&r(i),n=void 0,d(a())},h)),i=setTimeout(()=>{n&&r(n),n=void 0,d(l())},c)})}}function S(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function w(e){return Array.isArray(e)?e:[e]}function j(e){return o.getCurrentInstance()}function x(e,t=200,i={}){return T(E(t,i),e)}function C(e,t=!0,i){j()?o.onMounted(e,i):t?e():o.nextTick(e)}function N(e,t,i){return o.watch(e,t,{...i,immediate:!0})}const y=I?window:void 0;function O(e){var t;const i=o.toValue(e);return(t=i?.$el)!==null&&t!==void 0?t:i}function b(...e){const t=(n,u,r,a)=>(n.addEventListener(u,r,a),()=>n.removeEventListener(u,r,a)),i=o.computed(()=>{const n=w(o.toValue(e[0])).filter(u=>u!=null);return n.every(u=>typeof u!="string")?n:void 0});return N(()=>{var n,u;return[(n=(u=i.value)===null||u===void 0?void 0:u.map(r=>O(r)))!==null&&n!==void 0?n:[y].filter(r=>r!=null),w(o.toValue(i.value?e[1]:e[0])),w(o.unref(i.value?e[2]:e[1])),o.toValue(i.value?e[3]:e[2])]},([n,u,r,a],s,l)=>{if(!n?.length||!u?.length||!r?.length)return;const c=V(a)?{...a}:a,h=n.flatMap(d=>u.flatMap(m=>r.map(f=>t(d,m,f,c))));l(()=>{h.forEach(d=>d())})},{flush:"post"})}function P(){const e=o.shallowRef(!1),t=o.getCurrentInstance();return t&&o.onMounted(()=>{e.value=!0},t),e}function R(e){const t=P();return o.computed(()=>(t.value,!!e()))}const $=Symbol("vueuse-ssr-width");function F(){const e=o.hasInjectionContext()?W($,null):null;return typeof e=="number"?e:void 0}function k(e,t={}){const{window:i=y,ssrWidth:n=F()}=t,u=R(()=>i&&"matchMedia"in i&&typeof i.matchMedia=="function"),r=o.shallowRef(typeof n=="number"),a=o.shallowRef(),s=o.shallowRef(!1),l=c=>{s.value=c.matches};return o.watchEffect(()=>{if(r.value){r.value=!u.value,s.value=o.toValue(e).split(",").some(c=>{const h=c.includes("not all"),d=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),m=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let f=!!(d||m);return d&&f&&(f=n>=S(d[1])),m&&f&&(f=n<=S(m[1])),h?!f:f});return}u.value&&(a.value=i.matchMedia(o.toValue(e)),s.value=a.value.matches)}),b(a,"change",l,{passive:!0}),o.computed(()=>s.value)}function z(e={}){const{window:t=y,initialWidth:i=Number.POSITIVE_INFINITY,initialHeight:n=Number.POSITIVE_INFINITY,listenOrientation:u=!0,includeScrollbar:r=!0,type:a="inner"}=e,s=o.shallowRef(i),l=o.shallowRef(n),c=()=>{if(t)if(a==="outer")s.value=t.outerWidth,l.value=t.outerHeight;else if(a==="visual"&&t.visualViewport){const{width:d,height:m,scale:f}=t.visualViewport;s.value=Math.round(d*f),l.value=Math.round(m*f)}else r?(s.value=t.innerWidth,l.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight)};c(),C(c);const h={passive:!0};return b("resize",c,h),t&&a==="visual"&&t.visualViewport&&b(t.visualViewport,"resize",c,h),u&&o.watch(k("(orientation: portrait)"),()=>c()),{width:s,height:l}}const L={style:{position:"relative",width:"100%",height:"100%"}},v=o.defineComponent({name:"GScreen",inheritAttrs:!1,__name:"index",props:{width:{default:()=>"1920"},height:{default:()=>"1080"},debounceDelay:{default:()=>"166"}},setup(e){const t=e,{width:i,height:n}=z(),u=()=>({x:i.value/Number(t.width),y:n.value/Number(t.height)}),r=o.computed(u),a=o.computed(()=>{const l=r.value.x||1;return{width:`${t.width}px`,height:`${100/l}vh`,transform:`scale(${l})`,transformOrigin:"0 0"}}),s=x(()=>{},Number(t.debounceDelay));return o.watch([i,n],s,{deep:!0}),(l,c)=>(o.openBlock(),o.createElementBlock("div",L,[o.createElementVNode("div",{style:o.normalizeStyle(a.value)},[o.renderSlot(l.$slots,"default")],4)]))}});v.install=e=>{e.component(v.name,v)};exports.GScreen=v;exports.default=v;
@@ -1,9 +1,8 @@
1
- import { onMounted as x, nextTick as N, getCurrentInstance as g, watch as W, getCurrentScope as V, hasInjectionContext as E, inject as j, toValue as h, shallowRef as v, computed as p, watchEffect as O, unref as P, defineComponent as C, createElementBlock as _, openBlock as $, createElementVNode as F, normalizeStyle as k, renderSlot as z } from "vue";
2
- import { _ as L } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
1
+ import { onMounted as E, nextTick as N, getCurrentInstance as g, watch as W, getCurrentScope as V, hasInjectionContext as x, inject as j, toValue as m, shallowRef as v, computed as p, watchEffect as O, unref as P, defineComponent as C, createElementBlock as $, openBlock as F, createElementVNode as k, normalizeStyle as z, renderSlot as L } from "vue";
3
2
  const w = /* @__PURE__ */ new WeakMap(), A = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
4
3
  var t;
5
4
  const i = e[0], n = (t = g()) === null || t === void 0 ? void 0 : t.proxy, o = n ?? V();
6
- if (o == null && !E()) throw new Error("injectLocal must be called in setup");
5
+ if (o == null && !x()) throw new Error("injectLocal must be called in setup");
7
6
  return o && w.has(o) && i in w.get(o) ? w.get(o)[i] : j(...e);
8
7
  }, H = typeof window < "u" && typeof document < "u";
9
8
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -21,19 +20,19 @@ function G(e, t) {
21
20
  }
22
21
  return i;
23
22
  }
24
- function R(e, t = {}) {
23
+ function _(e, t = {}) {
25
24
  let i, n, o = M;
26
- const r = (l) => {
27
- clearTimeout(l), o(), o = M;
25
+ const r = (u) => {
26
+ clearTimeout(u), o(), o = M;
28
27
  };
29
- let u;
30
- return (l) => {
31
- const a = h(e), d = h(t.maxWait);
32
- return i && r(i), a <= 0 || d !== void 0 && d <= 0 ? (n && (r(n), n = void 0), Promise.resolve(l())) : new Promise((s, m) => {
33
- o = t.rejectOnCancel ? m : s, u = l, d && !n && (n = setTimeout(() => {
34
- i && r(i), n = void 0, s(u());
28
+ let l;
29
+ return (u) => {
30
+ const a = m(e), d = m(t.maxWait);
31
+ return i && r(i), a <= 0 || d !== void 0 && d <= 0 ? (n && (r(n), n = void 0), Promise.resolve(u())) : new Promise((s, h) => {
32
+ o = t.rejectOnCancel ? h : s, l = u, d && !n && (n = setTimeout(() => {
33
+ i && r(i), n = void 0, s(l());
35
34
  }, d)), i = setTimeout(() => {
36
- n && r(n), n = void 0, s(l());
35
+ n && r(n), n = void 0, s(u());
37
36
  }, a);
38
37
  });
39
38
  };
@@ -41,104 +40,104 @@ function R(e, t = {}) {
41
40
  function T(e) {
42
41
  return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
43
42
  }
44
- function b(e) {
43
+ function y(e) {
45
44
  return Array.isArray(e) ? e : [e];
46
45
  }
47
- function Q(e) {
46
+ function R(e) {
48
47
  return g();
49
48
  }
50
49
  // @__NO_SIDE_EFFECTS__
51
- function Y(e, t = 200, i = {}) {
52
- return G(R(t, i), e);
50
+ function Q(e, t = 200, i = {}) {
51
+ return G(_(t, i), e);
53
52
  }
54
- function U(e, t = !0, i) {
55
- Q() ? x(e, i) : t ? e() : N(e);
53
+ function Y(e, t = !0, i) {
54
+ R() ? E(e, i) : t ? e() : N(e);
56
55
  }
57
- function J(e, t, i) {
56
+ function U(e, t, i) {
58
57
  return W(e, t, {
59
58
  ...i,
60
59
  immediate: !0
61
60
  });
62
61
  }
63
62
  const I = H ? window : void 0;
64
- function K(e) {
63
+ function X(e) {
65
64
  var t;
66
- const i = h(e);
65
+ const i = m(e);
67
66
  return (t = i?.$el) !== null && t !== void 0 ? t : i;
68
67
  }
69
68
  function S(...e) {
70
- const t = (n, o, r, u) => (n.addEventListener(o, r, u), () => n.removeEventListener(o, r, u)), i = p(() => {
71
- const n = b(h(e[0])).filter((o) => o != null);
69
+ const t = (n, o, r, l) => (n.addEventListener(o, r, l), () => n.removeEventListener(o, r, l)), i = p(() => {
70
+ const n = y(m(e[0])).filter((o) => o != null);
72
71
  return n.every((o) => typeof o != "string") ? n : void 0;
73
72
  });
74
- return J(() => {
73
+ return U(() => {
75
74
  var n, o;
76
75
  return [
77
- (n = (o = i.value) === null || o === void 0 ? void 0 : o.map((r) => K(r))) !== null && n !== void 0 ? n : [I].filter((r) => r != null),
78
- b(h(i.value ? e[1] : e[0])),
79
- b(P(i.value ? e[2] : e[1])),
80
- h(i.value ? e[3] : e[2])
76
+ (n = (o = i.value) === null || o === void 0 ? void 0 : o.map((r) => X(r))) !== null && n !== void 0 ? n : [I].filter((r) => r != null),
77
+ y(m(i.value ? e[1] : e[0])),
78
+ y(P(i.value ? e[2] : e[1])),
79
+ m(i.value ? e[3] : e[2])
81
80
  ];
82
- }, ([n, o, r, u], c, l) => {
81
+ }, ([n, o, r, l], c, u) => {
83
82
  if (!n?.length || !o?.length || !r?.length) return;
84
- const a = D(u) ? { ...u } : u, d = n.flatMap((s) => o.flatMap((m) => r.map((f) => t(s, m, f, a))));
85
- l(() => {
83
+ const a = D(l) ? { ...l } : l, d = n.flatMap((s) => o.flatMap((h) => r.map((f) => t(s, h, f, a))));
84
+ u(() => {
86
85
  d.forEach((s) => s());
87
86
  });
88
87
  }, { flush: "post" });
89
88
  }
90
89
  // @__NO_SIDE_EFFECTS__
91
- function X() {
90
+ function J() {
92
91
  const e = v(!1), t = g();
93
- return t && x(() => {
92
+ return t && E(() => {
94
93
  e.value = !0;
95
94
  }, t), e;
96
95
  }
97
96
  // @__NO_SIDE_EFFECTS__
98
- function Z(e) {
99
- const t = /* @__PURE__ */ X();
97
+ function K(e) {
98
+ const t = /* @__PURE__ */ J();
100
99
  return p(() => (t.value, !!e()));
101
100
  }
102
- const q = /* @__PURE__ */ Symbol("vueuse-ssr-width");
101
+ const Z = /* @__PURE__ */ Symbol("vueuse-ssr-width");
103
102
  // @__NO_SIDE_EFFECTS__
104
- function ee() {
105
- const e = E() ? /* @__PURE__ */ A(q, null) : null;
103
+ function q() {
104
+ const e = x() ? /* @__PURE__ */ A(Z, null) : null;
106
105
  return typeof e == "number" ? e : void 0;
107
106
  }
108
- function te(e, t = {}) {
109
- const { window: i = I, ssrWidth: n = /* @__PURE__ */ ee() } = t, o = /* @__PURE__ */ Z(() => i && "matchMedia" in i && typeof i.matchMedia == "function"), r = v(typeof n == "number"), u = v(), c = v(!1), l = (a) => {
107
+ function ee(e, t = {}) {
108
+ const { window: i = I, ssrWidth: n = /* @__PURE__ */ q() } = t, o = /* @__PURE__ */ K(() => i && "matchMedia" in i && typeof i.matchMedia == "function"), r = v(typeof n == "number"), l = v(), c = v(!1), u = (a) => {
110
109
  c.value = a.matches;
111
110
  };
112
111
  return O(() => {
113
112
  if (r.value) {
114
- r.value = !o.value, c.value = h(e).split(",").some((a) => {
115
- const d = a.includes("not all"), s = a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), m = a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
116
- let f = !!(s || m);
117
- return s && f && (f = n >= T(s[1])), m && f && (f = n <= T(m[1])), d ? !f : f;
113
+ r.value = !o.value, c.value = m(e).split(",").some((a) => {
114
+ const d = a.includes("not all"), s = a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), h = a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
115
+ let f = !!(s || h);
116
+ return s && f && (f = n >= T(s[1])), h && f && (f = n <= T(h[1])), d ? !f : f;
118
117
  });
119
118
  return;
120
119
  }
121
- o.value && (u.value = i.matchMedia(h(e)), c.value = u.value.matches);
122
- }), S(u, "change", l, { passive: !0 }), p(() => c.value);
120
+ o.value && (l.value = i.matchMedia(m(e)), c.value = l.value.matches);
121
+ }), S(l, "change", u, { passive: !0 }), p(() => c.value);
123
122
  }
124
123
  // @__NO_SIDE_EFFECTS__
125
- function ne(e = {}) {
126
- const { window: t = I, initialWidth: i = Number.POSITIVE_INFINITY, initialHeight: n = Number.POSITIVE_INFINITY, listenOrientation: o = !0, includeScrollbar: r = !0, type: u = "inner" } = e, c = v(i), l = v(n), a = () => {
127
- if (t) if (u === "outer")
128
- c.value = t.outerWidth, l.value = t.outerHeight;
129
- else if (u === "visual" && t.visualViewport) {
130
- const { width: s, height: m, scale: f } = t.visualViewport;
131
- c.value = Math.round(s * f), l.value = Math.round(m * f);
132
- } else r ? (c.value = t.innerWidth, l.value = t.innerHeight) : (c.value = t.document.documentElement.clientWidth, l.value = t.document.documentElement.clientHeight);
124
+ function te(e = {}) {
125
+ const { window: t = I, initialWidth: i = Number.POSITIVE_INFINITY, initialHeight: n = Number.POSITIVE_INFINITY, listenOrientation: o = !0, includeScrollbar: r = !0, type: l = "inner" } = e, c = v(i), u = v(n), a = () => {
126
+ if (t) if (l === "outer")
127
+ c.value = t.outerWidth, u.value = t.outerHeight;
128
+ else if (l === "visual" && t.visualViewport) {
129
+ const { width: s, height: h, scale: f } = t.visualViewport;
130
+ c.value = Math.round(s * f), u.value = Math.round(h * f);
131
+ } else r ? (c.value = t.innerWidth, u.value = t.innerHeight) : (c.value = t.document.documentElement.clientWidth, u.value = t.document.documentElement.clientHeight);
133
132
  };
134
- a(), U(a);
133
+ a(), Y(a);
135
134
  const d = { passive: !0 };
136
- return S("resize", a, d), t && u === "visual" && t.visualViewport && S(t.visualViewport, "resize", a, d), o && W(te("(orientation: portrait)"), () => a()), {
135
+ return S("resize", a, d), t && l === "visual" && t.visualViewport && S(t.visualViewport, "resize", a, d), o && W(ee("(orientation: portrait)"), () => a()), {
137
136
  width: c,
138
- height: l
137
+ height: u
139
138
  };
140
139
  }
141
- const ie = { class: "g-screen-container" }, oe = /* @__PURE__ */ C({
140
+ const ne = { style: { position: "relative", width: "100%", height: "100%" } }, b = /* @__PURE__ */ C({
142
141
  name: "GScreen",
143
142
  inheritAttrs: !1,
144
143
  __name: "index",
@@ -148,29 +147,32 @@ const ie = { class: "g-screen-container" }, oe = /* @__PURE__ */ C({
148
147
  debounceDelay: { default: () => "166" }
149
148
  },
150
149
  setup(e) {
151
- const t = e, { width: i, height: n } = /* @__PURE__ */ ne(), r = p(() => ({
150
+ const t = e, { width: i, height: n } = /* @__PURE__ */ te(), r = p(() => ({
152
151
  x: i.value / Number(t.width),
153
152
  y: n.value / Number(t.height)
154
- })), u = p(() => ({
155
- width: `${t.width}px`,
156
- height: `${100 / r.value.x}vh`,
157
- transform: `scale(${r.value.x})`,
158
- transformOrigin: "0 0"
159
- })), c = /* @__PURE__ */ Y(() => {
153
+ })), l = p(() => {
154
+ const u = r.value.x || 1;
155
+ return {
156
+ width: `${t.width}px`,
157
+ height: `${100 / u}vh`,
158
+ transform: `scale(${u})`,
159
+ transformOrigin: "0 0"
160
+ };
161
+ }), c = /* @__PURE__ */ Q(() => {
160
162
  }, Number(t.debounceDelay));
161
- return W([i, n], c, { deep: !0 }), (l, a) => ($(), _("div", ie, [
162
- F("div", {
163
- style: k(u.value)
163
+ return W([i, n], c, { deep: !0 }), (u, a) => (F(), $("div", ne, [
164
+ k("div", {
165
+ style: z(l.value)
164
166
  }, [
165
- z(l.$slots, "default", {}, void 0, !0)
167
+ L(u.$slots, "default")
166
168
  ], 4)
167
169
  ]));
168
170
  }
169
- }), y = /* @__PURE__ */ L(oe, [["__scopeId", "data-v-01f611a2"]]);
170
- y.install = (e) => {
171
- e.component(y.name, y);
171
+ });
172
+ b.install = (e) => {
173
+ e.component(b.name, b);
172
174
  };
173
175
  export {
174
- y as GScreen,
175
- y as default
176
+ b as GScreen,
177
+ b as default
176
178
  };
@@ -1,37 +1,37 @@
1
1
  import n from "../GCount/index.mjs";
2
2
  import e from "../GPercent/index.mjs";
3
3
  import i from "../GDialog/index.mjs";
4
- import p from "../GTable/index.mjs";
5
- import c from "../GVideo/index.mjs";
4
+ import c from "../GTable/index.mjs";
5
+ import s from "../GVideo/index.mjs";
6
6
  import f from "../GBubble/index.mjs";
7
- import s from "../GProgress/index.mjs";
8
- import G from "../GScreen/index.mjs";
9
- import a from "../GPluginVideo/index.mjs";
7
+ import p from "../GProgress/index.mjs";
8
+ import a from "../GScreen/index.mjs";
9
+ import G from "../GPluginVideo/index.mjs";
10
10
  const r = {
11
11
  GCount: n,
12
12
  GPercent: e,
13
13
  GDialog: i,
14
- GTable: p,
15
- GVideo: c,
14
+ GTable: c,
15
+ GVideo: s,
16
16
  GBubble: f,
17
- GProgress: s,
18
- GScreen: G,
19
- GPluginVideo: a
17
+ GProgress: p,
18
+ GScreen: a,
19
+ GPluginVideo: G
20
20
  }, l = (m) => {
21
21
  Object.keys(r).forEach((t) => {
22
22
  const o = r[t];
23
23
  m.component(o.name, o);
24
24
  });
25
- }, h = { install: l };
25
+ }, V = { install: l };
26
26
  export {
27
27
  f as GBubble,
28
28
  n as GCount,
29
29
  i as GDialog,
30
30
  e as GPercent,
31
- a as GPluginVideo,
32
- s as GProgress,
33
- G as GScreen,
34
- p as GTable,
35
- c as GVideo,
36
- h as default
31
+ G as GPluginVideo,
32
+ p as GProgress,
33
+ a as GScreen,
34
+ c as GTable,
35
+ s as GVideo,
36
+ V as default
37
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geekin-devtoys",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "author": "leon",
5
5
  "license": "MIT",
6
6
  "description": "geekin-devtoys组件库",
@@ -1 +0,0 @@
1
- .g-screen-container[data-v-01f611a2]{width:100%;height:100%;position:relative}