@opentiny/tiny-robot 0.4.2-alpha.1 → 0.4.2-alpha.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/{content-nav → anchor}/index.js +263 -263
- package/dist/feedback/index.js +2 -2
- package/dist/index.d.ts +89 -90
- package/dist/index.js +53 -53
- package/dist/index6.js +1 -2
- package/dist/sender/index.js +1446 -1328
- package/dist/style.css +1 -1
- package/dist/welcome/index.js +9 -9
- package/package.json +19 -13
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as G, ref as
|
|
2
|
-
import { h as Ee, i as
|
|
1
|
+
import { defineComponent as G, ref as _, computed as g, watch as F, openBlock as M, createElementBlock as R, normalizeClass as pe, createElementVNode as D, renderSlot as L, Fragment as W, renderList as ye, toDisplayString as te, createTextVNode as Te, createCommentVNode as re, createBlock as xe, createSlots as ne, withCtx as P, mergeProps as ae, useSlots as Ae, normalizeStyle as be, onBeforeUnmount as oe, nextTick as ke, useAttrs as Ce, toRefs as Me, unref as E, createVNode as se, normalizeProps as ue, guardReactiveProps as de } from "vue";
|
|
2
|
+
import { h as Ee, i as _e, g as V, j as he } from "../index4.js";
|
|
3
3
|
import { _ as Y } from "../_plugin-vue_export-helper.js";
|
|
4
|
-
const Oe = ["data-tooltip"],
|
|
4
|
+
const Oe = ["data-tooltip"], He = ["data-item-id", "aria-current", "tabindex"], we = { class: "tr-anchor__marker-slot" }, Re = { class: "tr-anchor__item-content" }, Le = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "tr-
|
|
6
|
+
class: "tr-anchor__highlight"
|
|
7
7
|
}, $e = /* @__PURE__ */ G({
|
|
8
|
-
name: "
|
|
9
|
-
__name: "
|
|
8
|
+
name: "AnchorItem",
|
|
9
|
+
__name: "AnchorItem",
|
|
10
10
|
props: {
|
|
11
11
|
entry: {},
|
|
12
12
|
activeId: {},
|
|
@@ -17,16 +17,16 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
17
17
|
},
|
|
18
18
|
emits: ["select"],
|
|
19
19
|
setup(e, { emit: a }) {
|
|
20
|
-
const l = e, i = a,
|
|
20
|
+
const l = e, i = a, h = _(null), r = _(!1), n = _(!1), { start: c, stop: s } = Ee(
|
|
21
21
|
() => {
|
|
22
22
|
requestAnimationFrame(() => {
|
|
23
|
-
|
|
23
|
+
S();
|
|
24
24
|
});
|
|
25
25
|
},
|
|
26
26
|
() => Math.max(0, l.tooltipDelay),
|
|
27
27
|
{ immediate: !1 }
|
|
28
|
-
), d = g(() => l.entry.item.id === l.activeId),
|
|
29
|
-
"tr-
|
|
28
|
+
), d = g(() => l.entry.item.id === l.activeId), f = g(() => [
|
|
29
|
+
"tr-anchor__list-item",
|
|
30
30
|
`is-${l.placement}`,
|
|
31
31
|
{
|
|
32
32
|
"is-active": d.value,
|
|
@@ -38,27 +38,27 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
38
38
|
function y(p) {
|
|
39
39
|
return !!(p && p.scrollWidth > p.clientWidth);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function b() {
|
|
42
42
|
var p;
|
|
43
|
-
return ((p =
|
|
43
|
+
return ((p = h.value) == null ? void 0 : p.querySelector(".tr-anchor__item-label")) ?? null;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
n.value = l.expanded && r.value && y(
|
|
45
|
+
function S() {
|
|
46
|
+
n.value = l.expanded && r.value && y(b());
|
|
47
47
|
}
|
|
48
48
|
function I() {
|
|
49
|
-
|
|
49
|
+
s(), n.value = !1, !(!l.expanded || !r.value) && c();
|
|
50
50
|
}
|
|
51
51
|
function k() {
|
|
52
|
-
|
|
52
|
+
s(), n.value = !1;
|
|
53
53
|
}
|
|
54
54
|
function $() {
|
|
55
55
|
r.value = !0, I();
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function H() {
|
|
58
58
|
r.value = !1, k();
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
p.propertyName === "max-width" && r.value &&
|
|
60
|
+
function A(p) {
|
|
61
|
+
p.propertyName === "max-width" && r.value && S();
|
|
62
62
|
}
|
|
63
63
|
return F(
|
|
64
64
|
() => l.expanded,
|
|
@@ -69,31 +69,31 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
69
69
|
}
|
|
70
70
|
r.value && I();
|
|
71
71
|
}
|
|
72
|
-
), (p, o) => (
|
|
73
|
-
class: pe(
|
|
72
|
+
), (p, o) => (M(), R("li", {
|
|
73
|
+
class: pe(f.value),
|
|
74
74
|
"data-tooltip": e.entry.item.tooltipText || e.entry.item.label
|
|
75
75
|
}, [
|
|
76
76
|
D("button", {
|
|
77
77
|
ref_key: "itemButtonRef",
|
|
78
|
-
ref:
|
|
78
|
+
ref: h,
|
|
79
79
|
type: "button",
|
|
80
|
-
class: "tr-
|
|
80
|
+
class: "tr-anchor__item",
|
|
81
81
|
"data-item-id": e.entry.item.id,
|
|
82
82
|
"aria-current": d.value ? "location" : void 0,
|
|
83
83
|
tabindex: e.highlighted ? 0 : -1,
|
|
84
84
|
onMouseenter: $,
|
|
85
|
-
onMouseleave:
|
|
85
|
+
onMouseleave: H,
|
|
86
86
|
onClick: o[0] || (o[0] = (t) => i("select", e.entry.item))
|
|
87
87
|
}, [
|
|
88
|
-
D("span",
|
|
88
|
+
D("span", we, [
|
|
89
89
|
L(p.$slots, "marker", {
|
|
90
90
|
item: e.entry.item,
|
|
91
91
|
active: d.value
|
|
92
92
|
}, () => [
|
|
93
|
-
o[1] || (o[1] = D("span", { class: "tr-
|
|
93
|
+
o[1] || (o[1] = D("span", { class: "tr-anchor__marker" }, null, -1))
|
|
94
94
|
], !0)
|
|
95
95
|
]),
|
|
96
|
-
D("span",
|
|
96
|
+
D("span", Re, [
|
|
97
97
|
L(p.$slots, "item", {
|
|
98
98
|
item: e.entry.item,
|
|
99
99
|
segments: e.entry.segments,
|
|
@@ -102,32 +102,32 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
102
102
|
highlighted: l.highlighted || r.value
|
|
103
103
|
}, () => [
|
|
104
104
|
D("span", {
|
|
105
|
-
class: "tr-
|
|
106
|
-
onTransitionend:
|
|
105
|
+
class: "tr-anchor__item-label",
|
|
106
|
+
onTransitionend: A
|
|
107
107
|
}, [
|
|
108
|
-
(
|
|
109
|
-
key: `${e.entry.item.id}-${
|
|
108
|
+
(M(!0), R(W, null, ye(e.entry.segments, (t, u) => (M(), R(W, {
|
|
109
|
+
key: `${e.entry.item.id}-${u}`
|
|
110
110
|
}, [
|
|
111
|
-
t.highlighted ? (
|
|
111
|
+
t.highlighted ? (M(), R("mark", Le, te(t.text), 1)) : (M(), R(W, { key: 1 }, [
|
|
112
112
|
Te(te(t.text), 1)
|
|
113
113
|
], 64))
|
|
114
114
|
], 64))), 128))
|
|
115
115
|
], 32)
|
|
116
116
|
], !0)
|
|
117
117
|
])
|
|
118
|
-
], 40,
|
|
118
|
+
], 40, He)
|
|
119
119
|
], 10, Oe));
|
|
120
120
|
}
|
|
121
|
-
}),
|
|
122
|
-
class: "tr-
|
|
121
|
+
}), Be = /* @__PURE__ */ Y($e, [["__scopeId", "data-v-f39ebac0"]]), Ne = {
|
|
122
|
+
class: "tr-anchor__list",
|
|
123
123
|
role: "list"
|
|
124
124
|
}, De = {
|
|
125
125
|
key: 0,
|
|
126
|
-
class: "tr-
|
|
126
|
+
class: "tr-anchor__empty",
|
|
127
127
|
"aria-live": "polite"
|
|
128
128
|
}, Fe = /* @__PURE__ */ G({
|
|
129
|
-
name: "
|
|
130
|
-
__name: "
|
|
129
|
+
name: "AnchorList",
|
|
130
|
+
__name: "AnchorList",
|
|
131
131
|
props: {
|
|
132
132
|
items: {},
|
|
133
133
|
activeId: {},
|
|
@@ -140,13 +140,13 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
140
140
|
emits: ["select"],
|
|
141
141
|
setup(e, { emit: a }) {
|
|
142
142
|
const l = a;
|
|
143
|
-
return (i,
|
|
144
|
-
e.expanded && e.items.length === 0 ? (
|
|
143
|
+
return (i, h) => (M(), R("ul", Ne, [
|
|
144
|
+
e.expanded && e.items.length === 0 ? (M(), R("li", De, [
|
|
145
145
|
L(i.$slots, "empty", {}, () => [
|
|
146
146
|
Te(te(e.emptyText), 1)
|
|
147
147
|
], !0)
|
|
148
148
|
])) : re("", !0),
|
|
149
|
-
(
|
|
149
|
+
(M(!0), R(W, null, ye(e.items, (r, n) => (M(), xe(Be, {
|
|
150
150
|
key: r.item.id,
|
|
151
151
|
entry: r,
|
|
152
152
|
"active-id": e.activeId,
|
|
@@ -154,7 +154,7 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
154
154
|
highlighted: n === e.highlightedIndex,
|
|
155
155
|
placement: e.placement,
|
|
156
156
|
"tooltip-delay": e.tooltipDelay,
|
|
157
|
-
onSelect:
|
|
157
|
+
onSelect: h[0] || (h[0] = (c) => l("select", c))
|
|
158
158
|
}, ne({ _: 2 }, [
|
|
159
159
|
i.$slots.item ? {
|
|
160
160
|
name: "item",
|
|
@@ -173,52 +173,52 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
173
173
|
]), 1032, ["entry", "active-id", "expanded", "highlighted", "placement", "tooltip-delay"]))), 128))
|
|
174
174
|
]));
|
|
175
175
|
}
|
|
176
|
-
}), Qe = /* @__PURE__ */ Y(Fe, [["__scopeId", "data-v-
|
|
176
|
+
}), Qe = /* @__PURE__ */ Y(Fe, [["__scopeId", "data-v-ff2e0912"]]), Pe = {
|
|
177
177
|
key: 0,
|
|
178
|
-
class: "tr-
|
|
179
|
-
}, Ue = { class: "tr-
|
|
180
|
-
name: "
|
|
181
|
-
__name: "
|
|
178
|
+
class: "tr-anchor__search-cap"
|
|
179
|
+
}, Ue = { class: "tr-anchor__surface" }, Ke = /* @__PURE__ */ G({
|
|
180
|
+
name: "AnchorOverlay",
|
|
181
|
+
__name: "AnchorOverlay",
|
|
182
182
|
props: {
|
|
183
183
|
expanded: { type: Boolean },
|
|
184
184
|
placement: {},
|
|
185
185
|
floatingOffset: { default: 0 }
|
|
186
186
|
},
|
|
187
187
|
setup(e, { expose: a }) {
|
|
188
|
-
const l = e, i =
|
|
189
|
-
"tr-
|
|
188
|
+
const l = e, i = _(null), h = _(null), r = _(null), n = Ae(), c = g(() => [
|
|
189
|
+
"tr-anchor",
|
|
190
190
|
`is-${l.placement}`,
|
|
191
191
|
{
|
|
192
192
|
"is-expanded": l.expanded,
|
|
193
193
|
"has-search-cap": !!n.search
|
|
194
194
|
}
|
|
195
|
-
]),
|
|
195
|
+
]), s = g(() => ({
|
|
196
196
|
transform: `translate3d(0, ${l.floatingOffset}px, 0)`
|
|
197
197
|
}));
|
|
198
198
|
return a({
|
|
199
199
|
hostEl: i,
|
|
200
|
-
overlayEl:
|
|
200
|
+
overlayEl: h,
|
|
201
201
|
navEl: r
|
|
202
|
-
}), (d,
|
|
202
|
+
}), (d, f) => (M(), R("div", {
|
|
203
203
|
ref_key: "hostEl",
|
|
204
204
|
ref: i,
|
|
205
205
|
class: pe(c.value),
|
|
206
|
-
style:
|
|
206
|
+
style: be(s.value)
|
|
207
207
|
}, [
|
|
208
208
|
D("div", {
|
|
209
209
|
ref_key: "overlayEl",
|
|
210
|
-
ref:
|
|
211
|
-
class: "tr-
|
|
212
|
-
"data-testid": "
|
|
210
|
+
ref: h,
|
|
211
|
+
class: "tr-anchor__overlay",
|
|
212
|
+
"data-testid": "anchor-overlay"
|
|
213
213
|
}, [
|
|
214
|
-
d.$slots.search ? (
|
|
214
|
+
d.$slots.search ? (M(), R("div", Pe, [
|
|
215
215
|
L(d.$slots, "search", {}, void 0, !0)
|
|
216
216
|
])) : re("", !0),
|
|
217
217
|
D("div", Ue, [
|
|
218
218
|
D("nav", {
|
|
219
219
|
ref_key: "navEl",
|
|
220
220
|
ref: r,
|
|
221
|
-
class: "tr-
|
|
221
|
+
class: "tr-anchor__panel",
|
|
222
222
|
"aria-label": "Content navigation"
|
|
223
223
|
}, [
|
|
224
224
|
L(d.$slots, "default", {}, void 0, !0)
|
|
@@ -227,9 +227,9 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
227
227
|
], 512)
|
|
228
228
|
], 6));
|
|
229
229
|
}
|
|
230
|
-
}),
|
|
231
|
-
name: "
|
|
232
|
-
__name: "
|
|
230
|
+
}), qe = /* @__PURE__ */ Y(Ke, [["__scopeId", "data-v-276fbba1"]]), ze = ["value", "placeholder", "aria-label"], Ve = /* @__PURE__ */ G({
|
|
231
|
+
name: "AnchorSearch",
|
|
232
|
+
__name: "AnchorSearch",
|
|
233
233
|
props: {
|
|
234
234
|
searchQuery: {},
|
|
235
235
|
searchOptions: {}
|
|
@@ -237,20 +237,20 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
237
237
|
emits: ["update:searchQuery"],
|
|
238
238
|
setup(e, { emit: a }) {
|
|
239
239
|
const l = e, i = a;
|
|
240
|
-
return (
|
|
241
|
-
var n, c;
|
|
242
|
-
return
|
|
243
|
-
class: "tr-
|
|
240
|
+
return (h, r) => {
|
|
241
|
+
var n, c, s;
|
|
242
|
+
return M(), R("input", {
|
|
243
|
+
class: "tr-anchor__search",
|
|
244
244
|
type: "search",
|
|
245
245
|
value: l.searchQuery,
|
|
246
246
|
placeholder: ((n = l.searchOptions) == null ? void 0 : n.placeholder) ?? "Search",
|
|
247
|
-
"aria-label": ((c = l.searchOptions) == null ? void 0 : c.placeholder)
|
|
248
|
-
"data-testid": "
|
|
249
|
-
onInput: r[0] || (r[0] = (
|
|
250
|
-
}, null, 40,
|
|
247
|
+
"aria-label": ((s = (c = l.searchOptions) == null ? void 0 : c.placeholder) == null ? void 0 : s.trim()) || "Search content navigation",
|
|
248
|
+
"data-testid": "anchor-search",
|
|
249
|
+
onInput: r[0] || (r[0] = (d) => i("update:searchQuery", d.target.value))
|
|
250
|
+
}, null, 40, ze);
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
|
-
}), Ge = /* @__PURE__ */ Y(
|
|
253
|
+
}), Ge = /* @__PURE__ */ Y(Ve, [["__scopeId", "data-v-89c7e60e"]]), We = (e, a) => {
|
|
254
254
|
const l = a.trim().toLowerCase(), i = (e.searchText || e.label).trim();
|
|
255
255
|
if (!l)
|
|
256
256
|
return [{ text: e.label, highlighted: !1 }];
|
|
@@ -262,15 +262,15 @@ const Oe = ["data-tooltip"], we = ["data-item-id", "aria-current", "tabindex"],
|
|
|
262
262
|
].filter((n) => n.text.length > 0) : i.toLowerCase().includes(l) ? [{ text: e.label, highlighted: !1 }] : !1;
|
|
263
263
|
};
|
|
264
264
|
function je(e) {
|
|
265
|
-
var c,
|
|
265
|
+
var c, s;
|
|
266
266
|
const { viewport: a, anchors: l } = e;
|
|
267
267
|
if (!l.length)
|
|
268
268
|
return;
|
|
269
|
-
const i = a.scrollHeight - a.clientHeight > 2,
|
|
270
|
-
if (i &&
|
|
269
|
+
const i = a.scrollHeight - a.clientHeight > 2, h = a.scrollTop + a.clientHeight >= a.scrollHeight - 2;
|
|
270
|
+
if (i && h)
|
|
271
271
|
return (c = l[l.length - 1]) == null ? void 0 : c.id;
|
|
272
272
|
const r = a.top + Math.max(0, e.activeOffset ?? 120);
|
|
273
|
-
let n = (
|
|
273
|
+
let n = (s = l[0]) == null ? void 0 : s.id;
|
|
274
274
|
for (const d of l)
|
|
275
275
|
if (d.el.getBoundingClientRect().top <= r)
|
|
276
276
|
n = d.id;
|
|
@@ -282,69 +282,69 @@ function Ye(e, a) {
|
|
|
282
282
|
return !a || a.length === 0 ? [{ text: e.label, highlighted: !1 }] : a;
|
|
283
283
|
}
|
|
284
284
|
function Ze(e) {
|
|
285
|
-
const a =
|
|
285
|
+
const a = _(!1), l = _(""), i = _(void 0), h = _(!1), r = g(() => {
|
|
286
286
|
var t;
|
|
287
287
|
return (t = e.searchOptions) == null ? void 0 : t.value;
|
|
288
288
|
}), n = g(() => e.expandTrigger.value === "manual"), c = g(
|
|
289
289
|
() => n.value ? e.expanded.value ?? !1 : a.value
|
|
290
|
-
),
|
|
290
|
+
), s = g(() => {
|
|
291
291
|
var t;
|
|
292
292
|
return ((t = e.searchQuery) == null ? void 0 : t.value) ?? l.value;
|
|
293
293
|
}), d = g(() => {
|
|
294
294
|
var t;
|
|
295
295
|
return ((t = r.value) == null ? void 0 : t.matcher) ?? We;
|
|
296
|
-
}),
|
|
297
|
-
const t =
|
|
298
|
-
return e.items.value.map((
|
|
299
|
-
const
|
|
296
|
+
}), f = g(() => {
|
|
297
|
+
const t = s.value.trim();
|
|
298
|
+
return e.items.value.map((u) => {
|
|
299
|
+
const v = d.value(u, t), T = Array.isArray(v) && v.length > 0;
|
|
300
300
|
return t && !T ? null : {
|
|
301
|
-
item:
|
|
302
|
-
segments: Ye(
|
|
301
|
+
item: u,
|
|
302
|
+
segments: Ye(u, v)
|
|
303
303
|
};
|
|
304
|
-
}).filter((
|
|
304
|
+
}).filter((u) => u !== null);
|
|
305
305
|
}), y = g(
|
|
306
306
|
() => {
|
|
307
307
|
var t;
|
|
308
|
-
return (t =
|
|
308
|
+
return (t = f.value.find((u) => u.item.id === e.activeId.value)) == null ? void 0 : t.item.id;
|
|
309
309
|
}
|
|
310
|
-
),
|
|
310
|
+
), b = g(() => {
|
|
311
311
|
var t;
|
|
312
|
-
return
|
|
313
|
-
}),
|
|
314
|
-
if (!
|
|
312
|
+
return h.value && i.value && f.value.some((u) => u.item.id === i.value) ? i.value : y.value ?? ((t = f.value[0]) == null ? void 0 : t.item.id);
|
|
313
|
+
}), S = g(() => {
|
|
314
|
+
if (!f.value.length)
|
|
315
315
|
return 0;
|
|
316
|
-
const t =
|
|
316
|
+
const t = f.value.findIndex((u) => u.item.id === b.value);
|
|
317
317
|
return t === -1 ? 0 : t;
|
|
318
|
-
}), I = g(() =>
|
|
318
|
+
}), I = g(() => b.value);
|
|
319
319
|
function k() {
|
|
320
|
-
|
|
320
|
+
h.value = !1, i.value = void 0;
|
|
321
321
|
}
|
|
322
322
|
function $(t) {
|
|
323
|
-
var
|
|
324
|
-
n.value || (a.value = t), (
|
|
323
|
+
var u, v;
|
|
324
|
+
n.value || (a.value = t), (u = e.onUpdateExpanded) == null || u.call(e, t), !t && ((v = r.value) != null && v.clearOnCollapse) && s.value && H("");
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
var
|
|
328
|
-
((
|
|
326
|
+
function H(t) {
|
|
327
|
+
var u, v;
|
|
328
|
+
((u = e.searchQuery) == null ? void 0 : u.value) === void 0 && (l.value = t), (v = e.onUpdateSearchQuery) == null || v.call(e, t);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
var
|
|
332
|
-
if (!
|
|
330
|
+
function A(t) {
|
|
331
|
+
var v;
|
|
332
|
+
if (!f.value.length) {
|
|
333
333
|
k();
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
|
-
const
|
|
337
|
-
i.value = (
|
|
336
|
+
const u = Math.max(0, Math.min(t, f.value.length - 1));
|
|
337
|
+
i.value = (v = f.value[u]) == null ? void 0 : v.item.id, h.value = !0;
|
|
338
338
|
}
|
|
339
339
|
function p() {
|
|
340
340
|
var t;
|
|
341
|
-
return (t =
|
|
341
|
+
return (t = f.value[S.value]) == null ? void 0 : t.item;
|
|
342
342
|
}
|
|
343
343
|
function o(t) {
|
|
344
|
-
return t.key === "ArrowDown" ? (t.preventDefault(), S
|
|
344
|
+
return t.key === "ArrowDown" ? (t.preventDefault(), A(S.value + 1), !0) : t.key === "ArrowUp" ? (t.preventDefault(), A(S.value - 1), !0) : t.key === "Home" ? (t.preventDefault(), A(0), !0) : t.key === "End" ? (t.preventDefault(), A(f.value.length - 1), !0) : t.key === "Escape" ? n.value ? !1 : (t.preventDefault(), $(!1), !0) : !1;
|
|
345
345
|
}
|
|
346
346
|
return F(
|
|
347
|
-
|
|
347
|
+
f,
|
|
348
348
|
(t) => {
|
|
349
349
|
if (!t.length) {
|
|
350
350
|
k();
|
|
@@ -354,7 +354,7 @@ function Ze(e) {
|
|
|
354
354
|
k();
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
|
-
|
|
357
|
+
h.value && i.value && t.some((u) => u.item.id === i.value) || k();
|
|
358
358
|
},
|
|
359
359
|
{ immediate: !0, flush: "sync" }
|
|
360
360
|
), F(
|
|
@@ -365,12 +365,12 @@ function Ze(e) {
|
|
|
365
365
|
{ immediate: !0, flush: "sync" }
|
|
366
366
|
), {
|
|
367
367
|
expanded: c,
|
|
368
|
-
searchQuery:
|
|
369
|
-
filteredItems:
|
|
370
|
-
highlightedIndex:
|
|
368
|
+
searchQuery: s,
|
|
369
|
+
filteredItems: f,
|
|
370
|
+
highlightedIndex: S,
|
|
371
371
|
highlightedId: I,
|
|
372
372
|
setExpanded: $,
|
|
373
|
-
setSearchQuery:
|
|
373
|
+
setSearchQuery: H,
|
|
374
374
|
getHighlightedItem: p,
|
|
375
375
|
handleNavigationKeydown: o
|
|
376
376
|
};
|
|
@@ -384,7 +384,7 @@ function Ie() {
|
|
|
384
384
|
function le(e) {
|
|
385
385
|
return e || (typeof window < "u" ? window : null);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function fe(e) {
|
|
388
388
|
if (!e)
|
|
389
389
|
return 0;
|
|
390
390
|
if (Z(e))
|
|
@@ -395,7 +395,7 @@ function ve(e) {
|
|
|
395
395
|
function ee(e) {
|
|
396
396
|
return e ? Z(e) ? e.clientHeight : e.innerHeight : 0;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function me(e) {
|
|
399
399
|
if (!e)
|
|
400
400
|
return 0;
|
|
401
401
|
if (Z(e))
|
|
@@ -403,7 +403,7 @@ function he(e) {
|
|
|
403
403
|
const a = Ie(), l = typeof document < "u" ? document.documentElement : null, i = typeof document < "u" ? document.body : null;
|
|
404
404
|
return Math.max((a == null ? void 0 : a.scrollHeight) || 0, (l == null ? void 0 : l.scrollHeight) || 0, (i == null ? void 0 : i.scrollHeight) || 0);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function ve(e) {
|
|
407
407
|
return e && Z(e) ? e.getBoundingClientRect().top : 0;
|
|
408
408
|
}
|
|
409
409
|
function Je(e, a, l) {
|
|
@@ -414,34 +414,34 @@ function Je(e, a, l) {
|
|
|
414
414
|
}
|
|
415
415
|
function Xe(e) {
|
|
416
416
|
var p;
|
|
417
|
-
const i =
|
|
418
|
-
let
|
|
417
|
+
const i = _((p = e.activeId) == null ? void 0 : p.value);
|
|
418
|
+
let h = null, r = null;
|
|
419
419
|
const n = g(() => {
|
|
420
420
|
var o;
|
|
421
421
|
return ((o = e.activeId) == null ? void 0 : o.value) ?? i.value;
|
|
422
|
-
}), c =
|
|
423
|
-
function
|
|
424
|
-
var t,
|
|
425
|
-
n.value !== o && (((t = e.activeId) == null ? void 0 : t.value) === void 0 && (i.value = o), (
|
|
422
|
+
}), c = _e();
|
|
423
|
+
function s(o) {
|
|
424
|
+
var t, u;
|
|
425
|
+
n.value !== o && (((t = e.activeId) == null ? void 0 : t.value) === void 0 && (i.value = o), (u = e.onUpdateActiveId) == null || u.call(e, o));
|
|
426
426
|
}
|
|
427
427
|
function d() {
|
|
428
|
-
|
|
428
|
+
h = null;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function f() {
|
|
431
431
|
r = null;
|
|
432
432
|
}
|
|
433
433
|
function y() {
|
|
434
|
-
d(),
|
|
434
|
+
d(), f();
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function b(o) {
|
|
437
437
|
return o instanceof HTMLElement ? o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement || o.isContentEditable : !1;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
return [...o].sort((t,
|
|
441
|
-
if (t.el ===
|
|
439
|
+
function S(o) {
|
|
440
|
+
return [...o].sort((t, u) => {
|
|
441
|
+
if (t.el === u.el)
|
|
442
442
|
return 0;
|
|
443
|
-
const
|
|
444
|
-
return
|
|
443
|
+
const v = t.el.compareDocumentPosition(u.el);
|
|
444
|
+
return v & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : v & Node.DOCUMENT_POSITION_PRECEDING ? 1 : t.el.getBoundingClientRect().top - u.el.getBoundingClientRect().top;
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
function I(o) {
|
|
@@ -453,60 +453,60 @@ function Xe(e) {
|
|
|
453
453
|
const o = le(e.container.value);
|
|
454
454
|
if (!o)
|
|
455
455
|
return;
|
|
456
|
-
const t =
|
|
457
|
-
if (
|
|
458
|
-
const
|
|
459
|
-
if (!
|
|
456
|
+
const t = fe(o), u = ve(o), v = u + ee(o), T = u + Math.max(0, ((Q = e.activeOffset) == null ? void 0 : Q.value) ?? 120);
|
|
457
|
+
if (h) {
|
|
458
|
+
const C = Math.abs(t - h.top) <= 2, w = Date.now() - h.startedAt > 2e3;
|
|
459
|
+
if (!C && !w)
|
|
460
460
|
return;
|
|
461
461
|
d();
|
|
462
462
|
}
|
|
463
463
|
if (r) {
|
|
464
|
-
const
|
|
465
|
-
if (
|
|
466
|
-
const
|
|
467
|
-
if (!J && !
|
|
468
|
-
|
|
464
|
+
const C = e.resolveTarget(r);
|
|
465
|
+
if (C != null && C.isConnected) {
|
|
466
|
+
const w = C.getBoundingClientRect(), J = w.bottom <= T, z = w.top >= v;
|
|
467
|
+
if (!J && !z) {
|
|
468
|
+
s(r);
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
r &&
|
|
472
|
+
r && f();
|
|
473
473
|
}
|
|
474
|
-
const x =
|
|
475
|
-
e.items.value.flatMap((
|
|
476
|
-
const
|
|
477
|
-
return
|
|
474
|
+
const x = S(
|
|
475
|
+
e.items.value.flatMap((C) => {
|
|
476
|
+
const w = e.resolveTarget(C.id);
|
|
477
|
+
return w ? [{ id: C.id, el: w }] : [];
|
|
478
478
|
})
|
|
479
479
|
), U = je({
|
|
480
480
|
viewport: {
|
|
481
|
-
top:
|
|
481
|
+
top: u,
|
|
482
482
|
scrollTop: t,
|
|
483
483
|
clientHeight: ee(o),
|
|
484
|
-
scrollHeight:
|
|
484
|
+
scrollHeight: me(o)
|
|
485
485
|
},
|
|
486
486
|
anchors: x,
|
|
487
487
|
activeOffset: (K = e.activeOffset) == null ? void 0 : K.value
|
|
488
488
|
});
|
|
489
|
-
U !== void 0 &&
|
|
489
|
+
U !== void 0 && s(U);
|
|
490
490
|
}
|
|
491
491
|
function $(o) {
|
|
492
|
-
const t = le(e.container.value),
|
|
493
|
-
if (!t || !
|
|
492
|
+
const t = le(e.container.value), u = e.resolveTarget(o);
|
|
493
|
+
if (!t || !u)
|
|
494
494
|
return;
|
|
495
|
-
const
|
|
496
|
-
|
|
495
|
+
const v = fe(t), T = u.getBoundingClientRect(), x = v + T.top - ve(t) - I(u), U = Math.max(0, me(t) - ee(t)), Q = Math.max(0, Math.min(x, U));
|
|
496
|
+
h = {
|
|
497
497
|
top: Q,
|
|
498
498
|
startedAt: Date.now()
|
|
499
|
-
}, r = o,
|
|
499
|
+
}, r = o, s(o), Je(t, Q, c.value === "reduce" ? "auto" : "smooth");
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function H() {
|
|
502
502
|
y();
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
var
|
|
504
|
+
function A(o) {
|
|
505
|
+
var u;
|
|
506
506
|
if (o.defaultPrevented || o.altKey || o.ctrlKey || o.metaKey)
|
|
507
507
|
return;
|
|
508
|
-
const t = (
|
|
509
|
-
t && o.target instanceof Node && t.contains(o.target) ||
|
|
508
|
+
const t = (u = e.host) == null ? void 0 : u.value;
|
|
509
|
+
t && o.target instanceof Node && t.contains(o.target) || b(o.target) || ["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "].includes(o.key) && y();
|
|
510
510
|
}
|
|
511
511
|
return F(
|
|
512
512
|
() => {
|
|
@@ -514,22 +514,22 @@ function Xe(e) {
|
|
|
514
514
|
return (o = e.activeId) == null ? void 0 : o.value;
|
|
515
515
|
},
|
|
516
516
|
(o) => {
|
|
517
|
-
i.value = o, r && o !== r &&
|
|
517
|
+
i.value = o, r && o !== r && f();
|
|
518
518
|
}
|
|
519
519
|
), oe(() => {
|
|
520
|
-
d(),
|
|
520
|
+
d(), f();
|
|
521
521
|
}), {
|
|
522
522
|
activeId: n,
|
|
523
523
|
scrollTo: $,
|
|
524
524
|
sync: k,
|
|
525
525
|
clearPendingScroll: d,
|
|
526
526
|
releaseSelectionLock: y,
|
|
527
|
-
handleUserScrollIntent:
|
|
528
|
-
handleScrollIntentKeydown:
|
|
527
|
+
handleUserScrollIntent: H,
|
|
528
|
+
handleScrollIntentKeydown: A
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
531
|
function et(e) {
|
|
532
|
-
const a =
|
|
532
|
+
const a = _(0);
|
|
533
533
|
function l() {
|
|
534
534
|
const r = e.host.value, n = r == null ? void 0 : r.firstElementChild;
|
|
535
535
|
if (!(n instanceof HTMLElement))
|
|
@@ -538,7 +538,7 @@ function et(e) {
|
|
|
538
538
|
floatingEl: null,
|
|
539
539
|
measuredEl: null
|
|
540
540
|
};
|
|
541
|
-
const c = n.querySelector(".tr-
|
|
541
|
+
const c = n.querySelector(".tr-anchor__surface") ?? n.querySelector(".tr-anchor__panel") ?? n;
|
|
542
542
|
return {
|
|
543
543
|
hostEl: r ?? null,
|
|
544
544
|
floatingEl: n,
|
|
@@ -546,38 +546,38 @@ function et(e) {
|
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
const i = g(() => {
|
|
549
|
-
const { hostEl: r, floatingEl: n, measuredEl: c } = l(),
|
|
550
|
-
return r &&
|
|
549
|
+
const { hostEl: r, floatingEl: n, measuredEl: c } = l(), s = [];
|
|
550
|
+
return r && s.push(r), n && s.push(n), c && c !== n && s.push(c), s;
|
|
551
551
|
});
|
|
552
|
-
function
|
|
553
|
-
const { hostEl: r, floatingEl: n, measuredEl: c } = l(),
|
|
554
|
-
if (!r || !
|
|
552
|
+
function h() {
|
|
553
|
+
const { hostEl: r, floatingEl: n, measuredEl: c } = l(), s = e.container.value, d = r == null ? void 0 : r.parentElement;
|
|
554
|
+
if (!r || !s || !d || !n || !c) {
|
|
555
555
|
a.value = 0;
|
|
556
556
|
return;
|
|
557
557
|
}
|
|
558
|
-
const
|
|
559
|
-
if (!y.height || !
|
|
558
|
+
const f = d.getBoundingClientRect(), y = s.getBoundingClientRect(), b = c.getBoundingClientRect().height || 0;
|
|
559
|
+
if (!y.height || !b) {
|
|
560
560
|
a.value = 0;
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
|
-
const
|
|
564
|
-
a.value = Math.max(
|
|
563
|
+
const S = y.top - f.top, I = y.bottom - f.top, $ = S + y.height / 2 - b / 2, H = S + 24, A = Math.max(H, I - b - 24);
|
|
564
|
+
a.value = Math.max(H, Math.min($, A));
|
|
565
565
|
}
|
|
566
566
|
return {
|
|
567
567
|
offset: a,
|
|
568
|
-
sync:
|
|
568
|
+
sync: h,
|
|
569
569
|
resizeTargets: i
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
|
-
const tt = "data-
|
|
573
|
-
function
|
|
574
|
-
return Array.from(e.querySelectorAll(a)).find((
|
|
572
|
+
const tt = "data-anchor-id", nt = `[${tt}]`, at = "data-item-id", lt = `[${at}]`;
|
|
573
|
+
function Se(e, a, l, i) {
|
|
574
|
+
return Array.from(e.querySelectorAll(a)).find((h) => h.dataset[l] === i);
|
|
575
575
|
}
|
|
576
576
|
function ge(e, a) {
|
|
577
|
-
return
|
|
577
|
+
return Se(e, nt, "anchorId", a);
|
|
578
578
|
}
|
|
579
579
|
function rt(e, a) {
|
|
580
|
-
return
|
|
580
|
+
return Se(e, lt, "itemId", a);
|
|
581
581
|
}
|
|
582
582
|
function ot(e) {
|
|
583
583
|
function a(n) {
|
|
@@ -585,8 +585,8 @@ function ot(e) {
|
|
|
585
585
|
}
|
|
586
586
|
function l() {
|
|
587
587
|
ke(() => {
|
|
588
|
-
var
|
|
589
|
-
const n = e.highlightedId.value, c = (
|
|
588
|
+
var s, d;
|
|
589
|
+
const n = e.highlightedId.value, c = (s = e.overlay.value) == null ? void 0 : s.navEl;
|
|
590
590
|
!n || !c || (d = rt(c, n)) == null || d.focus();
|
|
591
591
|
});
|
|
592
592
|
}
|
|
@@ -595,43 +595,43 @@ function ot(e) {
|
|
|
595
595
|
return;
|
|
596
596
|
const c = e.handleNavigationKeydown(n);
|
|
597
597
|
if (n.key === "Enter" || n.key === " ") {
|
|
598
|
-
const
|
|
599
|
-
if (
|
|
600
|
-
n.preventDefault(), e.onSelectItem(
|
|
598
|
+
const s = e.getHighlightedItem();
|
|
599
|
+
if (s) {
|
|
600
|
+
n.preventDefault(), e.onSelectItem(s.id);
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
c && l();
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
var
|
|
606
|
+
function h() {
|
|
607
|
+
var s;
|
|
608
608
|
if (!e.shouldAutoCollapse.value)
|
|
609
609
|
return;
|
|
610
|
-
const n = ((
|
|
611
|
-
n && c instanceof
|
|
610
|
+
const n = ((s = e.overlay.value) == null ? void 0 : s.overlayEl) ?? null, c = document.activeElement;
|
|
611
|
+
n && c instanceof HTMLElement && n.contains(c) && a(c) || e.setExpanded(!1);
|
|
612
612
|
}
|
|
613
613
|
function r(n) {
|
|
614
614
|
var d;
|
|
615
615
|
if (!e.shouldAutoCollapse.value)
|
|
616
616
|
return;
|
|
617
|
-
const c = n.relatedTarget,
|
|
618
|
-
(!c || !(
|
|
617
|
+
const c = n.relatedTarget, s = ((d = e.overlay.value) == null ? void 0 : d.overlayEl) ?? null;
|
|
618
|
+
(!c || !(s != null && s.contains(c))) && e.setExpanded(!1);
|
|
619
619
|
}
|
|
620
620
|
return {
|
|
621
621
|
handleKeydown: i,
|
|
622
|
-
handleMouseLeave:
|
|
622
|
+
handleMouseLeave: h,
|
|
623
623
|
handleFocusOut: r
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
function it(e) {
|
|
627
627
|
return (e ?? "").split(/\s+/).map((a) => a.trim()).filter(Boolean);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function ct(e) {
|
|
630
630
|
let a = null, l = [];
|
|
631
631
|
function i() {
|
|
632
632
|
a && l.length && a.classList.remove(...l), a = null, l = [];
|
|
633
633
|
}
|
|
634
|
-
const { start:
|
|
634
|
+
const { start: h, stop: r } = Ee(
|
|
635
635
|
() => {
|
|
636
636
|
i();
|
|
637
637
|
},
|
|
@@ -641,12 +641,12 @@ function st(e) {
|
|
|
641
641
|
function n() {
|
|
642
642
|
r(), i();
|
|
643
643
|
}
|
|
644
|
-
function c(
|
|
644
|
+
function c(s) {
|
|
645
645
|
const d = it(e.feedbackClass.value);
|
|
646
646
|
if (n(), !d.length)
|
|
647
647
|
return;
|
|
648
|
-
const
|
|
649
|
-
|
|
648
|
+
const f = e.resolveTarget(s);
|
|
649
|
+
f && (f.classList.remove(...d), f.offsetWidth, f.classList.add(...d), a = f, l = d, h());
|
|
650
650
|
}
|
|
651
651
|
return F(
|
|
652
652
|
() => e.feedbackClass.value,
|
|
@@ -661,7 +661,7 @@ function st(e) {
|
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
663
|
const j = /* @__PURE__ */ G({
|
|
664
|
-
name: "
|
|
664
|
+
name: "TrAnchor",
|
|
665
665
|
inheritAttrs: !1,
|
|
666
666
|
__name: "index",
|
|
667
667
|
props: {
|
|
@@ -681,144 +681,144 @@ const j = /* @__PURE__ */ G({
|
|
|
681
681
|
},
|
|
682
682
|
emits: ["update:activeId", "update:expanded", "update:searchQuery", "select"],
|
|
683
683
|
setup(e, { emit: a }) {
|
|
684
|
-
const l = e, i = a,
|
|
684
|
+
const l = e, i = a, h = Ce(), {
|
|
685
685
|
activeId: r,
|
|
686
686
|
activeOffset: n,
|
|
687
687
|
emptyText: c,
|
|
688
|
-
expandTrigger:
|
|
688
|
+
expandTrigger: s,
|
|
689
689
|
expanded: d,
|
|
690
|
-
items:
|
|
690
|
+
items: f,
|
|
691
691
|
placement: y,
|
|
692
|
-
searchOptions:
|
|
693
|
-
searchQuery:
|
|
692
|
+
searchOptions: b,
|
|
693
|
+
searchQuery: S,
|
|
694
694
|
scrollContainer: I,
|
|
695
695
|
targetFeedbackClass: k,
|
|
696
696
|
targetFeedbackDuration: $,
|
|
697
|
-
tooltipDelay:
|
|
698
|
-
} =
|
|
699
|
-
var
|
|
700
|
-
return ((
|
|
701
|
-
}), o = g(() =>
|
|
702
|
-
function
|
|
697
|
+
tooltipDelay: H
|
|
698
|
+
} = Me(l), A = _(null), p = g(() => {
|
|
699
|
+
var m;
|
|
700
|
+
return ((m = A.value) == null ? void 0 : m.hostEl) ?? null;
|
|
701
|
+
}), o = g(() => b.value), t = g(() => o.value ?? {});
|
|
702
|
+
function u(m) {
|
|
703
703
|
const O = I.value;
|
|
704
|
-
return O ? ge(O,
|
|
704
|
+
return O ? ge(O, m) ?? null : ge(document, m) ?? null;
|
|
705
705
|
}
|
|
706
|
-
const
|
|
707
|
-
items:
|
|
708
|
-
resolveTarget:
|
|
706
|
+
const v = g(() => f.value), T = Xe({
|
|
707
|
+
items: v,
|
|
708
|
+
resolveTarget: u,
|
|
709
709
|
container: I,
|
|
710
710
|
host: p,
|
|
711
711
|
activeId: r,
|
|
712
712
|
activeOffset: n,
|
|
713
|
-
onUpdateActiveId: (
|
|
713
|
+
onUpdateActiveId: (m) => i("update:activeId", m)
|
|
714
714
|
}), x = Ze({
|
|
715
|
-
items:
|
|
715
|
+
items: v,
|
|
716
716
|
activeId: T.activeId,
|
|
717
717
|
expanded: d,
|
|
718
|
-
expandTrigger:
|
|
719
|
-
searchQuery:
|
|
720
|
-
searchOptions:
|
|
721
|
-
onUpdateExpanded: (
|
|
722
|
-
onUpdateSearchQuery: (
|
|
723
|
-
}), U = g(() =>
|
|
718
|
+
expandTrigger: s,
|
|
719
|
+
searchQuery: S,
|
|
720
|
+
searchOptions: b,
|
|
721
|
+
onUpdateExpanded: (m) => i("update:expanded", m),
|
|
722
|
+
onUpdateSearchQuery: (m) => i("update:searchQuery", m)
|
|
723
|
+
}), U = g(() => v.value.length > 0), Q = g(() => !!o.value && x.expanded.value), K = g(() => s.value === "hover"), C = g(() => le(I.value)), w = et({
|
|
724
724
|
container: I,
|
|
725
725
|
host: p
|
|
726
|
-
}), J =
|
|
727
|
-
resolveTarget:
|
|
726
|
+
}), J = ct({
|
|
727
|
+
resolveTarget: u,
|
|
728
728
|
feedbackClass: k,
|
|
729
729
|
feedbackDuration: $
|
|
730
730
|
});
|
|
731
|
-
function
|
|
732
|
-
x.setExpanded(
|
|
731
|
+
function z(m) {
|
|
732
|
+
x.setExpanded(m);
|
|
733
733
|
}
|
|
734
|
-
function ie(
|
|
735
|
-
x.setSearchQuery(
|
|
734
|
+
function ie(m) {
|
|
735
|
+
x.setSearchQuery(m);
|
|
736
736
|
}
|
|
737
|
-
function
|
|
738
|
-
const O =
|
|
739
|
-
O && (T.scrollTo(
|
|
737
|
+
function ce(m) {
|
|
738
|
+
const O = v.value.find((B) => B.id === m);
|
|
739
|
+
O && (T.scrollTo(m), J.activate(m), N(), i("select", O));
|
|
740
740
|
}
|
|
741
741
|
const X = ot({
|
|
742
|
-
overlay:
|
|
742
|
+
overlay: A,
|
|
743
743
|
highlightedId: x.highlightedId,
|
|
744
744
|
shouldAutoCollapse: K,
|
|
745
745
|
handleNavigationKeydown: x.handleNavigationKeydown,
|
|
746
746
|
getHighlightedItem: x.getHighlightedItem,
|
|
747
|
-
onSelectItem:
|
|
748
|
-
setExpanded:
|
|
747
|
+
onSelectItem: ce,
|
|
748
|
+
setExpanded: z
|
|
749
749
|
});
|
|
750
|
-
let
|
|
751
|
-
function
|
|
752
|
-
|
|
753
|
-
|
|
750
|
+
let q = null;
|
|
751
|
+
function N() {
|
|
752
|
+
q !== null && cancelAnimationFrame(q), q = requestAnimationFrame(() => {
|
|
753
|
+
q = null, T.sync(), w.sync();
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
|
-
return
|
|
757
|
-
|
|
758
|
-
}),
|
|
759
|
-
|
|
756
|
+
return V(C, "scroll", N, { passive: !0 }), V(C, "wheel", T.handleUserScrollIntent, { passive: !0 }), V(C, "touchmove", T.handleUserScrollIntent, { passive: !0 }), V("keydown", T.handleScrollIntentKeydown), V("resize", N, { passive: !0 }), he(I, () => {
|
|
757
|
+
N();
|
|
758
|
+
}), he(w.resizeTargets, () => {
|
|
759
|
+
N();
|
|
760
760
|
}), F(
|
|
761
761
|
() => I.value,
|
|
762
762
|
() => {
|
|
763
|
-
T.clearPendingScroll(),
|
|
763
|
+
T.clearPendingScroll(), N();
|
|
764
764
|
},
|
|
765
765
|
{ immediate: !0 }
|
|
766
766
|
), F(
|
|
767
767
|
() => p.value,
|
|
768
768
|
() => {
|
|
769
|
-
|
|
769
|
+
N();
|
|
770
770
|
}
|
|
771
771
|
), F(
|
|
772
|
-
() =>
|
|
772
|
+
() => v.value.map((m) => m.id).join(","),
|
|
773
773
|
() => {
|
|
774
|
-
T.clearPendingScroll(),
|
|
774
|
+
T.clearPendingScroll(), N();
|
|
775
775
|
},
|
|
776
776
|
{ immediate: !0 }
|
|
777
777
|
), oe(() => {
|
|
778
|
-
|
|
779
|
-
}), (
|
|
778
|
+
q !== null && cancelAnimationFrame(q), T.clearPendingScroll();
|
|
779
|
+
}), (m, O) => U.value ? (M(), xe(qe, ae({
|
|
780
780
|
key: 0,
|
|
781
781
|
ref_key: "overlayShellRef",
|
|
782
|
-
ref:
|
|
783
|
-
}, E(
|
|
782
|
+
ref: A
|
|
783
|
+
}, E(h), {
|
|
784
784
|
expanded: E(x).expanded.value,
|
|
785
785
|
placement: E(y),
|
|
786
|
-
"floating-offset": E(
|
|
787
|
-
onMouseenter: O[1] || (O[1] = (
|
|
786
|
+
"floating-offset": E(w).offset.value,
|
|
787
|
+
onMouseenter: O[1] || (O[1] = (B) => K.value && z(!0)),
|
|
788
788
|
onMouseleave: E(X).handleMouseLeave,
|
|
789
|
-
onFocusin: O[2] || (O[2] = (
|
|
789
|
+
onFocusin: O[2] || (O[2] = (B) => K.value && z(!0)),
|
|
790
790
|
onFocusout: E(X).handleFocusOut,
|
|
791
791
|
onKeydown: E(X).handleKeydown
|
|
792
792
|
}), ne({
|
|
793
793
|
default: P(() => [
|
|
794
|
-
|
|
794
|
+
se(Qe, {
|
|
795
795
|
items: E(x).filteredItems.value,
|
|
796
796
|
"active-id": E(T).activeId.value,
|
|
797
797
|
expanded: E(x).expanded.value,
|
|
798
798
|
"highlighted-index": E(x).highlightedIndex.value,
|
|
799
799
|
placement: E(y),
|
|
800
|
-
"tooltip-delay": E(
|
|
800
|
+
"tooltip-delay": E(H),
|
|
801
801
|
"empty-text": E(c),
|
|
802
|
-
onSelect: O[0] || (O[0] = (
|
|
802
|
+
onSelect: O[0] || (O[0] = (B) => ce(B.id))
|
|
803
803
|
}, ne({ _: 2 }, [
|
|
804
|
-
|
|
804
|
+
m.$slots.marker ? {
|
|
805
805
|
name: "marker",
|
|
806
|
-
fn: P((
|
|
807
|
-
L(
|
|
806
|
+
fn: P((B) => [
|
|
807
|
+
L(m.$slots, "marker", ue(de(B)))
|
|
808
808
|
]),
|
|
809
809
|
key: "0"
|
|
810
810
|
} : void 0,
|
|
811
|
-
|
|
811
|
+
m.$slots.item ? {
|
|
812
812
|
name: "item",
|
|
813
|
-
fn: P((
|
|
814
|
-
L(
|
|
813
|
+
fn: P((B) => [
|
|
814
|
+
L(m.$slots, "item", ue(de(B)))
|
|
815
815
|
]),
|
|
816
816
|
key: "1"
|
|
817
817
|
} : void 0,
|
|
818
|
-
|
|
818
|
+
m.$slots.empty ? {
|
|
819
819
|
name: "empty",
|
|
820
820
|
fn: P(() => [
|
|
821
|
-
L(
|
|
821
|
+
L(m.$slots, "empty")
|
|
822
822
|
]),
|
|
823
823
|
key: "2"
|
|
824
824
|
} : void 0
|
|
@@ -829,12 +829,12 @@ const j = /* @__PURE__ */ G({
|
|
|
829
829
|
Q.value ? {
|
|
830
830
|
name: "search",
|
|
831
831
|
fn: P(() => [
|
|
832
|
-
L(
|
|
832
|
+
L(m.$slots, "search", {
|
|
833
833
|
searchQuery: E(x).searchQuery.value,
|
|
834
834
|
setSearchQuery: ie,
|
|
835
835
|
searchOptions: t.value
|
|
836
836
|
}, () => [
|
|
837
|
-
|
|
837
|
+
se(Ge, {
|
|
838
838
|
"search-query": E(x).searchQuery.value,
|
|
839
839
|
"search-options": t.value,
|
|
840
840
|
"onUpdate:searchQuery": ie
|
|
@@ -846,11 +846,11 @@ const j = /* @__PURE__ */ G({
|
|
|
846
846
|
]), 1040, ["expanded", "placement", "floating-offset", "onMouseleave", "onFocusout", "onKeydown"])) : re("", !0);
|
|
847
847
|
}
|
|
848
848
|
});
|
|
849
|
-
j.name = "
|
|
850
|
-
const
|
|
849
|
+
j.name = "TrAnchor";
|
|
850
|
+
const st = function(e) {
|
|
851
851
|
e.component(j.name, j);
|
|
852
852
|
};
|
|
853
|
-
j.install =
|
|
853
|
+
j.install = st;
|
|
854
854
|
export {
|
|
855
855
|
j as default
|
|
856
856
|
};
|