@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/index.js CHANGED
@@ -1,17 +1,19 @@
1
- import T from "./attachments/index.js";
2
- import { Bubble as E, BubbleList as x } from "./bubble/index.js";
3
- import S from "./container/index.js";
4
- import L from "./conversations/index.js";
5
- import y from "./drag-overlay/index.js";
6
- import O from "./dropdown-menu/index.js";
7
- import C from "./feedback/index.js";
8
- import P from "./history/index.js";
9
- import j from "./icon-button/index.js";
10
- import { Prompt as B, Prompts as H } from "./prompts/index.js";
11
- import b from "./sender/index.js";
12
- import w, { SuggestionPillButton as A } from "./suggestion-pills/index.js";
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 W from "./welcome/index.js";
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 M(e, r) {
34
+ function I(e, r) {
33
35
  return e.length <= r;
34
36
  }
35
- function k(e, r) {
37
+ function N(e, r) {
36
38
  const { accept: o, multiple: t, maxSize: a, maxFiles: l } = r, n = [], s = [];
37
- if (!M(e, l))
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 oe = {
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: f, rejectedFiles: z, rejectionReason: v } = k(F, {
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
- v && p({ files: z, ...v }), f.length > 0 && i(f);
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
- }, I = [
141
- T,
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
- ], ne = {
162
+ ], ie = {
159
163
  install(e) {
160
- I.forEach((r) => {
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
- T as Attachments,
171
+ z as Attachments,
168
172
  E as Bubble,
173
+ pe as BubbleContentClassRenderer,
169
174
  x as BubbleList,
170
- S as Container,
171
- L as Conversations,
172
- y as DragOverlay,
173
- O as DropdownMenu,
174
- C as Feedback,
175
- P as History,
176
- j as IconButton,
177
- B as Prompt,
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
- b as Sender,
180
- A as SuggestionPillButton,
181
- w as SuggestionPills,
187
+ w as Sender,
188
+ M as SuggestionPillButton,
189
+ A as SuggestionPills,
182
190
  R as SuggestionPopover,
183
- T as TrAttachments,
191
+ z as TrAttachments,
184
192
  E as TrBubble,
185
193
  x as TrBubbleList,
186
- S as TrContainer,
187
- L as TrConversations,
188
- y as TrDragOverlay,
189
- O as TrDropdownMenu,
190
- C as TrFeedback,
191
- P as TrHistory,
192
- j as TrIconButton,
193
- B as TrPrompt,
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
- b as TrSender,
196
- A as TrSuggestionPillButton,
197
- w as TrSuggestionPills,
205
+ w as TrSender,
206
+ M as TrSuggestionPillButton,
207
+ A as TrSuggestionPills,
198
208
  R as TrSuggestionPopover,
199
- W as TrWelcome,
200
- W as Welcome,
201
- ne as default,
202
- oe as vDropzone
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, $ as I, y as H, S as z, Q as R, Z as _, h as W, e as U, t as L, P as Q, d as F, i as Z, j as $, k as q, l as G, a as Y, c as j, o as K, q as X, f as J, b as ee } from "./index7.js";
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") : L(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: Q("tiny-tooltip-", 4),
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 Y({
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 = q("tiny-tooltip " + G(o.class)), c;
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
  };