@opentiny/tiny-robot 0.3.0-rc.3 → 0.3.0-rc.5

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/index.js CHANGED
@@ -1,23 +1,25 @@
1
1
  import z from "./attachments/index.js";
2
2
  import { Bubble as x, BubbleList as E, BubbleProvider as S } from "./bubble/index.js";
3
- import { BubbleContentClassRenderer as ce, BubbleMarkdownContentRenderer as ue } from "./bubble/index.js";
3
+ import { BubbleContentClassRenderer as ve, BubbleMarkdownContentRenderer as fe } from "./bubble/index.js";
4
4
  import P from "./container/index.js";
5
5
  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 "./history/index.js";
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 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";
12
+ import { Prompt as H, Prompts as j } from "./prompts/index.js";
13
+ import A from "./sender/index.js";
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 fe } from "./theme-provider/index.js";
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";
20
+ import I from "./mcp-add-form/index.js";
19
21
  var d = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(d || {});
20
- function I(e, r) {
22
+ function N(e, r) {
21
23
  if (!r) return !0;
22
24
  const t = r.split(",").map((o) => o.trim());
23
25
  return t.includes("*") ? !0 : t.some((o) => {
@@ -33,12 +35,12 @@ function I(e, r) {
33
35
  function _(e, r) {
34
36
  return e.size <= r;
35
37
  }
36
- function N(e, r) {
38
+ function q(e, r) {
37
39
  return e.length <= r;
38
40
  }
39
- function q(e, r) {
41
+ function G(e, r) {
40
42
  const { accept: t, multiple: o, maxSize: a, maxFiles: l } = r, n = [], s = [];
41
- if (!N(e, l))
43
+ if (!q(e, l))
42
44
  return {
43
45
  acceptedFiles: n,
44
46
  rejectedFiles: Array.from(e),
@@ -48,7 +50,7 @@ function q(e, r) {
48
50
  }
49
51
  };
50
52
  if (e.forEach((i) => {
51
- I(i, t) && _(i, a) ? n.push(i) : s.push(i);
53
+ N(i, t) && _(i, a) ? n.push(i) : s.push(i);
52
54
  }), !o && n.length > 1)
53
55
  return {
54
56
  acceptedFiles: [],
@@ -68,7 +70,7 @@ function q(e, r) {
68
70
  }
69
71
  return { acceptedFiles: n, rejectedFiles: s, rejectionReason: null };
70
72
  }
71
- function g(e) {
73
+ function D(e) {
72
74
  return {
73
75
  accept: e.accept || "*",
74
76
  multiple: e.multiple ?? !0,
@@ -79,7 +81,7 @@ function g(e) {
79
81
  disabled: e.disabled || !1
80
82
  };
81
83
  }
82
- const le = {
84
+ const pe = {
83
85
  /**
84
86
  * 挂载指令
85
87
  * @param el 元素
@@ -88,7 +90,7 @@ const le = {
88
90
  mounted(e, r) {
89
91
  let t = 0;
90
92
  const { disabled: o, onDraggingChange: a } = r.value;
91
- e.__vDropzoneOptions__ = g(r.value);
93
+ e.__vDropzoneOptions__ = D(r.value);
92
94
  const l = {
93
95
  /**
94
96
  * 拖拽进入
@@ -117,12 +119,12 @@ const le = {
117
119
  var u;
118
120
  if (o) return;
119
121
  n.preventDefault(), t = 0, a(!1, null);
120
- const s = (u = n.dataTransfer) == null ? void 0 : u.files, { onDrop: i, onError: p, accept: m, multiple: c, maxSize: D, maxFiles: h } = e.__vDropzoneOptions__;
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__;
121
123
  if (s && s.length > 0) {
122
- const T = Array.from(s), { acceptedFiles: v, rejectedFiles: F, rejectionReason: f } = q(T, {
124
+ const T = Array.from(s), { acceptedFiles: v, rejectedFiles: F, rejectionReason: f } = G(T, {
123
125
  accept: m,
124
126
  multiple: c,
125
- maxSize: D,
127
+ maxSize: g,
126
128
  maxFiles: h
127
129
  });
128
130
  f && p({ files: F, ...f }), v.length > 0 && i(v);
@@ -132,7 +134,7 @@ const le = {
132
134
  e.__vDropzoneHandlers__ = l, e.addEventListener("dragenter", l.handleDragEnter), e.addEventListener("dragover", l.handleDragOver), e.addEventListener("dragleave", l.handleDragLeave), e.addEventListener("drop", l.handleDrop);
133
135
  },
134
136
  updated(e, r) {
135
- e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ = g(r.value));
137
+ e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ = D(r.value));
136
138
  },
137
139
  /**
138
140
  * 卸载指令
@@ -141,7 +143,7 @@ const le = {
141
143
  unmounted(e) {
142
144
  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__;
143
145
  }
144
- }, G = [
146
+ }, J = [
145
147
  z,
146
148
  x,
147
149
  E,
@@ -153,18 +155,19 @@ const le = {
153
155
  B,
154
156
  y,
155
157
  O,
156
- j,
157
158
  H,
158
- w,
159
+ j,
159
160
  A,
160
161
  M,
162
+ w,
161
163
  R,
162
164
  k,
163
165
  W,
164
- $
165
- ], de = {
166
+ $,
167
+ I
168
+ ], me = {
166
169
  install(e) {
167
- G.forEach((r) => {
170
+ J.forEach((r) => {
168
171
  const t = r.name.replace(/^Tiny/, "").replace(/^Tr/, "");
169
172
  e.component(`Tr${t}`, r);
170
173
  });
@@ -173,9 +176,9 @@ const le = {
173
176
  export {
174
177
  z as Attachments,
175
178
  x as Bubble,
176
- ce as BubbleContentClassRenderer,
179
+ ve as BubbleContentClassRenderer,
177
180
  E as BubbleList,
178
- ue as BubbleMarkdownContentRenderer,
181
+ fe as BubbleMarkdownContentRenderer,
179
182
  S as BubbleProvider,
180
183
  P as Container,
181
184
  b as Conversations,
@@ -184,12 +187,13 @@ export {
184
187
  B as Feedback,
185
188
  y as History,
186
189
  O as IconButton,
190
+ I as McpAddForm,
187
191
  $ as McpServerPicker,
188
- j as Prompt,
189
- H as Prompts,
190
- w as Sender,
191
- M as SuggestionPillButton,
192
- A as SuggestionPills,
192
+ H as Prompt,
193
+ j as Prompts,
194
+ A as Sender,
195
+ w as SuggestionPillButton,
196
+ M as SuggestionPills,
193
197
  R as SuggestionPopover,
194
198
  k as ThemeProvider,
195
199
  z as TrAttachments,
@@ -203,17 +207,19 @@ export {
203
207
  B as TrFeedback,
204
208
  y as TrHistory,
205
209
  O as TrIconButton,
210
+ I as TrMcpAddForm,
206
211
  $ as TrMcpServerPicker,
207
- j as TrPrompt,
208
- H as TrPrompts,
209
- w as TrSender,
210
- M as TrSuggestionPillButton,
211
- A as TrSuggestionPills,
212
+ H as TrPrompt,
213
+ j as TrPrompts,
214
+ A as TrSender,
215
+ w as TrSuggestionPillButton,
216
+ M as TrSuggestionPills,
212
217
  R as TrSuggestionPopover,
213
218
  k as TrThemeProvider,
214
219
  W as TrWelcome,
215
220
  W as Welcome,
216
- de as default,
217
- fe as useTheme,
218
- le as vDropzone
221
+ me as default,
222
+ he as useTheme,
223
+ De as useTouchDevice,
224
+ pe as vDropzone
219
225
  };