@opentiny/tiny-robot 0.3.1-alpha.5 → 0.3.1-alpha.7
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 +6 -4014
- package/dist/drag-overlay/index.js +1 -1
- package/dist/dropdown-menu/index.js +1 -1
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +1210 -2235
- package/dist/index.js +104 -135
- package/dist/index2.js +4062 -183
- package/dist/index3.js +285 -261
- package/dist/index4.js +329 -362
- package/dist/index5.js +146 -286
- package/dist/mcp-add-form/index.js +1 -1
- package/dist/mcp-server-picker/index.js +58 -57
- package/dist/sender/index.js +1480 -6
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +2 -2
- package/dist/utils.js +1 -1
- package/package.json +3 -13
- package/dist/chat-input/index.js +0 -3151
- package/dist/chat-input-actions/index.js +0 -13
- package/dist/index6.js +0 -161
- package/dist/sender-compat/index.js +0 -233
package/dist/index5.js
CHANGED
|
@@ -1,301 +1,161 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
s
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
$ == null || $(), $ = void 0;
|
|
1
|
+
import { onMounted as U, nextTick as B, h as C, defineComponent as _, render as R, onBeforeUnmount as D, Teleport as W, computed as h, ref as E, createBlock as F, openBlock as g, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, createCommentVNode as J, renderSlot as K, useSlots as Q, watch as X, useAttrs as Y, resolveDynamicComponent as ee, unref as S, mergeProps as k, createVNode as te } from "vue";
|
|
2
|
+
import { a as oe, c as re, e as ne } from "./index4.js";
|
|
3
|
+
import { t as u } from "./utils.js";
|
|
4
|
+
import { _ as N } from "./_plugin-vue_export-helper.js";
|
|
5
|
+
import { u as se } from "./useSlotRefs.js";
|
|
6
|
+
const pe = _({
|
|
7
|
+
setup: (r) => () => C(W, r.propsFactory(), r.vnodeFactory()),
|
|
8
|
+
props: ["propsFactory", "vnodeFactory"]
|
|
9
|
+
});
|
|
10
|
+
function ae(r, n) {
|
|
11
|
+
let e = null, t = null, s = !1;
|
|
12
|
+
U(() => {
|
|
13
|
+
B(() => {
|
|
14
|
+
s || (t = document.createElement("div"), e = C(pe, { propsFactory: r, vnodeFactory: n }), R(e, t));
|
|
15
|
+
});
|
|
16
|
+
}), D(() => {
|
|
17
|
+
s = !0, B(() => {
|
|
18
|
+
t && (R(null, t), t.remove(), e = null, t = null);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
22
21
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
function ce(r, n) {
|
|
23
|
+
return h(() => {
|
|
24
|
+
var v;
|
|
25
|
+
if (n instanceof HTMLElement)
|
|
26
|
+
return n;
|
|
27
|
+
const e = n, t = oe(r), s = (v = t == null ? void 0 : t.getRootNode) == null ? void 0 : v.call(t), i = s instanceof ShadowRoot, d = i ? s : document.body;
|
|
28
|
+
if (e) {
|
|
29
|
+
if (!i && e === "body")
|
|
30
|
+
return document.body;
|
|
31
|
+
const f = d.querySelector(e);
|
|
32
|
+
if (f instanceof Node) return f;
|
|
33
|
+
}
|
|
34
|
+
return d;
|
|
32
35
|
});
|
|
33
36
|
}
|
|
34
|
-
const
|
|
35
|
-
__name: "
|
|
37
|
+
const ie = /* @__PURE__ */ _({
|
|
38
|
+
__name: "Popper",
|
|
36
39
|
props: {
|
|
37
|
-
|
|
40
|
+
show: { type: Boolean },
|
|
41
|
+
transitionProps: {}
|
|
38
42
|
},
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
setup(r, { expose: n }) {
|
|
44
|
+
const e = E(null);
|
|
45
|
+
return n({
|
|
46
|
+
popperRef: e
|
|
47
|
+
}), (t, s) => (g(), F(j, q(L(r.transitionProps)), {
|
|
48
|
+
default: Z(() => [
|
|
49
|
+
r.show ? (g(), G("div", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "tr-base-popper",
|
|
52
|
+
ref_key: "popperRef",
|
|
53
|
+
ref: e
|
|
54
|
+
}, [
|
|
55
|
+
K(t.$slots, "default", {}, void 0, !0)
|
|
56
|
+
], 512)) : J("", !0)
|
|
44
57
|
]),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
}), Re = /* @__PURE__ */ z(we, [["__scopeId", "data-v-d0340c39"]]), Ie = ["onClick"], Q = 4, xe = /* @__PURE__ */ P({
|
|
49
|
-
__name: "MenuList",
|
|
50
|
-
props: /* @__PURE__ */ W({
|
|
51
|
-
items: {},
|
|
52
|
-
menuListGap: { default: 8 }
|
|
53
|
-
}, {
|
|
54
|
-
trigger: { default: null },
|
|
55
|
-
triggerModifiers: {},
|
|
56
|
-
data: { default: null },
|
|
57
|
-
dataModifiers: {}
|
|
58
|
-
}),
|
|
59
|
-
emits: /* @__PURE__ */ W(["item-click"], ["update:trigger", "update:data"]),
|
|
60
|
-
setup(s, { emit: m }) {
|
|
61
|
-
const t = j(s, "trigger"), c = j(s, "data"), h = s, C = m, E = _(null);
|
|
62
|
-
Z(
|
|
63
|
-
E,
|
|
64
|
-
() => {
|
|
65
|
-
t.value = null, c.value = null;
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
ignore: [t]
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
const { top: p, bottom: x, left: y } = ve(t), { width: M, height: k } = ge(E, void 0, { box: "border-box" }), { height: R } = ye(), o = I(() => {
|
|
72
|
-
const L = {
|
|
73
|
-
left: `min(${O(y.value)}, calc(100% - ${O(M.value + Q)}))`
|
|
74
|
-
}, g = x.value + h.menuListGap;
|
|
75
|
-
return g + k.value + Q > R.value ? L.bottom = `calc(100% - ${O(p.value - h.menuListGap)})` : L.top = O(g), L;
|
|
76
|
-
}), v = (L) => {
|
|
77
|
-
C("item-click", L), t.value = null, c.value = null;
|
|
78
|
-
};
|
|
79
|
-
return (L, g) => (r(), a("ul", {
|
|
80
|
-
class: "tr-history__menu-list",
|
|
81
|
-
ref_key: "menuRef",
|
|
82
|
-
ref: E,
|
|
83
|
-
style: ie(o.value)
|
|
84
|
-
}, [
|
|
85
|
-
(r(!0), a(S, null, V(h.items, (u) => (r(), a("li", {
|
|
86
|
-
class: "tr-history__menu-list__item",
|
|
87
|
-
key: u.id,
|
|
88
|
-
onClick: (K) => v(u)
|
|
89
|
-
}, [
|
|
90
|
-
(r(), H(Y(u.icon))),
|
|
91
|
-
w("span", null, B(u.text), 1)
|
|
92
|
-
], 8, Ie))), 128))
|
|
93
|
-
], 4));
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16));
|
|
94
60
|
}
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
onItemTitleChange: m
|
|
98
|
-
}) => {
|
|
99
|
-
const t = _(void 0), c = _(null), h = I(() => {
|
|
100
|
-
var o;
|
|
101
|
-
return (o = c.value) == null ? void 0 : o.at(0);
|
|
102
|
-
}), C = _(null), E = I(() => {
|
|
103
|
-
var o;
|
|
104
|
-
return (o = C.value) == null ? void 0 : o.at(0);
|
|
105
|
-
}), p = _(null), x = I(() => {
|
|
106
|
-
var o;
|
|
107
|
-
return (o = p.value) == null ? void 0 : o.at(0);
|
|
108
|
-
}), y = _(""), M = (o) => {
|
|
109
|
-
t.value = o, y.value = o.title, se(() => {
|
|
110
|
-
const v = h.value;
|
|
111
|
-
v && (v.focus(), v.select());
|
|
112
|
-
});
|
|
113
|
-
}, k = () => {
|
|
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") && Z(
|
|
119
|
-
h,
|
|
120
|
-
() => {
|
|
121
|
-
s === "confirm" ? R() : k();
|
|
122
|
-
},
|
|
123
|
-
{ ignore: [E, x] }
|
|
124
|
-
), {
|
|
125
|
-
editingItem: t,
|
|
126
|
-
editorRefList: c,
|
|
127
|
-
editorConfirmRefList: C,
|
|
128
|
-
editorCancelRefList: p,
|
|
129
|
-
editorValue: y,
|
|
130
|
-
handleEdit: M,
|
|
131
|
-
handleEditCancel: k,
|
|
132
|
-
handleEditConfirm: R
|
|
133
|
-
};
|
|
134
|
-
}, X = Symbol("NO_GROUP"), Te = {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "tr-history__group-title"
|
|
137
|
-
}, $e = { class: "tr-history__group-items" }, Ge = ["onClick"], Oe = ["title"], Se = ["onClick"], Be = /* @__PURE__ */ P({
|
|
61
|
+
}), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ _({
|
|
62
|
+
inheritAttrs: !1,
|
|
138
63
|
__name: "index",
|
|
139
64
|
props: {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
65
|
+
appendTo: {},
|
|
66
|
+
offset: {},
|
|
67
|
+
placement: {
|
|
68
|
+
default: "top-center"
|
|
69
|
+
},
|
|
70
|
+
preventOverflow: {
|
|
71
|
+
type: Boolean
|
|
72
|
+
},
|
|
73
|
+
show: {
|
|
74
|
+
type: Boolean
|
|
75
|
+
},
|
|
76
|
+
transitionProps: {},
|
|
77
|
+
triggerEvents: {}
|
|
149
78
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
79
|
+
setup(r, {
|
|
80
|
+
expose: n
|
|
81
|
+
}) {
|
|
82
|
+
const e = r, t = Q(), {
|
|
83
|
+
vnodes: s,
|
|
84
|
+
ref: i,
|
|
85
|
+
setRef: d
|
|
86
|
+
} = se(t.trigger), v = (o = {}) => {
|
|
87
|
+
const p = {};
|
|
88
|
+
for (const [c, a] of Object.entries(o))
|
|
89
|
+
/^on[A-Z]/.test(c) && typeof a == "function" && (p[c] = a);
|
|
90
|
+
return p;
|
|
91
|
+
}, f = E(null), b = h(() => {
|
|
92
|
+
var o;
|
|
93
|
+
return ((o = f.value) == null ? void 0 : o.popperRef) || null;
|
|
94
|
+
}), m = h(() => {
|
|
95
|
+
var o, p;
|
|
96
|
+
return typeof e.offset == "number" ? {
|
|
97
|
+
mainAxis: e.offset,
|
|
98
|
+
crossAxis: 0
|
|
99
|
+
} : {
|
|
100
|
+
mainAxis: ((o = e.offset) == null ? void 0 : o.mainAxis) ?? 0,
|
|
101
|
+
crossAxis: ((p = e.offset) == null ? void 0 : p.crossAxis) ?? 0
|
|
102
|
+
};
|
|
103
|
+
}), {
|
|
104
|
+
top: $,
|
|
105
|
+
bottom: O,
|
|
106
|
+
left: w,
|
|
107
|
+
right: V,
|
|
108
|
+
width: z,
|
|
109
|
+
update: A
|
|
110
|
+
} = re(i), {
|
|
111
|
+
width: x,
|
|
112
|
+
height: P
|
|
113
|
+
} = ne(b, void 0, {
|
|
114
|
+
box: "border-box"
|
|
115
|
+
}), H = h(() => {
|
|
116
|
+
const {
|
|
117
|
+
placement: o,
|
|
118
|
+
preventOverflow: p
|
|
119
|
+
} = e, c = {}, a = (l, y) => {
|
|
120
|
+
if (!p) {
|
|
121
|
+
c[l] = y;
|
|
177
122
|
return;
|
|
178
123
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
class: "tr-history__item-editor",
|
|
210
|
-
type: "text",
|
|
211
|
-
onClick: e[0] || (e[0] = J(() => {
|
|
212
|
-
}, ["stop"])),
|
|
213
|
-
ref_for: !0,
|
|
214
|
-
ref_key: "editorRefList",
|
|
215
|
-
ref: x,
|
|
216
|
-
"onUpdate:modelValue": e[1] || (e[1] = (d) => le(k) ? k.value = d : null),
|
|
217
|
-
onKeydown: [
|
|
218
|
-
e[2] || (e[2] = F(
|
|
219
|
-
//@ts-ignore
|
|
220
|
-
(...d) => n(v) && n(v)(...d),
|
|
221
|
-
["enter"]
|
|
222
|
-
)),
|
|
223
|
-
e[3] || (e[3] = F(
|
|
224
|
-
//@ts-ignore
|
|
225
|
-
(...d) => n(o) && n(o)(...d),
|
|
226
|
-
["escape"]
|
|
227
|
-
))
|
|
228
|
-
]
|
|
229
|
-
}, null, 544)), [
|
|
230
|
-
[re, n(k)]
|
|
231
|
-
]) : A(i.$slots, "item-title", {
|
|
232
|
-
key: 2,
|
|
233
|
-
item: l
|
|
234
|
-
}, () => [
|
|
235
|
-
w("span", {
|
|
236
|
-
class: "text",
|
|
237
|
-
title: l.title
|
|
238
|
-
}, B(l.title), 9, Oe)
|
|
239
|
-
], !0),
|
|
240
|
-
w("span", {
|
|
241
|
-
class: "tr-history__item-actions",
|
|
242
|
-
onClick: e[6] || (e[6] = J(() => {
|
|
243
|
-
}, ["stop"]))
|
|
244
|
-
}, [
|
|
245
|
-
t.showRenameControls && n(p) === l ? (r(), a("button", {
|
|
246
|
-
key: 0,
|
|
247
|
-
class: "editor-confirm",
|
|
248
|
-
ref_for: !0,
|
|
249
|
-
ref_key: "editorConfirmRefList",
|
|
250
|
-
ref: y,
|
|
251
|
-
onClick: e[4] || (e[4] = //@ts-ignore
|
|
252
|
-
(...d) => n(v) && n(v)(...d))
|
|
253
|
-
}, [
|
|
254
|
-
T(n(me))
|
|
255
|
-
], 512)) : G("", !0),
|
|
256
|
-
t.showRenameControls && n(p) === l ? (r(), a("button", {
|
|
257
|
-
key: 1,
|
|
258
|
-
class: "editor-cancel",
|
|
259
|
-
ref_for: !0,
|
|
260
|
-
ref_key: "editorCancelRefList",
|
|
261
|
-
ref: M,
|
|
262
|
-
onClick: e[5] || (e[5] = //@ts-ignore
|
|
263
|
-
(...d) => n(o) && n(o)(...d))
|
|
264
|
-
}, [
|
|
265
|
-
T(n(fe))
|
|
266
|
-
], 512)) : G("", !0),
|
|
267
|
-
w("button", {
|
|
268
|
-
class: U(["menu", { hidden: n(p) === l }]),
|
|
269
|
-
onClick: (d) => K(d, l)
|
|
270
|
-
}, [
|
|
271
|
-
T(n(pe))
|
|
272
|
-
], 10, Se)
|
|
273
|
-
])
|
|
274
|
-
], 10, Ge))), 128))
|
|
275
|
-
])
|
|
276
|
-
]))), 128)),
|
|
277
|
-
q(T(Me, {
|
|
278
|
-
trigger: g.value,
|
|
279
|
-
"onUpdate:trigger": e[7] || (e[7] = (f) => g.value = f),
|
|
280
|
-
data: u.value,
|
|
281
|
-
"onUpdate:data": e[8] || (e[8] = (f) => u.value = f),
|
|
282
|
-
items: t.menuItems,
|
|
283
|
-
"menu-list-gap": t.menuListGap,
|
|
284
|
-
onItemClick: ee
|
|
285
|
-
}, null, 8, ["trigger", "data", "items", "menu-list-gap"]), [
|
|
286
|
-
[ae, g.value]
|
|
287
|
-
])
|
|
288
|
-
], 64))
|
|
289
|
-
], 2));
|
|
124
|
+
const T = u(l === "top" ? P.value : x.value);
|
|
125
|
+
l === "top" ? c[l] = `clamp(var(--tr-base-popper-min-top), ${y}, calc(var(--tr-base-popper-max-bottom) - ${T}))` : l === "left" && (c[l] = `clamp(var(--tr-base-popper-min-left), ${y}, calc(var(--tr-base-popper-max-right) - ${T}))`);
|
|
126
|
+
};
|
|
127
|
+
return o.includes("top") && a("top", u($.value - P.value - m.value.mainAxis)), o.includes("bottom") && a("top", u(O.value + m.value.mainAxis)), o.includes("left") && a("left", u(w.value + m.value.crossAxis)), o.includes("right") && a("left", u(V.value - x.value + m.value.crossAxis)), o.includes("center") && a("left", u(w.value + z.value / 2 - x.value / 2 + m.value.crossAxis)), c;
|
|
128
|
+
});
|
|
129
|
+
X(() => e.show, (o) => {
|
|
130
|
+
o && A();
|
|
131
|
+
}, {
|
|
132
|
+
flush: "post"
|
|
133
|
+
});
|
|
134
|
+
const I = ce(i, e.appendTo), M = Y();
|
|
135
|
+
return ae(() => ({
|
|
136
|
+
to: I.value
|
|
137
|
+
}), () => te(le, k({
|
|
138
|
+
ref: f,
|
|
139
|
+
show: e.show,
|
|
140
|
+
transitionProps: e.transitionProps,
|
|
141
|
+
style: H.value
|
|
142
|
+
}, M), {
|
|
143
|
+
default: () => {
|
|
144
|
+
var o;
|
|
145
|
+
return [(o = t.content) == null ? void 0 : o.call(t)];
|
|
146
|
+
}
|
|
147
|
+
})), n({
|
|
148
|
+
triggerRef: i,
|
|
149
|
+
popperRef: b,
|
|
150
|
+
update: A
|
|
151
|
+
}), (o, p) => (g(), F(ee(S(s)[0]), k({
|
|
152
|
+
ref: S(d)
|
|
153
|
+
}, v(e.triggerEvents)), null, 16));
|
|
290
154
|
}
|
|
291
|
-
}),
|
|
292
|
-
|
|
293
|
-
};
|
|
294
|
-
Object.assign(N, {
|
|
295
|
-
name: "TrHistory",
|
|
296
|
-
install: De
|
|
297
|
-
});
|
|
155
|
+
}), fe = /* @__PURE__ */ N(ue, [["__scopeId", "data-v-f1e25842"]]);
|
|
156
|
+
fe.name = "TrBasePopper";
|
|
298
157
|
export {
|
|
299
|
-
|
|
300
|
-
|
|
158
|
+
fe as B,
|
|
159
|
+
ae as c,
|
|
160
|
+
ce as u
|
|
301
161
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, createElementBlock as _, openBlock as v, createElementVNode as t, withDirectives as c, vModelText as f, createVNode as y, unref as D, createCommentVNode as $ } from "vue";
|
|
2
2
|
import { TinyRadioGroup as E } from "@opentiny/vue";
|
|
3
|
-
import {
|
|
3
|
+
import { f as L } from "../index4.js";
|
|
4
4
|
import { _ as T } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const M = { class: "form-editor__container" }, S = { class: "form-editor__item" }, F = { class: "form-editor__item" }, I = { class: "form-editor__item" }, N = { class: "form-editor__item" }, H = { class: "form-editor__item" }, w = { class: "form-editor__item" }, A = ["src"], C = "https://res.hc-cdn.com/tinyui-design/1.1.0.20250526191525/home/images/tiny-ng.svg", P = /* @__PURE__ */ g({
|
|
6
6
|
__name: "FormEditor",
|