@opentiny/tiny-robot 0.3.0-alpha.11 → 0.3.0-alpha.13
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 +15 -15
- package/dist/attachments/index.js +62 -62
- package/dist/container/index.js +10 -10
- package/dist/dropdown-menu/index.js +116 -49
- package/dist/feedback/index.js +50 -50
- package/dist/flow-layout-buttons/index.js +10 -10
- package/dist/history/index.js +26 -26
- package/dist/index.d.ts +189 -35
- package/dist/index.js +47 -43
- package/dist/index2.js +7 -6
- package/dist/index3.js +426 -418
- package/dist/index4.js +98 -88
- package/dist/index5.js +22 -21
- package/dist/index6.js +795 -599
- package/dist/index7.js +3622 -1717
- package/dist/mcp-server-picker/index.js +29972 -0
- package/dist/question/index.js +12 -12
- package/dist/sender/index.js +212 -212
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +67 -67
- package/dist/suggestion-pills/index.js +11 -11
- package/dist/suggestion-popover/index.js +64 -64
- package/dist/tiny-robot-svgs.js +162 -108
- package/dist/useSlotRefs.js +13 -13
- package/dist/utils.js +8 -2
- package/package.json +10 -3
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { FileTypeMatcher as FileTypeMatcher_2 } from './index.type';
|
|
|
22
22
|
import { GlobalComponents } from 'vue';
|
|
23
23
|
import { GlobalDirectives } from 'vue';
|
|
24
24
|
import { InputMode as InputMode_2 } from './index.type';
|
|
25
|
+
import { MarketCategoryOption as MarketCategoryOption_2 } from './index.type';
|
|
25
26
|
import { nextTick } from 'vue';
|
|
26
27
|
import { OnCleanup } from '@vue/reactivity';
|
|
27
28
|
import { Options } from 'markdown-it';
|
|
@@ -194,6 +195,7 @@ activateTemplateFirstField: () => void;
|
|
|
194
195
|
}>, {
|
|
195
196
|
disabled: boolean;
|
|
196
197
|
modelValue: string;
|
|
198
|
+
placeholder: string;
|
|
197
199
|
loading: boolean;
|
|
198
200
|
mode: InputMode_2;
|
|
199
201
|
autofocus: boolean;
|
|
@@ -206,7 +208,6 @@ stopText: string;
|
|
|
206
208
|
suggestions: string[];
|
|
207
209
|
autoSize: AutoSize_2;
|
|
208
210
|
maxLength: number;
|
|
209
|
-
placeholder: string;
|
|
210
211
|
suggestionPopupWidth: string | number;
|
|
211
212
|
theme: ThemeType_2;
|
|
212
213
|
templateData: UserItem[];
|
|
@@ -882,6 +883,8 @@ declare type __VLS_Props_2 = SuggestionPillsProps;
|
|
|
882
883
|
|
|
883
884
|
declare type __VLS_Props_3 = SuggestionPopoverProps;
|
|
884
885
|
|
|
886
|
+
declare type __VLS_Props_4 = McpServerPickerProps;
|
|
887
|
+
|
|
885
888
|
declare type __VLS_PublicProps = {
|
|
886
889
|
'show': ContainerProps['show'];
|
|
887
890
|
'fullscreen'?: ContainerProps['fullscreen'];
|
|
@@ -899,6 +902,10 @@ declare type __VLS_PublicProps_4 = {
|
|
|
899
902
|
'selectedGroup'?: string;
|
|
900
903
|
} & __VLS_Props_3;
|
|
901
904
|
|
|
905
|
+
declare type __VLS_PublicProps_5 = {
|
|
906
|
+
'visible': boolean;
|
|
907
|
+
} & __VLS_Props_4;
|
|
908
|
+
|
|
902
909
|
declare function __VLS_template(): {
|
|
903
910
|
attrs: Partial<{}>;
|
|
904
911
|
slots: Readonly<BubbleSlots> & BubbleSlots;
|
|
@@ -1860,7 +1867,7 @@ declare interface BaseTextItem {
|
|
|
1860
1867
|
content: string;
|
|
1861
1868
|
}
|
|
1862
1869
|
|
|
1863
|
-
declare const Bubble: typeof
|
|
1870
|
+
declare const Bubble: typeof _default_16 & {
|
|
1864
1871
|
install: typeof bubbleInstall;
|
|
1865
1872
|
};
|
|
1866
1873
|
export { Bubble }
|
|
@@ -1868,7 +1875,7 @@ export { Bubble as TrBubble }
|
|
|
1868
1875
|
|
|
1869
1876
|
declare const bubbleInstall: (app: App) => void;
|
|
1870
1877
|
|
|
1871
|
-
declare const BubbleList: typeof
|
|
1878
|
+
declare const BubbleList: typeof _default_17 & {
|
|
1872
1879
|
install: typeof bubbleListInstall;
|
|
1873
1880
|
};
|
|
1874
1881
|
export { BubbleList }
|
|
@@ -1963,31 +1970,37 @@ declare const _default: {
|
|
|
1963
1970
|
};
|
|
1964
1971
|
export default _default;
|
|
1965
1972
|
|
|
1966
|
-
declare const _default_10: typeof
|
|
1973
|
+
declare const _default_10: typeof _default_26 & {
|
|
1967
1974
|
install: typeof install_8;
|
|
1968
1975
|
};
|
|
1969
1976
|
export { _default_10 as Sender }
|
|
1970
1977
|
export { _default_10 as TrSender }
|
|
1971
1978
|
|
|
1972
|
-
declare const _default_11: typeof
|
|
1979
|
+
declare const _default_11: typeof _default_28 & {
|
|
1973
1980
|
install: typeof install_9;
|
|
1974
1981
|
};
|
|
1975
1982
|
export { _default_11 as SuggestionPills }
|
|
1976
1983
|
export { _default_11 as TrSuggestionPills }
|
|
1977
1984
|
|
|
1978
|
-
declare const _default_12: typeof
|
|
1985
|
+
declare const _default_12: typeof _default_29 & {
|
|
1979
1986
|
install: typeof install_10;
|
|
1980
1987
|
};
|
|
1981
1988
|
export { _default_12 as SuggestionPopover }
|
|
1982
1989
|
export { _default_12 as TrSuggestionPopover }
|
|
1983
1990
|
|
|
1984
|
-
declare const _default_13: typeof
|
|
1991
|
+
declare const _default_13: typeof _default_30 & {
|
|
1985
1992
|
install: typeof install_11;
|
|
1986
1993
|
};
|
|
1987
1994
|
export { _default_13 as TrWelcome }
|
|
1988
1995
|
export { _default_13 as Welcome }
|
|
1989
1996
|
|
|
1990
|
-
declare const _default_14:
|
|
1997
|
+
declare const _default_14: typeof _default_31 & {
|
|
1998
|
+
install: typeof install_12;
|
|
1999
|
+
};
|
|
2000
|
+
export { _default_14 as McpServerPicker }
|
|
2001
|
+
export { _default_14 as TrMcpServerPicker }
|
|
2002
|
+
|
|
2003
|
+
declare const _default_15: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1991
2004
|
"update:items": (items: Attachment[]) => any;
|
|
1992
2005
|
remove: (file: Attachment) => any;
|
|
1993
2006
|
download: (event: MouseEvent, file: Attachment) => any;
|
|
@@ -2013,27 +2026,27 @@ fileMatchers: FileTypeMatcher_2[];
|
|
|
2013
2026
|
variant: DisplayVariant_2;
|
|
2014
2027
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2015
2028
|
|
|
2016
|
-
declare const
|
|
2029
|
+
declare const _default_16: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2017
2030
|
|
|
2018
|
-
declare const
|
|
2031
|
+
declare const _default_17: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
2019
2032
|
scrollContainerRef: HTMLDivElement;
|
|
2020
2033
|
}, HTMLDivElement>;
|
|
2021
2034
|
|
|
2022
|
-
declare const
|
|
2023
|
-
|
|
2024
|
-
declare const _default_18: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2035
|
+
declare const _default_18: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
2025
2036
|
|
|
2026
|
-
declare const _default_19:
|
|
2037
|
+
declare const _default_19: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2027
2038
|
|
|
2028
|
-
declare const _default_2: typeof
|
|
2039
|
+
declare const _default_2: typeof _default_15 & {
|
|
2029
2040
|
install: typeof install;
|
|
2030
2041
|
};
|
|
2031
2042
|
export { _default_2 as Attachments }
|
|
2032
2043
|
export { _default_2 as TrAttachments }
|
|
2033
2044
|
|
|
2034
|
-
declare const _default_20:
|
|
2045
|
+
declare const _default_20: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
2035
2046
|
|
|
2036
|
-
declare const _default_21:
|
|
2047
|
+
declare const _default_21: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
2048
|
+
|
|
2049
|
+
declare const _default_22: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2037
2050
|
action: (name: string) => any;
|
|
2038
2051
|
operation: (name: string) => any;
|
|
2039
2052
|
}, string, PublicProps, Readonly<FeedbackProps> & Readonly<{
|
|
@@ -2045,50 +2058,81 @@ actionsLimit: number;
|
|
|
2045
2058
|
sourcesLinesLimit: number;
|
|
2046
2059
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2047
2060
|
|
|
2048
|
-
declare const
|
|
2061
|
+
declare const _default_23: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
|
|
2049
2062
|
size: string | number;
|
|
2050
2063
|
svgSize: string | number;
|
|
2051
2064
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
2052
2065
|
|
|
2053
|
-
declare const
|
|
2054
|
-
|
|
2055
|
-
declare const _default_24: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
2066
|
+
declare const _default_24: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2056
2067
|
|
|
2057
|
-
declare const _default_25:
|
|
2068
|
+
declare const _default_25: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
2058
2069
|
|
|
2059
|
-
declare const _default_26:
|
|
2070
|
+
declare const _default_26: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
2060
2071
|
|
|
2061
|
-
declare const _default_27:
|
|
2072
|
+
declare const _default_27: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
|
|
2062
2073
|
|
|
2063
|
-
declare const _default_28:
|
|
2074
|
+
declare const _default_28: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
|
2064
2075
|
|
|
2065
|
-
declare const _default_29:
|
|
2076
|
+
declare const _default_29: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
|
|
2066
2077
|
|
|
2067
|
-
declare const _default_3: typeof
|
|
2078
|
+
declare const _default_3: typeof _default_18 & {
|
|
2068
2079
|
install: typeof install_2;
|
|
2069
2080
|
};
|
|
2070
2081
|
export { _default_3 as Container }
|
|
2071
2082
|
export { _default_3 as TrContainer }
|
|
2072
2083
|
|
|
2073
|
-
declare const
|
|
2084
|
+
declare const _default_30: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
|
|
2085
|
+
|
|
2086
|
+
declare const _default_31: DefineComponent<__VLS_PublicProps_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2087
|
+
[x: string]: any;
|
|
2088
|
+
} & {
|
|
2089
|
+
[x: string]: any;
|
|
2090
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_5> & Readonly<{
|
|
2091
|
+
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
2092
|
+
}>, {
|
|
2093
|
+
title: string;
|
|
2094
|
+
loading: boolean;
|
|
2095
|
+
searchPlaceholder: string;
|
|
2096
|
+
installedPlugins: PluginInfo[];
|
|
2097
|
+
marketPlugins: PluginInfo[];
|
|
2098
|
+
enableSearch: boolean;
|
|
2099
|
+
marketCategoryOptions: MarketCategoryOption_2[];
|
|
2100
|
+
marketCategoryPlaceholder: string;
|
|
2101
|
+
enableMarketCategoryFilter: boolean;
|
|
2102
|
+
defaultActiveTab: "installed" | "market";
|
|
2103
|
+
showInstalledTab: boolean;
|
|
2104
|
+
showMarketTab: boolean;
|
|
2105
|
+
popupConfig: PopupConfig;
|
|
2106
|
+
installedTabTitle: string;
|
|
2107
|
+
marketTabTitle: string;
|
|
2108
|
+
showCustomAddButton: boolean;
|
|
2109
|
+
customAddButtonText: string;
|
|
2110
|
+
allowPluginToggle: boolean;
|
|
2111
|
+
allowToolToggle: boolean;
|
|
2112
|
+
allowPluginDelete: boolean;
|
|
2113
|
+
allowPluginAdd: boolean;
|
|
2114
|
+
marketLoading: boolean;
|
|
2115
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2116
|
+
|
|
2117
|
+
declare const _default_4: typeof _default_19 & {
|
|
2074
2118
|
install: typeof install_3;
|
|
2075
2119
|
};
|
|
2076
2120
|
export { _default_4 as Conversations }
|
|
2077
2121
|
export { _default_4 as TrConversations }
|
|
2078
2122
|
|
|
2079
|
-
declare const _default_5: typeof
|
|
2123
|
+
declare const _default_5: typeof _default_20 & {
|
|
2080
2124
|
install: typeof install_4;
|
|
2081
2125
|
};
|
|
2082
2126
|
export { _default_5 as DragOverlay }
|
|
2083
2127
|
export { _default_5 as TrDragOverlay }
|
|
2084
2128
|
|
|
2085
|
-
declare const _default_6: typeof
|
|
2129
|
+
declare const _default_6: typeof _default_21 & {
|
|
2086
2130
|
install: typeof install_5;
|
|
2087
2131
|
};
|
|
2088
2132
|
export { _default_6 as DropdownMenu }
|
|
2089
2133
|
export { _default_6 as TrDropdownMenu }
|
|
2090
2134
|
|
|
2091
|
-
declare const _default_7: typeof
|
|
2135
|
+
declare const _default_7: typeof _default_22 & {
|
|
2092
2136
|
install: typeof install_6;
|
|
2093
2137
|
};
|
|
2094
2138
|
export { _default_7 as Feedback }
|
|
@@ -2101,7 +2145,7 @@ declare const _default_8: {
|
|
|
2101
2145
|
export { _default_8 as History }
|
|
2102
2146
|
export { _default_8 as TrHistory }
|
|
2103
2147
|
|
|
2104
|
-
declare const _default_9: typeof
|
|
2148
|
+
declare const _default_9: typeof _default_23 & {
|
|
2105
2149
|
install: typeof install_7;
|
|
2106
2150
|
};
|
|
2107
2151
|
export { _default_9 as IconButton }
|
|
@@ -2391,6 +2435,8 @@ declare const install_10: <T>(app: App<T>) => void;
|
|
|
2391
2435
|
|
|
2392
2436
|
declare const install_11: <T>(app: App<T>) => void;
|
|
2393
2437
|
|
|
2438
|
+
declare const install_12: <T>(app: App<T>) => void;
|
|
2439
|
+
|
|
2394
2440
|
declare const install_2: <T>(app: App<T>) => void;
|
|
2395
2441
|
|
|
2396
2442
|
declare const install_3: <T>(app: App<T>) => void;
|
|
@@ -2418,6 +2464,52 @@ export declare interface KeyboardHandler {
|
|
|
2418
2464
|
triggerSubmit: () => void;
|
|
2419
2465
|
}
|
|
2420
2466
|
|
|
2467
|
+
export declare interface MarketCategoryOption {
|
|
2468
|
+
value: string;
|
|
2469
|
+
label: string;
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
export declare interface McpServerPickerEmits {
|
|
2473
|
+
(e: 'search', query: string, tab: 'installed' | 'market'): void;
|
|
2474
|
+
(e: 'market-category-change', category: string): void;
|
|
2475
|
+
(e: 'tab-change', activeTab: 'installed' | 'market'): void;
|
|
2476
|
+
(e: 'plugin-toggle', plugin: PluginInfo, enabled: boolean): void;
|
|
2477
|
+
(e: 'plugin-delete', plugin: PluginInfo): void;
|
|
2478
|
+
(e: 'plugin-add', plugin: PluginInfo, added: boolean): void;
|
|
2479
|
+
(e: 'plugin-create', type: 'form' | 'code', data: PluginCreationData): void;
|
|
2480
|
+
(e: 'tool-toggle', plugin: PluginInfo, toolId: string, enabled: boolean): void;
|
|
2481
|
+
(e: 'refresh', tab: 'installed' | 'market'): void;
|
|
2482
|
+
(e: 'update:activeCount', count: number): void;
|
|
2483
|
+
(e: 'update:visible', visible: boolean): void;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
export declare interface McpServerPickerProps {
|
|
2487
|
+
installedPlugins?: PluginInfo[];
|
|
2488
|
+
marketPlugins?: PluginInfo[];
|
|
2489
|
+
searchPlaceholder?: string;
|
|
2490
|
+
enableSearch?: boolean;
|
|
2491
|
+
marketCategoryOptions?: MarketCategoryOption[];
|
|
2492
|
+
marketCategoryPlaceholder?: string;
|
|
2493
|
+
enableMarketCategoryFilter?: boolean;
|
|
2494
|
+
defaultActiveTab?: 'installed' | 'market';
|
|
2495
|
+
showInstalledTab?: boolean;
|
|
2496
|
+
showMarketTab?: boolean;
|
|
2497
|
+
visible?: boolean;
|
|
2498
|
+
popupConfig?: PopupConfig;
|
|
2499
|
+
activeCount?: number;
|
|
2500
|
+
installedTabTitle?: string;
|
|
2501
|
+
marketTabTitle?: string;
|
|
2502
|
+
title?: string;
|
|
2503
|
+
showCustomAddButton?: boolean;
|
|
2504
|
+
customAddButtonText?: string;
|
|
2505
|
+
allowPluginToggle?: boolean;
|
|
2506
|
+
allowToolToggle?: boolean;
|
|
2507
|
+
allowPluginDelete?: boolean;
|
|
2508
|
+
allowPluginAdd?: boolean;
|
|
2509
|
+
loading?: boolean;
|
|
2510
|
+
marketLoading?: boolean;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2421
2513
|
export declare type MultiTabHistoryProps = {
|
|
2422
2514
|
tabs: {
|
|
2423
2515
|
title: string;
|
|
@@ -2426,7 +2518,69 @@ export declare type MultiTabHistoryProps = {
|
|
|
2426
2518
|
data: Record<string, HistoryData>;
|
|
2427
2519
|
} & BaseHistoryProps;
|
|
2428
2520
|
|
|
2429
|
-
declare
|
|
2521
|
+
export declare interface PluginCardEmits {
|
|
2522
|
+
(e: 'toggle-plugin', enabled: boolean): void;
|
|
2523
|
+
(e: 'toggle-tool', toolId: string, enabled: boolean): void;
|
|
2524
|
+
(e: 'add-plugin', added: boolean): void;
|
|
2525
|
+
(e: 'delete-plugin'): void;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
export declare type PluginCardMode = 'installed' | 'market';
|
|
2529
|
+
|
|
2530
|
+
export declare interface PluginCardProps {
|
|
2531
|
+
plugin: PluginInfo;
|
|
2532
|
+
mode?: PluginCardMode;
|
|
2533
|
+
showToolCount?: boolean;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
export declare type PluginCreationData = PluginFormData | string;
|
|
2537
|
+
|
|
2538
|
+
export declare interface PluginFormData {
|
|
2539
|
+
name: string;
|
|
2540
|
+
description: string;
|
|
2541
|
+
type: 'sse' | 'streamableHttp';
|
|
2542
|
+
url: string;
|
|
2543
|
+
headers: string;
|
|
2544
|
+
thumbnail?: File | null;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
export declare interface PluginInfo {
|
|
2548
|
+
id: string;
|
|
2549
|
+
name: string;
|
|
2550
|
+
icon: string;
|
|
2551
|
+
description: string;
|
|
2552
|
+
enabled: boolean;
|
|
2553
|
+
tools: PluginTool[];
|
|
2554
|
+
added?: boolean;
|
|
2555
|
+
category?: string;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
export declare interface PluginModalEmits {
|
|
2559
|
+
(e: 'update:visible', value: boolean): void;
|
|
2560
|
+
(e: 'confirm', type: 'form' | 'code', data: PluginCreationData): void;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
export declare interface PluginTool {
|
|
2564
|
+
id: string;
|
|
2565
|
+
name: string;
|
|
2566
|
+
description: string;
|
|
2567
|
+
enabled: boolean;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
export declare interface PopupConfig {
|
|
2571
|
+
type: 'fixed' | 'drawer';
|
|
2572
|
+
position?: {
|
|
2573
|
+
top?: string | number;
|
|
2574
|
+
left?: string | number;
|
|
2575
|
+
right?: string | number;
|
|
2576
|
+
bottom?: string | number;
|
|
2577
|
+
};
|
|
2578
|
+
drawer?: {
|
|
2579
|
+
direction: 'left' | 'right';
|
|
2580
|
+
};
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
declare const Prompt: typeof _default_24 & {
|
|
2430
2584
|
install: typeof installPrompt;
|
|
2431
2585
|
};
|
|
2432
2586
|
export { Prompt }
|
|
@@ -2459,7 +2613,7 @@ export declare interface PromptProps {
|
|
|
2459
2613
|
badge?: string | VNode;
|
|
2460
2614
|
}
|
|
2461
2615
|
|
|
2462
|
-
declare const Prompts: typeof
|
|
2616
|
+
declare const Prompts: typeof _default_25 & {
|
|
2463
2617
|
install: typeof installPrompts;
|
|
2464
2618
|
};
|
|
2465
2619
|
export { Prompts }
|
|
@@ -2602,7 +2756,7 @@ export declare interface SuggestionGroup<T = Record<string, unknown>> {
|
|
|
2602
2756
|
|
|
2603
2757
|
export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
|
|
2604
2758
|
|
|
2605
|
-
declare const SuggestionPillButton: typeof
|
|
2759
|
+
declare const SuggestionPillButton: typeof _default_27 & {
|
|
2606
2760
|
install: typeof installPillButton;
|
|
2607
2761
|
};
|
|
2608
2762
|
export { SuggestionPillButton }
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import T from "./attachments/index.js";
|
|
2
|
-
import { Bubble as E, BubbleList as
|
|
3
|
-
import
|
|
2
|
+
import { Bubble as E, BubbleList as S } from "./bubble/index.js";
|
|
3
|
+
import x from "./container/index.js";
|
|
4
4
|
import L from "./conversations/index.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import P from "./drag-overlay/index.js";
|
|
6
|
+
import y from "./dropdown-menu/index.js";
|
|
7
7
|
import C from "./feedback/index.js";
|
|
8
|
-
import
|
|
8
|
+
import O from "./history/index.js";
|
|
9
9
|
import j from "./icon-button/index.js";
|
|
10
10
|
import { Prompt as B, Prompts as H } from "./prompts/index.js";
|
|
11
11
|
import b from "./sender/index.js";
|
|
12
12
|
import w, { SuggestionPillButton as A } from "./suggestion-pills/index.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import M from "./suggestion-popover/index.js";
|
|
14
|
+
import k from "./welcome/index.js";
|
|
15
|
+
import R from "./mcp-server-picker/index.js";
|
|
15
16
|
var d = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(d || {});
|
|
16
|
-
function
|
|
17
|
+
function W(e, r) {
|
|
17
18
|
if (!r) return !0;
|
|
18
19
|
const o = r.split(",").map((t) => t.trim());
|
|
19
20
|
return o.includes("*") ? !0 : o.some((t) => {
|
|
@@ -29,12 +30,12 @@ function $(e, r) {
|
|
|
29
30
|
function _(e, r) {
|
|
30
31
|
return e.size <= r;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function $(e, r) {
|
|
33
34
|
return e.length <= r;
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function I(e, r) {
|
|
36
37
|
const { accept: o, multiple: t, maxSize: a, maxFiles: l } = r, n = [], s = [];
|
|
37
|
-
if (
|
|
38
|
+
if (!$(e, l))
|
|
38
39
|
return {
|
|
39
40
|
acceptedFiles: n,
|
|
40
41
|
rejectedFiles: Array.from(e),
|
|
@@ -44,7 +45,7 @@ function k(e, r) {
|
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
47
|
if (e.forEach((i) => {
|
|
47
|
-
|
|
48
|
+
W(i, o) && _(i, a) ? n.push(i) : s.push(i);
|
|
48
49
|
}), !t && n.length > 1)
|
|
49
50
|
return {
|
|
50
51
|
acceptedFiles: [],
|
|
@@ -55,7 +56,7 @@ function k(e, r) {
|
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
58
|
if (s.length > 0) {
|
|
58
|
-
const i = s.some((
|
|
59
|
+
const i = s.some((m) => !_(m, a)), p = i ? d.FileSizeExceeded : d.FileTypeNotAllowed, c = i ? `文件大小不能超过 ${a / 1024 / 1024}MB` : `文件类型不匹配 (accept: ${o})`;
|
|
59
60
|
return {
|
|
60
61
|
acceptedFiles: n,
|
|
61
62
|
rejectedFiles: s,
|
|
@@ -75,7 +76,7 @@ function g(e) {
|
|
|
75
76
|
disabled: e.disabled || !1
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
+
const ae = {
|
|
79
80
|
/**
|
|
80
81
|
* 挂载指令
|
|
81
82
|
* @param el 元素
|
|
@@ -110,18 +111,18 @@ const oe = {
|
|
|
110
111
|
* @param e 事件
|
|
111
112
|
*/
|
|
112
113
|
handleDrop: (n) => {
|
|
113
|
-
var
|
|
114
|
+
var u;
|
|
114
115
|
if (t) return;
|
|
115
116
|
n.preventDefault(), o = 0, a(!1, null);
|
|
116
|
-
const s = (
|
|
117
|
+
const s = (u = n.dataTransfer) == null ? void 0 : u.files, { onDrop: i, onError: p, accept: c, multiple: m, maxSize: D, maxFiles: h } = e.__vDropzoneOptions__;
|
|
117
118
|
if (s && s.length > 0) {
|
|
118
|
-
const F = Array.from(s), { acceptedFiles:
|
|
119
|
+
const F = Array.from(s), { acceptedFiles: v, rejectedFiles: z, rejectionReason: f } = I(F, {
|
|
119
120
|
accept: c,
|
|
120
|
-
multiple:
|
|
121
|
+
multiple: m,
|
|
121
122
|
maxSize: D,
|
|
122
123
|
maxFiles: h
|
|
123
124
|
});
|
|
124
|
-
|
|
125
|
+
f && p({ files: z, ...f }), v.length > 0 && i(v);
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
};
|
|
@@ -137,27 +138,28 @@ const oe = {
|
|
|
137
138
|
unmounted(e) {
|
|
138
139
|
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
140
|
}
|
|
140
|
-
},
|
|
141
|
+
}, N = [
|
|
141
142
|
T,
|
|
142
143
|
E,
|
|
143
|
-
x,
|
|
144
144
|
S,
|
|
145
|
+
x,
|
|
145
146
|
L,
|
|
147
|
+
P,
|
|
146
148
|
y,
|
|
147
|
-
O,
|
|
148
149
|
C,
|
|
149
|
-
|
|
150
|
+
O,
|
|
150
151
|
j,
|
|
151
152
|
B,
|
|
152
153
|
H,
|
|
153
154
|
b,
|
|
154
155
|
w,
|
|
155
156
|
A,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
M,
|
|
158
|
+
k,
|
|
159
|
+
R
|
|
160
|
+
], se = {
|
|
159
161
|
install(e) {
|
|
160
|
-
|
|
162
|
+
N.forEach((r) => {
|
|
161
163
|
const o = r.name.replace(/^Tiny/, "").replace(/^Tr/, "");
|
|
162
164
|
e.component(`Tr${o}`, r);
|
|
163
165
|
});
|
|
@@ -166,38 +168,40 @@ const oe = {
|
|
|
166
168
|
export {
|
|
167
169
|
T as Attachments,
|
|
168
170
|
E as Bubble,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
S as BubbleList,
|
|
172
|
+
x as Container,
|
|
171
173
|
L as Conversations,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
P as DragOverlay,
|
|
175
|
+
y as DropdownMenu,
|
|
174
176
|
C as Feedback,
|
|
175
|
-
|
|
177
|
+
O as History,
|
|
176
178
|
j as IconButton,
|
|
179
|
+
R as McpServerPicker,
|
|
177
180
|
B as Prompt,
|
|
178
181
|
H as Prompts,
|
|
179
182
|
b as Sender,
|
|
180
183
|
A as SuggestionPillButton,
|
|
181
184
|
w as SuggestionPills,
|
|
182
|
-
|
|
185
|
+
M as SuggestionPopover,
|
|
183
186
|
T as TrAttachments,
|
|
184
187
|
E as TrBubble,
|
|
185
|
-
|
|
186
|
-
|
|
188
|
+
S as TrBubbleList,
|
|
189
|
+
x as TrContainer,
|
|
187
190
|
L as TrConversations,
|
|
188
|
-
|
|
189
|
-
|
|
191
|
+
P as TrDragOverlay,
|
|
192
|
+
y as TrDropdownMenu,
|
|
190
193
|
C as TrFeedback,
|
|
191
|
-
|
|
194
|
+
O as TrHistory,
|
|
192
195
|
j as TrIconButton,
|
|
196
|
+
R as TrMcpServerPicker,
|
|
193
197
|
B as TrPrompt,
|
|
194
198
|
H as TrPrompts,
|
|
195
199
|
b as TrSender,
|
|
196
200
|
A as TrSuggestionPillButton,
|
|
197
201
|
w as TrSuggestionPills,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
M as TrSuggestionPopover,
|
|
203
|
+
k as TrWelcome,
|
|
204
|
+
k as Welcome,
|
|
205
|
+
se as default,
|
|
206
|
+
ae as vDropzone
|
|
203
207
|
};
|
package/dist/index2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as w,
|
|
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") :
|
|
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:
|
|
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
|
|
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 =
|
|
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
|
};
|