@opentiny/tiny-robot 0.4.0-alpha.14 → 0.4.0-alpha.17
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/README.md +1 -198
- package/dist/action-group/index.js +1 -1
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +1 -1
- package/dist/drag-overlay/index.js +1 -1
- package/dist/dropdown-menu/index.js +6 -6
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +282 -2375
- package/dist/index.js +125 -155
- package/dist/index2.js +934 -188
- package/dist/index3.js +285 -266
- package/dist/index4.js +354 -734
- package/dist/index5.js +681 -358
- package/dist/index6.js +141 -919
- package/dist/mcp-add-form/index.js +1 -1
- package/dist/mcp-server-picker/index.js +1 -1
- package/dist/sender/index.js +1400 -3194
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +2 -2
- package/dist/useSlotRefs.js +3 -3
- package/dist/utils.js +1 -1
- package/package.json +4 -43
- package/LICENSE +0 -22
- package/README.zh-CN.md +0 -198
- package/dist/index7.js +0 -301
- package/dist/index8.js +0 -161
- package/dist/sender-actions/index.js +0 -13
- package/dist/sender-compat/index.js +0 -229
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AllowedComponentProps } from 'vue';
|
|
2
2
|
import { App } from 'vue';
|
|
3
|
+
import { Attrs } from 'vue';
|
|
3
4
|
import { Component } from 'vue';
|
|
4
5
|
import { ComponentCustomProperties } from 'vue';
|
|
5
6
|
import { ComponentCustomProps } from 'vue';
|
|
@@ -14,22 +15,17 @@ import { CSSProperties } from 'vue';
|
|
|
14
15
|
import { DebuggerEvent } from 'vue';
|
|
15
16
|
import { DefineComponent } from 'vue';
|
|
16
17
|
import { Directive } from 'vue';
|
|
17
|
-
import { Editor } from '@tiptap/vue-3';
|
|
18
|
-
import { Editor as Editor_2 } from '@tiptap/core';
|
|
19
|
-
import { Extension } from '@tiptap/core';
|
|
20
18
|
import { GlobalComponents } from 'vue';
|
|
21
19
|
import { GlobalDirectives } from 'vue';
|
|
22
20
|
import { MaybeComputedElementRef } from '@vueuse/core';
|
|
23
21
|
import { MaybeRefOrGetter } from 'vue';
|
|
24
22
|
import { nextTick } from 'vue';
|
|
25
|
-
import { Node as Node_2 } from '@tiptap/core';
|
|
26
23
|
import { OnCleanup } from '@vue/reactivity';
|
|
27
24
|
import { PublicProps } from 'vue';
|
|
28
25
|
import { Ref } from 'vue';
|
|
29
26
|
import { ShallowUnwrapRef } from 'vue';
|
|
30
27
|
import { Slot } from 'vue';
|
|
31
28
|
import { TransitionProps } from 'vue';
|
|
32
|
-
import { UseFileDialogOptions } from '@vueuse/core';
|
|
33
29
|
import { VNode } from 'vue';
|
|
34
30
|
import { VNodeProps } from 'vue';
|
|
35
31
|
import { WatchOptions } from 'vue';
|
|
@@ -116,9 +112,7 @@ readonly show?: boolean | undefined;
|
|
|
116
112
|
readonly transitionProps?: TransitionProps | undefined;
|
|
117
113
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
118
114
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
119
|
-
$attrs:
|
|
120
|
-
[x: string]: unknown;
|
|
121
|
-
};
|
|
115
|
+
$attrs: Attrs;
|
|
122
116
|
$refs: {
|
|
123
117
|
[x: string]: unknown;
|
|
124
118
|
};
|
|
@@ -180,11 +174,11 @@ preventOverflow?: boolean;
|
|
|
180
174
|
show?: boolean;
|
|
181
175
|
transitionProps?: TransitionProps;
|
|
182
176
|
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
183
|
-
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> &
|
|
184
|
-
triggerRef:
|
|
185
|
-
popperRef:
|
|
177
|
+
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> & {
|
|
178
|
+
triggerRef: HTMLElement | SVGElement | null | undefined;
|
|
179
|
+
popperRef: HTMLDivElement | null;
|
|
186
180
|
update: () => void;
|
|
187
|
-
}
|
|
181
|
+
} & {} & ComponentCustomProperties & {} & {
|
|
188
182
|
$slots: Readonly<{
|
|
189
183
|
trigger?: () => VNode[];
|
|
190
184
|
content?: () => VNode[];
|
|
@@ -280,33 +274,6 @@ allowPluginAdd: boolean;
|
|
|
280
274
|
marketLoading: boolean;
|
|
281
275
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
282
276
|
|
|
283
|
-
declare const __VLS_component_15: DefineComponent<ActionButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ActionButtonProps> & Readonly<{}>, {
|
|
284
|
-
disabled: boolean;
|
|
285
|
-
active: boolean;
|
|
286
|
-
tooltipPlacement: TooltipPlacement;
|
|
287
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
288
|
-
|
|
289
|
-
declare const __VLS_component_16: DefineComponent<VoiceButtonProps, {
|
|
290
|
-
start: () => void;
|
|
291
|
-
stop: () => void;
|
|
292
|
-
speechState: SpeechState;
|
|
293
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
294
|
-
"speech-start": () => any;
|
|
295
|
-
"speech-interim": (transcript: string) => any;
|
|
296
|
-
"speech-final": (transcript: string) => any;
|
|
297
|
-
"speech-end": (transcript?: string | undefined) => any;
|
|
298
|
-
"speech-error": (error: Error) => any;
|
|
299
|
-
}, string, PublicProps, Readonly<VoiceButtonProps> & Readonly<{
|
|
300
|
-
"onSpeech-start"?: (() => any) | undefined;
|
|
301
|
-
"onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
302
|
-
"onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
303
|
-
"onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
304
|
-
"onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
305
|
-
}>, {
|
|
306
|
-
tooltipPlacement: TooltipPlacement;
|
|
307
|
-
autoInsert: boolean;
|
|
308
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
309
|
-
|
|
310
277
|
declare const __VLS_component_2: DefineComponent<BubbleListProps, {
|
|
311
278
|
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
312
279
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
@@ -378,9 +345,7 @@ readonly show?: boolean | undefined;
|
|
|
378
345
|
readonly transitionProps?: TransitionProps | undefined;
|
|
379
346
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
380
347
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
381
|
-
$attrs:
|
|
382
|
-
[x: string]: unknown;
|
|
383
|
-
};
|
|
348
|
+
$attrs: Attrs;
|
|
384
349
|
$refs: {
|
|
385
350
|
[x: string]: unknown;
|
|
386
351
|
};
|
|
@@ -442,11 +407,11 @@ preventOverflow?: boolean;
|
|
|
442
407
|
show?: boolean;
|
|
443
408
|
transitionProps?: TransitionProps;
|
|
444
409
|
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
445
|
-
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> &
|
|
446
|
-
triggerRef:
|
|
447
|
-
popperRef:
|
|
410
|
+
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> & {
|
|
411
|
+
triggerRef: HTMLElement | SVGElement | null | undefined;
|
|
412
|
+
popperRef: HTMLDivElement | null;
|
|
448
413
|
update: () => void;
|
|
449
|
-
}
|
|
414
|
+
} & {} & ComponentCustomProperties & {} & {
|
|
450
415
|
$slots: Readonly<{
|
|
451
416
|
trigger?: () => VNode[];
|
|
452
417
|
content?: () => VNode[];
|
|
@@ -463,14 +428,14 @@ declare const __VLS_component_7: DefineComponent<PromptsProps, {}, {}, {}, {}, C
|
|
|
463
428
|
"onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
|
|
464
429
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
465
430
|
|
|
466
|
-
declare const __VLS_component_8: DefineComponent<
|
|
431
|
+
declare const __VLS_component_8: DefineComponent<SenderProps, {
|
|
467
432
|
focus: () => void;
|
|
468
433
|
blur: () => void;
|
|
469
434
|
clear: () => void;
|
|
470
435
|
submit: () => void;
|
|
471
|
-
setTemplateData: (templateData: UserTemplateItem[]) => void;
|
|
472
436
|
startSpeech: () => void;
|
|
473
437
|
stopSpeech: () => void;
|
|
438
|
+
activateTemplateFirstField: () => void;
|
|
474
439
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
475
440
|
clear: () => any;
|
|
476
441
|
blur: (event: FocusEvent) => any;
|
|
@@ -478,270 +443,95 @@ cancel: () => any;
|
|
|
478
443
|
focus: (event: FocusEvent) => any;
|
|
479
444
|
submit: (value: string) => any;
|
|
480
445
|
"update:modelValue": (value: string) => any;
|
|
446
|
+
"update:templateData": (value: UserItem[]) => any;
|
|
481
447
|
"speech-start": () => any;
|
|
482
|
-
"speech-interim": (transcript: string) => any;
|
|
483
448
|
"speech-end": (transcript?: string | undefined) => any;
|
|
449
|
+
"speech-interim": (transcript: string) => any;
|
|
484
450
|
"speech-error": (error: Error) => any;
|
|
485
|
-
"update:templateData": (value: UserItem[]) => any;
|
|
486
451
|
"suggestion-select": (value: string) => any;
|
|
487
452
|
"escape-press": () => any;
|
|
488
453
|
"reset-template": () => any;
|
|
489
454
|
"files-selected": (files: File[]) => any;
|
|
490
|
-
}, string, PublicProps, Readonly<
|
|
455
|
+
}, string, PublicProps, Readonly<SenderProps> & Readonly<{
|
|
491
456
|
onClear?: (() => any) | undefined;
|
|
492
457
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
493
458
|
onCancel?: (() => any) | undefined;
|
|
494
459
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
495
460
|
onSubmit?: ((value: string) => any) | undefined;
|
|
496
461
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
462
|
+
"onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
|
|
497
463
|
"onSpeech-start"?: (() => any) | undefined;
|
|
498
|
-
"onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
499
464
|
"onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
465
|
+
"onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
500
466
|
"onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
501
|
-
"onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
|
|
502
467
|
"onSuggestion-select"?: ((value: string) => any) | undefined;
|
|
503
468
|
"onEscape-press"?: (() => any) | undefined;
|
|
504
469
|
"onReset-template"?: (() => any) | undefined;
|
|
505
470
|
"onFiles-selected"?: ((files: File[]) => any) | undefined;
|
|
506
471
|
}>, {
|
|
472
|
+
disabled: boolean;
|
|
507
473
|
placeholder: string;
|
|
474
|
+
loading: boolean;
|
|
508
475
|
mode: InputMode;
|
|
476
|
+
allowSpeech: boolean;
|
|
477
|
+
allowFiles: boolean;
|
|
509
478
|
submitType: SubmitTrigger;
|
|
479
|
+
stopText: string;
|
|
480
|
+
autoSize: AutoSize;
|
|
481
|
+
modelValue: string;
|
|
482
|
+
suggestions: ISuggestionItem[];
|
|
483
|
+
autofocus: boolean;
|
|
484
|
+
clearable: boolean;
|
|
485
|
+
maxLength: number;
|
|
486
|
+
showWordLimit: boolean;
|
|
487
|
+
suggestionPopupWidth: string | number;
|
|
488
|
+
theme: ThemeType;
|
|
489
|
+
templateData: UserItem[];
|
|
510
490
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
511
|
-
senderRef:
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
readonly loading?: boolean | undefined;
|
|
520
|
-
readonly autofocus?: boolean | undefined;
|
|
521
|
-
readonly enterkeyhint?: EnterKeyHint | undefined;
|
|
522
|
-
readonly mode?: InputMode | undefined;
|
|
523
|
-
readonly autoSize?: AutoSize | undefined;
|
|
524
|
-
readonly maxLength?: number | undefined;
|
|
525
|
-
readonly showWordLimit?: boolean | undefined;
|
|
526
|
-
readonly clearable?: boolean | undefined;
|
|
527
|
-
readonly extensions?: Extension[] | any[] | undefined;
|
|
528
|
-
readonly size?: "normal" | "small" | undefined;
|
|
529
|
-
readonly stopText?: string | undefined;
|
|
530
|
-
readonly defaultActions?: DefaultActions | undefined;
|
|
531
|
-
readonly submitType?: SubmitTrigger | undefined;
|
|
532
|
-
readonly onClear?: (() => any) | undefined;
|
|
533
|
-
readonly onInput?: ((value: string) => any) | undefined;
|
|
534
|
-
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
535
|
-
readonly onCancel?: (() => any) | undefined;
|
|
536
|
-
readonly onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
537
|
-
readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
538
|
-
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
539
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
540
|
-
$attrs: {
|
|
541
|
-
[x: string]: unknown;
|
|
542
|
-
};
|
|
543
|
-
$refs: {
|
|
544
|
-
[x: string]: unknown;
|
|
491
|
+
senderRef: HTMLDivElement;
|
|
492
|
+
inputWrapperRef: HTMLDivElement;
|
|
493
|
+
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
494
|
+
modelValue?: UserItem[];
|
|
495
|
+
} & {
|
|
496
|
+
autoSize: boolean | {
|
|
497
|
+
minRows: number;
|
|
498
|
+
maxRows: number;
|
|
545
499
|
};
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
$root: ComponentPublicInstance | null;
|
|
550
|
-
$parent: ComponentPublicInstance | null;
|
|
551
|
-
$host: Element | null;
|
|
552
|
-
$emit: ((event: "clear") => void) & ((event: "input", value: string) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "cancel") => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "submit", textContent: string, structuredData?: StructuredData | undefined) => void) & ((event: "update:modelValue", value: string) => void);
|
|
553
|
-
$el: HTMLDivElement;
|
|
554
|
-
$options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
|
|
555
|
-
onClear?: (() => any) | undefined;
|
|
556
|
-
onInput?: ((value: string) => any) | undefined;
|
|
557
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
558
|
-
onCancel?: (() => any) | undefined;
|
|
559
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
560
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
561
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
500
|
+
}> & Readonly<{
|
|
501
|
+
onSubmit?: (() => any) | undefined;
|
|
502
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
562
503
|
}>, {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
},
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
autoSize: AutoSize;
|
|
585
|
-
extensions: Extension[] | any[];
|
|
586
|
-
submitType: SubmitTrigger;
|
|
587
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
588
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
589
|
-
created?: (() => void) | (() => void)[];
|
|
590
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
591
|
-
mounted?: (() => void) | (() => void)[];
|
|
592
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
593
|
-
updated?: (() => void) | (() => void)[];
|
|
594
|
-
activated?: (() => void) | (() => void)[];
|
|
595
|
-
deactivated?: (() => void) | (() => void)[];
|
|
596
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
597
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
598
|
-
destroyed?: (() => void) | (() => void)[];
|
|
599
|
-
unmounted?: (() => void) | (() => void)[];
|
|
600
|
-
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
601
|
-
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
602
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
603
|
-
};
|
|
604
|
-
$forceUpdate: () => void;
|
|
605
|
-
$nextTick: nextTick;
|
|
606
|
-
$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;
|
|
607
|
-
} & Readonly<{
|
|
608
|
-
size: "normal" | "small";
|
|
609
|
-
placeholder: string;
|
|
610
|
-
mode: InputMode;
|
|
611
|
-
enterkeyhint: EnterKeyHint;
|
|
612
|
-
autoSize: AutoSize;
|
|
613
|
-
extensions: Extension[] | any[];
|
|
614
|
-
submitType: SubmitTrigger;
|
|
615
|
-
}> & Omit<Readonly<SenderProps> & Readonly<{
|
|
616
|
-
onClear?: (() => any) | undefined;
|
|
617
|
-
onInput?: ((value: string) => any) | undefined;
|
|
618
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
619
|
-
onCancel?: (() => any) | undefined;
|
|
620
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
621
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
622
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
623
|
-
}>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "enterkeyhint" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
|
|
624
|
-
submit: () => void;
|
|
625
|
-
clear: () => void;
|
|
626
|
-
cancel: () => void;
|
|
627
|
-
focus: () => void;
|
|
628
|
-
blur: () => void;
|
|
629
|
-
setContent: (content: string) => void;
|
|
630
|
-
getContent: () => string;
|
|
631
|
-
editor: SenderContext["editor"];
|
|
632
|
-
}> & {} & ComponentCustomProperties & {} & {
|
|
633
|
-
$slots: {
|
|
634
|
-
header?(_: {}): any;
|
|
635
|
-
header?(_: {}): any;
|
|
636
|
-
prefix?(_: {}): any;
|
|
637
|
-
prefix?(_: {}): any;
|
|
638
|
-
content?(_: {
|
|
639
|
-
editor: Editor | undefined;
|
|
640
|
-
}): any;
|
|
641
|
-
content?(_: {
|
|
642
|
-
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
643
|
-
}): any;
|
|
644
|
-
'actions-inline'?(_: {}): any;
|
|
645
|
-
footer?(_: {}): any;
|
|
646
|
-
'footer-right'?(_: {}): any;
|
|
647
|
-
};
|
|
648
|
-
}) | null;
|
|
649
|
-
voiceRef: ({
|
|
650
|
-
$: ComponentInternalInstance;
|
|
651
|
-
$data: {};
|
|
652
|
-
$props: {
|
|
653
|
-
readonly icon?: (VNode | Component) | undefined;
|
|
654
|
-
readonly recordingIcon?: (VNode | Component) | undefined;
|
|
655
|
-
readonly disabled?: boolean | undefined;
|
|
656
|
-
readonly size?: "small" | "normal" | undefined;
|
|
657
|
-
readonly tooltip?: TooltipContent | undefined;
|
|
658
|
-
readonly tooltipPlacement?: TooltipPlacement | undefined;
|
|
659
|
-
readonly speechConfig?: SpeechConfig | undefined;
|
|
660
|
-
readonly autoInsert?: boolean | undefined;
|
|
661
|
-
readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
|
|
662
|
-
readonly "onSpeech-start"?: (() => any) | undefined;
|
|
663
|
-
readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
664
|
-
readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
665
|
-
readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
666
|
-
readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
667
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
668
|
-
$attrs: {
|
|
669
|
-
[x: string]: unknown;
|
|
670
|
-
};
|
|
671
|
-
$refs: {
|
|
672
|
-
[x: string]: unknown;
|
|
504
|
+
clearHistory: () => void;
|
|
505
|
+
activateFirstField: () => void;
|
|
506
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
507
|
+
"update:modelValue": (value: UserItem[]) => any;
|
|
508
|
+
} & {
|
|
509
|
+
submit: () => any;
|
|
510
|
+
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
511
|
+
editorRef: HTMLDivElement;
|
|
512
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
513
|
+
P: {};
|
|
514
|
+
B: {};
|
|
515
|
+
D: {};
|
|
516
|
+
C: {};
|
|
517
|
+
M: {};
|
|
518
|
+
Defaults: {};
|
|
519
|
+
}, Readonly<{
|
|
520
|
+
modelValue?: UserItem[];
|
|
521
|
+
} & {
|
|
522
|
+
autoSize: boolean | {
|
|
523
|
+
minRows: number;
|
|
524
|
+
maxRows: number;
|
|
673
525
|
};
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
$root: ComponentPublicInstance | null;
|
|
678
|
-
$parent: ComponentPublicInstance | null;
|
|
679
|
-
$host: Element | null;
|
|
680
|
-
$emit: ((event: "speech-start") => void) & ((event: "speech-interim", transcript: string) => void) & ((event: "speech-final", transcript: string) => void) & ((event: "speech-end", transcript?: string | undefined) => void) & ((event: "speech-error", error: Error) => void);
|
|
681
|
-
$el: any;
|
|
682
|
-
$options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
|
|
683
|
-
"onSpeech-start"?: (() => any) | undefined;
|
|
684
|
-
"onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
685
|
-
"onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
686
|
-
"onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
687
|
-
"onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
526
|
+
}> & Readonly<{
|
|
527
|
+
onSubmit?: (() => any) | undefined;
|
|
528
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
688
529
|
}>, {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
"speech-interim": (transcript: string) => any;
|
|
695
|
-
"speech-final": (transcript: string) => any;
|
|
696
|
-
"speech-end": (transcript?: string | undefined) => any;
|
|
697
|
-
"speech-error": (error: Error) => any;
|
|
698
|
-
}, string, {
|
|
699
|
-
tooltipPlacement: TooltipPlacement;
|
|
700
|
-
autoInsert: boolean;
|
|
701
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
702
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
703
|
-
created?: (() => void) | (() => void)[];
|
|
704
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
705
|
-
mounted?: (() => void) | (() => void)[];
|
|
706
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
707
|
-
updated?: (() => void) | (() => void)[];
|
|
708
|
-
activated?: (() => void) | (() => void)[];
|
|
709
|
-
deactivated?: (() => void) | (() => void)[];
|
|
710
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
711
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
712
|
-
destroyed?: (() => void) | (() => void)[];
|
|
713
|
-
unmounted?: (() => void) | (() => void)[];
|
|
714
|
-
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
715
|
-
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
716
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
717
|
-
};
|
|
718
|
-
$forceUpdate: () => void;
|
|
719
|
-
$nextTick: nextTick;
|
|
720
|
-
$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;
|
|
721
|
-
} & Readonly<{
|
|
722
|
-
tooltipPlacement: TooltipPlacement;
|
|
723
|
-
autoInsert: boolean;
|
|
724
|
-
}> & Omit<Readonly<VoiceButtonProps> & Readonly<{
|
|
725
|
-
"onSpeech-start"?: (() => any) | undefined;
|
|
726
|
-
"onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
727
|
-
"onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
728
|
-
"onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
729
|
-
"onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
730
|
-
}>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
|
|
731
|
-
start: () => void;
|
|
732
|
-
stop: () => void;
|
|
733
|
-
speechState: SpeechState;
|
|
734
|
-
}> & {} & ComponentCustomProperties & {} & {
|
|
735
|
-
$slots: {
|
|
736
|
-
icon?(_: {
|
|
737
|
-
isRecording: boolean;
|
|
738
|
-
}): any;
|
|
739
|
-
'recording-overlay'?(_: {
|
|
740
|
-
isRecording: boolean;
|
|
741
|
-
stop: () => void;
|
|
742
|
-
}): any;
|
|
743
|
-
};
|
|
744
|
-
}) | null;
|
|
530
|
+
clearHistory: () => void;
|
|
531
|
+
activateFirstField: () => void;
|
|
532
|
+
}, {}, {}, {}, {}> | null;
|
|
533
|
+
inputRef: any;
|
|
534
|
+
buttonsContainerRef: HTMLDivElement;
|
|
745
535
|
}, HTMLDivElement>;
|
|
746
536
|
|
|
747
537
|
declare const __VLS_component_9: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
@@ -829,9 +619,7 @@ declare function __VLS_template_11(): {
|
|
|
829
619
|
readonly transitionProps?: TransitionProps | undefined;
|
|
830
620
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
831
621
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
832
|
-
$attrs:
|
|
833
|
-
[x: string]: unknown;
|
|
834
|
-
};
|
|
622
|
+
$attrs: Attrs;
|
|
835
623
|
$refs: {
|
|
836
624
|
[x: string]: unknown;
|
|
837
625
|
};
|
|
@@ -893,11 +681,11 @@ declare function __VLS_template_11(): {
|
|
|
893
681
|
show?: boolean;
|
|
894
682
|
transitionProps?: TransitionProps;
|
|
895
683
|
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
896
|
-
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> &
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
}
|
|
684
|
+
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> & {
|
|
685
|
+
triggerRef: HTMLElement | SVGElement | null | undefined;
|
|
686
|
+
popperRef: HTMLDivElement | null;
|
|
687
|
+
update: () => void;
|
|
688
|
+
} & {} & ComponentCustomProperties & {} & {
|
|
901
689
|
$slots: Readonly<{
|
|
902
690
|
trigger?: () => VNode[];
|
|
903
691
|
content?: () => VNode[];
|
|
@@ -954,31 +742,6 @@ declare function __VLS_template_14(): {
|
|
|
954
742
|
rootEl: any;
|
|
955
743
|
};
|
|
956
744
|
|
|
957
|
-
declare function __VLS_template_15(): {
|
|
958
|
-
attrs: Partial<{}>;
|
|
959
|
-
slots: {
|
|
960
|
-
icon?(_: {}): any;
|
|
961
|
-
icon?(_: {}): any;
|
|
962
|
-
};
|
|
963
|
-
refs: {};
|
|
964
|
-
rootEl: any;
|
|
965
|
-
};
|
|
966
|
-
|
|
967
|
-
declare function __VLS_template_16(): {
|
|
968
|
-
attrs: Partial<{}>;
|
|
969
|
-
slots: {
|
|
970
|
-
icon?(_: {
|
|
971
|
-
isRecording: boolean;
|
|
972
|
-
}): any;
|
|
973
|
-
'recording-overlay'?(_: {
|
|
974
|
-
isRecording: boolean;
|
|
975
|
-
stop: () => void;
|
|
976
|
-
}): any;
|
|
977
|
-
};
|
|
978
|
-
refs: {};
|
|
979
|
-
rootEl: any;
|
|
980
|
-
};
|
|
981
|
-
|
|
982
745
|
declare function __VLS_template_2(): {
|
|
983
746
|
attrs: Partial<{}>;
|
|
984
747
|
slots: Readonly<BubbleListSlots> & BubbleListSlots;
|
|
@@ -1036,9 +799,7 @@ declare function __VLS_template_6(): {
|
|
|
1036
799
|
readonly transitionProps?: TransitionProps | undefined;
|
|
1037
800
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
1038
801
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1039
|
-
$attrs:
|
|
1040
|
-
[x: string]: unknown;
|
|
1041
|
-
};
|
|
802
|
+
$attrs: Attrs;
|
|
1042
803
|
$refs: {
|
|
1043
804
|
[x: string]: unknown;
|
|
1044
805
|
};
|
|
@@ -1100,11 +861,11 @@ declare function __VLS_template_6(): {
|
|
|
1100
861
|
show?: boolean;
|
|
1101
862
|
transitionProps?: TransitionProps;
|
|
1102
863
|
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
1103
|
-
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> &
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
}
|
|
864
|
+
}> & Readonly<{}>, "placement" | "popperRef" | "update" | "triggerRef"> & {
|
|
865
|
+
triggerRef: HTMLElement | SVGElement | null | undefined;
|
|
866
|
+
popperRef: HTMLDivElement | null;
|
|
867
|
+
update: () => void;
|
|
868
|
+
} & {} & ComponentCustomProperties & {} & {
|
|
1108
869
|
$slots: Readonly<{
|
|
1109
870
|
trigger?: () => VNode[];
|
|
1110
871
|
content?: () => VNode[];
|
|
@@ -1129,249 +890,58 @@ declare function __VLS_template_8(): {
|
|
|
1129
890
|
slots: {
|
|
1130
891
|
header?(_: {}): any;
|
|
1131
892
|
prefix?(_: {}): any;
|
|
1132
|
-
content?(_: {
|
|
1133
|
-
|
|
1134
|
-
}): any;
|
|
893
|
+
content?(_: {}): any;
|
|
894
|
+
decorativeContent?(_: {}): any;
|
|
1135
895
|
actions?(_: {}): any;
|
|
1136
896
|
'footer-left'?(_: {}): any;
|
|
1137
|
-
footer?(_: {}): any;
|
|
1138
897
|
'footer-right'?(_: {}): any;
|
|
898
|
+
footer?(_: {}): any;
|
|
1139
899
|
};
|
|
1140
900
|
refs: {
|
|
1141
|
-
senderRef:
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
onClear?: (() => any) | undefined;
|
|
1186
|
-
onInput?: ((value: string) => any) | undefined;
|
|
1187
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
1188
|
-
onCancel?: (() => any) | undefined;
|
|
1189
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
1190
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
1191
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
1192
|
-
}>, {
|
|
1193
|
-
submit: () => void;
|
|
1194
|
-
clear: () => void;
|
|
1195
|
-
cancel: () => void;
|
|
1196
|
-
focus: () => void;
|
|
1197
|
-
blur: () => void;
|
|
1198
|
-
setContent: (content: string) => void;
|
|
1199
|
-
getContent: () => string;
|
|
1200
|
-
editor: SenderContext["editor"];
|
|
1201
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1202
|
-
clear: () => any;
|
|
1203
|
-
input: (value: string) => any;
|
|
1204
|
-
blur: (event: FocusEvent) => any;
|
|
1205
|
-
cancel: () => any;
|
|
1206
|
-
focus: (event: FocusEvent) => any;
|
|
1207
|
-
submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
|
|
1208
|
-
"update:modelValue": (value: string) => any;
|
|
1209
|
-
}, string, {
|
|
1210
|
-
size: "normal" | "small";
|
|
1211
|
-
placeholder: string;
|
|
1212
|
-
mode: InputMode;
|
|
1213
|
-
enterkeyhint: EnterKeyHint;
|
|
1214
|
-
autoSize: AutoSize;
|
|
1215
|
-
extensions: Extension[] | any[];
|
|
1216
|
-
submitType: SubmitTrigger;
|
|
1217
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
1218
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
1219
|
-
created?: (() => void) | (() => void)[];
|
|
1220
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
1221
|
-
mounted?: (() => void) | (() => void)[];
|
|
1222
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
1223
|
-
updated?: (() => void) | (() => void)[];
|
|
1224
|
-
activated?: (() => void) | (() => void)[];
|
|
1225
|
-
deactivated?: (() => void) | (() => void)[];
|
|
1226
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
1227
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
1228
|
-
destroyed?: (() => void) | (() => void)[];
|
|
1229
|
-
unmounted?: (() => void) | (() => void)[];
|
|
1230
|
-
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1231
|
-
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1232
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
1233
|
-
};
|
|
1234
|
-
$forceUpdate: () => void;
|
|
1235
|
-
$nextTick: nextTick;
|
|
1236
|
-
$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;
|
|
1237
|
-
} & Readonly<{
|
|
1238
|
-
size: "normal" | "small";
|
|
1239
|
-
placeholder: string;
|
|
1240
|
-
mode: InputMode;
|
|
1241
|
-
enterkeyhint: EnterKeyHint;
|
|
1242
|
-
autoSize: AutoSize;
|
|
1243
|
-
extensions: Extension[] | any[];
|
|
1244
|
-
submitType: SubmitTrigger;
|
|
1245
|
-
}> & Omit<Readonly<SenderProps> & Readonly<{
|
|
1246
|
-
onClear?: (() => any) | undefined;
|
|
1247
|
-
onInput?: ((value: string) => any) | undefined;
|
|
1248
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
1249
|
-
onCancel?: (() => any) | undefined;
|
|
1250
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
1251
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
1252
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
1253
|
-
}>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "enterkeyhint" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
|
|
1254
|
-
submit: () => void;
|
|
1255
|
-
clear: () => void;
|
|
1256
|
-
cancel: () => void;
|
|
1257
|
-
focus: () => void;
|
|
1258
|
-
blur: () => void;
|
|
1259
|
-
setContent: (content: string) => void;
|
|
1260
|
-
getContent: () => string;
|
|
1261
|
-
editor: SenderContext["editor"];
|
|
1262
|
-
}> & {} & ComponentCustomProperties & {} & {
|
|
1263
|
-
$slots: {
|
|
1264
|
-
header?(_: {}): any;
|
|
1265
|
-
header?(_: {}): any;
|
|
1266
|
-
prefix?(_: {}): any;
|
|
1267
|
-
prefix?(_: {}): any;
|
|
1268
|
-
content?(_: {
|
|
1269
|
-
editor: Editor | undefined;
|
|
1270
|
-
}): any;
|
|
1271
|
-
content?(_: {
|
|
1272
|
-
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
1273
|
-
}): any;
|
|
1274
|
-
'actions-inline'?(_: {}): any;
|
|
1275
|
-
footer?(_: {}): any;
|
|
1276
|
-
'footer-right'?(_: {}): any;
|
|
1277
|
-
};
|
|
1278
|
-
}) | null;
|
|
1279
|
-
voiceRef: ({
|
|
1280
|
-
$: ComponentInternalInstance;
|
|
1281
|
-
$data: {};
|
|
1282
|
-
$props: {
|
|
1283
|
-
readonly icon?: (VNode | Component) | undefined;
|
|
1284
|
-
readonly recordingIcon?: (VNode | Component) | undefined;
|
|
1285
|
-
readonly disabled?: boolean | undefined;
|
|
1286
|
-
readonly size?: "small" | "normal" | undefined;
|
|
1287
|
-
readonly tooltip?: TooltipContent | undefined;
|
|
1288
|
-
readonly tooltipPlacement?: TooltipPlacement | undefined;
|
|
1289
|
-
readonly speechConfig?: SpeechConfig | undefined;
|
|
1290
|
-
readonly autoInsert?: boolean | undefined;
|
|
1291
|
-
readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
|
|
1292
|
-
readonly "onSpeech-start"?: (() => any) | undefined;
|
|
1293
|
-
readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
1294
|
-
readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
1295
|
-
readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
1296
|
-
readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
1297
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1298
|
-
$attrs: {
|
|
1299
|
-
[x: string]: unknown;
|
|
1300
|
-
};
|
|
1301
|
-
$refs: {
|
|
1302
|
-
[x: string]: unknown;
|
|
1303
|
-
};
|
|
1304
|
-
$slots: Readonly<{
|
|
1305
|
-
[name: string]: Slot<any> | undefined;
|
|
1306
|
-
}>;
|
|
1307
|
-
$root: ComponentPublicInstance | null;
|
|
1308
|
-
$parent: ComponentPublicInstance | null;
|
|
1309
|
-
$host: Element | null;
|
|
1310
|
-
$emit: ((event: "speech-start") => void) & ((event: "speech-interim", transcript: string) => void) & ((event: "speech-final", transcript: string) => void) & ((event: "speech-end", transcript?: string | undefined) => void) & ((event: "speech-error", error: Error) => void);
|
|
1311
|
-
$el: any;
|
|
1312
|
-
$options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
|
|
1313
|
-
"onSpeech-start"?: (() => any) | undefined;
|
|
1314
|
-
"onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
1315
|
-
"onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
1316
|
-
"onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
1317
|
-
"onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
1318
|
-
}>, {
|
|
1319
|
-
start: () => void;
|
|
1320
|
-
stop: () => void;
|
|
1321
|
-
speechState: SpeechState;
|
|
1322
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1323
|
-
"speech-start": () => any;
|
|
1324
|
-
"speech-interim": (transcript: string) => any;
|
|
1325
|
-
"speech-final": (transcript: string) => any;
|
|
1326
|
-
"speech-end": (transcript?: string | undefined) => any;
|
|
1327
|
-
"speech-error": (error: Error) => any;
|
|
1328
|
-
}, string, {
|
|
1329
|
-
tooltipPlacement: TooltipPlacement;
|
|
1330
|
-
autoInsert: boolean;
|
|
1331
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
1332
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
1333
|
-
created?: (() => void) | (() => void)[];
|
|
1334
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
1335
|
-
mounted?: (() => void) | (() => void)[];
|
|
1336
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
1337
|
-
updated?: (() => void) | (() => void)[];
|
|
1338
|
-
activated?: (() => void) | (() => void)[];
|
|
1339
|
-
deactivated?: (() => void) | (() => void)[];
|
|
1340
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
1341
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
1342
|
-
destroyed?: (() => void) | (() => void)[];
|
|
1343
|
-
unmounted?: (() => void) | (() => void)[];
|
|
1344
|
-
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1345
|
-
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1346
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
1347
|
-
};
|
|
1348
|
-
$forceUpdate: () => void;
|
|
1349
|
-
$nextTick: nextTick;
|
|
1350
|
-
$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;
|
|
1351
|
-
} & Readonly<{
|
|
1352
|
-
tooltipPlacement: TooltipPlacement;
|
|
1353
|
-
autoInsert: boolean;
|
|
1354
|
-
}> & Omit<Readonly<VoiceButtonProps> & Readonly<{
|
|
1355
|
-
"onSpeech-start"?: (() => any) | undefined;
|
|
1356
|
-
"onSpeech-interim"?: ((transcript: string) => any) | undefined;
|
|
1357
|
-
"onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
1358
|
-
"onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
1359
|
-
"onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
1360
|
-
}>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
|
|
1361
|
-
start: () => void;
|
|
1362
|
-
stop: () => void;
|
|
1363
|
-
speechState: SpeechState;
|
|
1364
|
-
}> & {} & ComponentCustomProperties & {} & {
|
|
1365
|
-
$slots: {
|
|
1366
|
-
icon?(_: {
|
|
1367
|
-
isRecording: boolean;
|
|
1368
|
-
}): any;
|
|
1369
|
-
'recording-overlay'?(_: {
|
|
1370
|
-
isRecording: boolean;
|
|
1371
|
-
stop: () => void;
|
|
1372
|
-
}): any;
|
|
1373
|
-
};
|
|
1374
|
-
}) | null;
|
|
901
|
+
senderRef: HTMLDivElement;
|
|
902
|
+
inputWrapperRef: HTMLDivElement;
|
|
903
|
+
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
904
|
+
modelValue?: UserItem[];
|
|
905
|
+
} & {
|
|
906
|
+
autoSize: boolean | {
|
|
907
|
+
minRows: number;
|
|
908
|
+
maxRows: number;
|
|
909
|
+
};
|
|
910
|
+
}> & Readonly<{
|
|
911
|
+
onSubmit?: (() => any) | undefined;
|
|
912
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
913
|
+
}>, {
|
|
914
|
+
clearHistory: () => void;
|
|
915
|
+
activateFirstField: () => void;
|
|
916
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
917
|
+
"update:modelValue": (value: UserItem[]) => any;
|
|
918
|
+
} & {
|
|
919
|
+
submit: () => any;
|
|
920
|
+
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
921
|
+
editorRef: HTMLDivElement;
|
|
922
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
923
|
+
P: {};
|
|
924
|
+
B: {};
|
|
925
|
+
D: {};
|
|
926
|
+
C: {};
|
|
927
|
+
M: {};
|
|
928
|
+
Defaults: {};
|
|
929
|
+
}, Readonly<{
|
|
930
|
+
modelValue?: UserItem[];
|
|
931
|
+
} & {
|
|
932
|
+
autoSize: boolean | {
|
|
933
|
+
minRows: number;
|
|
934
|
+
maxRows: number;
|
|
935
|
+
};
|
|
936
|
+
}> & Readonly<{
|
|
937
|
+
onSubmit?: (() => any) | undefined;
|
|
938
|
+
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
939
|
+
}>, {
|
|
940
|
+
clearHistory: () => void;
|
|
941
|
+
activateFirstField: () => void;
|
|
942
|
+
}, {}, {}, {}, {}> | null;
|
|
943
|
+
inputRef: any;
|
|
944
|
+
buttonsContainerRef: HTMLDivElement;
|
|
1375
945
|
};
|
|
1376
946
|
rootEl: HTMLDivElement;
|
|
1377
947
|
};
|
|
@@ -1395,10 +965,6 @@ declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
|
|
|
1395
965
|
|
|
1396
966
|
declare type __VLS_TemplateResult_14 = ReturnType<typeof __VLS_template_14>;
|
|
1397
967
|
|
|
1398
|
-
declare type __VLS_TemplateResult_15 = ReturnType<typeof __VLS_template_15>;
|
|
1399
|
-
|
|
1400
|
-
declare type __VLS_TemplateResult_16 = ReturnType<typeof __VLS_template_16>;
|
|
1401
|
-
|
|
1402
968
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
1403
969
|
|
|
1404
970
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
@@ -1451,18 +1017,6 @@ declare type __VLS_WithTemplateSlots_14<T, S> = T & {
|
|
|
1451
1017
|
};
|
|
1452
1018
|
};
|
|
1453
1019
|
|
|
1454
|
-
declare type __VLS_WithTemplateSlots_15<T, S> = T & {
|
|
1455
|
-
new (): {
|
|
1456
|
-
$slots: S;
|
|
1457
|
-
};
|
|
1458
|
-
};
|
|
1459
|
-
|
|
1460
|
-
declare type __VLS_WithTemplateSlots_16<T, S> = T & {
|
|
1461
|
-
new (): {
|
|
1462
|
-
$slots: S;
|
|
1463
|
-
};
|
|
1464
|
-
};
|
|
1465
|
-
|
|
1466
1020
|
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
1467
1021
|
new (): {
|
|
1468
1022
|
$slots: S;
|
|
@@ -1511,42 +1065,28 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
|
|
|
1511
1065
|
};
|
|
1512
1066
|
};
|
|
1513
1067
|
|
|
1514
|
-
declare interface
|
|
1068
|
+
export declare interface ActionButton {
|
|
1515
1069
|
type: string;
|
|
1516
1070
|
label: string;
|
|
1517
1071
|
handler?: (file: Attachment) => void;
|
|
1518
1072
|
}
|
|
1519
1073
|
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
*
|
|
1523
|
-
* 基础操作按钮的 Props
|
|
1524
|
-
*/
|
|
1525
|
-
export declare interface ActionButtonProps {
|
|
1526
|
-
/**
|
|
1527
|
-
* 按钮图标
|
|
1528
|
-
*/
|
|
1529
|
-
icon: VNode | Component;
|
|
1530
|
-
/**
|
|
1531
|
-
* 是否禁用
|
|
1532
|
-
*/
|
|
1074
|
+
export declare interface ActionButtonsProps {
|
|
1075
|
+
loading?: boolean;
|
|
1533
1076
|
disabled?: boolean;
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
* 按钮大小
|
|
1548
|
-
*/
|
|
1549
|
-
size?: string | number;
|
|
1077
|
+
showClear?: boolean;
|
|
1078
|
+
hasContent?: boolean;
|
|
1079
|
+
buttonGroup?: ButtonGroupConfig;
|
|
1080
|
+
allowSpeech?: boolean;
|
|
1081
|
+
speechStatus?: {
|
|
1082
|
+
isRecording: boolean;
|
|
1083
|
+
isSupported: boolean;
|
|
1084
|
+
};
|
|
1085
|
+
allowFiles?: boolean;
|
|
1086
|
+
submitType?: SubmitTrigger;
|
|
1087
|
+
showShortcuts?: boolean;
|
|
1088
|
+
isOverLimit?: boolean;
|
|
1089
|
+
stopText?: string;
|
|
1550
1090
|
}
|
|
1551
1091
|
|
|
1552
1092
|
export declare type AddType = 'form' | 'code';
|
|
@@ -1560,7 +1100,7 @@ export declare interface AttachmentListEmits {
|
|
|
1560
1100
|
(e: 'retry', file: Attachment): void;
|
|
1561
1101
|
(e: 'preview', event: MouseEvent, file: Attachment): void;
|
|
1562
1102
|
(e: 'action', payload: {
|
|
1563
|
-
action:
|
|
1103
|
+
action: ActionButton;
|
|
1564
1104
|
file: Attachment;
|
|
1565
1105
|
}): void;
|
|
1566
1106
|
}
|
|
@@ -1570,14 +1110,11 @@ export declare interface AttachmentListProps {
|
|
|
1570
1110
|
disabled?: boolean;
|
|
1571
1111
|
wrap?: boolean;
|
|
1572
1112
|
fileIcons?: Record<string, Component>;
|
|
1573
|
-
actions?:
|
|
1113
|
+
actions?: ActionButton[];
|
|
1574
1114
|
variant?: DisplayVariant;
|
|
1575
1115
|
fileMatchers?: FileTypeMatcher[];
|
|
1576
1116
|
}
|
|
1577
1117
|
|
|
1578
|
-
/**
|
|
1579
|
-
* 自动高度配置
|
|
1580
|
-
*/
|
|
1581
1118
|
export declare type AutoSize = boolean | {
|
|
1582
1119
|
minRows: number;
|
|
1583
1120
|
maxRows: number;
|
|
@@ -1595,7 +1132,13 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
|
|
|
1595
1132
|
|
|
1596
1133
|
export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
|
|
1597
1134
|
|
|
1598
|
-
declare
|
|
1135
|
+
declare interface BaseTextItem {
|
|
1136
|
+
id: string;
|
|
1137
|
+
type: string;
|
|
1138
|
+
content: string;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
declare const Bubble: typeof _default_18 & {
|
|
1599
1142
|
install: typeof bubbleInstall;
|
|
1600
1143
|
};
|
|
1601
1144
|
export { Bubble }
|
|
@@ -1643,7 +1186,7 @@ declare type BubbleGroupFunction = (messages: BubbleMessage[], dividerRole?: str
|
|
|
1643
1186
|
|
|
1644
1187
|
declare const bubbleInstall: (app: App) => void;
|
|
1645
1188
|
|
|
1646
|
-
declare const BubbleList: typeof
|
|
1189
|
+
declare const BubbleList: typeof _default_19 & {
|
|
1647
1190
|
install: typeof bubbleListInstall;
|
|
1648
1191
|
};
|
|
1649
1192
|
export { BubbleList }
|
|
@@ -1656,11 +1199,12 @@ export declare interface BubbleListProps {
|
|
|
1656
1199
|
/**
|
|
1657
1200
|
* 分组策略:
|
|
1658
1201
|
* - 'consecutive': 连续相同角色的消息合并为一组
|
|
1659
|
-
* - 'divider':
|
|
1202
|
+
* - 'divider': 按分割角色分组(连续的分割角色在一组,其他消息在另一组)
|
|
1660
1203
|
* - 自定义函数: (messages, dividerRole) => BubbleMessageGroup[]
|
|
1661
1204
|
*
|
|
1662
1205
|
* 特殊情况:
|
|
1663
|
-
* -
|
|
1206
|
+
* - 当 message 的 content 为数组时,且 message.role === 'user',该 message 会被单独作为一个独立分组
|
|
1207
|
+
* - 该独立分组会被"密封",后续的消息(即使角色相同)也不会被添加到这个分组中
|
|
1664
1208
|
*/
|
|
1665
1209
|
groupStrategy?: 'consecutive' | 'divider' | BubbleGroupFunction;
|
|
1666
1210
|
/**
|
|
@@ -1727,7 +1271,7 @@ export declare type BubbleProps = BubbleMessage & {
|
|
|
1727
1271
|
fallbackContentRenderer?: Component<BubbleContentRendererProps>;
|
|
1728
1272
|
};
|
|
1729
1273
|
|
|
1730
|
-
declare const BubbleProvider: typeof
|
|
1274
|
+
declare const BubbleProvider: typeof _default_20 & {
|
|
1731
1275
|
install: typeof bubbleProviderInstall;
|
|
1732
1276
|
};
|
|
1733
1277
|
export { BubbleProvider }
|
|
@@ -1874,7 +1418,7 @@ export declare interface BubbleSlots {
|
|
|
1874
1418
|
}) => VNode | VNode[];
|
|
1875
1419
|
}
|
|
1876
1420
|
|
|
1877
|
-
declare interface ButtonGroupConfig {
|
|
1421
|
+
export declare interface ButtonGroupConfig {
|
|
1878
1422
|
file?: ControlState & fileUploadConfig;
|
|
1879
1423
|
submit?: ControlState;
|
|
1880
1424
|
voice?: VoiceButtonConfig;
|
|
@@ -1905,18 +1449,6 @@ declare type ChatMessageWithOptionalRole<T extends ChatMessageContent = ChatMess
|
|
|
1905
1449
|
|
|
1906
1450
|
export declare type ColorMode = 'light' | 'dark' | 'auto';
|
|
1907
1451
|
|
|
1908
|
-
declare interface CompatTemplateItem {
|
|
1909
|
-
id: string;
|
|
1910
|
-
type: 'template' | 'block';
|
|
1911
|
-
content: string;
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
declare interface CompatTextItem {
|
|
1915
|
-
id: string;
|
|
1916
|
-
type: 'text';
|
|
1917
|
-
content: string;
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
1452
|
export declare interface ContainerEmits {
|
|
1921
1453
|
(e: 'close'): void;
|
|
1922
1454
|
}
|
|
@@ -1940,7 +1472,7 @@ export declare interface ContainerSlots {
|
|
|
1940
1472
|
footer: () => unknown;
|
|
1941
1473
|
}
|
|
1942
1474
|
|
|
1943
|
-
declare interface ControlState {
|
|
1475
|
+
export declare interface ControlState {
|
|
1944
1476
|
tooltips?: string | TooltipRender;
|
|
1945
1477
|
disabled?: boolean;
|
|
1946
1478
|
tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
@@ -1951,103 +1483,56 @@ declare const _default: {
|
|
|
1951
1483
|
};
|
|
1952
1484
|
export default _default;
|
|
1953
1485
|
|
|
1954
|
-
declare const _default_10: typeof
|
|
1486
|
+
declare const _default_10: typeof _default_30 & {
|
|
1955
1487
|
install: typeof install_9;
|
|
1956
1488
|
};
|
|
1957
|
-
export { _default_10 as
|
|
1958
|
-
export { _default_10 as
|
|
1489
|
+
export { _default_10 as Sender }
|
|
1490
|
+
export { _default_10 as TrSender }
|
|
1959
1491
|
|
|
1960
|
-
declare const _default_11: typeof
|
|
1492
|
+
declare const _default_11: typeof _default_32 & {
|
|
1961
1493
|
install: typeof install_10;
|
|
1962
1494
|
};
|
|
1963
1495
|
export { _default_11 as SuggestionPills }
|
|
1964
1496
|
export { _default_11 as TrSuggestionPills }
|
|
1965
1497
|
|
|
1966
|
-
declare const _default_12: typeof
|
|
1498
|
+
declare const _default_12: typeof _default_33 & {
|
|
1967
1499
|
install: typeof install_11;
|
|
1968
1500
|
};
|
|
1969
1501
|
export { _default_12 as SuggestionPopover }
|
|
1970
1502
|
export { _default_12 as TrSuggestionPopover }
|
|
1971
1503
|
|
|
1972
|
-
declare const _default_13: typeof
|
|
1504
|
+
declare const _default_13: typeof _default_34 & {
|
|
1973
1505
|
install: typeof install_12;
|
|
1974
1506
|
};
|
|
1975
1507
|
export { _default_13 as ThemeProvider }
|
|
1976
1508
|
export { _default_13 as TrThemeProvider }
|
|
1977
1509
|
|
|
1978
|
-
declare const _default_14: typeof
|
|
1510
|
+
declare const _default_14: typeof _default_35 & {
|
|
1979
1511
|
install: typeof install_13;
|
|
1980
1512
|
};
|
|
1981
1513
|
export { _default_14 as TrWelcome }
|
|
1982
1514
|
export { _default_14 as Welcome }
|
|
1983
1515
|
|
|
1984
|
-
declare const _default_15: typeof
|
|
1516
|
+
declare const _default_15: typeof _default_36 & {
|
|
1985
1517
|
install: typeof install_14;
|
|
1986
1518
|
};
|
|
1987
1519
|
export { _default_15 as McpServerPicker }
|
|
1988
1520
|
export { _default_15 as TrMcpServerPicker }
|
|
1989
1521
|
|
|
1990
|
-
declare const _default_16: typeof
|
|
1522
|
+
declare const _default_16: typeof _default_37 & {
|
|
1991
1523
|
install: typeof install_15;
|
|
1992
1524
|
};
|
|
1993
1525
|
export { _default_16 as McpAddForm }
|
|
1994
1526
|
export { _default_16 as TrMcpAddForm }
|
|
1995
1527
|
|
|
1996
|
-
declare const _default_17:
|
|
1997
|
-
export { _default_17 as ActionButton }
|
|
1998
|
-
export { _default_17 as TrActionButton }
|
|
1999
|
-
|
|
2000
|
-
declare const _default_18: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2001
|
-
export { _default_18 as SubmitButton }
|
|
2002
|
-
export { _default_18 as TrSubmitButton }
|
|
2003
|
-
|
|
2004
|
-
declare const _default_19: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2005
|
-
export { _default_19 as ClearButton }
|
|
2006
|
-
export { _default_19 as TrClearButton }
|
|
2007
|
-
|
|
2008
|
-
declare const _default_2: typeof _default_24 & {
|
|
2009
|
-
install: typeof install;
|
|
2010
|
-
};
|
|
2011
|
-
export { _default_2 as Attachments }
|
|
2012
|
-
export { _default_2 as TrAttachments }
|
|
2013
|
-
|
|
2014
|
-
declare const _default_20: DefineComponent<UploadButtonProps, {
|
|
2015
|
-
open: (localOptions?: Partial<UseFileDialogOptions>) => void;
|
|
2016
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2017
|
-
error: (error: Error, files?: File[] | undefined) => any;
|
|
2018
|
-
select: (files: File[]) => any;
|
|
2019
|
-
}, string, PublicProps, Readonly<UploadButtonProps> & Readonly<{
|
|
2020
|
-
onError?: ((error: Error, files?: File[] | undefined) => any) | undefined;
|
|
2021
|
-
onSelect?: ((files: File[]) => any) | undefined;
|
|
2022
|
-
}>, {
|
|
2023
|
-
reset: boolean;
|
|
2024
|
-
multiple: boolean;
|
|
2025
|
-
tooltipPlacement: TooltipPlacement;
|
|
2026
|
-
accept: string;
|
|
2027
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2028
|
-
export { _default_20 as TrUploadButton }
|
|
2029
|
-
export { _default_20 as UploadButton }
|
|
2030
|
-
|
|
2031
|
-
declare const _default_21: __VLS_WithTemplateSlots_16<typeof __VLS_component_16, __VLS_TemplateResult_16["slots"]>;
|
|
2032
|
-
export { _default_21 as TrVoiceButton }
|
|
2033
|
-
export { _default_21 as VoiceButton }
|
|
2034
|
-
|
|
2035
|
-
declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2036
|
-
export { _default_22 as TrWordCounter }
|
|
2037
|
-
export { _default_22 as WordCounter }
|
|
2038
|
-
|
|
2039
|
-
declare const _default_23: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2040
|
-
export { _default_23 as DefaultActionButtons }
|
|
2041
|
-
export { _default_23 as TrDefaultActionButtons }
|
|
2042
|
-
|
|
2043
|
-
declare const _default_24: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1528
|
+
declare const _default_17: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2044
1529
|
"update:items": (items: Attachment[]) => any;
|
|
2045
1530
|
remove: (file: Attachment) => any;
|
|
2046
1531
|
download: (event: MouseEvent, file: Attachment) => any;
|
|
2047
1532
|
retry: (file: Attachment) => any;
|
|
2048
1533
|
preview: (event: MouseEvent, file: Attachment) => any;
|
|
2049
1534
|
action: (payload: {
|
|
2050
|
-
action:
|
|
1535
|
+
action: ActionButton;
|
|
2051
1536
|
file: Attachment;
|
|
2052
1537
|
}) => any;
|
|
2053
1538
|
}, string, PublicProps, Readonly<AttachmentListProps> & Readonly<{
|
|
@@ -2057,36 +1542,36 @@ onDownload?: ((event: MouseEvent, file: Attachment) => any) | undefined;
|
|
|
2057
1542
|
onRetry?: ((file: Attachment) => any) | undefined;
|
|
2058
1543
|
onPreview?: ((event: MouseEvent, file: Attachment) => any) | undefined;
|
|
2059
1544
|
onAction?: ((payload: {
|
|
2060
|
-
action:
|
|
1545
|
+
action: ActionButton;
|
|
2061
1546
|
file: Attachment;
|
|
2062
1547
|
}) => any) | undefined;
|
|
2063
1548
|
}>, {
|
|
2064
|
-
actions:
|
|
1549
|
+
actions: ActionButton[];
|
|
2065
1550
|
fileMatchers: FileTypeMatcher[];
|
|
2066
1551
|
variant: DisplayVariant;
|
|
2067
1552
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2068
1553
|
|
|
2069
|
-
declare const
|
|
1554
|
+
declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2070
1555
|
|
|
2071
|
-
declare const
|
|
1556
|
+
declare const _default_19: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
2072
1557
|
|
|
2073
|
-
declare const
|
|
1558
|
+
declare const _default_2: typeof _default_17 & {
|
|
1559
|
+
install: typeof install;
|
|
1560
|
+
};
|
|
1561
|
+
export { _default_2 as Attachments }
|
|
1562
|
+
export { _default_2 as TrAttachments }
|
|
2074
1563
|
|
|
2075
|
-
declare const
|
|
1564
|
+
declare const _default_20: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
2076
1565
|
|
|
2077
|
-
declare const
|
|
1566
|
+
declare const _default_21: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
2078
1567
|
|
|
2079
|
-
declare const
|
|
2080
|
-
install: typeof install_2;
|
|
2081
|
-
};
|
|
2082
|
-
export { _default_3 as Container }
|
|
2083
|
-
export { _default_3 as TrContainer }
|
|
1568
|
+
declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2084
1569
|
|
|
2085
|
-
declare const
|
|
1570
|
+
declare const _default_23: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
2086
1571
|
|
|
2087
|
-
declare const
|
|
1572
|
+
declare const _default_24: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
2088
1573
|
|
|
2089
|
-
declare const
|
|
1574
|
+
declare const _default_25: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2090
1575
|
action: (name: string) => any;
|
|
2091
1576
|
operation: (name: string) => any;
|
|
2092
1577
|
}, string, PublicProps, Readonly<FeedbackProps> & Readonly<{
|
|
@@ -2098,7 +1583,7 @@ actionsLimit: number;
|
|
|
2098
1583
|
sourcesLinesLimit: number;
|
|
2099
1584
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2100
1585
|
|
|
2101
|
-
declare const
|
|
1586
|
+
declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2102
1587
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
2103
1588
|
readonly "onItem-click"?: ((item: T) => any) | undefined;
|
|
2104
1589
|
readonly "onItem-title-change"?: ((newTitle: string, item: T) => any) | undefined;
|
|
@@ -2112,38 +1597,38 @@ declare const _default_33: <T extends HistoryItem>(__VLS_props: NonNullable<Awai
|
|
|
2112
1597
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
2113
1598
|
};
|
|
2114
1599
|
|
|
2115
|
-
declare const
|
|
1600
|
+
declare const _default_27: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
|
|
2116
1601
|
size: string | number;
|
|
2117
1602
|
svgSize: string | number;
|
|
2118
1603
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
2119
1604
|
|
|
2120
|
-
declare const
|
|
1605
|
+
declare const _default_28: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
|
|
2121
1606
|
size: "small" | "medium" | "large";
|
|
2122
1607
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2123
1608
|
|
|
2124
|
-
declare const
|
|
1609
|
+
declare const _default_29: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
|
|
2125
1610
|
|
|
2126
|
-
declare const
|
|
1611
|
+
declare const _default_3: typeof _default_21 & {
|
|
1612
|
+
install: typeof install_2;
|
|
1613
|
+
};
|
|
1614
|
+
export { _default_3 as Container }
|
|
1615
|
+
export { _default_3 as TrContainer }
|
|
2127
1616
|
|
|
2128
|
-
declare const
|
|
1617
|
+
declare const _default_30: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
|
2129
1618
|
|
|
2130
|
-
declare const
|
|
1619
|
+
declare const _default_31: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
|
|
2131
1620
|
|
|
2132
|
-
declare const
|
|
2133
|
-
install: typeof install_3;
|
|
2134
|
-
};
|
|
2135
|
-
export { _default_4 as Conversations }
|
|
2136
|
-
export { _default_4 as TrConversations }
|
|
1621
|
+
declare const _default_32: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
|
|
2137
1622
|
|
|
2138
|
-
declare const
|
|
1623
|
+
declare const _default_33: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
|
|
2139
1624
|
|
|
2140
|
-
declare const
|
|
1625
|
+
declare const _default_34: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
|
|
2141
1626
|
|
|
2142
|
-
declare const
|
|
1627
|
+
declare const _default_35: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
|
|
2143
1628
|
|
|
2144
|
-
declare const
|
|
1629
|
+
declare const _default_36: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
|
|
2145
1630
|
|
|
2146
|
-
declare const
|
|
1631
|
+
declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2147
1632
|
cancel: () => any;
|
|
2148
1633
|
confirm: (type: AddType, data: string | McpAddFormData) => any;
|
|
2149
1634
|
"update:addType": (value: AddType) => any;
|
|
@@ -2155,90 +1640,42 @@ onConfirm?: ((type: AddType, data: string | McpAddFormData) => any) | undefined;
|
|
|
2155
1640
|
addType: AddType;
|
|
2156
1641
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2157
1642
|
|
|
2158
|
-
declare const
|
|
1643
|
+
declare const _default_4: typeof _default_22 & {
|
|
1644
|
+
install: typeof install_3;
|
|
1645
|
+
};
|
|
1646
|
+
export { _default_4 as Conversations }
|
|
1647
|
+
export { _default_4 as TrConversations }
|
|
1648
|
+
|
|
1649
|
+
declare const _default_5: typeof _default_23 & {
|
|
2159
1650
|
install: typeof install_4;
|
|
2160
1651
|
};
|
|
2161
1652
|
export { _default_5 as DragOverlay }
|
|
2162
1653
|
export { _default_5 as TrDragOverlay }
|
|
2163
1654
|
|
|
2164
|
-
declare const _default_6: typeof
|
|
1655
|
+
declare const _default_6: typeof _default_24 & {
|
|
2165
1656
|
install: typeof install_5;
|
|
2166
1657
|
};
|
|
2167
1658
|
export { _default_6 as DropdownMenu }
|
|
2168
1659
|
export { _default_6 as TrDropdownMenu }
|
|
2169
1660
|
|
|
2170
|
-
declare const _default_7: typeof
|
|
1661
|
+
declare const _default_7: typeof _default_25 & {
|
|
2171
1662
|
install: typeof install_6;
|
|
2172
1663
|
};
|
|
2173
1664
|
export { _default_7 as Feedback }
|
|
2174
1665
|
export { _default_7 as TrFeedback }
|
|
2175
1666
|
|
|
2176
|
-
declare const _default_8: typeof
|
|
1667
|
+
declare const _default_8: typeof _default_26 & {
|
|
2177
1668
|
install: typeof install_7;
|
|
2178
1669
|
};
|
|
2179
1670
|
export { _default_8 as History }
|
|
2180
1671
|
export { _default_8 as TrHistory }
|
|
2181
1672
|
|
|
2182
|
-
declare const _default_9: typeof
|
|
1673
|
+
declare const _default_9: typeof _default_27 & {
|
|
2183
1674
|
install: typeof install_8;
|
|
2184
1675
|
};
|
|
2185
1676
|
export { _default_9 as IconButton }
|
|
2186
1677
|
export { _default_9 as TrIconButton }
|
|
2187
1678
|
|
|
2188
|
-
/**
|
|
2189
|
-
* 默认操作按钮配置
|
|
2190
|
-
*
|
|
2191
|
-
* 用于统一配置 Sender 的默认按钮(Clear、Submit)
|
|
2192
|
-
*
|
|
2193
|
-
* @example
|
|
2194
|
-
* ```typescript
|
|
2195
|
-
* const defaultActions = {
|
|
2196
|
-
* submit: { disabled: !isValid, tooltip: '请完善表单' },
|
|
2197
|
-
* clear: { tooltip: '清空内容' }
|
|
2198
|
-
* }
|
|
2199
|
-
* ```
|
|
2200
|
-
*/
|
|
2201
|
-
export declare interface DefaultActions {
|
|
2202
|
-
/**
|
|
2203
|
-
* 提交按钮配置
|
|
2204
|
-
*/
|
|
2205
|
-
submit?: {
|
|
2206
|
-
/**
|
|
2207
|
-
* 是否禁用
|
|
2208
|
-
*/
|
|
2209
|
-
disabled?: boolean;
|
|
2210
|
-
/**
|
|
2211
|
-
* 工具提示
|
|
2212
|
-
* - string: 简单文本
|
|
2213
|
-
* - () => string | VNode: 渲染函数,支持复杂内容
|
|
2214
|
-
*/
|
|
2215
|
-
tooltip?: TooltipContent;
|
|
2216
|
-
/**
|
|
2217
|
-
* Tooltip 位置
|
|
2218
|
-
*/
|
|
2219
|
-
tooltipPlacement?: TooltipPlacement;
|
|
2220
|
-
};
|
|
2221
|
-
/**
|
|
2222
|
-
* 清空按钮配置
|
|
2223
|
-
*/
|
|
2224
|
-
clear?: {
|
|
2225
|
-
/**
|
|
2226
|
-
* 是否禁用
|
|
2227
|
-
*/
|
|
2228
|
-
disabled?: boolean;
|
|
2229
|
-
/**
|
|
2230
|
-
* 工具提示
|
|
2231
|
-
* - string: 简单文本
|
|
2232
|
-
* - () => string | VNode: 渲染函数,支持复杂内容
|
|
2233
|
-
*/
|
|
2234
|
-
tooltip?: TooltipContent;
|
|
2235
|
-
/**
|
|
2236
|
-
* Tooltip 位置
|
|
2237
|
-
*/
|
|
2238
|
-
tooltipPlacement?: TooltipPlacement;
|
|
2239
|
-
};
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
1679
|
export declare type DisplayVariant = 'picture' | 'card' | 'auto';
|
|
2243
1680
|
|
|
2244
1681
|
declare interface DragAwareElement extends HTMLElement {
|
|
@@ -2401,23 +1838,6 @@ export declare interface DropzoneBinding {
|
|
|
2401
1838
|
onDraggingChange: (dragging: boolean, element: HTMLElement | null) => void;
|
|
2402
1839
|
}
|
|
2403
1840
|
|
|
2404
|
-
/**
|
|
2405
|
-
* 移动端虚拟键盘回车键提示
|
|
2406
|
-
*
|
|
2407
|
-
* 用于自定义移动端虚拟键盘上回车键的显示文本或图标
|
|
2408
|
-
*
|
|
2409
|
-
* - `enter`: 插入换行
|
|
2410
|
-
* - `done`: 完成
|
|
2411
|
-
* - `go`: 前往
|
|
2412
|
-
* - `next`: 下一项
|
|
2413
|
-
* - `previous`: 上一项
|
|
2414
|
-
* - `search`: 搜索
|
|
2415
|
-
* - `send`: 发送(推荐用于聊天场景)
|
|
2416
|
-
*
|
|
2417
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
|
|
2418
|
-
*/
|
|
2419
|
-
export declare type EnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
2420
|
-
|
|
2421
1841
|
export declare interface FeedbackEvents {
|
|
2422
1842
|
(e: 'operation', name: string): void;
|
|
2423
1843
|
(e: 'action', name: string): void;
|
|
@@ -2450,7 +1870,7 @@ export declare interface FileCardEmits {
|
|
|
2450
1870
|
(e: 'download', event: MouseEvent, file: Attachment): void;
|
|
2451
1871
|
(e: 'retry', file: Attachment): void;
|
|
2452
1872
|
(e: 'action', payload: {
|
|
2453
|
-
action:
|
|
1873
|
+
action: ActionButton;
|
|
2454
1874
|
file: Attachment;
|
|
2455
1875
|
}): void;
|
|
2456
1876
|
}
|
|
@@ -2491,16 +1911,7 @@ export declare interface Handlers {
|
|
|
2491
1911
|
handleDrop: (e: DragEvent) => void;
|
|
2492
1912
|
}
|
|
2493
1913
|
|
|
2494
|
-
|
|
2495
|
-
* 高亮函数类型
|
|
2496
|
-
*
|
|
2497
|
-
* @param suggestionText - 建议项文本
|
|
2498
|
-
* @param inputText - 用户输入文本
|
|
2499
|
-
* @returns 包含文本片段和匹配状态的数组
|
|
2500
|
-
*/
|
|
2501
|
-
export declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
|
|
2502
|
-
|
|
2503
|
-
declare type HighlightFunction_2 = (suggestionText: string, inputText: string) => SuggestionTextPart_2[];
|
|
1914
|
+
declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
|
|
2504
1915
|
|
|
2505
1916
|
export declare type HistoryData<T extends HistoryItem> = T[] | HistoryGroup<T>[];
|
|
2506
1917
|
|
|
@@ -2547,11 +1958,12 @@ export declare interface IconButtonProps {
|
|
|
2547
1958
|
rounded?: boolean;
|
|
2548
1959
|
}
|
|
2549
1960
|
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
1961
|
+
export declare interface InputHandler {
|
|
1962
|
+
inputValue: Ref<string>;
|
|
1963
|
+
isComposing: Ref<boolean>;
|
|
1964
|
+
clearInput: () => void;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
2555
1967
|
export declare type InputMode = 'single' | 'multiple';
|
|
2556
1968
|
|
|
2557
1969
|
declare const install: <T>(app: App<T>) => void;
|
|
@@ -2590,18 +2002,14 @@ declare const installPrompt: <T>(app: App<T>) => void;
|
|
|
2590
2002
|
|
|
2591
2003
|
declare const installPrompts: <T>(app: App<T>) => void;
|
|
2592
2004
|
|
|
2593
|
-
declare interface ISuggestionItem {
|
|
2005
|
+
export declare interface ISuggestionItem {
|
|
2594
2006
|
content: string;
|
|
2595
|
-
highlights?: string[] |
|
|
2007
|
+
highlights?: string[] | HighlightFunction;
|
|
2596
2008
|
}
|
|
2597
2009
|
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
export declare interface KeyboardHandlers {
|
|
2602
|
-
checkSubmitShortcut: (event: KeyboardEvent) => boolean;
|
|
2603
|
-
checkNewlineShortcut: (event: KeyboardEvent) => boolean;
|
|
2604
|
-
submit: () => void;
|
|
2010
|
+
export declare interface KeyboardHandler {
|
|
2011
|
+
handleKeyPress: (e: KeyboardEvent) => void;
|
|
2012
|
+
triggerSubmit: () => void;
|
|
2605
2013
|
}
|
|
2606
2014
|
|
|
2607
2015
|
export declare interface MarketCategoryOption {
|
|
@@ -2672,86 +2080,6 @@ export declare interface McpServerPickerProps {
|
|
|
2672
2080
|
marketLoading?: boolean;
|
|
2673
2081
|
}
|
|
2674
2082
|
|
|
2675
|
-
/**
|
|
2676
|
-
* 创建 Mention 扩展的便捷函数
|
|
2677
|
-
*
|
|
2678
|
-
* @param items - 提及项列表
|
|
2679
|
-
* @param char - 触发字符,默认 '@'
|
|
2680
|
-
* @param options - 其他配置项
|
|
2681
|
-
*
|
|
2682
|
-
* @example
|
|
2683
|
-
* ```typescript
|
|
2684
|
-
* const extensions = [mention(items)]
|
|
2685
|
-
* const extensions = [mention(items, '#')]
|
|
2686
|
-
* const extensions = [mention(items, '@', { allowSpaces: true })]
|
|
2687
|
-
* ```
|
|
2688
|
-
*/
|
|
2689
|
-
declare function mention(items: MentionItem[] | Ref<MentionItem[]>, char?: string, options?: Partial<Omit<MentionOptions, 'items' | 'char'>>): Node_2<MentionOptions, any>;
|
|
2690
|
-
|
|
2691
|
-
/**
|
|
2692
|
-
* 提及项数据结构(用户侧)
|
|
2693
|
-
*
|
|
2694
|
-
* 用户传入的数据格式,id 可选,插件会自动生成
|
|
2695
|
-
*/
|
|
2696
|
-
export declare interface MentionItem {
|
|
2697
|
-
/**
|
|
2698
|
-
* 唯一标识(可选)
|
|
2699
|
-
*
|
|
2700
|
-
* 如果不提供,插件会自动生成
|
|
2701
|
-
*/
|
|
2702
|
-
id?: string;
|
|
2703
|
-
/**
|
|
2704
|
-
* 显示名称,如 "小小画家"(必传)
|
|
2705
|
-
*/
|
|
2706
|
-
label: string;
|
|
2707
|
-
/**
|
|
2708
|
-
* 关联值(必传)
|
|
2709
|
-
*
|
|
2710
|
-
* 可以是任意字符串值,如 AI 提示词、用户 ID、标签内容等
|
|
2711
|
-
*/
|
|
2712
|
-
value: string;
|
|
2713
|
-
/**
|
|
2714
|
-
* 图标(可选)
|
|
2715
|
-
*/
|
|
2716
|
-
icon?: string;
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
/**
|
|
2720
|
-
* Mention 配置选项
|
|
2721
|
-
*/
|
|
2722
|
-
declare interface MentionOptions {
|
|
2723
|
-
/**
|
|
2724
|
-
* 提及项列表
|
|
2725
|
-
*/
|
|
2726
|
-
items: MentionItem[] | Ref<MentionItem[]>;
|
|
2727
|
-
/**
|
|
2728
|
-
* 触发字符,默认 '@'
|
|
2729
|
-
*/
|
|
2730
|
-
char: string;
|
|
2731
|
-
/**
|
|
2732
|
-
* 是否允许空格,默认 false
|
|
2733
|
-
*/
|
|
2734
|
-
allowSpaces?: boolean;
|
|
2735
|
-
/**
|
|
2736
|
-
* HTML 属性
|
|
2737
|
-
*/
|
|
2738
|
-
HTMLAttributes?: Record<string, unknown>;
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
/**
|
|
2742
|
-
* 结构化数据项(提交时返回)
|
|
2743
|
-
*
|
|
2744
|
-
* 用于表示文本和 mention 的混合结构
|
|
2745
|
-
*/
|
|
2746
|
-
declare type MentionStructuredItem = {
|
|
2747
|
-
type: 'text';
|
|
2748
|
-
content: string;
|
|
2749
|
-
} | {
|
|
2750
|
-
type: 'mention';
|
|
2751
|
-
content: string;
|
|
2752
|
-
value: string;
|
|
2753
|
-
};
|
|
2754
|
-
|
|
2755
2083
|
export declare type PluginAddState = 'idle' | 'loading' | 'added';
|
|
2756
2084
|
|
|
2757
2085
|
export declare interface PluginCardEmits {
|
|
@@ -2817,7 +2145,7 @@ export declare interface PopupConfig {
|
|
|
2817
2145
|
};
|
|
2818
2146
|
}
|
|
2819
2147
|
|
|
2820
|
-
declare const Prompt: typeof
|
|
2148
|
+
declare const Prompt: typeof _default_28 & {
|
|
2821
2149
|
install: typeof installPrompt;
|
|
2822
2150
|
};
|
|
2823
2151
|
export { Prompt }
|
|
@@ -2854,7 +2182,7 @@ export declare interface PromptProps {
|
|
|
2854
2182
|
size?: 'small' | 'medium' | 'large';
|
|
2855
2183
|
}
|
|
2856
2184
|
|
|
2857
|
-
declare const Prompts: typeof
|
|
2185
|
+
declare const Prompts: typeof _default_29 & {
|
|
2858
2186
|
install: typeof installPrompts;
|
|
2859
2187
|
};
|
|
2860
2188
|
export { Prompts }
|
|
@@ -2905,533 +2233,25 @@ export declare interface RejectionReason {
|
|
|
2905
2233
|
message: string;
|
|
2906
2234
|
}
|
|
2907
2235
|
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
}
|
|
2925
|
-
|
|
2926
|
-
declare const Sender: {
|
|
2927
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<SenderProps> & Readonly<{
|
|
2928
|
-
onClear?: (() => any) | undefined;
|
|
2929
|
-
onInput?: ((value: string) => any) | undefined;
|
|
2930
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
2931
|
-
onCancel?: (() => any) | undefined;
|
|
2932
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
2933
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
2934
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
2935
|
-
}>, {
|
|
2936
|
-
submit: () => void;
|
|
2937
|
-
clear: () => void;
|
|
2938
|
-
cancel: () => void;
|
|
2939
|
-
focus: () => void;
|
|
2940
|
-
blur: () => void;
|
|
2941
|
-
setContent: (content: string) => void;
|
|
2942
|
-
getContent: () => string;
|
|
2943
|
-
editor: SenderContext["editor"];
|
|
2944
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2945
|
-
clear: () => any;
|
|
2946
|
-
input: (value: string) => any;
|
|
2947
|
-
blur: (event: FocusEvent) => any;
|
|
2948
|
-
cancel: () => any;
|
|
2949
|
-
focus: (event: FocusEvent) => any;
|
|
2950
|
-
submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
|
|
2951
|
-
"update:modelValue": (value: string) => any;
|
|
2952
|
-
}, PublicProps, {
|
|
2953
|
-
size: "normal" | "small";
|
|
2954
|
-
placeholder: string;
|
|
2955
|
-
mode: InputMode;
|
|
2956
|
-
enterkeyhint: EnterKeyHint;
|
|
2957
|
-
autoSize: AutoSize;
|
|
2958
|
-
extensions: Extension[] | any[];
|
|
2959
|
-
submitType: SubmitTrigger;
|
|
2960
|
-
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
2961
|
-
P: {};
|
|
2962
|
-
B: {};
|
|
2963
|
-
D: {};
|
|
2964
|
-
C: {};
|
|
2965
|
-
M: {};
|
|
2966
|
-
Defaults: {};
|
|
2967
|
-
}, Readonly<SenderProps> & Readonly<{
|
|
2968
|
-
onClear?: (() => any) | undefined;
|
|
2969
|
-
onInput?: ((value: string) => any) | undefined;
|
|
2970
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
2971
|
-
onCancel?: (() => any) | undefined;
|
|
2972
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
2973
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
2974
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
2975
|
-
}>, {
|
|
2976
|
-
submit: () => void;
|
|
2977
|
-
clear: () => void;
|
|
2978
|
-
cancel: () => void;
|
|
2979
|
-
focus: () => void;
|
|
2980
|
-
blur: () => void;
|
|
2981
|
-
setContent: (content: string) => void;
|
|
2982
|
-
getContent: () => string;
|
|
2983
|
-
editor: SenderContext["editor"];
|
|
2984
|
-
}, {}, {}, {}, {
|
|
2985
|
-
size: "normal" | "small";
|
|
2986
|
-
placeholder: string;
|
|
2987
|
-
mode: InputMode;
|
|
2988
|
-
enterkeyhint: EnterKeyHint;
|
|
2989
|
-
autoSize: AutoSize;
|
|
2990
|
-
extensions: Extension[] | any[];
|
|
2991
|
-
submitType: SubmitTrigger;
|
|
2992
|
-
}>;
|
|
2993
|
-
__isFragment?: never;
|
|
2994
|
-
__isTeleport?: never;
|
|
2995
|
-
__isSuspense?: never;
|
|
2996
|
-
} & ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
|
|
2997
|
-
onClear?: (() => any) | undefined;
|
|
2998
|
-
onInput?: ((value: string) => any) | undefined;
|
|
2999
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
3000
|
-
onCancel?: (() => any) | undefined;
|
|
3001
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
3002
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
3003
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
3004
|
-
}>, {
|
|
3005
|
-
submit: () => void;
|
|
3006
|
-
clear: () => void;
|
|
3007
|
-
cancel: () => void;
|
|
3008
|
-
focus: () => void;
|
|
3009
|
-
blur: () => void;
|
|
3010
|
-
setContent: (content: string) => void;
|
|
3011
|
-
getContent: () => string;
|
|
3012
|
-
editor: SenderContext["editor"];
|
|
3013
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
3014
|
-
clear: () => any;
|
|
3015
|
-
input: (value: string) => any;
|
|
3016
|
-
blur: (event: FocusEvent) => any;
|
|
3017
|
-
cancel: () => any;
|
|
3018
|
-
focus: (event: FocusEvent) => any;
|
|
3019
|
-
submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
|
|
3020
|
-
"update:modelValue": (value: string) => any;
|
|
3021
|
-
}, string, {
|
|
3022
|
-
size: "normal" | "small";
|
|
3023
|
-
placeholder: string;
|
|
3024
|
-
mode: InputMode;
|
|
3025
|
-
enterkeyhint: EnterKeyHint;
|
|
3026
|
-
autoSize: AutoSize;
|
|
3027
|
-
extensions: Extension[] | any[];
|
|
3028
|
-
submitType: SubmitTrigger;
|
|
3029
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
3030
|
-
$slots: {
|
|
3031
|
-
header?(_: {}): any;
|
|
3032
|
-
header?(_: {}): any;
|
|
3033
|
-
prefix?(_: {}): any;
|
|
3034
|
-
prefix?(_: {}): any;
|
|
3035
|
-
content?(_: {
|
|
3036
|
-
editor: Editor | undefined;
|
|
3037
|
-
}): any;
|
|
3038
|
-
content?(_: {
|
|
3039
|
-
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
3040
|
-
}): any;
|
|
3041
|
-
'actions-inline'?(_: {}): any;
|
|
3042
|
-
footer?(_: {}): any;
|
|
3043
|
-
'footer-right'?(_: {}): any;
|
|
3044
|
-
};
|
|
3045
|
-
}) & {
|
|
3046
|
-
install: <T>(app: App<T>) => void;
|
|
3047
|
-
Mention: Node_2<MentionOptions, any>;
|
|
3048
|
-
Suggestion: Extension<SuggestionOptions, any>;
|
|
3049
|
-
Template: Extension<TemplateOptions, any>;
|
|
3050
|
-
mention: typeof mention;
|
|
3051
|
-
suggestion: typeof suggestion;
|
|
3052
|
-
template: typeof template;
|
|
2236
|
+
export declare type SenderEmits = {
|
|
2237
|
+
(e: 'update:modelValue', value: string): void;
|
|
2238
|
+
(e: 'update:templateData', value: UserItem[]): void;
|
|
2239
|
+
(e: 'submit', value: string): void;
|
|
2240
|
+
(e: 'clear'): void;
|
|
2241
|
+
(e: 'speech-start'): void;
|
|
2242
|
+
(e: 'speech-end', transcript?: string): void;
|
|
2243
|
+
(e: 'speech-interim', transcript: string): void;
|
|
2244
|
+
(e: 'speech-error', error: Error): void;
|
|
2245
|
+
(e: 'suggestion-select', value: string): void;
|
|
2246
|
+
(e: 'focus', event: FocusEvent): void;
|
|
2247
|
+
(e: 'blur', event: FocusEvent): void;
|
|
2248
|
+
(e: 'escape-press'): void;
|
|
2249
|
+
(e: 'cancel'): void;
|
|
2250
|
+
(e: 'reset-template'): void;
|
|
2251
|
+
(e: 'files-selected', files: File[]): void;
|
|
3053
2252
|
};
|
|
3054
|
-
export { Sender }
|
|
3055
|
-
export { Sender as TrSender }
|
|
3056
|
-
|
|
3057
|
-
/**
|
|
3058
|
-
* Context Key
|
|
3059
|
-
*
|
|
3060
|
-
* 用于 provide/inject 的 key
|
|
3061
|
-
*/
|
|
3062
|
-
export declare const SENDER_CONTEXT_KEY: unique symbol;
|
|
3063
2253
|
|
|
3064
|
-
/**
|
|
3065
|
-
* Sender Context
|
|
3066
|
-
*
|
|
3067
|
-
* 通过 provide/inject 在组件树中共享的状态和方法
|
|
3068
|
-
* 所有子组件都可以通过 inject 获取
|
|
3069
|
-
*/
|
|
3070
|
-
export declare interface SenderContext {
|
|
3071
|
-
/**
|
|
3072
|
-
* Tiptap 编辑器实例
|
|
3073
|
-
* 注意:Tiptap 的 useEditor 返回 ShallowRef<Editor | undefined>
|
|
3074
|
-
*/
|
|
3075
|
-
editor: Ref<Editor | undefined>;
|
|
3076
|
-
/**
|
|
3077
|
-
* 编辑器 DOM 引用
|
|
3078
|
-
*/
|
|
3079
|
-
editorRef: Ref<HTMLElement | null>;
|
|
3080
|
-
/**
|
|
3081
|
-
* 当前输入模式
|
|
3082
|
-
*/
|
|
3083
|
-
mode: Ref<InputMode>;
|
|
3084
|
-
/**
|
|
3085
|
-
* 是否正在自动切换模式
|
|
3086
|
-
* 用于控制切换时的过渡动画
|
|
3087
|
-
*/
|
|
3088
|
-
isAutoSwitching: Ref<boolean>;
|
|
3089
|
-
/**
|
|
3090
|
-
* 是否加载中
|
|
3091
|
-
*/
|
|
3092
|
-
loading: Ref<boolean>;
|
|
3093
|
-
/**
|
|
3094
|
-
* 是否禁用
|
|
3095
|
-
*/
|
|
3096
|
-
disabled: Ref<boolean>;
|
|
3097
|
-
/**
|
|
3098
|
-
* 是否有内容
|
|
3099
|
-
*/
|
|
3100
|
-
hasContent: Ref<boolean>;
|
|
3101
|
-
/**
|
|
3102
|
-
* 是否可以提交
|
|
3103
|
-
*
|
|
3104
|
-
* 综合判断:
|
|
3105
|
-
* - !disabled
|
|
3106
|
-
* - !loading
|
|
3107
|
-
* - hasContent
|
|
3108
|
-
* - !isOverLimit
|
|
3109
|
-
* - !defaultActions.submit?.disabled
|
|
3110
|
-
*/
|
|
3111
|
-
canSubmit: Ref<boolean>;
|
|
3112
|
-
/**
|
|
3113
|
-
* 是否超出字数限制
|
|
3114
|
-
*/
|
|
3115
|
-
isOverLimit: Ref<boolean>;
|
|
3116
|
-
/**
|
|
3117
|
-
* 当前字符数
|
|
3118
|
-
*/
|
|
3119
|
-
characterCount: Ref<number>;
|
|
3120
|
-
/**
|
|
3121
|
-
* 最大字符数限制
|
|
3122
|
-
*/
|
|
3123
|
-
maxLength: Ref<number | undefined>;
|
|
3124
|
-
/**
|
|
3125
|
-
* 组件的尺寸
|
|
3126
|
-
*/
|
|
3127
|
-
size: Ref<'small' | 'normal'>;
|
|
3128
|
-
/**
|
|
3129
|
-
* 是否显示字数限制
|
|
3130
|
-
*/
|
|
3131
|
-
showWordLimit: Ref<boolean>;
|
|
3132
|
-
/**
|
|
3133
|
-
* 是否显示清空按钮
|
|
3134
|
-
*/
|
|
3135
|
-
clearable: Ref<boolean>;
|
|
3136
|
-
/**
|
|
3137
|
-
* 默认操作按钮配置
|
|
3138
|
-
*/
|
|
3139
|
-
defaultActions: Ref<DefaultActions | undefined>;
|
|
3140
|
-
/**
|
|
3141
|
-
* 提交触发方式
|
|
3142
|
-
*/
|
|
3143
|
-
submitType: Ref<SubmitTrigger>;
|
|
3144
|
-
/**
|
|
3145
|
-
* 停止按钮文字
|
|
3146
|
-
*/
|
|
3147
|
-
stopText: Ref<string | undefined>;
|
|
3148
|
-
/**
|
|
3149
|
-
* 提交内容
|
|
3150
|
-
*/
|
|
3151
|
-
submit: () => void;
|
|
3152
|
-
/**
|
|
3153
|
-
* 清空内容
|
|
3154
|
-
*/
|
|
3155
|
-
clear: () => void;
|
|
3156
|
-
/**
|
|
3157
|
-
* 取消操作
|
|
3158
|
-
*
|
|
3159
|
-
* 在 loading 状态下触发,用于取消正在进行的操作
|
|
3160
|
-
*/
|
|
3161
|
-
cancel: () => void;
|
|
3162
|
-
/**
|
|
3163
|
-
* 聚焦编辑器
|
|
3164
|
-
*/
|
|
3165
|
-
focus: () => void;
|
|
3166
|
-
/**
|
|
3167
|
-
* 失焦编辑器
|
|
3168
|
-
*/
|
|
3169
|
-
blur: () => void;
|
|
3170
|
-
/**
|
|
3171
|
-
* 设置编辑器内容
|
|
3172
|
-
*
|
|
3173
|
-
* @param content - 内容(HTML 或 JSON)
|
|
3174
|
-
*/
|
|
3175
|
-
setContent: (content: string) => void;
|
|
3176
|
-
/**
|
|
3177
|
-
* 获取编辑器内容
|
|
3178
|
-
*
|
|
3179
|
-
* @returns 内容(HTML)
|
|
3180
|
-
*/
|
|
3181
|
-
getContent: () => string;
|
|
3182
|
-
}
|
|
3183
|
-
|
|
3184
|
-
/**
|
|
3185
|
-
* Sender 组件 Emits
|
|
3186
|
-
*/
|
|
3187
|
-
export declare interface SenderEmits {
|
|
3188
|
-
/**
|
|
3189
|
-
* 更新输入内容
|
|
3190
|
-
*
|
|
3191
|
-
* @param e - 事件名
|
|
3192
|
-
* @param value - 新内容
|
|
3193
|
-
*/
|
|
3194
|
-
(e: 'update:modelValue', value: string): void;
|
|
3195
|
-
/**
|
|
3196
|
-
* 提交内容(增强版)
|
|
3197
|
-
*
|
|
3198
|
-
* @param e - 事件名
|
|
3199
|
-
* @param textContent - 提交的内容(纯文本,如 "帮我分析 @张三 的周报")
|
|
3200
|
-
* @param structuredData - 结构化数据(可选)
|
|
3201
|
-
*
|
|
3202
|
-
* @example
|
|
3203
|
-
* ```typescript
|
|
3204
|
-
* function handleSubmit(text: string, data?: StructuredData) {
|
|
3205
|
-
* console.log('纯文本:', text)
|
|
3206
|
-
*
|
|
3207
|
-
* if (data?.template) {
|
|
3208
|
-
* // Template 场景
|
|
3209
|
-
* console.log('模板数据:', data.template)
|
|
3210
|
-
* }
|
|
3211
|
-
*
|
|
3212
|
-
* if (data?.mentions) {
|
|
3213
|
-
* // Mention 场景
|
|
3214
|
-
* console.log('提及的人:', data.mentions)
|
|
3215
|
-
* }
|
|
3216
|
-
* }
|
|
3217
|
-
* ```
|
|
3218
|
-
*/
|
|
3219
|
-
(e: 'submit', textContent: string, structuredData?: StructuredData): void;
|
|
3220
|
-
/**
|
|
3221
|
-
* 聚焦事件
|
|
3222
|
-
*
|
|
3223
|
-
* @param e - 事件名
|
|
3224
|
-
* @param event - 原生事件
|
|
3225
|
-
*/
|
|
3226
|
-
(e: 'focus', event: FocusEvent): void;
|
|
3227
|
-
/**
|
|
3228
|
-
* 失焦事件
|
|
3229
|
-
*
|
|
3230
|
-
* @param e - 事件名
|
|
3231
|
-
* @param event - 原生事件
|
|
3232
|
-
*/
|
|
3233
|
-
(e: 'blur', event: FocusEvent): void;
|
|
3234
|
-
/**
|
|
3235
|
-
* 清空事件
|
|
3236
|
-
*
|
|
3237
|
-
* @param e - 事件名
|
|
3238
|
-
*/
|
|
3239
|
-
(e: 'clear'): void;
|
|
3240
|
-
/**
|
|
3241
|
-
* 取消事件
|
|
3242
|
-
*
|
|
3243
|
-
* 在 loading 状态下点击停止按钮时触发
|
|
3244
|
-
* 用于取消正在进行的操作(如 AI 响应)
|
|
3245
|
-
*
|
|
3246
|
-
* @param e - 事件名
|
|
3247
|
-
*/
|
|
3248
|
-
(e: 'cancel'): void;
|
|
3249
|
-
/**
|
|
3250
|
-
* 输入事件
|
|
3251
|
-
*
|
|
3252
|
-
* @param e - 事件名
|
|
3253
|
-
* @param value - 当前内容
|
|
3254
|
-
*/
|
|
3255
|
-
(e: 'input', value: string): void;
|
|
3256
|
-
}
|
|
3257
|
-
|
|
3258
|
-
/**
|
|
3259
|
-
* Sender 组件 Props
|
|
3260
|
-
*/
|
|
3261
2254
|
export declare interface SenderProps {
|
|
3262
|
-
/**
|
|
3263
|
-
* 输入内容(双向绑定)
|
|
3264
|
-
*
|
|
3265
|
-
* 支持 v-model
|
|
3266
|
-
*/
|
|
3267
|
-
modelValue?: string;
|
|
3268
|
-
/**
|
|
3269
|
-
* 默认值
|
|
3270
|
-
*
|
|
3271
|
-
* 仅在初始化时使用
|
|
3272
|
-
*/
|
|
3273
|
-
defaultValue?: string;
|
|
3274
|
-
/**
|
|
3275
|
-
* 占位符文本
|
|
3276
|
-
*
|
|
3277
|
-
* @default '请输入内容...'
|
|
3278
|
-
*/
|
|
3279
|
-
placeholder?: string;
|
|
3280
|
-
/**
|
|
3281
|
-
* 是否禁用
|
|
3282
|
-
*
|
|
3283
|
-
* @default false
|
|
3284
|
-
*/
|
|
3285
|
-
disabled?: boolean;
|
|
3286
|
-
/**
|
|
3287
|
-
* 是否加载中
|
|
3288
|
-
*
|
|
3289
|
-
* 加载状态下显示停止按钮
|
|
3290
|
-
*
|
|
3291
|
-
* @default false
|
|
3292
|
-
*/
|
|
3293
|
-
loading?: boolean;
|
|
3294
|
-
/**
|
|
3295
|
-
* 是否自动聚焦
|
|
3296
|
-
*
|
|
3297
|
-
* @default false
|
|
3298
|
-
*/
|
|
3299
|
-
autofocus?: boolean;
|
|
3300
|
-
/**
|
|
3301
|
-
* 移动端虚拟键盘回车键提示
|
|
3302
|
-
*
|
|
3303
|
-
* 用于自定义移动端虚拟键盘上回车键的显示文本或图标
|
|
3304
|
-
*
|
|
3305
|
-
* @default 'send'
|
|
3306
|
-
*/
|
|
3307
|
-
enterkeyhint?: EnterKeyHint;
|
|
3308
|
-
/**
|
|
3309
|
-
* 输入模式
|
|
3310
|
-
*
|
|
3311
|
-
* - single: 单行模式
|
|
3312
|
-
* - multiple: 多行模式
|
|
3313
|
-
*
|
|
3314
|
-
* @default 'single'
|
|
3315
|
-
*/
|
|
3316
|
-
mode?: InputMode;
|
|
3317
|
-
/**
|
|
3318
|
-
* 自动调整高度
|
|
3319
|
-
*
|
|
3320
|
-
* - false: 不自动调整
|
|
3321
|
-
* - true: 自动调整(默认 1-3 行)
|
|
3322
|
-
* - { minRows, maxRows }: 自定义行数范围
|
|
3323
|
-
*
|
|
3324
|
-
* 仅在 mode === 'multiple' 时有效
|
|
3325
|
-
*
|
|
3326
|
-
* @default { minRows: 1, maxRows: 3 }
|
|
3327
|
-
*/
|
|
3328
|
-
autoSize?: AutoSize;
|
|
3329
|
-
/**
|
|
3330
|
-
* 最大字符数
|
|
3331
|
-
*
|
|
3332
|
-
* @default Infinity
|
|
3333
|
-
*/
|
|
3334
|
-
maxLength?: number;
|
|
3335
|
-
/**
|
|
3336
|
-
* 是否显示字数限制
|
|
3337
|
-
*
|
|
3338
|
-
* 仅在 maxLength 有值时有效
|
|
3339
|
-
*
|
|
3340
|
-
* @default false
|
|
3341
|
-
*/
|
|
3342
|
-
showWordLimit?: boolean;
|
|
3343
|
-
/**
|
|
3344
|
-
* 是否显示清空按钮
|
|
3345
|
-
*
|
|
3346
|
-
* @default false
|
|
3347
|
-
*/
|
|
3348
|
-
clearable?: boolean;
|
|
3349
|
-
/**
|
|
3350
|
-
* Tiptap 扩展配置
|
|
3351
|
-
*
|
|
3352
|
-
* 用于添加增强输入能力,如 Template、Mention、Suggestion 等
|
|
3353
|
-
*
|
|
3354
|
-
* @example 基础使用
|
|
3355
|
-
* ```typescript
|
|
3356
|
-
* import { Template } from '@tiny-robot/components/sender/extensions'
|
|
3357
|
-
*
|
|
3358
|
-
* <Sender :extensions="[Template]" />
|
|
3359
|
-
* ```
|
|
3360
|
-
*
|
|
3361
|
-
* @example 带配置的扩展(响应式推荐)
|
|
3362
|
-
* ```typescript
|
|
3363
|
-
* import { Mention, Suggestion } from '@tiny-robot/components/sender/extensions'
|
|
3364
|
-
*
|
|
3365
|
-
* const mentions = ref([...])
|
|
3366
|
-
* const suggestions = ref([...])
|
|
3367
|
-
*
|
|
3368
|
-
* const extensions = [
|
|
3369
|
-
* Mention.configure({ items: mentions }),
|
|
3370
|
-
* Suggestion.configure({ items: suggestions })
|
|
3371
|
-
* ]
|
|
3372
|
-
*
|
|
3373
|
-
* <Sender :extensions="extensions" />
|
|
3374
|
-
* ```
|
|
3375
|
-
*/
|
|
3376
|
-
extensions?: Extension[] | any[];
|
|
3377
|
-
/**
|
|
3378
|
-
* 组件尺寸
|
|
3379
|
-
*
|
|
3380
|
-
* - normal: 正常尺寸(默认)
|
|
3381
|
-
* - small: 紧凑模式,更小的字体、间距和图标
|
|
3382
|
-
*
|
|
3383
|
-
* @default 'normal'
|
|
3384
|
-
*/
|
|
3385
|
-
size?: 'normal' | 'small';
|
|
3386
|
-
/**
|
|
3387
|
-
* 停止按钮文字
|
|
3388
|
-
*
|
|
3389
|
-
* @default '停止响应'
|
|
3390
|
-
*/
|
|
3391
|
-
stopText?: string;
|
|
3392
|
-
/**
|
|
3393
|
-
* 默认操作按钮配置
|
|
3394
|
-
*
|
|
3395
|
-
* 用于统一配置默认按钮(Clear、Submit)的状态和提示
|
|
3396
|
-
*
|
|
3397
|
-
* @example 基础使用
|
|
3398
|
-
* ```vue
|
|
3399
|
-
* <Sender
|
|
3400
|
-
* :actions-config="{
|
|
3401
|
-
* submit: { disabled: !isValid, tooltip: '请完善表单' }
|
|
3402
|
-
* }"
|
|
3403
|
-
* />
|
|
3404
|
-
* ```
|
|
3405
|
-
*
|
|
3406
|
-
* @example 动态配置
|
|
3407
|
-
* ```vue
|
|
3408
|
-
* <script setup>
|
|
3409
|
-
* const defaultActions = computed(() => ({
|
|
3410
|
-
* submit: {
|
|
3411
|
-
* disabled: !canSubmit.value,
|
|
3412
|
-
* tooltip: canSubmit.value ? '发送' : '请输入内容'
|
|
3413
|
-
* },
|
|
3414
|
-
* clear: { tooltip: '清空输入' }
|
|
3415
|
-
* }))
|
|
3416
|
-
* </script>
|
|
3417
|
-
*
|
|
3418
|
-
* <template>
|
|
3419
|
-
* <Sender :actions-config="defaultActions" />
|
|
3420
|
-
* </template>
|
|
3421
|
-
* ```
|
|
3422
|
-
*
|
|
3423
|
-
* @default undefined
|
|
3424
|
-
*/
|
|
3425
|
-
defaultActions?: DefaultActions;
|
|
3426
|
-
/**
|
|
3427
|
-
* 提交触发方式
|
|
3428
|
-
*
|
|
3429
|
-
* @default 'enter'
|
|
3430
|
-
*/
|
|
3431
|
-
submitType?: SubmitTrigger;
|
|
3432
|
-
}
|
|
3433
|
-
|
|
3434
|
-
declare interface SenderProps_2 {
|
|
3435
2255
|
autofocus?: boolean;
|
|
3436
2256
|
autoSize?: AutoSize;
|
|
3437
2257
|
allowSpeech?: boolean;
|
|
@@ -3456,172 +2276,6 @@ declare interface SenderProps_2 {
|
|
|
3456
2276
|
stopText?: string;
|
|
3457
2277
|
}
|
|
3458
2278
|
|
|
3459
|
-
/**
|
|
3460
|
-
* Sender 组件 Slots
|
|
3461
|
-
*/
|
|
3462
|
-
export declare interface SenderSlots {
|
|
3463
|
-
/**
|
|
3464
|
-
* 头部插槽
|
|
3465
|
-
*/
|
|
3466
|
-
header?: () => unknown;
|
|
3467
|
-
/**
|
|
3468
|
-
* 前缀插槽
|
|
3469
|
-
*/
|
|
3470
|
-
prefix?: () => unknown;
|
|
3471
|
-
/**
|
|
3472
|
-
* 内容插槽
|
|
3473
|
-
*
|
|
3474
|
-
* @param props - 插槽属性
|
|
3475
|
-
* @param props.editor - 编辑器实例
|
|
3476
|
-
*/
|
|
3477
|
-
content?: (props: {
|
|
3478
|
-
editor: unknown;
|
|
3479
|
-
}) => unknown;
|
|
3480
|
-
/**
|
|
3481
|
-
* 单行模式内联操作按钮插槽
|
|
3482
|
-
*
|
|
3483
|
-
* @example
|
|
3484
|
-
* ```vue
|
|
3485
|
-
* <sender>
|
|
3486
|
-
* <template #actions-inline="{ insert, focus, disabled }">
|
|
3487
|
-
* <voice-input @result="insert" :disabled="disabled" />
|
|
3488
|
-
* <file-upload @select="handleFiles" />
|
|
3489
|
-
* </template>
|
|
3490
|
-
* </sender>
|
|
3491
|
-
* ```
|
|
3492
|
-
*/
|
|
3493
|
-
'actions-inline'?: (scope: SenderSlotScope) => unknown;
|
|
3494
|
-
/**
|
|
3495
|
-
* 底部插槽(多行模式)
|
|
3496
|
-
*/
|
|
3497
|
-
footer?: (scope: SenderSlotScope) => unknown;
|
|
3498
|
-
/**
|
|
3499
|
-
* 底部右侧插槽(多行模式)
|
|
3500
|
-
*/
|
|
3501
|
-
'footer-right'?: (scope: SenderSlotScope) => unknown;
|
|
3502
|
-
}
|
|
3503
|
-
|
|
3504
|
-
/**
|
|
3505
|
-
* Sender 插槽作用域
|
|
3506
|
-
*
|
|
3507
|
-
* 通过插槽作用域暴露给外部组件的状态和方法
|
|
3508
|
-
* 主要为增强按钮(Upload、Voice 等)提供便捷的操作方法
|
|
3509
|
-
*/
|
|
3510
|
-
export declare interface SenderSlotScope {
|
|
3511
|
-
/**
|
|
3512
|
-
* Tiptap 编辑器实例
|
|
3513
|
-
* 用于高级操作
|
|
3514
|
-
*/
|
|
3515
|
-
editor: Editor_2 | undefined;
|
|
3516
|
-
/**
|
|
3517
|
-
* 聚焦编辑器
|
|
3518
|
-
*/
|
|
3519
|
-
focus: () => void;
|
|
3520
|
-
/**
|
|
3521
|
-
* 失焦编辑器
|
|
3522
|
-
*/
|
|
3523
|
-
blur: () => void;
|
|
3524
|
-
/**
|
|
3525
|
-
* 插入内容到当前光标位置
|
|
3526
|
-
*
|
|
3527
|
-
* 适用场景:语音输入、快捷短语插入
|
|
3528
|
-
*
|
|
3529
|
-
* @param content - 要插入的内容
|
|
3530
|
-
* @example
|
|
3531
|
-
* ```vue
|
|
3532
|
-
* <template #actions-inline="{ insert }">
|
|
3533
|
-
* <VoiceButton @speech-final="insert" />
|
|
3534
|
-
* </template>
|
|
3535
|
-
* ```
|
|
3536
|
-
*/
|
|
3537
|
-
insert: (content: string) => void;
|
|
3538
|
-
/**
|
|
3539
|
-
* 追加内容到编辑器末尾
|
|
3540
|
-
*
|
|
3541
|
-
* 适用场景:连续语音输入、批量添加内容
|
|
3542
|
-
*
|
|
3543
|
-
* @param content - 要追加的内容
|
|
3544
|
-
*/
|
|
3545
|
-
append: (content: string) => void;
|
|
3546
|
-
/**
|
|
3547
|
-
* 替换编辑器全部内容
|
|
3548
|
-
*
|
|
3549
|
-
* 适用场景:模板填充、内容重置
|
|
3550
|
-
*
|
|
3551
|
-
* @param content - 新内容
|
|
3552
|
-
*/
|
|
3553
|
-
replace: (content: string) => void;
|
|
3554
|
-
/**
|
|
3555
|
-
* 是否禁用
|
|
3556
|
-
* 用于控制自定义按钮状态
|
|
3557
|
-
*/
|
|
3558
|
-
disabled: boolean;
|
|
3559
|
-
/**
|
|
3560
|
-
* 是否加载中
|
|
3561
|
-
* 用于控制按钮加载状态和禁用
|
|
3562
|
-
*/
|
|
3563
|
-
loading: boolean;
|
|
3564
|
-
/**
|
|
3565
|
-
* 是否有内容
|
|
3566
|
-
* 用于控制按钮显示/隐藏
|
|
3567
|
-
*/
|
|
3568
|
-
hasContent: boolean;
|
|
3569
|
-
}
|
|
3570
|
-
|
|
3571
|
-
/**
|
|
3572
|
-
* 建议项类型
|
|
3573
|
-
*
|
|
3574
|
-
* @example
|
|
3575
|
-
* ```typescript
|
|
3576
|
-
* // 自动匹配
|
|
3577
|
-
* { content: 'ECS-云服务器' }
|
|
3578
|
-
*
|
|
3579
|
-
* // 精确指定高亮
|
|
3580
|
-
* {
|
|
3581
|
-
* content: 'ECS-云服务器',
|
|
3582
|
-
* highlights: ['ECS', '云服务器']
|
|
3583
|
-
* }
|
|
3584
|
-
*
|
|
3585
|
-
* // 自定义高亮函数
|
|
3586
|
-
* {
|
|
3587
|
-
* content: 'ECS-云服务器',
|
|
3588
|
-
* highlights: (text, query) => [
|
|
3589
|
-
* { text: 'ECS', isMatch: true },
|
|
3590
|
-
* { text: '-云服务器', isMatch: false }
|
|
3591
|
-
* ]
|
|
3592
|
-
* }
|
|
3593
|
-
* ```
|
|
3594
|
-
*/
|
|
3595
|
-
export declare interface SenderSuggestionItem {
|
|
3596
|
-
/**
|
|
3597
|
-
* 建议项内容(必填)
|
|
3598
|
-
*/
|
|
3599
|
-
content: string;
|
|
3600
|
-
/**
|
|
3601
|
-
* 显示标签(可选)
|
|
3602
|
-
*
|
|
3603
|
-
* 默认使用 content
|
|
3604
|
-
*/
|
|
3605
|
-
label?: string;
|
|
3606
|
-
/**
|
|
3607
|
-
* 高亮方式(可选)
|
|
3608
|
-
*
|
|
3609
|
-
* - undefined: 自动匹配(默认)
|
|
3610
|
-
* - string[]: 精确指定高亮片段
|
|
3611
|
-
* - function: 自定义高亮逻辑
|
|
3612
|
-
*/
|
|
3613
|
-
highlights?: string[] | HighlightFunction;
|
|
3614
|
-
/**
|
|
3615
|
-
* 自定义数据(可选)
|
|
3616
|
-
*
|
|
3617
|
-
* 用于扩展功能
|
|
3618
|
-
*/
|
|
3619
|
-
data?: Record<string, unknown>;
|
|
3620
|
-
}
|
|
3621
|
-
|
|
3622
|
-
/**
|
|
3623
|
-
* 语音识别相关类型定义
|
|
3624
|
-
*/
|
|
3625
2279
|
export declare interface SpeechCallbacks {
|
|
3626
2280
|
onStart: () => void;
|
|
3627
2281
|
onInterim: (transcript: string) => void;
|
|
@@ -3664,278 +2318,26 @@ export declare interface SpeechState {
|
|
|
3664
2318
|
isSupported: boolean;
|
|
3665
2319
|
error?: Error;
|
|
3666
2320
|
}
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
* ```typescript
|
|
3683
|
-
* function handleSubmit(text: string, data?: StructuredData) {
|
|
3684
|
-
* // text: "帮我分析 的周报"
|
|
3685
|
-
* // data: [
|
|
3686
|
-
* // { type: 'text', content: '帮我分析 ' },
|
|
3687
|
-
* // { type: 'block', content: '张三' },
|
|
3688
|
-
* // { type: 'text', content: ' 的周报' }
|
|
3689
|
-
* // ]
|
|
3690
|
-
*
|
|
3691
|
-
* // 提取模板块(可编辑部分)
|
|
3692
|
-
* if (data && data.some(item => item.type === 'block')) {
|
|
3693
|
-
* const blocks = data.filter(item => item.type === 'block')
|
|
3694
|
-
* console.log('模板块:', blocks)
|
|
3695
|
-
* }
|
|
3696
|
-
*
|
|
3697
|
-
* // 提取选择器
|
|
3698
|
-
* if (data && data.some(item => item.type === 'select')) {
|
|
3699
|
-
* const selects = data.filter(item => item.type === 'select')
|
|
3700
|
-
* console.log('选择器:', selects)
|
|
3701
|
-
* }
|
|
3702
|
-
* }
|
|
3703
|
-
* ```
|
|
3704
|
-
*
|
|
3705
|
-
* @example Mention 场景
|
|
3706
|
-
* ```typescript
|
|
3707
|
-
* function handleSubmit(text: string, data?: StructuredData) {
|
|
3708
|
-
* // text: "帮我分析 @张三 的周报"
|
|
3709
|
-
* // data: [
|
|
3710
|
-
* // { type: 'text', content: '帮我分析 ' },
|
|
3711
|
-
* // { type: 'mention', content: '张三', value: '...' },
|
|
3712
|
-
* // { type: 'text', content: ' 的周报' }
|
|
3713
|
-
* // ]
|
|
3714
|
-
*
|
|
3715
|
-
* // 统一使用 content 属性
|
|
3716
|
-
* const allContent = data?.map(item => item.content).join('')
|
|
3717
|
-
* console.log('完整内容:', allContent)
|
|
3718
|
-
*
|
|
3719
|
-
* // 提取 mention(正确的类型守卫)
|
|
3720
|
-
* if (data && data.some(item => item.type === 'mention')) {
|
|
3721
|
-
* const mentions = data.filter(item => item.type === 'mention')
|
|
3722
|
-
* console.log('提及的人:', mentions.map(m => m.content))
|
|
3723
|
-
* console.log('关联值:', mentions.map(m => m.value))
|
|
3724
|
-
* }
|
|
3725
|
-
* }
|
|
3726
|
-
* ```
|
|
3727
|
-
*/
|
|
3728
|
-
export declare type StructuredData = TemplateItem[] | MentionStructuredItem[];
|
|
3729
|
-
|
|
3730
|
-
/**
|
|
3731
|
-
* 提交触发方式
|
|
3732
|
-
* - enter: Enter 键提交
|
|
3733
|
-
* - ctrlEnter: Ctrl+Enter 提交
|
|
3734
|
-
* - shiftEnter: Shift+Enter 提交
|
|
3735
|
-
*/
|
|
3736
|
-
export declare type SubmitTrigger = 'enter' | 'ctrlEnter' | 'shiftEnter';
|
|
3737
|
-
|
|
3738
|
-
/**
|
|
3739
|
-
* 创建 Suggestion 扩展的便捷函数
|
|
3740
|
-
*
|
|
3741
|
-
* @param items - 建议项列表
|
|
3742
|
-
* @param options - 其他配置项
|
|
3743
|
-
*
|
|
3744
|
-
* @example
|
|
3745
|
-
* ```typescript
|
|
3746
|
-
* const extensions = [suggestion(suggestions)]
|
|
3747
|
-
* const extensions = [suggestion(suggestions, { popupWidth: 500 })]
|
|
3748
|
-
* ```
|
|
3749
|
-
*/
|
|
3750
|
-
declare function suggestion(items: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>, options?: Partial<Omit<SuggestionOptions, 'items'>>): Extension<SuggestionOptions, any>;
|
|
3751
|
-
|
|
3752
|
-
export declare interface SuggestionBaseItem {
|
|
3753
|
-
id: string;
|
|
3754
|
-
text: string;
|
|
3755
|
-
}
|
|
3756
|
-
|
|
3757
|
-
export declare type SuggestionData<T = Record<string, unknown>> = (SuggestionItem<T> | SuggestionGroup<T>)[];
|
|
3758
|
-
|
|
3759
|
-
export declare interface SuggestionGroup<T = Record<string, unknown>> {
|
|
3760
|
-
group: string;
|
|
3761
|
-
label: string;
|
|
3762
|
-
icon?: VNode | Component;
|
|
3763
|
-
items: SuggestionItem<T>[];
|
|
3764
|
-
}
|
|
3765
|
-
|
|
3766
|
-
export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
|
|
3767
|
-
|
|
3768
|
-
/**
|
|
3769
|
-
* SuggestionList Emits
|
|
3770
|
-
*/
|
|
3771
|
-
export declare interface SuggestionListEmits {
|
|
3772
|
-
/**
|
|
3773
|
-
* 选择建议
|
|
3774
|
-
*
|
|
3775
|
-
* @param suggestion - 建议内容
|
|
3776
|
-
*/
|
|
3777
|
-
(e: 'select', suggestion: string): void;
|
|
3778
|
-
/**
|
|
3779
|
-
* 鼠标进入
|
|
3780
|
-
*
|
|
3781
|
-
* @param index - 索引
|
|
3782
|
-
*/
|
|
3783
|
-
(e: 'mouse-enter', index: number): void;
|
|
3784
|
-
/**
|
|
3785
|
-
* 鼠标离开
|
|
3786
|
-
*/
|
|
3787
|
-
(e: 'mouse-leave'): void;
|
|
3788
|
-
}
|
|
3789
|
-
|
|
3790
|
-
/**
|
|
3791
|
-
* SuggestionList Props
|
|
3792
|
-
*/
|
|
3793
|
-
export declare interface SuggestionListProps {
|
|
3794
|
-
/**
|
|
3795
|
-
* 是否显示
|
|
3796
|
-
*/
|
|
3797
|
-
show: boolean;
|
|
3798
|
-
/**
|
|
3799
|
-
* 建议列表
|
|
3800
|
-
*/
|
|
3801
|
-
suggestions: SenderSuggestionItem[];
|
|
3802
|
-
/**
|
|
3803
|
-
* 键盘激活索引
|
|
3804
|
-
*/
|
|
3805
|
-
activeKeyboardIndex: number;
|
|
3806
|
-
/**
|
|
3807
|
-
* 鼠标激活索引
|
|
3808
|
-
*/
|
|
3809
|
-
activeMouseIndex: number;
|
|
3810
|
-
/**
|
|
3811
|
-
* 输入值
|
|
3812
|
-
*/
|
|
3813
|
-
inputValue: string;
|
|
3814
|
-
/**
|
|
3815
|
-
* 弹窗样式
|
|
3816
|
-
*/
|
|
3817
|
-
popupStyle?: Record<string, string | number>;
|
|
3818
|
-
}
|
|
3819
|
-
|
|
3820
|
-
/**
|
|
3821
|
-
* 插件配置选项
|
|
3822
|
-
*/
|
|
3823
|
-
export declare interface SuggestionOptions {
|
|
3824
|
-
/**
|
|
3825
|
-
* 建议项列表(可选)
|
|
3826
|
-
*
|
|
3827
|
-
* 不传或传空数组时,建议功能不会显示
|
|
3828
|
-
*
|
|
3829
|
-
* @default []
|
|
3830
|
-
*
|
|
3831
|
-
* @example
|
|
3832
|
-
* ```typescript
|
|
3833
|
-
* const items = ref([
|
|
3834
|
-
* { content: 'ECS-云服务器' },
|
|
3835
|
-
* { content: 'RDS-数据库' }
|
|
3836
|
-
* ])
|
|
3837
|
-
* ```
|
|
3838
|
-
*/
|
|
3839
|
-
items?: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>;
|
|
3840
|
-
/**
|
|
3841
|
-
* 自定义过滤函数(可选)
|
|
3842
|
-
*
|
|
3843
|
-
* - 不传:不过滤,直接显示所有项
|
|
3844
|
-
* - 传入:使用自定义过滤逻辑
|
|
3845
|
-
*
|
|
3846
|
-
* @default undefined(不过滤)
|
|
3847
|
-
*
|
|
3848
|
-
* @example 模糊匹配过滤
|
|
3849
|
-
* ```typescript
|
|
3850
|
-
* filterFn: (items, query) => {
|
|
3851
|
-
* return items.filter(item =>
|
|
3852
|
-
* item.content.toLowerCase().includes(query.toLowerCase())
|
|
3853
|
-
* )
|
|
3854
|
-
* }
|
|
3855
|
-
* ```
|
|
3856
|
-
*
|
|
3857
|
-
* @example 前缀匹配过滤
|
|
3858
|
-
* ```typescript
|
|
3859
|
-
* filterFn: (items, query) => {
|
|
3860
|
-
* return items.filter(item =>
|
|
3861
|
-
* item.content.toLowerCase().startsWith(query.toLowerCase())
|
|
3862
|
-
* )
|
|
3863
|
-
* }
|
|
3864
|
-
* ```
|
|
3865
|
-
*/
|
|
3866
|
-
filterFn?: (suggestions: SenderSuggestionItem[], query: string) => SenderSuggestionItem[];
|
|
3867
|
-
/**
|
|
3868
|
-
* 选中建议项的按键
|
|
3869
|
-
*
|
|
3870
|
-
* 注意:Tab 键用于自动补全,不受此配置控制
|
|
3871
|
-
*
|
|
3872
|
-
* @default ['Enter']
|
|
3873
|
-
*
|
|
3874
|
-
* @example 只允许 Enter 选中
|
|
3875
|
-
* ```typescript
|
|
3876
|
-
* activeSuggestionKeys: ['Enter']
|
|
3877
|
-
* ```
|
|
3878
|
-
*
|
|
3879
|
-
* @example 允许 Enter 和 Space 选中
|
|
3880
|
-
* ```typescript
|
|
3881
|
-
* activeSuggestionKeys: ['Enter', ' '] // 注意:空格键是 ' '
|
|
3882
|
-
* ```
|
|
3883
|
-
*
|
|
3884
|
-
* @example 禁用所有选中按键(只能点击)
|
|
3885
|
-
* ```typescript
|
|
3886
|
-
* activeSuggestionKeys: []
|
|
3887
|
-
* ```
|
|
3888
|
-
*/
|
|
3889
|
-
activeSuggestionKeys?: string[];
|
|
3890
|
-
/**
|
|
3891
|
-
* 弹窗宽度
|
|
3892
|
-
*
|
|
3893
|
-
* @default 400
|
|
3894
|
-
*/
|
|
3895
|
-
popupWidth?: number | string;
|
|
3896
|
-
/**
|
|
3897
|
-
* 是否显示自动补全提示
|
|
3898
|
-
*
|
|
3899
|
-
* @default true
|
|
3900
|
-
*/
|
|
3901
|
-
showAutoComplete?: boolean;
|
|
3902
|
-
/**
|
|
3903
|
-
* 选中建议项的回调
|
|
3904
|
-
*
|
|
3905
|
-
* @param item - 选中的建议项(包含完整的 SenderSuggestionItem 信息)
|
|
3906
|
-
* @returns 返回 false 可阻止默认回填行为
|
|
3907
|
-
*
|
|
3908
|
-
* @example 默认行为(自动回填)
|
|
3909
|
-
* ```typescript
|
|
3910
|
-
* onSelect: (item) => {
|
|
3911
|
-
* console.log('Selected:', item)
|
|
3912
|
-
* // 不返回 false,内容会自动回填
|
|
3913
|
-
* }
|
|
3914
|
-
* ```
|
|
3915
|
-
*
|
|
3916
|
-
* @example 阻止默认行为并自定义回填
|
|
3917
|
-
* ```typescript
|
|
3918
|
-
* onSelect: (item) => {
|
|
3919
|
-
* editor.commands.setContent(`前缀-${item.content}-后缀`)
|
|
3920
|
-
* return false // 阻止默认回填
|
|
3921
|
-
* }
|
|
3922
|
-
* ```
|
|
3923
|
-
*
|
|
3924
|
-
* @example 条件性阻止
|
|
3925
|
-
* ```typescript
|
|
3926
|
-
* onSelect: (item) => {
|
|
3927
|
-
* if (item.data?.needsValidation) {
|
|
3928
|
-
* validateAndFill(item)
|
|
3929
|
-
* return false
|
|
3930
|
-
* }
|
|
3931
|
-
* // 否则使用默认回填
|
|
3932
|
-
* }
|
|
3933
|
-
* ```
|
|
3934
|
-
*/
|
|
3935
|
-
onSelect?: (item: SenderSuggestionItem) => void | false;
|
|
2321
|
+
|
|
2322
|
+
export declare type SubmitTrigger = 'enter' | 'ctrlEnter' | 'shiftEnter';
|
|
2323
|
+
|
|
2324
|
+
export declare interface SuggestionBaseItem {
|
|
2325
|
+
id: string;
|
|
2326
|
+
text: string;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
export declare type SuggestionData<T = Record<string, unknown>> = (SuggestionItem<T> | SuggestionGroup<T>)[];
|
|
2330
|
+
|
|
2331
|
+
export declare interface SuggestionGroup<T = Record<string, unknown>> {
|
|
2332
|
+
group: string;
|
|
2333
|
+
label: string;
|
|
2334
|
+
icon?: VNode | Component;
|
|
2335
|
+
items: SuggestionItem<T>[];
|
|
3936
2336
|
}
|
|
3937
2337
|
|
|
3938
|
-
declare
|
|
2338
|
+
export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
|
|
2339
|
+
|
|
2340
|
+
declare const SuggestionPillButton: typeof _default_31 & {
|
|
3939
2341
|
install: typeof installPillButton;
|
|
3940
2342
|
};
|
|
3941
2343
|
export { SuggestionPillButton }
|
|
@@ -4063,184 +2465,19 @@ export declare interface SuggestionPopoverSlots {
|
|
|
4063
2465
|
body?: () => VNode | VNode[];
|
|
4064
2466
|
}
|
|
4065
2467
|
|
|
4066
|
-
/**
|
|
4067
|
-
* 插件状态
|
|
4068
|
-
*
|
|
4069
|
-
* 管理建议列表的显示、过滤、选中等状态
|
|
4070
|
-
*/
|
|
4071
|
-
export declare interface SuggestionState {
|
|
4072
|
-
/**
|
|
4073
|
-
* 是否激活(有匹配的建议项)
|
|
4074
|
-
*/
|
|
4075
|
-
active: boolean;
|
|
4076
|
-
/**
|
|
4077
|
-
* 匹配范围
|
|
4078
|
-
*
|
|
4079
|
-
* 全局模式:整个文档范围
|
|
4080
|
-
* 字符模式:触发字符到光标的范围
|
|
4081
|
-
*/
|
|
4082
|
-
range: {
|
|
4083
|
-
from: number;
|
|
4084
|
-
to: number;
|
|
4085
|
-
} | null;
|
|
4086
|
-
/**
|
|
4087
|
-
* 查询文本
|
|
4088
|
-
*
|
|
4089
|
-
* 全局模式:整个输入内容
|
|
4090
|
-
* 字符模式:触发字符后的文本
|
|
4091
|
-
*/
|
|
4092
|
-
query: string;
|
|
4093
|
-
/**
|
|
4094
|
-
* 过滤后的建议项
|
|
4095
|
-
*/
|
|
4096
|
-
filteredSuggestions: SenderSuggestionItem[];
|
|
4097
|
-
/**
|
|
4098
|
-
* 当前选中的建议项索引
|
|
4099
|
-
*
|
|
4100
|
-
* -1 表示未选中
|
|
4101
|
-
*/
|
|
4102
|
-
selectedIndex: number;
|
|
4103
|
-
/**
|
|
4104
|
-
* 自动补全文本
|
|
4105
|
-
*
|
|
4106
|
-
* 选中项的剩余部分
|
|
4107
|
-
*/
|
|
4108
|
-
autoCompleteText: string;
|
|
4109
|
-
/**
|
|
4110
|
-
* 是否显示 Tab 提示
|
|
4111
|
-
*/
|
|
4112
|
-
showTabIndicator: boolean;
|
|
4113
|
-
}
|
|
4114
|
-
|
|
4115
|
-
/**
|
|
4116
|
-
* Suggestion 插件类型定义
|
|
4117
|
-
*
|
|
4118
|
-
* 包含建议项、高亮、插件配置和状态等类型定义
|
|
4119
|
-
*/
|
|
4120
|
-
/**
|
|
4121
|
-
* 高亮文本片段
|
|
4122
|
-
*/
|
|
4123
2468
|
export declare interface SuggestionTextPart {
|
|
4124
2469
|
text: string;
|
|
4125
2470
|
isMatch: boolean;
|
|
4126
2471
|
}
|
|
4127
2472
|
|
|
4128
|
-
declare interface
|
|
4129
|
-
|
|
4130
|
-
|
|
2473
|
+
declare interface TemplateItem extends BaseTextItem {
|
|
2474
|
+
type: 'template';
|
|
2475
|
+
prefix: string;
|
|
2476
|
+
suffix: string;
|
|
4131
2477
|
}
|
|
4132
2478
|
|
|
4133
|
-
|
|
4134
|
-
* 创建 Template 扩展的便捷函数
|
|
4135
|
-
*
|
|
4136
|
-
* @param items - 模板项列表
|
|
4137
|
-
* @param options - 其他配置项
|
|
4138
|
-
*
|
|
4139
|
-
* @example
|
|
4140
|
-
* ```typescript
|
|
4141
|
-
* const extensions = [template(templates)]
|
|
4142
|
-
* const extensions = [template(templates, { HTMLAttributes: { class: 'custom' } })]
|
|
4143
|
-
* ```
|
|
4144
|
-
*/
|
|
4145
|
-
declare function template(items: TemplateItem[] | Ref<TemplateItem[]>, options?: Partial<Omit<TemplateOptions, 'items'>>): Extension<TemplateOptions, any>;
|
|
4146
|
-
|
|
4147
|
-
/**
|
|
4148
|
-
* 模板项(用户侧)
|
|
4149
|
-
*
|
|
4150
|
-
* 用户传入的模板数据格式
|
|
4151
|
-
* 组件内部会转换为 Tiptap 节点格式
|
|
4152
|
-
*/
|
|
4153
|
-
export declare type TemplateItem = {
|
|
4154
|
-
/**
|
|
4155
|
-
* 模板 ID,可选
|
|
4156
|
-
* 如果不提供,组件会自动生成
|
|
4157
|
-
*/
|
|
4158
|
-
id?: string;
|
|
4159
|
-
/**
|
|
4160
|
-
* 类型:普通文本
|
|
4161
|
-
*/
|
|
2479
|
+
declare interface TextItem extends BaseTextItem {
|
|
4162
2480
|
type: 'text';
|
|
4163
|
-
/**
|
|
4164
|
-
* 内容
|
|
4165
|
-
*/
|
|
4166
|
-
content: string;
|
|
4167
|
-
} | {
|
|
4168
|
-
/**
|
|
4169
|
-
* 模板 ID,可选
|
|
4170
|
-
* 如果不提供,组件会自动生成
|
|
4171
|
-
*/
|
|
4172
|
-
id?: string;
|
|
4173
|
-
/**
|
|
4174
|
-
* 类型:模板块(可编辑)
|
|
4175
|
-
*/
|
|
4176
|
-
type: 'block';
|
|
4177
|
-
/**
|
|
4178
|
-
* 内容
|
|
4179
|
-
*/
|
|
4180
|
-
content: string;
|
|
4181
|
-
} | {
|
|
4182
|
-
/**
|
|
4183
|
-
* 模板 ID,可选
|
|
4184
|
-
* 如果不提供,组件会自动生成
|
|
4185
|
-
*/
|
|
4186
|
-
id?: string;
|
|
4187
|
-
/**
|
|
4188
|
-
* 类型:选择器
|
|
4189
|
-
*/
|
|
4190
|
-
type: 'select';
|
|
4191
|
-
/**
|
|
4192
|
-
* 内容(选中的值)
|
|
4193
|
-
*/
|
|
4194
|
-
content: string;
|
|
4195
|
-
/**
|
|
4196
|
-
* 占位文字(未选择时显示)
|
|
4197
|
-
*/
|
|
4198
|
-
placeholder?: string;
|
|
4199
|
-
/**
|
|
4200
|
-
* 选项列表
|
|
4201
|
-
*/
|
|
4202
|
-
options?: SelectOption[];
|
|
4203
|
-
/**
|
|
4204
|
-
* 当前选中的值
|
|
4205
|
-
*/
|
|
4206
|
-
value?: string;
|
|
4207
|
-
};
|
|
4208
|
-
|
|
4209
|
-
/**
|
|
4210
|
-
* Template 配置选项
|
|
4211
|
-
*/
|
|
4212
|
-
declare interface TemplateOptions {
|
|
4213
|
-
/**
|
|
4214
|
-
* 模板数据列表(推荐使用 ref 实现响应式)
|
|
4215
|
-
*
|
|
4216
|
-
* 支持两种配置方式:
|
|
4217
|
-
* 1. 传入 ref(推荐):自动双向绑定,解决时序问题
|
|
4218
|
-
* 2. 传入数组:仅用于静态初始化
|
|
4219
|
-
*
|
|
4220
|
-
* @example 响应式配置(推荐)
|
|
4221
|
-
* ```typescript
|
|
4222
|
-
* const items = ref<TemplateItem[]>([
|
|
4223
|
-
* { type: 'text', content: '帮我分析' },
|
|
4224
|
-
* { type: 'template', content: '' }
|
|
4225
|
-
* ])
|
|
4226
|
-
* Template.configure({ items }) // 传入 ref,自动双向绑定
|
|
4227
|
-
* ```
|
|
4228
|
-
*
|
|
4229
|
-
* @example 静态配置
|
|
4230
|
-
* ```typescript
|
|
4231
|
-
* Template.configure({
|
|
4232
|
-
* items: [
|
|
4233
|
-
* { type: 'text', content: '帮我分析' },
|
|
4234
|
-
* { type: 'template', content: '' }
|
|
4235
|
-
* ]
|
|
4236
|
-
* })
|
|
4237
|
-
* ```
|
|
4238
|
-
*/
|
|
4239
|
-
items?: TemplateItem[] | Ref<TemplateItem[]>;
|
|
4240
|
-
/**
|
|
4241
|
-
* HTML 属性
|
|
4242
|
-
*/
|
|
4243
|
-
HTMLAttributes?: Record<string, unknown>;
|
|
4244
2481
|
}
|
|
4245
2482
|
|
|
4246
2483
|
export declare interface ThemeProviderProps {
|
|
@@ -4262,7 +2499,10 @@ export declare interface ThemeProviderProps {
|
|
|
4262
2499
|
|
|
4263
2500
|
export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
|
|
4264
2501
|
|
|
4265
|
-
|
|
2502
|
+
/**
|
|
2503
|
+
* 组件核心类型定义
|
|
2504
|
+
*/
|
|
2505
|
+
export declare type ThemeType = 'light' | 'dark';
|
|
4266
2506
|
|
|
4267
2507
|
/**
|
|
4268
2508
|
* 工具调用接口(支持 OpenAI 格式)
|
|
@@ -4281,13 +2521,6 @@ declare type ToolCallStatus = (typeof toolCallStatus)[number];
|
|
|
4281
2521
|
|
|
4282
2522
|
declare const toolCallStatus: readonly ["running", "success", "failed", "cancelled"];
|
|
4283
2523
|
|
|
4284
|
-
/**
|
|
4285
|
-
* Tooltip 内容类型
|
|
4286
|
-
* - string: 简单文本
|
|
4287
|
-
* - () => string | VNode: 渲染函数,支持复杂内容
|
|
4288
|
-
*/
|
|
4289
|
-
export declare type TooltipContent = string | (() => string | VNode);
|
|
4290
|
-
|
|
4291
2524
|
declare interface TooltipContentProps {
|
|
4292
2525
|
show?: boolean;
|
|
4293
2526
|
content: string;
|
|
@@ -4298,71 +2531,7 @@ declare interface TooltipContentProps {
|
|
|
4298
2531
|
delayClose?: number;
|
|
4299
2532
|
}
|
|
4300
2533
|
|
|
4301
|
-
|
|
4302
|
-
* Tooltip 位置
|
|
4303
|
-
*
|
|
4304
|
-
* 支持 TinyTooltip 的所有位置选项
|
|
4305
|
-
*/
|
|
4306
|
-
export declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
4307
|
-
|
|
4308
|
-
declare type TooltipRender = () => VNode | string;
|
|
4309
|
-
|
|
4310
|
-
export declare interface UploadButtonEmits {
|
|
4311
|
-
/**
|
|
4312
|
-
* 文件选择
|
|
4313
|
-
*/
|
|
4314
|
-
(e: 'select', files: File[]): void;
|
|
4315
|
-
/**
|
|
4316
|
-
* 文件验证失败
|
|
4317
|
-
*/
|
|
4318
|
-
(e: 'error', error: Error, files?: File[]): void;
|
|
4319
|
-
}
|
|
4320
|
-
|
|
4321
|
-
export declare interface UploadButtonProps {
|
|
4322
|
-
/**
|
|
4323
|
-
* 是否禁用
|
|
4324
|
-
*/
|
|
4325
|
-
disabled?: boolean;
|
|
4326
|
-
/**
|
|
4327
|
-
* 接受的文件类型
|
|
4328
|
-
* @default '*'
|
|
4329
|
-
*/
|
|
4330
|
-
accept?: string;
|
|
4331
|
-
/**
|
|
4332
|
-
* 是否支持多选
|
|
4333
|
-
* @default false
|
|
4334
|
-
*/
|
|
4335
|
-
multiple?: boolean;
|
|
4336
|
-
/**
|
|
4337
|
-
* 是否在选择文件后重置 input
|
|
4338
|
-
* @default true
|
|
4339
|
-
*/
|
|
4340
|
-
reset?: boolean;
|
|
4341
|
-
/**
|
|
4342
|
-
* 文件大小限制(MB)
|
|
4343
|
-
*/
|
|
4344
|
-
maxSize?: number;
|
|
4345
|
-
/**
|
|
4346
|
-
* 最大文件数量
|
|
4347
|
-
*/
|
|
4348
|
-
maxCount?: number;
|
|
4349
|
-
/**
|
|
4350
|
-
* 按钮提示文本
|
|
4351
|
-
*/
|
|
4352
|
-
tooltip?: TooltipContent;
|
|
4353
|
-
/**
|
|
4354
|
-
* 按钮尺寸
|
|
4355
|
-
*/
|
|
4356
|
-
size?: number | string;
|
|
4357
|
-
/**
|
|
4358
|
-
* 自定义图标
|
|
4359
|
-
*/
|
|
4360
|
-
icon?: Component;
|
|
4361
|
-
/**
|
|
4362
|
-
* Tooltip 位置
|
|
4363
|
-
*/
|
|
4364
|
-
tooltipPlacement?: TooltipPlacement;
|
|
4365
|
-
}
|
|
2534
|
+
export declare type TooltipRender = () => VNode | string;
|
|
4366
2535
|
|
|
4367
2536
|
export declare interface UrlAttachment extends BaseAttachment {
|
|
4368
2537
|
url: string;
|
|
@@ -4402,71 +2571,11 @@ export declare function useBubbleContentRenderer(message: MaybeRefOrGetter<Bubbl
|
|
|
4402
2571
|
|
|
4403
2572
|
export declare function useBubbleStateChangeFn(): (key: string, _value: unknown) => void;
|
|
4404
2573
|
|
|
4405
|
-
/**
|
|
4406
|
-
* useEditor 返回类型
|
|
4407
|
-
*/
|
|
4408
|
-
export declare interface UseEditorReturn {
|
|
4409
|
-
/**
|
|
4410
|
-
* 编辑器实例
|
|
4411
|
-
* 注意:Tiptap 的 useEditor 返回 ShallowRef<Editor | undefined>
|
|
4412
|
-
*/
|
|
4413
|
-
editor: Ref<Editor | undefined>;
|
|
4414
|
-
/**
|
|
4415
|
-
* 编辑器 DOM 引用
|
|
4416
|
-
*/
|
|
4417
|
-
editorRef: Ref<HTMLElement | null>;
|
|
4418
|
-
}
|
|
4419
|
-
|
|
4420
|
-
/**
|
|
4421
|
-
* useKeyboardShortcuts Hook 参数
|
|
4422
|
-
*/
|
|
4423
|
-
export declare interface UseKeyboardShortcutsParams {
|
|
4424
|
-
submitType: Ref<SubmitTrigger>;
|
|
4425
|
-
canSubmit: Ref<boolean>;
|
|
4426
|
-
mode: Ref<InputMode>;
|
|
4427
|
-
submit: () => void;
|
|
4428
|
-
setMode: (mode: InputMode) => void;
|
|
4429
|
-
}
|
|
4430
|
-
|
|
4431
|
-
/**
|
|
4432
|
-
* useKeyboardShortcuts Hook 返回值
|
|
4433
|
-
*/
|
|
4434
|
-
export declare interface UseKeyboardShortcutsReturn {
|
|
4435
|
-
checkSubmitShortcut: (event: KeyboardEvent) => boolean;
|
|
4436
|
-
checkNewlineShortcut: (event: KeyboardEvent) => boolean;
|
|
4437
|
-
}
|
|
4438
|
-
|
|
4439
2574
|
export declare const useMessageContent: <T extends ChatMessageContent = ChatMessageContent>(props: Readonly<BubbleContentRendererProps<T>>) => {
|
|
4440
2575
|
content: ComputedRef<ChatMessageContentItem>;
|
|
4441
2576
|
contentText: ComputedRef<string>;
|
|
4442
2577
|
};
|
|
4443
2578
|
|
|
4444
|
-
/**
|
|
4445
|
-
* useModeSwitch 返回类型
|
|
4446
|
-
*/
|
|
4447
|
-
export declare interface UseModeSwitchReturn {
|
|
4448
|
-
/**
|
|
4449
|
-
* 当前模式
|
|
4450
|
-
*/
|
|
4451
|
-
currentMode: Ref<InputMode>;
|
|
4452
|
-
/**
|
|
4453
|
-
* 是否正在自动切换
|
|
4454
|
-
*/
|
|
4455
|
-
isAutoSwitching: Ref<boolean>;
|
|
4456
|
-
/**
|
|
4457
|
-
* 设置模式
|
|
4458
|
-
*
|
|
4459
|
-
* @param mode - 输入模式
|
|
4460
|
-
*/
|
|
4461
|
-
setMode: (mode: InputMode) => void;
|
|
4462
|
-
/**
|
|
4463
|
-
* 检查内容溢出
|
|
4464
|
-
*
|
|
4465
|
-
* 用于自动切换模式
|
|
4466
|
-
*/
|
|
4467
|
-
checkOverflow: () => void;
|
|
4468
|
-
}
|
|
4469
|
-
|
|
4470
2579
|
/**
|
|
4471
2580
|
* Omit specified fields from message and return computed props
|
|
4472
2581
|
* @param props - The original props containing the message
|
|
@@ -4478,82 +2587,16 @@ export declare function useOmitMessageFields<P extends BubbleContentRendererProp
|
|
|
4478
2587
|
restProps: ComputedRef<P>;
|
|
4479
2588
|
};
|
|
4480
2589
|
|
|
4481
|
-
declare type UserItem = UserTextItem | UserTemplateItem;
|
|
2590
|
+
export declare type UserItem = UserTextItem | UserTemplateItem;
|
|
4482
2591
|
|
|
4483
|
-
declare type UserTemplateItem = Omit<Pick<
|
|
4484
|
-
id?:
|
|
2592
|
+
export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
|
|
2593
|
+
id?: TemplateItem['id'];
|
|
4485
2594
|
};
|
|
4486
2595
|
|
|
4487
|
-
declare type UserTextItem = Omit<
|
|
4488
|
-
id?:
|
|
2596
|
+
export declare type UserTextItem = Omit<TextItem, 'id'> & {
|
|
2597
|
+
id?: TextItem['id'];
|
|
4489
2598
|
};
|
|
4490
2599
|
|
|
4491
|
-
/**
|
|
4492
|
-
* 获取 Sender Context
|
|
4493
|
-
*/
|
|
4494
|
-
export declare function useSenderContext(): SenderContext;
|
|
4495
|
-
|
|
4496
|
-
/**
|
|
4497
|
-
* useSenderContext 返回类型
|
|
4498
|
-
*/
|
|
4499
|
-
export declare type UseSenderContextReturn = SenderContext;
|
|
4500
|
-
|
|
4501
|
-
/**
|
|
4502
|
-
* useSuggestion 返回类型
|
|
4503
|
-
*/
|
|
4504
|
-
export declare interface UseSuggestionReturn {
|
|
4505
|
-
/**
|
|
4506
|
-
* 弹窗是否可见
|
|
4507
|
-
*/
|
|
4508
|
-
isPopupVisible: Ref<boolean>;
|
|
4509
|
-
/**
|
|
4510
|
-
* 当前激活的建议
|
|
4511
|
-
*/
|
|
4512
|
-
activeSuggestion: Ref<string>;
|
|
4513
|
-
/**
|
|
4514
|
-
* 键盘导航的激活索引
|
|
4515
|
-
*/
|
|
4516
|
-
activeKeyboardIndex: Ref<number>;
|
|
4517
|
-
/**
|
|
4518
|
-
* 鼠标悬停的激活索引
|
|
4519
|
-
*/
|
|
4520
|
-
activeMouseIndex: Ref<number>;
|
|
4521
|
-
/**
|
|
4522
|
-
* 自动补全文本
|
|
4523
|
-
*/
|
|
4524
|
-
autoCompleteText: Ref<string>;
|
|
4525
|
-
/**
|
|
4526
|
-
* 是否显示 Tab 提示器
|
|
4527
|
-
*/
|
|
4528
|
-
showTabIndicator: Ref<boolean>;
|
|
4529
|
-
/**
|
|
4530
|
-
* 应用建议
|
|
4531
|
-
*
|
|
4532
|
-
* @param suggestion - 建议内容
|
|
4533
|
-
*/
|
|
4534
|
-
applySuggestion: (suggestion: string) => void;
|
|
4535
|
-
/**
|
|
4536
|
-
* 键盘导航
|
|
4537
|
-
*
|
|
4538
|
-
* @param direction - 方向(上/下)
|
|
4539
|
-
*/
|
|
4540
|
-
navigateWithKeyboard: (direction: 'up' | 'down') => void;
|
|
4541
|
-
/**
|
|
4542
|
-
* 鼠标进入
|
|
4543
|
-
*
|
|
4544
|
-
* @param index - 建议项索引
|
|
4545
|
-
*/
|
|
4546
|
-
handleMouseEnter: (index: number) => void;
|
|
4547
|
-
/**
|
|
4548
|
-
* 鼠标离开
|
|
4549
|
-
*/
|
|
4550
|
-
handleMouseLeave: () => void;
|
|
4551
|
-
/**
|
|
4552
|
-
* 关闭弹窗
|
|
4553
|
-
*/
|
|
4554
|
-
closePopup: () => void;
|
|
4555
|
-
}
|
|
4556
|
-
|
|
4557
2600
|
export declare const useTheme: () => {
|
|
4558
2601
|
theme: Ref<string, string> | undefined;
|
|
4559
2602
|
colorMode: Ref<ColorMode, ColorMode> | undefined;
|
|
@@ -4601,74 +2644,6 @@ declare interface VoiceButtonConfig {
|
|
|
4601
2644
|
icon?: VNode | Component;
|
|
4602
2645
|
}
|
|
4603
2646
|
|
|
4604
|
-
/**
|
|
4605
|
-
* VoiceButton 组件 Emits
|
|
4606
|
-
*/
|
|
4607
|
-
export declare interface VoiceButtonEmits {
|
|
4608
|
-
(e: 'speech-start'): void;
|
|
4609
|
-
(e: 'speech-interim', transcript: string): void;
|
|
4610
|
-
(e: 'speech-final', transcript: string): void;
|
|
4611
|
-
(e: 'speech-end', transcript?: string): void;
|
|
4612
|
-
(e: 'speech-error', error: Error): void;
|
|
4613
|
-
}
|
|
4614
|
-
|
|
4615
|
-
/**
|
|
4616
|
-
* VoiceButton 组件 Props
|
|
4617
|
-
*/
|
|
4618
|
-
export declare interface VoiceButtonProps {
|
|
4619
|
-
/**
|
|
4620
|
-
* 自定义未录音状态的图标
|
|
4621
|
-
*
|
|
4622
|
-
* @default IconVoice
|
|
4623
|
-
*
|
|
4624
|
-
* @example 基础使用
|
|
4625
|
-
* ```vue
|
|
4626
|
-
* <VoiceButton :icon="IconMicrophone" />
|
|
4627
|
-
* ```
|
|
4628
|
-
*/
|
|
4629
|
-
icon?: VNode | Component;
|
|
4630
|
-
/**
|
|
4631
|
-
* 自定义录音中状态的图标
|
|
4632
|
-
*
|
|
4633
|
-
* @default IconRecordingWave
|
|
4634
|
-
*
|
|
4635
|
-
* @example 自定义录音中图标
|
|
4636
|
-
* ```vue
|
|
4637
|
-
* <VoiceButton :recording-icon="MyRecordingIcon" />
|
|
4638
|
-
* ```
|
|
4639
|
-
*/
|
|
4640
|
-
recordingIcon?: VNode | Component;
|
|
4641
|
-
/**
|
|
4642
|
-
* 是否禁用(会与 Context 的 disabled 合并)
|
|
4643
|
-
*/
|
|
4644
|
-
disabled?: boolean;
|
|
4645
|
-
/**
|
|
4646
|
-
* 按钮尺寸
|
|
4647
|
-
*/
|
|
4648
|
-
size?: 'small' | 'normal';
|
|
4649
|
-
/**
|
|
4650
|
-
* Tooltip 文本
|
|
4651
|
-
*/
|
|
4652
|
-
tooltip?: TooltipContent;
|
|
4653
|
-
/**
|
|
4654
|
-
* Tooltip 位置
|
|
4655
|
-
*/
|
|
4656
|
-
tooltipPlacement?: TooltipPlacement;
|
|
4657
|
-
/**
|
|
4658
|
-
* 语音配置
|
|
4659
|
-
*/
|
|
4660
|
-
speechConfig?: SpeechConfig;
|
|
4661
|
-
/**
|
|
4662
|
-
* 是否自动插入识别结果到编辑器
|
|
4663
|
-
* @default true
|
|
4664
|
-
*/
|
|
4665
|
-
autoInsert?: boolean;
|
|
4666
|
-
/**
|
|
4667
|
-
* 按钮点击拦截器(用于自定义 UI)
|
|
4668
|
-
*/
|
|
4669
|
-
onButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
4670
|
-
}
|
|
4671
|
-
|
|
4672
2647
|
export declare interface WelcomeProps {
|
|
4673
2648
|
title: string;
|
|
4674
2649
|
description: string;
|
|
@@ -4680,72 +2655,4 @@ export declare interface WelcomeSlots {
|
|
|
4680
2655
|
footer: () => unknown;
|
|
4681
2656
|
}
|
|
4682
2657
|
|
|
4683
|
-
/**
|
|
4684
|
-
* WordCounter Props
|
|
4685
|
-
*/
|
|
4686
|
-
export declare interface WordCounterProps {
|
|
4687
|
-
/**
|
|
4688
|
-
* 当前字符数
|
|
4689
|
-
*/
|
|
4690
|
-
current: number;
|
|
4691
|
-
/**
|
|
4692
|
-
* 最大字符数
|
|
4693
|
-
*/
|
|
4694
|
-
max: number;
|
|
4695
|
-
/**
|
|
4696
|
-
* 是否超出限制
|
|
4697
|
-
*/
|
|
4698
|
-
isOverLimit: boolean;
|
|
4699
|
-
}
|
|
4700
|
-
|
|
4701
2658
|
export { }
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
/**
|
|
4705
|
-
* 扩展 Tiptap Commands 接口
|
|
4706
|
-
*
|
|
4707
|
-
* 使 TypeScript 能够识别自定义命令
|
|
4708
|
-
*/
|
|
4709
|
-
declare module '@tiptap/core' {
|
|
4710
|
-
interface Commands<ReturnType> {
|
|
4711
|
-
mention: {
|
|
4712
|
-
/**
|
|
4713
|
-
* 插入 mention 节点
|
|
4714
|
-
*/
|
|
4715
|
-
insertMention: (attrs: Partial<MentionAttrs>) => ReturnType;
|
|
4716
|
-
/**
|
|
4717
|
-
* 删除 mention 节点
|
|
4718
|
-
*/
|
|
4719
|
-
deleteMention: (id: string) => ReturnType;
|
|
4720
|
-
};
|
|
4721
|
-
}
|
|
4722
|
-
}
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
/**
|
|
4726
|
-
* 扩展 Tiptap Commands 接口
|
|
4727
|
-
*
|
|
4728
|
-
* 使 TypeScript 能够识别自定义命令
|
|
4729
|
-
*/
|
|
4730
|
-
declare module '@tiptap/core' {
|
|
4731
|
-
interface Commands<ReturnType> {
|
|
4732
|
-
template: {
|
|
4733
|
-
/**
|
|
4734
|
-
* 设置模板数据(批量)
|
|
4735
|
-
*/
|
|
4736
|
-
setTemplateData: (items: TemplateItem[]) => ReturnType;
|
|
4737
|
-
/**
|
|
4738
|
-
* 插入模板块
|
|
4739
|
-
*/
|
|
4740
|
-
insertTemplate: (attrs: Partial<TemplateAttrs>) => ReturnType;
|
|
4741
|
-
/**
|
|
4742
|
-
* 聚焦到第一个模板块
|
|
4743
|
-
*/
|
|
4744
|
-
focusFirstTemplate: () => ReturnType;
|
|
4745
|
-
/**
|
|
4746
|
-
* 插入选择器
|
|
4747
|
-
*/
|
|
4748
|
-
insertTemplateSelect: (attrs: Partial<TemplateSelectAttrs>) => ReturnType;
|
|
4749
|
-
};
|
|
4750
|
-
}
|
|
4751
|
-
}
|