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