vuesp-components 2.1.3 → 2.1.5

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.
Files changed (112) hide show
  1. package/dist/components/app/AppNav.vue.d.ts +1 -1
  2. package/dist/components/app/AppNav.vue.d.ts.map +1 -1
  3. package/dist/components/app/AppNotification.vue.d.ts +1 -1
  4. package/dist/components/app/AppNotification.vue.d.ts.map +1 -1
  5. package/dist/components/app/types.d.ts +1 -1
  6. package/dist/components/app/types.d.ts.map +1 -1
  7. package/dist/components/block/index.d.ts +5 -1
  8. package/dist/components/block/index.d.ts.map +1 -1
  9. package/dist/components/block/info/types.d.ts +3 -3
  10. package/dist/components/block/info/types.d.ts.map +1 -1
  11. package/dist/components/block/scan/BlockScan.vue.d.ts +11 -0
  12. package/dist/components/block/scan/BlockScan.vue.d.ts.map +1 -0
  13. package/dist/components/block/scan/types.d.ts +9 -0
  14. package/dist/components/block/scan/types.d.ts.map +1 -0
  15. package/dist/components/block/service/BlockService.vue.d.ts +13 -0
  16. package/dist/components/block/service/BlockService.vue.d.ts.map +1 -0
  17. package/dist/components/block/service/types.d.ts +10 -0
  18. package/dist/components/block/service/types.d.ts.map +1 -0
  19. package/dist/components/block/status/BlockStatus.vue.d.ts +34 -0
  20. package/dist/components/block/status/BlockStatus.vue.d.ts.map +1 -0
  21. package/dist/components/block/status/types.d.ts +5 -0
  22. package/dist/components/block/status/types.d.ts.map +1 -0
  23. package/dist/components/block/update/BlockUpdate.vue.d.ts +24 -0
  24. package/dist/components/block/update/BlockUpdate.vue.d.ts.map +1 -0
  25. package/dist/components/block/update/types.d.ts +4 -0
  26. package/dist/components/block/update/types.d.ts.map +1 -0
  27. package/dist/components/card/notification/types.d.ts +1 -1
  28. package/dist/components/card/notification/types.d.ts.map +1 -1
  29. package/dist/components/dashboard/cards/CardBase.vue.d.ts +9 -9
  30. package/dist/components/dashboard/cards/CardButton.vue.d.ts +1 -1
  31. package/dist/components/dashboard/cards/CardDate.vue.d.ts +1 -1
  32. package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
  33. package/dist/components/dashboard/cards/CardDimmer.vue.d.ts +1 -1
  34. package/dist/components/dashboard/cards/CardInfo.vue.d.ts +1 -1
  35. package/dist/components/dashboard/cards/CardInput.vue.d.ts +1 -1
  36. package/dist/components/dashboard/cards/CardList.vue.d.ts +1 -1
  37. package/dist/components/dashboard/cards/CardList.vue.d.ts.map +1 -1
  38. package/dist/components/dashboard/cards/types.d.ts +1 -1
  39. package/dist/components/dashboard/cards/types.d.ts.map +1 -1
  40. package/dist/components/dashboard/edit/ItemEdit.vue.d.ts +1 -1
  41. package/dist/components/dashboard/edit/ItemEdit.vue.d.ts.map +1 -1
  42. package/dist/components/dashboard/edit/ItemOptions.vue.d.ts +1 -1
  43. package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -1
  44. package/dist/components/dashboard/edit/types.d.ts +1 -1
  45. package/dist/components/dashboard/edit/types.d.ts.map +1 -1
  46. package/dist/components/index.d.ts +1 -0
  47. package/dist/components/index.d.ts.map +1 -1
  48. package/dist/components/script/editor/ScriptEditor.vue.d.ts +8 -0
  49. package/dist/components/script/editor/ScriptEditor.vue.d.ts.map +1 -0
  50. package/dist/components/script/editor/format.d.ts +3 -0
  51. package/dist/components/script/editor/format.d.ts.map +1 -0
  52. package/dist/components/script/editor/highlighters/index.d.ts +2 -0
  53. package/dist/components/script/editor/highlighters/index.d.ts.map +1 -0
  54. package/dist/components/script/editor/plugins/autoSemicolon.d.ts +3 -0
  55. package/dist/components/script/editor/plugins/autoSemicolon.d.ts.map +1 -0
  56. package/dist/components/script/editor/plugins/autocomplete.d.ts +4 -0
  57. package/dist/components/script/editor/plugins/autocomplete.d.ts.map +1 -0
  58. package/dist/components/script/editor/plugins/index.d.ts +3 -0
  59. package/dist/components/script/editor/plugins/index.d.ts.map +1 -0
  60. package/dist/components/script/editor/plugins/render/index.d.ts +7 -0
  61. package/dist/components/script/editor/plugins/render/index.d.ts.map +1 -0
  62. package/dist/components/script/editor/plugins/suggestions.d.ts +3 -0
  63. package/dist/components/script/editor/plugins/suggestions.d.ts.map +1 -0
  64. package/dist/components/script/editor/plugins/types.d.ts +24 -0
  65. package/dist/components/script/editor/plugins/types.d.ts.map +1 -0
  66. package/dist/components/script/editor/types.d.ts +9 -0
  67. package/dist/components/script/editor/types.d.ts.map +1 -0
  68. package/dist/components/script/index.d.ts +4 -0
  69. package/dist/components/script/index.d.ts.map +1 -0
  70. package/dist/components/script/types.d.ts +4 -0
  71. package/dist/components/script/types.d.ts.map +1 -0
  72. package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts +13 -0
  73. package/dist/components/script/viewDocs/ScriptViewDocs.vue.d.ts.map +1 -0
  74. package/dist/components/script/viewDocs/types.d.ts +4 -0
  75. package/dist/components/script/viewDocs/types.d.ts.map +1 -0
  76. package/dist/components/types.d.ts +2 -0
  77. package/dist/components/types.d.ts.map +1 -0
  78. package/dist/components/ui/autocomplete/types.d.ts +1 -1
  79. package/dist/components/ui/autocomplete/types.d.ts.map +1 -1
  80. package/dist/components/ui/index.d.ts +2 -1
  81. package/dist/components/ui/index.d.ts.map +1 -1
  82. package/dist/components/ui/list/VListObject.vue.d.ts +2 -2
  83. package/dist/components/ui/tooltip/VTooltip.vue.d.ts +26 -0
  84. package/dist/components/ui/tooltip/VTooltip.vue.d.ts.map +1 -0
  85. package/dist/components/ui/tooltip/types.d.ts +8 -0
  86. package/dist/components/ui/tooltip/types.d.ts.map +1 -0
  87. package/dist/composables/index.es.js +1 -1
  88. package/dist/dashboard/index.d.ts +2 -2
  89. package/dist/dashboard/index.d.ts.map +1 -1
  90. package/dist/dashboard/types.d.ts +1 -1
  91. package/dist/dashboard/types.d.ts.map +1 -1
  92. package/dist/helpers/app.d.ts +1 -1
  93. package/dist/helpers/app.d.ts.map +1 -1
  94. package/dist/helpers/index.es.js +35 -33
  95. package/dist/helpers/web-api.d.ts.map +1 -1
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.es.js +2305 -1407
  98. package/dist/style.css +1 -1
  99. package/dist/types/components.d.ts +9 -0
  100. package/dist/types/components.d.ts.map +1 -1
  101. package/dist/types/general.d.ts +17 -0
  102. package/dist/types/general.d.ts.map +1 -0
  103. package/dist/types/{types.d.ts → index.d.ts} +2 -2
  104. package/dist/types/index.d.ts.map +1 -0
  105. package/dist/types/messages.d.ts +76 -15
  106. package/dist/types/messages.d.ts.map +1 -1
  107. package/dist/useSwipeDown-DCYgiAUA.js +448 -0
  108. package/package.json +4 -3
  109. package/dist/types/state.d.ts +0 -52
  110. package/dist/types/state.d.ts.map +0 -1
  111. package/dist/types/types.d.ts.map +0 -1
  112. package/dist/useSwipeDown-BLxS7593.js +0 -375
