@opentiny/tiny-robot 0.5.0 → 0.5.1-alpha.14
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/attachments/index.js +261 -258
- package/dist/dropdown-menu/index.js +1 -1
- package/dist/extension-manager/index.js +473 -0
- package/dist/floating-ui.dom.js +970 -0
- package/dist/index.d.ts +595 -163
- package/dist/index.js +116 -103
- package/dist/index4.js +2 -2
- package/dist/index6.js +441 -431
- package/dist/index8.js +87 -102
- package/dist/layout/index.js +1 -1
- package/dist/model-selector/index.js +1002 -0
- package/dist/sender/index.js +1232 -2114
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +37 -36
- package/dist/useSenderContentRegistration.js +8 -0
- package/dist/useSlotRefs.js +1 -1
- package/dist/useTeleportTarget.js +25 -0
- package/dist/utils.js +1 -1
- package/package.json +4 -4
- package/README.md +0 -192
- package/README.zh-CN.md +0 -192
package/dist/index.js
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { B
|
|
3
|
-
import { c as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import x from "./attachments/index.js";
|
|
2
|
+
import { B, a as E, b as F } from "./index6.js";
|
|
3
|
+
import { c as je, d as He, u as $e, e as We, f as we, g as ke, h as Ne, i as Ve, j as Ge, k as Ie } from "./index6.js";
|
|
4
|
+
import b from "./container/index.js";
|
|
5
|
+
import C from "./anchor/index.js";
|
|
6
|
+
import z from "./conversations/index.js";
|
|
7
7
|
import y from "./drag-overlay/index.js";
|
|
8
8
|
import L from "./dropdown-menu/index.js";
|
|
9
9
|
import P from "./feedback/index.js";
|
|
10
10
|
import { H as A } from "./index7.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import
|
|
13
|
-
import { Layout as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import w from "./sender
|
|
17
|
-
import k
|
|
18
|
-
import V from "./suggestion-
|
|
11
|
+
import { u as Ke } from "./index7.js";
|
|
12
|
+
import M from "./icon-button/index.js";
|
|
13
|
+
import { Layout as O, LayoutProxyScrollbar as R, LayoutAsideToggle as j } from "./layout/index.js";
|
|
14
|
+
import H from "./model-selector/index.js";
|
|
15
|
+
import { Prompt as $, Prompts as W } from "./prompts/index.js";
|
|
16
|
+
import w from "./sender/index.js";
|
|
17
|
+
import k from "./sender-compat/index.js";
|
|
18
|
+
import N, { SuggestionPillButton as V } from "./suggestion-pills/index.js";
|
|
19
|
+
import G from "./suggestion-popover/index.js";
|
|
19
20
|
import I from "./theme-provider/index.js";
|
|
20
|
-
import { useTheme as
|
|
21
|
+
import { useTheme as Ye } from "./theme-provider/index.js";
|
|
21
22
|
import U from "./welcome/index.js";
|
|
22
23
|
import K from "./mcp-server-picker/index.js";
|
|
23
24
|
import X from "./mcp-add-form/index.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { _ as Z,
|
|
25
|
+
import { ExtensionCard as Y, ExtensionCardGrid as q } from "./extension-manager/index.js";
|
|
26
|
+
import { u as Je } from "./useSenderContentRegistration.js";
|
|
27
|
+
import { A as J, S as Q, _ as Z, W as ee, D as re } from "./index2.js";
|
|
28
|
+
import { a as Ze, u as er } from "./index2.js";
|
|
29
|
+
import { _ as oe, V as te } from "./index3.js";
|
|
27
30
|
var u = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(u || {});
|
|
28
|
-
function
|
|
31
|
+
function ae(e, r) {
|
|
29
32
|
if (!r) return !0;
|
|
30
33
|
const t = r.split(",").map((o) => o.trim());
|
|
31
34
|
return t.includes("*") ? !0 : t.some((o) => {
|
|
@@ -41,12 +44,12 @@ function re(e, r) {
|
|
|
41
44
|
function v(e, r) {
|
|
42
45
|
return e.size <= r;
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function ne(e, r) {
|
|
45
48
|
return e.length <= r;
|
|
46
49
|
}
|
|
47
|
-
function
|
|
50
|
+
function se(e, r) {
|
|
48
51
|
const { accept: t, multiple: o, maxSize: n, maxFiles: l } = r, a = [], s = [];
|
|
49
|
-
if (!
|
|
52
|
+
if (!ne(e, l))
|
|
50
53
|
return {
|
|
51
54
|
acceptedFiles: a,
|
|
52
55
|
rejectedFiles: Array.from(e),
|
|
@@ -56,7 +59,7 @@ function te(e, r) {
|
|
|
56
59
|
}
|
|
57
60
|
};
|
|
58
61
|
if (e.forEach((i) => {
|
|
59
|
-
|
|
62
|
+
ae(i, t) && v(i, n) ? a.push(i) : s.push(i);
|
|
60
63
|
}), !o && a.length > 1)
|
|
61
64
|
return {
|
|
62
65
|
acceptedFiles: [],
|
|
@@ -87,7 +90,7 @@ function T(e) {
|
|
|
87
90
|
disabled: e.disabled || !1
|
|
88
91
|
};
|
|
89
92
|
}
|
|
90
|
-
const
|
|
93
|
+
const Ae = {
|
|
91
94
|
/**
|
|
92
95
|
* 挂载指令
|
|
93
96
|
* @param el 元素
|
|
@@ -127,13 +130,13 @@ const ze = {
|
|
|
127
130
|
a.preventDefault(), t = 0, n(!1, null);
|
|
128
131
|
const s = (p = a.dataTransfer) == null ? void 0 : p.files, { onDrop: i, onError: d, accept: m, multiple: c, maxSize: g, maxFiles: D } = e.__vDropzoneOptions__;
|
|
129
132
|
if (s && s.length > 0) {
|
|
130
|
-
const h = Array.from(s), { acceptedFiles: f, rejectedFiles:
|
|
133
|
+
const h = Array.from(s), { acceptedFiles: f, rejectedFiles: S, rejectionReason: _ } = se(h, {
|
|
131
134
|
accept: m,
|
|
132
135
|
multiple: c,
|
|
133
136
|
maxSize: g,
|
|
134
137
|
maxFiles: D
|
|
135
138
|
});
|
|
136
|
-
_ && d({ files:
|
|
139
|
+
_ && d({ files: S, ..._ }), f.length > 0 && i(f);
|
|
137
140
|
}
|
|
138
141
|
}
|
|
139
142
|
};
|
|
@@ -149,129 +152,139 @@ const ze = {
|
|
|
149
152
|
unmounted(e) {
|
|
150
153
|
e.__vDropzoneHandlers__ && (e.removeEventListener("dragenter", e.__vDropzoneHandlers__.handleDragEnter), e.removeEventListener("dragover", e.__vDropzoneHandlers__.handleDragOver), e.removeEventListener("dragleave", e.__vDropzoneHandlers__.handleDragLeave), e.removeEventListener("drop", e.__vDropzoneHandlers__.handleDrop), delete e.__vDropzoneHandlers__), delete e.__vDropzoneOptions__;
|
|
151
154
|
}
|
|
152
|
-
},
|
|
153
|
-
S,
|
|
154
|
-
F,
|
|
155
|
-
b,
|
|
155
|
+
}, ie = [
|
|
156
156
|
x,
|
|
157
|
+
B,
|
|
157
158
|
E,
|
|
158
|
-
|
|
159
|
+
F,
|
|
160
|
+
b,
|
|
159
161
|
C,
|
|
162
|
+
z,
|
|
160
163
|
y,
|
|
161
164
|
L,
|
|
162
165
|
P,
|
|
163
166
|
A,
|
|
164
|
-
O,
|
|
165
167
|
M,
|
|
168
|
+
O,
|
|
169
|
+
R,
|
|
166
170
|
j,
|
|
167
171
|
H,
|
|
168
|
-
R,
|
|
169
|
-
W,
|
|
170
172
|
$,
|
|
173
|
+
W,
|
|
171
174
|
w,
|
|
172
175
|
k,
|
|
173
176
|
N,
|
|
174
177
|
V,
|
|
178
|
+
G,
|
|
175
179
|
I,
|
|
176
180
|
U,
|
|
177
181
|
K,
|
|
178
182
|
X,
|
|
179
183
|
Y,
|
|
180
184
|
q,
|
|
181
|
-
|
|
185
|
+
J,
|
|
186
|
+
Q,
|
|
182
187
|
Z,
|
|
188
|
+
oe,
|
|
189
|
+
te,
|
|
183
190
|
ee,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
], Ce = {
|
|
191
|
+
re
|
|
192
|
+
], Me = {
|
|
187
193
|
install(e) {
|
|
188
|
-
|
|
194
|
+
ie.forEach((r) => {
|
|
189
195
|
const t = r.name.replace(/^Tiny/, "").replace(/^Tr/, "");
|
|
190
196
|
e.component(`Tr${t}`, r);
|
|
191
197
|
});
|
|
192
198
|
}
|
|
193
199
|
};
|
|
194
200
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
201
|
+
J as ActionButton,
|
|
202
|
+
C as Anchor,
|
|
203
|
+
x as Attachments,
|
|
204
|
+
B as Bubble,
|
|
205
|
+
E as BubbleList,
|
|
206
|
+
F as BubbleProvider,
|
|
207
|
+
je as BubbleRendererMatchPriority,
|
|
208
|
+
He as BubbleRenderers,
|
|
209
|
+
Z as ClearButton,
|
|
210
|
+
b as Container,
|
|
211
|
+
z as Conversations,
|
|
212
|
+
re as DefaultActionButtons,
|
|
207
213
|
y as DragOverlay,
|
|
208
214
|
L as DropdownMenu,
|
|
215
|
+
Y as ExtensionCard,
|
|
216
|
+
q as ExtensionCardGrid,
|
|
209
217
|
P as Feedback,
|
|
210
218
|
A as History,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
219
|
+
M as IconButton,
|
|
220
|
+
O as Layout,
|
|
221
|
+
j as LayoutAsideToggle,
|
|
222
|
+
R as LayoutProxyScrollbar,
|
|
215
223
|
X as McpAddForm,
|
|
216
224
|
K as McpServerPicker,
|
|
217
|
-
|
|
225
|
+
H as ModelSelector,
|
|
226
|
+
$ as Prompt,
|
|
218
227
|
W as Prompts,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
228
|
+
Ze as SENDER_CONTEXT_KEY,
|
|
229
|
+
w as Sender,
|
|
230
|
+
k as SenderCompat,
|
|
231
|
+
Q as SubmitButton,
|
|
232
|
+
V as SuggestionPillButton,
|
|
233
|
+
N as SuggestionPills,
|
|
234
|
+
G as SuggestionPopover,
|
|
226
235
|
I as ThemeProvider,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
236
|
+
J as TrActionButton,
|
|
237
|
+
C as TrAnchor,
|
|
238
|
+
x as TrAttachments,
|
|
239
|
+
B as TrBubble,
|
|
240
|
+
E as TrBubbleList,
|
|
241
|
+
F as TrBubbleProvider,
|
|
242
|
+
Z as TrClearButton,
|
|
243
|
+
b as TrContainer,
|
|
244
|
+
z as TrConversations,
|
|
245
|
+
re as TrDefaultActionButtons,
|
|
237
246
|
y as TrDragOverlay,
|
|
238
247
|
L as TrDropdownMenu,
|
|
248
|
+
Y as TrExtensionCard,
|
|
249
|
+
q as TrExtensionCardGrid,
|
|
239
250
|
P as TrFeedback,
|
|
240
251
|
A as TrHistory,
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
252
|
+
M as TrIconButton,
|
|
253
|
+
O as TrLayout,
|
|
254
|
+
j as TrLayoutAsideToggle,
|
|
255
|
+
R as TrLayoutProxyScrollbar,
|
|
245
256
|
X as TrMcpAddForm,
|
|
246
257
|
K as TrMcpServerPicker,
|
|
247
|
-
|
|
258
|
+
H as TrModelSelector,
|
|
259
|
+
$ as TrPrompt,
|
|
248
260
|
W as TrPrompts,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
261
|
+
w as TrSender,
|
|
262
|
+
k as TrSenderCompat,
|
|
263
|
+
Q as TrSubmitButton,
|
|
264
|
+
V as TrSuggestionPillButton,
|
|
265
|
+
N as TrSuggestionPills,
|
|
266
|
+
G as TrSuggestionPopover,
|
|
255
267
|
I as TrThemeProvider,
|
|
256
|
-
|
|
257
|
-
|
|
268
|
+
oe as TrUploadButton,
|
|
269
|
+
te as TrVoiceButton,
|
|
258
270
|
U as TrWelcome,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
271
|
+
ee as TrWordCounter,
|
|
272
|
+
oe as UploadButton,
|
|
273
|
+
te as VoiceButton,
|
|
262
274
|
U as Welcome,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
ee as WordCounter,
|
|
276
|
+
Me as default,
|
|
277
|
+
$e as useAutoScroll,
|
|
278
|
+
We as useBubbleBoxRenderer,
|
|
279
|
+
we as useBubbleContentRenderer,
|
|
280
|
+
ke as useBubbleEventFn,
|
|
281
|
+
Ne as useBubbleStateChangeFn,
|
|
282
|
+
Ve as useMessageContent,
|
|
283
|
+
Ge as useOmitMessageFields,
|
|
284
|
+
Je as useSenderContentRegistration,
|
|
285
|
+
er as useSenderContext,
|
|
286
|
+
Ye as useTheme,
|
|
287
|
+
Ie as useToolCall,
|
|
288
|
+
Ke as useTouchDevice,
|
|
289
|
+
Ae as vDropzone
|
|
277
290
|
};
|
package/dist/index4.js
CHANGED
|
@@ -814,7 +814,7 @@ function lt(e = {}) {
|
|
|
814
814
|
return { width: r, height: s };
|
|
815
815
|
}
|
|
816
816
|
export {
|
|
817
|
-
|
|
817
|
+
rt as a,
|
|
818
818
|
lt as b,
|
|
819
819
|
tt as c,
|
|
820
820
|
et as d,
|
|
@@ -831,6 +831,6 @@ export {
|
|
|
831
831
|
Je as o,
|
|
832
832
|
Ke as p,
|
|
833
833
|
B as t,
|
|
834
|
-
|
|
834
|
+
x as u,
|
|
835
835
|
qe as w
|
|
836
836
|
};
|