vuesp-components 2.1.4 → 2.1.6
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/components/block/index.d.ts +5 -1
- package/dist/components/block/index.d.ts.map +1 -1
- package/dist/components/block/scan/BlockScan.vue.d.ts +11 -0
- package/dist/components/block/scan/BlockScan.vue.d.ts.map +1 -0
- package/dist/components/block/scan/types.d.ts +9 -0
- package/dist/components/block/scan/types.d.ts.map +1 -0
- package/dist/components/block/service/BlockService.vue.d.ts +13 -0
- package/dist/components/block/service/BlockService.vue.d.ts.map +1 -0
- package/dist/components/block/service/types.d.ts +10 -0
- package/dist/components/block/service/types.d.ts.map +1 -0
- package/dist/components/block/status/BlockStatus.vue.d.ts +34 -0
- package/dist/components/block/status/BlockStatus.vue.d.ts.map +1 -0
- package/dist/components/block/status/types.d.ts +5 -0
- package/dist/components/block/status/types.d.ts.map +1 -0
- package/dist/components/block/update/BlockUpdate.vue.d.ts +24 -0
- package/dist/components/block/update/BlockUpdate.vue.d.ts.map +1 -0
- package/dist/components/block/update/types.d.ts +4 -0
- package/dist/components/block/update/types.d.ts.map +1 -0
- package/dist/components/dashboard/cards/CardBase.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardBase.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardButton.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardButton.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardInfo.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardInfo.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardInput.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardInput.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardList.vue.d.ts +2 -0
- package/dist/components/dashboard/cards/CardList.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/types.d.ts +1 -1
- package/dist/components/dashboard/cards/types.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemEdit.vue.d.ts +1 -1
- package/dist/components/dashboard/edit/ItemEdit.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/types.d.ts +5 -4
- package/dist/components/dashboard/edit/types.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/script/editor/ScriptEditor.vue.d.ts +8 -0
- package/dist/components/script/editor/ScriptEditor.vue.d.ts.map +1 -0
- package/dist/components/script/editor/format.d.ts +3 -0
- package/dist/components/script/editor/format.d.ts.map +1 -0
- package/dist/components/script/editor/highlighters/index.d.ts +2 -0
- package/dist/components/script/editor/highlighters/index.d.ts.map +1 -0
- package/dist/components/script/editor/plugins/autoSemicolon.d.ts +3 -0
- package/dist/components/script/editor/plugins/autoSemicolon.d.ts.map +1 -0
- package/dist/components/script/editor/plugins/autocomplete.d.ts +4 -0
- package/dist/components/script/editor/plugins/autocomplete.d.ts.map +1 -0
- package/dist/components/script/editor/plugins/index.d.ts +3 -0
- package/dist/components/script/editor/plugins/index.d.ts.map +1 -0
- package/dist/components/script/editor/plugins/render/index.d.ts +7 -0
- package/dist/components/script/editor/plugins/render/index.d.ts.map +1 -0
- package/dist/components/script/editor/plugins/suggestions.d.ts +3 -0
- package/dist/components/script/editor/plugins/suggestions.d.ts.map +1 -0
- package/dist/components/script/editor/plugins/types.d.ts +24 -0
- package/dist/components/script/editor/plugins/types.d.ts.map +1 -0
- package/dist/components/script/editor/types.d.ts +9 -0
- package/dist/components/script/editor/types.d.ts.map +1 -0
- package/dist/components/script/index.d.ts +4 -0
- package/dist/components/script/index.d.ts.map +1 -0
- package/dist/components/script/types.d.ts +4 -0
- package/dist/components/script/types.d.ts.map +1 -0
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts +13 -0
- package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts.map +1 -0
- package/dist/components/script/viewDocs/types.d.ts +4 -0
- package/dist/components/script/viewDocs/types.d.ts.map +1 -0
- package/dist/components/types.d.ts +2 -0
- package/dist/components/types.d.ts.map +1 -0
- package/dist/components/ui/autocomplete/VAutocomplete.vue.d.ts +17 -20
- package/dist/components/ui/autocomplete/VAutocomplete.vue.d.ts.map +1 -1
- package/dist/components/ui/autocomplete/types.d.ts +4 -4
- package/dist/components/ui/autocomplete/types.d.ts.map +1 -1
- package/dist/components/ui/dialog/VDialog.vue.d.ts.map +1 -1
- package/dist/components/ui/drag-drop/VDragDrop.vue.d.ts.map +1 -1
- package/dist/components/ui/list/VListObject.vue.d.ts.map +1 -1
- package/dist/components/ui/select/VSelect.vue.d.ts +0 -1
- package/dist/components/ui/select/VSelect.vue.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextField.vue.d.ts.map +1 -1
- package/dist/composables/index.es.js +1 -1
- package/dist/dashboard/types.d.ts +1 -1
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/helpers/general.d.ts +1 -0
- package/dist/helpers/general.d.ts.map +1 -1
- package/dist/helpers/index.es.js +17 -16
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +2383 -1451
- package/dist/style.css +1 -1
- package/dist/types/components.d.ts +3 -2
- package/dist/types/components.d.ts.map +1 -1
- package/dist/useSwipeDown-CZyt34x6.js +575 -0
- package/package.json +5 -4
- package/dist/useSwipeDown-BHSNKbwG.js +0 -446
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { watch as N, shallowRef as E, shallowReadonly as U, onMounted as G, nextTick as z, toValue as x, getCurrentScope as Z, onScopeDispose as ee, getCurrentInstance as K, hasInjectionContext as V, inject as te, computed as M, 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((f, s) => {
|
|
22
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(f).catch(s);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
function fe(e, o = {}) {
|
|
28
|
+
let t, n, f = C;
|
|
29
|
+
const s = (r) => {
|
|
30
|
+
clearTimeout(r), f(), f = C;
|
|
31
|
+
};
|
|
32
|
+
let c;
|
|
33
|
+
return (r) => {
|
|
34
|
+
const a = x(e), v = x(o.maxWait);
|
|
35
|
+
return t && s(t), a <= 0 || v !== void 0 && v <= 0 ? (n && (s(n), n = void 0), Promise.resolve(r())) : new Promise((g, y) => {
|
|
36
|
+
f = o.rejectOnCancel ? y : g, c = r, v && !n && (n = setTimeout(() => {
|
|
37
|
+
t && s(t), n = void 0, g(c());
|
|
38
|
+
}, v)), 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]) || "", f = e.slice(n.length), s = Number.parseFloat(n) + o;
|
|
59
|
+
return Number.isNaN(s) ? e : s + f;
|
|
60
|
+
}
|
|
61
|
+
function j(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() ? G(e, t) : o ? e() : z(e);
|
|
79
|
+
}
|
|
80
|
+
function he(e, o, t = {}) {
|
|
81
|
+
const {
|
|
82
|
+
immediate: n = !0,
|
|
83
|
+
immediateCallback: f = !1
|
|
84
|
+
} = t, s = E(!1);
|
|
85
|
+
let c;
|
|
86
|
+
function d() {
|
|
87
|
+
c && (clearTimeout(c), c = void 0);
|
|
88
|
+
}
|
|
89
|
+
function r() {
|
|
90
|
+
s.value = !1, d();
|
|
91
|
+
}
|
|
92
|
+
function a(...v) {
|
|
93
|
+
f && e(), d(), s.value = !0, c = setTimeout(() => {
|
|
94
|
+
s.value = !1, c = void 0, e(...v);
|
|
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 N(
|
|
105
|
+
e,
|
|
106
|
+
o,
|
|
107
|
+
{
|
|
108
|
+
...t,
|
|
109
|
+
immediate: !0
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function Oe(e, o, t) {
|
|
114
|
+
return N(
|
|
115
|
+
e,
|
|
116
|
+
(f, s, c) => {
|
|
117
|
+
f && o(f, s, c);
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
...t,
|
|
121
|
+
once: !1
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
const R = _ ? window : void 0, H = _ ? window.navigator : void 0;
|
|
126
|
+
function W(e) {
|
|
127
|
+
var o;
|
|
128
|
+
const t = x(e);
|
|
129
|
+
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
130
|
+
}
|
|
131
|
+
function T(...e) {
|
|
132
|
+
const o = [], t = () => {
|
|
133
|
+
o.forEach((d) => d()), o.length = 0;
|
|
134
|
+
}, n = (d, r, a, v) => (d.addEventListener(r, a, v), () => d.removeEventListener(r, a, v)), f = M(() => {
|
|
135
|
+
const d = F(x(e[0])).filter((r) => r != null);
|
|
136
|
+
return d.every((r) => typeof r != "string") ? d : void 0;
|
|
137
|
+
}), s = we(
|
|
138
|
+
() => {
|
|
139
|
+
var d, r;
|
|
140
|
+
return [
|
|
141
|
+
(r = (d = f.value) == null ? void 0 : d.map((a) => W(a))) != null ? r : [R].filter((a) => a != null),
|
|
142
|
+
F(x(f.value ? e[1] : e[0])),
|
|
143
|
+
F(oe(f.value ? e[2] : e[1])),
|
|
144
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
145
|
+
x(f.value ? e[3] : e[2])
|
|
146
|
+
];
|
|
147
|
+
},
|
|
148
|
+
([d, r, a, v]) => {
|
|
149
|
+
if (t(), !(d != null && d.length) || !(r != null && r.length) || !(a != null && a.length))
|
|
150
|
+
return;
|
|
151
|
+
const g = ae(v) ? { ...v } : v;
|
|
152
|
+
o.push(
|
|
153
|
+
...d.flatMap(
|
|
154
|
+
(y) => r.flatMap(
|
|
155
|
+
(l) => a.map((m) => n(y, l, m, g))
|
|
156
|
+
)
|
|
157
|
+
)
|
|
158
|
+
);
|
|
159
|
+
},
|
|
160
|
+
{ flush: "post" }
|
|
161
|
+
), c = () => {
|
|
162
|
+
s(), t();
|
|
163
|
+
};
|
|
164
|
+
return X(t), c;
|
|
165
|
+
}
|
|
166
|
+
let B = !1;
|
|
167
|
+
function Ce(e, o, t = {}) {
|
|
168
|
+
const { window: n = R, ignore: f = [], capture: s = !0, detectIframe: c = !1, controls: d = !1 } = t;
|
|
169
|
+
if (!n)
|
|
170
|
+
return d ? { stop: C, cancel: C, trigger: C } : C;
|
|
171
|
+
if (ue && !B) {
|
|
172
|
+
B = !0;
|
|
173
|
+
const i = { passive: !0 };
|
|
174
|
+
Array.from(n.document.body.children).forEach((u) => u.addEventListener("click", C, i)), n.document.documentElement.addEventListener("click", C, i);
|
|
175
|
+
}
|
|
176
|
+
let r = !0;
|
|
177
|
+
const a = (i) => x(f).some((u) => {
|
|
178
|
+
if (typeof u == "string")
|
|
179
|
+
return Array.from(n.document.querySelectorAll(u)).some((p) => p === i.target || i.composedPath().includes(p));
|
|
180
|
+
{
|
|
181
|
+
const p = W(u);
|
|
182
|
+
return p && (i.target === p || i.composedPath().includes(p));
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
function v(i) {
|
|
186
|
+
const u = x(i);
|
|
187
|
+
return u && u.$.subTree.shapeFlag === 16;
|
|
188
|
+
}
|
|
189
|
+
function g(i, u) {
|
|
190
|
+
const p = x(i), w = p.$.subTree && p.$.subTree.children;
|
|
191
|
+
return w == null || !Array.isArray(w) ? !1 : w.some((S) => S.el === u.target || u.composedPath().includes(S.el));
|
|
192
|
+
}
|
|
193
|
+
const y = (i) => {
|
|
194
|
+
const u = W(e);
|
|
195
|
+
if (i.target != null && !(!(u instanceof Element) && v(e) && g(e, i)) && !(!u || u === i.target || i.composedPath().includes(u))) {
|
|
196
|
+
if ("detail" in i && i.detail === 0 && (r = !a(i)), !r) {
|
|
197
|
+
r = !0;
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
o(i);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
let l = !1;
|
|
204
|
+
const m = [
|
|
205
|
+
T(n, "click", (i) => {
|
|
206
|
+
l || (l = !0, setTimeout(() => {
|
|
207
|
+
l = !1;
|
|
208
|
+
}, 0), y(i));
|
|
209
|
+
}, { passive: !0, capture: s }),
|
|
210
|
+
T(n, "pointerdown", (i) => {
|
|
211
|
+
const u = W(e);
|
|
212
|
+
r = !a(i) && !!(u && !i.composedPath().includes(u));
|
|
213
|
+
}, { passive: !0 }),
|
|
214
|
+
c && T(n, "blur", (i) => {
|
|
215
|
+
setTimeout(() => {
|
|
216
|
+
var u;
|
|
217
|
+
const p = W(e);
|
|
218
|
+
((u = n.document.activeElement) == null ? void 0 : u.tagName) === "IFRAME" && !(p != null && p.contains(n.document.activeElement)) && o(i);
|
|
219
|
+
}, 0);
|
|
220
|
+
}, { passive: !0 })
|
|
221
|
+
].filter(Boolean), b = () => m.forEach((i) => i());
|
|
222
|
+
return d ? {
|
|
223
|
+
stop: b,
|
|
224
|
+
cancel: () => {
|
|
225
|
+
r = !1;
|
|
226
|
+
},
|
|
227
|
+
trigger: (i) => {
|
|
228
|
+
r = !0, y(i), r = !1;
|
|
229
|
+
}
|
|
230
|
+
} : b;
|
|
231
|
+
}
|
|
232
|
+
// @__NO_SIDE_EFFECTS__
|
|
233
|
+
function Y(e) {
|
|
234
|
+
return M(() => !!e());
|
|
235
|
+
}
|
|
236
|
+
const ye = Symbol("vueuse-ssr-width");
|
|
237
|
+
// @__NO_SIDE_EFFECTS__
|
|
238
|
+
function Q() {
|
|
239
|
+
const e = V() ? /* @__PURE__ */ ie(ye, null) : null;
|
|
240
|
+
return typeof e == "number" ? e : void 0;
|
|
241
|
+
}
|
|
242
|
+
function L(e, o = {}) {
|
|
243
|
+
const { window: t = R, ssrWidth: n = /* @__PURE__ */ Q() } = o, f = /* @__PURE__ */ Y(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), s = E(typeof n == "number"), c = E(), d = E(!1), r = (a) => {
|
|
244
|
+
d.value = a.matches;
|
|
245
|
+
};
|
|
246
|
+
return ne(() => {
|
|
247
|
+
if (s.value) {
|
|
248
|
+
s.value = !f.value;
|
|
249
|
+
const a = x(e).split(",");
|
|
250
|
+
d.value = a.some((v) => {
|
|
251
|
+
const g = v.includes("not all"), y = v.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), l = v.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
252
|
+
let m = !!(y || l);
|
|
253
|
+
return y && m && (m = n >= j(y[1])), l && m && (m = n <= j(l[1])), g ? !m : m;
|
|
254
|
+
});
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
f.value && (c.value = t.matchMedia(x(e)), d.value = c.value.matches);
|
|
258
|
+
}), T(c, "change", r, { passive: !0 }), M(() => d.value);
|
|
259
|
+
}
|
|
260
|
+
const ge = {
|
|
261
|
+
sm: 640,
|
|
262
|
+
md: 768,
|
|
263
|
+
lg: 1024,
|
|
264
|
+
xl: 1280,
|
|
265
|
+
"2xl": 1536
|
|
266
|
+
};
|
|
267
|
+
// @__NO_SIDE_EFFECTS__
|
|
268
|
+
function be(e, o = {}) {
|
|
269
|
+
function t(l, m) {
|
|
270
|
+
let b = x(e[x(l)]);
|
|
271
|
+
return m != null && (b = me(b, m)), typeof b == "number" && (b = `${b}px`), b;
|
|
272
|
+
}
|
|
273
|
+
const { window: n = R, strategy: f = "min-width", ssrWidth: s = /* @__PURE__ */ Q() } = o, c = typeof s == "number", d = c ? E(!1) : { value: !0 };
|
|
274
|
+
c && pe(() => d.value = !!n);
|
|
275
|
+
function r(l, m) {
|
|
276
|
+
return !d.value && c ? l === "min" ? s >= j(m) : s <= j(m) : n ? n.matchMedia(`(${l}-width: ${m})`).matches : !1;
|
|
277
|
+
}
|
|
278
|
+
const a = (l) => L(() => `(min-width: ${t(l)})`, o), v = (l) => L(() => `(max-width: ${t(l)})`, o), g = Object.keys(e).reduce((l, m) => (Object.defineProperty(l, m, {
|
|
279
|
+
get: () => f === "min-width" ? a(m) : v(m),
|
|
280
|
+
enumerable: !0,
|
|
281
|
+
configurable: !0
|
|
282
|
+
}), l), {});
|
|
283
|
+
function y() {
|
|
284
|
+
const l = Object.keys(e).map((m) => [m, g[m], j(t(m))]).sort((m, b) => m[2] - b[2]);
|
|
285
|
+
return M(() => l.filter(([, m]) => m.value).map(([m]) => m));
|
|
286
|
+
}
|
|
287
|
+
return Object.assign(g, {
|
|
288
|
+
greaterOrEqual: a,
|
|
289
|
+
smallerOrEqual: v,
|
|
290
|
+
greater(l) {
|
|
291
|
+
return L(() => `(min-width: ${t(l, 0.1)})`, o);
|
|
292
|
+
},
|
|
293
|
+
smaller(l) {
|
|
294
|
+
return L(() => `(max-width: ${t(l, -0.1)})`, o);
|
|
295
|
+
},
|
|
296
|
+
between(l, m) {
|
|
297
|
+
return L(() => `(min-width: ${t(l)}) and (max-width: ${t(m, -0.1)})`, o);
|
|
298
|
+
},
|
|
299
|
+
isGreater(l) {
|
|
300
|
+
return r("min", t(l, 0.1));
|
|
301
|
+
},
|
|
302
|
+
isGreaterOrEqual(l) {
|
|
303
|
+
return r("min", t(l));
|
|
304
|
+
},
|
|
305
|
+
isSmaller(l) {
|
|
306
|
+
return r("max", t(l, -0.1));
|
|
307
|
+
},
|
|
308
|
+
isSmallerOrEqual(l) {
|
|
309
|
+
return r("max", t(l));
|
|
310
|
+
},
|
|
311
|
+
isInBetween(l, m) {
|
|
312
|
+
return r("min", t(l)) && r("max", t(m, -0.1));
|
|
313
|
+
},
|
|
314
|
+
current: y,
|
|
315
|
+
active() {
|
|
316
|
+
const l = y();
|
|
317
|
+
return M(() => l.value.length === 0 ? "" : l.value.at(f === "min-width" ? -1 : 0));
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
// @__NO_SIDE_EFFECTS__
|
|
322
|
+
function q(e, o = {}) {
|
|
323
|
+
const {
|
|
324
|
+
controls: t = !1,
|
|
325
|
+
navigator: n = H
|
|
326
|
+
} = o, f = /* @__PURE__ */ Y(() => n && "permissions" in n), s = E(), c = typeof e == "string" ? { name: e } : e, d = E(), r = () => {
|
|
327
|
+
var v, g;
|
|
328
|
+
d.value = (g = (v = s.value) == null ? void 0 : v.state) != null ? g : "prompt";
|
|
329
|
+
};
|
|
330
|
+
T(s, "change", r, { passive: !0 });
|
|
331
|
+
const a = de(async () => {
|
|
332
|
+
if (f.value) {
|
|
333
|
+
if (!s.value)
|
|
334
|
+
try {
|
|
335
|
+
s.value = await n.permissions.query(c);
|
|
336
|
+
} catch {
|
|
337
|
+
s.value = void 0;
|
|
338
|
+
} finally {
|
|
339
|
+
r();
|
|
340
|
+
}
|
|
341
|
+
if (t)
|
|
342
|
+
return re(s.value);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
return a(), t ? {
|
|
346
|
+
state: d,
|
|
347
|
+
isSupported: f,
|
|
348
|
+
query: a
|
|
349
|
+
} : d;
|
|
350
|
+
}
|
|
351
|
+
function Pe(e = {}) {
|
|
352
|
+
const {
|
|
353
|
+
navigator: o = H,
|
|
354
|
+
read: t = !1,
|
|
355
|
+
source: n,
|
|
356
|
+
copiedDuring: f = 1500,
|
|
357
|
+
legacy: s = !1
|
|
358
|
+
} = e, c = /* @__PURE__ */ Y(() => o && "clipboard" in o), d = /* @__PURE__ */ q("clipboard-read"), r = /* @__PURE__ */ q("clipboard-write"), a = M(() => c.value || s), v = E(""), g = E(!1), y = he(() => g.value = !1, f, { immediate: !1 });
|
|
359
|
+
async function l() {
|
|
360
|
+
let p = !(c.value && u(d.value));
|
|
361
|
+
if (!p)
|
|
362
|
+
try {
|
|
363
|
+
v.value = await o.clipboard.readText();
|
|
364
|
+
} catch {
|
|
365
|
+
p = !0;
|
|
366
|
+
}
|
|
367
|
+
p && (v.value = i());
|
|
368
|
+
}
|
|
369
|
+
a.value && t && T(["copy", "cut"], l, { passive: !0 });
|
|
370
|
+
async function m(p = x(n)) {
|
|
371
|
+
if (a.value && p != null) {
|
|
372
|
+
let w = !(c.value && u(r.value));
|
|
373
|
+
if (!w)
|
|
374
|
+
try {
|
|
375
|
+
await o.clipboard.writeText(p);
|
|
376
|
+
} catch {
|
|
377
|
+
w = !0;
|
|
378
|
+
}
|
|
379
|
+
w && b(p), v.value = p, g.value = !0, y.start();
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function b(p) {
|
|
383
|
+
const w = document.createElement("textarea");
|
|
384
|
+
w.value = p ?? "", w.style.position = "absolute", w.style.opacity = "0", document.body.appendChild(w), w.select(), document.execCommand("copy"), w.remove();
|
|
385
|
+
}
|
|
386
|
+
function i() {
|
|
387
|
+
var p, w, S;
|
|
388
|
+
return (S = (w = (p = document == null ? void 0 : document.getSelection) == null ? void 0 : p.call(document)) == null ? void 0 : w.toString()) != null ? S : "";
|
|
389
|
+
}
|
|
390
|
+
function u(p) {
|
|
391
|
+
return p === "granted" || p === "prompt";
|
|
392
|
+
}
|
|
393
|
+
return {
|
|
394
|
+
isSupported: a,
|
|
395
|
+
text: v,
|
|
396
|
+
copied: g,
|
|
397
|
+
copy: m
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
const Se = {
|
|
401
|
+
ctrl: "control",
|
|
402
|
+
command: "meta",
|
|
403
|
+
cmd: "meta",
|
|
404
|
+
option: "alt",
|
|
405
|
+
up: "arrowup",
|
|
406
|
+
down: "arrowdown",
|
|
407
|
+
left: "arrowleft",
|
|
408
|
+
right: "arrowright"
|
|
409
|
+
};
|
|
410
|
+
function xe(e = {}) {
|
|
411
|
+
const {
|
|
412
|
+
reactive: o = !1,
|
|
413
|
+
target: t = R,
|
|
414
|
+
aliasMap: n = Se,
|
|
415
|
+
passive: f = !0,
|
|
416
|
+
onEventFired: s = C
|
|
417
|
+
} = e, c = $(/* @__PURE__ */ new Set()), d = {
|
|
418
|
+
toJSON() {
|
|
419
|
+
return {};
|
|
420
|
+
},
|
|
421
|
+
current: c
|
|
422
|
+
}, r = o ? $(d) : d, a = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
|
|
423
|
+
function y(i, u) {
|
|
424
|
+
i in r && (o ? r[i] = u : r[i].value = u);
|
|
425
|
+
}
|
|
426
|
+
function l() {
|
|
427
|
+
c.clear();
|
|
428
|
+
for (const i of g)
|
|
429
|
+
y(i, !1);
|
|
430
|
+
}
|
|
431
|
+
function m(i, u) {
|
|
432
|
+
var p, w;
|
|
433
|
+
const S = (p = i.key) == null ? void 0 : p.toLowerCase(), k = [(w = i.code) == null ? void 0 : w.toLowerCase(), S].filter(Boolean);
|
|
434
|
+
S && (u ? c.add(S) : c.delete(S));
|
|
435
|
+
for (const h of k)
|
|
436
|
+
g.add(h), y(h, u);
|
|
437
|
+
if (S === "shift" && !u) {
|
|
438
|
+
const h = Array.from(v), O = h.indexOf("shift");
|
|
439
|
+
h.forEach((P, J) => {
|
|
440
|
+
J >= O && (c.delete(P), y(P, !1));
|
|
441
|
+
}), v.clear();
|
|
442
|
+
} else typeof i.getModifierState == "function" && i.getModifierState("Shift") && u && [...c, ...k].forEach((h) => v.add(h));
|
|
443
|
+
S === "meta" && !u ? (a.forEach((h) => {
|
|
444
|
+
c.delete(h), y(h, !1);
|
|
445
|
+
}), a.clear()) : typeof i.getModifierState == "function" && i.getModifierState("Meta") && u && [...c, ...k].forEach((h) => a.add(h));
|
|
446
|
+
}
|
|
447
|
+
T(t, "keydown", (i) => (m(i, !0), s(i)), { passive: f }), T(t, "keyup", (i) => (m(i, !1), s(i)), { passive: f }), T("blur", l, { passive: f }), T("focus", l, { passive: f });
|
|
448
|
+
const b = new Proxy(
|
|
449
|
+
r,
|
|
450
|
+
{
|
|
451
|
+
get(i, u, p) {
|
|
452
|
+
if (typeof u != "string")
|
|
453
|
+
return Reflect.get(i, u, p);
|
|
454
|
+
if (u = u.toLowerCase(), u in n && (u = n[u]), !(u in r))
|
|
455
|
+
if (/[+_-]/.test(u)) {
|
|
456
|
+
const S = u.split(/[+_-]/g).map((A) => A.trim());
|
|
457
|
+
r[u] = M(() => S.map((A) => x(b[A])).every(Boolean));
|
|
458
|
+
} else
|
|
459
|
+
r[u] = E(!1);
|
|
460
|
+
const w = Reflect.get(i, u, p);
|
|
461
|
+
return o ? x(w) : w;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
);
|
|
465
|
+
return b;
|
|
466
|
+
}
|
|
467
|
+
function Ee(e, o = {}) {
|
|
468
|
+
const {
|
|
469
|
+
threshold: t = 50,
|
|
470
|
+
onSwipe: n,
|
|
471
|
+
onSwipeEnd: f,
|
|
472
|
+
onSwipeStart: s,
|
|
473
|
+
passive: c = !0
|
|
474
|
+
} = o, d = $({ x: 0, y: 0 }), r = $({ x: 0, y: 0 }), a = M(() => d.x - r.x), v = M(() => d.y - r.y), { max: g, abs: y } = Math, l = M(() => g(y(a.value), y(v.value)) >= t), m = E(!1), b = M(() => l.value ? y(a.value) > y(v.value) ? a.value > 0 ? "left" : "right" : v.value > 0 ? "up" : "down" : "none"), i = (h) => [h.touches[0].clientX, h.touches[0].clientY], u = (h, O) => {
|
|
475
|
+
d.x = h, d.y = O;
|
|
476
|
+
}, p = (h, O) => {
|
|
477
|
+
r.x = h, r.y = O;
|
|
478
|
+
}, w = { passive: c, capture: !c }, S = (h) => {
|
|
479
|
+
m.value && (f == null || f(h, b.value)), m.value = !1;
|
|
480
|
+
}, A = [
|
|
481
|
+
T(e, "touchstart", (h) => {
|
|
482
|
+
if (h.touches.length !== 1)
|
|
483
|
+
return;
|
|
484
|
+
const [O, P] = i(h);
|
|
485
|
+
u(O, P), p(O, P), s == null || s(h);
|
|
486
|
+
}, w),
|
|
487
|
+
T(e, "touchmove", (h) => {
|
|
488
|
+
if (h.touches.length !== 1)
|
|
489
|
+
return;
|
|
490
|
+
const [O, P] = i(h);
|
|
491
|
+
p(O, P), w.capture && !w.passive && Math.abs(a.value) > Math.abs(v.value) && h.preventDefault(), !m.value && l.value && (m.value = !0), m.value && (n == null || n(h));
|
|
492
|
+
}, w),
|
|
493
|
+
T(e, ["touchend", "touchcancel"], S, w)
|
|
494
|
+
];
|
|
495
|
+
return {
|
|
496
|
+
isSwiping: m,
|
|
497
|
+
direction: b,
|
|
498
|
+
coordsStart: d,
|
|
499
|
+
coordsEnd: r,
|
|
500
|
+
lengthX: a,
|
|
501
|
+
lengthY: v,
|
|
502
|
+
stop: () => A.forEach((h) => h()),
|
|
503
|
+
// TODO: Remove in the next major version
|
|
504
|
+
isPassiveEventSupported: !0
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
const Ae = (e, o) => {
|
|
508
|
+
const t = I(!1), n = I(!1), f = I(null), s = xe();
|
|
509
|
+
s != null && s.escape && N(s.escape, () => {
|
|
510
|
+
c(new Event("close"));
|
|
511
|
+
});
|
|
512
|
+
const c = (r) => {
|
|
513
|
+
n.value = !1, setTimeout(() => {
|
|
514
|
+
t.value = !1;
|
|
515
|
+
}, 50), setTimeout(() => {
|
|
516
|
+
e("close", r || new Event("close"));
|
|
517
|
+
}, 300), f.value && clearTimeout(f.value);
|
|
518
|
+
}, d = () => e("open", t.value);
|
|
519
|
+
return G(() => {
|
|
520
|
+
setTimeout(() => {
|
|
521
|
+
t.value = !0;
|
|
522
|
+
}, 300), setTimeout(() => {
|
|
523
|
+
n.value = !0;
|
|
524
|
+
}, 500), o && (f.value = setTimeout(() => {
|
|
525
|
+
c();
|
|
526
|
+
}, o * 1e3));
|
|
527
|
+
}), {
|
|
528
|
+
show: t,
|
|
529
|
+
overlay: n,
|
|
530
|
+
onClose: c,
|
|
531
|
+
onOpen: d
|
|
532
|
+
};
|
|
533
|
+
}, Le = (e, o, t) => {
|
|
534
|
+
const n = M(() => {
|
|
535
|
+
var a;
|
|
536
|
+
return (a = o.value) == null ? void 0 : a.clientHeight;
|
|
537
|
+
}), f = E("translateY(0)"), s = E(1), c = E(!1);
|
|
538
|
+
if ((/* @__PURE__ */ be(ge)).greaterOrEqual("lg")) {
|
|
539
|
+
const { lengthY: a } = Ee(e, {
|
|
540
|
+
passive: !1,
|
|
541
|
+
onSwipeStart() {
|
|
542
|
+
c.value = !0;
|
|
543
|
+
},
|
|
544
|
+
onSwipe() {
|
|
545
|
+
if (n.value)
|
|
546
|
+
if (a.value < 0) {
|
|
547
|
+
const v = Math.abs(a.value);
|
|
548
|
+
f.value = `translateY(${v}px)`, s.value = 1.1 - v / n.value, s.value < 0.3 && (s.value = 0);
|
|
549
|
+
} else
|
|
550
|
+
f.value = "translateY(0)", s.value = 1;
|
|
551
|
+
},
|
|
552
|
+
onSwipeEnd(v) {
|
|
553
|
+
c.value = !1, a.value < 0 && n.value && Math.abs(a.value) / n.value >= 0.5 ? (s.value = 0, setTimeout(() => {
|
|
554
|
+
t(v);
|
|
555
|
+
}, 100)) : (f.value = "translateY(0)", s.value = 1);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
return {
|
|
560
|
+
isSwiping: c,
|
|
561
|
+
transform: f,
|
|
562
|
+
opacity: s
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
export {
|
|
566
|
+
Le as a,
|
|
567
|
+
be as b,
|
|
568
|
+
ge as c,
|
|
569
|
+
Me as d,
|
|
570
|
+
Pe as e,
|
|
571
|
+
xe as f,
|
|
572
|
+
Ce as o,
|
|
573
|
+
Ae as u,
|
|
574
|
+
Oe as w
|
|
575
|
+
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.6",
|
|
3
3
|
"name": "vuesp-components",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
@@ -62,7 +62,8 @@
|
|
|
62
62
|
"license": "MIT",
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@vueuse/core": "^13.9.0",
|
|
65
|
-
"tslib": "^2.3.0"
|
|
65
|
+
"tslib": "^2.3.0",
|
|
66
|
+
"yace": "1.1.0"
|
|
66
67
|
},
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@eslint/js": "^9.39.1",
|
|
@@ -84,10 +85,10 @@
|
|
|
84
85
|
"unplugin-vue-components": "^32.1.0",
|
|
85
86
|
"vite": "^5.0.0",
|
|
86
87
|
"vite-plugin-dts": "~4.5.0",
|
|
87
|
-
"vue": "3.5.
|
|
88
|
+
"vue": "3.5.41",
|
|
88
89
|
"vue-tsc": "^2.2.8"
|
|
89
90
|
},
|
|
90
91
|
"peerDependencies": {
|
|
91
|
-
"vue": "
|
|
92
|
+
"vue": "3.5.41"
|
|
92
93
|
}
|
|
93
94
|
}
|