@opentiny/tiny-robot 0.2.0-alpha.6 → 0.2.0-alpha.7

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.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { AllowedComponentProps } from 'vue';
2
2
  import { App } from 'vue';
3
3
  import { AutoSize as AutoSize_2 } from './index.type';
4
+ import { BubblePalcement as BubblePalcement_2 } from './index.type';
4
5
  import { Component } from 'vue';
5
6
  import { ComponentCustomProperties } from 'vue';
6
7
  import { ComponentCustomProps } from 'vue';
@@ -12,7 +13,6 @@ import { ComponentPublicInstance } from 'vue';
12
13
  import { CreateComponentPublicInstanceWithMixins } from 'vue';
13
14
  import { CSSProperties } from 'vue';
14
15
  import { DebuggerEvent } from 'vue';
15
- import { default as default_2 } from './Bubble.vue';
16
16
  import { DefineComponent } from 'vue';
17
17
  import { ExtractPropTypes } from 'vue';
18
18
  import { GlobalComponents } from 'vue';
@@ -26,10 +26,10 @@ import { PublicProps } from 'vue';
26
26
  import { Ref } from 'vue';
27
27
  import { RendererElement } from 'vue';
28
28
  import { RendererNode } from 'vue';
29
+ import { SetTemplateParams as SetTemplateParams_2 } from './index.type';
29
30
  import { ShallowUnwrapRef } from 'vue';
30
31
  import { Slot } from 'vue';
31
32
  import { SubmitTrigger as SubmitTrigger_2 } from './index.type';
32
- import { SuggestionPillItem as SuggestionPillItem_2 } from './index.type';
33
33
  import { TemplateEditorProps as TemplateEditorProps_2 } from './index.type';
34
34
  import { ThemeType as ThemeType_2 } from './index.type';
35
35
  import { VNode } from 'vue';
@@ -37,22 +37,43 @@ import { VNodeProps } from 'vue';
37
37
  import { WatchOptions } from 'vue';
38
38
  import { WatchStopHandle } from 'vue';
39
39
 
40
- declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
41
- "update:show": (value: boolean) => any;
42
- "update:fullscreen": (value: boolean | undefined) => any;
43
- }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
44
- "onUpdate:show"?: ((value: boolean) => any) | undefined;
45
- "onUpdate:fullscreen"?: ((value: boolean | undefined) => any) | undefined;
46
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
40
+ declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleProps> & Readonly<{}>, {
41
+ placement: BubblePalcement_2;
42
+ type: "text" | "markdown";
43
+ maxWidth: string | number;
44
+ content: string;
45
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
46
+
47
+ declare const __VLS_component_10: DefineComponent<QuestionProps, {
48
+ openModal: () => void;
49
+ closeModal: () => void;
50
+ toggleFloating: () => void;
51
+ setActiveCategory: (categoryId: string) => void;
52
+ refreshData: () => Promise<void>;
53
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
54
+ "question-click": (question: Question_2) => any;
55
+ "select-category": (category: Category_2) => any;
56
+ }, string, PublicProps, Readonly<QuestionProps> & Readonly<{
57
+ "onQuestion-click"?: ((question: Question_2) => any) | undefined;
58
+ "onSelect-category"?: ((category: Category_2) => any) | undefined;
59
+ }>, {
60
+ loading: boolean;
61
+ categories: Category_2[];
62
+ modalWidth: string;
63
+ closeOnClickOutside: boolean;
64
+ commonQuestions: Question_2[];
65
+ initialExpanded: boolean;
66
+ theme: ThemeType_2;
67
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
47
68
 
48
- declare const __VLS_component_10: DefineComponent<__VLS_PublicProps_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
69
+ declare const __VLS_component_11: DefineComponent<__VLS_PublicProps_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
49
70
  "update:selectedGroup": (value: string) => any;
50
71
  } & {
51
72
  "item-click": (item: SuggestionItem_2) => any;
52
73
  close: () => any;
53
74
  open: () => any;
54
75
  "group-click": (group: SuggestionGroup) => any;
55
- }, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{
76
+ }, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
56
77
  "onItem-click"?: ((item: SuggestionItem_2) => any) | undefined;
57
78
  onClose?: (() => any) | undefined;
58
79
  onOpen?: (() => any) | undefined;
@@ -70,7 +91,15 @@ popoverTriggerRef: HTMLDivElement;
70
91
  popoverRef: HTMLDivElement;
71
92
  }, HTMLDivElement>;
