@opentiny/tiny-robot 0.4.0-alpha.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -14,21 +14,22 @@ import { CSSProperties } from 'vue';
14
14
  import { DebuggerEvent } from 'vue';
15
15
  import { DefineComponent } from 'vue';
16
16
  import { Directive } from 'vue';
17
- import { ExtractPropTypes } from 'vue';
17
+ import { Editor } from '@tiptap/vue-3';
18
+ import { Editor as Editor_2 } from '@tiptap/core';
19
+ import { Extension } from '@tiptap/core';
18
20
  import { GlobalComponents } from 'vue';
19
21
  import { GlobalDirectives } from 'vue';
20
22
  import { MaybeComputedElementRef } from '@vueuse/core';
21
23
  import { MaybeRefOrGetter } from 'vue';
22
24
  import { nextTick } from 'vue';
25
+ import { Node as Node_2 } from '@tiptap/core';
23
26
  import { OnCleanup } from '@vue/reactivity';
24
- import { PropType } from 'vue';
25
27
  import { PublicProps } from 'vue';
26
28
  import { Ref } from 'vue';
27
- import { RendererElement } from 'vue';
28
- import { RendererNode } from 'vue';
29
29
  import { ShallowUnwrapRef } from 'vue';
30
30
  import { Slot } from 'vue';
31
31
  import { TransitionProps } from 'vue';
32
+ import { UseFileDialogOptions } from '@vueuse/core';
32
33
  import { VNode } from 'vue';
33
34
  import { VNodeProps } from 'vue';
34
35
  import { WatchOptions } from 'vue';
@@ -279,6 +280,33 @@ allowPluginAdd: boolean;
279
280
  marketLoading: boolean;
