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