72
93
 
73
- declare const __VLS_component_2: DefineComponent<DropdownMenuProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
94
+ declare const __VLS_component_2: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
95
+ "update:show": (value: boolean) => any;
96
+ "update:fullscreen": (value: boolean | undefined) => any;
97
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
98
+ "onUpdate:show"?: ((value: boolean) => any) | undefined;
99
+ "onUpdate:fullscreen"?: ((value: boolean | undefined) => any) | undefined;
100
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
101
+
102
+ declare const __VLS_component_3: DefineComponent<DropdownMenuProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
74
103
  "item-click": (item: DropdownMenuItem) => any;
75
104
  }, string, PublicProps, Readonly<DropdownMenuProps> & Readonly<{
76
105
  "onItem-click"?: ((item: DropdownMenuItem) => any) | undefined;
@@ -82,13 +111,13 @@ dropDownTriggerRef: HTMLDivElement;
82
111
  dropdownMenuRef: HTMLDivElement;
83
112
  }, HTMLDivElement>;
84
113
 
85
- declare const __VLS_component_3: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
114
+ declare const __VLS_component_4: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
86
115
  "item-click": (ev: MouseEvent, item: PromptProps) => any;
87
116
  }, string, PublicProps, Readonly<PromptsProps> & Readonly<{
88
117
  "onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
89
118
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
90
119
 
91
- declare const __VLS_component_4: DefineComponent<SenderProps, {
120
+ declare const __VLS_component_5: DefineComponent<SenderProps, {
92
121
  focus: () => void;
93
122
  blur: () => void;
94
123
  clear: () => void;
@@ -96,6 +125,7 @@ submit: () => void;
96
125
  startSpeech: () => void;
97
126
  stopSpeech: () => void;
98
127
  activateTemplateFirstField: () => void;
128
+ setTemplate: (template: string, initialValues?: Record<string, string>) => void;
99
129
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
100
130
  [x: string]: any;
101
131
  } & {
@@ -112,36 +142,43 @@ autofocus: boolean;
112
142
  clearable: boolean;
113
143
  showWordLimit: boolean;
114
144
  theme: ThemeType_2;
145
+ placeholder: string;
115
146
  hasContent: boolean;
116
147
  allowSpeech: boolean;
117
148
  allowFiles: boolean;
118
149
  submitType: SubmitTrigger_2;
119
150
  autoSize: AutoSize_2;
120
151
  maxLength: number;
121
- placeholder: string;
122
152
  suggestions: string[];
123
153
  templateInitialValues: Record<string, string>;
124
154
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
125
155
  senderRef: HTMLDivElement;
126
156
  inputWrapperRef: HTMLDivElement;
127
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<TemplateEditorProps_2> & Readonly<{
157
+ templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
158
+ value?: string;
159
+ } & TemplateEditorProps_2> & Readonly<{
128
160
  onInput?: ((value: string) => any) | undefined;
129
161
  onBlur?: ((event: FocusEvent) => any) | undefined;
130
162
  onFocus?: ((event: FocusEvent) => any) | undefined;
131
163
  onSubmit?: ((value: string) => any) | undefined;
132
- "onUpdate:value"?: ((value: string) => any) | undefined;
133
164
  "onContent-status"?: ((hasContent: boolean) => any) | undefined;
165
+ "onEmpty-content"?: (() => any) | undefined;
166
+ "onUpdate:value"?: ((value: string) => any) | undefined;
134
167
  }>, {
135
- activateFirstField: () => void;
136
- resetFields: () => void;
137
168
  focus: () => void;
138
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
169
+ resetFields: () => void;
170
+ activateFirstField: () => void;
171
+ getValueFromDOM: () => string;
172
+ setTemplate: (params: SetTemplateParams_2) => void;
173
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
174
+ "update:value": (value: string) => any;
175
+ } & {
139
176
  input: (value: string) => any;
140
177
  blur: (event: FocusEvent) => any;
141
178
  focus: (event: FocusEvent) => any;
142
179
  submit: (value: string) => any;
143
- "update:value": (value: string) => any;
144
180
  "content-status": (hasContent: boolean) => any;
181
+ "empty-content": () => any;
145
182
  }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
146
183
  contentEditableRef: HTMLDivElement;
147
184
  }, HTMLDivElement, ComponentProvideOptions, {
@@ -151,17 +188,22 @@ D: {};
151
188
  C: {};
152
189
  M: {};
153
190
  Defaults: {};
154
- }, Readonly<TemplateEditorProps_2> & Readonly<{
191
+ }, Readonly<{
192
+ value?: string;
193
+ } & TemplateEditorProps_2> & Readonly<{
155
194
  onInput?: ((value: string) => any) | undefined;
156
195
  onBlur?: ((event: FocusEvent) => any) | undefined;
157
196
  onFocus?: ((event: FocusEvent) => any) | undefined;
158
197
  onSubmit?: ((value: string) => any) | undefined;
159
- "onUpdate:value"?: ((value: string) => any) | undefined;
160
198
  "onContent-status"?: ((hasContent: boolean) => any) | undefined;
199
+ "onEmpty-content"?: (() => any) | undefined;
200
+ "onUpdate:value"?: ((value: string) => any) | undefined;
161
201
  }>, {
162
- activateFirstField: () => void;
163
- resetFields: () => void;
164
202
  focus: () => void;
203
+ resetFields: () => void;
204
+ activateFirstField: () => void;
205
+ getValueFromDOM: () => string;
206
+ setTemplate: (params: SetTemplateParams_2) => void;
165
207
  }, {}, {}, {}, {}> | null;
166
208
  inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
167
209
  _constants: {
@@ -615,11 +657,11 @@ buttonsContainerRef: HTMLDivElement;
615
657
  suggestionsListRef: HTMLDivElement;
616
658
  }, HTMLDivElement>;
617
659
 
618
- declare const __VLS_component_5: DefineComponent<WelcomeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WelcomeProps> & Readonly<{}>, {
660
+ declare const __VLS_component_6: DefineComponent<WelcomeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WelcomeProps> & Readonly<{}>, {
619
661
  align: "left" | "center" | "right" | string;
620
662
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
621
663
 
622
- declare const __VLS_component_6: DefineComponent<SuggestionProps, {
664
+ declare const __VLS_component_7: DefineComponent<SuggestionProps, {
623
665
  trigger: TriggerHandler;
624
666
  keyDown: (e: KeyboardEvent) => void;
625
667
  input: (event: Event, text: string) => boolean;
@@ -792,39 +834,22 @@ empty?(_: {}): any;
792
834
  }) | null;
793
835
  }, HTMLDivElement>;
794
836
 
795
- declare const __VLS_component_7: DefineComponent<SuggestionPillsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
796
- "item-click": (item: SuggestionPillItem_2<Record<string, unknown>>) => any;
797
- }, string, PublicProps, Readonly<SuggestionPillsProps> & Readonly<{
798
- "onItem-click"?: ((item: SuggestionPillItem_2<Record<string, unknown>>) => any) | undefined;
837
+ declare const __VLS_component_8: DefineComponent<__VLS_PublicProps_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
838
+ "update:showAll": (value: boolean | undefined) => any;
839
+ } & {
840
+ "item-click": (item: SuggestionPillItem<Record<string, unknown>>) => any;
841
+ }, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{
842
+ "onItem-click"?: ((item: SuggestionPillItem<Record<string, unknown>>) => any) | undefined;
843
+ "onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
799
844
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
800
845
  containerRef: HTMLDivElement;
801
846
  }, HTMLDivElement>;
802
847
 
803
- declare const __VLS_component_8: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
848
+ declare const __VLS_component_9: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
804
849
 
805
- declare const __VLS_component_9: DefineComponent<QuestionProps, {
806
- openModal: () => void;
807
- closeModal: () => void;
808
- toggleFloating: () => void;
809
- setActiveCategory: (categoryId: string) => void;
810
- refreshData: () => Promise<void>;
811
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
812
- "question-click": (question: Question_2) => any;
813
- "select-category": (category: Category_2) => any;
814
- }, string, PublicProps, Readonly<QuestionProps> & Readonly<{
815
- "onQuestion-click"?: ((question: Question_2) => any) | undefined;
816
- "onSelect-category"?: ((category: Category_2) => any) | undefined;
817
- }>, {
818
- loading: boolean;
819
- categories: Category_2[];
820
- modalWidth: string;
821
- closeOnClickOutside: boolean;
822
- commonQuestions: Question_2[];
823
- initialExpanded: boolean;
824
- theme: ThemeType_2;
825
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
850
+ declare type __VLS_Props = SuggestionPillsProps;
826
851
 
827
- declare type __VLS_Props = SuggestionPopoverProps;
852
+ declare type __VLS_Props_2 = SuggestionPopoverProps;
828
853
 
829
854
  declare type __VLS_PublicProps = {
830
855
  'show': ContainerProps['show'];
@@ -832,17 +857,38 @@ declare type __VLS_PublicProps = {
832
857
  };
833
858
 
834
859
  declare type __VLS_PublicProps_2 = {
835
- 'selectedGroup'?: string;
860
+ 'showAll'?: SuggestionPillsProps['showAll'];
836
861
  } & __VLS_Props;
837
862
 
863
+ declare type __VLS_PublicProps_3 = {
864
+ 'selectedGroup'?: string;
865
+ } & __VLS_Props_2;
866
+
838
867
  declare function __VLS_template(): {
839
868
  attrs: Partial<{}>;
840
- slots: Readonly<ContainerSlots> & ContainerSlots;
869
+ slots: Readonly<BubbleSlots> & BubbleSlots;
841
870
  refs: {};
842
871
  rootEl: HTMLDivElement;
843
872
  };
844
873
 
845
874
  declare function __VLS_template_10(): {
875
+ attrs: Partial<{}>;
876
+ slots: {
877
+ 'category-label'?(_: {
878
+ category: Category_2;
879
+ }): any;
880
+ 'question-item'?(_: {
881
+ question: Question_2;
882
+ index: number;
883
+ }): any;
884
+ 'loading-indicator'?(_: {}): any;
885
+ 'empty-state'?(_: {}): any;
886
+ };
887
+ refs: {};
888
+ rootEl: HTMLDivElement;
889
+ };
890
+
891
+ declare function __VLS_template_11(): {
846
892
  attrs: Partial<{}>;
847
893
  slots: Readonly<SuggestionPopoverSlots> & SuggestionPopoverSlots;
848
894
  refs: {
@@ -853,6 +899,13 @@ declare function __VLS_template_10(): {
853
899
  };
854
900
 
855
901
  declare function __VLS_template_2(): {
902
+ attrs: Partial<{}>;
903
+ slots: Readonly<ContainerSlots> & ContainerSlots;
904
+ refs: {};
905
+ rootEl: HTMLDivElement;
906
+ };
907
+
908
+ declare function __VLS_template_3(): {
856
909
  attrs: Partial<{}>;
857
910
  slots: Readonly<DropdownMenuSlots> & DropdownMenuSlots;
858
911
  refs: {
@@ -862,14 +915,14 @@ declare function __VLS_template_2(): {
862
915
  rootEl: HTMLDivElement;
863
916
  };
864
917
 
865
- declare function __VLS_template_3(): {
918
+ declare function __VLS_template_4(): {
866
919
  attrs: Partial<{}>;
867
920
  slots: Readonly<PromptsSlots> & PromptsSlots;
868
921
  refs: {};
869
922
  rootEl: HTMLDivElement;
870
923
  };
871
924
 
872
- declare function __VLS_template_4(): {
925
+ declare function __VLS_template_5(): {
873
926
  attrs: Partial<{}>;
874
927
  slots: {
875
928
  header?(_: {}): any;
@@ -883,24 +936,31 @@ declare function __VLS_template_4(): {
883
936
  refs: {
884
937
  senderRef: HTMLDivElement;
885
938
  inputWrapperRef: HTMLDivElement;
886
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<TemplateEditorProps_2> & Readonly<{
939
+ templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
940
+ value?: string;
941
+ } & TemplateEditorProps_2> & Readonly<{
887
942
  onInput?: ((value: string) => any) | undefined;
888
943
  onBlur?: ((event: FocusEvent) => any) | undefined;
889
944
  onFocus?: ((event: FocusEvent) => any) | undefined;
890
945
  onSubmit?: ((value: string) => any) | undefined;
891
- "onUpdate:value"?: ((value: string) => any) | undefined;
892
946
  "onContent-status"?: ((hasContent: boolean) => any) | undefined;
947
+ "onEmpty-content"?: (() => any) | undefined;
948
+ "onUpdate:value"?: ((value: string) => any) | undefined;
893
949
  }>, {
894
- activateFirstField: () => void;
895
- resetFields: () => void;
896
950
  focus: () => void;
897
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
951
+ resetFields: () => void;
952
+ activateFirstField: () => void;
953
+ getValueFromDOM: () => string;
954
+ setTemplate: (params: SetTemplateParams_2) => void;
955
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
956
+ "update:value": (value: string) => any;
957
+ } & {
898
958
  input: (value: string) => any;
899
959
  blur: (event: FocusEvent) => any;
900
960
  focus: (event: FocusEvent) => any;
901
961
  submit: (value: string) => any;
902
- "update:value": (value: string) => any;
903
962
  "content-status": (hasContent: boolean) => any;
963
+ "empty-content": () => any;
904
964
  }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
905
965
  contentEditableRef: HTMLDivElement;
906
966
  }, HTMLDivElement, ComponentProvideOptions, {
@@ -910,17 +970,22 @@ declare function __VLS_template_4(): {
910
970
  C: {};
911
971
  M: {};
912
972
  Defaults: {};
913
- }, Readonly<TemplateEditorProps_2> & Readonly<{
973
+ }, Readonly<{
974
+ value?: string;
975
+ } & TemplateEditorProps_2> & Readonly<{
914
976
  onInput?: ((value: string) => any) | undefined;
915
977
  onBlur?: ((event: FocusEvent) => any) | undefined;
916
978
  onFocus?: ((event: FocusEvent) => any) | undefined;
917
979
  onSubmit?: ((value: string) => any) | undefined;
918
- "onUpdate:value"?: ((value: string) => any) | undefined;
919
980
  "onContent-status"?: ((hasContent: boolean) => any) | undefined;
981
+ "onEmpty-content"?: (() => any) | undefined;
982
+ "onUpdate:value"?: ((value: string) => any) | undefined;
920
983
  }>, {
921
- activateFirstField: () => void;
922
- resetFields: () => void;
923
984
  focus: () => void;
985
+ resetFields: () => void;
986
+ activateFirstField: () => void;
987
+ getValueFromDOM: () => string;
988
+ setTemplate: (params: SetTemplateParams_2) => void;
924
989
  }, {}, {}, {}, {}> | null;
925
990
  inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
926
991
  _constants: {
@@ -1376,14 +1441,14 @@ declare function __VLS_template_4(): {
1376
1441
  rootEl: HTMLDivElement;
1377
1442
  };
1378
1443
 
1379
- declare function __VLS_template_5(): {
1444
+ declare function __VLS_template_6(): {
1380
1445
  attrs: Partial<{}>;
1381
1446
  slots: Readonly<WelcomeSlots> & WelcomeSlots;
1382
1447
  refs: {};
1383
1448
  rootEl: HTMLDivElement;
1384
1449
  };
1385
1450
 
1386
- declare function __VLS_template_6(): {
1451
+ declare function __VLS_template_7(): {
1387
1452
  attrs: Partial<{}>;
1388
1453
  slots: {
1389
1454
  'capsule-icon'?(_: {
@@ -1546,45 +1611,28 @@ declare function __VLS_template_6(): {
1546
1611
  rootEl: HTMLDivElement;
1547
1612
  };
1548
1613
 
1549
- declare function __VLS_template_7(): {
1614
+ declare function __VLS_template_8(): {
1550
1615
  attrs: Partial<{}>;
1551
- slots: {
1552
- default?(_: {}): any;
1553
- };
1616
+ slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
1554
1617
  refs: {
1555
1618
  containerRef: HTMLDivElement;
1556
1619
  };
1557
1620
  rootEl: HTMLDivElement;
1558
1621
  };
1559
1622
 
1560
- declare function __VLS_template_8(): {
1623
+ declare function __VLS_template_9(): {
1561
1624
  attrs: Partial<{}>;
1562
1625
  slots: Readonly<SuggestionPillButtonSlots> & SuggestionPillButtonSlots;
1563
1626
  refs: {};
1564
1627
  rootEl: HTMLButtonElement;
1565
1628
  };
1566
1629
 
1567
- declare function __VLS_template_9(): {
1568
- attrs: Partial<{}>;
1569
- slots: {
1570
- 'category-label'?(_: {
1571
- category: Category_2;
1572
- }): any;
1573
- 'question-item'?(_: {
1574
- question: Question_2;
1575
- index: number;
1576
- }): any;
1577
- 'loading-indicator'?(_: {}): any;
1578
- 'empty-state'?(_: {}): any;
1579
- };
1580
- refs: {};
1581
- rootEl: HTMLDivElement;
1582
- };
1583
-
1584
1630
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
1585
1631
 
1586
1632
  declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
1587
1633
 
1634
+ declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
1635
+
1588
1636
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1589
1637
 
1590
1638
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -1613,6 +1661,12 @@ declare type __VLS_WithTemplateSlots_10<T, S> = T & {
1613
1661
  };
1614
1662
  };
1615
1663
 
1664
+ declare type __VLS_WithTemplateSlots_11<T, S> = T & {
1665
+ new (): {
1666
+ $slots: S;
1667
+ };
1668
+ };
1669
+
1616
1670
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1617
1671
  new (): {
1618
1672
  $slots: S;
@@ -1691,7 +1745,7 @@ declare interface BaseHistoryProps {
1691
1745
  selected?: string;
1692
1746
  }
1693
1747
 
1694
- declare const Bubble: typeof default_2 & {
1748
+ declare const Bubble: typeof _default_14 & {
1695
1749
  install: typeof bubbleInstall;
1696
1750
  };
1697
1751
  export { Bubble }
@@ -1699,7 +1753,7 @@ export { Bubble as TrBubble }
1699
1753
 
1700
1754
  declare const bubbleInstall: (app: App) => void;
1701
1755
 
1702
- declare const BubbleList: typeof _default_14 & {
1756
+ declare const BubbleList: typeof _default_15 & {
1703
1757
  install: typeof bubbleListInstall;
1704
1758
  };
1705
1759
  export { BubbleList }
@@ -1742,7 +1796,7 @@ export declare interface BubbleProps {
1742
1796
  * type 为 'markdown' 时,markdown 的配置项
1743
1797
  */
1744
1798
  mdConfig?: Options;
1745
- maxWidth?: CSSProperties['maxWidth'];
1799
+ maxWidth?: string | number;
1746
1800
  }
1747
1801
 
1748
1802
  export declare type BubbleRoleConfig = Pick<BubbleProps, 'placement' | 'avatar' | 'type' | 'mdConfig' | 'maxWidth'> & {
@@ -1805,41 +1859,43 @@ declare const _default: {
1805
1859
  };
1806
1860
  export default _default;
1807
1861
 
1808
- declare const _default_10: typeof _default_24 & {
1862
+ declare const _default_10: typeof _default_25 & {
1809
1863
  install: typeof install_8;
1810
1864
  };
1811
1865
  export { _default_10 as Suggestion }
1812
1866
  export { _default_10 as TrSuggestion }
1813
1867
 
1814
- declare const _default_11: typeof _default_25 & {
1868
+ declare const _default_11: typeof _default_26 & {
1815
1869
  install: typeof install_9;
1816
1870
  };
1817
1871
  export { _default_11 as SuggestionPills }
1818
1872
  export { _default_11 as TrSuggestionPills }
1819
1873
 
1820
- declare const _default_12: typeof _default_27 & {
1874
+ declare const _default_12: typeof _default_28 & {
1821
1875
  install: typeof install_10;
1822
1876
  };
1823
1877
  export { _default_12 as Question }
1824
1878
  export { _default_12 as TrQuestion }
1825
1879
 
1826
- declare const _default_13: typeof _default_28 & {
1880
+ declare const _default_13: typeof _default_29 & {
1827
1881
  install: typeof install_11;
1828
1882
  };
1829
1883
  export { _default_13 as SuggestionPopover }
1830
1884
  export { _default_13 as TrSuggestionPopover }
1831
1885
 
1832
- declare const _default_14: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1886
+ declare const _default_14: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1887
+
1888
+ declare const _default_15: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1833
1889
  scrollContainerRef: HTMLDivElement;
1834
1890
  }, HTMLDivElement>;
1835
1891
 
1836
- declare const _default_15: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1892
+ declare const _default_16: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
1837
1893
 
1838
- declare const _default_16: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1894
+ declare const _default_17: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1839
1895
 
1840
- declare const _default_17: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
1896
+ declare const _default_18: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
1841
1897
 
1842
- declare const _default_18: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1898
+ declare const _default_19: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1843
1899
  operation: (name: string) => any;
1844
1900
  action: (name: string) => any;
1845
1901
  }, string, PublicProps, Readonly<FeedbackProps> & Readonly<{
@@ -1851,20 +1907,18 @@ actionsLimit: number;
1851
1907
  sourcesLinesLimit: number;
1852
1908
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1853
1909
 
1854
- declare const _default_19: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
1855
- size: string | number;
1856
- svgSize: string | number;
1857
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
1858
-
1859
- declare const _default_2: typeof _default_15 & {
1910
+ declare const _default_2: typeof _default_16 & {
1860
1911
  install: typeof install;
1861
1912
  };
1862
1913
  export { _default_2 as Container }
1863
1914
  export { _default_2 as TrContainer }
1864
1915
 
1865
- declare const _default_20: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1916
+ declare const _default_20: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
1917
+ size: string | number;
1918
+ svgSize: string | number;
1919
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
1866
1920
 
1867
- declare const _default_21: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
1921
+ declare const _default_21: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1868
1922
 
1869
1923
  declare const _default_22: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
1870
1924
 
@@ -1880,19 +1934,21 @@ declare const _default_27: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, _
1880
1934
 
1881
1935
  declare const _default_28: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
1882
1936
 
1883
- declare const _default_3: typeof _default_16 & {
1937
+ declare const _default_29: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
1938
+
1939
+ declare const _default_3: typeof _default_17 & {
1884
1940
  install: typeof install_2;
1885
1941
  };
1886
1942
  export { _default_3 as Conversations }
1887
1943
  export { _default_3 as TrConversations }
1888
1944
 
1889
- declare const _default_4: typeof _default_17 & {
1945
+ declare const _default_4: typeof _default_18 & {
1890
1946
  install: typeof install_3;
1891
1947
  };
1892
1948
  export { _default_4 as DropdownMenu }
1893
1949
  export { _default_4 as TrDropdownMenu }
1894
1950
 
1895
- declare const _default_5: typeof _default_18 & {
1951
+ declare const _default_5: typeof _default_19 & {
1896
1952
  install: typeof install_4;
1897
1953
  };
1898
1954
  export { _default_5 as Feedback }
@@ -1905,19 +1961,19 @@ declare const _default_6: {
1905
1961
  export { _default_6 as History }
1906
1962
  export { _default_6 as TrHistory }
1907
1963
 
1908
- declare const _default_7: typeof _default_19 & {
1964
+ declare const _default_7: typeof _default_20 & {
1909
1965
  install: typeof install_5;
1910
1966
  };
1911
1967
  export { _default_7 as IconButton }
1912
1968
  export { _default_7 as TrIconButton }
1913
1969
 
1914
- declare const _default_8: typeof _default_22 & {
1970
+ declare const _default_8: typeof _default_23 & {
1915
1971
  install: typeof install_6;
1916
1972
  };
1917
1973
  export { _default_8 as Sender }
1918
1974
  export { _default_8 as TrSender }
1919
1975
 
1920
- declare const _default_9: typeof _default_23 & {
1976
+ declare const _default_9: typeof _default_24 & {
1921
1977
  install: typeof install_7;
1922
1978
  };
1923
1979
  export { _default_9 as TrWelcome }
@@ -2057,7 +2113,7 @@ export declare type MultiTabHistoryProps = {
2057
2113
  data: Record<string, HistoryData>;
2058
2114
  } & BaseHistoryProps;
2059
2115
 
2060
- declare const Prompt: typeof _default_20 & {
2116
+ declare const Prompt: typeof _default_21 & {
2061
2117
  install: typeof installPrompt;
2062
2118
  };
2063
2119
  export { Prompt }
@@ -2090,7 +2146,7 @@ export declare interface PromptProps {
2090
2146
  badge?: string | VNode;
2091
2147
  }
2092
2148
 
2093
- declare const Prompts: typeof _default_21 & {
2149
+ declare const Prompts: typeof _default_22 & {
2094
2150
  install: typeof installPrompts;
2095
2151
  };
2096
2152
  export { Prompts }
@@ -2213,6 +2269,16 @@ export declare interface SenderProps {
2213
2269
  templateInitialValues?: Record<string, string>;
2214
2270
  }
2215
2271
 
2272
+ /**
2273
+ * 设置模板的参数接口
2274
+ */
2275
+ export declare interface SetTemplateParams {
2276
+ /** 模板字符串,格式为普通文本与 [占位符] 的组合 */
2277
+ template: string;
2278
+ /** 字段初始值,键为占位符文本,值为初始内容 */
2279
+ initialValues?: Record<string, string>;
2280
+ }
2281
+
2216
2282
  export declare type SingleTabHistoryProps = {
2217
2283
  tabTitle: string;
2218
2284
  data: HistoryData;
@@ -2319,7 +2385,7 @@ export declare type SuggestionPillBaseItem<T> = {
2319
2385
  action?: SuggestionPillAction;
2320
2386
  } & T;
2321
2387
 
2322
- declare const SuggestionPillButton: typeof _default_26 & {
2388
+ declare const SuggestionPillButton: typeof _default_27 & {
2323
2389
  install: typeof installPillButton;
2324
2390
  };
2325
2391
  export { SuggestionPillButton }
@@ -2348,8 +2414,15 @@ export declare interface SuggestionPillsEmits {
2348
2414
 
2349
2415
  export declare interface SuggestionPillsProps {
2350
2416
  items?: SuggestionPillItem[];
2417
+ /**
2418
+ * model:showAll
2419
+ */
2420
+ showAll?: boolean;
2351
2421
  }
2352
2422
 
2423
+ /**
2424
+ * @deprecated
2425
+ */
2353
2426
  export declare interface SuggestionPillsSlots {
2354
2427
  default?: () => VNode | VNode[];
2355
2428
  }
@@ -2421,8 +2494,6 @@ export declare interface SuggestionProps {
2421
2494
  * 模板编辑器事件
2422
2495
  */
2423
2496
  export declare interface TemplateEditorEmits {
2424
- /** 更新值 */
2425
- (e: 'update:value', value: string): void;
2426
2497
  /** 输入事件 */
2427
2498
  (e: 'input', value: string): void;
2428
2499
  /** 内容变更状态 - 通知父组件是否有内容 */
@@ -2433,32 +2504,34 @@ export declare interface TemplateEditorEmits {
2433
2504
  (e: 'focus', event: FocusEvent): void;
2434
2505
  /** 失焦事件 */
2435
2506
  (e: 'blur', event: FocusEvent): void;
2507
+ /** 模板内容为空时触发,通知父组件可以退出模板编辑模式 */
2508
+ (e: 'empty-content'): void;
2436
2509
  }
2437
2510
 
2438
2511
  /**
2439
2512
  * 模板编辑器暴露的方法
2440
2513
  */
2441
2514
  export declare interface TemplateEditorExpose {
2442
- /** 激活第一个可编辑字段 */
2443
- activateFirstField: () => void;
2515
+ /** 聚焦到编辑器 */
2516
+ focus: () => void;
2444
2517
  /** 重置所有字段 */
2445
2518
  resetFields: () => void;
2446
- /** 聚焦编辑器并将光标置于末尾 */
2447
- focus: () => void;
2519
+ /** 激活第一个字段 */
2520
+ activateFirstField: () => void;
2521
+ /** 获取当前DOM中的值 */
2522
+ getValueFromDOM: () => string;
2523
+ /** 设置模板和初始值 */
2524
+ setTemplate: (params: SetTemplateParams) => void;
2448
2525
  }
2449
2526
 
2450
2527
  /**
2451
2528
  * 模板编辑器属性
2452
2529
  */
2453
2530
  export declare interface TemplateEditorProps {
2454
- /** 模板字符串,格式为普通文本与 [占位符] 的组合 */
2455
- template: string;
2456
2531
  /** 当前值 */
2457
2532
  value?: string;
2458
2533
  /** 是否自动聚焦 */
2459
2534
  autofocus?: boolean;
2460
- /** 字段初始值,键为占位符文本,值为初始内容 */
2461
- initialValues?: Record<string, string>;
2462
2535
  }
2463
2536
 
2464
2537
  /**