@opentiny/tiny-robot 0.3.1-alpha.4 → 0.3.1
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 +1 -1
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +6 -4014
- package/dist/drag-overlay/index.js +5 -5
- package/dist/dropdown-menu/index.js +5 -5
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +24 -23
- package/dist/index2.js +4054 -277
- package/dist/index3.js +282 -691
- package/dist/index4.js +697 -148
- package/dist/index5.js +161 -0
- package/dist/mcp-add-form/index.js +1 -1
- package/dist/mcp-server-picker/index.js +1 -1
- package/dist/sender/index.js +540 -548
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +2 -2
- package/dist/useSlotRefs.js +3 -3
- package/dist/utils.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as v, computed as y, createBlock as u, openBlock as t, Transition as F, withCtx as m, createElementBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as v, computed as y, createBlock as u, openBlock as t, Transition as F, withCtx as m, createElementBlock as a, createCommentVNode as h, normalizeStyle as x, normalizeClass as _, renderSlot as w, createElementVNode as l, toDisplayString as n, Fragment as D, renderList as B } from "vue";
|
|
2
|
+
import { c as M } from "../index4.js";
|
|
3
3
|
import { _ as Z } from "../_plugin-vue_export-helper.js";
|
|
4
4
|
const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs/%3e%3crect%20width='80.000000'%20height='80.000000'%20fill='%23FFFFFF'%20fill-opacity='0'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M6%2047.27L24.56%2029.06C25.73%2027.91%2027.6%2027.91%2028.77%2029.06L44.52%2044.51C45.69%2045.66%2047.56%2045.66%2048.72%2044.51L56.64%2036.75C57.8%2035.6%2059.67%2035.6%2060.84%2036.75L74%2049.67L74%2062C74%2064.76%2071.76%2067%2069%2067L11%2067C8.23%2067%206%2064.76%206%2062L6%2047.27Z'%20fill='%23F0F0F0'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d=''%20fill='%23808080'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cellipse%20cx='40.000000'%20cy='40.000000'%20rx='8.000001'%20ry='8.000002'%20fill='%231476FF'%20fill-opacity='1.000000'/%3e%3cpath%20d='M40%2035.5C40.27%2035.5%2040.5%2035.72%2040.5%2036L40.5%2039.49L44%2039.5C44.27%2039.5%2044.5%2039.72%2044.5%2040C44.5%2040.27%2044.27%2040.5%2044%2040.5L40.5%2040.5L40.5%2044C40.5%2044.27%2040.27%2044.5%2040%2044.5C39.72%2044.5%2039.5%2044.27%2039.5%2044L39.5%2040.5L36%2040.5C35.72%2040.5%2035.5%2040.27%2035.5%2040C35.5%2039.72%2035.72%2039.5%2036%2039.5L39.5%2039.5L39.5%2036C39.5%2035.72%2039.72%2035.5%2040%2035.5Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3ccircle%20cx='58.000000'%20cy='27.000000'%20r='5.000000'%20fill='%23DBDBDB'%20fill-opacity='1.000000'/%3e%3c/svg%3e", T = { class: "tr-drag-overlay__content" }, $ = { class: "tr-drag-overlay__text" }, S = { class: "tr-drag-overlay__title" }, E = { class: "tr-drag-overlay__description" }, z = /* @__PURE__ */ v({
|
|
5
5
|
__name: "index",
|
|
@@ -11,7 +11,7 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
11
11
|
fullscreen: { type: Boolean }
|
|
12
12
|
},
|
|
13
13
|
setup(e) {
|
|
14
|
-
const
|
|
14
|
+
const r = e, { top: c, left: s, width: d, height: C } = M(() => r.dragTarget), f = y(() => !r.isDragging || !r.dragTarget ? { display: "none" } : {
|
|
15
15
|
position: "fixed",
|
|
16
16
|
top: `${c.value}px`,
|
|
17
17
|
left: `${s.value}px`,
|
|
@@ -20,7 +20,7 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
20
20
|
});
|
|
21
21
|
return (g, o) => (t(), u(F, { name: "tr-fade" }, {
|
|
22
22
|
default: m(() => [
|
|
23
|
-
e.isDragging ? (t(),
|
|
23
|
+
e.isDragging ? (t(), a("div", {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: _(["tr-drag-overlay", { fullscreen: e.fullscreen }]),
|
|
26
26
|
style: x(f.value)
|
|
@@ -36,7 +36,7 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
36
36
|
l("div", $, [
|
|
37
37
|
l("div", S, n(e.overlayTitle), 1),
|
|
38
38
|
l("div", E, [
|
|
39
|
-
(t(!0),
|
|
39
|
+
(t(!0), a(D, null, B(e.overlayDescription, (p, L) => (t(), a("span", { key: L }, n(p), 1))), 128))
|
|
40
40
|
])
|
|
41
41
|
])
|
|
42
42
|
])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref as k, onUnmounted as T, watch as C, defineComponent as E, mergeModels as y, useModel as H, computed as p, createBlock as I, openBlock as w, unref as X, withCtx as _, createElementVNode as j, createElementBlock as
|
|
2
|
-
import { w as S,
|
|
3
|
-
import { B as A } from "../
|
|
1
|
+
import { ref as k, onUnmounted as T, watch as C, defineComponent as E, mergeModels as y, useModel as H, computed as p, createBlock as I, openBlock as w, unref as X, withCtx as _, createElementVNode as j, createElementBlock as M, Fragment as D, renderList as L, toDisplayString as Y, renderSlot as O } from "vue";
|
|
2
|
+
import { w as S, a as b, o as $ } from "../index4.js";
|
|
3
|
+
import { B as A } from "../index5.js";
|
|
4
4
|
import { u as F } from "../utils.js";
|
|
5
5
|
import { _ as G } from "../_plugin-vue_export-helper.js";
|
|
6
6
|
const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.bottom, N = (o, t, g = !1) => {
|
|
@@ -55,7 +55,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
55
55
|
), S(
|
|
56
56
|
[V, q],
|
|
57
57
|
([n, i]) => {
|
|
58
|
-
const e =
|
|
58
|
+
const e = b(o), m = b(t), u = e == null ? void 0 : e.getBoundingClientRect(), h = m == null ? void 0 : m.getBoundingClientRect();
|
|
59
59
|
if (u && P({ x: n, y: i }, u)) {
|
|
60
60
|
r.value = "trigger";
|
|
61
61
|
return;
|
|
@@ -138,7 +138,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
138
138
|
]),
|
|
139
139
|
content: _(() => [
|
|
140
140
|
j("ul", J, [
|
|
141
|
-
(w(!0),
|
|
141
|
+
(w(!0), M(D, null, L(l.items, (u) => (w(), M("li", {
|
|
142
142
|
class: "tr-dropdown-menu__list-item",
|
|
143
143
|
key: u.id,
|
|
144
144
|
onClick: (h) => i(u)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as q, mergeModels as E, useModel as G, watch as g, ref as i, computed as $, createElementBlock as a, openBlock as l, createElementVNode as I, Fragment as C, renderList as D, createCommentVNode as _, normalizeClass as x, createBlock as B, resolveDynamicComponent as b, toDisplayString as S, nextTick as H } from "vue";
|
|
2
2
|
import { IconArrowDown as X } from "@opentiny/tiny-robot-svgs";
|
|
3
|
-
import {
|
|
3
|
+
import { e as j, o as J } from "../index4.js";
|
|
4
4
|
import { _ as K } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const P = ["onClick"], Q = {
|
|
6
6
|
key: 0,
|
package/dist/history/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ import { Directive } from 'vue';
|
|
|
18
18
|
import { ExtractPropTypes } from 'vue';
|
|
19
19
|
import { GlobalComponents } from 'vue';
|
|
20
20
|
import { GlobalDirectives } from 'vue';
|
|
21
|
+
import { MaybeComputedElementRef } from '@vueuse/core';
|
|
22
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
21
23
|
import { nextTick } from 'vue';
|
|
22
24
|
import { OnCleanup } from '@vue/reactivity';
|
|
23
25
|
import { Options } from 'markdown-it';
|
|
@@ -2189,7 +2191,9 @@ variant: DisplayVariant;
|
|
|
2189
2191
|
|
|
2190
2192
|
declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2191
2193
|
|
|
2192
|
-
declare const _default_19: DefineComponent<BubbleListProps, {
|
|
2194
|
+
declare const _default_19: DefineComponent<BubbleListProps, {
|
|
2195
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
2196
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
2193
2197
|
scrollContainerRef: HTMLDivElement;
|
|
2194
2198
|
}, HTMLDivElement>;
|
|
2195
2199
|
|
|
@@ -3209,6 +3213,23 @@ export declare interface UrlAttachment extends BaseAttachment {
|
|
|
3209
3213
|
rawFile?: File;
|
|
3210
3214
|
}
|
|
3211
3215
|
|
|
3216
|
+
/**
|
|
3217
|
+
* 当目标滚动容器 `target` 接近底部时,且源数据 `source` 变化,自动滚动到底部
|
|
3218
|
+
* @param target 目标滚动容器的元素引用
|
|
3219
|
+
* @param source 监听的源数据,当该数据变化时会触发自动滚动
|
|
3220
|
+
* @param options 配置选项
|
|
3221
|
+
* @param options.scrollOnMount 是否在组件挂载时滚动到底部,默认为 true
|
|
3222
|
+
* @param options.bottomThreshold 判断接近底部的阈值(像素),默认为 20
|
|
3223
|
+
* @returns scrollToBottom 手动滚动到底部的方法
|
|
3224
|
+
*/
|
|
3225
|
+
export declare function useAutoScroll(target: MaybeComputedElementRef, source: MaybeRefOrGetter<any>, options?: {
|
|
3226
|
+
scrollOnMount?: boolean;
|
|
3227
|
+
scrollThrottle?: number;
|
|
3228
|
+
bottomThreshold?: number;
|
|
3229
|
+
}): {
|
|
3230
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
3231
|
+
};
|
|
3232
|
+
|
|
3212
3233
|
export declare type UserItem = UserTextItem | UserTemplateItem;
|
|
3213
3234
|
|
|
3214
3235
|
export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import z from "./attachments/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { B as x, a as E, b as S } from "./index2.js";
|
|
3
|
+
import { d as ve, c as fe, u as _e } from "./index2.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
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { H as y } from "./
|
|
10
|
-
import { u as
|
|
7
|
+
import B from "./dropdown-menu/index.js";
|
|
8
|
+
import C from "./feedback/index.js";
|
|
9
|
+
import { H as y } from "./index3.js";
|
|
10
|
+
import { u as ge } from "./index3.js";
|
|
11
11
|
import O from "./icon-button/index.js";
|
|
12
|
-
import { Prompt as
|
|
13
|
-
import
|
|
12
|
+
import { Prompt as A, Prompts as H } from "./prompts/index.js";
|
|
13
|
+
import j from "./sender/index.js";
|
|
14
14
|
import M, { SuggestionPillButton as w } from "./suggestion-pills/index.js";
|
|
15
15
|
import R from "./suggestion-popover/index.js";
|
|
16
16
|
import k from "./theme-provider/index.js";
|
|
17
|
-
import { useTheme as
|
|
17
|
+
import { useTheme as Te } from "./theme-provider/index.js";
|
|
18
18
|
import W from "./welcome/index.js";
|
|
19
19
|
import $ from "./mcp-server-picker/index.js";
|
|
20
20
|
import I from "./mcp-add-form/index.js";
|
|
@@ -151,13 +151,13 @@ const pe = {
|
|
|
151
151
|
P,
|
|
152
152
|
b,
|
|
153
153
|
L,
|
|
154
|
-
C,
|
|
155
154
|
B,
|
|
155
|
+
C,
|
|
156
156
|
y,
|
|
157
157
|
O,
|
|
158
|
+
A,
|
|
158
159
|
H,
|
|
159
160
|
j,
|
|
160
|
-
A,
|
|
161
161
|
M,
|
|
162
162
|
w,
|
|
163
163
|
R,
|
|
@@ -183,15 +183,15 @@ export {
|
|
|
183
183
|
P as Container,
|
|
184
184
|
b as Conversations,
|
|
185
185
|
L as DragOverlay,
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
B as DropdownMenu,
|
|
187
|
+
C as Feedback,
|
|
188
188
|
y as History,
|
|
189
189
|
O as IconButton,
|
|
190
190
|
I as McpAddForm,
|
|
191
191
|
$ as McpServerPicker,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
A as Prompt,
|
|
193
|
+
H as Prompts,
|
|
194
|
+
j as Sender,
|
|
195
195
|
w as SuggestionPillButton,
|
|
196
196
|
M as SuggestionPills,
|
|
197
197
|
R as SuggestionPopover,
|
|
@@ -203,15 +203,15 @@ export {
|
|
|
203
203
|
P as TrContainer,
|
|
204
204
|
b as TrConversations,
|
|
205
205
|
L as TrDragOverlay,
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
B as TrDropdownMenu,
|
|
207
|
+
C as TrFeedback,
|
|
208
208
|
y as TrHistory,
|
|
209
209
|
O as TrIconButton,
|
|
210
210
|
I as TrMcpAddForm,
|
|
211
211
|
$ as TrMcpServerPicker,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
A as TrPrompt,
|
|
213
|
+
H as TrPrompts,
|
|
214
|
+
j as TrSender,
|
|
215
215
|
w as TrSuggestionPillButton,
|
|
216
216
|
M as TrSuggestionPills,
|
|
217
217
|
R as TrSuggestionPopover,
|
|
@@ -219,7 +219,8 @@ export {
|
|
|
219
219
|
W as TrWelcome,
|
|
220
220
|
W as Welcome,
|
|
221
221
|
me as default,
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
_e as useAutoScroll,
|
|
223
|
+
Te as useTheme,
|
|
224
|
+
ge as useTouchDevice,
|
|
224
225
|
pe as vDropzone
|
|
225
226
|
};
|