280
281
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
281
282
 
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
+
282
310
  declare const __VLS_component_2: DefineComponent<BubbleListProps, {
283
311
  scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
284
312
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
@@ -435,14 +463,14 @@ declare const __VLS_component_7: DefineComponent<PromptsProps, {}, {}, {}, {}, C
435
463
  "onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
436
464
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
437
465
 
438
- declare const __VLS_component_8: DefineComponent<SenderProps, {
466
+ declare const __VLS_component_8: DefineComponent<SenderProps_2, {
439
467
  focus: () => void;
440
468
  blur: () => void;
441
469
  clear: () => void;
442
470
  submit: () => void;
471
+ setTemplateData: (templateData: UserTemplateItem[]) => void;
443
472
  startSpeech: () => void;
444
473
  stopSpeech: () => void;
445
- activateTemplateFirstField: () => void;
446
474
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
447
475
  clear: () => any;
448
476
  blur: (event: FocusEvent) => any;
@@ -450,544 +478,270 @@ cancel: () => any;
450
478
  focus: (event: FocusEvent) => any;
451
479
  submit: (value: string) => any;
452
480
  "update:modelValue": (value: string) => any;
453
- "update:templateData": (value: UserItem[]) => any;
454
481
  "speech-start": () => any;
455
- "speech-end": (transcript?: string | undefined) => any;
456
482
  "speech-interim": (transcript: string) => any;
483
+ "speech-end": (transcript?: string | undefined) => any;
457
484
  "speech-error": (error: Error) => any;
485
+ "update:templateData": (value: UserItem[]) => any;
458
486
  "suggestion-select": (value: string) => any;
459
487
  "escape-press": () => any;
460
488
  "reset-template": () => any;
461
489
  "files-selected": (files: File[]) => any;
462
- }, string, PublicProps, Readonly<SenderProps> & Readonly<{
490
+ }, string, PublicProps, Readonly<SenderProps_2> & Readonly<{
463
491
  onClear?: (() => any) | undefined;
464
492
  onBlur?: ((event: FocusEvent) => any) | undefined;
465
493
  onCancel?: (() => any) | undefined;
466
494
  onFocus?: ((event: FocusEvent) => any) | undefined;
467
495
  onSubmit?: ((value: string) => any) | undefined;
468
496
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
469
- "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
470
497
  "onSpeech-start"?: (() => any) | undefined;
471
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
472
498
  "onSpeech-interim"?: ((transcript: string) => any) | undefined;
499
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
473
500
  "onSpeech-error"?: ((error: Error) => any) | undefined;
501
+ "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
474
502
  "onSuggestion-select"?: ((value: string) => any) | undefined;
475
503
  "onEscape-press"?: (() => any) | undefined;
476
504
  "onReset-template"?: (() => any) | undefined;
477
505
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
478
506
  }>, {
479
- disabled: boolean;
480
- modelValue: string;
481
507
  placeholder: string;
482
- loading: boolean;
483
508
  mode: InputMode;
484
- autofocus: boolean;
485
- allowSpeech: boolean;
486
- allowFiles: boolean;
487
509
  submitType: SubmitTrigger;
488
- stopText: string;
489
- autoSize: AutoSize;
490
- suggestions: ISuggestionItem[];
491
- clearable: boolean;
492
- maxLength: number;
493
- showWordLimit: boolean;
494
- suggestionPopupWidth: string | number;
495
- theme: ThemeType;
496
- templateData: UserItem[];
497
510
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
498
- senderRef: HTMLDivElement;
499
- inputWrapperRef: HTMLDivElement;
500
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
501
- modelValue?: UserItem[];
502
- } & {
503
- autoSize: boolean | {
504
- minRows: number;
505
- maxRows: number;
511
+ senderRef: ({
512
+ $: ComponentInternalInstance;
513
+ $data: {};
514
+ $props: {
515
+ readonly modelValue?: string | undefined;
516
+ readonly defaultValue?: string | undefined;
517
+ readonly placeholder?: string | undefined;
518
+ readonly disabled?: boolean | undefined;
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;
506
545
  };
507
- }> & Readonly<{
508
- onSubmit?: (() => any) | undefined;
509
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
546
+ $slots: Readonly<{
547
+ [name: string]: Slot<any> | undefined;
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;
510
562
  }>, {
511
- clearHistory: () => void;
512
- activateFirstField: () => void;
513
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
514
- "update:modelValue": (value: UserItem[]) => any;
515
- } & {
516
- submit: () => any;
517
- }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
518
- editorRef: HTMLDivElement;
519
- }, HTMLDivElement, ComponentProvideOptions, {
520
- P: {};
521
- B: {};
522
- D: {};
523
- C: {};
524
- M: {};
525
- Defaults: {};
526
- }, Readonly<{
527
- modelValue?: UserItem[];
528
- } & {
529
- autoSize: boolean | {
530
- minRows: number;
531
- maxRows: number;
563
+ submit: () => void;
564
+ clear: () => void;
565
+ cancel: () => void;
566
+ focus: () => void;
567
+ blur: () => void;
568
+ setContent: (content: string) => void;
569
+ getContent: () => string;
570
+ editor: SenderContext["editor"];
571
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
572
+ clear: () => any;
573
+ input: (value: string) => any;
574
+ blur: (event: FocusEvent) => any;
575
+ cancel: () => any;
576
+ focus: (event: FocusEvent) => any;
577
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
578
+ "update:modelValue": (value: string) => any;
579
+ }, string, {
580
+ size: "normal" | "small";
581
+ placeholder: string;
582
+ mode: InputMode;
583
+ enterkeyhint: EnterKeyHint;
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;
532
673
  };
533
- }> & Readonly<{
534
- onSubmit?: (() => any) | undefined;
535
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
674
+ $slots: Readonly<{
675
+ [name: string]: Slot<any> | undefined;
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;
536
688
  }>, {
537
- clearHistory: () => void;
538
- activateFirstField: () => void;
539
- }, {}, {}, {}, {}> | null;
540
- inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
541
- _constants: {
542
- type: ObjectConstructor;
543
- default: () => {
544
- INPUT_PC: string;
545
- INPUTGROUP_PC: string;
546
- INPUT_MOBILE: string;
547
- INPUTGROUP_MOBILE: string;
548
- Mode: string;
549
- inputMode(mode: any): string;
550
- inputGroupMode(mode: any): string;
551
- VALIDATE_ICON: {
552
- Validating: string;
553
- Success: string;
554
- Error: string;
555
- };
556
- COMPONENT_NAME: {
557
- FormItem: string;
558
- };
559
- MASKSYMBOL: string;
560
- TEXTAREA_HEIGHT_MOBILE: number;
561
- };
562
- };
563
- name: StringConstructor;
564
- size: StringConstructor;
565
- form: StringConstructor;
566
- label: StringConstructor;
567
- height: NumberConstructor;
568
- resize: StringConstructor;
569
- tabindex: {
570
- type: StringConstructor;
571
- default: string;
572
- };
573
- disabled: BooleanConstructor;
574
- readonly: BooleanConstructor;
575
- hoverExpand: BooleanConstructor;
576
- mask: BooleanConstructor;
577
- suffixIcon: (StringConstructor | ObjectConstructor)[];
578
- prefixIcon: (StringConstructor | ObjectConstructor)[];
579
- modelValue: PropType<string | number | null>;
580
- type: {
581
- type: StringConstructor;
582
- default: string;
583
- };
584
- memorySpace: {
585
- type: NumberConstructor;
586
- default: number;
587
- };
588
- vertical: {
589
- type: BooleanConstructor;
590
- default: boolean;
591
- };
592
- selectMenu: {
593
- type: {
594
- (arrayLength: number): {
595
- id: string;
596
- label: string;
597
- }[];
598
- (...items: {
599
- id: string;
600
- label: string;
601
- }[]): {
602
- id: string;
603
- label: string;
604
- }[];
605
- new (arrayLength: number): {
606
- id: string;
607
- label: string;
608
- }[];
609
- new (...items: {
610
- id: string;
611
- label: string;
612
- }[]): {
613
- id: string;
614
- label: string;
615
- }[];
616
- isArray(arg: any): arg is any[];
617
- readonly prototype: any[];
618
- from<T>(arrayLike: ArrayLike<T>): T[];
619
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
620
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
621
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
622
- of<T_4>(...items: T_4[]): T_4[];
623
- readonly [Symbol.species]: ArrayConstructor;
624
- };
625
- default: () => never[];
626
- };
627
- ellipsis: {
628
- type: BooleanConstructor;
629
- default: boolean;
630
- };
631
- contentStyle: {
632
- type: ObjectConstructor;
633
- default: () => {};
634
- };
635
- isSelect: {
636
- type: BooleanConstructor;
637
- default: boolean;
638
- };
639
- tips: StringConstructor;
640
- counter: {
641
- type: BooleanConstructor;
642
- default: boolean;
643
- };
644
- autosize: {
645
- type: (BooleanConstructor | ObjectConstructor)[];
646
- default: boolean;
647
- };
648
- clearable: {
649
- type: BooleanConstructor;
650
- default: boolean;
651
- };
652
- autocomplete: {
653
- type: StringConstructor;
654
- default: string;
655
- };
656
- showPassword: {
657
- type: BooleanConstructor;
658
- default: boolean;
659
- };
660
- showWordLimit: {
661
- type: BooleanConstructor;
662
- default: boolean;
663
- };
664
- showTitle: {
665
- type: BooleanConstructor;
666
- default: boolean;
667
- };
668
- validateEvent: {
669
- type: BooleanConstructor;
670
- default: boolean;
671
- };
672
- popupMore: {
673
- type: BooleanConstructor;
674
- default: boolean;
675
- };
676
- textareaTitle: {
677
- type: StringConstructor;
678
- default: string;
679
- };
680
- displayOnly: {
681
- type: BooleanConstructor;
682
- default: boolean;
683
- };
684
- displayOnlyContent: {
685
- type: StringConstructor;
686
- default: string;
687
- };
688
- customClass: {
689
- type: StringConstructor;
690
- default: string;
691
- };
692
- frontClearIcon: {
693
- type: BooleanConstructor;
694
- default: boolean;
695
- };
696
- showEmptyValue: {
697
- type: BooleanConstructor;
698
- default: undefined;
699
- };
700
- textAlign: {
701
- type: StringConstructor;
702
- default: string;
703
- };
704
- width: {
705
- type: PropType<string | number | null>;
706
- };
707
- showTooltip: {
708
- type: BooleanConstructor;
709
- default: boolean;
710
- };
711
- inputBoxType: {
712
- type: StringConstructor;
713
- default: string;
714
- validator: (value: string) => boolean;
715
- };
716
- tiny_mode: StringConstructor;
717
- tiny_mode_root: BooleanConstructor;
718
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
719
- tiny_renderless: FunctionConstructor;
720
- tiny_theme: StringConstructor;
721
- tiny_mcp_config: ObjectConstructor;
722
- tiny_chart_theme: ObjectConstructor;
723
- }>>, () => VNode<RendererNode, RendererElement, {
724
- [key: string]: any;
725
- }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
726
- disabled: boolean;
727
- type: string;
728
- ellipsis: boolean;
729
- mask: boolean;
730
- vertical: boolean;
731
- customClass: string;
732
- tiny_mode_root: boolean;
733
- _constants: Record<string, any>;
734
- tabindex: string;
735
- showTitle: boolean;
736
- readonly: boolean;
737
- hoverExpand: boolean;
738
- memorySpace: number;
739
- selectMenu: {
740
- id: string;
741
- label: string;
742
- }[];
743
- contentStyle: Record<string, any>;
744
- isSelect: boolean;
745
- counter: boolean;
746
- autosize: boolean | Record<string, any>;
747
- clearable: boolean;
748
- autocomplete: string;
749
- showPassword: boolean;
750
- showWordLimit: boolean;
751
- validateEvent: boolean;
752
- popupMore: boolean;
753
- textareaTitle: string;
754
- displayOnly: boolean;
755
- displayOnlyContent: string;
756
- frontClearIcon: boolean;
757
- showEmptyValue: boolean;
758
- textAlign: string;
759
- showTooltip: boolean;
760
- inputBoxType: string;
761
- }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
762
- P: {};
763
- B: {};
764
- D: {};
765
- C: {};
766
- M: {};
767
- Defaults: {};
768
- }, Readonly<ExtractPropTypes< {
769
- _constants: {
770
- type: ObjectConstructor;
771
- default: () => {
772
- INPUT_PC: string;
773
- INPUTGROUP_PC: string;
774
- INPUT_MOBILE: string;
775
- INPUTGROUP_MOBILE: string;
776
- Mode: string;
777
- inputMode(mode: any): string;
778
- inputGroupMode(mode: any): string;
779
- VALIDATE_ICON: {
780
- Validating: string;
781
- Success: string;
782
- Error: string;
783
- };
784
- COMPONENT_NAME: {
785
- FormItem: string;
786
- };
787
- MASKSYMBOL: string;
788
- TEXTAREA_HEIGHT_MOBILE: number;
789
- };
790
- };
791
- name: StringConstructor;
792
- size: StringConstructor;
793
- form: StringConstructor;
794
- label: StringConstructor;
795
- height: NumberConstructor;
796
- resize: StringConstructor;
797
- tabindex: {
798
- type: StringConstructor;
799
- default: string;
800
- };
801
- disabled: BooleanConstructor;
802
- readonly: BooleanConstructor;
803
- hoverExpand: BooleanConstructor;
804
- mask: BooleanConstructor;
805
- suffixIcon: (StringConstructor | ObjectConstructor)[];
806
- prefixIcon: (StringConstructor | ObjectConstructor)[];
807
- modelValue: PropType<string | number | null>;
808
- type: {
809
- type: StringConstructor;
810
- default: string;
811
- };
812
- memorySpace: {
813
- type: NumberConstructor;
814
- default: number;
815
- };
816
- vertical: {
817
- type: BooleanConstructor;
818
- default: boolean;
819
- };
820
- selectMenu: {
821
- type: {
822
- (arrayLength: number): {
823
- id: string;
824
- label: string;
825
- }[];
826
- (...items: {
827
- id: string;
828
- label: string;
829
- }[]): {
830
- id: string;
831
- label: string;
832
- }[];
833
- new (arrayLength: number): {
834
- id: string;
835
- label: string;
836
- }[];
837
- new (...items: {
838
- id: string;
839
- label: string;
840
- }[]): {
841
- id: string;
842
- label: string;
843
- }[];
844
- isArray(arg: any): arg is any[];
845
- readonly prototype: any[];
846
- from<T>(arrayLike: ArrayLike<T>): T[];
847
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
848
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
849
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
850
- of<T_4>(...items: T_4[]): T_4[];
851
- readonly [Symbol.species]: ArrayConstructor;
852
- };
853
- default: () => never[];
854
- };
855
- ellipsis: {
856
- type: BooleanConstructor;
857
- default: boolean;
858
- };
859
- contentStyle: {
860
- type: ObjectConstructor;
861
- default: () => {};
862
- };
863
- isSelect: {
864
- type: BooleanConstructor;
865
- default: boolean;
866
- };
867
- tips: StringConstructor;
868
- counter: {
869
- type: BooleanConstructor;
870
- default: boolean;
871
- };
872
- autosize: {
873
- type: (BooleanConstructor | ObjectConstructor)[];
874
- default: boolean;
875
- };
876
- clearable: {
877
- type: BooleanConstructor;
878
- default: boolean;
879
- };
880
- autocomplete: {
881
- type: StringConstructor;
882
- default: string;
883
- };
884
- showPassword: {
885
- type: BooleanConstructor;
886
- default: boolean;
887
- };
888
- showWordLimit: {
889
- type: BooleanConstructor;
890
- default: boolean;
891
- };
892
- showTitle: {
893
- type: BooleanConstructor;
894
- default: boolean;
895
- };
896
- validateEvent: {
897
- type: BooleanConstructor;
898
- default: boolean;
899
- };
900
- popupMore: {
901
- type: BooleanConstructor;
902
- default: boolean;
903
- };
904
- textareaTitle: {
905
- type: StringConstructor;
906
- default: string;
907
- };
908
- displayOnly: {
909
- type: BooleanConstructor;
910
- default: boolean;
911
- };
912
- displayOnlyContent: {
913
- type: StringConstructor;
914
- default: string;
915
- };
916
- customClass: {
917
- type: StringConstructor;
918
- default: string;
919
- };
920
- frontClearIcon: {
921
- type: BooleanConstructor;
922
- default: boolean;
923
- };
924
- showEmptyValue: {
925
- type: BooleanConstructor;
926
- default: undefined;
927
- };
928
- textAlign: {
929
- type: StringConstructor;
930
- default: string;
931
- };
932
- width: {
933
- type: PropType<string | number | null>;
934
- };
935
- showTooltip: {
936
- type: BooleanConstructor;
937
- default: boolean;
938
- };
939
- inputBoxType: {
940
- type: StringConstructor;
941
- default: string;
942
- validator: (value: string) => boolean;
943
- };
944
- tiny_mode: StringConstructor;
945
- tiny_mode_root: BooleanConstructor;
946
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
947
- tiny_renderless: FunctionConstructor;
948
- tiny_theme: StringConstructor;
949
- tiny_mcp_config: ObjectConstructor;
950
- tiny_chart_theme: ObjectConstructor;
951
- }>>, () => VNode<RendererNode, RendererElement, {
952
- [key: string]: any;
953
- }>, {}, {}, {}, {
954
- disabled: boolean;
955
- type: string;
956
- ellipsis: boolean;
957
- mask: boolean;
958
- vertical: boolean;
959
- customClass: string;
960
- tiny_mode_root: boolean;
961
- _constants: Record<string, any>;
962
- tabindex: string;
963
- showTitle: boolean;
964
- readonly: boolean;
965
- hoverExpand: boolean;
966
- memorySpace: number;
967
- selectMenu: {
968
- id: string;
969
- label: string;
970
- }[];
971
- contentStyle: Record<string, any>;
972
- isSelect: boolean;
973
- counter: boolean;
974
- autosize: boolean | Record<string, any>;
975
- clearable: boolean;
976
- autocomplete: string;
977
- showPassword: boolean;
978
- showWordLimit: boolean;
979
- validateEvent: boolean;
980
- popupMore: boolean;
981
- textareaTitle: string;
982
- displayOnly: boolean;
983
- displayOnlyContent: string;
984
- frontClearIcon: boolean;
985
- showEmptyValue: boolean;
986
- textAlign: string;
987
- showTooltip: boolean;
988
- inputBoxType: string;
989
- }> | null;
990
- buttonsContainerRef: HTMLDivElement;
689
+ start: () => void;
690
+ stop: () => void;
691
+ speechState: SpeechState;
692
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
693
+ "speech-start": () => any;
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;
991
745
  }, HTMLDivElement>;
992
746
 
993
747
  declare const __VLS_component_9: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
@@ -1200,6 +954,31 @@ declare function __VLS_template_14(): {
1200
954
  rootEl: any;
1201
955
  };
1202
956
 
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
+
1203
982
  declare function __VLS_template_2(): {
1204
983
  attrs: Partial<{}>;
1205
984
  slots: Readonly<BubbleListSlots> & BubbleListSlots;
@@ -1350,507 +1129,249 @@ declare function __VLS_template_8(): {
1350
1129
  slots: {
1351
1130
  header?(_: {}): any;
1352
1131
  prefix?(_: {}): any;
1353
- content?(_: {}): any;
1354
- decorativeContent?(_: {}): any;
1132
+ content?(_: {
1133
+ editor: Ref<Editor | undefined, Editor | undefined>;
1134
+ }): any;
1355
1135
  actions?(_: {}): any;
1356
1136
  'footer-left'?(_: {}): any;
1357
- 'footer-right'?(_: {}): any;
1358
1137
  footer?(_: {}): any;
1138
+ 'footer-right'?(_: {}): any;
1359
1139
  };
1360
1140
  refs: {
1361
- senderRef: HTMLDivElement;
1362
- inputWrapperRef: HTMLDivElement;
1363
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
1364
- modelValue?: UserItem[];
1365
- } & {
1366
- autoSize: boolean | {
1367
- minRows: number;
1368
- maxRows: number;
1369
- };
1370
- }> & Readonly<{
1371
- onSubmit?: (() => any) | undefined;
1372
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1373
- }>, {
1374
- clearHistory: () => void;
1375
- activateFirstField: () => void;
1376
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1377
- "update:modelValue": (value: UserItem[]) => any;
1378
- } & {
1379
- submit: () => any;
1380
- }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
1381
- editorRef: HTMLDivElement;
1382
- }, HTMLDivElement, ComponentProvideOptions, {
1383
- P: {};
1384
- B: {};
1385
- D: {};
1386
- C: {};
1387
- M: {};
1388
- Defaults: {};
1389
- }, Readonly<{
1390
- modelValue?: UserItem[];
1391
- } & {
1392
- autoSize: boolean | {
1393
- minRows: number;
1394
- maxRows: number;
1395
- };
1396
- }> & Readonly<{
1397
- onSubmit?: (() => any) | undefined;
1398
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1399
- }>, {
1400
- clearHistory: () => void;
1401
- activateFirstField: () => void;
1402
- }, {}, {}, {}, {}> | null;
1403
- inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
1404
- _constants: {
1405
- type: ObjectConstructor;
1406
- default: () => {
1407
- INPUT_PC: string;
1408
- INPUTGROUP_PC: string;
1409
- INPUT_MOBILE: string;
1410
- INPUTGROUP_MOBILE: string;
1411
- Mode: string;
1412
- inputMode(mode: any): string;
1413
- inputGroupMode(mode: any): string;
1414
- VALIDATE_ICON: {
1415
- Validating: string;
1416
- Success: string;
1417
- Error: string;
1418
- };
1419
- COMPONENT_NAME: {
1420
- FormItem: string;
1421
- };
1422
- MASKSYMBOL: string;
1423
- TEXTAREA_HEIGHT_MOBILE: number;
1424
- };
1425
- };
1426
- name: StringConstructor;
1427
- size: StringConstructor;
1428
- form: StringConstructor;
1429
- label: StringConstructor;
1430
- height: NumberConstructor;
1431
- resize: StringConstructor;
1432
- tabindex: {
1433
- type: StringConstructor;
1434
- default: string;
1435
- };
1436
- disabled: BooleanConstructor;
1437
- readonly: BooleanConstructor;
1438
- hoverExpand: BooleanConstructor;
1439
- mask: BooleanConstructor;
1440
- suffixIcon: (StringConstructor | ObjectConstructor)[];
1441
- prefixIcon: (StringConstructor | ObjectConstructor)[];
1442
- modelValue: PropType<string | number | null>;
1443
- type: {
1444
- type: StringConstructor;
1445
- default: string;
1446
- };
1447
- memorySpace: {
1448
- type: NumberConstructor;
1449
- default: number;
1450
- };
1451
- vertical: {
1452
- type: BooleanConstructor;
1453
- default: boolean;
1454
- };
1455
- selectMenu: {
1456
- type: {
1457
- (arrayLength: number): {
1458
- id: string;
1459
- label: string;
1460
- }[];
1461
- (...items: {
1462
- id: string;
1463
- label: string;
1464
- }[]): {
1465
- id: string;
1466
- label: string;
1467
- }[];
1468
- new (arrayLength: number): {
1469
- id: string;
1470
- label: string;
1471
- }[];
1472
- new (...items: {
1473
- id: string;
1474
- label: string;
1475
- }[]): {
1476
- id: string;
1477
- label: string;
1478
- }[];
1479
- isArray(arg: any): arg is any[];
1480
- readonly prototype: any[];
1481
- from<T>(arrayLike: ArrayLike<T>): T[];
1482
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1483
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1484
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1485
- of<T_4>(...items: T_4[]): T_4[];
1486
- readonly [Symbol.species]: ArrayConstructor;
1487
- };
1488
- default: () => never[];
1489
- };
1490
- ellipsis: {
1491
- type: BooleanConstructor;
1492
- default: boolean;
1493
- };
1494
- contentStyle: {
1495
- type: ObjectConstructor;
1496
- default: () => {};
1497
- };
1498
- isSelect: {
1499
- type: BooleanConstructor;
1500
- default: boolean;
1501
- };
1502
- tips: StringConstructor;
1503
- counter: {
1504
- type: BooleanConstructor;
1505
- default: boolean;
1506
- };
1507
- autosize: {
1508
- type: (BooleanConstructor | ObjectConstructor)[];
1509
- default: boolean;
1510
- };
1511
- clearable: {
1512
- type: BooleanConstructor;
1513
- default: boolean;
1514
- };
1515
- autocomplete: {
1516
- type: StringConstructor;
1517
- default: string;
1518
- };
1519
- showPassword: {
1520
- type: BooleanConstructor;
1521
- default: boolean;
1522
- };
1523
- showWordLimit: {
1524
- type: BooleanConstructor;
1525
- default: boolean;
1526
- };
1527
- showTitle: {
1528
- type: BooleanConstructor;
1529
- default: boolean;
1530
- };
1531
- validateEvent: {
1532
- type: BooleanConstructor;
1533
- default: boolean;
1534
- };
1535
- popupMore: {
1536
- type: BooleanConstructor;
1537
- default: boolean;
1538
- };
1539
- textareaTitle: {
1540
- type: StringConstructor;
1541
- default: string;
1542
- };
1543
- displayOnly: {
1544
- type: BooleanConstructor;
1545
- default: boolean;
1546
- };
1547
- displayOnlyContent: {
1548
- type: StringConstructor;
1549
- default: string;
1550
- };
1551
- customClass: {
1552
- type: StringConstructor;
1553
- default: string;
1554
- };
1555
- frontClearIcon: {
1556
- type: BooleanConstructor;
1557
- default: boolean;
1558
- };
1559
- showEmptyValue: {
1560
- type: BooleanConstructor;
1561
- default: undefined;
1562
- };
1563
- textAlign: {
1564
- type: StringConstructor;
1565
- default: string;
1566
- };
1567
- width: {
1568
- type: PropType<string | number | null>;
1569
- };
1570
- showTooltip: {
1571
- type: BooleanConstructor;
1572
- default: boolean;
1573
- };
1574
- inputBoxType: {
1575
- type: StringConstructor;
1576
- default: string;
1577
- validator: (value: string) => boolean;
1578
- };
1579
- tiny_mode: StringConstructor;
1580
- tiny_mode_root: BooleanConstructor;
1581
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
1582
- tiny_renderless: FunctionConstructor;
1583
- tiny_theme: StringConstructor;
1584
- tiny_mcp_config: ObjectConstructor;
1585
- tiny_chart_theme: ObjectConstructor;
1586
- }>>, () => VNode<RendererNode, RendererElement, {
1587
- [key: string]: any;
1588
- }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
1589
- disabled: boolean;
1590
- type: string;
1591
- ellipsis: boolean;
1592
- mask: boolean;
1593
- vertical: boolean;
1594
- customClass: string;
1595
- tiny_mode_root: boolean;
1596
- _constants: Record<string, any>;
1597
- tabindex: string;
1598
- showTitle: boolean;
1599
- readonly: boolean;
1600
- hoverExpand: boolean;
1601
- memorySpace: number;
1602
- selectMenu: {
1603
- id: string;
1604
- label: string;
1605
- }[];
1606
- contentStyle: Record<string, any>;
1607
- isSelect: boolean;
1608
- counter: boolean;
1609
- autosize: boolean | Record<string, any>;
1610
- clearable: boolean;
1611
- autocomplete: string;
1612
- showPassword: boolean;
1613
- showWordLimit: boolean;
1614
- validateEvent: boolean;
1615
- popupMore: boolean;
1616
- textareaTitle: string;
1617
- displayOnly: boolean;
1618
- displayOnlyContent: string;
1619
- frontClearIcon: boolean;
1620
- showEmptyValue: boolean;
1621
- textAlign: string;
1622
- showTooltip: boolean;
1623
- inputBoxType: string;
1624
- }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1625
- P: {};
1626
- B: {};
1627
- D: {};
1628
- C: {};
1629
- M: {};
1630
- Defaults: {};
1631
- }, Readonly<ExtractPropTypes< {
1632
- _constants: {
1633
- type: ObjectConstructor;
1634
- default: () => {
1635
- INPUT_PC: string;
1636
- INPUTGROUP_PC: string;
1637
- INPUT_MOBILE: string;
1638
- INPUTGROUP_MOBILE: string;
1639
- Mode: string;
1640
- inputMode(mode: any): string;
1641
- inputGroupMode(mode: any): string;
1642
- VALIDATE_ICON: {
1643
- Validating: string;
1644
- Success: string;
1645
- Error: string;
1646
- };
1647
- COMPONENT_NAME: {
1648
- FormItem: string;
1649
- };
1650
- MASKSYMBOL: string;
1651
- TEXTAREA_HEIGHT_MOBILE: number;
1652
- };
1653
- };
1654
- name: StringConstructor;
1655
- size: StringConstructor;
1656
- form: StringConstructor;
1657
- label: StringConstructor;
1658
- height: NumberConstructor;
1659
- resize: StringConstructor;
1660
- tabindex: {
1661
- type: StringConstructor;
1662
- default: string;
1663
- };
1664
- disabled: BooleanConstructor;
1665
- readonly: BooleanConstructor;
1666
- hoverExpand: BooleanConstructor;
1667
- mask: BooleanConstructor;
1668
- suffixIcon: (StringConstructor | ObjectConstructor)[];
1669
- prefixIcon: (StringConstructor | ObjectConstructor)[];
1670
- modelValue: PropType<string | number | null>;
1671
- type: {
1672
- type: StringConstructor;
1673
- default: string;
1674
- };
1675
- memorySpace: {
1676
- type: NumberConstructor;
1677
- default: number;
1678
- };
1679
- vertical: {
1680
- type: BooleanConstructor;
1681
- default: boolean;
1682
- };
1683
- selectMenu: {
1684
- type: {
1685
- (arrayLength: number): {
1686
- id: string;
1687
- label: string;
1688
- }[];
1689
- (...items: {
1690
- id: string;
1691
- label: string;
1692
- }[]): {
1693
- id: string;
1694
- label: string;
1695
- }[];
1696
- new (arrayLength: number): {
1697
- id: string;
1698
- label: string;
1699
- }[];
1700
- new (...items: {
1701
- id: string;
1702
- label: string;
1703
- }[]): {
1704
- id: string;
1705
- label: string;
1706
- }[];
1707
- isArray(arg: any): arg is any[];
1708
- readonly prototype: any[];
1709
- from<T>(arrayLike: ArrayLike<T>): T[];
1710
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1711
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1712
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1713
- of<T_4>(...items: T_4[]): T_4[];
1714
- readonly [Symbol.species]: ArrayConstructor;
1715
- };
1716
- default: () => never[];
1717
- };
1718
- ellipsis: {
1719
- type: BooleanConstructor;
1720
- default: boolean;
1721
- };
1722
- contentStyle: {
1723
- type: ObjectConstructor;
1724
- default: () => {};
1725
- };
1726
- isSelect: {
1727
- type: BooleanConstructor;
1728
- default: boolean;
1729
- };
1730
- tips: StringConstructor;
1731
- counter: {
1732
- type: BooleanConstructor;
1733
- default: boolean;
1734
- };
1735
- autosize: {
1736
- type: (BooleanConstructor | ObjectConstructor)[];
1737
- default: boolean;
1738
- };
1739
- clearable: {
1740
- type: BooleanConstructor;
1741
- default: boolean;
1742
- };
1743
- autocomplete: {
1744
- type: StringConstructor;
1745
- default: string;
1746
- };
1747
- showPassword: {
1748
- type: BooleanConstructor;
1749
- default: boolean;
1750
- };
1751
- showWordLimit: {
1752
- type: BooleanConstructor;
1753
- default: boolean;
1754
- };
1755
- showTitle: {
1756
- type: BooleanConstructor;
1757
- default: boolean;
1758
- };
1759
- validateEvent: {
1760
- type: BooleanConstructor;
1761
- default: boolean;
1762
- };
1763
- popupMore: {
1764
- type: BooleanConstructor;
1765
- default: boolean;
1766
- };
1767
- textareaTitle: {
1768
- type: StringConstructor;
1769
- default: string;
1770
- };
1771
- displayOnly: {
1772
- type: BooleanConstructor;
1773
- default: boolean;
1774
- };
1775
- displayOnlyContent: {
1776
- type: StringConstructor;
1777
- default: string;
1778
- };
1779
- customClass: {
1780
- type: StringConstructor;
1781
- default: string;
1782
- };
1783
- frontClearIcon: {
1784
- type: BooleanConstructor;
1785
- default: boolean;
1786
- };
1787
- showEmptyValue: {
1788
- type: BooleanConstructor;
1789
- default: undefined;
1790
- };
1791
- textAlign: {
1792
- type: StringConstructor;
1793
- default: string;
1794
- };
1795
- width: {
1796
- type: PropType<string | number | null>;
1797
- };
1798
- showTooltip: {
1799
- type: BooleanConstructor;
1800
- default: boolean;
1801
- };
1802
- inputBoxType: {
1803
- type: StringConstructor;
1804
- default: string;
1805
- validator: (value: string) => boolean;
1806
- };
1807
- tiny_mode: StringConstructor;
1808
- tiny_mode_root: BooleanConstructor;
1809
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
1810
- tiny_renderless: FunctionConstructor;
1811
- tiny_theme: StringConstructor;
1812
- tiny_mcp_config: ObjectConstructor;
1813
- tiny_chart_theme: ObjectConstructor;
1814
- }>>, () => VNode<RendererNode, RendererElement, {
1815
- [key: string]: any;
1816
- }>, {}, {}, {}, {
1817
- disabled: boolean;
1818
- type: string;
1819
- ellipsis: boolean;
1820
- mask: boolean;
1821
- vertical: boolean;
1822
- customClass: string;
1823
- tiny_mode_root: boolean;
1824
- _constants: Record<string, any>;
1825
- tabindex: string;
1826
- showTitle: boolean;
1827
- readonly: boolean;
1828
- hoverExpand: boolean;
1829
- memorySpace: number;
1830
- selectMenu: {
1831
- id: string;
1832
- label: string;
1833
- }[];
1834
- contentStyle: Record<string, any>;
1835
- isSelect: boolean;
1836
- counter: boolean;
1837
- autosize: boolean | Record<string, any>;
1838
- clearable: boolean;
1839
- autocomplete: string;
1840
- showPassword: boolean;
1841
- showWordLimit: boolean;
1842
- validateEvent: boolean;
1843
- popupMore: boolean;
1844
- textareaTitle: string;
1845
- displayOnly: boolean;
1846
- displayOnlyContent: string;
1847
- frontClearIcon: boolean;
1848
- showEmptyValue: boolean;
1849
- textAlign: string;
1850
- showTooltip: boolean;
1851
- inputBoxType: string;
1852
- }> | null;
1853
- buttonsContainerRef: HTMLDivElement;
1141
+ senderRef: ({
1142
+ $: ComponentInternalInstance;
1143
+ $data: {};
1144
+ $props: {
1145
+ readonly modelValue?: string | undefined;
1146
+ readonly defaultValue?: string | undefined;
1147
+ readonly placeholder?: string | undefined;
1148
+ readonly disabled?: boolean | undefined;
1149
+ readonly loading?: boolean | undefined;
1150
+ readonly autofocus?: boolean | undefined;
1151
+ readonly enterkeyhint?: EnterKeyHint | undefined;
1152
+ readonly mode?: InputMode | undefined;
1153
+ readonly autoSize?: AutoSize | undefined;
1154
+ readonly maxLength?: number | undefined;
1155
+ readonly showWordLimit?: boolean | undefined;
1156
+ readonly clearable?: boolean | undefined;
1157
+ readonly extensions?: Extension[] | any[] | undefined;
1158
+ readonly size?: "normal" | "small" | undefined;
1159
+ readonly stopText?: string | undefined;
1160
+ readonly defaultActions?: DefaultActions | undefined;
1161
+ readonly submitType?: SubmitTrigger | undefined;
1162
+ readonly onClear?: (() => any) | undefined;
1163
+ readonly onInput?: ((value: string) => any) | undefined;
1164
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
1165
+ readonly onCancel?: (() => any) | undefined;
1166
+ readonly onFocus?: ((event: FocusEvent) => any) | undefined;
1167
+ readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1168
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1169
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1170
+ $attrs: {
1171
+ [x: string]: unknown;
1172
+ };
1173
+ $refs: {
1174
+ [x: string]: unknown;
1175
+ };
1176
+ $slots: Readonly<{
1177
+ [name: string]: Slot<any> | undefined;
1178
+ }>;
1179
+ $root: ComponentPublicInstance | null;
1180
+ $parent: ComponentPublicInstance | null;
1181
+ $host: Element | null;
1182
+ $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);
1183
+ $el: HTMLDivElement;
1184
+ $options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
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;
1854
1375
  };
1855
1376
  rootEl: HTMLDivElement;
1856
1377
  };
