@opentiny/tiny-robot 0.3.0-rc.5 → 0.3.0
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/attachments/index.js +216 -216
- package/dist/bubble/index.js +1070 -1040
- package/dist/drag-overlay/index.js +15 -15
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/index.d.ts +66 -3
- package/dist/index2.js +144 -138
- package/dist/index4.js +16 -16
- package/dist/mcp-server-picker/index.js +149 -149
- package/dist/prompts/index.js +5 -5
- package/dist/sender/index.js +1054 -930
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +38 -38
- package/dist/suggestion-popover/index.js +13 -13
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, computed as y, createBlock as u, openBlock as t, Transition as F, withCtx as m, createElementBlock as
|
|
1
|
+
import { defineComponent as v, computed as y, createBlock as u, openBlock as t, Transition as F, withCtx as m, createElementBlock as r, 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
2
|
import { a as M } from "../index3.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({
|
|
@@ -10,33 +10,33 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
10
10
|
dragTarget: {},
|
|
11
11
|
fullscreen: { type: Boolean }
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const a =
|
|
13
|
+
setup(e) {
|
|
14
|
+
const a = e, { top: c, left: s, width: d, height: C } = M(() => a.dragTarget), f = y(() => !a.isDragging || !a.dragTarget ? { display: "none" } : {
|
|
15
15
|
position: "fixed",
|
|
16
16
|
top: `${c.value}px`,
|
|
17
|
-
left: `${
|
|
18
|
-
width: `${
|
|
17
|
+
left: `${s.value}px`,
|
|
18
|
+
width: `${d.value}px`,
|
|
19
19
|
height: `${C.value}px`
|
|
20
20
|
});
|
|
21
|
-
return (
|
|
21
|
+
return (g, o) => (t(), u(F, { name: "tr-fade" }, {
|
|
22
22
|
default: m(() => [
|
|
23
|
-
e.isDragging ? (t(),
|
|
23
|
+
e.isDragging ? (t(), r("div", {
|
|
24
24
|
key: 0,
|
|
25
|
-
class:
|
|
26
|
-
style:
|
|
25
|
+
class: _(["tr-drag-overlay", { fullscreen: e.fullscreen }]),
|
|
26
|
+
style: x(f.value)
|
|
27
27
|
}, [
|
|
28
|
-
|
|
28
|
+
w(g.$slots, "overlay", { isDragging: e.isDragging }, () => [
|
|
29
29
|
l("div", T, [
|
|
30
|
-
|
|
30
|
+
o[0] || (o[0] = l("div", { class: "tr-drag-overlay__icon" }, [
|
|
31
31
|
l("img", {
|
|
32
32
|
src: k,
|
|
33
33
|
alt: "上传文件"
|
|
34
34
|
})
|
|
35
35
|
], -1)),
|
|
36
36
|
l("div", $, [
|
|
37
|
-
l("div", S,
|
|
37
|
+
l("div", S, n(e.overlayTitle), 1),
|
|
38
38
|
l("div", E, [
|
|
39
|
-
(t(!0),
|
|
39
|
+
(t(!0), r(D, null, B(e.overlayDescription, (p, L) => (t(), r("span", { key: L }, n(p), 1))), 128))
|
|
40
40
|
])
|
|
41
41
|
])
|
|
42
42
|
])
|
|
@@ -48,8 +48,8 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
48
48
|
}
|
|
49
49
|
}), i = /* @__PURE__ */ Z(z, [["__scopeId", "data-v-93553cc8"]]);
|
|
50
50
|
i.name = "TrDragOverlay";
|
|
51
|
-
const N = function(
|
|
52
|
-
|
|
51
|
+
const N = function(e) {
|
|
52
|
+
e.component(i.name, i);
|
|
53
53
|
};
|
|
54
54
|
i.install = N;
|
|
55
55
|
export {
|
|
@@ -115,7 +115,7 @@ const P = ["onClick"], Q = {
|
|
|
115
115
|
])
|
|
116
116
|
], 512));
|
|
117
117
|
}
|
|
118
|
-
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-
|
|
118
|
+
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-df81e3e1"]]);
|
|
119
119
|
p.name = "TrFlowLayout";
|
|
120
120
|
const te = function(d) {
|
|
121
121
|
d.component(p.name, p);
|
package/dist/index.d.ts
CHANGED
|
@@ -376,8 +376,8 @@ allowSpeech: boolean;
|
|
|
376
376
|
allowFiles: boolean;
|
|
377
377
|
submitType: SubmitTrigger;
|
|
378
378
|
stopText: string;
|
|
379
|
-
suggestions: ISuggestionItem[];
|
|
380
379
|
autoSize: AutoSize;
|
|
380
|
+
suggestions: ISuggestionItem[];
|
|
381
381
|
clearable: boolean;
|
|
382
382
|
maxLength: number;
|
|
383
383
|
showWordLimit: boolean;
|
|
@@ -389,6 +389,11 @@ senderRef: HTMLDivElement;
|
|
|
389
389
|
inputWrapperRef: HTMLDivElement;
|
|
390
390
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
391
391
|
modelValue?: UserItem[];
|
|
392
|
+
} & {
|
|
393
|
+
autoSize: boolean | {
|
|
394
|
+
minRows: number;
|
|
395
|
+
maxRows: number;
|
|
396
|
+
};
|
|
392
397
|
}> & Readonly<{
|
|
393
398
|
onSubmit?: (() => any) | undefined;
|
|
394
399
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -410,6 +415,11 @@ M: {};
|
|
|
410
415
|
Defaults: {};
|
|
411
416
|
}, Readonly<{
|
|
412
417
|
modelValue?: UserItem[];
|
|
418
|
+
} & {
|
|
419
|
+
autoSize: boolean | {
|
|
420
|
+
minRows: number;
|
|
421
|
+
maxRows: number;
|
|
422
|
+
};
|
|
413
423
|
}> & Readonly<{
|
|
414
424
|
onSubmit?: (() => any) | undefined;
|
|
415
425
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1221,6 +1231,7 @@ declare function __VLS_template_7(): {
|
|
|
1221
1231
|
slots: {
|
|
1222
1232
|
header?(_: {}): any;
|
|
1223
1233
|
prefix?(_: {}): any;
|
|
1234
|
+
content?(_: {}): any;
|
|
1224
1235
|
decorativeContent?(_: {}): any;
|
|
1225
1236
|
actions?(_: {}): any;
|
|
1226
1237
|
'footer-left'?(_: {}): any;
|
|
@@ -1232,6 +1243,11 @@ declare function __VLS_template_7(): {
|
|
|
1232
1243
|
inputWrapperRef: HTMLDivElement;
|
|
1233
1244
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
1234
1245
|
modelValue?: UserItem[];
|
|
1246
|
+
} & {
|
|
1247
|
+
autoSize: boolean | {
|
|
1248
|
+
minRows: number;
|
|
1249
|
+
maxRows: number;
|
|
1250
|
+
};
|
|
1235
1251
|
}> & Readonly<{
|
|
1236
1252
|
onSubmit?: (() => any) | undefined;
|
|
1237
1253
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1253,6 +1269,11 @@ declare function __VLS_template_7(): {
|
|
|
1253
1269
|
Defaults: {};
|
|
1254
1270
|
}, Readonly<{
|
|
1255
1271
|
modelValue?: UserItem[];
|
|
1272
|
+
} & {
|
|
1273
|
+
autoSize: boolean | {
|
|
1274
|
+
minRows: number;
|
|
1275
|
+
maxRows: number;
|
|
1276
|
+
};
|
|
1256
1277
|
}> & Readonly<{
|
|
1257
1278
|
onSubmit?: (() => any) | undefined;
|
|
1258
1279
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1957,7 +1978,10 @@ export declare interface BubbleContentItem {
|
|
|
1957
1978
|
[key: string]: any;
|
|
1958
1979
|
}
|
|
1959
1980
|
|
|
1960
|
-
export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | BubbleContentClassRenderer | Component
|
|
1981
|
+
export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | BubbleContentClassRenderer | Component | {
|
|
1982
|
+
component: Component;
|
|
1983
|
+
defaultProps: Record<string, unknown>;
|
|
1984
|
+
};
|
|
1961
1985
|
|
|
1962
1986
|
declare const bubbleInstall: (app: App) => void;
|
|
1963
1987
|
|
|
@@ -2037,18 +2061,26 @@ export declare type BubbleRoleConfig = BubbleCommonProps & {
|
|
|
2037
2061
|
export declare interface BubbleSlots {
|
|
2038
2062
|
default?: (slotProps: {
|
|
2039
2063
|
bubbleProps: BubbleProps;
|
|
2064
|
+
index?: number;
|
|
2040
2065
|
}) => unknown;
|
|
2041
2066
|
footer?: (slotProps: {
|
|
2042
2067
|
bubbleProps: BubbleProps;
|
|
2068
|
+
index?: number;
|
|
2043
2069
|
}) => unknown;
|
|
2044
2070
|
loading?: (slotProps: {
|
|
2045
2071
|
bubbleProps: BubbleProps;
|
|
2072
|
+
index?: number;
|
|
2073
|
+
}) => unknown;
|
|
2074
|
+
trailer?: (slotProps: {
|
|
2075
|
+
bubbleProps: BubbleProps;
|
|
2076
|
+
index?: number;
|
|
2046
2077
|
}) => unknown;
|
|
2047
2078
|
}
|
|
2048
2079
|
|
|
2049
2080
|
export declare interface ButtonGroupConfig {
|
|
2050
2081
|
file?: ControlState & fileUploadConfig;
|
|
2051
2082
|
submit?: ControlState;
|
|
2083
|
+
voice?: VoiceButtonConfig;
|
|
2052
2084
|
}
|
|
2053
2085
|
|
|
2054
2086
|
export declare type ColorMode = 'light' | 'dark' | 'auto';
|
|
@@ -2079,6 +2111,7 @@ export declare interface ContainerSlots {
|
|
|
2079
2111
|
export declare interface ControlState {
|
|
2080
2112
|
tooltips?: string | TooltipRender;
|
|
2081
2113
|
disabled?: boolean;
|
|
2114
|
+
tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
2082
2115
|
}
|
|
2083
2116
|
|
|
2084
2117
|
declare const _default: {
|
|
@@ -2196,7 +2229,7 @@ declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awai
|
|
|
2196
2229
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onItem-click" | "onItem-title-change" | "onItem-action"> & HistoryProps<T> & Partial<{}>> & PublicProps;
|
|
2197
2230
|
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
2198
2231
|
attrs: any;
|
|
2199
|
-
slots:
|
|
2232
|
+
slots: Readonly<HistorySlots<T>> & HistorySlots<T>;
|
|
2200
2233
|
emit: ((evt: "item-click", item: T) => void) & ((evt: "item-title-change", newTitle: string, item: T) => void) & ((evt: "item-action", action: HistoryMenuItem, item: T) => void);
|
|
2201
2234
|
}>) => VNode & {
|
|
2202
2235
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -2577,6 +2610,7 @@ export declare interface HistoryGroup<T extends HistoryItem> {
|
|
|
2577
2610
|
export declare interface HistoryItem {
|
|
2578
2611
|
id?: string;
|
|
2579
2612
|
title: string;
|
|
2613
|
+
icon?: Component | VNode;
|
|
2580
2614
|
[x: string]: any;
|
|
2581
2615
|
}
|
|
2582
2616
|
|
|
@@ -2595,6 +2629,15 @@ export declare type HistoryProps<T extends HistoryItem = HistoryItem> = {
|
|
|
2595
2629
|
menuListGap?: number;
|
|
2596
2630
|
};
|
|
2597
2631
|
|
|
2632
|
+
export declare interface HistorySlots<T extends HistoryItem = HistoryItem> {
|
|
2633
|
+
'item-prefix'?: (slotProps: {
|
|
2634
|
+
item: T;
|
|
2635
|
+
}) => VNode | VNode[];
|
|
2636
|
+
'item-title'?: (slotProps: {
|
|
2637
|
+
item: T;
|
|
2638
|
+
}) => VNode | VNode[];
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2598
2641
|
export declare interface IconButtonProps {
|
|
2599
2642
|
icon: VNode | Component;
|
|
2600
2643
|
size?: string | number;
|
|
@@ -2920,14 +2963,30 @@ export declare interface SenderProps {
|
|
|
2920
2963
|
stopText?: string;
|
|
2921
2964
|
}
|
|
2922
2965
|
|
|
2966
|
+
export declare interface SpeechCallbacks {
|
|
2967
|
+
onStart: () => void;
|
|
2968
|
+
onInterim: (transcript: string) => void;
|
|
2969
|
+
onFinal: (transcript: string) => void;
|
|
2970
|
+
onEnd: (transcript?: string) => void;
|
|
2971
|
+
onError: (error: Error) => void;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2923
2974
|
export declare interface SpeechConfig {
|
|
2975
|
+
customHandler?: SpeechHandler;
|
|
2924
2976
|
lang?: string;
|
|
2925
2977
|
continuous?: boolean;
|
|
2926
2978
|
interimResults?: boolean;
|
|
2927
2979
|
autoReplace?: boolean;
|
|
2980
|
+
onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
2928
2981
|
}
|
|
2929
2982
|
|
|
2930
2983
|
export declare interface SpeechHandler {
|
|
2984
|
+
start: (callbacks: SpeechCallbacks) => Promise<void> | void;
|
|
2985
|
+
stop: () => Promise<void> | void;
|
|
2986
|
+
isSupported: () => boolean;
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
export declare interface SpeechHandlerResult {
|
|
2931
2990
|
speechState: SpeechState;
|
|
2932
2991
|
start: () => void;
|
|
2933
2992
|
stop: () => void;
|
|
@@ -3181,6 +3240,10 @@ export declare function useTouchDevice(): {
|
|
|
3181
3240
|
*/
|
|
3182
3241
|
export declare const vDropzone: Directive<DragAwareElement, DropzoneBinding>;
|
|
3183
3242
|
|
|
3243
|
+
declare interface VoiceButtonConfig {
|
|
3244
|
+
icon?: VNode | Component;
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3184
3247
|
export declare interface WelcomeProps {
|
|
3185
3248
|
title: string;
|
|
3186
3249
|
description: string;
|