@@ -0,0 +1,448 @@
1
+ import { onMounted as Y, nextTick as X, watch as B, getCurrentScope as H, onScopeDispose as Q, getCurrentInstance as _, toValue as S, hasInjectionContext as G, inject as J, reactive as I, computed as x, shallowRef as P, watchEffect as U, unref as z, ref as D } from "vue";
2
+ function Z(e) {
3
+ return H() ? (Q(e), !0) : !1;
4
+ }
5
+ const R = /* @__PURE__ */ new WeakMap(), ee = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
6
+ var s;
7
+ const t = e[0], n = (s = _()) == null ? void 0 : s.proxy;
8
+ if (n == null && !G())
9
+ throw new Error("injectLocal must be called in setup");
10
+ return n && R.has(n) && t in R.get(n) ? R.get(n)[t] : J(...e);
11
+ }, q = typeof window < "u" && typeof document < "u";
12
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
13
+ const te = Object.prototype.toString, ne = (e) => te.call(e) === "[object Object]", T = () => {
14
+ }, oe = /* @__PURE__ */ re();
15
+ function re() {
16
+ var e, s;
17
+ return q && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((s = window == null ? void 0 : window.navigator) == null ? void 0 : s.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
18
+ }
19
+ function se(e, s) {
20
+ function t(...n) {
21
+ return new Promise((d, c) => {
22
+ Promise.resolve(e(() => s.apply(this, n), { fn: s, thisArg: this, args: n })).then(d).catch(c);
23
+ });
24
+ }
25
+ return t;
26
+ }
27
+ function ie(e, s = {}) {
28
+ let t, n, d = T;
29
+ const c = (r) => {
30
+ clearTimeout(r), d(), d = T;
31
+ };
32
+ let h;
33
+ return (r) => {
34
+ const l = S(e), m = S(s.maxWait);
35
+ return t && c(t), l <= 0 || m !== void 0 && m <= 0 ? (n && (c(n), n = void 0), Promise.resolve(r())) : new Promise((g, p) => {
36
+ d = s.rejectOnCancel ? p : g, h = r, m && !n && (n = setTimeout(() => {
37
+ t && c(t), n = void 0, g(h());
38
+ }, m)), t = setTimeout(() => {
39
+ n && c(n), n = void 0, g(r());
40
+ }, l);
41
+ });
42
+ };
43
+ }
44
+ function ue(e, s) {
45
+ var t;
46
+ if (typeof e == "number")
47
+ return e + s;
48
+ const n = ((t = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : t[0]) || "", d = e.slice(n.length), c = Number.parseFloat(n) + s;
49
+ return Number.isNaN(c) ? e : c + d;
50
+ }
51
+ function j(e) {
52
+ return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
53
+ }
54
+ function F(e) {
55
+ return Array.isArray(e) ? e : [e];
56
+ }
57
+ function ae(e) {
58
+ return _();
59
+ }
60
+ // @__NO_SIDE_EFFECTS__
61
+ function ye(e, s = 200, t = {}) {
62
+ return se(
63
+ ie(s, t),
64
+ e
65
+ );
66
+ }
67
+ function le(e, s = !0, t) {
68
+ ae() ? Y(e, t) : s ? e() : X(e);
69
+ }
70
+ function ce(e, s, t) {
71
+ return B(
72
+ e,
73
+ s,
74
+ {
75
+ ...t,
76
+ immediate: !0
77
+ }
78
+ );
79
+ }
80
+ const $ = q ? window : void 0;
81
+ function L(e) {
82
+ var s;
83
+ const t = S(e);
84
+ return (s = t == null ? void 0 : t.$el) != null ? s : t;
85
+ }
86
+ function M(...e) {
87
+ const s = [], t = () => {
88
+ s.forEach((f) => f()), s.length = 0;
89
+ }, n = (f, r, l, m) => (f.addEventListener(r, l, m), () => f.removeEventListener(r, l, m)), d = x(() => {
90
+ const f = F(S(e[0])).filter((r) => r != null);
91
+ return f.every((r) => typeof r != "string") ? f : void 0;
92
+ }), c = ce(
93
+ () => {
94
+ var f, r;
95
+ return [
96
+ (r = (f = d.value) == null ? void 0 : f.map((l) => L(l))) != null ? r : [$].filter((l) => l != null),
97
+ F(S(d.value ? e[1] : e[0])),
98
+ F(z(d.value ? e[2] : e[1])),
99
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
100
+ S(d.value ? e[3] : e[2])
101
+ ];
102
+ },
103
+ ([f, r, l, m]) => {
104
+ if (t(), !(f != null && f.length) || !(r != null && r.length) || !(l != null && l.length))
105
+ return;
106
+ const g = ne(m) ? { ...m } : m;
107
+ s.push(
108
+ ...f.flatMap(
109
+ (p) => r.flatMap(
110
+ (i) => l.map((a) => n(p, i, a, g))
111
+ )
112
+ )
113
+ );
114
+ },
115
+ { flush: "post" }
116
+ ), h = () => {
117
+ c(), t();
118
+ };
119
+ return Z(t), h;
120
+ }
121
+ let N = !1;
122
+ function be(e, s, t = {}) {
123
+ const { window: n = $, ignore: d = [], capture: c = !0, detectIframe: h = !1, controls: f = !1 } = t;
124
+ if (!n)
125
+ return f ? { stop: T, cancel: T, trigger: T } : T;
126
+ if (oe && !N) {
127
+ N = !0;
128
+ const o = { passive: !0 };
129
+ Array.from(n.document.body.children).forEach((u) => u.addEventListener("click", T, o)), n.document.documentElement.addEventListener("click", T, o);
130
+ }
131
+ let r = !0;
132
+ const l = (o) => S(d).some((u) => {
133
+ if (typeof u == "string")
134
+ return Array.from(n.document.querySelectorAll(u)).some((w) => w === o.target || o.composedPath().includes(w));
135
+ {
136
+ const w = L(u);
137
+ return w && (o.target === w || o.composedPath().includes(w));
138
+ }
139
+ });
140
+ function m(o) {
141
+ const u = S(o);
142
+ return u && u.$.subTree.shapeFlag === 16;
143
+ }
144
+ function g(o, u) {
145
+ const w = S(o), b = w.$.subTree && w.$.subTree.children;
146
+ return b == null || !Array.isArray(b) ? !1 : b.some((E) => E.el === u.target || u.composedPath().includes(E.el));
147
+ }
148
+ const p = (o) => {
149
+ const u = L(e);
150
+ if (o.target != null && !(!(u instanceof Element) && m(e) && g(e, o)) && !(!u || u === o.target || o.composedPath().includes(u))) {
151
+ if ("detail" in o && o.detail === 0 && (r = !l(o)), !r) {
152
+ r = !0;
153
+ return;
154
+ }
155
+ s(o);
156
+ }
157
+ };
158
+ let i = !1;
159
+ const a = [
160
+ M(n, "click", (o) => {
161
+ i || (i = !0, setTimeout(() => {
162
+ i = !1;
163
+ }, 0), p(o));
164
+ }, { passive: !0, capture: c }),
165
+ M(n, "pointerdown", (o) => {
166
+ const u = L(e);
167
+ r = !l(o) && !!(u && !o.composedPath().includes(u));
168
+ }, { passive: !0 }),
169
+ h && M(n, "blur", (o) => {
170
+ setTimeout(() => {
171
+ var u;
172
+ const w = L(e);
173
+ ((u = n.document.activeElement) == null ? void 0 : u.tagName) === "IFRAME" && !(w != null && w.contains(n.document.activeElement)) && s(o);
174
+ }, 0);
175
+ }, { passive: !0 })
176
+ ].filter(Boolean), y = () => a.forEach((o) => o());
177
+ return f ? {
178
+ stop: y,
179
+ cancel: () => {
180
+ r = !1;
181
+ },
182
+ trigger: (o) => {
183
+ r = !0, p(o), r = !1;
184
+ }
185
+ } : y;
186
+ }
187
+ // @__NO_SIDE_EFFECTS__
188
+ function fe(e) {
189
+ return x(() => !!e());
190
+ }
191
+ const de = Symbol("vueuse-ssr-width");
192
+ // @__NO_SIDE_EFFECTS__
193
+ function K() {
194
+ const e = G() ? /* @__PURE__ */ ee(de, null) : null;
195
+ return typeof e == "number" ? e : void 0;
196
+ }
197
+ function A(e, s = {}) {
198
+ const { window: t = $, ssrWidth: n = /* @__PURE__ */ K() } = s, d = /* @__PURE__ */ fe(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), c = P(typeof n == "number"), h = P(), f = P(!1), r = (l) => {
199
+ f.value = l.matches;
200
+ };
201
+ return U(() => {
202
+ if (c.value) {
203
+ c.value = !d.value;
204
+ const l = S(e).split(",");
205
+ f.value = l.some((m) => {
206
+ const g = m.includes("not all"), p = m.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = m.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
207
+ let a = !!(p || i);
208
+ return p && a && (a = n >= j(p[1])), i && a && (a = n <= j(i[1])), g ? !a : a;
209
+ });
210
+ return;
211
+ }
212
+ d.value && (h.value = t.matchMedia(S(e)), f.value = h.value.matches);
213
+ }), M(h, "change", r, { passive: !0 }), x(() => f.value);
214
+ }
215
+ const me = {
216
+ sm: 640,
217
+ md: 768,
218
+ lg: 1024,
219
+ xl: 1280,
220
+ "2xl": 1536
221
+ };
222
+ // @__NO_SIDE_EFFECTS__
223
+ function he(e, s = {}) {
224
+ function t(i, a) {
225
+ let y = S(e[S(i)]);
226
+ return a != null && (y = ue(y, a)), typeof y == "number" && (y = `${y}px`), y;
227
+ }
228
+ const { window: n = $, strategy: d = "min-width", ssrWidth: c = /* @__PURE__ */ K() } = s, h = typeof c == "number", f = h ? P(!1) : { value: !0 };
229
+ h && le(() => f.value = !!n);
230
+ function r(i, a) {
231
+ return !f.value && h ? i === "min" ? c >= j(a) : c <= j(a) : n ? n.matchMedia(`(${i}-width: ${a})`).matches : !1;
232
+ }
233
+ const l = (i) => A(() => `(min-width: ${t(i)})`, s), m = (i) => A(() => `(max-width: ${t(i)})`, s), g = Object.keys(e).reduce((i, a) => (Object.defineProperty(i, a, {
234
+ get: () => d === "min-width" ? l(a) : m(a),
235
+ enumerable: !0,
236
+ configurable: !0
237
+ }), i), {});
238
+ function p() {
239
+ const i = Object.keys(e).map((a) => [a, g[a], j(t(a))]).sort((a, y) => a[2] - y[2]);
240
+ return x(() => i.filter(([, a]) => a.value).map(([a]) => a));
241
+ }
242
+ return Object.assign(g, {
243
+ greaterOrEqual: l,
244
+ smallerOrEqual: m,
245
+ greater(i) {
246
+ return A(() => `(min-width: ${t(i, 0.1)})`, s);
247
+ },
248
+ smaller(i) {
249
+ return A(() => `(max-width: ${t(i, -0.1)})`, s);
250
+ },
251
+ between(i, a) {
252
+ return A(() => `(min-width: ${t(i)}) and (max-width: ${t(a, -0.1)})`, s);
253
+ },
254
+ isGreater(i) {
255
+ return r("min", t(i, 0.1));
256
+ },
257
+ isGreaterOrEqual(i) {
258
+ return r("min", t(i));
259
+ },
260
+ isSmaller(i) {
261
+ return r("max", t(i, -0.1));
262
+ },
263
+ isSmallerOrEqual(i) {
264
+ return r("max", t(i));
265
+ },
266
+ isInBetween(i, a) {
267
+ return r("min", t(i)) && r("max", t(a, -0.1));
268
+ },
269
+ current: p,
270
+ active() {
271
+ const i = p();
272
+ return x(() => i.value.length === 0 ? "" : i.value.at(d === "min-width" ? -1 : 0));
273
+ }
274
+ });
275
+ }
276
+ const ve = {
277
+ ctrl: "control",
278
+ command: "meta",
279
+ cmd: "meta",
280
+ option: "alt",
281
+ up: "arrowup",
282
+ down: "arrowdown",
283
+ left: "arrowleft",
284
+ right: "arrowright"
285
+ };
286
+ function pe(e = {}) {
287
+ const {
288
+ reactive: s = !1,
289
+ target: t = $,
290
+ aliasMap: n = ve,
291
+ passive: d = !0,
292
+ onEventFired: c = T
293
+ } = e, h = I(/* @__PURE__ */ new Set()), f = {
294
+ toJSON() {
295
+ return {};
296
+ },
297
+ current: h
298
+ }, r = s ? I(f) : f, l = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
299
+ function p(o, u) {
300
+ o in r && (s ? r[o] = u : r[o].value = u);
301
+ }
302
+ function i() {
303
+ h.clear();
304
+ for (const o of g)
305
+ p(o, !1);
306
+ }
307
+ function a(o, u) {
308
+ var w, b;
309
+ const E = (w = o.key) == null ? void 0 : w.toLowerCase(), k = [(b = o.code) == null ? void 0 : b.toLowerCase(), E].filter(Boolean);
310
+ E && (u ? h.add(E) : h.delete(E));
311
+ for (const v of k)
312
+ g.add(v), p(v, u);
313
+ if (E === "shift" && !u) {
314
+ const v = Array.from(m), O = v.indexOf("shift");
315
+ v.forEach((C, V) => {
316
+ V >= O && (h.delete(C), p(C, !1));
317
+ }), m.clear();
318
+ } else typeof o.getModifierState == "function" && o.getModifierState("Shift") && u && [...h, ...k].forEach((v) => m.add(v));
319
+ E === "meta" && !u ? (l.forEach((v) => {
320
+ h.delete(v), p(v, !1);
321
+ }), l.clear()) : typeof o.getModifierState == "function" && o.getModifierState("Meta") && u && [...h, ...k].forEach((v) => l.add(v));
322
+ }
323
+ M(t, "keydown", (o) => (a(o, !0), c(o)), { passive: d }), M(t, "keyup", (o) => (a(o, !1), c(o)), { passive: d }), M("blur", i, { passive: d }), M("focus", i, { passive: d });
324
+ const y = new Proxy(
325
+ r,
326
+ {
327
+ get(o, u, w) {
328
+ if (typeof u != "string")
329
+ return Reflect.get(o, u, w);
330
+ if (u = u.toLowerCase(), u in n && (u = n[u]), !(u in r))
331
+ if (/[+_-]/.test(u)) {
332
+ const E = u.split(/[+_-]/g).map((W) => W.trim());
333
+ r[u] = x(() => E.map((W) => S(y[W])).every(Boolean));
334
+ } else
335
+ r[u] = P(!1);
336
+ const b = Reflect.get(o, u, w);
337
+ return s ? S(b) : b;
338
+ }
339
+ }
340
+ );
341
+ return y;
342
+ }
343
+ function we(e, s = {}) {
344
+ const {
345
+ threshold: t = 50,
346
+ onSwipe: n,
347
+ onSwipeEnd: d,
348
+ onSwipeStart: c,
349
+ passive: h = !0
350
+ } = s, f = I({ x: 0, y: 0 }), r = I({ x: 0, y: 0 }), l = x(() => f.x - r.x), m = x(() => f.y - r.y), { max: g, abs: p } = Math, i = x(() => g(p(l.value), p(m.value)) >= t), a = P(!1), y = x(() => i.value ? p(l.value) > p(m.value) ? l.value > 0 ? "left" : "right" : m.value > 0 ? "up" : "down" : "none"), o = (v) => [v.touches[0].clientX, v.touches[0].clientY], u = (v, O) => {
351
+ f.x = v, f.y = O;
352
+ }, w = (v, O) => {
353
+ r.x = v, r.y = O;
354
+ }, b = { passive: h, capture: !h }, E = (v) => {
355
+ a.value && (d == null || d(v, y.value)), a.value = !1;
356
+ }, W = [
357
+ M(e, "touchstart", (v) => {
358
+ if (v.touches.length !== 1)
359
+ return;
360
+ const [O, C] = o(v);
361
+ u(O, C), w(O, C), c == null || c(v);
362
+ }, b),
363
+ M(e, "touchmove", (v) => {
364
+ if (v.touches.length !== 1)
365
+ return;
366
+ const [O, C] = o(v);
367
+ w(O, C), b.capture && !b.passive && Math.abs(l.value) > Math.abs(m.value) && v.preventDefault(), !a.value && i.value && (a.value = !0), a.value && (n == null || n(v));
368
+ }, b),
369
+ M(e, ["touchend", "touchcancel"], E, b)
370
+ ];
371
+ return {
372
+ isSwiping: a,
373
+ direction: y,
374
+ coordsStart: f,
375
+ coordsEnd: r,
376
+ lengthX: l,
377
+ lengthY: m,
378
+ stop: () => W.forEach((v) => v()),
379
+ // TODO: Remove in the next major version
380
+ isPassiveEventSupported: !0
381
+ };
382
+ }
383
+ const Se = (e, s) => {
384
+ const t = D(!1), n = D(!1), d = D(null), c = pe();
385
+ c != null && c.escape && B(c.escape, () => {
386
+ h(new Event("close"));
387
+ });
388
+ const h = (r) => {
389
+ n.value = !1, setTimeout(() => {
390
+ t.value = !1;
391
+ }, 50), setTimeout(() => {
392
+ e("close", r || new Event("close"));
393
+ }, 300), d.value && clearTimeout(d.value);
394
+ }, f = () => e("open", t.value);
395
+ return Y(() => {
396
+ setTimeout(() => {
397
+ t.value = !0;
398
+ }, 300), setTimeout(() => {
399
+ n.value = !0;
400
+ }, 500), s && (d.value = setTimeout(() => {
401
+ h();
402
+ }, s * 1e3));
403
+ }), {
404
+ show: t,
405
+ overlay: n,
406
+ onClose: h,
407
+ onOpen: f
408
+ };
409
+ }, Ee = (e, s, t) => {
410
+ const n = x(() => {
411
+ var l;
412
+ return (l = s.value) == null ? void 0 : l.clientHeight;
413
+ }), d = P("translateY(0)"), c = P(1), h = P(!1);
414
+ if ((/* @__PURE__ */ he(me)).greaterOrEqual("lg")) {
415
+ const { lengthY: l } = we(e, {
416
+ passive: !1,
417
+ onSwipeStart() {
418
+ h.value = !0;
419
+ },
420
+ onSwipe() {
421
+ if (n.value)
422
+ if (l.value < 0) {
423
+ const m = Math.abs(l.value);
424
+ d.value = `translateY(${m}px)`, c.value = 1.1 - m / n.value, c.value < 0.3 && (c.value = 0);
425
+ } else
426
+ d.value = "translateY(0)", c.value = 1;
427
+ },
428
+ onSwipeEnd(m) {
429
+ h.value = !1, l.value < 0 && n.value && Math.abs(l.value) / n.value >= 0.5 ? (c.value = 0, setTimeout(() => {
430
+ t(m);
431
+ }, 100)) : (d.value = "translateY(0)", c.value = 1);
432
+ }
433
+ });
434
+ }
435
+ return {
436
+ isSwiping: h,
437
+ transform: d,
438
+ opacity: c
439
+ };
440
+ };
441
+ export {
442
+ Ee as a,
443
+ he as b,
444
+ me as c,
445
+ ye as d,
446
+ be as o,
447
+ Se as u
448
+ };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.3",
2
+ "version": "2.1.5",
3
3
  "name": "vuesp-components",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "default": "./dist/helpers/index.es.js"
33
33
  },
34
34
  "./types": {
35
- "types": "./dist/types/types.d.ts"
35
+ "types": "./dist/types/index.d.ts"
36
36
  },
37
37
  "./dist/style.css": {
38
38
  "import": "./dist/style.css",
@@ -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",
@@ -1,52 +0,0 @@
1
- import { IMenuItem, IDialog, IMessageInfo, IMessagePort, IMessageSettings, IMessageProgress, IDashboardItem } from './types';
2
- export interface INotification {
3
- key?: number;
4
- isNew: number;
5
- color: number;
6
- timeout: number;
7
- date: number;
8
- text: string;
9
- }
10
- export interface IPackage {
11
- name: string;
12
- version: string;
13
- author?: string;
14
- email?: string;
15
- homepage?: string;
16
- description?: string;
17
- repository?: {
18
- type: string;
19
- url: string;
20
- };
21
- bugs?: {
22
- url: string;
23
- };
24
- license?: string;
25
- }
26
- export interface IStateInfo extends IMessageInfo {
27
- pkg?: IPackage;
28
- board?: number;
29
- }
30
- export interface IStateMain {
31
- info: IStateInfo;
32
- ports: Record<string, IMessagePort>;
33
- }
34
- export interface IStateApp {
35
- menu: IMenuItem[];
36
- dashboard: IDashboardItem[];
37
- theme: string;
38
- dialog: IDialog;
39
- }
40
- export interface IStateWebSocket {
41
- socket: WebSocket | null;
42
- pingClient: number;
43
- pingDevice: number;
44
- isInit: boolean;
45
- }
46
- export interface IStateWebSocketStore {
47
- settings: IMessageSettings;
48
- main: IStateMain;
49
- progress: IMessageProgress;
50
- notifications: INotification[];
51
- }
52
- //# sourceMappingURL=state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/types/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGxI,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC5C,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,aAAa,EAAE,aAAa,EAAE,CAAC;CAChC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}