@opentiny/tiny-robot 0.3.0-alpha.12 → 0.3.0-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/action-group/index.js +17 -17
- package/dist/attachments/index.js +83 -83
- package/dist/bubble/index.js +1905 -1171
- package/dist/container/index.js +26 -26
- package/dist/dropdown-menu/index.js +116 -49
- package/dist/feedback/index.js +41 -41
- package/dist/flow-layout-buttons/index.js +10 -10
- package/dist/history/index.js +45 -45
- package/dist/index.d.ts +583 -346
- package/dist/index.js +65 -55
- package/dist/index2.js +7 -6
- package/dist/index3.js +426 -418
- package/dist/index4.js +67 -67
- package/dist/index5.js +22 -21
- package/dist/index6.js +795 -599
- package/dist/index7.js +3622 -1717
- package/dist/loading.js +4 -0
- package/dist/mcp-server-picker/index.js +29972 -0
- package/dist/question/index.js +61 -61
- package/dist/sender/index.js +127 -127
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +54 -54
- package/dist/suggestion-pills/index.js +11 -11
- package/dist/suggestion-popover/index.js +185 -184
- package/dist/tiny-robot-svgs.js +421 -247
- package/dist/useSlotRefs.js +13 -13
- package/dist/utils.js +8 -2
- package/package.json +11 -3
package/dist/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Bubble as E, BubbleList as x } from "./bubble/index.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import C from "./
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import w
|
|
1
|
+
import z from "./attachments/index.js";
|
|
2
|
+
import { Bubble as E, BubbleList as x, BubbleProvider as S } from "./bubble/index.js";
|
|
3
|
+
import { BubbleContentClassRenderer as pe, BubbleMarkdownContentRenderer as ce } from "./bubble/index.js";
|
|
4
|
+
import P from "./container/index.js";
|
|
5
|
+
import b from "./conversations/index.js";
|
|
6
|
+
import L from "./drag-overlay/index.js";
|
|
7
|
+
import C from "./dropdown-menu/index.js";
|
|
8
|
+
import B from "./feedback/index.js";
|
|
9
|
+
import y from "./history/index.js";
|
|
10
|
+
import O from "./icon-button/index.js";
|
|
11
|
+
import { Prompt as j, Prompts as H } from "./prompts/index.js";
|
|
12
|
+
import w from "./sender/index.js";
|
|
13
|
+
import A, { SuggestionPillButton as M } from "./suggestion-pills/index.js";
|
|
13
14
|
import R from "./suggestion-popover/index.js";
|
|
14
|
-
import
|
|
15
|
+
import k from "./welcome/index.js";
|
|
16
|
+
import W from "./mcp-server-picker/index.js";
|
|
15
17
|
var d = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(d || {});
|
|
16
18
|
function $(e, r) {
|
|
17
19
|
if (!r) return !0;
|
|
@@ -29,12 +31,12 @@ function $(e, r) {
|
|
|
29
31
|
function _(e, r) {
|
|
30
32
|
return e.size <= r;
|
|
31
33
|
}
|
|
32
|
-
function
|
|
34
|
+
function I(e, r) {
|
|
33
35
|
return e.length <= r;
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function N(e, r) {
|
|
36
38
|
const { accept: o, multiple: t, maxSize: a, maxFiles: l } = r, n = [], s = [];
|
|
37
|
-
if (!
|
|
39
|
+
if (!I(e, l))
|
|
38
40
|
return {
|
|
39
41
|
acceptedFiles: n,
|
|
40
42
|
rejectedFiles: Array.from(e),
|
|
@@ -75,7 +77,7 @@ function g(e) {
|
|
|
75
77
|
disabled: e.disabled || !1
|
|
76
78
|
};
|
|
77
79
|
}
|
|
78
|
-
const
|
|
80
|
+
const se = {
|
|
79
81
|
/**
|
|
80
82
|
* 挂载指令
|
|
81
83
|
* @param el 元素
|
|
@@ -115,13 +117,13 @@ const oe = {
|
|
|
115
117
|
n.preventDefault(), o = 0, a(!1, null);
|
|
116
118
|
const s = (m = n.dataTransfer) == null ? void 0 : m.files, { onDrop: i, onError: p, accept: c, multiple: u, maxSize: D, maxFiles: h } = e.__vDropzoneOptions__;
|
|
117
119
|
if (s && s.length > 0) {
|
|
118
|
-
const F = Array.from(s), { acceptedFiles:
|
|
120
|
+
const F = Array.from(s), { acceptedFiles: v, rejectedFiles: T, rejectionReason: f } = N(F, {
|
|
119
121
|
accept: c,
|
|
120
122
|
multiple: u,
|
|
121
123
|
maxSize: D,
|
|
122
124
|
maxFiles: h
|
|
123
125
|
});
|
|
124
|
-
|
|
126
|
+
f && p({ files: T, ...f }), v.length > 0 && i(v);
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
};
|
|
@@ -137,67 +139,75 @@ const oe = {
|
|
|
137
139
|
unmounted(e) {
|
|
138
140
|
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__;
|
|
139
141
|
}
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
+
}, q = [
|
|
143
|
+
z,
|
|
142
144
|
E,
|
|
143
145
|
x,
|
|
144
146
|
S,
|
|
147
|
+
P,
|
|
148
|
+
b,
|
|
145
149
|
L,
|
|
150
|
+
C,
|
|
151
|
+
B,
|
|
146
152
|
y,
|
|
147
153
|
O,
|
|
148
|
-
C,
|
|
149
|
-
P,
|
|
150
154
|
j,
|
|
151
|
-
B,
|
|
152
155
|
H,
|
|
153
|
-
b,
|
|
154
156
|
w,
|
|
155
157
|
A,
|
|
158
|
+
M,
|
|
156
159
|
R,
|
|
160
|
+
k,
|
|
157
161
|
W
|
|
158
|
-
],
|
|
162
|
+
], ie = {
|
|
159
163
|
install(e) {
|
|
160
|
-
|
|
164
|
+
q.forEach((r) => {
|
|
161
165
|
const o = r.name.replace(/^Tiny/, "").replace(/^Tr/, "");
|
|
162
166
|
e.component(`Tr${o}`, r);
|
|
163
167
|
});
|
|
164
168
|
}
|
|
165
169
|
};
|
|
166
170
|
export {
|
|
167
|
-
|
|
171
|
+
z as Attachments,
|
|
168
172
|
E as Bubble,
|
|
173
|
+
pe as BubbleContentClassRenderer,
|
|
169
174
|
x as BubbleList,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
ce as BubbleMarkdownContentRenderer,
|
|
176
|
+
S as BubbleProvider,
|
|
177
|
+
P as Container,
|
|
178
|
+
b as Conversations,
|
|
179
|
+
L as DragOverlay,
|
|
180
|
+
C as DropdownMenu,
|
|
181
|
+
B as Feedback,
|
|
182
|
+
y as History,
|
|
183
|
+
O as IconButton,
|
|
184
|
+
W as McpServerPicker,
|
|
185
|
+
j as Prompt,
|
|
178
186
|
H as Prompts,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
187
|
+
w as Sender,
|
|
188
|
+
M as SuggestionPillButton,
|
|
189
|
+
A as SuggestionPills,
|
|
182
190
|
R as SuggestionPopover,
|
|
183
|
-
|
|
191
|
+
z as TrAttachments,
|
|
184
192
|
E as TrBubble,
|
|
185
193
|
x as TrBubbleList,
|
|
186
|
-
S as
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
C as
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
S as TrBubbleProvider,
|
|
195
|
+
P as TrContainer,
|
|
196
|
+
b as TrConversations,
|
|
197
|
+
L as TrDragOverlay,
|
|
198
|
+
C as TrDropdownMenu,
|
|
199
|
+
B as TrFeedback,
|
|
200
|
+
y as TrHistory,
|
|
201
|
+
O as TrIconButton,
|
|
202
|
+
W as TrMcpServerPicker,
|
|
203
|
+
j as TrPrompt,
|
|
194
204
|
H as TrPrompts,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
205
|
+
w as TrSender,
|
|
206
|
+
M as TrSuggestionPillButton,
|
|
207
|
+
A as TrSuggestionPills,
|
|
198
208
|
R as TrSuggestionPopover,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
k as TrWelcome,
|
|
210
|
+
k as Welcome,
|
|
211
|
+
ie as default,
|
|
212
|
+
se as vDropzone
|
|
203
213
|
};
|
package/dist/index2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as w,
|
|
1
|
+
import { n as w, x as I, aB as H, S as z, ac as R, Z as _, G as W, b as U, c as G, P as L, d as F, O as Z, j as $, aC as Q, aD as Y, f as q, g as j, aE as K, aF as X, h as J, $ as ee } from "./index7.js";
|
|
2
2
|
import * as N from "vue";
|
|
3
3
|
import { withDirectives as te, createVNode as M, vShow as ne } from "vue";
|
|
4
4
|
const k = (e) => e.stopPropagation(), V = ({ state: e, props: t, vm: n, slots: r }) => {
|
|
@@ -118,7 +118,7 @@ const k = (e) => e.stopPropagation(), V = ({ state: e, props: t, vm: n, slots: r
|
|
|
118
118
|
}, ye = ({ api: e, props: t }) => W(t.closeDelay, () => {
|
|
119
119
|
e.handleClosePopper();
|
|
120
120
|
}), be = (e) => (t) => {
|
|
121
|
-
t ? U(e.referenceElm, "focusing") :
|
|
121
|
+
t ? U(e.referenceElm, "focusing") : G(e.referenceElm, "focusing");
|
|
122
122
|
}, he = ({ slots: e, api: t }) => () => {
|
|
123
123
|
if (!e.default || !e.default().length) {
|
|
124
124
|
t.handleFocus();
|
|
@@ -160,7 +160,7 @@ const k = (e) => e.stopPropagation(), V = ({ state: e, props: t, vm: n, slots: r
|
|
|
160
160
|
timeout: null,
|
|
161
161
|
focusing: !1,
|
|
162
162
|
expectedState: void 0,
|
|
163
|
-
tooltipId:
|
|
163
|
+
tooltipId: L("tiny-tooltip-", 4),
|
|
164
164
|
tabindex: p.tabindex,
|
|
165
165
|
xPlacement: "bottom",
|
|
166
166
|
showContent: c("showContent", null),
|
|
@@ -374,7 +374,7 @@ var A = /* @__PURE__ */ F({
|
|
|
374
374
|
}
|
|
375
375
|
}),
|
|
376
376
|
setup: function(t, n) {
|
|
377
|
-
return
|
|
377
|
+
return q({
|
|
378
378
|
props: t,
|
|
379
379
|
context: n,
|
|
380
380
|
renderless: Se,
|
|
@@ -458,7 +458,7 @@ var A = /* @__PURE__ */ F({
|
|
|
458
458
|
}, c = p();
|
|
459
459
|
if (!c) return null;
|
|
460
460
|
var o = c.data || c.props || (c.props = {});
|
|
461
|
-
return o.class =
|
|
461
|
+
return o.class = Q("tiny-tooltip " + Y(o.class)), c;
|
|
462
462
|
}
|
|
463
463
|
});
|
|
464
464
|
function D() {
|
|
@@ -633,5 +633,6 @@ C.install = function(e) {
|
|
|
633
633
|
};
|
|
634
634
|
C.version = Ce;
|
|
635
635
|
export {
|
|
636
|
-
C as T
|
|
636
|
+
C as T,
|
|
637
|
+
oe as k
|
|
637
638
|
};
|