@opentiny/tiny-robot 0.3.0-alpha.36 → 0.3.0-alpha.37
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/bubble/index.js +370 -374
- package/dist/index.d.ts +44 -5
- package/dist/sender/index.js +1068 -947
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -376,8 +376,8 @@ allowSpeech: boolean;
|
|
|
376
376
|
allowFiles: boolean;
|
|
377
377
|
submitType: SubmitTrigger;
|
|
378
378
|
stopText: string;
|
|
379
|
-
suggestions: ISuggestionItem[];
|
|
380
379
|
autoSize: AutoSize;
|
|
380
|
+
suggestions: ISuggestionItem[];
|
|
381
381
|
clearable: boolean;
|
|
382
382
|
maxLength: number;
|
|
383
383
|
showWordLimit: boolean;
|
|
@@ -389,6 +389,11 @@ senderRef: HTMLDivElement;
|
|
|
389
389
|
inputWrapperRef: HTMLDivElement;
|
|
390
390
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
391
391
|
modelValue?: UserItem[];
|
|
392
|
+
} & {
|
|
393
|
+
autoSize: boolean | {
|
|
394
|
+
minRows: number;
|
|
395
|
+
maxRows: number;
|
|
396
|
+
};
|
|
392
397
|
}> & Readonly<{
|
|
393
398
|
onSubmit?: (() => any) | undefined;
|
|
394
399
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -410,6 +415,11 @@ M: {};
|
|
|
410
415
|
Defaults: {};
|
|
411
416
|
}, Readonly<{
|
|
412
417
|
modelValue?: UserItem[];
|
|
418
|
+
} & {
|
|
419
|
+
autoSize: boolean | {
|
|
420
|
+
minRows: number;
|
|
421
|
+
maxRows: number;
|
|
422
|
+
};
|
|
413
423
|
}> & Readonly<{
|
|
414
424
|
onSubmit?: (() => any) | undefined;
|
|
415
425
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1221,6 +1231,7 @@ declare function __VLS_template_7(): {
|
|
|
1221
1231
|
slots: {
|
|
1222
1232
|
header?(_: {}): any;
|
|
1223
1233
|
prefix?(_: {}): any;
|
|
1234
|
+
content?(_: {}): any;
|
|
1224
1235
|
decorativeContent?(_: {}): any;
|
|
1225
1236
|
actions?(_: {}): any;
|
|
1226
1237
|
'footer-left'?(_: {}): any;
|
|
@@ -1232,6 +1243,11 @@ declare function __VLS_template_7(): {
|
|
|
1232
1243
|
inputWrapperRef: HTMLDivElement;
|
|
1233
1244
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
1234
1245
|
modelValue?: UserItem[];
|
|
1246
|
+
} & {
|
|
1247
|
+
autoSize: boolean | {
|
|
1248
|
+
minRows: number;
|
|
1249
|
+
maxRows: number;
|
|
1250
|
+
};
|
|
1235
1251
|
}> & Readonly<{
|
|
1236
1252
|
onSubmit?: (() => any) | undefined;
|
|
1237
1253
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1253,6 +1269,11 @@ declare function __VLS_template_7(): {
|
|
|
1253
1269
|
Defaults: {};
|
|
1254
1270
|
}, Readonly<{
|
|
1255
1271
|
modelValue?: UserItem[];
|
|
1272
|
+
} & {
|
|
1273
|
+
autoSize: boolean | {
|
|
1274
|
+
minRows: number;
|
|
1275
|
+
maxRows: number;
|
|
1276
|
+
};
|
|
1256
1277
|
}> & Readonly<{
|
|
1257
1278
|
onSubmit?: (() => any) | undefined;
|
|
1258
1279
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1957,10 +1978,7 @@ export declare interface BubbleContentItem {
|
|
|
1957
1978
|
[key: string]: any;
|
|
1958
1979
|
}
|
|
1959
1980
|
|
|
1960
|
-
export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | BubbleContentClassRenderer | Component
|
|
1961
|
-
component: Component;
|
|
1962
|
-
defaultProps: Record<string, unknown>;
|
|
1963
|
-
};
|
|
1981
|
+
export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | BubbleContentClassRenderer | Component;
|
|
1964
1982
|
|
|
1965
1983
|
declare const bubbleInstall: (app: App) => void;
|
|
1966
1984
|
|
|
@@ -2059,6 +2077,7 @@ export declare interface BubbleSlots {
|
|
|
2059
2077
|
export declare interface ButtonGroupConfig {
|
|
2060
2078
|
file?: ControlState & fileUploadConfig;
|
|
2061
2079
|
submit?: ControlState;
|
|
2080
|
+
voice?: VoiceButtonConfig;
|
|
2062
2081
|
}
|
|
2063
2082
|
|
|
2064
2083
|
export declare type ColorMode = 'light' | 'dark' | 'auto';
|
|
@@ -2931,14 +2950,30 @@ export declare interface SenderProps {
|
|
|
2931
2950
|
stopText?: string;
|
|
2932
2951
|
}
|
|
2933
2952
|
|
|
2953
|
+
export declare interface SpeechCallbacks {
|
|
2954
|
+
onStart: () => void;
|
|
2955
|
+
onInterim: (transcript: string) => void;
|
|
2956
|
+
onFinal: (transcript: string) => void;
|
|
2957
|
+
onEnd: (transcript?: string) => void;
|
|
2958
|
+
onError: (error: Error) => void;
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2934
2961
|
export declare interface SpeechConfig {
|
|
2962
|
+
customHandler?: SpeechHandler;
|
|
2935
2963
|
lang?: string;
|
|
2936
2964
|
continuous?: boolean;
|
|
2937
2965
|
interimResults?: boolean;
|
|
2938
2966
|
autoReplace?: boolean;
|
|
2967
|
+
onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
2939
2968
|
}
|
|
2940
2969
|
|
|
2941
2970
|
export declare interface SpeechHandler {
|
|
2971
|
+
start: (callbacks: SpeechCallbacks) => Promise<void> | void;
|
|
2972
|
+
stop: () => Promise<void> | void;
|
|
2973
|
+
isSupported: () => boolean;
|
|
2974
|
+
}
|
|
2975
|
+
|
|
2976
|
+
export declare interface SpeechHandlerResult {
|
|
2942
2977
|
speechState: SpeechState;
|
|
2943
2978
|
start: () => void;
|
|
2944
2979
|
stop: () => void;
|
|
@@ -3192,6 +3227,10 @@ export declare function useTouchDevice(): {
|
|
|
3192
3227
|
*/
|
|
3193
3228
|
export declare const vDropzone: Directive<DragAwareElement, DropzoneBinding>;
|
|
3194
3229
|
|
|
3230
|
+
declare interface VoiceButtonConfig {
|
|
3231
|
+
icon?: VNode | Component;
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3195
3234
|
export declare interface WelcomeProps {
|
|
3196
3235
|
title: string;
|
|
3197
3236
|
description: string;
|