vuesp-components 2.5.0 → 2.5.2
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/README.md +1 -1
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/CardMain.vue_vue_type_style_index_0_lang-D7HC4Nza.js +795 -0
- package/dist/components/block/data/context.d.ts +0 -4
- package/dist/components/block/data/context.d.ts.map +1 -1
- package/dist/components/block/data/deviceStorage.d.ts +0 -4
- package/dist/components/block/data/deviceStorage.d.ts.map +1 -1
- package/dist/components/block/data/useBlock.d.ts +7 -7
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +4 -4
- package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts +3 -3
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -1
- package/dist/components/index.es.js +1251 -1238
- package/dist/components/script/editor/plugins/autocomplete.d.ts.map +1 -1
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts +1 -1
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts.map +1 -1
- package/dist/components/ui/button/VButton.vue.d.ts.map +1 -1
- package/dist/components/ui/button/types.d.ts +3 -3
- package/dist/components/ui/button/types.d.ts.map +1 -1
- package/dist/components/ui/checkbox/VCheckbox.vue.d.ts.map +1 -1
- package/dist/components/ui/dialog/VDialog.vue.d.ts +6 -2
- package/dist/components/ui/dialog/VDialog.vue.d.ts.map +1 -1
- package/dist/components/ui/dialog/VPopup.vue.d.ts.map +1 -1
- package/dist/components/ui/dialog/types.d.ts +2 -0
- package/dist/components/ui/dialog/types.d.ts.map +1 -1
- package/dist/components/ui/file/VFile.vue.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +2 -2
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/list/types.d.ts +0 -1
- package/dist/components/ui/list/types.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextField.vue.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextWrapper.vue.d.ts.map +1 -0
- package/dist/components/ui/text-field/types.d.ts +30 -2
- package/dist/components/ui/text-field/types.d.ts.map +1 -1
- package/dist/components/ui/text-field/useTextField.d.ts +10 -0
- package/dist/components/ui/text-field/useTextField.d.ts.map +1 -0
- package/dist/components/ui/wifiIcon/VWifiIcon.vue.d.ts.map +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/index.es.js +31 -30
- package/dist/composables/useFocusTrap.d.ts +3 -0
- package/dist/composables/useFocusTrap.d.ts.map +1 -0
- package/dist/dashboard/index.d.ts +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/types.d.ts +1 -2
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/theme.css +159 -42
- package/dist/useDialog-Buvn63AR.js +599 -0
- package/package.json +1 -1
- package/dist/CardMain.vue_vue_type_style_index_0_lang-MxVgTFJ8.js +0 -823
- package/dist/components/ui/text-wrapper/VTextWrapper.vue.d.ts.map +0 -1
- package/dist/components/ui/text-wrapper/types.d.ts +0 -12
- package/dist/components/ui/text-wrapper/types.d.ts.map +0 -1
- package/dist/useDialog-BdpYSys6.js +0 -567
- /package/dist/components/ui/{text-wrapper → text-field}/VTextWrapper.vue.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VTextWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/text-wrapper/VTextWrapper.vue"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,oCAAoC,CAAC;AAkBjG,iBAAS,cAAc;WA6DT,OAAO,IAA6B;;yBAXrB,GAAG;sBACN,GAAG;;;;EAe5B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface IVTextWrapperProps {
|
|
2
|
-
active: boolean;
|
|
3
|
-
label?: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
iconDisabled?: boolean;
|
|
6
|
-
hideIcon?: boolean;
|
|
7
|
-
iconLabel?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface IVTextWrapperEmits {
|
|
10
|
-
(e: 'icon', event: Event): void;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/text-wrapper/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,kBAAkB;IACjC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -1,567 +0,0 @@
|
|
|
1
|
-
import { shallowRef as E, shallowReadonly as U, onMounted as q, nextTick as z, toValue as x, getCurrentScope as Z, onScopeDispose as ee, watch as G, getCurrentInstance as K, hasInjectionContext as V, inject as te, computed as T, reactive as $, watchEffect as ne, unref as oe, toRaw as re, ref as I } from "vue";
|
|
2
|
-
function X(e) {
|
|
3
|
-
return Z() ? (ee(e), !0) : !1;
|
|
4
|
-
}
|
|
5
|
-
const D = /* @__PURE__ */ new WeakMap(), ie = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
|
|
6
|
-
var o;
|
|
7
|
-
const t = e[0], n = (o = K()) == null ? void 0 : o.proxy;
|
|
8
|
-
if (n == null && !V())
|
|
9
|
-
throw new Error("injectLocal must be called in setup");
|
|
10
|
-
return n && D.has(n) && t in D.get(n) ? D.get(n)[t] : te(...e);
|
|
11
|
-
}, _ = typeof window < "u" && typeof document < "u";
|
|
12
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
13
|
-
const se = Object.prototype.toString, ae = (e) => se.call(e) === "[object Object]", C = () => {
|
|
14
|
-
}, ue = /* @__PURE__ */ le();
|
|
15
|
-
function le() {
|
|
16
|
-
var e, o;
|
|
17
|
-
return _ && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((o = window == null ? void 0 : window.navigator) == null ? void 0 : o.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
18
|
-
}
|
|
19
|
-
function ce(e, o) {
|
|
20
|
-
function t(...n) {
|
|
21
|
-
return new Promise((v, s) => {
|
|
22
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(v).catch(s);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
}
|
|
27
|
-
function fe(e, o = {}) {
|
|
28
|
-
let t, n, v = C;
|
|
29
|
-
const s = (r) => {
|
|
30
|
-
clearTimeout(r), v(), v = C;
|
|
31
|
-
};
|
|
32
|
-
let d;
|
|
33
|
-
return (r) => {
|
|
34
|
-
const a = x(e), m = x(o.maxWait);
|
|
35
|
-
return t && s(t), a <= 0 || m !== void 0 && m <= 0 ? (n && (s(n), n = void 0), Promise.resolve(r())) : new Promise((g, y) => {
|
|
36
|
-
v = o.rejectOnCancel ? y : g, d = r, m && !n && (n = setTimeout(() => {
|
|
37
|
-
t && s(t), n = void 0, g(d());
|
|
38
|
-
}, m)), t = setTimeout(() => {
|
|
39
|
-
n && s(n), n = void 0, g(r());
|
|
40
|
-
}, a);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function de(e) {
|
|
45
|
-
let o;
|
|
46
|
-
function t() {
|
|
47
|
-
return o || (o = e()), o;
|
|
48
|
-
}
|
|
49
|
-
return t.reset = async () => {
|
|
50
|
-
const n = o;
|
|
51
|
-
o = void 0, n && await n;
|
|
52
|
-
}, t;
|
|
53
|
-
}
|
|
54
|
-
function me(e, o) {
|
|
55
|
-
var t;
|
|
56
|
-
if (typeof e == "number")
|
|
57
|
-
return e + o;
|
|
58
|
-
const n = ((t = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : t[0]) || "", v = e.slice(n.length), s = Number.parseFloat(n) + o;
|
|
59
|
-
return Number.isNaN(s) ? e : s + v;
|
|
60
|
-
}
|
|
61
|
-
function R(e) {
|
|
62
|
-
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
63
|
-
}
|
|
64
|
-
function F(e) {
|
|
65
|
-
return Array.isArray(e) ? e : [e];
|
|
66
|
-
}
|
|
67
|
-
function ve(e) {
|
|
68
|
-
return K();
|
|
69
|
-
}
|
|
70
|
-
// @__NO_SIDE_EFFECTS__
|
|
71
|
-
function Me(e, o = 200, t = {}) {
|
|
72
|
-
return ce(
|
|
73
|
-
fe(o, t),
|
|
74
|
-
e
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
function pe(e, o = !0, t) {
|
|
78
|
-
ve() ? q(e, t) : o ? e() : z(e);
|
|
79
|
-
}
|
|
80
|
-
function he(e, o, t = {}) {
|
|
81
|
-
const {
|
|
82
|
-
immediate: n = !0,
|
|
83
|
-
immediateCallback: v = !1
|
|
84
|
-
} = t, s = E(!1);
|
|
85
|
-
let d;
|
|
86
|
-
function c() {
|
|
87
|
-
d && (clearTimeout(d), d = void 0);
|
|
88
|
-
}
|
|
89
|
-
function r() {
|
|
90
|
-
s.value = !1, c();
|
|
91
|
-
}
|
|
92
|
-
function a(...m) {
|
|
93
|
-
v && e(), c(), s.value = !0, d = setTimeout(() => {
|
|
94
|
-
s.value = !1, d = void 0, e(...m);
|
|
95
|
-
}, x(o));
|
|
96
|
-
}
|
|
97
|
-
return n && (s.value = !0, _ && a()), X(r), {
|
|
98
|
-
isPending: U(s),
|
|
99
|
-
start: a,
|
|
100
|
-
stop: r
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
function we(e, o, t) {
|
|
104
|
-
return G(
|
|
105
|
-
e,
|
|
106
|
-
o,
|
|
107
|
-
{
|
|
108
|
-
...t,
|
|
109
|
-
immediate: !0
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
const j = _ ? window : void 0, H = _ ? window.navigator : void 0;
|
|
114
|
-
function W(e) {
|
|
115
|
-
var o;
|
|
116
|
-
const t = x(e);
|
|
117
|
-
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
118
|
-
}
|
|
119
|
-
function M(...e) {
|
|
120
|
-
const o = [], t = () => {
|
|
121
|
-
o.forEach((c) => c()), o.length = 0;
|
|
122
|
-
}, n = (c, r, a, m) => (c.addEventListener(r, a, m), () => c.removeEventListener(r, a, m)), v = T(() => {
|
|
123
|
-
const c = F(x(e[0])).filter((r) => r != null);
|
|
124
|
-
return c.every((r) => typeof r != "string") ? c : void 0;
|
|
125
|
-
}), s = we(
|
|
126
|
-
() => {
|
|
127
|
-
var c, r;
|
|
128
|
-
return [
|
|
129
|
-
(r = (c = v.value) == null ? void 0 : c.map((a) => W(a))) != null ? r : [j].filter((a) => a != null),
|
|
130
|
-
F(x(v.value ? e[1] : e[0])),
|
|
131
|
-
F(oe(v.value ? e[2] : e[1])),
|
|
132
|
-
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
133
|
-
x(v.value ? e[3] : e[2])
|
|
134
|
-
];
|
|
135
|
-
},
|
|
136
|
-
([c, r, a, m]) => {
|
|
137
|
-
if (t(), !(c != null && c.length) || !(r != null && r.length) || !(a != null && a.length))
|
|
138
|
-
return;
|
|
139
|
-
const g = ae(m) ? { ...m } : m;
|
|
140
|
-
o.push(
|
|
141
|
-
...c.flatMap(
|
|
142
|
-
(y) => r.flatMap(
|
|
143
|
-
(l) => a.map((f) => n(y, l, f, g))
|
|
144
|
-
)
|
|
145
|
-
)
|
|
146
|
-
);
|
|
147
|
-
},
|
|
148
|
-
{ flush: "post" }
|
|
149
|
-
), d = () => {
|
|
150
|
-
s(), t();
|
|
151
|
-
};
|
|
152
|
-
return X(t), d;
|
|
153
|
-
}
|
|
154
|
-
let Y = !1;
|
|
155
|
-
function Oe(e, o, t = {}) {
|
|
156
|
-
const { window: n = j, ignore: v = [], capture: s = !0, detectIframe: d = !1, controls: c = !1 } = t;
|
|
157
|
-
if (!n)
|
|
158
|
-
return c ? { stop: C, cancel: C, trigger: C } : C;
|
|
159
|
-
if (ue && !Y) {
|
|
160
|
-
Y = !0;
|
|
161
|
-
const i = { passive: !0 };
|
|
162
|
-
Array.from(n.document.body.children).forEach((u) => u.addEventListener("click", C, i)), n.document.documentElement.addEventListener("click", C, i);
|
|
163
|
-
}
|
|
164
|
-
let r = !0;
|
|
165
|
-
const a = (i) => x(v).some((u) => {
|
|
166
|
-
if (typeof u == "string")
|
|
167
|
-
return Array.from(n.document.querySelectorAll(u)).some((p) => p === i.target || i.composedPath().includes(p));
|
|
168
|
-
{
|
|
169
|
-
const p = W(u);
|
|
170
|
-
return p && (i.target === p || i.composedPath().includes(p));
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
function m(i) {
|
|
174
|
-
const u = x(i);
|
|
175
|
-
return u && u.$.subTree.shapeFlag === 16;
|
|
176
|
-
}
|
|
177
|
-
function g(i, u) {
|
|
178
|
-
const p = x(i), w = p.$.subTree && p.$.subTree.children;
|
|
179
|
-
return w == null || !Array.isArray(w) ? !1 : w.some((S) => S.el === u.target || u.composedPath().includes(S.el));
|
|
180
|
-
}
|
|
181
|
-
const y = (i) => {
|
|
182
|
-
const u = W(e);
|
|
183
|
-
if (i.target != null && !(!(u instanceof Element) && m(e) && g(e, i)) && !(!u || u === i.target || i.composedPath().includes(u))) {
|
|
184
|
-
if ("detail" in i && i.detail === 0 && (r = !a(i)), !r) {
|
|
185
|
-
r = !0;
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
o(i);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
let l = !1;
|
|
192
|
-
const f = [
|
|
193
|
-
M(n, "click", (i) => {
|
|
194
|
-
l || (l = !0, setTimeout(() => {
|
|
195
|
-
l = !1;
|
|
196
|
-
}, 0), y(i));
|
|
197
|
-
}, { passive: !0, capture: s }),
|
|
198
|
-
M(n, "pointerdown", (i) => {
|
|
199
|
-
const u = W(e);
|
|
200
|
-
r = !a(i) && !!(u && !i.composedPath().includes(u));
|
|
201
|
-
}, { passive: !0 }),
|
|
202
|
-
d && M(n, "blur", (i) => {
|
|
203
|
-
setTimeout(() => {
|
|
204
|
-
var u;
|
|
205
|
-
const p = W(e);
|
|
206
|
-
((u = n.document.activeElement) == null ? void 0 : u.tagName) === "IFRAME" && !(p != null && p.contains(n.document.activeElement)) && o(i);
|
|
207
|
-
}, 0);
|
|
208
|
-
}, { passive: !0 })
|
|
209
|
-
].filter(Boolean), b = () => f.forEach((i) => i());
|
|
210
|
-
return c ? {
|
|
211
|
-
stop: b,
|
|
212
|
-
cancel: () => {
|
|
213
|
-
r = !1;
|
|
214
|
-
},
|
|
215
|
-
trigger: (i) => {
|
|
216
|
-
r = !0, y(i), r = !1;
|
|
217
|
-
}
|
|
218
|
-
} : b;
|
|
219
|
-
}
|
|
220
|
-
// @__NO_SIDE_EFFECTS__
|
|
221
|
-
function N(e) {
|
|
222
|
-
return T(() => !!e());
|
|
223
|
-
}
|
|
224
|
-
const ye = Symbol("vueuse-ssr-width");
|
|
225
|
-
// @__NO_SIDE_EFFECTS__
|
|
226
|
-
function Q() {
|
|
227
|
-
const e = V() ? /* @__PURE__ */ ie(ye, null) : null;
|
|
228
|
-
return typeof e == "number" ? e : void 0;
|
|
229
|
-
}
|
|
230
|
-
function L(e, o = {}) {
|
|
231
|
-
const { window: t = j, ssrWidth: n = /* @__PURE__ */ Q() } = o, v = /* @__PURE__ */ N(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), s = E(typeof n == "number"), d = E(), c = E(!1), r = (a) => {
|
|
232
|
-
c.value = a.matches;
|
|
233
|
-
};
|
|
234
|
-
return ne(() => {
|
|
235
|
-
if (s.value) {
|
|
236
|
-
s.value = !v.value;
|
|
237
|
-
const a = x(e).split(",");
|
|
238
|
-
c.value = a.some((m) => {
|
|
239
|
-
const g = m.includes("not all"), y = m.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), l = m.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
240
|
-
let f = !!(y || l);
|
|
241
|
-
return y && f && (f = n >= R(y[1])), l && f && (f = n <= R(l[1])), g ? !f : f;
|
|
242
|
-
});
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
v.value && (d.value = t.matchMedia(x(e)), c.value = d.value.matches);
|
|
246
|
-
}), M(d, "change", r, { passive: !0 }), T(() => c.value);
|
|
247
|
-
}
|
|
248
|
-
const ge = {
|
|
249
|
-
sm: 640,
|
|
250
|
-
md: 768,
|
|
251
|
-
lg: 1024,
|
|
252
|
-
xl: 1280,
|
|
253
|
-
"2xl": 1536
|
|
254
|
-
};
|
|
255
|
-
// @__NO_SIDE_EFFECTS__
|
|
256
|
-
function be(e, o = {}) {
|
|
257
|
-
function t(l, f) {
|
|
258
|
-
let b = x(e[x(l)]);
|
|
259
|
-
return f != null && (b = me(b, f)), typeof b == "number" && (b = `${b}px`), b;
|
|
260
|
-
}
|
|
261
|
-
const { window: n = j, strategy: v = "min-width", ssrWidth: s = /* @__PURE__ */ Q() } = o, d = typeof s == "number", c = d ? E(!1) : { value: !0 };
|
|
262
|
-
d && pe(() => c.value = !!n);
|
|
263
|
-
function r(l, f) {
|
|
264
|
-
return !c.value && d ? l === "min" ? s >= R(f) : s <= R(f) : n ? n.matchMedia(`(${l}-width: ${f})`).matches : !1;
|
|
265
|
-
}
|
|
266
|
-
const a = (l) => L(() => `(min-width: ${t(l)})`, o), m = (l) => L(() => `(max-width: ${t(l)})`, o), g = Object.keys(e).reduce((l, f) => (Object.defineProperty(l, f, {
|
|
267
|
-
get: () => v === "min-width" ? a(f) : m(f),
|
|
268
|
-
enumerable: !0,
|
|
269
|
-
configurable: !0
|
|
270
|
-
}), l), {});
|
|
271
|
-
function y() {
|
|
272
|
-
const l = Object.keys(e).map((f) => [f, g[f], R(t(f))]).sort((f, b) => f[2] - b[2]);
|
|
273
|
-
return T(() => l.filter(([, f]) => f.value).map(([f]) => f));
|
|
274
|
-
}
|
|
275
|
-
return Object.assign(g, {
|
|
276
|
-
greaterOrEqual: a,
|
|
277
|
-
smallerOrEqual: m,
|
|
278
|
-
greater(l) {
|
|
279
|
-
return L(() => `(min-width: ${t(l, 0.1)})`, o);
|
|
280
|
-
},
|
|
281
|
-
smaller(l) {
|
|
282
|
-
return L(() => `(max-width: ${t(l, -0.1)})`, o);
|
|
283
|
-
},
|
|
284
|
-
between(l, f) {
|
|
285
|
-
return L(() => `(min-width: ${t(l)}) and (max-width: ${t(f, -0.1)})`, o);
|
|
286
|
-
},
|
|
287
|
-
isGreater(l) {
|
|
288
|
-
return r("min", t(l, 0.1));
|
|
289
|
-
},
|
|
290
|
-
isGreaterOrEqual(l) {
|
|
291
|
-
return r("min", t(l));
|
|
292
|
-
},
|
|
293
|
-
isSmaller(l) {
|
|
294
|
-
return r("max", t(l, -0.1));
|
|
295
|
-
},
|
|
296
|
-
isSmallerOrEqual(l) {
|
|
297
|
-
return r("max", t(l));
|
|
298
|
-
},
|
|
299
|
-
isInBetween(l, f) {
|
|
300
|
-
return r("min", t(l)) && r("max", t(f, -0.1));
|
|
301
|
-
},
|
|
302
|
-
current: y,
|
|
303
|
-
active() {
|
|
304
|
-
const l = y();
|
|
305
|
-
return T(() => l.value.length === 0 ? "" : l.value.at(v === "min-width" ? -1 : 0));
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
// @__NO_SIDE_EFFECTS__
|
|
310
|
-
function B(e, o = {}) {
|
|
311
|
-
const {
|
|
312
|
-
controls: t = !1,
|
|
313
|
-
navigator: n = H
|
|
314
|
-
} = o, v = /* @__PURE__ */ N(() => n && "permissions" in n), s = E(), d = typeof e == "string" ? { name: e } : e, c = E(), r = () => {
|
|
315
|
-
var m, g;
|
|
316
|
-
c.value = (g = (m = s.value) == null ? void 0 : m.state) != null ? g : "prompt";
|
|
317
|
-
};
|
|
318
|
-
M(s, "change", r, { passive: !0 });
|
|
319
|
-
const a = de(async () => {
|
|
320
|
-
if (v.value) {
|
|
321
|
-
if (!s.value)
|
|
322
|
-
try {
|
|
323
|
-
s.value = await n.permissions.query(d);
|
|
324
|
-
} catch {
|
|
325
|
-
s.value = void 0;
|
|
326
|
-
} finally {
|
|
327
|
-
r();
|
|
328
|
-
}
|
|
329
|
-
if (t)
|
|
330
|
-
return re(s.value);
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
return a(), t ? {
|
|
334
|
-
state: c,
|
|
335
|
-
isSupported: v,
|
|
336
|
-
query: a
|
|
337
|
-
} : c;
|
|
338
|
-
}
|
|
339
|
-
function Ce(e = {}) {
|
|
340
|
-
const {
|
|
341
|
-
navigator: o = H,
|
|
342
|
-
read: t = !1,
|
|
343
|
-
source: n,
|
|
344
|
-
copiedDuring: v = 1500,
|
|
345
|
-
legacy: s = !1
|
|
346
|
-
} = e, d = /* @__PURE__ */ N(() => o && "clipboard" in o), c = /* @__PURE__ */ B("clipboard-read"), r = /* @__PURE__ */ B("clipboard-write"), a = T(() => d.value || s), m = E(""), g = E(!1), y = he(() => g.value = !1, v, { immediate: !1 });
|
|
347
|
-
async function l() {
|
|
348
|
-
let p = !(d.value && u(c.value));
|
|
349
|
-
if (!p)
|
|
350
|
-
try {
|
|
351
|
-
m.value = await o.clipboard.readText();
|
|
352
|
-
} catch {
|
|
353
|
-
p = !0;
|
|
354
|
-
}
|
|
355
|
-
p && (m.value = i());
|
|
356
|
-
}
|
|
357
|
-
a.value && t && M(["copy", "cut"], l, { passive: !0 });
|
|
358
|
-
async function f(p = x(n)) {
|
|
359
|
-
if (a.value && p != null) {
|
|
360
|
-
let w = !(d.value && u(r.value));
|
|
361
|
-
if (!w)
|
|
362
|
-
try {
|
|
363
|
-
await o.clipboard.writeText(p);
|
|
364
|
-
} catch {
|
|
365
|
-
w = !0;
|
|
366
|
-
}
|
|
367
|
-
w && b(p), m.value = p, g.value = !0, y.start();
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
function b(p) {
|
|
371
|
-
const w = document.createElement("textarea");
|
|
372
|
-
w.value = p ?? "", w.style.position = "absolute", w.style.opacity = "0", document.body.appendChild(w), w.select(), document.execCommand("copy"), w.remove();
|
|
373
|
-
}
|
|
374
|
-
function i() {
|
|
375
|
-
var p, w, S;
|
|
376
|
-
return (S = (w = (p = document == null ? void 0 : document.getSelection) == null ? void 0 : p.call(document)) == null ? void 0 : w.toString()) != null ? S : "";
|
|
377
|
-
}
|
|
378
|
-
function u(p) {
|
|
379
|
-
return p === "granted" || p === "prompt";
|
|
380
|
-
}
|
|
381
|
-
return {
|
|
382
|
-
isSupported: a,
|
|
383
|
-
text: m,
|
|
384
|
-
copied: g,
|
|
385
|
-
copy: f
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
const Se = {
|
|
389
|
-
ctrl: "control",
|
|
390
|
-
command: "meta",
|
|
391
|
-
cmd: "meta",
|
|
392
|
-
option: "alt",
|
|
393
|
-
up: "arrowup",
|
|
394
|
-
down: "arrowdown",
|
|
395
|
-
left: "arrowleft",
|
|
396
|
-
right: "arrowright"
|
|
397
|
-
};
|
|
398
|
-
function xe(e = {}) {
|
|
399
|
-
const {
|
|
400
|
-
reactive: o = !1,
|
|
401
|
-
target: t = j,
|
|
402
|
-
aliasMap: n = Se,
|
|
403
|
-
passive: v = !0,
|
|
404
|
-
onEventFired: s = C
|
|
405
|
-
} = e, d = $(/* @__PURE__ */ new Set()), c = {
|
|
406
|
-
toJSON() {
|
|
407
|
-
return {};
|
|
408
|
-
},
|
|
409
|
-
current: d
|
|
410
|
-
}, r = o ? $(c) : c, a = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
|
|
411
|
-
function y(i, u) {
|
|
412
|
-
i in r && (o ? r[i] = u : r[i].value = u);
|
|
413
|
-
}
|
|
414
|
-
function l() {
|
|
415
|
-
d.clear();
|
|
416
|
-
for (const i of g)
|
|
417
|
-
y(i, !1);
|
|
418
|
-
}
|
|
419
|
-
function f(i, u) {
|
|
420
|
-
var p, w;
|
|
421
|
-
const S = (p = i.key) == null ? void 0 : p.toLowerCase(), k = [(w = i.code) == null ? void 0 : w.toLowerCase(), S].filter(Boolean);
|
|
422
|
-
S && (u ? d.add(S) : d.delete(S));
|
|
423
|
-
for (const h of k)
|
|
424
|
-
g.add(h), y(h, u);
|
|
425
|
-
if (S === "shift" && !u) {
|
|
426
|
-
const h = Array.from(m), O = h.indexOf("shift");
|
|
427
|
-
h.forEach((P, J) => {
|
|
428
|
-
J >= O && (d.delete(P), y(P, !1));
|
|
429
|
-
}), m.clear();
|
|
430
|
-
} else typeof i.getModifierState == "function" && i.getModifierState("Shift") && u && [...d, ...k].forEach((h) => m.add(h));
|
|
431
|
-
S === "meta" && !u ? (a.forEach((h) => {
|
|
432
|
-
d.delete(h), y(h, !1);
|
|
433
|
-
}), a.clear()) : typeof i.getModifierState == "function" && i.getModifierState("Meta") && u && [...d, ...k].forEach((h) => a.add(h));
|
|
434
|
-
}
|
|
435
|
-
M(t, "keydown", (i) => (f(i, !0), s(i)), { passive: v }), M(t, "keyup", (i) => (f(i, !1), s(i)), { passive: v }), M("blur", l, { passive: v }), M("focus", l, { passive: v });
|
|
436
|
-
const b = new Proxy(
|
|
437
|
-
r,
|
|
438
|
-
{
|
|
439
|
-
get(i, u, p) {
|
|
440
|
-
if (typeof u != "string")
|
|
441
|
-
return Reflect.get(i, u, p);
|
|
442
|
-
if (u = u.toLowerCase(), u in n && (u = n[u]), !(u in r))
|
|
443
|
-
if (/[+_-]/.test(u)) {
|
|
444
|
-
const S = u.split(/[+_-]/g).map((A) => A.trim());
|
|
445
|
-
r[u] = T(() => S.map((A) => x(b[A])).every(Boolean));
|
|
446
|
-
} else
|
|
447
|
-
r[u] = E(!1);
|
|
448
|
-
const w = Reflect.get(i, u, p);
|
|
449
|
-
return o ? x(w) : w;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
);
|
|
453
|
-
return b;
|
|
454
|
-
}
|
|
455
|
-
// @__NO_SIDE_EFFECTS__
|
|
456
|
-
function Pe(e) {
|
|
457
|
-
const o = L("(prefers-reduced-motion: reduce)", e);
|
|
458
|
-
return T(() => o.value ? "reduce" : "no-preference");
|
|
459
|
-
}
|
|
460
|
-
function Ee(e, o = {}) {
|
|
461
|
-
const {
|
|
462
|
-
threshold: t = 50,
|
|
463
|
-
onSwipe: n,
|
|
464
|
-
onSwipeEnd: v,
|
|
465
|
-
onSwipeStart: s,
|
|
466
|
-
passive: d = !0
|
|
467
|
-
} = o, c = $({ x: 0, y: 0 }), r = $({ x: 0, y: 0 }), a = T(() => c.x - r.x), m = T(() => c.y - r.y), { max: g, abs: y } = Math, l = T(() => g(y(a.value), y(m.value)) >= t), f = E(!1), b = T(() => l.value ? y(a.value) > y(m.value) ? a.value > 0 ? "left" : "right" : m.value > 0 ? "up" : "down" : "none"), i = (h) => [h.touches[0].clientX, h.touches[0].clientY], u = (h, O) => {
|
|
468
|
-
c.x = h, c.y = O;
|
|
469
|
-
}, p = (h, O) => {
|
|
470
|
-
r.x = h, r.y = O;
|
|
471
|
-
}, w = { passive: d, capture: !d }, S = (h) => {
|
|
472
|
-
f.value && (v == null || v(h, b.value)), f.value = !1;
|
|
473
|
-
}, A = [
|
|
474
|
-
M(e, "touchstart", (h) => {
|
|
475
|
-
if (h.touches.length !== 1)
|
|
476
|
-
return;
|
|
477
|
-
const [O, P] = i(h);
|
|
478
|
-
u(O, P), p(O, P), s == null || s(h);
|
|
479
|
-
}, w),
|
|
480
|
-
M(e, "touchmove", (h) => {
|
|
481
|
-
if (h.touches.length !== 1)
|
|
482
|
-
return;
|
|
483
|
-
const [O, P] = i(h);
|
|
484
|
-
p(O, P), w.capture && !w.passive && Math.abs(a.value) > Math.abs(m.value) && h.preventDefault(), !f.value && l.value && (f.value = !0), f.value && (n == null || n(h));
|
|
485
|
-
}, w),
|
|
486
|
-
M(e, ["touchend", "touchcancel"], S, w)
|
|
487
|
-
];
|
|
488
|
-
return {
|
|
489
|
-
isSwiping: f,
|
|
490
|
-
direction: b,
|
|
491
|
-
coordsStart: c,
|
|
492
|
-
coordsEnd: r,
|
|
493
|
-
lengthX: a,
|
|
494
|
-
lengthY: m,
|
|
495
|
-
stop: () => A.forEach((h) => h()),
|
|
496
|
-
// TODO: Remove in the next major version
|
|
497
|
-
isPassiveEventSupported: !0
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
const Ae = (e, o, t) => {
|
|
501
|
-
const n = T(() => {
|
|
502
|
-
var a;
|
|
503
|
-
return (a = o.value) == null ? void 0 : a.clientHeight;
|
|
504
|
-
}), v = E("translateY(0)"), s = E(1), d = E(!1);
|
|
505
|
-
if ((/* @__PURE__ */ be(ge)).greaterOrEqual("lg")) {
|
|
506
|
-
const { lengthY: a } = Ee(e, {
|
|
507
|
-
passive: !1,
|
|
508
|
-
onSwipeStart() {
|
|
509
|
-
d.value = !0;
|
|
510
|
-
},
|
|
511
|
-
onSwipe() {
|
|
512
|
-
if (n.value)
|
|
513
|
-
if (a.value < 0) {
|
|
514
|
-
const m = Math.abs(a.value);
|
|
515
|
-
v.value = `translateY(${m}px)`, s.value = 1.1 - m / n.value, s.value < 0.3 && (s.value = 0);
|
|
516
|
-
} else
|
|
517
|
-
v.value = "translateY(0)", s.value = 1;
|
|
518
|
-
},
|
|
519
|
-
onSwipeEnd(m) {
|
|
520
|
-
d.value = !1, a.value < 0 && n.value && Math.abs(a.value) / n.value >= 0.5 ? (s.value = 0, setTimeout(() => {
|
|
521
|
-
t(m);
|
|
522
|
-
}, 100)) : (v.value = "translateY(0)", s.value = 1);
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
return {
|
|
527
|
-
isSwiping: d,
|
|
528
|
-
transform: v,
|
|
529
|
-
opacity: s
|
|
530
|
-
};
|
|
531
|
-
}, Le = (e, o) => {
|
|
532
|
-
const t = I(!1), n = I(!1), v = I(null), s = xe();
|
|
533
|
-
s != null && s.escape && G(s.escape, () => {
|
|
534
|
-
d(new Event("close"));
|
|
535
|
-
});
|
|
536
|
-
const d = (r) => {
|
|
537
|
-
n.value = !1, setTimeout(() => {
|
|
538
|
-
t.value = !1;
|
|
539
|
-
}, 50), setTimeout(() => {
|
|
540
|
-
e("close", r || new Event("close"));
|
|
541
|
-
}, 300), v.value && clearTimeout(v.value);
|
|
542
|
-
}, c = () => e("open", t.value);
|
|
543
|
-
return q(() => {
|
|
544
|
-
setTimeout(() => {
|
|
545
|
-
t.value = !0;
|
|
546
|
-
}, 300), setTimeout(() => {
|
|
547
|
-
n.value = !0;
|
|
548
|
-
}, 500), o && (v.value = setTimeout(() => {
|
|
549
|
-
d();
|
|
550
|
-
}, o * 1e3));
|
|
551
|
-
}), {
|
|
552
|
-
show: t,
|
|
553
|
-
overlay: n,
|
|
554
|
-
onClose: d,
|
|
555
|
-
onOpen: c
|
|
556
|
-
};
|
|
557
|
-
};
|
|
558
|
-
export {
|
|
559
|
-
Ae as a,
|
|
560
|
-
be as b,
|
|
561
|
-
ge as c,
|
|
562
|
-
Me as d,
|
|
563
|
-
Ce as e,
|
|
564
|
-
Pe as f,
|
|
565
|
-
Oe as o,
|
|
566
|
-
Le as u
|
|
567
|
-
};
|
|
File without changes
|