@opentiny/tiny-robot 0.3.0-alpha.25 → 0.3.0-alpha.27
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/base-popper/index.js +1 -1
- package/dist/bubble/index.js +233 -215
- package/dist/drag-overlay/index.js +1 -1
- package/dist/dropdown-menu/index.js +2 -2
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/history/index.js +2 -285
- package/dist/index.d.ts +14 -8
- package/dist/index.js +19 -17
- package/dist/index2.js +276 -691
- package/dist/index3.js +697 -148
- package/dist/index4.js +161 -0
- package/dist/mcp-add-form/index.js +1 -1
- package/dist/mcp-server-picker/index.js +1 -1
- package/dist/sender/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +2 -2
- package/dist/useSlotRefs.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, computed as y, createBlock as u, openBlock as t, Transition as F, withCtx as m, createElementBlock as o, createCommentVNode as h, normalizeStyle as _, normalizeClass as w, renderSlot as x, createElementVNode as l, toDisplayString as s, Fragment as D, renderList as B } from "vue";
|
|
2
|
-
import { a as M } from "../
|
|
2
|
+
import { a as M } from "../index3.js";
|
|
3
3
|
import { _ as Z } from "../_plugin-vue_export-helper.js";
|
|
4
4
|
const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs/%3e%3crect%20width='80.000000'%20height='80.000000'%20fill='%23FFFFFF'%20fill-opacity='0'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M6%2047.27L24.56%2029.06C25.73%2027.91%2027.6%2027.91%2028.77%2029.06L44.52%2044.51C45.69%2045.66%2047.56%2045.66%2048.72%2044.51L56.64%2036.75C57.8%2035.6%2059.67%2035.6%2060.84%2036.75L74%2049.67L74%2062C74%2064.76%2071.76%2067%2069%2067L11%2067C8.23%2067%206%2064.76%206%2062L6%2047.27Z'%20fill='%23F0F0F0'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d=''%20fill='%23808080'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cellipse%20cx='40.000000'%20cy='40.000000'%20rx='8.000001'%20ry='8.000002'%20fill='%231476FF'%20fill-opacity='1.000000'/%3e%3cpath%20d='M40%2035.5C40.27%2035.5%2040.5%2035.72%2040.5%2036L40.5%2039.49L44%2039.5C44.27%2039.5%2044.5%2039.72%2044.5%2040C44.5%2040.27%2044.27%2040.5%2044%2040.5L40.5%2040.5L40.5%2044C40.5%2044.27%2040.27%2044.5%2040%2044.5C39.72%2044.5%2039.5%2044.27%2039.5%2044L39.5%2040.5L36%2040.5C35.72%2040.5%2035.5%2040.27%2035.5%2040C35.5%2039.72%2035.72%2039.5%2036%2039.5L39.5%2039.5L39.5%2036C39.5%2035.72%2039.72%2035.5%2040%2035.5Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3ccircle%20cx='58.000000'%20cy='27.000000'%20r='5.000000'%20fill='%23DBDBDB'%20fill-opacity='1.000000'/%3e%3c/svg%3e", T = { class: "tr-drag-overlay__content" }, $ = { class: "tr-drag-overlay__text" }, S = { class: "tr-drag-overlay__title" }, E = { class: "tr-drag-overlay__description" }, z = /* @__PURE__ */ v({
|
|
5
5
|
__name: "index",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as k, onUnmounted as T, watch as C, defineComponent as E, mergeModels as y, useModel as H, computed as p, createBlock as I, openBlock as w, unref as X, withCtx as _, createElementVNode as j, createElementBlock as b, Fragment as D, renderList as L, toDisplayString as Y, renderSlot as O } from "vue";
|
|
2
|
-
import { w as S, b as M, o as $ } from "../
|
|
3
|
-
import { B as A } from "../
|
|
2
|
+
import { w as S, b as M, o as $ } from "../index3.js";
|
|
3
|
+
import { B as A } from "../index4.js";
|
|
4
4
|
import { u as F } from "../utils.js";
|
|
5
5
|
import { _ as G } from "../_plugin-vue_export-helper.js";
|
|
6
6
|
const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.bottom, N = (o, t, g = !1) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as q, mergeModels as E, useModel as G, watch as g, ref as i, computed as $, createElementBlock as a, openBlock as l, createElementVNode as I, Fragment as C, renderList as D, createCommentVNode as _, normalizeClass as x, createBlock as B, resolveDynamicComponent as b, toDisplayString as S, nextTick as H } from "vue";
|
|
2
2
|
import { IconArrowDown as X } from "@opentiny/tiny-robot-svgs";
|
|
3
|
-
import { d as j, o as J } from "../
|
|
3
|
+
import { d as j, o as J } from "../index3.js";
|
|
4
4
|
import { _ as K } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const P = ["onClick"], Q = {
|
|
6
6
|
key: 0,
|
package/dist/history/index.js
CHANGED
|
@@ -1,287 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IconEmptySearch as ae, IconEditPen as ue, IconDelete as ce, IconCheck as de, IconClose as me, IconMenu2 as fe } from "@opentiny/tiny-robot-svgs";
|
|
3
|
-
import { _ as z } from "../_plugin-vue_export-helper.js";
|
|
4
|
-
import { o as Q, a as ve, d as pe, c as _e } from "../index2.js";
|
|
5
|
-
import { t as O } from "../utils.js";
|
|
6
|
-
const S = g(!1);
|
|
7
|
-
let T = 0, $;
|
|
8
|
-
function ye() {
|
|
9
|
-
const s = window.matchMedia("(hover: none) and (pointer: coarse)"), m = () => {
|
|
10
|
-
S.value = s.matches;
|
|
11
|
-
};
|
|
12
|
-
m(), s.addEventListener("change", m);
|
|
13
|
-
const t = (c) => {
|
|
14
|
-
S.value = c.pointerType !== "mouse";
|
|
15
|
-
};
|
|
16
|
-
return window.addEventListener("pointerdown", t, !0), () => {
|
|
17
|
-
s.removeEventListener("change", m), window.removeEventListener("pointerdown", t, !0);
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function ge() {
|
|
21
|
-
$ == null || $(), $ = void 0;
|
|
22
|
-
}
|
|
23
|
-
function he() {
|
|
24
|
-
return typeof window > "u" ? {
|
|
25
|
-
isTouchDevice: S
|
|
26
|
-
} : (Z(() => {
|
|
27
|
-
T++, T === 1 && ($ = ye());
|
|
28
|
-
}), ee(() => {
|
|
29
|
-
T = Math.max(0, T - 1), T === 0 && ge();
|
|
30
|
-
}), {
|
|
31
|
-
isTouchDevice: S
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon" }, Ee = { class: "tr-history__empty-text" }, we = /* @__PURE__ */ P({
|
|
35
|
-
__name: "Empty",
|
|
36
|
-
props: {
|
|
37
|
-
text: { default: "暂无内容" }
|
|
38
|
-
},
|
|
39
|
-
setup(s) {
|
|
40
|
-
const m = s;
|
|
41
|
-
return (t, c) => (r(), l("div", Ce, [
|
|
42
|
-
w("span", ke, [
|
|
43
|
-
b(n(ae))
|
|
44
|
-
]),
|
|
45
|
-
w("span", Ee, D(m.text), 1)
|
|
46
|
-
]));
|
|
47
|
-
}
|
|
48
|
-
}), xe = /* @__PURE__ */ z(we, [["__scopeId", "data-v-d0340c39"]]), Re = ["onClick"], Le = 12, G = 4, Ie = /* @__PURE__ */ P({
|
|
49
|
-
__name: "MenuList",
|
|
50
|
-
props: {
|
|
51
|
-
trigger: { default: null },
|
|
52
|
-
triggerModifiers: {},
|
|
53
|
-
data: { default: null },
|
|
54
|
-
dataModifiers: {}
|
|
55
|
-
},
|
|
56
|
-
emits: /* @__PURE__ */ te(["item-click"], ["update:trigger", "update:data"]),
|
|
57
|
-
setup(s, { emit: m }) {
|
|
58
|
-
const t = W(s, "trigger"), c = W(s, "data"), x = m, h = [
|
|
59
|
-
{ id: "rename", text: "重命名", icon: ue },
|
|
60
|
-
{ id: "delete", text: "删除", icon: ce }
|
|
61
|
-
], E = g(null);
|
|
62
|
-
Q(
|
|
63
|
-
E,
|
|
64
|
-
() => {
|
|
65
|
-
t.value = null, c.value = null;
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
ignore: [t]
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
const { top: v, bottom: I, left: y } = ve(t), { width: M, height: C } = pe(E, void 0, { box: "border-box" }), { height: R } = _e(), o = L(() => {
|
|
72
|
-
const k = {
|
|
73
|
-
left: `min(${O(y.value)}, calc(100% - ${O(M.value + G)}))`
|
|
74
|
-
}, _ = I.value + Le;
|
|
75
|
-
return _ + C.value + G > R.value ? k.bottom = `calc(100% - ${O(v.value - G)})` : k.top = O(_), k;
|
|
76
|
-
}), p = (k) => {
|
|
77
|
-
x("item-click", k), t.value = null, c.value = null;
|
|
78
|
-
};
|
|
79
|
-
return (k, _) => (r(), l("ul", {
|
|
80
|
-
class: "tr-history__menu-list",
|
|
81
|
-
ref_key: "menuRef",
|
|
82
|
-
ref: E,
|
|
83
|
-
style: ne(o.value)
|
|
84
|
-
}, [
|
|
85
|
-
(r(), l(B, null, H(h, (a) => w("li", {
|
|
86
|
-
class: "tr-history__menu-list__item",
|
|
87
|
-
key: a.id,
|
|
88
|
-
onClick: (K) => p(a)
|
|
89
|
-
}, [
|
|
90
|
-
(r(), J(oe(a.icon))),
|
|
91
|
-
w("span", null, D(a.text), 1)
|
|
92
|
-
], 8, Re)), 64))
|
|
93
|
-
], 4));
|
|
94
|
-
}
|
|
95
|
-
}), Me = /* @__PURE__ */ z(Ie, [["__scopeId", "data-v-67ba5dd7"]]), Te = ({
|
|
96
|
-
renameControlOnClickOutside: s,
|
|
97
|
-
onItemTitleChange: m
|
|
98
|
-
}) => {
|
|
99
|
-
const t = g(void 0), c = g(null), x = L(() => {
|
|
100
|
-
var o;
|
|
101
|
-
return (o = c.value) == null ? void 0 : o.at(0);
|
|
102
|
-
}), h = g(null), E = L(() => {
|
|
103
|
-
var o;
|
|
104
|
-
return (o = h.value) == null ? void 0 : o.at(0);
|
|
105
|
-
}), v = g(null), I = L(() => {
|
|
106
|
-
var o;
|
|
107
|
-
return (o = v.value) == null ? void 0 : o.at(0);
|
|
108
|
-
}), y = g(""), M = (o) => {
|
|
109
|
-
t.value = o, y.value = o.title, ie(() => {
|
|
110
|
-
const p = x.value;
|
|
111
|
-
p && (p.focus(), p.select());
|
|
112
|
-
});
|
|
113
|
-
}, C = () => {
|
|
114
|
-
t.value = void 0, y.value = "";
|
|
115
|
-
}, R = () => {
|
|
116
|
-
t.value && m(y.value, t.value), t.value = void 0, y.value = "";
|
|
117
|
-
};
|
|
118
|
-
return (s === "confirm" || s === "cancel") && Q(
|
|
119
|
-
x,
|
|
120
|
-
() => {
|
|
121
|
-
s === "confirm" ? R() : C();
|
|
122
|
-
},
|
|
123
|
-
{ ignore: [E, I] }
|
|
124
|
-
), {
|
|
125
|
-
editingItem: t,
|
|
126
|
-
editorRefList: c,
|
|
127
|
-
editorConfirmRefList: h,
|
|
128
|
-
editorCancelRefList: v,
|
|
129
|
-
editorValue: y,
|
|
130
|
-
handleEdit: M,
|
|
131
|
-
handleEditCancel: C,
|
|
132
|
-
handleEditConfirm: R
|
|
133
|
-
};
|
|
134
|
-
}, F = Symbol("NO_GROUP"), be = {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "tr-history__group-title"
|
|
137
|
-
}, $e = { class: "tr-history__group-items" }, Oe = ["onClick"], Be = ["title"], De = ["onClick"], Se = /* @__PURE__ */ P({
|
|
138
|
-
__name: "index",
|
|
139
|
-
props: {
|
|
140
|
-
data: {},
|
|
141
|
-
selected: {},
|
|
142
|
-
showRenameControls: { type: Boolean, default: !1 },
|
|
143
|
-
renameControlOnClickOutside: { default: "confirm" }
|
|
144
|
-
},
|
|
145
|
-
emits: ["item-click", "item-title-change", "item-action"],
|
|
146
|
-
setup(s, { emit: m }) {
|
|
147
|
-
const t = s, c = m, x = (i) => {
|
|
148
|
-
var f;
|
|
149
|
-
const e = typeof ((f = i[0]) == null ? void 0 : f.group);
|
|
150
|
-
return e === "string" || e === "symbol";
|
|
151
|
-
}, h = L(() => {
|
|
152
|
-
const i = t.data;
|
|
153
|
-
return x(i) ? i : [{ group: F, items: i }];
|
|
154
|
-
}), E = L(() => h.value.length === 0 || h.value.every((i) => i.items.length === 0)), {
|
|
155
|
-
editingItem: v,
|
|
156
|
-
editorRefList: I,
|
|
157
|
-
editorConfirmRefList: y,
|
|
158
|
-
editorCancelRefList: M,
|
|
159
|
-
editorValue: C,
|
|
160
|
-
handleEdit: R,
|
|
161
|
-
handleEditCancel: o,
|
|
162
|
-
handleEditConfirm: p
|
|
163
|
-
} = Te({
|
|
164
|
-
renameControlOnClickOutside: t.renameControlOnClickOutside,
|
|
165
|
-
onItemTitleChange: (i, e) => {
|
|
166
|
-
c("item-title-change", i, e);
|
|
167
|
-
}
|
|
168
|
-
}), { isTouchDevice: k } = he(), _ = g(null), a = g(null), K = (i, e) => {
|
|
169
|
-
if (i.currentTarget instanceof HTMLButtonElement) {
|
|
170
|
-
if (a.value === e) {
|
|
171
|
-
_.value = null, a.value = null;
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
_.value = i.currentTarget, a.value = e;
|
|
175
|
-
} else
|
|
176
|
-
_.value = null, a.value = null;
|
|
177
|
-
}, X = (i) => {
|
|
178
|
-
const e = a.value;
|
|
179
|
-
e && (i.id === "rename" && R(e), c("item-action", { id: i.id, text: i.text }, e));
|
|
180
|
-
};
|
|
181
|
-
return (i, e) => (r(), l("div", {
|
|
182
|
-
class: U(["tr-history", { "touch-device": n(k) }])
|
|
183
|
-
}, [
|
|
184
|
-
E.value ? (r(), J(xe, { key: 1 })) : (r(), l(B, { key: 0 }, [
|
|
185
|
-
(r(!0), l(B, null, H(h.value, (f) => (r(), l("div", {
|
|
186
|
-
class: "tr-history__group",
|
|
187
|
-
key: f.group
|
|
188
|
-
}, [
|
|
189
|
-
f.group !== n(F) ? (r(), l("div", be, D(f.group), 1)) : V("", !0),
|
|
190
|
-
w("div", $e, [
|
|
191
|
-
(r(!0), l(B, null, H(f.items, (u, Y) => (r(), l("div", {
|
|
192
|
-
class: U(["tr-history__item", {
|
|
193
|
-
selected: u.id && u.id === t.selected,
|
|
194
|
-
editing: n(v) === u,
|
|
195
|
-
active: a.value === u
|
|
196
|
-
}]),
|
|
197
|
-
key: u.id || Y,
|
|
198
|
-
onClick: (d) => c("item-click", u)
|
|
199
|
-
}, [
|
|
200
|
-
n(v) === u ? j((r(), l("input", {
|
|
201
|
-
key: 0,
|
|
202
|
-
class: "tr-history__item-editor",
|
|
203
|
-
type: "text",
|
|
204
|
-
onClick: e[0] || (e[0] = A(() => {
|
|
205
|
-
}, ["stop"])),
|
|
206
|
-
ref_for: !0,
|
|
207
|
-
ref_key: "editorRefList",
|
|
208
|
-
ref: I,
|
|
209
|
-
"onUpdate:modelValue": e[1] || (e[1] = (d) => se(C) ? C.value = d : null),
|
|
210
|
-
onKeydown: [
|
|
211
|
-
e[2] || (e[2] = q(
|
|
212
|
-
//@ts-ignore
|
|
213
|
-
(...d) => n(p) && n(p)(...d),
|
|
214
|
-
["enter"]
|
|
215
|
-
)),
|
|
216
|
-
e[3] || (e[3] = q(
|
|
217
|
-
//@ts-ignore
|
|
218
|
-
(...d) => n(o) && n(o)(...d),
|
|
219
|
-
["escape"]
|
|
220
|
-
))
|
|
221
|
-
]
|
|
222
|
-
}, null, 544)), [
|
|
223
|
-
[re, n(C)]
|
|
224
|
-
]) : (r(), l("span", {
|
|
225
|
-
key: 1,
|
|
226
|
-
class: "text",
|
|
227
|
-
title: u.title
|
|
228
|
-
}, D(u.title), 9, Be)),
|
|
229
|
-
w("span", {
|
|
230
|
-
class: "tr-history__item-actions",
|
|
231
|
-
onClick: e[6] || (e[6] = A(() => {
|
|
232
|
-
}, ["stop"]))
|
|
233
|
-
}, [
|
|
234
|
-
t.showRenameControls && n(v) === u ? (r(), l("button", {
|
|
235
|
-
key: 0,
|
|
236
|
-
class: "editor-confirm",
|
|
237
|
-
ref_for: !0,
|
|
238
|
-
ref_key: "editorConfirmRefList",
|
|
239
|
-
ref: y,
|
|
240
|
-
onClick: e[4] || (e[4] = //@ts-ignore
|
|
241
|
-
(...d) => n(p) && n(p)(...d))
|
|
242
|
-
}, [
|
|
243
|
-
b(n(de))
|
|
244
|
-
], 512)) : V("", !0),
|
|
245
|
-
t.showRenameControls && n(v) === u ? (r(), l("button", {
|
|
246
|
-
key: 1,
|
|
247
|
-
class: "editor-cancel",
|
|
248
|
-
ref_for: !0,
|
|
249
|
-
ref_key: "editorCancelRefList",
|
|
250
|
-
ref: M,
|
|
251
|
-
onClick: e[5] || (e[5] = //@ts-ignore
|
|
252
|
-
(...d) => n(o) && n(o)(...d))
|
|
253
|
-
}, [
|
|
254
|
-
b(n(me))
|
|
255
|
-
], 512)) : V("", !0),
|
|
256
|
-
w("button", {
|
|
257
|
-
class: U(["menu", { hidden: n(v) === u }]),
|
|
258
|
-
onClick: (d) => K(d, u)
|
|
259
|
-
}, [
|
|
260
|
-
b(n(fe))
|
|
261
|
-
], 10, De)
|
|
262
|
-
])
|
|
263
|
-
], 10, Oe))), 128))
|
|
264
|
-
])
|
|
265
|
-
]))), 128)),
|
|
266
|
-
j(b(Me, {
|
|
267
|
-
trigger: _.value,
|
|
268
|
-
"onUpdate:trigger": e[7] || (e[7] = (f) => _.value = f),
|
|
269
|
-
data: a.value,
|
|
270
|
-
"onUpdate:data": e[8] || (e[8] = (f) => a.value = f),
|
|
271
|
-
onItemClick: X
|
|
272
|
-
}, null, 8, ["trigger", "data"]), [
|
|
273
|
-
[le, _.value]
|
|
274
|
-
])
|
|
275
|
-
], 64))
|
|
276
|
-
], 2));
|
|
277
|
-
}
|
|
278
|
-
}), N = /* @__PURE__ */ z(Se, [["__scopeId", "data-v-13775543"]]), Ue = function(s) {
|
|
279
|
-
s.component(N.name, N);
|
|
280
|
-
};
|
|
281
|
-
Object.assign(N, {
|
|
282
|
-
name: "TrHistory",
|
|
283
|
-
install: Ue
|
|
284
|
-
});
|
|
1
|
+
import { H as f } from "../index2.js";
|
|
285
2
|
export {
|
|
286
|
-
|
|
3
|
+
f as default
|
|
287
4
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2192,18 +2192,12 @@ declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awai
|
|
|
2192
2192
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
2193
2193
|
readonly "onItem-click"?: ((item: T) => any) | undefined;
|
|
2194
2194
|
readonly "onItem-title-change"?: ((newTitle: string, item: T) => any) | undefined;
|
|
2195
|
-
readonly "onItem-action"?: ((action:
|
|
2196
|
-
id: string;
|
|
2197
|
-
text: string;
|
|
2198
|
-
}, item: T) => any) | undefined;
|
|
2195
|
+
readonly "onItem-action"?: ((action: HistoryMenuItem, item: T) => any) | undefined;
|
|
2199
2196
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onItem-click" | "onItem-title-change" | "onItem-action"> & HistoryProps<T> & Partial<{}>> & PublicProps;
|
|
2200
2197
|
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
2201
2198
|
attrs: any;
|
|
2202
2199
|
slots: {};
|
|
2203
|
-
emit: ((evt: "item-click", item: T) => void) & ((evt: "item-title-change", newTitle: string, item: T) => void) & ((evt: "item-action", action:
|
|
2204
|
-
id: string;
|
|
2205
|
-
text: string;
|
|
2206
|
-
}, item: T) => void);
|
|
2200
|
+
emit: ((evt: "item-click", item: T) => void) & ((evt: "item-title-change", newTitle: string, item: T) => void) & ((evt: "item-action", action: HistoryMenuItem, item: T) => void);
|
|
2207
2201
|
}>) => VNode & {
|
|
2208
2202
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
2209
2203
|
};
|
|
@@ -2586,11 +2580,19 @@ export declare interface HistoryItem {
|
|
|
2586
2580
|
[x: string]: any;
|
|
2587
2581
|
}
|
|
2588
2582
|
|
|
2583
|
+
export declare interface HistoryMenuItem {
|
|
2584
|
+
id: string;
|
|
2585
|
+
text: string;
|
|
2586
|
+
icon?: Component | VNode;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
2589
|
export declare type HistoryProps<T extends HistoryItem = HistoryItem> = {
|
|
2590
2590
|
data: HistoryData<T>;
|
|
2591
2591
|
selected?: string;
|
|
2592
2592
|
showRenameControls?: boolean;
|
|
2593
2593
|
renameControlOnClickOutside?: 'confirm' | 'cancel' | 'none';
|
|
2594
|
+
menuItems?: HistoryMenuItem[];
|
|
2595
|
+
menuListGap?: number;
|
|
2594
2596
|
};
|
|
2595
2597
|
|
|
2596
2598
|
export declare interface IconButtonProps {
|
|
@@ -3168,6 +3170,10 @@ export declare const useTheme: () => {
|
|
|
3168
3170
|
setColorMode: (mode: ColorMode) => boolean;
|
|
3169
3171
|
};
|
|
3170
3172
|
|
|
3173
|
+
export declare function useTouchDevice(): {
|
|
3174
|
+
isTouchDevice: Ref<boolean, boolean>;
|
|
3175
|
+
};
|
|
3176
|
+
|
|
3171
3177
|
/**
|
|
3172
3178
|
* 拖拽区域指令
|
|
3173
3179
|
* @param el 元素
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,15 @@ import b from "./conversations/index.js";
|
|
|
6
6
|
import L from "./drag-overlay/index.js";
|
|
7
7
|
import C from "./dropdown-menu/index.js";
|
|
8
8
|
import B from "./feedback/index.js";
|
|
9
|
-
import y from "./
|
|
9
|
+
import { H as y } from "./index2.js";
|
|
10
|
+
import { u as De } from "./index2.js";
|
|
10
11
|
import O from "./icon-button/index.js";
|
|
11
|
-
import { Prompt as
|
|
12
|
-
import
|
|
12
|
+
import { Prompt as H, Prompts as j } from "./prompts/index.js";
|
|
13
|
+
import A from "./sender/index.js";
|
|
13
14
|
import M, { SuggestionPillButton as w } from "./suggestion-pills/index.js";
|
|
14
15
|
import R from "./suggestion-popover/index.js";
|
|
15
16
|
import k from "./theme-provider/index.js";
|
|
16
|
-
import { useTheme as
|
|
17
|
+
import { useTheme as he } from "./theme-provider/index.js";
|
|
17
18
|
import W from "./welcome/index.js";
|
|
18
19
|
import $ from "./mcp-server-picker/index.js";
|
|
19
20
|
import I from "./mcp-add-form/index.js";
|
|
@@ -69,7 +70,7 @@ function G(e, r) {
|
|
|
69
70
|
}
|
|
70
71
|
return { acceptedFiles: n, rejectedFiles: s, rejectionReason: null };
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
+
function D(e) {
|
|
73
74
|
return {
|
|
74
75
|
accept: e.accept || "*",
|
|
75
76
|
multiple: e.multiple ?? !0,
|
|
@@ -89,7 +90,7 @@ const pe = {
|
|
|
89
90
|
mounted(e, r) {
|
|
90
91
|
let t = 0;
|
|
91
92
|
const { disabled: o, onDraggingChange: a } = r.value;
|
|
92
|
-
e.__vDropzoneOptions__ =
|
|
93
|
+
e.__vDropzoneOptions__ = D(r.value);
|
|
93
94
|
const l = {
|
|
94
95
|
/**
|
|
95
96
|
* 拖拽进入
|
|
@@ -118,12 +119,12 @@ const pe = {
|
|
|
118
119
|
var u;
|
|
119
120
|
if (o) return;
|
|
120
121
|
n.preventDefault(), t = 0, a(!1, null);
|
|
121
|
-
const s = (u = n.dataTransfer) == null ? void 0 : u.files, { onDrop: i, onError: p, accept: m, multiple: c, maxSize:
|
|
122
|
+
const s = (u = n.dataTransfer) == null ? void 0 : u.files, { onDrop: i, onError: p, accept: m, multiple: c, maxSize: g, maxFiles: h } = e.__vDropzoneOptions__;
|
|
122
123
|
if (s && s.length > 0) {
|
|
123
124
|
const T = Array.from(s), { acceptedFiles: v, rejectedFiles: F, rejectionReason: f } = G(T, {
|
|
124
125
|
accept: m,
|
|
125
126
|
multiple: c,
|
|
126
|
-
maxSize:
|
|
127
|
+
maxSize: g,
|
|
127
128
|
maxFiles: h
|
|
128
129
|
});
|
|
129
130
|
f && p({ files: F, ...f }), v.length > 0 && i(v);
|
|
@@ -133,7 +134,7 @@ const pe = {
|
|
|
133
134
|
e.__vDropzoneHandlers__ = l, e.addEventListener("dragenter", l.handleDragEnter), e.addEventListener("dragover", l.handleDragOver), e.addEventListener("dragleave", l.handleDragLeave), e.addEventListener("drop", l.handleDrop);
|
|
134
135
|
},
|
|
135
136
|
updated(e, r) {
|
|
136
|
-
e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ =
|
|
137
|
+
e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ = D(r.value));
|
|
137
138
|
},
|
|
138
139
|
/**
|
|
139
140
|
* 卸载指令
|
|
@@ -154,9 +155,9 @@ const pe = {
|
|
|
154
155
|
B,
|
|
155
156
|
y,
|
|
156
157
|
O,
|
|
158
|
+
H,
|
|
157
159
|
j,
|
|
158
160
|
A,
|
|
159
|
-
H,
|
|
160
161
|
M,
|
|
161
162
|
w,
|
|
162
163
|
R,
|
|
@@ -188,9 +189,9 @@ export {
|
|
|
188
189
|
O as IconButton,
|
|
189
190
|
I as McpAddForm,
|
|
190
191
|
$ as McpServerPicker,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
H as Prompt,
|
|
193
|
+
j as Prompts,
|
|
194
|
+
A as Sender,
|
|
194
195
|
w as SuggestionPillButton,
|
|
195
196
|
M as SuggestionPills,
|
|
196
197
|
R as SuggestionPopover,
|
|
@@ -208,9 +209,9 @@ export {
|
|
|
208
209
|
O as TrIconButton,
|
|
209
210
|
I as TrMcpAddForm,
|
|
210
211
|
$ as TrMcpServerPicker,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
H as TrPrompt,
|
|
213
|
+
j as TrPrompts,
|
|
214
|
+
A as TrSender,
|
|
214
215
|
w as TrSuggestionPillButton,
|
|
215
216
|
M as TrSuggestionPills,
|
|
216
217
|
R as TrSuggestionPopover,
|
|
@@ -218,6 +219,7 @@ export {
|
|
|
218
219
|
W as TrWelcome,
|
|
219
220
|
W as Welcome,
|
|
220
221
|
me as default,
|
|
221
|
-
|
|
222
|
+
he as useTheme,
|
|
223
|
+
De as useTouchDevice,
|
|
222
224
|
pe as vDropzone
|
|
223
225
|
};
|