@@ -1874,6 +1395,10 @@ declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
1874
1395
 
1875
1396
  declare type __VLS_TemplateResult_14 = ReturnType<typeof __VLS_template_14>;
1876
1397
 
1398
+ declare type __VLS_TemplateResult_15 = ReturnType<typeof __VLS_template_15>;
1399
+
1400
+ declare type __VLS_TemplateResult_16 = ReturnType<typeof __VLS_template_16>;
1401
+
1877
1402
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1878
1403
 
1879
1404
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -1926,6 +1451,18 @@ declare type __VLS_WithTemplateSlots_14<T, S> = T & {
1926
1451
  };
1927
1452
  };
1928
1453
 
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
+
1929
1466
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1930
1467
  new (): {
1931
1468
  $slots: S;
@@ -1974,28 +1511,42 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
1974
1511
  };
1975
1512
  };
1976
1513
 
1977
- export declare interface ActionButton {
1514
+ declare interface ActionButton_2 {
1978
1515
  type: string;
1979
1516
  label: string;
1980
1517
  handler?: (file: Attachment) => void;
1981
1518
  }
1982
1519
 
1983
- export declare interface ActionButtonsProps {
1984
- loading?: boolean;
1520
+ /**
1521
+ * ActionButton Props
1522
+ *
1523
+ * 基础操作按钮的 Props
1524
+ */
1525
+ export declare interface ActionButtonProps {
1526
+ /**
1527
+ * 按钮图标
1528
+ */
1529
+ icon: VNode | Component;
1530
+ /**
1531
+ * 是否禁用
1532
+ */
1985
1533
  disabled?: boolean;
1986
- showClear?: boolean;
1987
- hasContent?: boolean;
1988
- buttonGroup?: ButtonGroupConfig;
1989
- allowSpeech?: boolean;
1990
- speechStatus?: {
1991
- isRecording: boolean;
1992
- isSupported: boolean;
1993
- };
1994
- allowFiles?: boolean;
1995
- submitType?: SubmitTrigger;
1996
- showShortcuts?: boolean;
1997
- isOverLimit?: boolean;
1998
- stopText?: string;
1534
+ /**
1535
+ * 是否激活状态
1536
+ */
1537
+ active?: boolean;
1538
+ /**
1539
+ * 工具提示
1540
+ */
1541
+ tooltip?: TooltipContent;
1542
+ /**
1543
+ * Tooltip 位置
1544
+ */
1545
+ tooltipPlacement?: TooltipPlacement;
1546
+ /**
1547
+ * 按钮大小
1548
+ */
1549
+ size?: string | number;
1999
1550
  }
2000
1551
 
2001
1552
  export declare type AddType = 'form' | 'code';
@@ -2009,7 +1560,7 @@ export declare interface AttachmentListEmits {
2009
1560
  (e: 'retry', file: Attachment): void;
2010
1561
  (e: 'preview', event: MouseEvent, file: Attachment): void;
2011
1562
  (e: 'action', payload: {
2012
- action: ActionButton;
1563
+ action: ActionButton_2;
2013
1564
  file: Attachment;
2014
1565
  }): void;
2015
1566
  }
@@ -2019,11 +1570,14 @@ export declare interface AttachmentListProps {
2019
1570
  disabled?: boolean;
2020
1571
  wrap?: boolean;
2021
1572
  fileIcons?: Record<string, Component>;
2022
- actions?: ActionButton[];
1573
+ actions?: ActionButton_2[];
2023
1574
  variant?: DisplayVariant;
2024
1575
  fileMatchers?: FileTypeMatcher[];
2025
1576
  }
2026
1577
 
1578
+ /**
1579
+ * 自动高度配置
1580
+ */
2027
1581
  export declare type AutoSize = boolean | {
2028
1582
  minRows: number;
2029
1583
  maxRows: number;
@@ -2041,13 +1595,7 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
2041
1595
 
2042
1596
  export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
2043
1597
 
2044
- declare interface BaseTextItem {
2045
- id: string;
2046
- type: string;
2047
- content: string;
2048
- }
2049
-
2050
- declare const Bubble: typeof _default_18 & {
1598
+ declare const Bubble: typeof _default_25 & {
2051
1599
  install: typeof bubbleInstall;
2052
1600
  };
2053
1601
  export { Bubble }
@@ -2095,7 +1643,7 @@ declare type BubbleGroupFunction = (messages: BubbleMessage[], dividerRole?: str
2095
1643
 
2096
1644
  declare const bubbleInstall: (app: App) => void;
2097
1645
 
2098
- declare const BubbleList: typeof _default_19 & {
1646
+ declare const BubbleList: typeof _default_26 & {
2099
1647
  install: typeof bubbleListInstall;
2100
1648
  };
2101
1649
  export { BubbleList }
@@ -2108,12 +1656,11 @@ export declare interface BubbleListProps {
2108
1656
  /**
2109
1657
  * 分组策略:
2110
1658
  * - 'consecutive': 连续相同角色的消息合并为一组
2111
- * - 'divider': 按分割角色分组(连续的分割角色在一组,其他消息在另一组)
1659
+ * - 'divider': 按分割角色分组(每条分割角色消息单独成组,其他消息在两个分割角色之间合并为一组)
2112
1660
  * - 自定义函数: (messages, dividerRole) => BubbleMessageGroup[]
2113
1661
  *
2114
1662
  * 特殊情况:
2115
- * - message content 为数组时,且 message.role === 'user',该 message 会被单独作为一个独立分组
2116
- * - 该独立分组会被"密封",后续的消息(即使角色相同)也不会被添加到这个分组中
1663
+ * - hidden 的消息需要单独分组,连续的 hidden 可以同一组
2117
1664
  */
2118
1665
  groupStrategy?: 'consecutive' | 'divider' | BubbleGroupFunction;
2119
1666
  /**
@@ -2180,7 +1727,7 @@ export declare type BubbleProps = BubbleMessage & {
2180
1727
  fallbackContentRenderer?: Component<BubbleContentRendererProps>;
2181
1728
  };
2182
1729
 
2183
- declare const BubbleProvider: typeof _default_20 & {
1730
+ declare const BubbleProvider: typeof _default_27 & {
2184
1731
  install: typeof bubbleProviderInstall;
2185
1732
  };
2186
1733
  export { BubbleProvider }
@@ -2327,7 +1874,7 @@ export declare interface BubbleSlots {
2327
1874
  }) => VNode | VNode[];
2328
1875
  }
2329
1876
 
2330
- export declare interface ButtonGroupConfig {
1877
+ declare interface ButtonGroupConfig {
2331
1878
  file?: ControlState & fileUploadConfig;
2332
1879
  submit?: ControlState;
2333
1880
  voice?: VoiceButtonConfig;
@@ -2358,6 +1905,18 @@ declare type ChatMessageWithOptionalRole<T extends ChatMessageContent = ChatMess
2358
1905
 
2359
1906
  export declare type ColorMode = 'light' | 'dark' | 'auto';
2360
1907
 
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
+
2361
1920
  export declare interface ContainerEmits {
2362
1921
  (e: 'close'): void;
2363
1922
  }
@@ -2381,7 +1940,7 @@ export declare interface ContainerSlots {
2381
1940
  footer: () => unknown;
2382
1941
  }
2383
1942
 
2384
- export declare interface ControlState {
1943
+ declare interface ControlState {
2385
1944
  tooltips?: string | TooltipRender;
2386
1945
  disabled?: boolean;
2387
1946
  tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
@@ -2392,56 +1951,103 @@ declare const _default: {
2392
1951
  };
2393
1952
  export default _default;
2394
1953
 
2395
- declare const _default_10: typeof _default_30 & {
1954
+ declare const _default_10: typeof _default_37 & {
2396
1955
  install: typeof install_9;
2397
1956
  };
2398
- export { _default_10 as Sender }
2399
- export { _default_10 as TrSender }
1957
+ export { _default_10 as SenderCompat }
1958
+ export { _default_10 as TrSenderCompat }
2400
1959
 
2401
- declare const _default_11: typeof _default_32 & {
1960
+ declare const _default_11: typeof _default_39 & {
2402
1961
  install: typeof install_10;
2403
1962
  };
2404
1963
  export { _default_11 as SuggestionPills }
2405
1964
  export { _default_11 as TrSuggestionPills }
2406
1965
 
2407
- declare const _default_12: typeof _default_33 & {
1966
+ declare const _default_12: typeof _default_40 & {
2408
1967
  install: typeof install_11;
2409
1968
  };
2410
1969
  export { _default_12 as SuggestionPopover }
2411
1970
  export { _default_12 as TrSuggestionPopover }
2412
1971
 
2413
- declare const _default_13: typeof _default_34 & {
1972
+ declare const _default_13: typeof _default_41 & {
2414
1973
  install: typeof install_12;
2415
1974
  };
2416
1975
  export { _default_13 as ThemeProvider }
2417
1976
  export { _default_13 as TrThemeProvider }
2418
1977
 
2419
- declare const _default_14: typeof _default_35 & {
1978
+ declare const _default_14: typeof _default_42 & {
2420
1979
  install: typeof install_13;
2421
1980
  };
2422
1981
  export { _default_14 as TrWelcome }
2423
1982
  export { _default_14 as Welcome }
2424
1983
 
2425
- declare const _default_15: typeof _default_36 & {
1984
+ declare const _default_15: typeof _default_43 & {
2426
1985
  install: typeof install_14;
2427
1986
  };
2428
1987
  export { _default_15 as McpServerPicker }
2429
1988
  export { _default_15 as TrMcpServerPicker }
2430
1989
 
2431
- declare const _default_16: typeof _default_37 & {
1990
+ declare const _default_16: typeof _default_44 & {
2432
1991
  install: typeof install_15;
2433
1992
  };
2434
1993
  export { _default_16 as McpAddForm }
2435
1994
  export { _default_16 as TrMcpAddForm }
2436
1995
 
2437
- declare const _default_17: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1996
+ declare const _default_17: __VLS_WithTemplateSlots_15<typeof __VLS_component_15, __VLS_TemplateResult_15["slots"]>;
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, {} & {
2438
2044
  "update:items": (items: Attachment[]) => any;
2439
2045
  remove: (file: Attachment) => any;
2440
2046
  download: (event: MouseEvent, file: Attachment) => any;
2441
2047
  retry: (file: Attachment) => any;
2442
2048
  preview: (event: MouseEvent, file: Attachment) => any;
2443
2049
  action: (payload: {
2444
- action: ActionButton;
2050
+ action: ActionButton_2;
2445
2051
  file: Attachment;
2446
2052
  }) => any;
2447
2053
  }, string, PublicProps, Readonly<AttachmentListProps> & Readonly<{
@@ -2451,36 +2057,36 @@ onDownload?: ((event: MouseEvent, file: Attachment) => any) | undefined;
2451
2057
  onRetry?: ((file: Attachment) => any) | undefined;
2452
2058
  onPreview?: ((event: MouseEvent, file: Attachment) => any) | undefined;
2453
2059
  onAction?: ((payload: {
2454
- action: ActionButton;
2060
+ action: ActionButton_2;
2455
2061
  file: Attachment;
2456
2062
  }) => any) | undefined;
2457
2063
  }>, {
2458
- actions: ActionButton[];
2064
+ actions: ActionButton_2[];
2459
2065
  fileMatchers: FileTypeMatcher[];
2460
2066
  variant: DisplayVariant;
2461
2067
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2462
2068
 
2463
- declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2069
+ declare const _default_25: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2464
2070
 
2465
- declare const _default_19: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
2071
+ declare const _default_26: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
2466
2072
 
2467
- declare const _default_2: typeof _default_17 & {
2468
- install: typeof install;
2469
- };
2470
- export { _default_2 as Attachments }
2471
- export { _default_2 as TrAttachments }
2073
+ declare const _default_27: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
2472
2074
 
2473
- declare const _default_20: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
2075
+ declare const _default_28: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
2474
2076
 
2475
- declare const _default_21: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
2077
+ declare const _default_29: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2476
2078
 
2477
- declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2079
+ declare const _default_3: typeof _default_28 & {
2080
+ install: typeof install_2;
2081
+ };
2082
+ export { _default_3 as Container }
2083
+ export { _default_3 as TrContainer }
2478
2084
 
2479
- declare const _default_23: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
2085
+ declare const _default_30: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
2480
2086
 
2481
- declare const _default_24: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2087
+ declare const _default_31: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2482
2088
 
2483
- declare const _default_25: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2089
+ declare const _default_32: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2484
2090
  action: (name: string) => any;
2485
2091
  operation: (name: string) => any;
2486
2092
  }, string, PublicProps, Readonly<FeedbackProps> & Readonly<{
@@ -2492,7 +2098,7 @@ actionsLimit: number;
2492
2098
  sourcesLinesLimit: number;
2493
2099
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2494
2100
 
2495
- 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<{
2101
+ declare const _default_33: <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<{
2496
2102
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
2497
2103
  readonly "onItem-click"?: ((item: T) => any) | undefined;
2498
2104
  readonly "onItem-title-change"?: ((newTitle: string, item: T) => any) | undefined;
@@ -2506,38 +2112,38 @@ declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awai
2506
2112
  __ctx?: Awaited<typeof __VLS_setup>;
2507
2113
  };
2508
2114
 
2509
- declare const _default_27: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2115
+ declare const _default_34: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2510
2116
  size: string | number;
2511
2117
  svgSize: string | number;
2512
2118
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
2513
2119
 
2514
- declare const _default_28: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2120
+ declare const _default_35: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2515
2121
  size: "small" | "medium" | "large";
2516
2122
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2517
2123
 
2518
- declare const _default_29: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2124
+ declare const _default_36: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2519
2125
 
2520
- declare const _default_3: typeof _default_21 & {
2521
- install: typeof install_2;
2522
- };
2523
- export { _default_3 as Container }
2524
- export { _default_3 as TrContainer }
2126
+ declare const _default_37: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2525
2127
 
2526
- declare const _default_30: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2128
+ declare const _default_38: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2527
2129
 
2528
- declare const _default_31: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2130
+ declare const _default_39: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2529
2131
 
2530
- declare const _default_32: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2132
+ declare const _default_4: typeof _default_29 & {
2133
+ install: typeof install_3;
2134
+ };
2135
+ export { _default_4 as Conversations }
2136
+ export { _default_4 as TrConversations }
2531
2137
 
2532
- declare const _default_33: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2138
+ declare const _default_40: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2533
2139
 
2534
- declare const _default_34: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2140
+ declare const _default_41: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2535
2141
 
2536
- declare const _default_35: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
2142
+ declare const _default_42: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
2537
2143
 
2538
- declare const _default_36: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
2144
+ declare const _default_43: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
2539
2145
 
2540
- declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2146
+ declare const _default_44: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2541
2147
  cancel: () => any;
2542
2148
  confirm: (type: AddType, data: string | McpAddFormData) => any;
2543
2149
  "update:addType": (value: AddType) => any;
@@ -2549,42 +2155,90 @@ onConfirm?: ((type: AddType, data: string | McpAddFormData) => any) | undefined;
2549
2155
  addType: AddType;
2550
2156
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2551
2157
 
2552
- declare const _default_4: typeof _default_22 & {
2553
- install: typeof install_3;
2554
- };
2555
- export { _default_4 as Conversations }
2556
- export { _default_4 as TrConversations }
2557
-
2558
- declare const _default_5: typeof _default_23 & {
2158
+ declare const _default_5: typeof _default_30 & {
2559
2159
  install: typeof install_4;
2560
2160
  };
2561
2161
  export { _default_5 as DragOverlay }
2562
2162
  export { _default_5 as TrDragOverlay }
2563
2163
 
2564
- declare const _default_6: typeof _default_24 & {
2164
+ declare const _default_6: typeof _default_31 & {
2565
2165
  install: typeof install_5;
2566
2166
  };
2567
2167
  export { _default_6 as DropdownMenu }
2568
2168
  export { _default_6 as TrDropdownMenu }
2569
2169
 
2570
- declare const _default_7: typeof _default_25 & {
2170
+ declare const _default_7: typeof _default_32 & {
2571
2171
  install: typeof install_6;
2572
2172
  };
2573
2173
  export { _default_7 as Feedback }
2574
2174
  export { _default_7 as TrFeedback }
2575
2175
 
2576
- declare const _default_8: typeof _default_26 & {
2176
+ declare const _default_8: typeof _default_33 & {
2577
2177
  install: typeof install_7;
2578
2178
  };
2579
2179
  export { _default_8 as History }
2580
2180
  export { _default_8 as TrHistory }
2581
2181
 
2582
- declare const _default_9: typeof _default_27 & {
2182
+ declare const _default_9: typeof _default_34 & {
2583
2183
  install: typeof install_8;
2584
2184
  };
2585
2185
  export { _default_9 as IconButton }
2586
2186
  export { _default_9 as TrIconButton }
2587
2187
 
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
+
2588
2242
  export declare type DisplayVariant = 'picture' | 'card' | 'auto';
2589
2243
 
2590
2244
  declare interface DragAwareElement extends HTMLElement {
@@ -2747,6 +2401,23 @@ export declare interface DropzoneBinding {
2747
2401
  onDraggingChange: (dragging: boolean, element: HTMLElement | null) => void;
2748
2402
  }
2749
2403
 
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
+
2750
2421
  export declare interface FeedbackEvents {
2751
2422
  (e: 'operation', name: string): void;
2752
2423
  (e: 'action', name: string): void;
@@ -2779,7 +2450,7 @@ export declare interface FileCardEmits {
2779
2450
  (e: 'download', event: MouseEvent, file: Attachment): void;
2780
2451
  (e: 'retry', file: Attachment): void;
2781
2452
  (e: 'action', payload: {
2782
- action: ActionButton;
2453
+ action: ActionButton_2;
2783
2454
  file: Attachment;
2784
2455
  }): void;
2785
2456
  }
@@ -2820,7 +2491,16 @@ export declare interface Handlers {
2820
2491
  handleDrop: (e: DragEvent) => void;
2821
2492
  }
2822
2493
 
2823
- declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
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[];
2824
2504
 
2825
2505
  export declare type HistoryData<T extends HistoryItem> = T[] | HistoryGroup<T>[];
2826
2506
 
@@ -2867,12 +2547,11 @@ export declare interface IconButtonProps {
2867
2547
  rounded?: boolean;
2868
2548
  }
2869
2549
 
2870
- export declare interface InputHandler {
2871
- inputValue: Ref<string>;
2872
- isComposing: Ref<boolean>;
2873
- clearInput: () => void;
2874
- }
2875
-
2550
+ /**
2551
+ * 输入模式
2552
+ * - single: 单行模式,适用于简短输入
2553
+ * - multiple: 多行模式,适用于长文本输入
2554
+ */
2876
2555
  export declare type InputMode = 'single' | 'multiple';
2877
2556
 
2878
2557
  declare const install: <T>(app: App<T>) => void;
@@ -2911,14 +2590,18 @@ declare const installPrompt: <T>(app: App<T>) => void;
2911
2590
 
2912
2591
  declare const installPrompts: <T>(app: App<T>) => void;
2913
2592
 
2914
- export declare interface ISuggestionItem {
2593
+ declare interface ISuggestionItem {
2915
2594
  content: string;
2916
- highlights?: string[] | HighlightFunction;
2595
+ highlights?: string[] | HighlightFunction_2;
2917
2596
  }
2918
2597
 
2919
- export declare interface KeyboardHandler {
2920
- handleKeyPress: (e: KeyboardEvent) => void;
2921
- triggerSubmit: () => void;
2598
+ /**
2599
+ * 键盘处理器接口
2600
+ */
2601
+ export declare interface KeyboardHandlers {
2602
+ checkSubmitShortcut: (event: KeyboardEvent) => boolean;
2603
+ checkNewlineShortcut: (event: KeyboardEvent) => boolean;
2604
+ submit: () => void;
2922
2605
  }
2923
2606
 
2924
2607
  export declare interface MarketCategoryOption {
@@ -2989,20 +2672,100 @@ export declare interface McpServerPickerProps {
2989
2672
  marketLoading?: boolean;
2990
2673
  }
2991
2674
 
2992
- export declare type PluginAddState = 'idle' | 'loading' | 'added';
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>;
2993
2690
 
2994
- export declare interface PluginCardEmits {
2995
- (e: 'toggle-plugin', enabled: boolean): void;
2996
- (e: 'toggle-tool', toolId: string, enabled: boolean): void;
2997
- (e: 'add-plugin', plugin: PluginInfo): void;
2998
- (e: 'delete-plugin'): void;
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;
2999
2717
  }
3000
2718
 
3001
- export declare type PluginCardMode = 'installed' | 'market';
3002
-
3003
- export declare interface PluginCardProps {
3004
- plugin: PluginInfo;
3005
- mode?: PluginCardMode;
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
+ export declare type PluginAddState = 'idle' | 'loading' | 'added';
2756
+
2757
+ export declare interface PluginCardEmits {
2758
+ (e: 'toggle-plugin', enabled: boolean): void;
2759
+ (e: 'toggle-tool', toolId: string, enabled: boolean): void;
2760
+ (e: 'add-plugin', plugin: PluginInfo): void;
2761
+ (e: 'delete-plugin'): void;
2762
+ }
2763
+
2764
+ export declare type PluginCardMode = 'installed' | 'market';
2765
+
2766
+ export declare interface PluginCardProps {
2767
+ plugin: PluginInfo;
2768
+ mode?: PluginCardMode;
3006
2769
  showToolCount?: boolean;
3007
2770
  }
3008
2771
 
@@ -3054,7 +2817,7 @@ export declare interface PopupConfig {
3054
2817
  };
3055
2818
  }
3056
2819
 
3057
- declare const Prompt: typeof _default_28 & {
2820
+ declare const Prompt: typeof _default_35 & {
3058
2821
  install: typeof installPrompt;
3059
2822
  };
3060
2823
  export { Prompt }
@@ -3091,7 +2854,7 @@ export declare interface PromptProps {
3091
2854
  size?: 'small' | 'medium' | 'large';
3092
2855
  }
3093
2856
 
3094
- declare const Prompts: typeof _default_29 & {
2857
+ declare const Prompts: typeof _default_36 & {
3095
2858
  install: typeof installPrompts;
3096
2859
  };
3097
2860
  export { Prompts }
@@ -3142,25 +2905,533 @@ export declare interface RejectionReason {
3142
2905
  message: string;
3143
2906
  }
3144
2907
 
3145
- export declare type SenderEmits = {
2908
+ /**
2909
+ * 选择器选项
2910
+ */
2911
+ export declare interface SelectOption {
2912
+ /**
2913
+ * 显示文本
2914
+ */
2915
+ label: string;
2916
+ /**
2917
+ * 选择后的值
2918
+ */
2919
+ value: string;
2920
+ /**
2921
+ * 自定义数据(可选)
2922
+ */
2923
+ data?: string;
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;
3053
+ };
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
+
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
+ */
3146
3194
  (e: 'update:modelValue', value: string): void;
3147
- (e: 'update:templateData', value: UserItem[]): void;
3148
- (e: 'submit', value: string): void;
3149
- (e: 'clear'): void;
3150
- (e: 'speech-start'): void;
3151
- (e: 'speech-end', transcript?: string): void;
3152
- (e: 'speech-interim', transcript: string): void;
3153
- (e: 'speech-error', error: Error): void;
3154
- (e: 'suggestion-select', 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
+ */
3155
3226
  (e: 'focus', event: FocusEvent): void;
3227
+ /**
3228
+ * 失焦事件
3229
+ *
3230
+ * @param e - 事件名
3231
+ * @param event - 原生事件
3232
+ */
3156
3233
  (e: 'blur', event: FocusEvent): void;
3157
- (e: 'escape-press'): void;
3234
+ /**
3235
+ * 清空事件
3236
+ *
3237
+ * @param e - 事件名
3238
+ */
3239
+ (e: 'clear'): void;
3240
+ /**
3241
+ * 取消事件
3242
+ *
3243
+ * 在 loading 状态下点击停止按钮时触发
3244
+ * 用于取消正在进行的操作(如 AI 响应)
3245
+ *
3246
+ * @param e - 事件名
3247
+ */
3158
3248
  (e: 'cancel'): void;
3159
- (e: 'reset-template'): void;
3160
- (e: 'files-selected', files: File[]): void;
3161
- };
3249
+ /**
3250
+ * 输入事件
3251
+ *
3252
+ * @param e - 事件名
3253
+ * @param value - 当前内容
3254
+ */
3255
+ (e: 'input', value: string): void;
3256
+ }
3162
3257
 
3258
+ /**
3259
+ * Sender 组件 Props
3260
+ */
3163
3261
  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 {
3164
3435
  autofocus?: boolean;
3165
3436
  autoSize?: AutoSize;
3166
3437
  allowSpeech?: boolean;
@@ -3185,6 +3456,172 @@ export declare interface SenderProps {
3185
3456
  stopText?: string;
3186
3457
  }
3187
3458
 
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
+ */
3188
3625
  export declare interface SpeechCallbacks {
3189
3626
  onStart: () => void;
3190
3627
  onInterim: (transcript: string) => void;
@@ -3228,8 +3665,90 @@ export declare interface SpeechState {
3228
3665
  error?: Error;
3229
3666
  }
3230
3667
 
3668
+ /**
3669
+ * 结构化数据(联合类型)
3670
+ *
3671
+ * Submit 事件的第二个参数,根据使用的扩展直接返回对应的数据数组
3672
+ *
3673
+ * **设计理念**:
3674
+ * - 第一个参数 `text`:纯文本内容,适用于简单场景
3675
+ * - 第二个参数 `data`:结构化数据数组,直接使用无需解包
3676
+ *
3677
+ * **类型说明**:
3678
+ * - `TemplateItem[]`: 使用 Template 扩展时返回(混合结构)
3679
+ * - `MentionStructuredItem[]`: 使用 Mention 扩展时返回(混合结构)
3680
+ *
3681
+ * @example Template 场景
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
+ */
3231
3736
  export declare type SubmitTrigger = 'enter' | 'ctrlEnter' | 'shiftEnter';
3232
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
+
3233
3752
  export declare interface SuggestionBaseItem {
3234
3753
  id: string;
3235
3754
  text: string;
@@ -3244,9 +3763,179 @@ export declare interface SuggestionGroup<T = Record<string, unknown>> {
3244
3763
  items: SuggestionItem<T>[];
3245
3764
  }
3246
3765
 
3247
- export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
3248
-
3249
- declare const SuggestionPillButton: typeof _default_31 & {
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;
3936
+ }
3937
+
3938
+ declare const SuggestionPillButton: typeof _default_38 & {
3250
3939
  install: typeof installPillButton;
3251
3940
  };
3252
3941
  export { SuggestionPillButton }
@@ -3374,19 +4063,184 @@ export declare interface SuggestionPopoverSlots {
3374
4063
  body?: () => VNode | VNode[];
3375
4064
  }
3376
4065
 
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
+ */
3377
4123
  export declare interface SuggestionTextPart {
3378
4124
  text: string;
3379
4125
  isMatch: boolean;
3380
4126
  }
3381
4127
 
3382
- declare interface TemplateItem extends BaseTextItem {
3383
- type: 'template';
3384
- prefix: string;
3385
- suffix: string;
4128
+ declare interface SuggestionTextPart_2 {
4129
+ text: string;
4130
+ isMatch: boolean;
3386
4131
  }
3387
4132
 
3388
- declare interface TextItem extends BaseTextItem {
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
+ */
3389
4162
  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>;
3390
4244
  }
3391
4245
 
3392
4246
  export declare interface ThemeProviderProps {
@@ -3408,10 +4262,7 @@ export declare interface ThemeProviderProps {
3408
4262
 
3409
4263
  export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
3410
4264
 
3411
- /**
3412
- * 组件核心类型定义
3413
- */
3414
- export declare type ThemeType = 'light' | 'dark';
4265
+ declare type ThemeType = 'light' | 'dark';
3415
4266
 
3416
4267
  /**
3417
4268
  * 工具调用接口(支持 OpenAI 格式)
@@ -3430,6 +4281,13 @@ declare type ToolCallStatus = (typeof toolCallStatus)[number];
3430
4281
 
3431
4282
  declare const toolCallStatus: readonly ["running", "success", "failed", "cancelled"];
3432
4283
 
4284
+ /**
4285
+ * Tooltip 内容类型
4286
+ * - string: 简单文本
4287
+ * - () => string | VNode: 渲染函数,支持复杂内容
4288
+ */
4289
+ export declare type TooltipContent = string | (() => string | VNode);
4290
+
3433
4291
  declare interface TooltipContentProps {
3434
4292
  show?: boolean;
3435
4293
  content: string;
@@ -3440,7 +4298,71 @@ declare interface TooltipContentProps {
3440
4298
  delayClose?: number;
3441
4299
  }
3442
4300
 
3443
- export declare type TooltipRender = () => VNode | string;
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
+ }
3444
4366
 
3445
4367
  export declare interface UrlAttachment extends BaseAttachment {
3446
4368
  url: string;
@@ -3480,11 +4402,71 @@ export declare function useBubbleContentRenderer(message: MaybeRefOrGetter<Bubbl
3480
4402
 
3481
4403
  export declare function useBubbleStateChangeFn(): (key: string, _value: unknown) => void;
3482
4404
 
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
+
3483
4439
  export declare const useMessageContent: <T extends ChatMessageContent = ChatMessageContent>(props: Readonly<BubbleContentRendererProps<T>>) => {
3484
4440
  content: ComputedRef<ChatMessageContentItem>;
3485
4441
  contentText: ComputedRef<string>;
3486
4442
  };
3487
4443
 
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
+
3488
4470
  /**
3489
4471
  * Omit specified fields from message and return computed props
3490
4472
  * @param props - The original props containing the message
@@ -3496,16 +4478,82 @@ export declare function useOmitMessageFields<P extends BubbleContentRendererProp
3496
4478
  restProps: ComputedRef<P>;
3497
4479
  };
3498
4480
 
3499
- export declare type UserItem = UserTextItem | UserTemplateItem;
4481
+ declare type UserItem = UserTextItem | UserTemplateItem;
3500
4482
 
3501
- export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
3502
- id?: TemplateItem['id'];
4483
+ declare type UserTemplateItem = Omit<Pick<CompatTemplateItem, 'type' | 'content'>, 'id'> & {
4484
+ id?: CompatTemplateItem['id'];
3503
4485
  };
3504
4486
 
3505
- export declare type UserTextItem = Omit<TextItem, 'id'> & {
3506
- id?: TextItem['id'];
4487
+ declare type UserTextItem = Omit<CompatTextItem, 'id'> & {
4488
+ id?: CompatTextItem['id'];
3507
4489
  };
3508
4490
 
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
+
3509
4557
  export declare const useTheme: () => {
3510
4558
  theme: Ref<string, string> | undefined;
3511
4559
  colorMode: Ref<ColorMode, ColorMode> | undefined;
@@ -3553,6 +4601,74 @@ declare interface VoiceButtonConfig {
3553
4601
  icon?: VNode | Component;
3554
4602
  }
3555
4603
 
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
+
3556
4672
  export declare interface WelcomeProps {
3557
4673
  title: string;
3558
4674
  description: string;
@@ -3564,4 +4680,72 @@ export declare interface WelcomeSlots {
3564
4680
  footer: () => unknown;
3565
4681
  }
3566
4682
 
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
+
3567
4701
  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
+ }