@opentiny/tiny-robot 0.3.1-alpha.3 → 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 +80 -126
- 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 +58 -59
- package/dist/sender/index.js +887 -1039
- 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';
|
|
@@ -192,57 +194,6 @@ declare const __VLS_component_12: DefineComponent<WelcomeProps, {}, {}, {}, {},
|
|
|
192
194
|
align: "left" | "center" | "right" | string;
|
|
193
195
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
194
196
|
|
|
195
|
-
declare const __VLS_component_13: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
196
|
-
"update:visible": (value: boolean) => any;
|
|
197
|
-
} & {
|
|
198
|
-
refresh: (tab: "installed" | "market") => any;
|
|
199
|
-
"update:visible": (visible: boolean) => any;
|
|
200
|
-
"market-category-change": (category: string) => any;
|
|
201
|
-
"tab-change": (activeTab: "installed" | "market") => any;
|
|
202
|
-
"plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
|
|
203
|
-
"plugin-delete": (plugin: PluginInfo) => any;
|
|
204
|
-
"plugin-add": (plugin: PluginInfo) => any;
|
|
205
|
-
"plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
|
|
206
|
-
"tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
|
|
207
|
-
"update:activeCount": (count: number) => any;
|
|
208
|
-
}, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
|
|
209
|
-
onRefresh?: ((tab: "installed" | "market") => any) | undefined;
|
|
210
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
211
|
-
"onMarket-category-change"?: ((category: string) => any) | undefined;
|
|
212
|
-
"onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
|
|
213
|
-
"onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
|
|
214
|
-
"onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
|
|
215
|
-
"onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
|
|
216
|
-
"onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
|
|
217
|
-
"onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
|
|
218
|
-
"onUpdate:activeCount"?: ((count: number) => any) | undefined;
|
|
219
|
-
}>, {
|
|
220
|
-
title: string;
|
|
221
|
-
loading: boolean;
|
|
222
|
-
installedPlugins: PluginInfo[];
|
|
223
|
-
marketPlugins: PluginInfo[];
|
|
224
|
-
searchPlaceholder: string;
|
|
225
|
-
enableSearch: boolean;
|
|
226
|
-
installedSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
227
|
-
marketSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
228
|
-
marketCategoryOptions: MarketCategoryOption[];
|
|
229
|
-
marketCategoryPlaceholder: string;
|
|
230
|
-
enableMarketCategoryFilter: boolean;
|
|
231
|
-
defaultActiveTab: "installed" | "market";
|
|
232
|
-
showInstalledTab: boolean;
|
|
233
|
-
showMarketTab: boolean;
|
|
234
|
-
popupConfig: PopupConfig;
|
|
235
|
-
installedTabTitle: string;
|
|
236
|
-
marketTabTitle: string;
|
|
237
|
-
showCustomAddButton: boolean;
|
|
238
|
-
customAddButtonText: string;
|
|
239
|
-
allowPluginToggle: boolean;
|
|
240
|
-
allowToolToggle: boolean;
|
|
241
|
-
allowPluginDelete: boolean;
|
|
242
|
-
allowPluginAdd: boolean;
|
|
243
|
-
marketLoading: boolean;
|
|
244
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
245
|
-
|
|
246
197
|
declare const __VLS_component_2: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
247
198
|
contentRenderers: Record<string, BubbleContentRenderer>;
|
|
248
199
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -389,7 +340,7 @@ clear: () => any;
|
|
|
389
340
|
blur: (event: FocusEvent) => any;
|
|
390
341
|
cancel: () => any;
|
|
391
342
|
focus: (event: FocusEvent) => any;
|
|
392
|
-
submit: (value: string
|
|
343
|
+
submit: (value: string) => any;
|
|
393
344
|
"update:modelValue": (value: string) => any;
|
|
394
345
|
"update:templateData": (value: UserItem[]) => any;
|
|
395
346
|
"speech-start": () => any;
|
|
@@ -400,16 +351,12 @@ submit: (value: string, templateData?: UserItem[] | undefined) => any;
|
|
|
400
351
|
"escape-press": () => any;
|
|
401
352
|
"reset-template": () => any;
|
|
402
353
|
"files-selected": (files: File[]) => any;
|
|
403
|
-
"trigger-char": (char: string, position: {
|
|
404
|
-
top: number;
|
|
405
|
-
left: number;
|
|
406
|
-
}) => any;
|
|
407
354
|
}, string, PublicProps, Readonly<SenderProps> & Readonly<{
|
|
408
355
|
onClear?: (() => any) | undefined;
|
|
409
356
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
410
357
|
onCancel?: (() => any) | undefined;
|
|
411
358
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
412
|
-
onSubmit?: ((value: string
|
|
359
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
413
360
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
414
361
|
"onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
|
|
415
362
|
"onSpeech-start"?: (() => any) | undefined;
|
|
@@ -420,10 +367,6 @@ onSubmit?: ((value: string, templateData?: UserItem[] | undefined) => any) | und
|
|
|
420
367
|
"onEscape-press"?: (() => any) | undefined;
|
|
421
368
|
"onReset-template"?: (() => any) | undefined;
|
|
422
369
|
"onFiles-selected"?: ((files: File[]) => any) | undefined;
|
|
423
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
424
|
-
top: number;
|
|
425
|
-
left: number;
|
|
426
|
-
}) => any) | undefined;
|
|
427
370
|
}>, {
|
|
428
371
|
disabled: boolean;
|
|
429
372
|
modelValue: string;
|
|
@@ -456,22 +399,13 @@ maxRows: number;
|
|
|
456
399
|
}> & Readonly<{
|
|
457
400
|
onSubmit?: (() => any) | undefined;
|
|
458
401
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
459
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
460
|
-
top: number;
|
|
461
|
-
left: number;
|
|
462
|
-
}) => any) | undefined;
|
|
463
402
|
}>, {
|
|
464
403
|
clearHistory: () => void;
|
|
465
404
|
activateFirstField: () => void;
|
|
466
|
-
focusToEnd: () => void;
|
|
467
405
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
468
406
|
"update:modelValue": (value: UserItem[]) => any;
|
|
469
407
|
} & {
|
|
470
408
|
submit: () => any;
|
|
471
|
-
"trigger-char": (char: string, position: {
|
|
472
|
-
top: number;
|
|
473
|
-
left: number;
|
|
474
|
-
}) => any;
|
|
475
409
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
476
410
|
editorRef: HTMLDivElement;
|
|
477
411
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
@@ -491,14 +425,9 @@ maxRows: number;
|
|
|
491
425
|
}> & Readonly<{
|
|
492
426
|
onSubmit?: (() => any) | undefined;
|
|
493
427
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
494
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
495
|
-
top: number;
|
|
496
|
-
left: number;
|
|
497
|
-
}) => any) | undefined;
|
|
498
428
|
}>, {
|
|
499
429
|
clearHistory: () => void;
|
|
500
430
|
activateFirstField: () => void;
|
|
501
|
-
focusToEnd: () => void;
|
|
502
431
|
}, {}, {}, {}, {}> | null;
|
|
503
432
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
|
|
504
433
|
_constants: {
|
|
@@ -1163,15 +1092,6 @@ declare function __VLS_template_12(): {
|
|
|
1163
1092
|
rootEl: HTMLDivElement;
|
|
1164
1093
|
};
|
|
1165
1094
|
|
|
1166
|
-
declare function __VLS_template_13(): {
|
|
1167
|
-
attrs: Partial<{}>;
|
|
1168
|
-
slots: {
|
|
1169
|
-
'header-actions'?(_: {}): any;
|
|
1170
|
-
};
|
|
1171
|
-
refs: {};
|
|
1172
|
-
rootEl: any;
|
|
1173
|
-
};
|
|
1174
|
-
|
|
1175
1095
|
declare function __VLS_template_2(): {
|
|
1176
1096
|
attrs: Partial<{}>;
|
|
1177
1097
|
slots: {
|
|
@@ -1333,22 +1253,13 @@ declare function __VLS_template_7(): {
|
|
|
1333
1253
|
}> & Readonly<{
|
|
1334
1254
|
onSubmit?: (() => any) | undefined;
|
|
1335
1255
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
1336
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
1337
|
-
top: number;
|
|
1338
|
-
left: number;
|
|
1339
|
-
}) => any) | undefined;
|
|
1340
1256
|
}>, {
|
|
1341
1257
|
clearHistory: () => void;
|
|
1342
1258
|
activateFirstField: () => void;
|
|
1343
|
-
focusToEnd: () => void;
|
|
1344
1259
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1345
1260
|
"update:modelValue": (value: UserItem[]) => any;
|
|
1346
1261
|
} & {
|
|
1347
1262
|
submit: () => any;
|
|
1348
|
-
"trigger-char": (char: string, position: {
|
|
1349
|
-
top: number;
|
|
1350
|
-
left: number;
|
|
1351
|
-
}) => any;
|
|
1352
1263
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
1353
1264
|
editorRef: HTMLDivElement;
|
|
1354
1265
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
@@ -1368,14 +1279,9 @@ declare function __VLS_template_7(): {
|
|
|
1368
1279
|
}> & Readonly<{
|
|
1369
1280
|
onSubmit?: (() => any) | undefined;
|
|
1370
1281
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
1371
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
1372
|
-
top: number;
|
|
1373
|
-
left: number;
|
|
1374
|
-
}) => any) | undefined;
|
|
1375
1282
|
}>, {
|
|
1376
1283
|
clearHistory: () => void;
|
|
1377
1284
|
activateFirstField: () => void;
|
|
1378
|
-
focusToEnd: () => void;
|
|
1379
1285
|
}, {}, {}, {}, {}> | null;
|
|
1380
1286
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
|
|
1381
1287
|
_constants: {
|
|
@@ -1860,8 +1766,6 @@ declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
|
|
|
1860
1766
|
|
|
1861
1767
|
declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
|
|
1862
1768
|
|
|
1863
|
-
declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
|
|
1864
|
-
|
|
1865
1769
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
1866
1770
|
|
|
1867
1771
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
@@ -1902,12 +1806,6 @@ declare type __VLS_WithTemplateSlots_12<T, S> = T & {
|
|
|
1902
1806
|
};
|
|
1903
1807
|
};
|
|
1904
1808
|
|
|
1905
|
-
declare type __VLS_WithTemplateSlots_13<T, S> = T & {
|
|
1906
|
-
new (): {
|
|
1907
|
-
$slots: S;
|
|
1908
|
-
};
|
|
1909
|
-
};
|
|
1910
|
-
|
|
1911
1809
|
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
1912
1810
|
new (): {
|
|
1913
1811
|
$slots: S;
|
|
@@ -2023,9 +1921,10 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
|
|
|
2023
1921
|
|
|
2024
1922
|
export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
|
|
2025
1923
|
|
|
2026
|
-
declare interface
|
|
1924
|
+
declare interface BaseTextItem {
|
|
2027
1925
|
id: string;
|
|
2028
|
-
|
|
1926
|
+
type: string;
|
|
1927
|
+
content: string;
|
|
2029
1928
|
}
|
|
2030
1929
|
|
|
2031
1930
|
declare const Bubble: typeof _default_18 & {
|
|
@@ -2292,7 +2191,9 @@ variant: DisplayVariant;
|
|
|
2292
2191
|
|
|
2293
2192
|
declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2294
2193
|
|
|
2295
|
-
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, {
|
|
2296
2197
|
scrollContainerRef: HTMLDivElement;
|
|
2297
2198
|
}, HTMLDivElement>;
|
|
2298
2199
|
|
|
@@ -2367,7 +2268,56 @@ declare const _default_34: __VLS_WithTemplateSlots_11<typeof __VLS_component_11,
|
|
|
2367
2268
|
|
|
2368
2269
|
declare const _default_35: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
|
|
2369
2270
|
|
|
2370
|
-
declare const _default_36:
|
|
2271
|
+
declare const _default_36: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2272
|
+
"update:visible": (value: boolean) => any;
|
|
2273
|
+
} & {
|
|
2274
|
+
refresh: (tab: "installed" | "market") => any;
|
|
2275
|
+
"update:visible": (visible: boolean) => any;
|
|
2276
|
+
"market-category-change": (category: string) => any;
|
|
2277
|
+
"tab-change": (activeTab: "installed" | "market") => any;
|
|
2278
|
+
"plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
|
|
2279
|
+
"plugin-delete": (plugin: PluginInfo) => any;
|
|
2280
|
+
"plugin-add": (plugin: PluginInfo) => any;
|
|
2281
|
+
"plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
|
|
2282
|
+
"tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
|
|
2283
|
+
"update:activeCount": (count: number) => any;
|
|
2284
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
|
|
2285
|
+
onRefresh?: ((tab: "installed" | "market") => any) | undefined;
|
|
2286
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
2287
|
+
"onMarket-category-change"?: ((category: string) => any) | undefined;
|
|
2288
|
+
"onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
|
|
2289
|
+
"onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
|
|
2290
|
+
"onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
|
|
2291
|
+
"onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
|
|
2292
|
+
"onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
|
|
2293
|
+
"onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
|
|
2294
|
+
"onUpdate:activeCount"?: ((count: number) => any) | undefined;
|
|
2295
|
+
}>, {
|
|
2296
|
+
title: string;
|
|
2297
|
+
loading: boolean;
|
|
2298
|
+
installedPlugins: PluginInfo[];
|
|
2299
|
+
marketPlugins: PluginInfo[];
|
|
2300
|
+
searchPlaceholder: string;
|
|
2301
|
+
enableSearch: boolean;
|
|
2302
|
+
installedSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
2303
|
+
marketSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
2304
|
+
marketCategoryOptions: MarketCategoryOption[];
|
|
2305
|
+
marketCategoryPlaceholder: string;
|
|
2306
|
+
enableMarketCategoryFilter: boolean;
|
|
2307
|
+
defaultActiveTab: "installed" | "market";
|
|
2308
|
+
showInstalledTab: boolean;
|
|
2309
|
+
showMarketTab: boolean;
|
|
2310
|
+
popupConfig: PopupConfig;
|
|
2311
|
+
installedTabTitle: string;
|
|
2312
|
+
marketTabTitle: string;
|
|
2313
|
+
showCustomAddButton: boolean;
|
|
2314
|
+
customAddButtonText: string;
|
|
2315
|
+
allowPluginToggle: boolean;
|
|
2316
|
+
allowToolToggle: boolean;
|
|
2317
|
+
allowPluginDelete: boolean;
|
|
2318
|
+
allowPluginAdd: boolean;
|
|
2319
|
+
marketLoading: boolean;
|
|
2320
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2371
2321
|
|
|
2372
2322
|
declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2373
2323
|
cancel: () => any;
|
|
@@ -2977,7 +2927,7 @@ export declare interface RejectionReason {
|
|
|
2977
2927
|
export declare type SenderEmits = {
|
|
2978
2928
|
(e: 'update:modelValue', value: string): void;
|
|
2979
2929
|
(e: 'update:templateData', value: UserItem[]): void;
|
|
2980
|
-
(e: 'submit', value: string
|
|
2930
|
+
(e: 'submit', value: string): void;
|
|
2981
2931
|
(e: 'clear'): void;
|
|
2982
2932
|
(e: 'speech-start'): void;
|
|
2983
2933
|
(e: 'speech-end', transcript?: string): void;
|
|
@@ -2990,10 +2940,6 @@ export declare type SenderEmits = {
|
|
|
2990
2940
|
(e: 'cancel'): void;
|
|
2991
2941
|
(e: 'reset-template'): void;
|
|
2992
2942
|
(e: 'files-selected', files: File[]): void;
|
|
2993
|
-
(e: 'trigger-char', char: string, position: {
|
|
2994
|
-
top: number;
|
|
2995
|
-
left: number;
|
|
2996
|
-
}): void;
|
|
2997
2943
|
};
|
|
2998
2944
|
|
|
2999
2945
|
export declare interface SenderProps {
|
|
@@ -3215,16 +3161,14 @@ export declare interface SuggestionTextPart {
|
|
|
3215
3161
|
isMatch: boolean;
|
|
3216
3162
|
}
|
|
3217
3163
|
|
|
3218
|
-
declare interface TemplateItem extends
|
|
3164
|
+
declare interface TemplateItem extends BaseTextItem {
|
|
3219
3165
|
type: 'template';
|
|
3220
|
-
content: string;
|
|
3221
3166
|
prefix: string;
|
|
3222
3167
|
suffix: string;
|
|
3223
3168
|
}
|
|
3224
3169
|
|
|
3225
|
-
declare interface TextItem extends
|
|
3170
|
+
declare interface TextItem extends BaseTextItem {
|
|
3226
3171
|
type: 'text';
|
|
3227
|
-
content: string;
|
|
3228
3172
|
}
|
|
3229
3173
|
|
|
3230
3174
|
export declare interface ThemeProviderProps {
|
|
@@ -3269,15 +3213,25 @@ export declare interface UrlAttachment extends BaseAttachment {
|
|
|
3269
3213
|
rawFile?: File;
|
|
3270
3214
|
}
|
|
3271
3215
|
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
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>;
|
|
3279
3231
|
};
|
|
3280
3232
|
|
|
3233
|
+
export declare type UserItem = UserTextItem | UserTemplateItem;
|
|
3234
|
+
|
|
3281
3235
|
export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
|
|
3282
3236
|
id?: TemplateItem['id'];
|
|
3283
3237
|
};
|
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
|
};
|