@opentiny/tiny-robot 0.2.1 → 0.2.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/dist/action-group/index.js +1 -1
- package/dist/bubble/index.js +2 -3
- package/dist/close.js +1 -1
- package/dist/dropdown-menu/index.js +41 -40
- package/dist/feedback/index.js +2 -1
- package/dist/flow-layout-buttons/index.js +21 -21
- package/dist/history/index.js +2 -3
- package/dist/index.d.ts +12 -12
- package/dist/index2.js +37 -37
- package/dist/index3.js +129 -3717
- package/dist/index4.js +7 -7
- package/dist/index5.js +931 -2011
- package/dist/index6.js +1001 -875
- package/dist/prompts/index.js +2 -3
- package/dist/sender/index.js +45 -47
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +107 -92
- package/dist/suggestion-popover/index.js +77 -76
- package/dist/tiny-robot-svgs.js +11 -11
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, useSlots as H, computed as i, ref as f, watch as N, nextTick as W, createElementBlock as _, openBlock as n, createBlock as v, createCommentVNode as R, Fragment as G, renderList as I, unref as h, withCtx as S, createElementVNode as w, resolveDynamicComponent as x, renderSlot as L, createVNode as E, Transition as j, withDirectives as q, normalizeClass as J, withModifiers as K, toDisplayString as Q, vShow as U } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { c as Y } from "../tiny-robot-svgs.js";
|
|
3
3
|
import { T as M } from "../index4.js";
|
|
4
4
|
import { o as Z, a as ee } from "../index2.js";
|
|
5
5
|
import te from "../icon-button/index.js";
|
package/dist/bubble/index.js
CHANGED
|
@@ -3182,9 +3182,8 @@ const Ir = {
|
|
|
3182
3182
|
ref: t
|
|
3183
3183
|
}, [
|
|
3184
3184
|
(S(!0), L(U0, null, Ou(e.items, (s, f) => (S(), yu(J, Nu({
|
|
3185
|
-
key: s.id || f
|
|
3186
|
-
|
|
3187
|
-
}, c(s)), Z0({ _: 2 }, [
|
|
3185
|
+
key: s.id || f
|
|
3186
|
+
}, { ref_for: !0 }, c(s)), Z0({ _: 2 }, [
|
|
3188
3187
|
Ou(o(s), (d, h) => ({
|
|
3189
3188
|
name: h,
|
|
3190
3189
|
fn: H0((b) => [
|
package/dist/close.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { c as
|
|
1
|
+
import { defineComponent as B, useCssVars as E, unref as f, useAttrs as N, computed as _, ref as m, watch as O, createElementBlock as o, openBlock as s, Fragment as w, createElementVNode as h, createVNode as W, normalizeStyle as v, normalizeClass as z, renderSlot as I, Transition as A, withCtx as F, createCommentVNode as H, renderList as L, toDisplayString as P } from "vue";
|
|
2
|
+
import { c as g, o as U } from "../index2.js";
|
|
3
3
|
import { t as n } from "../utils.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
4
|
+
import { _ as b } from "../_plugin-vue_export-helper.js";
|
|
5
|
+
const j = { class: "tr-dropdown-menu__list" }, q = ["onClick"], G = /* @__PURE__ */ B({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
items: {},
|
|
@@ -10,62 +10,63 @@ const L = { class: "tr-dropdown-menu__list" }, P = ["onClick"], U = /* @__PURE__
|
|
|
10
10
|
topOffset: { default: 0 }
|
|
11
11
|
},
|
|
12
12
|
emits: ["item-click"],
|
|
13
|
-
setup(l, { emit:
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
setup(l, { emit: k }) {
|
|
14
|
+
E((e) => ({
|
|
15
|
+
d82a8430: f(n)(a.minWidth)
|
|
16
16
|
}));
|
|
17
|
-
const a = l, t = m(!1),
|
|
18
|
-
left: `min(${n(
|
|
19
|
-
top: `max(${n(
|
|
17
|
+
const a = l, p = N(), y = _(() => p.style), t = m(!1), C = k, i = m(null), d = m(null), { x, y: $, update: S } = g(i), { width: D, height: T } = g(d), M = _(() => ({
|
|
18
|
+
left: `min(${n(x.value)}, 100% - ${n(D.value)})`,
|
|
19
|
+
top: `max(${n($.value)} - ${n(T.value)} + ${n(a.topOffset)} - 8px, 0px)`
|
|
20
20
|
}));
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
(
|
|
24
|
-
}),
|
|
25
|
-
e &&
|
|
21
|
+
U(d, (e) => {
|
|
22
|
+
var u;
|
|
23
|
+
(u = i.value) != null && u.contains(e.target) && e.stopPropagation(), t.value = !1;
|
|
24
|
+
}), O(t, (e) => {
|
|
25
|
+
e && S();
|
|
26
26
|
});
|
|
27
|
-
const
|
|
27
|
+
const R = () => {
|
|
28
28
|
t.value = !t.value;
|
|
29
|
-
},
|
|
30
|
-
t.value = !1,
|
|
29
|
+
}, V = (e) => {
|
|
30
|
+
t.value = !1, C("item-click", e);
|
|
31
31
|
};
|
|
32
|
-
return (e,
|
|
33
|
-
|
|
34
|
-
class: "tr-dropdown-menu__wrapper",
|
|
32
|
+
return (e, u) => (s(), o(w, null, [
|
|
33
|
+
h("div", {
|
|
34
|
+
class: z(["tr-dropdown-menu__wrapper", f(p).class]),
|
|
35
|
+
style: v(y.value),
|
|
35
36
|
ref_key: "dropDownTriggerRef",
|
|
36
37
|
ref: i,
|
|
37
|
-
onClick:
|
|
38
|
+
onClick: R
|
|
38
39
|
}, [
|
|
39
|
-
|
|
40
|
-
],
|
|
41
|
-
|
|
42
|
-
default:
|
|
43
|
-
t.value ? (
|
|
40
|
+
I(e.$slots, "default", {}, void 0, !0)
|
|
41
|
+
], 6),
|
|
42
|
+
W(A, { name: "tr-dropdown-menu" }, {
|
|
43
|
+
default: F(() => [
|
|
44
|
+
t.value ? (s(), o("div", {
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "tr-dropdown-menu",
|
|
46
|
-
style:
|
|
47
|
+
style: v(M.value),
|
|
47
48
|
ref_key: "dropdownMenuRef",
|
|
48
49
|
ref: d
|
|
49
50
|
}, [
|
|
50
|
-
|
|
51
|
-
(
|
|
51
|
+
h("ul", j, [
|
|
52
|
+
(s(!0), o(w, null, L(a.items, (c) => (s(), o("li", {
|
|
52
53
|
class: "tr-dropdown-menu__list-item",
|
|
53
|
-
key:
|
|
54
|
-
onClick: (
|
|
55
|
-
},
|
|
54
|
+
key: c.id,
|
|
55
|
+
onClick: (K) => V(c)
|
|
56
|
+
}, P(c.text), 9, q))), 128))
|
|
56
57
|
])
|
|
57
|
-
], 4)) :
|
|
58
|
+
], 4)) : H("", !0)
|
|
58
59
|
]),
|
|
59
60
|
_: 1
|
|
60
61
|
})
|
|
61
62
|
], 64));
|
|
62
63
|
}
|
|
63
|
-
}),
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
l.component(
|
|
64
|
+
}), r = /* @__PURE__ */ b(G, [["__scopeId", "data-v-620f91f9"]]);
|
|
65
|
+
r.name = "TrDropdownMenu";
|
|
66
|
+
const J = function(l) {
|
|
67
|
+
l.component(r.name, r);
|
|
67
68
|
};
|
|
68
|
-
|
|
69
|
+
r.install = J;
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
+
r as default
|
|
71
72
|
};
|
package/dist/feedback/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as V, mergeModels as E, useModel as
|
|
2
|
-
import { U as
|
|
3
|
-
import { b as
|
|
1
|
+
import { defineComponent as V, mergeModels as E, useModel as j, watch as g, ref as i, computed as $, createElementBlock as a, openBlock as l, createElementVNode as b, Fragment as C, renderList as F, createCommentVNode as _, normalizeClass as I, createBlock as x, resolveDynamicComponent as B, toDisplayString as S, nextTick as q } from "vue";
|
|
2
|
+
import { U as G } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { b as H, o as X } from "../index2.js";
|
|
4
4
|
import { _ as J } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const K = ["onClick"], P = {
|
|
6
6
|
key: 0,
|
|
@@ -11,15 +11,15 @@ const K = ["onClick"], P = {
|
|
|
11
11
|
items: {},
|
|
12
12
|
selected: {},
|
|
13
13
|
linesLimit: { default: Number.MAX_SAFE_INTEGER },
|
|
14
|
-
moreIcon: { default:
|
|
14
|
+
moreIcon: { type: [Object, Function], default: G },
|
|
15
15
|
showMoreTrigger: { default: "click" }
|
|
16
16
|
}, {
|
|
17
17
|
selected: {},
|
|
18
18
|
selectedModifiers: {}
|
|
19
19
|
}),
|
|
20
20
|
emits: /* @__PURE__ */ E(["item-click"], ["update:selected"]),
|
|
21
|
-
setup(d, { emit:
|
|
22
|
-
const n = d, u =
|
|
21
|
+
setup(d, { emit: D }) {
|
|
22
|
+
const n = d, u = j(d, "selected");
|
|
23
23
|
g(
|
|
24
24
|
() => n.items,
|
|
25
25
|
(t) => {
|
|
@@ -27,10 +27,10 @@ const K = ["onClick"], P = {
|
|
|
27
27
|
},
|
|
28
28
|
{ immediate: !0 }
|
|
29
29
|
);
|
|
30
|
-
const N =
|
|
30
|
+
const N = D, y = i(null), w = i(null), k = i(null), M = i([]), s = i(null), m = i(!1), c = i(!1), A = (t, o) => {
|
|
31
31
|
t && (M.value[o] = t);
|
|
32
32
|
}, L = () => {
|
|
33
|
-
s.value = null, m.value = !1,
|
|
33
|
+
s.value = null, m.value = !1, q(() => {
|
|
34
34
|
const t = y.value, o = w.value;
|
|
35
35
|
if (!t || !o)
|
|
36
36
|
return;
|
|
@@ -43,18 +43,18 @@ const K = ["onClick"], P = {
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
g(() => n.items, L);
|
|
46
|
-
const { width:
|
|
47
|
-
g(
|
|
46
|
+
const { width: O } = H(y);
|
|
47
|
+
g(O, (t) => {
|
|
48
48
|
t > 0 && L();
|
|
49
49
|
});
|
|
50
|
-
const
|
|
50
|
+
const W = $(() => s.value !== null ? n.items.slice(s.value) : []), z = $(() => s.value === null ? !1 : n.items.findIndex((o) => o.id === u.value) >= s.value), R = (t) => {
|
|
51
51
|
u.value = t, c.value = !1, N("item-click", t);
|
|
52
52
|
}, U = () => {
|
|
53
53
|
n.showMoreTrigger === "click" && (c.value = !c.value);
|
|
54
54
|
}, v = (t) => {
|
|
55
55
|
n.showMoreTrigger === "hover" && (c.value = t);
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return X(k, (t) => {
|
|
58
58
|
var o, e;
|
|
59
59
|
(o = k.value) != null && o.contains(t.target) || (e = w.value) != null && e.contains(t.target) || (c.value = !1);
|
|
60
60
|
}), (t, o) => (l(), a("div", {
|
|
@@ -62,24 +62,24 @@ const K = ["onClick"], P = {
|
|
|
62
62
|
ref_key: "containerRef",
|
|
63
63
|
ref: y
|
|
64
64
|
}, [
|
|
65
|
-
(l(!0), a(
|
|
65
|
+
(l(!0), a(C, null, F(n.items, (e, f) => (l(), a(C, {
|
|
66
66
|
key: e.id
|
|
67
67
|
}, [
|
|
68
68
|
s.value === null || f < s.value ? (l(), a("button", {
|
|
69
69
|
key: 0,
|
|
70
|
-
class:
|
|
70
|
+
class: I(["tr-flow-layout__item", { "icon-only": !e.label }, { selected: e.id === u.value }]),
|
|
71
71
|
ref_for: !0,
|
|
72
72
|
ref: (r) => A(r, f),
|
|
73
73
|
onClick: (r) => R(e.id)
|
|
74
74
|
}, [
|
|
75
75
|
(l(), x(B(e.icon), { class: "tr-flow-layout__item-icon" })),
|
|
76
|
-
e.label ? (l(), a("span", P,
|
|
76
|
+
e.label ? (l(), a("span", P, S(e.label), 1)) : _("", !0)
|
|
77
77
|
], 10, K)) : _("", !0)
|
|
78
78
|
], 64))), 128)),
|
|
79
|
-
|
|
79
|
+
b("div", Q, [
|
|
80
80
|
m.value ? _("", !0) : (l(), a("button", {
|
|
81
81
|
key: 0,
|
|
82
|
-
class:
|
|
82
|
+
class: I(["tr-flow-layout__item", "icon-only", { selected: z.value }]),
|
|
83
83
|
ref_key: "moreButtonRef",
|
|
84
84
|
ref: w,
|
|
85
85
|
onClick: U,
|
|
@@ -88,7 +88,7 @@ const K = ["onClick"], P = {
|
|
|
88
88
|
}, [
|
|
89
89
|
(l(), x(B(n.moreIcon), { class: "tr-flow-layout__item-icon" }))
|
|
90
90
|
], 34)),
|
|
91
|
-
|
|
91
|
+
b("div", {
|
|
92
92
|
class: "tr-flow-layout__dropdown-container",
|
|
93
93
|
onMouseenter: o[2] || (o[2] = (e) => v(!0)),
|
|
94
94
|
onMouseleave: o[3] || (o[3] = (e) => v(!1))
|
|
@@ -99,13 +99,13 @@ const K = ["onClick"], P = {
|
|
|
99
99
|
ref_key: "dropDownRef",
|
|
100
100
|
ref: k
|
|
101
101
|
}, [
|
|
102
|
-
(l(!0), a(
|
|
103
|
-
class:
|
|
102
|
+
(l(!0), a(C, null, F(W.value, (e) => (l(), a("button", {
|
|
103
|
+
class: I(["tr-flow-layout__dropdown_item", { selected: e.id === u.value }]),
|
|
104
104
|
key: e.id,
|
|
105
105
|
onClick: (f) => R(e.id)
|
|
106
106
|
}, [
|
|
107
107
|
(l(), x(B(e.icon), { class: "tr-flow-layout__item-icon" })),
|
|
108
|
-
|
|
108
|
+
b("span", Z, S(e.label), 1)
|
|
109
109
|
], 10, Y))), 128))
|
|
110
110
|
], 512)) : _("", !0)
|
|
111
111
|
], 32)
|
package/dist/history/index.js
CHANGED
|
@@ -156,9 +156,8 @@ const ue = /* @__PURE__ */ V({
|
|
|
156
156
|
p("span", Ie, k(d.title), 1),
|
|
157
157
|
d.tag ? (n(), R(e(de), te({
|
|
158
158
|
key: 0,
|
|
159
|
-
class: "tr-history__item-tag"
|
|
160
|
-
|
|
161
|
-
}, d.tag), null, 16)) : E("", !0),
|
|
159
|
+
class: "tr-history__item-tag"
|
|
160
|
+
}, { ref_for: !0 }, d.tag), null, 16)) : E("", !0),
|
|
162
161
|
p("div", we, [
|
|
163
162
|
m(e(S), {
|
|
164
163
|
content: "编辑",
|
package/dist/index.d.ts
CHANGED
|
@@ -394,20 +394,20 @@ disabled: boolean;
|
|
|
394
394
|
type: string;
|
|
395
395
|
ellipsis: boolean;
|
|
396
396
|
mask: boolean;
|
|
397
|
+
vertical: boolean;
|
|
398
|
+
customClass: string;
|
|
397
399
|
tiny_mode_root: boolean;
|
|
398
400
|
_constants: Record<string, any>;
|
|
399
401
|
tabindex: string;
|
|
400
|
-
contentStyle: Record<string, any>;
|
|
401
|
-
customClass: string;
|
|
402
402
|
showTitle: boolean;
|
|
403
403
|
readonly: boolean;
|
|
404
404
|
hoverExpand: boolean;
|
|
405
405
|
memorySpace: number;
|
|
406
|
-
vertical: boolean;
|
|
407
406
|
selectMenu: {
|
|
408
407
|
id: string;
|
|
409
408
|
label: string;
|
|
410
409
|
}[];
|
|
410
|
+
contentStyle: Record<string, any>;
|
|
411
411
|
isSelect: boolean;
|
|
412
412
|
counter: boolean;
|
|
413
413
|
autosize: boolean | Record<string, any>;
|
|
@@ -621,20 +621,20 @@ disabled: boolean;
|
|
|
621
621
|
type: string;
|
|
622
622
|
ellipsis: boolean;
|
|
623
623
|
mask: boolean;
|
|
624
|
+
vertical: boolean;
|
|
625
|
+
customClass: string;
|
|
624
626
|
tiny_mode_root: boolean;
|
|
625
627
|
_constants: Record<string, any>;
|
|
626
628
|
tabindex: string;
|
|
627
|
-
contentStyle: Record<string, any>;
|
|
628
|
-
customClass: string;
|
|
629
629
|
showTitle: boolean;
|
|
630
630
|
readonly: boolean;
|
|
631
631
|
hoverExpand: boolean;
|
|
632
632
|
memorySpace: number;
|
|
633
|
-
vertical: boolean;
|
|
634
633
|
selectMenu: {
|
|
635
634
|
id: string;
|
|
636
635
|
label: string;
|
|
637
636
|
}[];
|
|
637
|
+
contentStyle: Record<string, any>;
|
|
638
638
|
isSelect: boolean;
|
|
639
639
|
counter: boolean;
|
|
640
640
|
autosize: boolean | Record<string, any>;
|
|
@@ -1176,20 +1176,20 @@ declare function __VLS_template_5(): {
|
|
|
1176
1176
|
type: string;
|
|
1177
1177
|
ellipsis: boolean;
|
|
1178
1178
|
mask: boolean;
|
|
1179
|
+
vertical: boolean;
|
|
1180
|
+
customClass: string;
|
|
1179
1181
|
tiny_mode_root: boolean;
|
|
1180
1182
|
_constants: Record<string, any>;
|
|
1181
1183
|
tabindex: string;
|
|
1182
|
-
contentStyle: Record<string, any>;
|
|
1183
|
-
customClass: string;
|
|
1184
1184
|
showTitle: boolean;
|
|
1185
1185
|
readonly: boolean;
|
|
1186
1186
|
hoverExpand: boolean;
|
|
1187
1187
|
memorySpace: number;
|
|
1188
|
-
vertical: boolean;
|
|
1189
1188
|
selectMenu: {
|
|
1190
1189
|
id: string;
|
|
1191
1190
|
label: string;
|
|
1192
1191
|
}[];
|
|
1192
|
+
contentStyle: Record<string, any>;
|
|
1193
1193
|
isSelect: boolean;
|
|
1194
1194
|
counter: boolean;
|
|
1195
1195
|
autosize: boolean | Record<string, any>;
|
|
@@ -1403,20 +1403,20 @@ declare function __VLS_template_5(): {
|
|
|
1403
1403
|
type: string;
|
|
1404
1404
|
ellipsis: boolean;
|
|
1405
1405
|
mask: boolean;
|
|
1406
|
+
vertical: boolean;
|
|
1407
|
+
customClass: string;
|
|
1406
1408
|
tiny_mode_root: boolean;
|
|
1407
1409
|
_constants: Record<string, any>;
|
|
1408
1410
|
tabindex: string;
|
|
1409
|
-
contentStyle: Record<string, any>;
|
|
1410
|
-
customClass: string;
|
|
1411
1411
|
showTitle: boolean;
|
|
1412
1412
|
readonly: boolean;
|
|
1413
1413
|
hoverExpand: boolean;
|
|
1414
1414
|
memorySpace: number;
|
|
1415
|
-
vertical: boolean;
|
|
1416
1415
|
selectMenu: {
|
|
1417
1416
|
id: string;
|
|
1418
1417
|
label: string;
|
|
1419
1418
|
}[];
|
|
1419
|
+
contentStyle: Record<string, any>;
|
|
1420
1420
|
isSelect: boolean;
|
|
1421
1421
|
counter: boolean;
|
|
1422
1422
|
autosize: boolean | Record<string, any>;
|
package/dist/index2.js
CHANGED
|
@@ -60,7 +60,7 @@ function Se(...e) {
|
|
|
60
60
|
function K(e) {
|
|
61
61
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function k(e) {
|
|
64
64
|
return Array.isArray(e) ? e : [e];
|
|
65
65
|
}
|
|
66
66
|
function ye(e) {
|
|
@@ -126,19 +126,19 @@ function E(e) {
|
|
|
126
126
|
const o = g(e);
|
|
127
127
|
return (t = o == null ? void 0 : o.$el) != null ? t : o;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function M(...e) {
|
|
130
130
|
const t = [], o = () => {
|
|
131
131
|
t.forEach((i) => i()), t.length = 0;
|
|
132
132
|
}, n = (i, l, s, h) => (i.addEventListener(l, s, h), () => i.removeEventListener(l, s, h)), v = I(() => {
|
|
133
|
-
const i =
|
|
133
|
+
const i = k(g(e[0])).filter((l) => l != null);
|
|
134
134
|
return i.every((l) => typeof l != "string") ? i : void 0;
|
|
135
135
|
}), c = We(
|
|
136
136
|
() => {
|
|
137
137
|
var i, l;
|
|
138
138
|
return [
|
|
139
139
|
(l = (i = v.value) == null ? void 0 : i.map((s) => E(s))) != null ? l : [R].filter((s) => s != null),
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
k(g(v.value ? e[1] : e[0])),
|
|
141
|
+
k(de(v.value ? e[2] : e[1])),
|
|
142
142
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
143
143
|
g(v.value ? e[3] : e[2])
|
|
144
144
|
];
|
|
@@ -169,7 +169,7 @@ function Fe(e, t, o = {}) {
|
|
|
169
169
|
if (we && !Z) {
|
|
170
170
|
Z = !0;
|
|
171
171
|
const u = { passive: !0 };
|
|
172
|
-
Array.from(n.document.body.children).forEach((f) =>
|
|
172
|
+
Array.from(n.document.body.children).forEach((f) => f.addEventListener("click", x, u)), n.document.documentElement.addEventListener("click", x, u);
|
|
173
173
|
}
|
|
174
174
|
let l = !0;
|
|
175
175
|
const s = (u) => g(v).some((f) => {
|
|
@@ -186,7 +186,7 @@ function Fe(e, t, o = {}) {
|
|
|
186
186
|
}
|
|
187
187
|
function r(u, f) {
|
|
188
188
|
const p = g(u), F = p.$.subTree && p.$.subTree.children;
|
|
189
|
-
return F == null || !Array.isArray(F) ? !1 : F.some((
|
|
189
|
+
return F == null || !Array.isArray(F) ? !1 : F.some((D) => D.el === f.target || f.composedPath().includes(D.el));
|
|
190
190
|
}
|
|
191
191
|
const a = (u) => {
|
|
192
192
|
const f = E(e);
|
|
@@ -200,16 +200,16 @@ function Fe(e, t, o = {}) {
|
|
|
200
200
|
};
|
|
201
201
|
let m = !1;
|
|
202
202
|
const b = [
|
|
203
|
-
|
|
203
|
+
M(n, "click", (u) => {
|
|
204
204
|
m || (m = !0, setTimeout(() => {
|
|
205
205
|
m = !1;
|
|
206
206
|
}, 0), a(u));
|
|
207
207
|
}, { passive: !0, capture: c }),
|
|
208
|
-
|
|
208
|
+
M(n, "pointerdown", (u) => {
|
|
209
209
|
const f = E(e);
|
|
210
210
|
l = !s(u) && !!(f && !u.composedPath().includes(f));
|
|
211
211
|
}, { passive: !0 }),
|
|
212
|
-
d &&
|
|
212
|
+
d && M(n, "blur", (u) => {
|
|
213
213
|
setTimeout(() => {
|
|
214
214
|
var f;
|
|
215
215
|
const p = E(e);
|
|
@@ -243,7 +243,7 @@ function Oe(e, t, o = {}) {
|
|
|
243
243
|
const d = G(() => n && "MutationObserver" in n), i = () => {
|
|
244
244
|
c && (c.disconnect(), c = void 0);
|
|
245
245
|
}, l = I(() => {
|
|
246
|
-
const a = g(e), m =
|
|
246
|
+
const a = g(e), m = k(a).map(E).filter(he);
|
|
247
247
|
return new Set(m);
|
|
248
248
|
}), s = _(
|
|
249
249
|
() => l.value,
|
|
@@ -281,7 +281,7 @@ function Pe(e, t = {}) {
|
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
283
|
v.value && (d.value = o.matchMedia(g(e)), i.value = d.value.matches);
|
|
284
|
-
}),
|
|
284
|
+
}), M(d, "change", l, { passive: !0 }), I(() => i.value);
|
|
285
285
|
}
|
|
286
286
|
function le(e, t, o = {}) {
|
|
287
287
|
const { window: n = R, ...v } = o;
|
|
@@ -309,7 +309,7 @@ function le(e, t, o = {}) {
|
|
|
309
309
|
stop: h
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Le(e, t = {}) {
|
|
313
313
|
const {
|
|
314
314
|
reset: o = !0,
|
|
315
315
|
windowResize: n = !0,
|
|
@@ -331,7 +331,7 @@ function Ce(e, t = {}) {
|
|
|
331
331
|
}
|
|
332
332
|
return le(e, u), _(() => E(e), (f) => !f && u()), Oe(e, u, {
|
|
333
333
|
attributeFilter: ["style", "class"]
|
|
334
|
-
}), v &&
|
|
334
|
+
}), v && M("scroll", u, { capture: !0, passive: !0 }), n && M("resize", u, { passive: !0 }), V(() => {
|
|
335
335
|
c && u();
|
|
336
336
|
}), {
|
|
337
337
|
height: i,
|
|
@@ -345,7 +345,7 @@ function Ce(e, t = {}) {
|
|
|
345
345
|
update: u
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Ce(e, t = { width: 0, height: 0 }, o = {}) {
|
|
349
349
|
const { window: n = R, box: v = "content-box" } = o, c = I(() => {
|
|
350
350
|
var r, a;
|
|
351
351
|
return (a = (r = E(e)) == null ? void 0 : r.namespaceURI) == null ? void 0 : a.includes("svg");
|
|
@@ -360,7 +360,7 @@ function ke(e, t = { width: 0, height: 0 }, o = {}) {
|
|
|
360
360
|
d.value = b.width, i.value = b.height;
|
|
361
361
|
}
|
|
362
362
|
} else if (a) {
|
|
363
|
-
const m =
|
|
363
|
+
const m = k(a);
|
|
364
364
|
d.value = m.reduce((b, { inlineSize: y }) => b + y, 0), i.value = m.reduce((b, { blockSize: y }) => b + y, 0);
|
|
365
365
|
} else
|
|
366
366
|
d.value = r.contentRect.width, i.value = r.contentRect.height;
|
|
@@ -387,7 +387,7 @@ function ke(e, t = { width: 0, height: 0 }, o = {}) {
|
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
389
|
const ee = 1;
|
|
390
|
-
function
|
|
390
|
+
function ke(e, t = {}) {
|
|
391
391
|
const {
|
|
392
392
|
throttle: o = 0,
|
|
393
393
|
idle: n = 200,
|
|
@@ -424,18 +424,18 @@ function De(e, t = {}) {
|
|
|
424
424
|
}
|
|
425
425
|
});
|
|
426
426
|
function y(w, P) {
|
|
427
|
-
var T,
|
|
427
|
+
var T, L, C, j;
|
|
428
428
|
if (!s)
|
|
429
429
|
return;
|
|
430
|
-
const
|
|
431
|
-
if (!
|
|
430
|
+
const W = g(e);
|
|
431
|
+
if (!W)
|
|
432
432
|
return;
|
|
433
|
-
(
|
|
433
|
+
(C = W instanceof Document ? s.document.body : W) == null || C.scrollTo({
|
|
434
434
|
top: (T = g(P)) != null ? T : b.value,
|
|
435
|
-
left: (
|
|
435
|
+
left: (L = g(w)) != null ? L : m.value,
|
|
436
436
|
behavior: g(l)
|
|
437
437
|
});
|
|
438
|
-
const O = ((j =
|
|
438
|
+
const O = ((j = W == null ? void 0 : W.document) == null ? void 0 : j.documentElement) || (W == null ? void 0 : W.documentElement) || W;
|
|
439
439
|
m != null && (r.value = O.scrollLeft), b != null && (a.value = O.scrollTop);
|
|
440
440
|
}
|
|
441
441
|
const u = S(!1), f = J({
|
|
@@ -450,26 +450,26 @@ function De(e, t = {}) {
|
|
|
450
450
|
bottom: !1
|
|
451
451
|
}), F = (w) => {
|
|
452
452
|
u.value && (u.value = !1, p.left = !1, p.right = !1, p.top = !1, p.bottom = !1, v(w));
|
|
453
|
-
},
|
|
453
|
+
}, D = Ee(F, o + n), z = (w) => {
|
|
454
454
|
var P;
|
|
455
455
|
if (!s)
|
|
456
456
|
return;
|
|
457
|
-
const T = ((P = w == null ? void 0 : w.document) == null ? void 0 : P.documentElement) || (w == null ? void 0 : w.documentElement) || E(w), { display:
|
|
457
|
+
const T = ((P = w == null ? void 0 : w.document) == null ? void 0 : P.documentElement) || (w == null ? void 0 : w.documentElement) || E(w), { display: L, flexDirection: C, direction: j } = getComputedStyle(T), W = j === "rtl" ? -1 : 1, O = T.scrollLeft;
|
|
458
458
|
p.left = O < r.value, p.right = O > r.value;
|
|
459
|
-
const Q = Math.abs(O *
|
|
460
|
-
|
|
459
|
+
const Q = Math.abs(O * W) <= (d.left || 0), X = Math.abs(O * W) + T.clientWidth >= T.scrollWidth - (d.right || 0) - ee;
|
|
460
|
+
L === "flex" && C === "row-reverse" ? (f.left = X, f.right = Q) : (f.left = Q, f.right = X), r.value = O;
|
|
461
461
|
let A = T.scrollTop;
|
|
462
462
|
w === s.document && !A && (A = s.document.body.scrollTop), p.top = A < a.value, p.bottom = A > a.value;
|
|
463
463
|
const U = Math.abs(A) <= (d.top || 0), q = Math.abs(A) + T.clientHeight >= T.scrollHeight - (d.bottom || 0) - ee;
|
|
464
|
-
|
|
464
|
+
L === "flex" && C === "column-reverse" ? (f.top = q, f.bottom = U) : (f.top = U, f.bottom = q), a.value = A;
|
|
465
465
|
}, Y = (w) => {
|
|
466
466
|
var P;
|
|
467
467
|
if (!s)
|
|
468
468
|
return;
|
|
469
469
|
const T = (P = w.target.documentElement) != null ? P : w.target;
|
|
470
|
-
z(T), u.value = !0,
|
|
470
|
+
z(T), u.value = !0, D(w), c(w);
|
|
471
471
|
};
|
|
472
|
-
return
|
|
472
|
+
return M(
|
|
473
473
|
e,
|
|
474
474
|
"scroll",
|
|
475
475
|
o ? Te(Y, o, !0, !1) : Y,
|
|
@@ -483,7 +483,7 @@ function De(e, t = {}) {
|
|
|
483
483
|
} catch (w) {
|
|
484
484
|
h(w);
|
|
485
485
|
}
|
|
486
|
-
}),
|
|
486
|
+
}), M(
|
|
487
487
|
e,
|
|
488
488
|
"scrollend",
|
|
489
489
|
F,
|
|
@@ -500,7 +500,7 @@ function De(e, t = {}) {
|
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function De(e = {}) {
|
|
504
504
|
const {
|
|
505
505
|
window: t = R,
|
|
506
506
|
initialWidth: o = Number.POSITIVE_INFINITY,
|
|
@@ -519,18 +519,18 @@ function Le(e = {}) {
|
|
|
519
519
|
};
|
|
520
520
|
s(), V(s);
|
|
521
521
|
const h = { passive: !0 };
|
|
522
|
-
if (
|
|
522
|
+
if (M("resize", s, h), t && d === "visual" && t.visualViewport && M(t.visualViewport, "resize", s, h), v) {
|
|
523
523
|
const r = Pe("(orientation: portrait)");
|
|
524
524
|
_(r, () => s());
|
|
525
525
|
}
|
|
526
526
|
return { width: i, height: l };
|
|
527
527
|
}
|
|
528
528
|
export {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
529
|
+
De as a,
|
|
530
|
+
Ce as b,
|
|
531
|
+
Le as c,
|
|
532
532
|
Pe as d,
|
|
533
533
|
Fe as o,
|
|
534
|
-
|
|
534
|
+
ke as u,
|
|
535
535
|
_e as w
|
|
536
536
|
};
|