@opentiny/tiny-robot 0.2.10 → 0.2.12
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 +38 -35
- package/dist/base-popper/index.js +107 -0
- package/dist/dropdown-menu/index.js +71 -65
- package/dist/flow-layout-buttons/index.js +24 -21
- package/dist/index.d.ts +318 -161
- package/dist/index2.js +386 -319
- package/dist/sender/index.js +926 -1125
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +179 -129
- package/dist/suggestion-popover/index.js +117 -112
- package/dist/utils.js +4 -15
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { ComponentOptionsBase } from 'vue';
|
|
|
10
10
|
import { ComponentOptionsMixin } from 'vue';
|
|
11
11
|
import { ComponentProvideOptions } from 'vue';
|
|
12
12
|
import { ComponentPublicInstance } from 'vue';
|
|
13
|
+
import { ComputedRef } from 'vue';
|
|
13
14
|
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
14
15
|
import { CSSProperties } from 'vue';
|
|
15
16
|
import { DebuggerEvent } from 'vue';
|
|
@@ -18,6 +19,7 @@ import { ExtractPropTypes } from 'vue';
|
|
|
18
19
|
import { GlobalComponents } from 'vue';
|
|
19
20
|
import { GlobalDirectives } from 'vue';
|
|
20
21
|
import { InputMode as InputMode_2 } from './index.type';
|
|
22
|
+
import { MaybeElement } from '@vueuse/core';
|
|
21
23
|
import { nextTick } from 'vue';
|
|
22
24
|
import { OnCleanup } from '@vue/reactivity';
|
|
23
25
|
import { Options } from 'markdown-it';
|
|
@@ -26,13 +28,12 @@ import { PublicProps } from 'vue';
|
|
|
26
28
|
import { Ref } from 'vue';
|
|
27
29
|
import { RendererElement } from 'vue';
|
|
28
30
|
import { RendererNode } from 'vue';
|
|
29
|
-
import { SetTemplateParams as SetTemplateParams_2 } from './index.type';
|
|
30
31
|
import { ShallowUnwrapRef } from 'vue';
|
|
31
32
|
import { Slot } from 'vue';
|
|
32
33
|
import { SubmitTrigger as SubmitTrigger_2 } from './index.type';
|
|
33
|
-
import { TemplateEditorProps as TemplateEditorProps_2 } from './index.type';
|
|
34
34
|
import { ThemeType as ThemeType_2 } from './index.type';
|
|
35
35
|
import { TooltipContentProps } from './components/Tooltip.vue';
|
|
36
|
+
import { TransitionProps } from 'vue';
|
|
36
37
|
import { VNode } from 'vue';
|
|
37
38
|
import { VNodeProps } from 'vue';
|
|
38
39
|
import { WatchOptions } from 'vue';
|
|
@@ -85,10 +86,10 @@ onOpen?: (() => any) | undefined;
|
|
|
85
86
|
}>, {
|
|
86
87
|
title: string;
|
|
87
88
|
trigger: "click" | "manual";
|
|
88
|
-
topOffset: string | number;
|
|
89
89
|
groupShowMoreTrigger: "click" | "hover";
|
|
90
90
|
popoverWidth: string | number;
|
|
91
91
|
popoverHeight: string | number;
|
|
92
|
+
topOffset: string | number;
|
|
92
93
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
93
94
|
popoverTriggerRef: HTMLDivElement;
|
|
94
95
|
popoverRef: HTMLDivElement;
|
|
@@ -128,12 +129,102 @@ declare const __VLS_component_3: DefineComponent<DropdownMenuProps, {}, {}, {},
|
|
|
128
129
|
"onItem-click"?: ((item: DropdownMenuItem) => any) | undefined;
|
|
129
130
|
"onClick-outside"?: ((event: MouseEvent) => any) | undefined;
|
|
130
131
|
}>, {
|
|
131
|
-
trigger: "click" | "manual";
|
|
132
|
-
minWidth: string | number;
|
|
133
|
-
topOffset: string | number;
|
|
132
|
+
trigger: "click" | "hover" | "manual";
|
|
134
133
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
basePopperRef: ({
|
|
135
|
+
$: ComponentInternalInstance;
|
|
136
|
+
$data: {};
|
|
137
|
+
$props: {
|
|
138
|
+
readonly offset?: number | {
|
|
139
|
+
mainAxis?: number;
|
|
140
|
+
crossAxis?: number;
|
|
141
|
+
} | undefined;
|
|
142
|
+
readonly placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
143
|
+
readonly preventOverflow?: boolean | undefined;
|
|
144
|
+
readonly renderAllTriggers?: boolean | undefined;
|
|
145
|
+
readonly show?: boolean | undefined;
|
|
146
|
+
readonly transitionProps?: TransitionProps | undefined;
|
|
147
|
+
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
148
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
149
|
+
$attrs: {
|
|
150
|
+
[x: string]: unknown;
|
|
151
|
+
};
|
|
152
|
+
$refs: {
|
|
153
|
+
[x: string]: unknown;
|
|
154
|
+
} & {
|
|
155
|
+
popperRef: HTMLDivElement;
|
|
156
|
+
};
|
|
157
|
+
$slots: Readonly<{
|
|
158
|
+
[name: string]: Slot<any> | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
$root: ComponentPublicInstance | null;
|
|
161
|
+
$parent: ComponentPublicInstance | null;
|
|
162
|
+
$host: Element | null;
|
|
163
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
164
|
+
$el: any;
|
|
165
|
+
$options: ComponentOptionsBase<Readonly<{
|
|
166
|
+
offset?: number | {
|
|
167
|
+
mainAxis?: number;
|
|
168
|
+
crossAxis?: number;
|
|
169
|
+
};
|
|
170
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
171
|
+
preventOverflow?: boolean;
|
|
172
|
+
renderAllTriggers?: boolean;
|
|
173
|
+
show?: boolean;
|
|
174
|
+
transitionProps?: TransitionProps;
|
|
175
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
176
|
+
}> & Readonly<{}>, {
|
|
177
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
178
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
179
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
180
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
181
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
182
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
183
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
184
|
+
created?: (() => void) | (() => void)[];
|
|
185
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
186
|
+
mounted?: (() => void) | (() => void)[];
|
|
187
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
188
|
+
updated?: (() => void) | (() => void)[];
|
|
189
|
+
activated?: (() => void) | (() => void)[];
|
|
190
|
+
deactivated?: (() => void) | (() => void)[];
|
|
191
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
192
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
193
|
+
destroyed?: (() => void) | (() => void)[];
|
|
194
|
+
unmounted?: (() => void) | (() => void)[];
|
|
195
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
196
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
197
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
198
|
+
};
|
|
199
|
+
$forceUpdate: () => void;
|
|
200
|
+
$nextTick: nextTick;
|
|
201
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
202
|
+
} & Readonly<{
|
|
203
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
204
|
+
}> & Omit<Readonly<{
|
|
205
|
+
offset?: number | {
|
|
206
|
+
mainAxis?: number;
|
|
207
|
+
crossAxis?: number;
|
|
208
|
+
};
|
|
209
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
210
|
+
preventOverflow?: boolean;
|
|
211
|
+
renderAllTriggers?: boolean;
|
|
212
|
+
show?: boolean;
|
|
213
|
+
transitionProps?: TransitionProps;
|
|
214
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
215
|
+
}> & Readonly<{}>, "placement" | "triggerRef" | "triggerRefs" | "popperRef"> & ShallowUnwrapRef< {
|
|
216
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
217
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
218
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
219
|
+
}> & {} & ComponentCustomProperties & {} & {
|
|
220
|
+
$slots: Readonly<{
|
|
221
|
+
trigger?: () => VNode | VNode[];
|
|
222
|
+
content?: () => VNode | VNode[];
|
|
223
|
+
}> & {
|
|
224
|
+
trigger?: () => VNode | VNode[];
|
|
225
|
+
content?: () => VNode | VNode[];
|
|
226
|
+
};
|
|
227
|
+
}) | null;
|
|
137
228
|
}, any>;
|
|
138
229
|
|
|
139
230
|
declare const __VLS_component_4: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
@@ -150,7 +241,6 @@ submit: () => void;
|
|
|
150
241
|
startSpeech: () => void;
|
|
151
242
|
stopSpeech: () => void;
|
|
152
243
|
activateTemplateFirstField: () => void;
|
|
153
|
-
setTemplate: (template: string, initialValues?: Record<string, string>) => void;
|
|
154
244
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
155
245
|
[x: string]: any;
|
|
156
246
|
} & {
|
|
@@ -167,7 +257,6 @@ autofocus: boolean;
|
|
|
167
257
|
clearable: boolean;
|
|
168
258
|
showWordLimit: boolean;
|
|
169
259
|
theme: ThemeType_2;
|
|
170
|
-
placeholder: string;
|
|
171
260
|
hasContent: boolean;
|
|
172
261
|
allowSpeech: boolean;
|
|
173
262
|
allowFiles: boolean;
|
|
@@ -175,39 +264,27 @@ submitType: SubmitTrigger_2;
|
|
|
175
264
|
stopText: string;
|
|
176
265
|
autoSize: AutoSize_2;
|
|
177
266
|
maxLength: number;
|
|
267
|
+
placeholder: string;
|
|
178
268
|
suggestions: string[];
|
|
179
269
|
suggestionPopupWidth: string | number;
|
|
180
|
-
|
|
270
|
+
templateData: UserItem[];
|
|
181
271
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
182
272
|
senderRef: HTMLDivElement;
|
|
183
273
|
inputWrapperRef: HTMLDivElement;
|
|
184
274
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
onInput?: ((value: string) => any) | undefined;
|
|
190
|
-
onSubmit?: ((value: string) => any) | undefined;
|
|
191
|
-
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
192
|
-
"onEmpty-content"?: (() => any) | undefined;
|
|
193
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
275
|
+
modelValue?: UserItem[];
|
|
276
|
+
}> & Readonly<{
|
|
277
|
+
onSubmit?: (() => any) | undefined;
|
|
278
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
194
279
|
}>, {
|
|
195
|
-
|
|
196
|
-
resetFields: () => void;
|
|
280
|
+
clearHistory: () => void;
|
|
197
281
|
activateFirstField: () => void;
|
|
198
|
-
getValueFromDOM: () => string;
|
|
199
|
-
setTemplate: (params: SetTemplateParams_2) => void;
|
|
200
282
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
201
|
-
"update:
|
|
283
|
+
"update:modelValue": (value: UserItem[]) => any;
|
|
202
284
|
} & {
|
|
203
|
-
|
|
204
|
-
focus: (event: FocusEvent) => any;
|
|
205
|
-
input: (value: string) => any;
|
|
206
|
-
submit: (value: string) => any;
|
|
207
|
-
"content-status": (hasContent: boolean) => any;
|
|
208
|
-
"empty-content": () => any;
|
|
285
|
+
submit: () => any;
|
|
209
286
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
210
|
-
|
|
287
|
+
editorRef: HTMLDivElement;
|
|
211
288
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
212
289
|
P: {};
|
|
213
290
|
B: {};
|
|
@@ -216,21 +293,13 @@ C: {};
|
|
|
216
293
|
M: {};
|
|
217
294
|
Defaults: {};
|
|
218
295
|
}, Readonly<{
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
onInput?: ((value: string) => any) | undefined;
|
|
224
|
-
onSubmit?: ((value: string) => any) | undefined;
|
|
225
|
-
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
226
|
-
"onEmpty-content"?: (() => any) | undefined;
|
|
227
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
296
|
+
modelValue?: UserItem[];
|
|
297
|
+
}> & Readonly<{
|
|
298
|
+
onSubmit?: (() => any) | undefined;
|
|
299
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
228
300
|
}>, {
|
|
229
|
-
|
|
230
|
-
resetFields: () => void;
|
|
301
|
+
clearHistory: () => void;
|
|
231
302
|
activateFirstField: () => void;
|
|
232
|
-
getValueFromDOM: () => string;
|
|
233
|
-
setTemplate: (params: SetTemplateParams_2) => void;
|
|
234
303
|
}, {}, {}, {}, {}> | null;
|
|
235
304
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
|
|
236
305
|
_constants: {
|
|
@@ -874,9 +943,11 @@ declare const __VLS_component_8: DefineComponent<__VLS_PublicProps_2, {}, {}, {}
|
|
|
874
943
|
"onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
|
|
875
944
|
}>, {
|
|
876
945
|
showAllButtonOn: "hover" | "always";
|
|
946
|
+
overflowMode: "expand" | "scroll";
|
|
877
947
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
878
948
|
containerWrapperRef: HTMLDivElement;
|
|
879
949
|
containerRef: HTMLDivElement;
|
|
950
|
+
floatingItemsRef: HTMLDivElement;
|
|
880
951
|
}, HTMLDivElement>;
|
|
881
952
|
|
|
882
953
|
declare const __VLS_component_9: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
@@ -960,10 +1031,104 @@ declare function __VLS_template_2(): {
|
|
|
960
1031
|
|
|
961
1032
|
declare function __VLS_template_3(): {
|
|
962
1033
|
attrs: Partial<{}>;
|
|
963
|
-
slots:
|
|
1034
|
+
slots: {
|
|
1035
|
+
trigger?(_: {}): any;
|
|
1036
|
+
};
|
|
964
1037
|
refs: {
|
|
965
|
-
|
|
966
|
-
|
|
1038
|
+
basePopperRef: ({
|
|
1039
|
+
$: ComponentInternalInstance;
|
|
1040
|
+
$data: {};
|
|
1041
|
+
$props: {
|
|
1042
|
+
readonly offset?: number | {
|
|
1043
|
+
mainAxis?: number;
|
|
1044
|
+
crossAxis?: number;
|
|
1045
|
+
} | undefined;
|
|
1046
|
+
readonly placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
1047
|
+
readonly preventOverflow?: boolean | undefined;
|
|
1048
|
+
readonly renderAllTriggers?: boolean | undefined;
|
|
1049
|
+
readonly show?: boolean | undefined;
|
|
1050
|
+
readonly transitionProps?: TransitionProps | undefined;
|
|
1051
|
+
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
1052
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1053
|
+
$attrs: {
|
|
1054
|
+
[x: string]: unknown;
|
|
1055
|
+
};
|
|
1056
|
+
$refs: {
|
|
1057
|
+
[x: string]: unknown;
|
|
1058
|
+
} & {
|
|
1059
|
+
popperRef: HTMLDivElement;
|
|
1060
|
+
};
|
|
1061
|
+
$slots: Readonly<{
|
|
1062
|
+
[name: string]: Slot<any> | undefined;
|
|
1063
|
+
}>;
|
|
1064
|
+
$root: ComponentPublicInstance | null;
|
|
1065
|
+
$parent: ComponentPublicInstance | null;
|
|
1066
|
+
$host: Element | null;
|
|
1067
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
1068
|
+
$el: any;
|
|
1069
|
+
$options: ComponentOptionsBase<Readonly<{
|
|
1070
|
+
offset?: number | {
|
|
1071
|
+
mainAxis?: number;
|
|
1072
|
+
crossAxis?: number;
|
|
1073
|
+
};
|
|
1074
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1075
|
+
preventOverflow?: boolean;
|
|
1076
|
+
renderAllTriggers?: boolean;
|
|
1077
|
+
show?: boolean;
|
|
1078
|
+
transitionProps?: TransitionProps;
|
|
1079
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
1080
|
+
}> & Readonly<{}>, {
|
|
1081
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
1082
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
1083
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
1084
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
1085
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1086
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
1087
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
1088
|
+
created?: (() => void) | (() => void)[];
|
|
1089
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
1090
|
+
mounted?: (() => void) | (() => void)[];
|
|
1091
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
1092
|
+
updated?: (() => void) | (() => void)[];
|
|
1093
|
+
activated?: (() => void) | (() => void)[];
|
|
1094
|
+
deactivated?: (() => void) | (() => void)[];
|
|
1095
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
1096
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
1097
|
+
destroyed?: (() => void) | (() => void)[];
|
|
1098
|
+
unmounted?: (() => void) | (() => void)[];
|
|
1099
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1100
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1101
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
1102
|
+
};
|
|
1103
|
+
$forceUpdate: () => void;
|
|
1104
|
+
$nextTick: nextTick;
|
|
1105
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
1106
|
+
} & Readonly<{
|
|
1107
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1108
|
+
}> & Omit<Readonly<{
|
|
1109
|
+
offset?: number | {
|
|
1110
|
+
mainAxis?: number;
|
|
1111
|
+
crossAxis?: number;
|
|
1112
|
+
};
|
|
1113
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1114
|
+
preventOverflow?: boolean;
|
|
1115
|
+
renderAllTriggers?: boolean;
|
|
1116
|
+
show?: boolean;
|
|
1117
|
+
transitionProps?: TransitionProps;
|
|
1118
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
1119
|
+
}> & Readonly<{}>, "placement" | "triggerRef" | "triggerRefs" | "popperRef"> & ShallowUnwrapRef< {
|
|
1120
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
1121
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
1122
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
1123
|
+
}> & {} & ComponentCustomProperties & {} & {
|
|
1124
|
+
$slots: Readonly<{
|
|
1125
|
+
trigger?: () => VNode | VNode[];
|
|
1126
|
+
content?: () => VNode | VNode[];
|
|
1127
|
+
}> & {
|
|
1128
|
+
trigger?: () => VNode | VNode[];
|
|
1129
|
+
content?: () => VNode | VNode[];
|
|
1130
|
+
};
|
|
1131
|
+
}) | null;
|
|
967
1132
|
};
|
|
968
1133
|
rootEl: any;
|
|
969
1134
|
};
|
|
@@ -990,32 +1155,19 @@ declare function __VLS_template_5(): {
|
|
|
990
1155
|
senderRef: HTMLDivElement;
|
|
991
1156
|
inputWrapperRef: HTMLDivElement;
|
|
992
1157
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
993
|
-
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
onInput?: ((value: string) => any) | undefined;
|
|
998
|
-
onSubmit?: ((value: string) => any) | undefined;
|
|
999
|
-
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
1000
|
-
"onEmpty-content"?: (() => any) | undefined;
|
|
1001
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
1158
|
+
modelValue?: UserItem[];
|
|
1159
|
+
}> & Readonly<{
|
|
1160
|
+
onSubmit?: (() => any) | undefined;
|
|
1161
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
1002
1162
|
}>, {
|
|
1003
|
-
|
|
1004
|
-
resetFields: () => void;
|
|
1163
|
+
clearHistory: () => void;
|
|
1005
1164
|
activateFirstField: () => void;
|
|
1006
|
-
getValueFromDOM: () => string;
|
|
1007
|
-
setTemplate: (params: SetTemplateParams_2) => void;
|
|
1008
1165
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1009
|
-
"update:
|
|
1166
|
+
"update:modelValue": (value: UserItem[]) => any;
|
|
1010
1167
|
} & {
|
|
1011
|
-
|
|
1012
|
-
focus: (event: FocusEvent) => any;
|
|
1013
|
-
input: (value: string) => any;
|
|
1014
|
-
submit: (value: string) => any;
|
|
1015
|
-
"content-status": (hasContent: boolean) => any;
|
|
1016
|
-
"empty-content": () => any;
|
|
1168
|
+
submit: () => any;
|
|
1017
1169
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
1018
|
-
|
|
1170
|
+
editorRef: HTMLDivElement;
|
|
1019
1171
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
1020
1172
|
P: {};
|
|
1021
1173
|
B: {};
|
|
@@ -1024,21 +1176,13 @@ declare function __VLS_template_5(): {
|
|
|
1024
1176
|
M: {};
|
|
1025
1177
|
Defaults: {};
|
|
1026
1178
|
}, Readonly<{
|
|
1027
|
-
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
onInput?: ((value: string) => any) | undefined;
|
|
1032
|
-
onSubmit?: ((value: string) => any) | undefined;
|
|
1033
|
-
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
1034
|
-
"onEmpty-content"?: (() => any) | undefined;
|
|
1035
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
1179
|
+
modelValue?: UserItem[];
|
|
1180
|
+
}> & Readonly<{
|
|
1181
|
+
onSubmit?: (() => any) | undefined;
|
|
1182
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
1036
1183
|
}>, {
|
|
1037
|
-
|
|
1038
|
-
resetFields: () => void;
|
|
1184
|
+
clearHistory: () => void;
|
|
1039
1185
|
activateFirstField: () => void;
|
|
1040
|
-
getValueFromDOM: () => string;
|
|
1041
|
-
setTemplate: (params: SetTemplateParams_2) => void;
|
|
1042
1186
|
}, {}, {}, {}, {}> | null;
|
|
1043
1187
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
|
|
1044
1188
|
_constants: {
|
|
@@ -1672,6 +1816,7 @@ declare function __VLS_template_8(): {
|
|
|
1672
1816
|
refs: {
|
|
1673
1817
|
containerWrapperRef: HTMLDivElement;
|
|
1674
1818
|
containerRef: HTMLDivElement;
|
|
1819
|
+
floatingItemsRef: HTMLDivElement;
|
|
1675
1820
|
};
|
|
1676
1821
|
rootEl: HTMLDivElement;
|
|
1677
1822
|
};
|
|
@@ -1802,6 +1947,12 @@ declare interface BaseHistoryProps {
|
|
|
1802
1947
|
selected?: string;
|
|
1803
1948
|
}
|
|
1804
1949
|
|
|
1950
|
+
declare interface BaseTextItem {
|
|
1951
|
+
id: string;
|
|
1952
|
+
type: string;
|
|
1953
|
+
content: string;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1805
1956
|
declare const Bubble: typeof _default_14 & {
|
|
1806
1957
|
install: typeof bubbleInstall;
|
|
1807
1958
|
};
|
|
@@ -2038,11 +2189,25 @@ export { _default_9 as Welcome }
|
|
|
2038
2189
|
|
|
2039
2190
|
export declare interface DropdownMenuEmits {
|
|
2040
2191
|
(e: 'item-click', item: DropdownMenuItem): void;
|
|
2192
|
+
/**
|
|
2193
|
+
* 点击外部区域时触发, 仅在 trigger 为 'click' 或 'manual' 时有效
|
|
2194
|
+
*/
|
|
2041
2195
|
(e: 'click-outside', event: MouseEvent): void;
|
|
2042
2196
|
}
|
|
2043
2197
|
|
|
2198
|
+
export declare interface DropdownMenuEventProps {
|
|
2199
|
+
onItemClick?: (item: DropdownMenuItem) => void;
|
|
2200
|
+
onClickOutside?: (event: MouseEvent) => void;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2044
2203
|
export declare interface DropdownMenuEvents {
|
|
2204
|
+
/**
|
|
2205
|
+
* @deprecated
|
|
2206
|
+
*/
|
|
2045
2207
|
itemClick?: (item: DropdownMenuItem) => void;
|
|
2208
|
+
/**
|
|
2209
|
+
* @deprecated
|
|
2210
|
+
*/
|
|
2046
2211
|
clickOutside?: (event: MouseEvent) => void;
|
|
2047
2212
|
}
|
|
2048
2213
|
|
|
@@ -2060,13 +2225,11 @@ export declare interface DropdownMenuProps {
|
|
|
2060
2225
|
/**
|
|
2061
2226
|
* 触发方式。默认值为 'click'
|
|
2062
2227
|
*/
|
|
2063
|
-
trigger?: 'click' | 'manual';
|
|
2064
|
-
minWidth?: string | number;
|
|
2065
|
-
topOffset?: string | number;
|
|
2228
|
+
trigger?: 'click' | 'hover' | 'manual';
|
|
2066
2229
|
}
|
|
2067
2230
|
|
|
2068
2231
|
export declare interface DropdownMenuSlots {
|
|
2069
|
-
|
|
2232
|
+
trigger?: () => VNode | VNode[];
|
|
2070
2233
|
}
|
|
2071
2234
|
|
|
2072
2235
|
export declare interface FeedbackEvents {
|
|
@@ -2299,6 +2462,7 @@ declare interface QuestionProps {
|
|
|
2299
2462
|
|
|
2300
2463
|
export declare type SenderEmits = {
|
|
2301
2464
|
(e: 'update:modelValue', value: string): void;
|
|
2465
|
+
(e: 'update:templateData', value: UserItem[]): void;
|
|
2302
2466
|
(e: 'submit', value: string): void;
|
|
2303
2467
|
(e: 'clear'): void;
|
|
2304
2468
|
(e: 'speech-start'): void;
|
|
@@ -2334,20 +2498,10 @@ export declare interface SenderProps {
|
|
|
2334
2498
|
theme?: ThemeType;
|
|
2335
2499
|
template?: string;
|
|
2336
2500
|
hasContent?: boolean;
|
|
2337
|
-
|
|
2501
|
+
templateData?: UserItem[];
|
|
2338
2502
|
stopText?: string;
|
|
2339
2503
|
}
|
|
2340
2504
|
|
|
2341
|
-
/**
|
|
2342
|
-
* 设置模板的参数接口
|
|
2343
|
-
*/
|
|
2344
|
-
export declare interface SetTemplateParams {
|
|
2345
|
-
/** 模板字符串,格式为普通文本与 [占位符] 的组合 */
|
|
2346
|
-
template: string;
|
|
2347
|
-
/** 字段初始值,键为占位符文本,值为初始内容 */
|
|
2348
|
-
initialValues?: Record<string, string>;
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
2505
|
export declare type SingleTabHistoryProps = {
|
|
2352
2506
|
tabTitle: string;
|
|
2353
2507
|
data: HistoryData;
|
|
@@ -2440,16 +2594,7 @@ export declare interface SuggestionItem {
|
|
|
2440
2594
|
|
|
2441
2595
|
declare type SuggestionItem_2<T = Record<string, unknown>> = SuggestionBaseItem & T;
|
|
2442
2596
|
|
|
2443
|
-
export declare type SuggestionPillAction =
|
|
2444
|
-
type: 'popover';
|
|
2445
|
-
props: SuggestionPopoverProps;
|
|
2446
|
-
slots?: Omit<SuggestionPopoverSlots, 'default'>;
|
|
2447
|
-
events?: SuggestionPopoverEvents;
|
|
2448
|
-
} | {
|
|
2449
|
-
type: 'menu';
|
|
2450
|
-
props: DropdownMenuProps;
|
|
2451
|
-
events?: DropdownMenuEvents;
|
|
2452
|
-
};
|
|
2597
|
+
export declare type SuggestionPillAction = SuggestionPillPopoverAction | SuggestionPillMenuAction;
|
|
2453
2598
|
|
|
2454
2599
|
export declare type SuggestionPillBaseItem<T> = {
|
|
2455
2600
|
id: string;
|
|
@@ -2479,6 +2624,25 @@ export declare type SuggestionPillItem<T = Record<string, unknown>> = Suggestion
|
|
|
2479
2624
|
icon: VNode | Component;
|
|
2480
2625
|
});
|
|
2481
2626
|
|
|
2627
|
+
export declare type SuggestionPillMenuAction = {
|
|
2628
|
+
type: 'menu';
|
|
2629
|
+
props: DropdownMenuProps & DropdownMenuEventProps;
|
|
2630
|
+
/**
|
|
2631
|
+
* @deprecated use onXXX in props instead
|
|
2632
|
+
*/
|
|
2633
|
+
events?: DropdownMenuEvents;
|
|
2634
|
+
};
|
|
2635
|
+
|
|
2636
|
+
export declare type SuggestionPillPopoverAction = {
|
|
2637
|
+
type: 'popover';
|
|
2638
|
+
props: SuggestionPopoverProps & SuggestionPopoverEventProps;
|
|
2639
|
+
slots?: Omit<SuggestionPopoverSlots, 'default'>;
|
|
2640
|
+
/**
|
|
2641
|
+
* @deprecated use onXXX in props instead
|
|
2642
|
+
*/
|
|
2643
|
+
events?: SuggestionPopoverEvents;
|
|
2644
|
+
};
|
|
2645
|
+
|
|
2482
2646
|
export declare interface SuggestionPillsEmits {
|
|
2483
2647
|
(e: 'item-click', item: SuggestionPillItem): void;
|
|
2484
2648
|
(e: 'click-outside', event: MouseEvent): void;
|
|
@@ -2497,6 +2661,18 @@ export declare interface SuggestionPillsProps {
|
|
|
2497
2661
|
* @default 'hover'
|
|
2498
2662
|
*/
|
|
2499
2663
|
showAllButtonOn?: 'hover' | 'always';
|
|
2664
|
+
/**
|
|
2665
|
+
* 控制多余按钮如何展示
|
|
2666
|
+
* - expand: 点击更多按钮展开所有项
|
|
2667
|
+
* - scroll: 横向滚动显示多余项
|
|
2668
|
+
* @default 'expand'
|
|
2669
|
+
*/
|
|
2670
|
+
overflowMode?: 'expand' | 'scroll';
|
|
2671
|
+
/**
|
|
2672
|
+
* 鼠标悬停时是否自动滚动到可见区域
|
|
2673
|
+
* @default false
|
|
2674
|
+
*/
|
|
2675
|
+
autoScrollOnHover?: boolean;
|
|
2500
2676
|
}
|
|
2501
2677
|
|
|
2502
2678
|
/**
|
|
@@ -2506,11 +2682,34 @@ export declare interface SuggestionPillsSlots {
|
|
|
2506
2682
|
default?: () => VNode | VNode[];
|
|
2507
2683
|
}
|
|
2508
2684
|
|
|
2685
|
+
declare interface SuggestionPopoverEventProps {
|
|
2686
|
+
onItemClick?: (item: SuggestionItem_2) => void;
|
|
2687
|
+
onGroupClick?: (group: SuggestionGroup) => void;
|
|
2688
|
+
onOpen?: () => void;
|
|
2689
|
+
onClose?: () => void;
|
|
2690
|
+
onClickOutside?: (event: MouseEvent) => void;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2509
2693
|
declare interface SuggestionPopoverEvents {
|
|
2694
|
+
/**
|
|
2695
|
+
* @deprecated use onItemClick in props instead
|
|
2696
|
+
*/
|
|
2510
2697
|
itemClick?: (item: SuggestionItem_2) => void;
|
|
2698
|
+
/**
|
|
2699
|
+
* @deprecated use onGroupClick in props instead
|
|
2700
|
+
*/
|
|
2511
2701
|
groupClick?: (group: SuggestionGroup) => void;
|
|
2702
|
+
/**
|
|
2703
|
+
* @deprecated use onOpen in props instead
|
|
2704
|
+
*/
|
|
2512
2705
|
open?: () => void;
|
|
2706
|
+
/**
|
|
2707
|
+
* @deprecated use onClose in props instead
|
|
2708
|
+
*/
|
|
2513
2709
|
close?: () => void;
|
|
2710
|
+
/**
|
|
2711
|
+
* @deprecated use onClickOutside in props instead
|
|
2712
|
+
*/
|
|
2514
2713
|
clickOutside?: (event: MouseEvent) => void;
|
|
2515
2714
|
}
|
|
2516
2715
|
|
|
@@ -2571,62 +2770,14 @@ export declare interface SuggestionProps {
|
|
|
2571
2770
|
defaultExpanded?: boolean;
|
|
2572
2771
|
}
|
|
2573
2772
|
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
/** 输入事件 */
|
|
2579
|
-
(e: 'input', value: string): void;
|
|
2580
|
-
/** 内容变更状态 - 通知父组件是否有内容 */
|
|
2581
|
-
(e: 'content-status', hasContent: boolean): void;
|
|
2582
|
-
/** 提交事件 */
|
|
2583
|
-
(e: 'submit', value: string): void;
|
|
2584
|
-
/** 聚焦事件 */
|
|
2585
|
-
(e: 'focus', event: FocusEvent): void;
|
|
2586
|
-
/** 失焦事件 */
|
|
2587
|
-
(e: 'blur', event: FocusEvent): void;
|
|
2588
|
-
/** 模板内容为空时触发,通知父组件可以退出模板编辑模式 */
|
|
2589
|
-
(e: 'empty-content'): void;
|
|
2773
|
+
declare interface TemplateItem extends BaseTextItem {
|
|
2774
|
+
type: 'template';
|
|
2775
|
+
prefix: string;
|
|
2776
|
+
suffix: string;
|
|
2590
2777
|
}
|
|
2591
2778
|
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
*/
|
|
2595
|
-
export declare interface TemplateEditorExpose {
|
|
2596
|
-
/** 聚焦到编辑器 */
|
|
2597
|
-
focus: () => void;
|
|
2598
|
-
/** 重置所有字段 */
|
|
2599
|
-
resetFields: () => void;
|
|
2600
|
-
/** 激活第一个字段 */
|
|
2601
|
-
activateFirstField: () => void;
|
|
2602
|
-
/** 获取当前DOM中的值 */
|
|
2603
|
-
getValueFromDOM: () => string;
|
|
2604
|
-
/** 设置模板和初始值 */
|
|
2605
|
-
setTemplate: (params: SetTemplateParams) => void;
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
|
-
/**
|
|
2609
|
-
* 模板编辑器属性
|
|
2610
|
-
*/
|
|
2611
|
-
export declare interface TemplateEditorProps {
|
|
2612
|
-
/** 当前值 */
|
|
2613
|
-
value?: string;
|
|
2614
|
-
/** 是否自动聚焦 */
|
|
2615
|
-
autofocus?: boolean;
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
/**
|
|
2619
|
-
* 模板部分定义
|
|
2620
|
-
*/
|
|
2621
|
-
export declare interface TemplatePart {
|
|
2622
|
-
/** 内容文本 */
|
|
2623
|
-
content: string;
|
|
2624
|
-
/** 是否为可编辑字段 */
|
|
2625
|
-
isField: boolean;
|
|
2626
|
-
/** 占位符文本 (当字段为空时显示) */
|
|
2627
|
-
placeholder?: string;
|
|
2628
|
-
/** 字段索引 (用于标识可编辑字段) */
|
|
2629
|
-
fieldIndex?: number;
|
|
2779
|
+
declare interface TextItem extends BaseTextItem {
|
|
2780
|
+
type: 'text';
|
|
2630
2781
|
}
|
|
2631
2782
|
|
|
2632
2783
|
/**
|
|
@@ -2652,6 +2803,12 @@ export declare type TriggerHandler = (info: TriggerInfo) => void;
|
|
|
2652
2803
|
/** 触发信息类型 */
|
|
2653
2804
|
export declare type TriggerInfo = TriggerContext | false;
|
|
2654
2805
|
|
|
2806
|
+
export declare type UserItem = UserTextItem | UserTemplateItem;
|
|
2807
|
+
|
|
2808
|
+
export declare type UserTemplateItem = Pick<TemplateItem, 'type' | 'content'>;
|
|
2809
|
+
|
|
2810
|
+
export declare type UserTextItem = Omit<TextItem, 'id'>;
|
|
2811
|
+
|
|
2655
2812
|
export declare interface WelcomeProps {
|
|
2656
2813
|
title: string;
|
|
2657
2814
|
description: string;
|