@leaflink/stash 50.2.0 → 50.3.0
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/Field.vue_vue_type_script_setup_true_lang-DEizIcDo.js.map +1 -1
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js.map +1 -1
- package/dist/ListView.vue.d.ts +5 -15
- package/dist/RadioGroup.js +1 -1
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +1 -1
- package/dist/Select.js.map +1 -1
- package/dist/TextEditor.js.map +1 -1
- package/dist/Textarea.js.map +1 -1
- package/dist/Tooltip.js +36 -157
- package/dist/Tooltip.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/index-Ck3Dl09q.js +128 -0
- package/dist/index-Ck3Dl09q.js.map +1 -0
- package/dist/useSortable.d.ts +94 -0
- package/dist/useSortable.js +116 -0
- package/dist/useSortable.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { unref as M, getCurrentScope as T, onScopeDispose as j, ref as d, watch as H } from "vue";
|
|
2
|
+
function C(e) {
|
|
3
|
+
return T() ? (j(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
function S(e) {
|
|
6
|
+
return typeof e == "function" ? e() : M(e);
|
|
7
|
+
}
|
|
8
|
+
const L = typeof window < "u" && typeof document < "u";
|
|
9
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
+
const k = Object.prototype.toString, B = (e) => k.call(e) === "[object Object]", D = () => {
|
|
11
|
+
}, W = L ? window : void 0;
|
|
12
|
+
function A(e) {
|
|
13
|
+
var n;
|
|
14
|
+
const u = S(e);
|
|
15
|
+
return (n = u == null ? void 0 : u.$el) != null ? n : u;
|
|
16
|
+
}
|
|
17
|
+
function X(...e) {
|
|
18
|
+
let n, u, l, a;
|
|
19
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([u, l, a] = e, n = W) : [n, u, l, a] = e, !n)
|
|
20
|
+
return D;
|
|
21
|
+
Array.isArray(u) || (u = [u]), Array.isArray(l) || (l = [l]);
|
|
22
|
+
const r = [], i = () => {
|
|
23
|
+
r.forEach((o) => o()), r.length = 0;
|
|
24
|
+
}, g = (o, s, c, p) => (o.addEventListener(s, c, p), () => o.removeEventListener(s, c, p)), f = H(
|
|
25
|
+
() => [A(n), S(a)],
|
|
26
|
+
([o, s]) => {
|
|
27
|
+
if (i(), !o)
|
|
28
|
+
return;
|
|
29
|
+
const c = B(s) ? { ...s } : s;
|
|
30
|
+
r.push(
|
|
31
|
+
...u.flatMap((p) => l.map((h) => g(o, p, h, c)))
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
{ immediate: !0, flush: "post" }
|
|
35
|
+
), v = () => {
|
|
36
|
+
f(), i();
|
|
37
|
+
};
|
|
38
|
+
return C(v), v;
|
|
39
|
+
}
|
|
40
|
+
const G = {
|
|
41
|
+
page: (e) => [e.pageX, e.pageY],
|
|
42
|
+
client: (e) => [e.clientX, e.clientY],
|
|
43
|
+
screen: (e) => [e.screenX, e.screenY],
|
|
44
|
+
movement: (e) => e instanceof Touch ? null : [e.movementX, e.movementY]
|
|
45
|
+
};
|
|
46
|
+
function P(e = {}) {
|
|
47
|
+
const {
|
|
48
|
+
type: n = "page",
|
|
49
|
+
touch: u = !0,
|
|
50
|
+
resetOnTouchEnds: l = !1,
|
|
51
|
+
initialValue: a = { x: 0, y: 0 },
|
|
52
|
+
window: r = W,
|
|
53
|
+
target: i = r,
|
|
54
|
+
scroll: g = !0,
|
|
55
|
+
eventFilter: f
|
|
56
|
+
} = e;
|
|
57
|
+
let v = null;
|
|
58
|
+
const o = d(a.x), s = d(a.y), c = d(null), p = typeof n == "function" ? n : G[n], h = (t) => {
|
|
59
|
+
const m = p(t);
|
|
60
|
+
v = t, m && ([o.value, s.value] = m, c.value = "mouse");
|
|
61
|
+
}, y = (t) => {
|
|
62
|
+
if (t.touches.length > 0) {
|
|
63
|
+
const m = p(t.touches[0]);
|
|
64
|
+
m && ([o.value, s.value] = m, c.value = "touch");
|
|
65
|
+
}
|
|
66
|
+
}, w = () => {
|
|
67
|
+
if (!v || !r)
|
|
68
|
+
return;
|
|
69
|
+
const t = p(v);
|
|
70
|
+
v instanceof MouseEvent && t && (o.value = t[0] + r.scrollX, s.value = t[1] + r.scrollY);
|
|
71
|
+
}, E = () => {
|
|
72
|
+
o.value = a.x, s.value = a.y;
|
|
73
|
+
}, Y = f ? (t) => f(() => h(t), {}) : (t) => h(t), b = f ? (t) => f(() => y(t), {}) : (t) => y(t), O = f ? () => f(() => w(), {}) : () => w();
|
|
74
|
+
if (i) {
|
|
75
|
+
const t = { passive: !0 };
|
|
76
|
+
X(i, ["mousemove", "dragover"], Y, t), u && n !== "movement" && (X(i, ["touchstart", "touchmove"], b, t), l && X(i, "touchend", E, t)), g && n === "page" && X(r, "scroll", O, { passive: !0 });
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
x: o,
|
|
80
|
+
y: s,
|
|
81
|
+
sourceType: c
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function V(e, n = {}) {
|
|
85
|
+
const {
|
|
86
|
+
handleOutside: u = !0,
|
|
87
|
+
window: l = W
|
|
88
|
+
} = n, a = n.type || "page", { x: r, y: i, sourceType: g } = P(n), f = d(e ?? (l == null ? void 0 : l.document.body)), v = d(0), o = d(0), s = d(0), c = d(0), p = d(0), h = d(0), y = d(!0);
|
|
89
|
+
let w = () => {
|
|
90
|
+
};
|
|
91
|
+
return l && (w = H(
|
|
92
|
+
[f, r, i],
|
|
93
|
+
() => {
|
|
94
|
+
const E = A(f);
|
|
95
|
+
if (!E || !(E instanceof Element))
|
|
96
|
+
return;
|
|
97
|
+
const {
|
|
98
|
+
left: Y,
|
|
99
|
+
top: b,
|
|
100
|
+
width: O,
|
|
101
|
+
height: t
|
|
102
|
+
} = E.getBoundingClientRect();
|
|
103
|
+
s.value = Y + (a === "page" ? l.pageXOffset : 0), c.value = b + (a === "page" ? l.pageYOffset : 0), p.value = t, h.value = O;
|
|
104
|
+
const m = r.value - s.value, x = i.value - c.value;
|
|
105
|
+
y.value = O === 0 || t === 0 || m < 0 || x < 0 || m > O || x > t, (u || !y.value) && (v.value = m, o.value = x);
|
|
106
|
+
},
|
|
107
|
+
{ immediate: !0 }
|
|
108
|
+
), X(document, "mouseleave", () => {
|
|
109
|
+
y.value = !0;
|
|
110
|
+
})), {
|
|
111
|
+
x: r,
|
|
112
|
+
y: i,
|
|
113
|
+
sourceType: g,
|
|
114
|
+
elementX: v,
|
|
115
|
+
elementY: o,
|
|
116
|
+
elementPositionX: s,
|
|
117
|
+
elementPositionY: c,
|
|
118
|
+
elementHeight: p,
|
|
119
|
+
elementWidth: h,
|
|
120
|
+
isOutside: y,
|
|
121
|
+
stop: w
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export {
|
|
125
|
+
A as a,
|
|
126
|
+
V as u
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=index-Ck3Dl09q.js.map
|