@opentiny/tiny-robot 0.3.1-alpha.4 → 0.3.1-alpha.6

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
@@ -15,13 +15,15 @@ import { CSSProperties } from 'vue';
15
15
  import { DebuggerEvent } from 'vue';
16
16
  import { DefineComponent } from 'vue';
17
17
  import { Directive } from 'vue';
18
- import { ExtractPropTypes } from 'vue';
18
+ import { Editor } from '@tiptap/vue-3';
19
+ import { Editor as Editor_2 } from '@tiptap/core';
20
+ import { Extension } from '@tiptap/core';
19
21
  import { GlobalComponents } from 'vue';
20
22
  import { GlobalDirectives } from 'vue';
21
23
  import { nextTick } from 'vue';
24
+ import { Node as Node_2 } from '@tiptap/core';
22
25
  import { OnCleanup } from '@vue/reactivity';
23
26
  import { Options } from 'markdown-it';
24
- import { PropType } from 'vue';
25
27
  import { PublicProps } from 'vue';
26
28
  import { Ref } from 'vue';
27
29
  import { RendererElement } from 'vue';
@@ -29,6 +31,7 @@ import { RendererNode } from 'vue';
29
31
  import { ShallowUnwrapRef } from 'vue';
30
32
  import { Slot } from 'vue';
31
33
  import { TransitionProps } from 'vue';
34
+ import { UseFileDialogOptions } from '@vueuse/core';
32
35
  import { VNode } from 'vue';
33
36
  import { VNodeProps } from 'vue';
34
37
  import { WatchOptions } from 'vue';
@@ -192,6 +195,34 @@ declare const __VLS_component_12: DefineComponent<WelcomeProps, {}, {}, {}, {},
192
195
  align: "left" | "center" | "right" | string;
193
196
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
194
197
 
198
+ declare const __VLS_component_13: DefineComponent<ActionButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ActionButtonProps> & Readonly<{}>, {
199
+ size: string | number;
200
+ disabled: boolean;
201
+ active: boolean;
202
+ tooltipPlacement: TooltipPlacement;
203
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
204
+
205
+ declare const __VLS_component_14: DefineComponent<VoiceButtonProps, {
206
+ start: () => void;
207
+ stop: () => void;
208
+ speechState: SpeechState;
209
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
210
+ "speech-start": () => any;
211
+ "speech-interim": (transcript: string) => any;
212
+ "speech-final": (transcript: string) => any;
213
+ "speech-end": (transcript?: string | undefined) => any;
214
+ "speech-error": (error: Error) => any;
215
+ }, string, PublicProps, Readonly<VoiceButtonProps> & Readonly<{
216
+ "onSpeech-start"?: (() => any) | undefined;
217
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
218
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
219
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
220
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
221
+ }>, {
222
+ tooltipPlacement: TooltipPlacement;
223
+ autoInsert: boolean;
224
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
225
+
195
226
  declare const __VLS_component_2: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
196
227
  contentRenderers: Record<string, BubbleContentRenderer>;
197
228
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
@@ -325,14 +356,14 @@ declare const __VLS_component_6: DefineComponent<PromptsProps, {}, {}, {}, {}, C
325
356
  "onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
326
357
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
327
358
 
328
- declare const __VLS_component_7: DefineComponent<SenderProps, {
359
+ declare const __VLS_component_7: DefineComponent<SenderProps_2, {
329
360
  focus: () => void;
330
361
  blur: () => void;
331
362
  clear: () => void;
332
363
  submit: () => void;
364
+ setTemplateData: (templateData: UserTemplateItem[]) => void;
333
365
  startSpeech: () => void;
334
366
  stopSpeech: () => void;
335
- activateTemplateFirstField: () => void;
336
367
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
337
368
  clear: () => any;
338
369
  blur: (event: FocusEvent) => any;
@@ -340,544 +371,263 @@ cancel: () => any;
340
371
  focus: (event: FocusEvent) => any;
341
372
  submit: (value: string) => any;
342
373
  "update:modelValue": (value: string) => any;
343
- "update:templateData": (value: UserItem[]) => any;
344
374
  "speech-start": () => any;
345
- "speech-end": (transcript?: string | undefined) => any;
346
375
  "speech-interim": (transcript: string) => any;
376
+ "speech-end": (transcript?: string | undefined) => any;
347
377
  "speech-error": (error: Error) => any;
378
+ "update:templateData": (value: UserItem[]) => any;
348
379
  "suggestion-select": (value: string) => any;
349
380
  "escape-press": () => any;
350
381
  "reset-template": () => any;
351
382
  "files-selected": (files: File[]) => any;
352
- }, string, PublicProps, Readonly<SenderProps> & Readonly<{
383
+ }, string, PublicProps, Readonly<SenderProps_2> & Readonly<{
353
384
  onClear?: (() => any) | undefined;
354
385
  onBlur?: ((event: FocusEvent) => any) | undefined;
355
386
  onCancel?: (() => any) | undefined;
356
387
  onFocus?: ((event: FocusEvent) => any) | undefined;
357
388
  onSubmit?: ((value: string) => any) | undefined;
358
389
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
359
- "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
360
390
  "onSpeech-start"?: (() => any) | undefined;
361
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
362
391
  "onSpeech-interim"?: ((transcript: string) => any) | undefined;
392
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
363
393
  "onSpeech-error"?: ((error: Error) => any) | undefined;
394
+ "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
364
395
  "onSuggestion-select"?: ((value: string) => any) | undefined;
365
396
  "onEscape-press"?: (() => any) | undefined;
366
397
  "onReset-template"?: (() => any) | undefined;
367
398
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
368
399
  }>, {
369
- disabled: boolean;
370
- modelValue: string;
400
+ placeholder: string;
401
+ mode: InputMode_2;
402
+ submitType: SubmitTrigger_2;
403
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
404
+ chatInputRef: ({
405
+ $: ComponentInternalInstance;
406
+ $data: {};
407
+ $props: {
408
+ readonly modelValue?: string | undefined;
409
+ readonly defaultValue?: string | undefined;
410
+ readonly placeholder?: string | undefined;
411
+ readonly disabled?: boolean | undefined;
412
+ readonly loading?: boolean | undefined;
413
+ readonly autofocus?: boolean | undefined;
414
+ readonly mode?: InputMode | undefined;
415
+ readonly autoSize?: AutoSize | undefined;
416
+ readonly maxLength?: number | undefined;
417
+ readonly showWordLimit?: boolean | undefined;
418
+ readonly clearable?: boolean | undefined;
419
+ readonly extensions?: Extension[] | any[] | undefined;
420
+ readonly size?: "normal" | "small" | undefined;
421
+ readonly stopText?: string | undefined;
422
+ readonly defaultActions?: DefaultActions | undefined;
423
+ readonly submitType?: SubmitTrigger | undefined;
424
+ readonly onClear?: (() => any) | undefined;
425
+ readonly onInput?: ((value: string) => any) | undefined;
426
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
427
+ readonly onCancel?: (() => any) | undefined;
428
+ readonly onFocus?: ((event: FocusEvent) => any) | undefined;
429
+ readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
430
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
431
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
432
+ $attrs: {
433
+ [x: string]: unknown;
434
+ };
435
+ $refs: {
436
+ [x: string]: unknown;
437
+ };
438
+ $slots: Readonly<{
439
+ [name: string]: Slot<any> | undefined;
440
+ }>;
441
+ $root: ComponentPublicInstance | null;
442
+ $parent: ComponentPublicInstance | null;
443
+ $host: Element | null;
444
+ $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);
445
+ $el: HTMLDivElement;
446
+ $options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
447
+ onClear?: (() => any) | undefined;
448
+ onInput?: ((value: string) => any) | undefined;
449
+ onBlur?: ((event: FocusEvent) => any) | undefined;
450
+ onCancel?: (() => any) | undefined;
451
+ onFocus?: ((event: FocusEvent) => any) | undefined;
452
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
453
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
454
+ }>, {
455
+ submit: () => void;
456
+ clear: () => void;
457
+ cancel: () => void;
458
+ focus: () => void;
459
+ blur: () => void;
460
+ setContent: (content: string) => void;
461
+ getContent: () => string;
462
+ editor: SenderContext["editor"];
463
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
464
+ clear: () => any;
465
+ input: (value: string) => any;
466
+ blur: (event: FocusEvent) => any;
467
+ cancel: () => any;
468
+ focus: (event: FocusEvent) => any;
469
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
470
+ "update:modelValue": (value: string) => any;
471
+ }, string, {
472
+ size: "normal" | "small";
371
473
  placeholder: string;
372
474
  mode: InputMode;
373
- loading: boolean;
374
- autofocus: boolean;
375
- allowSpeech: boolean;
376
- allowFiles: boolean;
475
+ autoSize: AutoSize;
476
+ extensions: Extension[] | any[];
377
477
  submitType: SubmitTrigger;
378
- stopText: string;
478
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
479
+ beforeCreate?: (() => void) | (() => void)[];
480
+ created?: (() => void) | (() => void)[];
481
+ beforeMount?: (() => void) | (() => void)[];
482
+ mounted?: (() => void) | (() => void)[];
483
+ beforeUpdate?: (() => void) | (() => void)[];
484
+ updated?: (() => void) | (() => void)[];
485
+ activated?: (() => void) | (() => void)[];
486
+ deactivated?: (() => void) | (() => void)[];
487
+ beforeDestroy?: (() => void) | (() => void)[];
488
+ beforeUnmount?: (() => void) | (() => void)[];
489
+ destroyed?: (() => void) | (() => void)[];
490
+ unmounted?: (() => void) | (() => void)[];
491
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
492
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
493
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
494
+ };
495
+ $forceUpdate: () => void;
496
+ $nextTick: nextTick;
497
+ $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;
498
+ } & Readonly<{
499
+ size: "normal" | "small";
500
+ placeholder: string;
501
+ mode: InputMode;
379
502
  autoSize: AutoSize;
380
- suggestions: ISuggestionItem[];
381
- clearable: boolean;
382
- maxLength: number;
383
- showWordLimit: boolean;
384
- suggestionPopupWidth: string | number;
385
- theme: ThemeType;
386
- templateData: UserItem[];
387
- }, {}, {}, {}, string, ComponentProvideOptions, false, {
388
- senderRef: HTMLDivElement;
389
- inputWrapperRef: HTMLDivElement;
390
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
391
- modelValue?: UserItem[];
392
- } & {
393
- autoSize: boolean | {
394
- minRows: number;
395
- maxRows: number;
503
+ extensions: Extension[] | any[];
504
+ submitType: SubmitTrigger;
505
+ }> & Omit<Readonly<SenderProps> & Readonly<{
506
+ onClear?: (() => any) | undefined;
507
+ onInput?: ((value: string) => any) | undefined;
508
+ onBlur?: ((event: FocusEvent) => any) | undefined;
509
+ onCancel?: (() => any) | undefined;
510
+ onFocus?: ((event: FocusEvent) => any) | undefined;
511
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
512
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
513
+ }>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
514
+ submit: () => void;
515
+ clear: () => void;
516
+ cancel: () => void;
517
+ focus: () => void;
518
+ blur: () => void;
519
+ setContent: (content: string) => void;
520
+ getContent: () => string;
521
+ editor: SenderContext["editor"];
522
+ }> & {} & ComponentCustomProperties & {} & {
523
+ $slots: {
524
+ header?(_: {}): any;
525
+ header?(_: {}): any;
526
+ prefix?(_: {}): any;
527
+ prefix?(_: {}): any;
528
+ content?(_: {
529
+ editor: Ref<Editor | undefined, Editor | undefined>;
530
+ }): any;
531
+ content?(_: {
532
+ editor: Ref<Editor | undefined, Editor | undefined>;
533
+ }): any;
534
+ 'actions-inline'?(_: {}): any;
535
+ footer?(_: {}): any;
536
+ 'footer-right'?(_: {}): any;
396
537
  };
397
- }> & Readonly<{
398
- onSubmit?: (() => any) | undefined;
399
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
400
- }>, {
401
- clearHistory: () => void;
402
- activateFirstField: () => void;
403
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
404
- "update:modelValue": (value: UserItem[]) => any;
405
- } & {
406
- submit: () => any;
407
- }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
408
- editorRef: HTMLDivElement;
409
- }, HTMLDivElement, ComponentProvideOptions, {
410
- P: {};
411
- B: {};
412
- D: {};
413
- C: {};
414
- M: {};
415
- Defaults: {};
416
- }, Readonly<{
417
- modelValue?: UserItem[];
418
- } & {
419
- autoSize: boolean | {
420
- minRows: number;
421
- maxRows: number;
538
+ }) | null;
539
+ voiceRef: ({
540
+ $: ComponentInternalInstance;
541
+ $data: {};
542
+ $props: {
543
+ readonly icon?: (VNode | Component) | undefined;
544
+ readonly disabled?: boolean | undefined;
545
+ readonly size?: "small" | "normal" | undefined;
546
+ readonly tooltip?: TooltipContent | undefined;
547
+ readonly tooltipPlacement?: TooltipPlacement | undefined;
548
+ readonly speechConfig?: SpeechConfig | undefined;
549
+ readonly autoInsert?: boolean | undefined;
550
+ readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
551
+ readonly "onSpeech-start"?: (() => any) | undefined;
552
+ readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
553
+ readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
554
+ readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
555
+ readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
556
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
557
+ $attrs: {
558
+ [x: string]: unknown;
559
+ };
560
+ $refs: {
561
+ [x: string]: unknown;
422
562
  };
423
- }> & Readonly<{
424
- onSubmit?: (() => any) | undefined;
425
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
563
+ $slots: Readonly<{
564
+ [name: string]: Slot<any> | undefined;
565
+ }>;
566
+ $root: ComponentPublicInstance | null;
567
+ $parent: ComponentPublicInstance | null;
568
+ $host: Element | null;
569
+ $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);
570
+ $el: any;
571
+ $options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
572
+ "onSpeech-start"?: (() => any) | undefined;
573
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
574
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
575
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
576
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
426
577
  }>, {
427
- clearHistory: () => void;
428
- activateFirstField: () => void;
429
- }, {}, {}, {}, {}> | null;
430
- inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
431
- _constants: {
432
- type: ObjectConstructor;
433
- default: () => {
434
- INPUT_PC: string;
435
- INPUTGROUP_PC: string;
436
- INPUT_MOBILE: string;
437
- INPUTGROUP_MOBILE: string;
438
- Mode: string;
439
- inputMode(mode: any): string;
440
- inputGroupMode(mode: any): string;
441
- VALIDATE_ICON: {
442
- Validating: string;
443
- Success: string;
444
- Error: string;
445
- };
446
- COMPONENT_NAME: {
447
- FormItem: string;
448
- };
449
- MASKSYMBOL: string;
450
- TEXTAREA_HEIGHT_MOBILE: number;
451
- };
452
- };
453
- name: StringConstructor;
454
- size: StringConstructor;
455
- form: StringConstructor;
456
- label: StringConstructor;
457
- height: NumberConstructor;
458
- resize: StringConstructor;
459
- tabindex: {
460
- type: StringConstructor;
461
- default: string;
462
- };
463
- disabled: BooleanConstructor;
464
- readonly: BooleanConstructor;
465
- hoverExpand: BooleanConstructor;
466
- mask: BooleanConstructor;
467
- suffixIcon: (StringConstructor | ObjectConstructor)[];
468
- prefixIcon: (StringConstructor | ObjectConstructor)[];
469
- modelValue: PropType<string | number | null>;
470
- type: {
471
- type: StringConstructor;
472
- default: string;
473
- };
474
- memorySpace: {
475
- type: NumberConstructor;
476
- default: number;
477
- };
478
- vertical: {
479
- type: BooleanConstructor;
480
- default: boolean;
481
- };
482
- selectMenu: {
483
- type: {
484
- (arrayLength: number): {
485
- id: string;
486
- label: string;
487
- }[];
488
- (...items: {
489
- id: string;
490
- label: string;
491
- }[]): {
492
- id: string;
493
- label: string;
494
- }[];
495
- new (arrayLength: number): {
496
- id: string;
497
- label: string;
498
- }[];
499
- new (...items: {
500
- id: string;
501
- label: string;
502
- }[]): {
503
- id: string;
504
- label: string;
505
- }[];
506
- isArray(arg: any): arg is any[];
507
- readonly prototype: any[];
508
- from<T>(arrayLike: ArrayLike<T>): T[];
509
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
510
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
511
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
512
- of<T_4>(...items: T_4[]): T_4[];
513
- readonly [Symbol.species]: ArrayConstructor;
514
- };
515
- default: () => never[];
516
- };
517
- ellipsis: {
518
- type: BooleanConstructor;
519
- default: boolean;
520
- };
521
- contentStyle: {
522
- type: ObjectConstructor;
523
- default: () => {};
524
- };
525
- isSelect: {
526
- type: BooleanConstructor;
527
- default: boolean;
528
- };
529
- tips: StringConstructor;
530
- counter: {
531
- type: BooleanConstructor;
532
- default: boolean;
533
- };
534
- autosize: {
535
- type: (BooleanConstructor | ObjectConstructor)[];
536
- default: boolean;
537
- };
538
- clearable: {
539
- type: BooleanConstructor;
540
- default: boolean;
541
- };
542
- autocomplete: {
543
- type: StringConstructor;
544
- default: string;
545
- };
546
- showPassword: {
547
- type: BooleanConstructor;
548
- default: boolean;
549
- };
550
- showWordLimit: {
551
- type: BooleanConstructor;
552
- default: boolean;
553
- };
554
- showTitle: {
555
- type: BooleanConstructor;
556
- default: boolean;
557
- };
558
- validateEvent: {
559
- type: BooleanConstructor;
560
- default: boolean;
561
- };
562
- popupMore: {
563
- type: BooleanConstructor;
564
- default: boolean;
565
- };
566
- textareaTitle: {
567
- type: StringConstructor;
568
- default: string;
569
- };
570
- displayOnly: {
571
- type: BooleanConstructor;
572
- default: boolean;
573
- };
574
- displayOnlyContent: {
575
- type: StringConstructor;
576
- default: string;
577
- };
578
- customClass: {
579
- type: StringConstructor;
580
- default: string;
581
- };
582
- frontClearIcon: {
583
- type: BooleanConstructor;
584
- default: boolean;
585
- };
586
- showEmptyValue: {
587
- type: BooleanConstructor;
588
- default: undefined;
589
- };
590
- textAlign: {
591
- type: StringConstructor;
592
- default: string;
593
- };
594
- width: {
595
- type: PropType<string | number | null>;
596
- };
597
- showTooltip: {
598
- type: BooleanConstructor;
599
- default: boolean;
600
- };
601
- inputBoxType: {
602
- type: StringConstructor;
603
- default: string;
604
- validator: (value: string) => boolean;
605
- };
606
- tiny_mode: StringConstructor;
607
- tiny_mode_root: BooleanConstructor;
608
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
609
- tiny_renderless: FunctionConstructor;
610
- tiny_theme: StringConstructor;
611
- tiny_mcp_config: ObjectConstructor;
612
- tiny_chart_theme: ObjectConstructor;
613
- }>>, () => VNode<RendererNode, RendererElement, {
614
- [key: string]: any;
615
- }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
616
- disabled: boolean;
617
- type: string;
618
- ellipsis: boolean;
619
- mask: boolean;
620
- vertical: boolean;
621
- customClass: string;
622
- tiny_mode_root: boolean;
623
- _constants: Record<string, any>;
624
- tabindex: string;
625
- showTitle: boolean;
626
- readonly: boolean;
627
- hoverExpand: boolean;
628
- memorySpace: number;
629
- selectMenu: {
630
- id: string;
631
- label: string;
632
- }[];
633
- contentStyle: Record<string, any>;
634
- isSelect: boolean;
635
- counter: boolean;
636
- autosize: boolean | Record<string, any>;
637
- clearable: boolean;
638
- autocomplete: string;
639
- showPassword: boolean;
640
- showWordLimit: boolean;
641
- validateEvent: boolean;
642
- popupMore: boolean;
643
- textareaTitle: string;
644
- displayOnly: boolean;
645
- displayOnlyContent: string;
646
- frontClearIcon: boolean;
647
- showEmptyValue: boolean;
648
- textAlign: string;
649
- showTooltip: boolean;
650
- inputBoxType: string;
651
- }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
652
- P: {};
653
- B: {};
654
- D: {};
655
- C: {};
656
- M: {};
657
- Defaults: {};
658
- }, Readonly<ExtractPropTypes< {
659
- _constants: {
660
- type: ObjectConstructor;
661
- default: () => {
662
- INPUT_PC: string;
663
- INPUTGROUP_PC: string;
664
- INPUT_MOBILE: string;
665
- INPUTGROUP_MOBILE: string;
666
- Mode: string;
667
- inputMode(mode: any): string;
668
- inputGroupMode(mode: any): string;
669
- VALIDATE_ICON: {
670
- Validating: string;
671
- Success: string;
672
- Error: string;
673
- };
674
- COMPONENT_NAME: {
675
- FormItem: string;
676
- };
677
- MASKSYMBOL: string;
678
- TEXTAREA_HEIGHT_MOBILE: number;
679
- };
680
- };
681
- name: StringConstructor;
682
- size: StringConstructor;
683
- form: StringConstructor;
684
- label: StringConstructor;
685
- height: NumberConstructor;
686
- resize: StringConstructor;
687
- tabindex: {
688
- type: StringConstructor;
689
- default: string;
690
- };
691
- disabled: BooleanConstructor;
692
- readonly: BooleanConstructor;
693
- hoverExpand: BooleanConstructor;
694
- mask: BooleanConstructor;
695
- suffixIcon: (StringConstructor | ObjectConstructor)[];
696
- prefixIcon: (StringConstructor | ObjectConstructor)[];
697
- modelValue: PropType<string | number | null>;
698
- type: {
699
- type: StringConstructor;
700
- default: string;
701
- };
702
- memorySpace: {
703
- type: NumberConstructor;
704
- default: number;
705
- };
706
- vertical: {
707
- type: BooleanConstructor;
708
- default: boolean;
709
- };
710
- selectMenu: {
711
- type: {
712
- (arrayLength: number): {
713
- id: string;
714
- label: string;
715
- }[];
716
- (...items: {
717
- id: string;
718
- label: string;
719
- }[]): {
720
- id: string;
721
- label: string;
722
- }[];
723
- new (arrayLength: number): {
724
- id: string;
725
- label: string;
726
- }[];
727
- new (...items: {
728
- id: string;
729
- label: string;
730
- }[]): {
731
- id: string;
732
- label: string;
733
- }[];
734
- isArray(arg: any): arg is any[];
735
- readonly prototype: any[];
736
- from<T>(arrayLike: ArrayLike<T>): T[];
737
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
738
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
739
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
740
- of<T_4>(...items: T_4[]): T_4[];
741
- readonly [Symbol.species]: ArrayConstructor;
742
- };
743
- default: () => never[];
744
- };
745
- ellipsis: {
746
- type: BooleanConstructor;
747
- default: boolean;
748
- };
749
- contentStyle: {
750
- type: ObjectConstructor;
751
- default: () => {};
752
- };
753
- isSelect: {
754
- type: BooleanConstructor;
755
- default: boolean;
756
- };
757
- tips: StringConstructor;
758
- counter: {
759
- type: BooleanConstructor;
760
- default: boolean;
761
- };
762
- autosize: {
763
- type: (BooleanConstructor | ObjectConstructor)[];
764
- default: boolean;
765
- };
766
- clearable: {
767
- type: BooleanConstructor;
768
- default: boolean;
769
- };
770
- autocomplete: {
771
- type: StringConstructor;
772
- default: string;
773
- };
774
- showPassword: {
775
- type: BooleanConstructor;
776
- default: boolean;
777
- };
778
- showWordLimit: {
779
- type: BooleanConstructor;
780
- default: boolean;
781
- };
782
- showTitle: {
783
- type: BooleanConstructor;
784
- default: boolean;
785
- };
786
- validateEvent: {
787
- type: BooleanConstructor;
788
- default: boolean;
789
- };
790
- popupMore: {
791
- type: BooleanConstructor;
792
- default: boolean;
793
- };
794
- textareaTitle: {
795
- type: StringConstructor;
796
- default: string;
797
- };
798
- displayOnly: {
799
- type: BooleanConstructor;
800
- default: boolean;
801
- };
802
- displayOnlyContent: {
803
- type: StringConstructor;
804
- default: string;
805
- };
806
- customClass: {
807
- type: StringConstructor;
808
- default: string;
809
- };
810
- frontClearIcon: {
811
- type: BooleanConstructor;
812
- default: boolean;
813
- };
814
- showEmptyValue: {
815
- type: BooleanConstructor;
816
- default: undefined;
817
- };
818
- textAlign: {
819
- type: StringConstructor;
820
- default: string;
821
- };
822
- width: {
823
- type: PropType<string | number | null>;
824
- };
825
- showTooltip: {
826
- type: BooleanConstructor;
827
- default: boolean;
828
- };
829
- inputBoxType: {
830
- type: StringConstructor;
831
- default: string;
832
- validator: (value: string) => boolean;
833
- };
834
- tiny_mode: StringConstructor;
835
- tiny_mode_root: BooleanConstructor;
836
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
837
- tiny_renderless: FunctionConstructor;
838
- tiny_theme: StringConstructor;
839
- tiny_mcp_config: ObjectConstructor;
840
- tiny_chart_theme: ObjectConstructor;
841
- }>>, () => VNode<RendererNode, RendererElement, {
842
- [key: string]: any;
843
- }>, {}, {}, {}, {
844
- disabled: boolean;
845
- type: string;
846
- ellipsis: boolean;
847
- mask: boolean;
848
- vertical: boolean;
849
- customClass: string;
850
- tiny_mode_root: boolean;
851
- _constants: Record<string, any>;
852
- tabindex: string;
853
- showTitle: boolean;
854
- readonly: boolean;
855
- hoverExpand: boolean;
856
- memorySpace: number;
857
- selectMenu: {
858
- id: string;
859
- label: string;
860
- }[];
861
- contentStyle: Record<string, any>;
862
- isSelect: boolean;
863
- counter: boolean;
864
- autosize: boolean | Record<string, any>;
865
- clearable: boolean;
866
- autocomplete: string;
867
- showPassword: boolean;
868
- showWordLimit: boolean;
869
- validateEvent: boolean;
870
- popupMore: boolean;
871
- textareaTitle: string;
872
- displayOnly: boolean;
873
- displayOnlyContent: string;
874
- frontClearIcon: boolean;
875
- showEmptyValue: boolean;
876
- textAlign: string;
877
- showTooltip: boolean;
878
- inputBoxType: string;
879
- }> | null;
880
- buttonsContainerRef: HTMLDivElement;
578
+ start: () => void;
579
+ stop: () => void;
580
+ speechState: SpeechState;
581
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
582
+ "speech-start": () => any;
583
+ "speech-interim": (transcript: string) => any;
584
+ "speech-final": (transcript: string) => any;
585
+ "speech-end": (transcript?: string | undefined) => any;
586
+ "speech-error": (error: Error) => any;
587
+ }, string, {
588
+ tooltipPlacement: TooltipPlacement;
589
+ autoInsert: boolean;
590
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
591
+ beforeCreate?: (() => void) | (() => void)[];
592
+ created?: (() => void) | (() => void)[];
593
+ beforeMount?: (() => void) | (() => void)[];
594
+ mounted?: (() => void) | (() => void)[];
595
+ beforeUpdate?: (() => void) | (() => void)[];
596
+ updated?: (() => void) | (() => void)[];
597
+ activated?: (() => void) | (() => void)[];
598
+ deactivated?: (() => void) | (() => void)[];
599
+ beforeDestroy?: (() => void) | (() => void)[];
600
+ beforeUnmount?: (() => void) | (() => void)[];
601
+ destroyed?: (() => void) | (() => void)[];
602
+ unmounted?: (() => void) | (() => void)[];
603
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
604
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
605
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
606
+ };
607
+ $forceUpdate: () => void;
608
+ $nextTick: nextTick;
609
+ $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;
610
+ } & Readonly<{
611
+ tooltipPlacement: TooltipPlacement;
612
+ autoInsert: boolean;
613
+ }> & Omit<Readonly<VoiceButtonProps> & Readonly<{
614
+ "onSpeech-start"?: (() => any) | undefined;
615
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
616
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
617
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
618
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
619
+ }>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
620
+ start: () => void;
621
+ stop: () => void;
622
+ speechState: SpeechState;
623
+ }> & {} & ComponentCustomProperties & {} & {
624
+ $slots: {
625
+ 'recording-overlay'?(_: {
626
+ isRecording: boolean;
627
+ stop: () => void;
628
+ }): any;
629
+ };
630
+ }) | null;
881
631
  }, HTMLDivElement>;
882
632
 
883
633
  declare const __VLS_component_8: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
@@ -1090,6 +840,28 @@ declare function __VLS_template_12(): {
1090
840
  rootEl: HTMLDivElement;
1091
841
  };
1092
842
 
843
+ declare function __VLS_template_13(): {
844
+ attrs: Partial<{}>;
845
+ slots: {
846
+ icon?(_: {}): any;
847
+ icon?(_: {}): any;
848
+ };
849
+ refs: {};
850
+ rootEl: any;
851
+ };
852
+
853
+ declare function __VLS_template_14(): {
854
+ attrs: Partial<{}>;
855
+ slots: {
856
+ 'recording-overlay'?(_: {
857
+ isRecording: boolean;
858
+ stop: () => void;
859
+ }): any;
860
+ };
861
+ refs: {};
862
+ rootEl: any;
863
+ };
864
+
1093
865
  declare function __VLS_template_2(): {
1094
866
  attrs: Partial<{}>;
1095
867
  slots: {
@@ -1231,546 +1003,285 @@ declare function __VLS_template_7(): {
1231
1003
  slots: {
1232
1004
  header?(_: {}): any;
1233
1005
  prefix?(_: {}): any;
1234
- content?(_: {}): any;
1235
- decorativeContent?(_: {}): any;
1006
+ content?(_: {
1007
+ editor: Ref<Editor | undefined, Editor | undefined>;
1008
+ }): any;
1236
1009
  actions?(_: {}): any;
1237
1010
  'footer-left'?(_: {}): any;
1238
- 'footer-right'?(_: {}): any;
1239
1011
  footer?(_: {}): any;
1012
+ 'footer-right'?(_: {}): any;
1240
1013
  };
1241
1014
  refs: {
1242
- senderRef: HTMLDivElement;
1243
- inputWrapperRef: HTMLDivElement;
1244
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
1245
- modelValue?: UserItem[];
1246
- } & {
1247
- autoSize: boolean | {
1248
- minRows: number;
1249
- maxRows: number;
1250
- };
1251
- }> & Readonly<{
1252
- onSubmit?: (() => any) | undefined;
1253
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1254
- }>, {
1255
- clearHistory: () => void;
1256
- activateFirstField: () => void;
1257
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1258
- "update:modelValue": (value: UserItem[]) => any;
1259
- } & {
1260
- submit: () => any;
1261
- }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
1262
- editorRef: HTMLDivElement;
1263
- }, HTMLDivElement, ComponentProvideOptions, {
1264
- P: {};
1265
- B: {};
1266
- D: {};
1267
- C: {};
1268
- M: {};
1269
- Defaults: {};
1270
- }, Readonly<{
1271
- modelValue?: UserItem[];
1272
- } & {
1273
- autoSize: boolean | {
1274
- minRows: number;
1275
- maxRows: number;
1276
- };
1277
- }> & Readonly<{
1278
- onSubmit?: (() => any) | undefined;
1279
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1280
- }>, {
1281
- clearHistory: () => void;
1282
- activateFirstField: () => void;
1283
- }, {}, {}, {}, {}> | null;
1284
- inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
1285
- _constants: {
1286
- type: ObjectConstructor;
1287
- default: () => {
1288
- INPUT_PC: string;
1289
- INPUTGROUP_PC: string;
1290
- INPUT_MOBILE: string;
1291
- INPUTGROUP_MOBILE: string;
1292
- Mode: string;
1293
- inputMode(mode: any): string;
1294
- inputGroupMode(mode: any): string;
1295
- VALIDATE_ICON: {
1296
- Validating: string;
1297
- Success: string;
1298
- Error: string;
1299
- };
1300
- COMPONENT_NAME: {
1301
- FormItem: string;
1302
- };
1303
- MASKSYMBOL: string;
1304
- TEXTAREA_HEIGHT_MOBILE: number;
1305
- };
1306
- };
1307
- name: StringConstructor;
1308
- size: StringConstructor;
1309
- form: StringConstructor;
1310
- label: StringConstructor;
1311
- height: NumberConstructor;
1312
- resize: StringConstructor;
1313
- tabindex: {
1314
- type: StringConstructor;
1315
- default: string;
1316
- };
1317
- disabled: BooleanConstructor;
1318
- readonly: BooleanConstructor;
1319
- hoverExpand: BooleanConstructor;
1320
- mask: BooleanConstructor;
1321
- suffixIcon: (StringConstructor | ObjectConstructor)[];
1322
- prefixIcon: (StringConstructor | ObjectConstructor)[];
1323
- modelValue: PropType<string | number | null>;
1324
- type: {
1325
- type: StringConstructor;
1326
- default: string;
1327
- };
1328
- memorySpace: {
1329
- type: NumberConstructor;
1330
- default: number;
1331
- };
1332
- vertical: {
1333
- type: BooleanConstructor;
1334
- default: boolean;
1335
- };
1336
- selectMenu: {
1337
- type: {
1338
- (arrayLength: number): {
1339
- id: string;
1340
- label: string;
1341
- }[];
1342
- (...items: {
1343
- id: string;
1344
- label: string;
1345
- }[]): {
1346
- id: string;
1347
- label: string;
1348
- }[];
1349
- new (arrayLength: number): {
1350
- id: string;
1351
- label: string;
1352
- }[];
1353
- new (...items: {
1354
- id: string;
1355
- label: string;
1356
- }[]): {
1357
- id: string;
1358
- label: string;
1359
- }[];
1360
- isArray(arg: any): arg is any[];
1361
- readonly prototype: any[];
1362
- from<T>(arrayLike: ArrayLike<T>): T[];
1363
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1364
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1365
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1366
- of<T_4>(...items: T_4[]): T_4[];
1367
- readonly [Symbol.species]: ArrayConstructor;
1368
- };
1369
- default: () => never[];
1370
- };
1371
- ellipsis: {
1372
- type: BooleanConstructor;
1373
- default: boolean;
1374
- };
1375
- contentStyle: {
1376
- type: ObjectConstructor;
1377
- default: () => {};
1378
- };
1379
- isSelect: {
1380
- type: BooleanConstructor;
1381
- default: boolean;
1382
- };
1383
- tips: StringConstructor;
1384
- counter: {
1385
- type: BooleanConstructor;
1386
- default: boolean;
1387
- };
1388
- autosize: {
1389
- type: (BooleanConstructor | ObjectConstructor)[];
1390
- default: boolean;
1391
- };
1392
- clearable: {
1393
- type: BooleanConstructor;
1394
- default: boolean;
1395
- };
1396
- autocomplete: {
1397
- type: StringConstructor;
1398
- default: string;
1399
- };
1400
- showPassword: {
1401
- type: BooleanConstructor;
1402
- default: boolean;
1403
- };
1404
- showWordLimit: {
1405
- type: BooleanConstructor;
1406
- default: boolean;
1407
- };
1408
- showTitle: {
1409
- type: BooleanConstructor;
1410
- default: boolean;
1411
- };
1412
- validateEvent: {
1413
- type: BooleanConstructor;
1414
- default: boolean;
1415
- };
1416
- popupMore: {
1417
- type: BooleanConstructor;
1418
- default: boolean;
1419
- };
1420
- textareaTitle: {
1421
- type: StringConstructor;
1422
- default: string;
1423
- };
1424
- displayOnly: {
1425
- type: BooleanConstructor;
1426
- default: boolean;
1427
- };
1428
- displayOnlyContent: {
1429
- type: StringConstructor;
1430
- default: string;
1431
- };
1432
- customClass: {
1433
- type: StringConstructor;
1434
- default: string;
1435
- };
1436
- frontClearIcon: {
1437
- type: BooleanConstructor;
1438
- default: boolean;
1439
- };
1440
- showEmptyValue: {
1441
- type: BooleanConstructor;
1442
- default: undefined;
1443
- };
1444
- textAlign: {
1445
- type: StringConstructor;
1446
- default: string;
1447
- };
1448
- width: {
1449
- type: PropType<string | number | null>;
1450
- };
1451
- showTooltip: {
1452
- type: BooleanConstructor;
1453
- default: boolean;
1454
- };
1455
- inputBoxType: {
1456
- type: StringConstructor;
1457
- default: string;
1458
- validator: (value: string) => boolean;
1459
- };
1460
- tiny_mode: StringConstructor;
1461
- tiny_mode_root: BooleanConstructor;
1462
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
1463
- tiny_renderless: FunctionConstructor;
1464
- tiny_theme: StringConstructor;
1465
- tiny_mcp_config: ObjectConstructor;
1466
- tiny_chart_theme: ObjectConstructor;
1467
- }>>, () => VNode<RendererNode, RendererElement, {
1468
- [key: string]: any;
1469
- }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
1470
- disabled: boolean;
1471
- type: string;
1472
- ellipsis: boolean;
1473
- mask: boolean;
1474
- vertical: boolean;
1475
- customClass: string;
1476
- tiny_mode_root: boolean;
1477
- _constants: Record<string, any>;
1478
- tabindex: string;
1479
- showTitle: boolean;
1480
- readonly: boolean;
1481
- hoverExpand: boolean;
1482
- memorySpace: number;
1483
- selectMenu: {
1484
- id: string;
1485
- label: string;
1486
- }[];
1487
- contentStyle: Record<string, any>;
1488
- isSelect: boolean;
1489
- counter: boolean;
1490
- autosize: boolean | Record<string, any>;
1491
- clearable: boolean;
1492
- autocomplete: string;
1493
- showPassword: boolean;
1494
- showWordLimit: boolean;
1495
- validateEvent: boolean;
1496
- popupMore: boolean;
1497
- textareaTitle: string;
1498
- displayOnly: boolean;
1499
- displayOnlyContent: string;
1500
- frontClearIcon: boolean;
1501
- showEmptyValue: boolean;
1502
- textAlign: string;
1503
- showTooltip: boolean;
1504
- inputBoxType: string;
1505
- }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1506
- P: {};
1507
- B: {};
1508
- D: {};
1509
- C: {};
1510
- M: {};
1511
- Defaults: {};
1512
- }, Readonly<ExtractPropTypes< {
1513
- _constants: {
1514
- type: ObjectConstructor;
1515
- default: () => {
1516
- INPUT_PC: string;
1517
- INPUTGROUP_PC: string;
1518
- INPUT_MOBILE: string;
1519
- INPUTGROUP_MOBILE: string;
1520
- Mode: string;
1521
- inputMode(mode: any): string;
1522
- inputGroupMode(mode: any): string;
1523
- VALIDATE_ICON: {
1524
- Validating: string;
1525
- Success: string;
1526
- Error: string;
1527
- };
1528
- COMPONENT_NAME: {
1529
- FormItem: string;
1530
- };
1531
- MASKSYMBOL: string;
1532
- TEXTAREA_HEIGHT_MOBILE: number;
1533
- };
1534
- };
1535
- name: StringConstructor;
1536
- size: StringConstructor;
1537
- form: StringConstructor;
1538
- label: StringConstructor;
1539
- height: NumberConstructor;
1540
- resize: StringConstructor;
1541
- tabindex: {
1542
- type: StringConstructor;
1543
- default: string;
1544
- };
1545
- disabled: BooleanConstructor;
1546
- readonly: BooleanConstructor;
1547
- hoverExpand: BooleanConstructor;
1548
- mask: BooleanConstructor;
1549
- suffixIcon: (StringConstructor | ObjectConstructor)[];
1550
- prefixIcon: (StringConstructor | ObjectConstructor)[];
1551
- modelValue: PropType<string | number | null>;
1552
- type: {
1553
- type: StringConstructor;
1554
- default: string;
1555
- };
1556
- memorySpace: {
1557
- type: NumberConstructor;
1558
- default: number;
1559
- };
1560
- vertical: {
1561
- type: BooleanConstructor;
1562
- default: boolean;
1563
- };
1564
- selectMenu: {
1565
- type: {
1566
- (arrayLength: number): {
1567
- id: string;
1568
- label: string;
1569
- }[];
1570
- (...items: {
1571
- id: string;
1572
- label: string;
1573
- }[]): {
1574
- id: string;
1575
- label: string;
1576
- }[];
1577
- new (arrayLength: number): {
1578
- id: string;
1579
- label: string;
1580
- }[];
1581
- new (...items: {
1582
- id: string;
1583
- label: string;
1584
- }[]): {
1585
- id: string;
1586
- label: string;
1587
- }[];
1588
- isArray(arg: any): arg is any[];
1589
- readonly prototype: any[];
1590
- from<T>(arrayLike: ArrayLike<T>): T[];
1591
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1592
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1593
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1594
- of<T_4>(...items: T_4[]): T_4[];
1595
- readonly [Symbol.species]: ArrayConstructor;
1596
- };
1597
- default: () => never[];
1598
- };
1599
- ellipsis: {
1600
- type: BooleanConstructor;
1601
- default: boolean;
1602
- };
1603
- contentStyle: {
1604
- type: ObjectConstructor;
1605
- default: () => {};
1606
- };
1607
- isSelect: {
1608
- type: BooleanConstructor;
1609
- default: boolean;
1610
- };
1611
- tips: StringConstructor;
1612
- counter: {
1613
- type: BooleanConstructor;
1614
- default: boolean;
1615
- };
1616
- autosize: {
1617
- type: (BooleanConstructor | ObjectConstructor)[];
1618
- default: boolean;
1619
- };
1620
- clearable: {
1621
- type: BooleanConstructor;
1622
- default: boolean;
1623
- };
1624
- autocomplete: {
1625
- type: StringConstructor;
1626
- default: string;
1627
- };
1628
- showPassword: {
1629
- type: BooleanConstructor;
1630
- default: boolean;
1631
- };
1632
- showWordLimit: {
1633
- type: BooleanConstructor;
1634
- default: boolean;
1635
- };
1636
- showTitle: {
1637
- type: BooleanConstructor;
1638
- default: boolean;
1639
- };
1640
- validateEvent: {
1641
- type: BooleanConstructor;
1642
- default: boolean;
1643
- };
1644
- popupMore: {
1645
- type: BooleanConstructor;
1646
- default: boolean;
1647
- };
1648
- textareaTitle: {
1649
- type: StringConstructor;
1650
- default: string;
1651
- };
1652
- displayOnly: {
1653
- type: BooleanConstructor;
1654
- default: boolean;
1655
- };
1656
- displayOnlyContent: {
1657
- type: StringConstructor;
1658
- default: string;
1659
- };
1660
- customClass: {
1661
- type: StringConstructor;
1662
- default: string;
1663
- };
1664
- frontClearIcon: {
1665
- type: BooleanConstructor;
1666
- default: boolean;
1667
- };
1668
- showEmptyValue: {
1669
- type: BooleanConstructor;
1670
- default: undefined;
1671
- };
1672
- textAlign: {
1673
- type: StringConstructor;
1674
- default: string;
1675
- };
1676
- width: {
1677
- type: PropType<string | number | null>;
1678
- };
1679
- showTooltip: {
1680
- type: BooleanConstructor;
1681
- default: boolean;
1682
- };
1683
- inputBoxType: {
1684
- type: StringConstructor;
1685
- default: string;
1686
- validator: (value: string) => boolean;
1687
- };
1688
- tiny_mode: StringConstructor;
1689
- tiny_mode_root: BooleanConstructor;
1690
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
1691
- tiny_renderless: FunctionConstructor;
1692
- tiny_theme: StringConstructor;
1693
- tiny_mcp_config: ObjectConstructor;
1694
- tiny_chart_theme: ObjectConstructor;
1695
- }>>, () => VNode<RendererNode, RendererElement, {
1696
- [key: string]: any;
1697
- }>, {}, {}, {}, {
1698
- disabled: boolean;
1699
- type: string;
1700
- ellipsis: boolean;
1701
- mask: boolean;
1702
- vertical: boolean;
1703
- customClass: string;
1704
- tiny_mode_root: boolean;
1705
- _constants: Record<string, any>;
1706
- tabindex: string;
1707
- showTitle: boolean;
1708
- readonly: boolean;
1709
- hoverExpand: boolean;
1710
- memorySpace: number;
1711
- selectMenu: {
1712
- id: string;
1713
- label: string;
1714
- }[];
1715
- contentStyle: Record<string, any>;
1716
- isSelect: boolean;
1717
- counter: boolean;
1718
- autosize: boolean | Record<string, any>;
1719
- clearable: boolean;
1720
- autocomplete: string;
1721
- showPassword: boolean;
1722
- showWordLimit: boolean;
1723
- validateEvent: boolean;
1724
- popupMore: boolean;
1725
- textareaTitle: string;
1726
- displayOnly: boolean;
1727
- displayOnlyContent: string;
1728
- frontClearIcon: boolean;
1729
- showEmptyValue: boolean;
1730
- textAlign: string;
1731
- showTooltip: boolean;
1732
- inputBoxType: string;
1733
- }> | null;
1734
- buttonsContainerRef: HTMLDivElement;
1735
- };
1736
- rootEl: HTMLDivElement;
1737
- };
1738
-
1739
- declare function __VLS_template_8(): {
1740
- attrs: Partial<{}>;
1741
- slots: Readonly<SuggestionPillButtonSlots> & SuggestionPillButtonSlots;
1742
- refs: {};
1743
- rootEl: HTMLButtonElement;
1744
- };
1745
-
1746
- declare function __VLS_template_9(): {
1747
- attrs: Partial<{}>;
1748
- slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
1749
- refs: {
1750
- containerWrapperRef: HTMLDivElement;
1751
- containerRef: HTMLDivElement;
1752
- staticMaybeItemRefs: unknown[];
1753
- floatingItemsRef: HTMLDivElement;
1754
- floatingMaybeItemRefs: unknown[];
1755
- };
1756
- rootEl: HTMLDivElement;
1757
- };
1758
-
1759
- declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
1760
-
1761
- declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
1762
-
1763
- declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
1764
-
1765
- declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
1766
-
1767
- declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1768
-
1769
- declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
1770
-
1771
- declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
1772
-
1773
- declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
1015
+ chatInputRef: ({
1016
+ $: ComponentInternalInstance;
1017
+ $data: {};
1018
+ $props: {
1019
+ readonly modelValue?: string | undefined;
1020
+ readonly defaultValue?: string | undefined;
1021
+ readonly placeholder?: string | undefined;
1022
+ readonly disabled?: boolean | undefined;
1023
+ readonly loading?: boolean | undefined;
1024
+ readonly autofocus?: boolean | undefined;
1025
+ readonly mode?: InputMode | undefined;
1026
+ readonly autoSize?: AutoSize | undefined;
1027
+ readonly maxLength?: number | undefined;
1028
+ readonly showWordLimit?: boolean | undefined;
1029
+ readonly clearable?: boolean | undefined;
1030
+ readonly extensions?: Extension[] | any[] | undefined;
1031
+ readonly size?: "normal" | "small" | undefined;
1032
+ readonly stopText?: string | undefined;
1033
+ readonly defaultActions?: DefaultActions | undefined;
1034
+ readonly submitType?: SubmitTrigger | undefined;
1035
+ readonly onClear?: (() => any) | undefined;
1036
+ readonly onInput?: ((value: string) => any) | undefined;
1037
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
1038
+ readonly onCancel?: (() => any) | undefined;
1039
+ readonly onFocus?: ((event: FocusEvent) => any) | undefined;
1040
+ readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1041
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1042
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1043
+ $attrs: {
1044
+ [x: string]: unknown;
1045
+ };
1046
+ $refs: {
1047
+ [x: string]: unknown;
1048
+ };
1049
+ $slots: Readonly<{
1050
+ [name: string]: Slot<any> | undefined;
1051
+ }>;
1052
+ $root: ComponentPublicInstance | null;
1053
+ $parent: ComponentPublicInstance | null;
1054
+ $host: Element | null;
1055
+ $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);
1056
+ $el: HTMLDivElement;
1057
+ $options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
1058
+ onClear?: (() => any) | undefined;
1059
+ onInput?: ((value: string) => any) | undefined;
1060
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1061
+ onCancel?: (() => any) | undefined;
1062
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1063
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1064
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1065
+ }>, {
1066
+ submit: () => void;
1067
+ clear: () => void;
1068
+ cancel: () => void;
1069
+ focus: () => void;
1070
+ blur: () => void;
1071
+ setContent: (content: string) => void;
1072
+ getContent: () => string;
1073
+ editor: SenderContext["editor"];
1074
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1075
+ clear: () => any;
1076
+ input: (value: string) => any;
1077
+ blur: (event: FocusEvent) => any;
1078
+ cancel: () => any;
1079
+ focus: (event: FocusEvent) => any;
1080
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
1081
+ "update:modelValue": (value: string) => any;
1082
+ }, string, {
1083
+ size: "normal" | "small";
1084
+ placeholder: string;
1085
+ mode: InputMode;
1086
+ autoSize: AutoSize;
1087
+ extensions: Extension[] | any[];
1088
+ submitType: SubmitTrigger;
1089
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
1090
+ beforeCreate?: (() => void) | (() => void)[];
1091
+ created?: (() => void) | (() => void)[];
1092
+ beforeMount?: (() => void) | (() => void)[];
1093
+ mounted?: (() => void) | (() => void)[];
1094
+ beforeUpdate?: (() => void) | (() => void)[];
1095
+ updated?: (() => void) | (() => void)[];
1096
+ activated?: (() => void) | (() => void)[];
1097
+ deactivated?: (() => void) | (() => void)[];
1098
+ beforeDestroy?: (() => void) | (() => void)[];
1099
+ beforeUnmount?: (() => void) | (() => void)[];
1100
+ destroyed?: (() => void) | (() => void)[];
1101
+ unmounted?: (() => void) | (() => void)[];
1102
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1103
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1104
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
1105
+ };
1106
+ $forceUpdate: () => void;
1107
+ $nextTick: nextTick;
1108
+ $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;
1109
+ } & Readonly<{
1110
+ size: "normal" | "small";
1111
+ placeholder: string;
1112
+ mode: InputMode;
1113
+ autoSize: AutoSize;
1114
+ extensions: Extension[] | any[];
1115
+ submitType: SubmitTrigger;
1116
+ }> & Omit<Readonly<SenderProps> & Readonly<{
1117
+ onClear?: (() => any) | undefined;
1118
+ onInput?: ((value: string) => any) | undefined;
1119
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1120
+ onCancel?: (() => any) | undefined;
1121
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1122
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1123
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1124
+ }>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
1125
+ submit: () => void;
1126
+ clear: () => void;
1127
+ cancel: () => void;
1128
+ focus: () => void;
1129
+ blur: () => void;
1130
+ setContent: (content: string) => void;
1131
+ getContent: () => string;
1132
+ editor: SenderContext["editor"];
1133
+ }> & {} & ComponentCustomProperties & {} & {
1134
+ $slots: {
1135
+ header?(_: {}): any;
1136
+ header?(_: {}): any;
1137
+ prefix?(_: {}): any;
1138
+ prefix?(_: {}): any;
1139
+ content?(_: {
1140
+ editor: Ref<Editor | undefined, Editor | undefined>;
1141
+ }): any;
1142
+ content?(_: {
1143
+ editor: Ref<Editor | undefined, Editor | undefined>;
1144
+ }): any;
1145
+ 'actions-inline'?(_: {}): any;
1146
+ footer?(_: {}): any;
1147
+ 'footer-right'?(_: {}): any;
1148
+ };
1149
+ }) | null;
1150
+ voiceRef: ({
1151
+ $: ComponentInternalInstance;
1152
+ $data: {};
1153
+ $props: {
1154
+ readonly icon?: (VNode | Component) | undefined;
1155
+ readonly disabled?: boolean | undefined;
1156
+ readonly size?: "small" | "normal" | undefined;
1157
+ readonly tooltip?: TooltipContent | undefined;
1158
+ readonly tooltipPlacement?: TooltipPlacement | undefined;
1159
+ readonly speechConfig?: SpeechConfig | undefined;
1160
+ readonly autoInsert?: boolean | undefined;
1161
+ readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
1162
+ readonly "onSpeech-start"?: (() => any) | undefined;
1163
+ readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1164
+ readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
1165
+ readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1166
+ readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
1167
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1168
+ $attrs: {
1169
+ [x: string]: unknown;
1170
+ };
1171
+ $refs: {
1172
+ [x: string]: unknown;
1173
+ };
1174
+ $slots: Readonly<{
1175
+ [name: string]: Slot<any> | undefined;
1176
+ }>;
1177
+ $root: ComponentPublicInstance | null;
1178
+ $parent: ComponentPublicInstance | null;
1179
+ $host: Element | null;
1180
+ $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);
1181
+ $el: any;
1182
+ $options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
1183
+ "onSpeech-start"?: (() => any) | undefined;
1184
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1185
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
1186
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1187
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
1188
+ }>, {
1189
+ start: () => void;
1190
+ stop: () => void;
1191
+ speechState: SpeechState;
1192
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1193
+ "speech-start": () => any;
1194
+ "speech-interim": (transcript: string) => any;
1195
+ "speech-final": (transcript: string) => any;
1196
+ "speech-end": (transcript?: string | undefined) => any;
1197
+ "speech-error": (error: Error) => any;
1198
+ }, string, {
1199
+ tooltipPlacement: TooltipPlacement;
1200
+ autoInsert: boolean;
1201
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
1202
+ beforeCreate?: (() => void) | (() => void)[];
1203
+ created?: (() => void) | (() => void)[];
1204
+ beforeMount?: (() => void) | (() => void)[];
1205
+ mounted?: (() => void) | (() => void)[];
1206
+ beforeUpdate?: (() => void) | (() => void)[];
1207
+ updated?: (() => void) | (() => void)[];
1208
+ activated?: (() => void) | (() => void)[];
1209
+ deactivated?: (() => void) | (() => void)[];
1210
+ beforeDestroy?: (() => void) | (() => void)[];
1211
+ beforeUnmount?: (() => void) | (() => void)[];
1212
+ destroyed?: (() => void) | (() => void)[];
1213
+ unmounted?: (() => void) | (() => void)[];
1214
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1215
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1216
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
1217
+ };
1218
+ $forceUpdate: () => void;
1219
+ $nextTick: nextTick;
1220
+ $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;
1221
+ } & Readonly<{
1222
+ tooltipPlacement: TooltipPlacement;
1223
+ autoInsert: boolean;
1224
+ }> & Omit<Readonly<VoiceButtonProps> & Readonly<{
1225
+ "onSpeech-start"?: (() => any) | undefined;
1226
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1227
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
1228
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1229
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
1230
+ }>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
1231
+ start: () => void;
1232
+ stop: () => void;
1233
+ speechState: SpeechState;
1234
+ }> & {} & ComponentCustomProperties & {} & {
1235
+ $slots: {
1236
+ 'recording-overlay'?(_: {
1237
+ isRecording: boolean;
1238
+ stop: () => void;
1239
+ }): any;
1240
+ };
1241
+ }) | null;
1242
+ };
1243
+ rootEl: HTMLDivElement;
1244
+ };
1245
+
1246
+ declare function __VLS_template_8(): {
1247
+ attrs: Partial<{}>;
1248
+ slots: Readonly<SuggestionPillButtonSlots> & SuggestionPillButtonSlots;
1249
+ refs: {};
1250
+ rootEl: HTMLButtonElement;
1251
+ };
1252
+
1253
+ declare function __VLS_template_9(): {
1254
+ attrs: Partial<{}>;
1255
+ slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
1256
+ refs: {
1257
+ containerWrapperRef: HTMLDivElement;
1258
+ containerRef: HTMLDivElement;
1259
+ staticMaybeItemRefs: unknown[];
1260
+ floatingItemsRef: HTMLDivElement;
1261
+ floatingMaybeItemRefs: unknown[];
1262
+ };
1263
+ rootEl: HTMLDivElement;
1264
+ };
1265
+
1266
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
1267
+
1268
+ declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
1269
+
1270
+ declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
1271
+
1272
+ declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
1273
+
1274
+ declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
1275
+
1276
+ declare type __VLS_TemplateResult_14 = ReturnType<typeof __VLS_template_14>;
1277
+
1278
+ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1279
+
1280
+ declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
1281
+
1282
+ declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
1283
+
1284
+ declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
1774
1285
 
1775
1286
  declare type __VLS_TemplateResult_6 = ReturnType<typeof __VLS_template_6>;
1776
1287
 
@@ -1804,6 +1315,18 @@ declare type __VLS_WithTemplateSlots_12<T, S> = T & {
1804
1315
  };
1805
1316
  };
1806
1317
 
1318
+ declare type __VLS_WithTemplateSlots_13<T, S> = T & {
1319
+ new (): {
1320
+ $slots: S;
1321
+ };
1322
+ };
1323
+
1324
+ declare type __VLS_WithTemplateSlots_14<T, S> = T & {
1325
+ new (): {
1326
+ $slots: S;
1327
+ };
1328
+ };
1329
+
1807
1330
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1808
1331
  new (): {
1809
1332
  $slots: S;
@@ -1852,28 +1375,42 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
1852
1375
  };
1853
1376
  };
1854
1377
 
1855
- export declare interface ActionButton {
1378
+ declare interface ActionButton_2 {
1856
1379
  type: string;
1857
1380
  label: string;
1858
1381
  handler?: (file: Attachment) => void;
1859
1382
  }
1860
1383
 
1861
- export declare interface ActionButtonsProps {
1862
- loading?: boolean;
1384
+ /**
1385
+ * ActionButton Props
1386
+ *
1387
+ * 基础操作按钮的 Props
1388
+ */
1389
+ export declare interface ActionButtonProps {
1390
+ /**
1391
+ * 按钮图标
1392
+ */
1393
+ icon: VNode | Component;
1394
+ /**
1395
+ * 是否禁用
1396
+ */
1863
1397
  disabled?: boolean;
1864
- showClear?: boolean;
1865
- hasContent?: boolean;
1866
- buttonGroup?: ButtonGroupConfig;
1867
- allowSpeech?: boolean;
1868
- speechStatus?: {
1869
- isRecording: boolean;
1870
- isSupported: boolean;
1871
- };
1872
- allowFiles?: boolean;
1873
- submitType?: SubmitTrigger;
1874
- showShortcuts?: boolean;
1875
- isOverLimit?: boolean;
1876
- stopText?: string;
1398
+ /**
1399
+ * 是否激活状态
1400
+ */
1401
+ active?: boolean;
1402
+ /**
1403
+ * 工具提示
1404
+ */
1405
+ tooltip?: TooltipContent;
1406
+ /**
1407
+ * Tooltip 位置
1408
+ */
1409
+ tooltipPlacement?: TooltipPlacement;
1410
+ /**
1411
+ * 按钮大小
1412
+ */
1413
+ size?: string | number;
1877
1414
  }
1878
1415
 
1879
1416
  export declare type AddType = 'form' | 'code';
@@ -1887,7 +1424,7 @@ export declare interface AttachmentListEmits {
1887
1424
  (e: 'retry', file: Attachment): void;
1888
1425
  (e: 'preview', event: MouseEvent, file: Attachment): void;
1889
1426
  (e: 'action', payload: {
1890
- action: ActionButton;
1427
+ action: ActionButton_2;
1891
1428
  file: Attachment;
1892
1429
  }): void;
1893
1430
  }
@@ -1897,16 +1434,24 @@ export declare interface AttachmentListProps {
1897
1434
  disabled?: boolean;
1898
1435
  wrap?: boolean;
1899
1436
  fileIcons?: Record<string, Component>;
1900
- actions?: ActionButton[];
1437
+ actions?: ActionButton_2[];
1901
1438
  variant?: DisplayVariant;
1902
1439
  fileMatchers?: FileTypeMatcher[];
1903
1440
  }
1904
1441
 
1442
+ /**
1443
+ * 自动高度配置
1444
+ */
1905
1445
  export declare type AutoSize = boolean | {
1906
1446
  minRows: number;
1907
1447
  maxRows: number;
1908
1448
  };
1909
1449
 
1450
+ declare type AutoSize_2 = boolean | {
1451
+ minRows: number;
1452
+ maxRows: number;
1453
+ };
1454
+
1910
1455
  export declare interface BaseAttachment {
1911
1456
  id?: string;
1912
1457
  name?: string;
@@ -1919,13 +1464,7 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
1919
1464
 
1920
1465
  export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
1921
1466
 
1922
- declare interface BaseTextItem {
1923
- id: string;
1924
- type: string;
1925
- content: string;
1926
- }
1927
-
1928
- declare const Bubble: typeof _default_18 & {
1467
+ declare const Bubble: typeof _default_25 & {
1929
1468
  install: typeof bubbleInstall;
1930
1469
  };
1931
1470
  export { Bubble }
@@ -1985,7 +1524,7 @@ export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | Bubb
1985
1524
 
1986
1525
  declare const bubbleInstall: (app: App) => void;
1987
1526
 
1988
- declare const BubbleList: typeof _default_19 & {
1527
+ declare const BubbleList: typeof _default_26 & {
1989
1528
  install: typeof bubbleListInstall;
1990
1529
  };
1991
1530
  export { BubbleList }
@@ -2045,7 +1584,7 @@ export declare interface BubbleProps extends BubbleCommonProps {
2045
1584
  aborted?: boolean;
2046
1585
  }
2047
1586
 
2048
- declare const BubbleProvider: typeof _default_20 & {
1587
+ declare const BubbleProvider: typeof _default_27 & {
2049
1588
  install: typeof bubbleProviderInstall;
2050
1589
  };
2051
1590
  export { BubbleProvider }
@@ -2077,12 +1616,205 @@ export declare interface BubbleSlots {
2077
1616
  }) => unknown;
2078
1617
  }
2079
1618
 
2080
- export declare interface ButtonGroupConfig {
1619
+ declare interface ButtonGroupConfig {
2081
1620
  file?: ControlState & fileUploadConfig;
2082
1621
  submit?: ControlState;
2083
1622
  voice?: VoiceButtonConfig;
2084
1623
  }
2085
1624
 
1625
+ declare const ChatInput: {
1626
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<SenderProps> & Readonly<{
1627
+ onClear?: (() => any) | undefined;
1628
+ onInput?: ((value: string) => any) | undefined;
1629
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1630
+ onCancel?: (() => any) | undefined;
1631
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1632
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1633
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1634
+ }>, {
1635
+ submit: () => void;
1636
+ clear: () => void;
1637
+ cancel: () => void;
1638
+ focus: () => void;
1639
+ blur: () => void;
1640
+ setContent: (content: string) => void;
1641
+ getContent: () => string;
1642
+ editor: SenderContext["editor"];
1643
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1644
+ clear: () => any;
1645
+ input: (value: string) => any;
1646
+ blur: (event: FocusEvent) => any;
1647
+ cancel: () => any;
1648
+ focus: (event: FocusEvent) => any;
1649
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
1650
+ "update:modelValue": (value: string) => any;
1651
+ }, PublicProps, {
1652
+ size: "normal" | "small";
1653
+ placeholder: string;
1654
+ mode: InputMode;
1655
+ autoSize: AutoSize;
1656
+ extensions: Extension[] | any[];
1657
+ submitType: SubmitTrigger;
1658
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
1659
+ P: {};
1660
+ B: {};
1661
+ D: {};
1662
+ C: {};
1663
+ M: {};
1664
+ Defaults: {};
1665
+ }, Readonly<SenderProps> & Readonly<{
1666
+ onClear?: (() => any) | undefined;
1667
+ onInput?: ((value: string) => any) | undefined;
1668
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1669
+ onCancel?: (() => any) | undefined;
1670
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1671
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1672
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1673
+ }>, {
1674
+ submit: () => void;
1675
+ clear: () => void;
1676
+ cancel: () => void;
1677
+ focus: () => void;
1678
+ blur: () => void;
1679
+ setContent: (content: string) => void;
1680
+ getContent: () => string;
1681
+ editor: SenderContext["editor"];
1682
+ }, {}, {}, {}, {
1683
+ size: "normal" | "small";
1684
+ placeholder: string;
1685
+ mode: InputMode;
1686
+ autoSize: AutoSize;
1687
+ extensions: Extension[] | any[];
1688
+ submitType: SubmitTrigger;
1689
+ }>;
1690
+ __isFragment?: never;
1691
+ __isTeleport?: never;
1692
+ __isSuspense?: never;
1693
+ } & ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
1694
+ onClear?: (() => any) | undefined;
1695
+ onInput?: ((value: string) => any) | undefined;
1696
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1697
+ onCancel?: (() => any) | undefined;
1698
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1699
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1700
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1701
+ }>, {
1702
+ submit: () => void;
1703
+ clear: () => void;
1704
+ cancel: () => void;
1705
+ focus: () => void;
1706
+ blur: () => void;
1707
+ setContent: (content: string) => void;
1708
+ getContent: () => string;
1709
+ editor: SenderContext["editor"];
1710
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1711
+ clear: () => any;
1712
+ input: (value: string) => any;
1713
+ blur: (event: FocusEvent) => any;
1714
+ cancel: () => any;
1715
+ focus: (event: FocusEvent) => any;
1716
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
1717
+ "update:modelValue": (value: string) => any;
1718
+ }, string, {
1719
+ size: "normal" | "small";
1720
+ placeholder: string;
1721
+ mode: InputMode;
1722
+ autoSize: AutoSize;
1723
+ extensions: Extension[] | any[];
1724
+ submitType: SubmitTrigger;
1725
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
1726
+ $slots: {
1727
+ header?(_: {}): any;
1728
+ header?(_: {}): any;
1729
+ prefix?(_: {}): any;
1730
+ prefix?(_: {}): any;
1731
+ content?(_: {
1732
+ editor: Ref<Editor | undefined, Editor | undefined>;
1733
+ }): any;
1734
+ content?(_: {
1735
+ editor: Ref<Editor | undefined, Editor | undefined>;
1736
+ }): any;
1737
+ 'actions-inline'?(_: {}): any;
1738
+ footer?(_: {}): any;
1739
+ 'footer-right'?(_: {}): any;
1740
+ };
1741
+ }) & {
1742
+ install: <T>(app: App<T>) => void;
1743
+ Mention: Node_2<MentionOptions, any>;
1744
+ Suggestion: Extension<SuggestionOptions, any>;
1745
+ Template: Extension<TemplateOptions, any>;
1746
+ mention: typeof mention;
1747
+ suggestion: typeof suggestion;
1748
+ template: typeof template;
1749
+ };
1750
+
1751
+ /**
1752
+ * ChatInput 插槽作用域
1753
+ *
1754
+ * 通过插槽作用域暴露给外部组件的状态和方法
1755
+ * 主要为增强按钮(Upload、Voice 等)提供便捷的操作方法
1756
+ */
1757
+ declare interface ChatInputSlotScope {
1758
+ /**
1759
+ * Tiptap 编辑器实例
1760
+ * 用于高级操作
1761
+ */
1762
+ editor: Editor_2 | undefined;
1763
+ /**
1764
+ * 聚焦编辑器
1765
+ */
1766
+ focus: () => void;
1767
+ /**
1768
+ * 失焦编辑器
1769
+ */
1770
+ blur: () => void;
1771
+ /**
1772
+ * 插入内容到当前光标位置
1773
+ *
1774
+ * 适用场景:语音输入、快捷短语插入
1775
+ *
1776
+ * @param content - 要插入的内容
1777
+ * @example
1778
+ * ```vue
1779
+ * <template #actions-inline="{ insert }">
1780
+ * <VoiceButton @speech-final="insert" />
1781
+ * </template>
1782
+ * ```
1783
+ */
1784
+ insert: (content: string) => void;
1785
+ /**
1786
+ * 追加内容到编辑器末尾
1787
+ *
1788
+ * 适用场景:连续语音输入、批量添加内容
1789
+ *
1790
+ * @param content - 要追加的内容
1791
+ */
1792
+ append: (content: string) => void;
1793
+ /**
1794
+ * 替换编辑器全部内容
1795
+ *
1796
+ * 适用场景:模板填充、内容重置
1797
+ *
1798
+ * @param content - 新内容
1799
+ */
1800
+ replace: (content: string) => void;
1801
+ /**
1802
+ * 是否禁用
1803
+ * 用于控制自定义按钮状态
1804
+ */
1805
+ disabled: boolean;
1806
+ /**
1807
+ * 是否加载中
1808
+ * 用于控制按钮加载状态和禁用
1809
+ */
1810
+ loading: boolean;
1811
+ /**
1812
+ * 是否有内容
1813
+ * 用于控制按钮显示/隐藏
1814
+ */
1815
+ hasContent: boolean;
1816
+ }
1817
+
2086
1818
  export declare type ColorMode = 'light' | 'dark' | 'auto';
2087
1819
 
2088
1820
  export declare interface ContainerEmits {
@@ -2108,7 +1840,7 @@ export declare interface ContainerSlots {
2108
1840
  footer: () => unknown;
2109
1841
  }
2110
1842
 
2111
- export declare interface ControlState {
1843
+ declare interface ControlState {
2112
1844
  tooltips?: string | TooltipRender;
2113
1845
  disabled?: boolean;
2114
1846
  tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
@@ -2119,56 +1851,103 @@ declare const _default: {
2119
1851
  };
2120
1852
  export default _default;
2121
1853
 
2122
- declare const _default_10: typeof _default_30 & {
1854
+ declare const _default_10: typeof _default_37 & {
2123
1855
  install: typeof install_9;
2124
1856
  };
2125
- export { _default_10 as Sender }
2126
- export { _default_10 as TrSender }
1857
+ export { _default_10 as SenderCompat }
1858
+ export { _default_10 as TrSenderCompat }
2127
1859
 
2128
- declare const _default_11: typeof _default_32 & {
1860
+ declare const _default_11: typeof _default_39 & {
2129
1861
  install: typeof install_10;
2130
1862
  };
2131
1863
  export { _default_11 as SuggestionPills }
2132
1864
  export { _default_11 as TrSuggestionPills }
2133
1865
 
2134
- declare const _default_12: typeof _default_33 & {
1866
+ declare const _default_12: typeof _default_40 & {
2135
1867
  install: typeof install_11;
2136
1868
  };
2137
1869
  export { _default_12 as SuggestionPopover }
2138
1870
  export { _default_12 as TrSuggestionPopover }
2139
1871
 
2140
- declare const _default_13: typeof _default_34 & {
1872
+ declare const _default_13: typeof _default_41 & {
2141
1873
  install: typeof install_12;
2142
1874
  };
2143
1875
  export { _default_13 as ThemeProvider }
2144
1876
  export { _default_13 as TrThemeProvider }
2145
1877
 
2146
- declare const _default_14: typeof _default_35 & {
1878
+ declare const _default_14: typeof _default_42 & {
2147
1879
  install: typeof install_13;
2148
1880
  };
2149
1881
  export { _default_14 as TrWelcome }
2150
1882
  export { _default_14 as Welcome }
2151
1883
 
2152
- declare const _default_15: typeof _default_36 & {
1884
+ declare const _default_15: typeof _default_43 & {
2153
1885
  install: typeof install_14;
2154
1886
  };
2155
1887
  export { _default_15 as McpServerPicker }
2156
1888
  export { _default_15 as TrMcpServerPicker }
2157
1889
 
2158
- declare const _default_16: typeof _default_37 & {
1890
+ declare const _default_16: typeof _default_44 & {
2159
1891
  install: typeof install_15;
2160
1892
  };
2161
1893
  export { _default_16 as McpAddForm }
2162
1894
  export { _default_16 as TrMcpAddForm }
2163
1895
 
2164
- declare const _default_17: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1896
+ declare const _default_17: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
1897
+ export { _default_17 as ActionButton }
1898
+ export { _default_17 as TrActionButton }
1899
+
1900
+ declare const _default_18: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1901
+ export { _default_18 as SubmitButton }
1902
+ export { _default_18 as TrSubmitButton }
1903
+
1904
+ declare const _default_19: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1905
+ export { _default_19 as ClearButton }
1906
+ export { _default_19 as TrClearButton }
1907
+
1908
+ declare const _default_2: typeof _default_24 & {
1909
+ install: typeof install;
1910
+ };
1911
+ export { _default_2 as Attachments }
1912
+ export { _default_2 as TrAttachments }
1913
+
1914
+ declare const _default_20: DefineComponent<UploadButtonProps, {
1915
+ open: (localOptions?: Partial<UseFileDialogOptions>) => void;
1916
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1917
+ error: (error: Error, file?: File | undefined) => any;
1918
+ select: (files: File[]) => any;
1919
+ }, string, PublicProps, Readonly<UploadButtonProps> & Readonly<{
1920
+ onError?: ((error: Error, file?: File | undefined) => any) | undefined;
1921
+ onSelect?: ((files: File[]) => any) | undefined;
1922
+ }>, {
1923
+ reset: boolean;
1924
+ multiple: boolean;
1925
+ tooltipPlacement: TooltipPlacement;
1926
+ accept: string;
1927
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1928
+ export { _default_20 as TrUploadButton }
1929
+ export { _default_20 as UploadButton }
1930
+
1931
+ declare const _default_21: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
1932
+ export { _default_21 as TrVoiceButton }
1933
+ export { _default_21 as VoiceButton }
1934
+
1935
+ declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1936
+ export { _default_22 as TrWordCounter }
1937
+ export { _default_22 as WordCounter }
1938
+
1939
+ declare const _default_23: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
1940
+ export { _default_23 as DefaultActionButtons }
1941
+ export { _default_23 as TrDefaultActionButtons }
1942
+
1943
+ declare const _default_24: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2165
1944
  "update:items": (items: Attachment[]) => any;
2166
1945
  remove: (file: Attachment) => any;
2167
1946
  download: (event: MouseEvent, file: Attachment) => any;
2168
1947
  retry: (file: Attachment) => any;
2169
1948
  preview: (event: MouseEvent, file: Attachment) => any;
2170
1949
  action: (payload: {
2171
- action: ActionButton;
1950
+ action: ActionButton_2;
2172
1951
  file: Attachment;
2173
1952
  }) => any;
2174
1953
  }, string, PublicProps, Readonly<AttachmentListProps> & Readonly<{
@@ -2178,38 +1957,38 @@ onDownload?: ((event: MouseEvent, file: Attachment) => any) | undefined;
2178
1957
  onRetry?: ((file: Attachment) => any) | undefined;
2179
1958
  onPreview?: ((event: MouseEvent, file: Attachment) => any) | undefined;
2180
1959
  onAction?: ((payload: {
2181
- action: ActionButton;
1960
+ action: ActionButton_2;
2182
1961
  file: Attachment;
2183
1962
  }) => any) | undefined;
2184
1963
  }>, {
2185
- actions: ActionButton[];
1964
+ actions: ActionButton_2[];
2186
1965
  fileMatchers: FileTypeMatcher[];
2187
1966
  variant: DisplayVariant;
2188
1967
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2189
1968
 
2190
- declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1969
+ declare const _default_25: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2191
1970
 
2192
- declare const _default_19: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1971
+ declare const _default_26: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2193
1972
  scrollContainerRef: HTMLDivElement;
2194
1973
  }, HTMLDivElement>;
2195
1974
 
2196
- declare const _default_2: typeof _default_17 & {
2197
- install: typeof install;
2198
- };
2199
- export { _default_2 as Attachments }
2200
- export { _default_2 as TrAttachments }
1975
+ declare const _default_27: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
2201
1976
 
2202
- declare const _default_20: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
1977
+ declare const _default_28: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
2203
1978
 
2204
- declare const _default_21: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
1979
+ declare const _default_29: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2205
1980
 
2206
- declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1981
+ declare const _default_3: typeof _default_28 & {
1982
+ install: typeof install_2;
1983
+ };
1984
+ export { _default_3 as Container }
1985
+ export { _default_3 as TrContainer }
2207
1986
 
2208
- declare const _default_23: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
1987
+ declare const _default_30: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
2209
1988
 
2210
- declare const _default_24: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
1989
+ declare const _default_31: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
2211
1990
 
2212
- declare const _default_25: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1991
+ declare const _default_32: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2213
1992
  action: (name: string) => any;
2214
1993
  operation: (name: string) => any;
2215
1994
  }, string, PublicProps, Readonly<FeedbackProps> & Readonly<{
@@ -2221,7 +2000,7 @@ actionsLimit: number;
2221
2000
  sourcesLinesLimit: number;
2222
2001
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2223
2002
 
2224
- 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<{
2003
+ 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<{
2225
2004
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
2226
2005
  readonly "onItem-click"?: ((item: T) => any) | undefined;
2227
2006
  readonly "onItem-title-change"?: ((newTitle: string, item: T) => any) | undefined;
@@ -2235,36 +2014,36 @@ declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awai
2235
2014
  __ctx?: Awaited<typeof __VLS_setup>;
2236
2015
  };
2237
2016
 
2238
- declare const _default_27: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2017
+ declare const _default_34: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2239
2018
  size: string | number;
2240
2019
  svgSize: string | number;
2241
2020
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
2242
2021
 
2243
- declare const _default_28: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2022
+ declare const _default_35: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2244
2023
  size: "small" | "medium" | "large";
2245
2024
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2246
2025
 
2247
- declare const _default_29: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2026
+ declare const _default_36: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2248
2027
 
2249
- declare const _default_3: typeof _default_21 & {
2250
- install: typeof install_2;
2251
- };
2252
- export { _default_3 as Container }
2253
- export { _default_3 as TrContainer }
2028
+ declare const _default_37: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2254
2029
 
2255
- declare const _default_30: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2030
+ declare const _default_38: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2256
2031
 
2257
- declare const _default_31: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2032
+ declare const _default_39: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2258
2033
 
2259
- declare const _default_32: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2034
+ declare const _default_4: typeof _default_29 & {
2035
+ install: typeof install_3;
2036
+ };
2037
+ export { _default_4 as Conversations }
2038
+ export { _default_4 as TrConversations }
2260
2039
 
2261
- declare const _default_33: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2040
+ declare const _default_40: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2262
2041
 
2263
- declare const _default_34: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2042
+ declare const _default_41: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2264
2043
 
2265
- declare const _default_35: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2044
+ declare const _default_42: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2266
2045
 
2267
- declare const _default_36: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2046
+ declare const _default_43: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2268
2047
  "update:visible": (value: boolean) => any;
2269
2048
  } & {
2270
2049
  refresh: (tab: "installed" | "market") => any;
@@ -2315,7 +2094,7 @@ allowPluginAdd: boolean;
2315
2094
  marketLoading: boolean;
2316
2095
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2317
2096
 
2318
- declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2097
+ declare const _default_44: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2319
2098
  cancel: () => any;
2320
2099
  confirm: (type: AddType, data: string | McpAddFormData) => any;
2321
2100
  "update:addType": (value: AddType) => any;
@@ -2327,42 +2106,90 @@ onConfirm?: ((type: AddType, data: string | McpAddFormData) => any) | undefined;
2327
2106
  addType: AddType;
2328
2107
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2329
2108
 
2330
- declare const _default_4: typeof _default_22 & {
2331
- install: typeof install_3;
2332
- };
2333
- export { _default_4 as Conversations }
2334
- export { _default_4 as TrConversations }
2335
-
2336
- declare const _default_5: typeof _default_23 & {
2337
- install: typeof install_4;
2109
+ declare const _default_5: typeof _default_30 & {
2110
+ install: typeof install_4;
2338
2111
  };
2339
2112
  export { _default_5 as DragOverlay }
2340
2113
  export { _default_5 as TrDragOverlay }
2341
2114
 
2342
- declare const _default_6: typeof _default_24 & {
2115
+ declare const _default_6: typeof _default_31 & {
2343
2116
  install: typeof install_5;
2344
2117
  };
2345
2118
  export { _default_6 as DropdownMenu }
2346
2119
  export { _default_6 as TrDropdownMenu }
2347
2120
 
2348
- declare const _default_7: typeof _default_25 & {
2121
+ declare const _default_7: typeof _default_32 & {
2349
2122
  install: typeof install_6;
2350
2123
  };
2351
2124
  export { _default_7 as Feedback }
2352
2125
  export { _default_7 as TrFeedback }
2353
2126
 
2354
- declare const _default_8: typeof _default_26 & {
2127
+ declare const _default_8: typeof _default_33 & {
2355
2128
  install: typeof install_7;
2356
2129
  };
2357
2130
  export { _default_8 as History }
2358
2131
  export { _default_8 as TrHistory }
2359
2132
 
2360
- declare const _default_9: typeof _default_27 & {
2133
+ declare const _default_9: typeof _default_34 & {
2361
2134
  install: typeof install_8;
2362
2135
  };
2363
2136
  export { _default_9 as IconButton }
2364
2137
  export { _default_9 as TrIconButton }
2365
2138
 
2139
+ /**
2140
+ * 默认操作按钮配置
2141
+ *
2142
+ * 用于统一配置 ChatInput 的默认按钮(Clear、Submit)
2143
+ *
2144
+ * @example
2145
+ * ```typescript
2146
+ * const defaultActions = {
2147
+ * submit: { disabled: !isValid, tooltip: '请完善表单' },
2148
+ * clear: { tooltip: '清空内容' }
2149
+ * }
2150
+ * ```
2151
+ */
2152
+ export declare interface DefaultActions {
2153
+ /**
2154
+ * 提交按钮配置
2155
+ */
2156
+ submit?: {
2157
+ /**
2158
+ * 是否禁用
2159
+ */
2160
+ disabled?: boolean;
2161
+ /**
2162
+ * 工具提示
2163
+ * - string: 简单文本
2164
+ * - () => string | VNode: 渲染函数,支持复杂内容
2165
+ */
2166
+ tooltip?: TooltipContent;
2167
+ /**
2168
+ * Tooltip 位置
2169
+ */
2170
+ tooltipPlacement?: TooltipPlacement;
2171
+ };
2172
+ /**
2173
+ * 清空按钮配置
2174
+ */
2175
+ clear?: {
2176
+ /**
2177
+ * 是否禁用
2178
+ */
2179
+ disabled?: boolean;
2180
+ /**
2181
+ * 工具提示
2182
+ * - string: 简单文本
2183
+ * - () => string | VNode: 渲染函数,支持复杂内容
2184
+ */
2185
+ tooltip?: TooltipContent;
2186
+ /**
2187
+ * Tooltip 位置
2188
+ */
2189
+ tooltipPlacement?: TooltipPlacement;
2190
+ };
2191
+ }
2192
+
2366
2193
  export declare type DisplayVariant = 'picture' | 'card' | 'auto';
2367
2194
 
2368
2195
  declare interface DragAwareElement extends HTMLElement {
@@ -2557,7 +2384,7 @@ export declare interface FileCardEmits {
2557
2384
  (e: 'download', event: MouseEvent, file: Attachment): void;
2558
2385
  (e: 'retry', file: Attachment): void;
2559
2386
  (e: 'action', payload: {
2560
- action: ActionButton;
2387
+ action: ActionButton_2;
2561
2388
  file: Attachment;
2562
2389
  }): void;
2563
2390
  }
@@ -2598,7 +2425,16 @@ export declare interface Handlers {
2598
2425
  handleDrop: (e: DragEvent) => void;
2599
2426
  }
2600
2427
 
2601
- declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
2428
+ /**
2429
+ * 高亮函数类型
2430
+ *
2431
+ * @param suggestionText - 建议项文本
2432
+ * @param inputText - 用户输入文本
2433
+ * @returns 包含文本片段和匹配状态的数组
2434
+ */
2435
+ export declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
2436
+
2437
+ declare type HighlightFunction_2 = (suggestionText: string, inputText: string) => SuggestionTextPart_2[];
2602
2438
 
2603
2439
  export declare type HistoryData<T extends HistoryItem> = T[] | HistoryGroup<T>[];
2604
2440
 
@@ -2645,14 +2481,15 @@ export declare interface IconButtonProps {
2645
2481
  rounded?: boolean;
2646
2482
  }
2647
2483
 
2648
- export declare interface InputHandler {
2649
- inputValue: Ref<string>;
2650
- isComposing: Ref<boolean>;
2651
- clearInput: () => void;
2652
- }
2653
-
2484
+ /**
2485
+ * 输入模式
2486
+ * - single: 单行模式,适用于简短输入
2487
+ * - multiple: 多行模式,适用于长文本输入
2488
+ */
2654
2489
  export declare type InputMode = 'single' | 'multiple';
2655
2490
 
2491
+ declare type InputMode_2 = 'single' | 'multiple';
2492
+
2656
2493
  declare const install: <T>(app: App<T>) => void;
2657
2494
 
2658
2495
  declare const install_10: <T>(app: App<T>) => void;
@@ -2689,14 +2526,9 @@ declare const installPrompt: <T>(app: App<T>) => void;
2689
2526
 
2690
2527
  declare const installPrompts: <T>(app: App<T>) => void;
2691
2528
 
2692
- export declare interface ISuggestionItem {
2529
+ declare interface ISuggestionItem {
2693
2530
  content: string;
2694
- highlights?: string[] | HighlightFunction;
2695
- }
2696
-
2697
- export declare interface KeyboardHandler {
2698
- handleKeyPress: (e: KeyboardEvent) => void;
2699
- triggerSubmit: () => void;
2531
+ highlights?: string[] | HighlightFunction_2;
2700
2532
  }
2701
2533
 
2702
2534
  export declare interface MarketCategoryOption {
@@ -2767,6 +2599,108 @@ export declare interface McpServerPickerProps {
2767
2599
  marketLoading?: boolean;
2768
2600
  }
2769
2601
 
2602
+ /**
2603
+ * 创建 Mention 扩展的便捷函数
2604
+ *
2605
+ * @param items - 提及项列表
2606
+ * @param char - 触发字符,默认 '@'
2607
+ * @param options - 其他配置项
2608
+ *
2609
+ * @example
2610
+ * ```typescript
2611
+ * const extensions = [mention(items)]
2612
+ * const extensions = [mention(items, '#')]
2613
+ * const extensions = [mention(items, '@', { allowSpaces: true })]
2614
+ * ```
2615
+ */
2616
+ declare function mention(items: MentionItem[] | Ref<MentionItem[]>, char?: string, options?: Partial<Omit<MentionOptions, 'items' | 'char'>>): Node_2<MentionOptions, any>;
2617
+
2618
+ /**
2619
+ * Mention 节点属性(内部使用)
2620
+ *
2621
+ * ProseMirror 节点的属性,id 必填(由插件保证)
2622
+ */
2623
+ export declare interface MentionAttrs {
2624
+ /**
2625
+ * 唯一标识(必填)
2626
+ *
2627
+ * 由插件自动生成或使用用户提供的值
2628
+ */
2629
+ id: string;
2630
+ /**
2631
+ * 显示名称
2632
+ */
2633
+ label: string;
2634
+ /**
2635
+ * 关联值(可选)
2636
+ */
2637
+ value?: string;
2638
+ }
2639
+
2640
+ /**
2641
+ * 提及项数据结构(用户侧)
2642
+ *
2643
+ * 用户传入的数据格式,id 可选,插件会自动生成
2644
+ */
2645
+ export declare interface MentionItem {
2646
+ /**
2647
+ * 唯一标识(可选)
2648
+ *
2649
+ * 如果不提供,插件会自动生成
2650
+ */
2651
+ id?: string;
2652
+ /**
2653
+ * 显示名称,如 "小小画家"(必传)
2654
+ */
2655
+ label: string;
2656
+ /**
2657
+ * 关联值(必传)
2658
+ *
2659
+ * 可以是任意字符串值,如 AI 提示词、用户 ID、标签内容等
2660
+ */
2661
+ value: string;
2662
+ /**
2663
+ * 图标(可选)
2664
+ */
2665
+ icon?: string;
2666
+ }
2667
+
2668
+ /**
2669
+ * Mention 配置选项
2670
+ */
2671
+ export declare interface MentionOptions {
2672
+ /**
2673
+ * 提及项列表
2674
+ */
2675
+ items: MentionItem[] | Ref<MentionItem[]>;
2676
+ /**
2677
+ * 触发字符,默认 '@'
2678
+ */
2679
+ char: string;
2680
+ /**
2681
+ * 是否允许空格,默认 false
2682
+ */
2683
+ allowSpaces?: boolean;
2684
+ /**
2685
+ * HTML 属性
2686
+ */
2687
+ HTMLAttributes?: Record<string, unknown>;
2688
+ }
2689
+
2690
+ /**
2691
+ * 结构化数据项(提交时返回)
2692
+ *
2693
+ * 用于表示文本和 mention 的混合结构
2694
+ */
2695
+ export declare type MentionStructuredItem = {
2696
+ type: 'text';
2697
+ content: string;
2698
+ } | {
2699
+ type: 'mention';
2700
+ content: string;
2701
+ value: string;
2702
+ };
2703
+
2770
2704
  export declare type PluginAddState = 'idle' | 'loading' | 'added';
2771
2705
 
2772
2706
  export declare interface PluginCardEmits {
@@ -2832,7 +2766,7 @@ export declare interface PopupConfig {
2832
2766
  };
2833
2767
  }
2834
2768
 
2835
- declare const Prompt: typeof _default_28 & {
2769
+ declare const Prompt: typeof _default_35 & {
2836
2770
  install: typeof installPrompt;
2837
2771
  };
2838
2772
  export { Prompt }
@@ -2869,7 +2803,7 @@ export declare interface PromptProps {
2869
2803
  size?: 'small' | 'medium' | 'large';
2870
2804
  }
2871
2805
 
2872
- declare const Prompts: typeof _default_29 & {
2806
+ declare const Prompts: typeof _default_36 & {
2873
2807
  install: typeof installPrompts;
2874
2808
  };
2875
2809
  export { Prompts }
@@ -2920,27 +2854,411 @@ export declare interface RejectionReason {
2920
2854
  message: string;
2921
2855
  }
2922
2856
 
2923
- export declare type SenderEmits = {
2857
+ /**
2858
+ * 选择器选项
2859
+ */
2860
+ export declare interface SelectOption {
2861
+ /**
2862
+ * 显示文本
2863
+ */
2864
+ label: string;
2865
+ /**
2866
+ * 选择后的值
2867
+ */
2868
+ value: string;
2869
+ /**
2870
+ * 自定义数据(可选)
2871
+ */
2872
+ data?: string;
2873
+ }
2874
+
2875
+ /**
2876
+ * 选择器选项
2877
+ */
2878
+ declare interface SelectOption_2 {
2879
+ /**
2880
+ * 显示文本
2881
+ */
2882
+ label: string;
2883
+ /**
2884
+ * 选择后的值
2885
+ */
2886
+ value: string;
2887
+ /**
2888
+ * 自定义数据(可选)
2889
+ */
2890
+ data?: string;
2891
+ }
2892
+
2893
+ declare const Sender: typeof ChatInput;
2894
+ export { Sender }
2895
+ export { Sender as TrSender }
2896
+
2897
+ /**
2898
+ * Chat-Input Context
2899
+ *
2900
+ * 通过 provide/inject 在组件树中共享的状态和方法
2901
+ * 所有子组件都可以通过 inject 获取
2902
+ */
2903
+ export declare interface SenderContext {
2904
+ /**
2905
+ * Tiptap 编辑器实例
2906
+ * 注意:Tiptap 的 useEditor 返回 ShallowRef<Editor | undefined>
2907
+ */
2908
+ editor: Ref<Editor | undefined>;
2909
+ /**
2910
+ * 编辑器 DOM 引用
2911
+ */
2912
+ editorRef: Ref<HTMLElement | null>;
2913
+ /**
2914
+ * 当前输入模式
2915
+ */
2916
+ mode: Ref<InputMode>;
2917
+ /**
2918
+ * 是否正在自动切换模式
2919
+ * 用于控制切换时的过渡动画
2920
+ */
2921
+ isAutoSwitching: Ref<boolean>;
2922
+ /**
2923
+ * 是否加载中
2924
+ */
2925
+ loading: Ref<boolean>;
2926
+ /**
2927
+ * 是否禁用
2928
+ */
2929
+ disabled: Ref<boolean>;
2930
+ /**
2931
+ * 是否有内容
2932
+ */
2933
+ hasContent: Ref<boolean>;
2934
+ /**
2935
+ * 是否可以提交
2936
+ *
2937
+ * 综合判断:
2938
+ * - !disabled
2939
+ * - !loading
2940
+ * - hasContent
2941
+ * - !isOverLimit
2942
+ * - !defaultActions.submit?.disabled
2943
+ */
2944
+ canSubmit: Ref<boolean>;
2945
+ /**
2946
+ * 是否超出字数限制
2947
+ */
2948
+ isOverLimit: Ref<boolean>;
2949
+ /**
2950
+ * 当前字符数
2951
+ */
2952
+ characterCount: Ref<number>;
2953
+ /**
2954
+ * 最大字符数限制
2955
+ */
2956
+ maxLength: Ref<number | undefined>;
2957
+ /**
2958
+ * 组件的尺寸
2959
+ */
2960
+ size: Ref<'small' | 'normal'>;
2961
+ /**
2962
+ * 是否显示字数限制
2963
+ */
2964
+ showWordLimit: Ref<boolean>;
2965
+ /**
2966
+ * 是否显示清空按钮
2967
+ */
2968
+ clearable: Ref<boolean>;
2969
+ /**
2970
+ * 默认操作按钮配置
2971
+ */
2972
+ defaultActions: Ref<DefaultActions | undefined>;
2973
+ /**
2974
+ * 提交触发方式
2975
+ */
2976
+ submitType: Ref<SubmitTrigger>;
2977
+ /**
2978
+ * 停止按钮文字
2979
+ */
2980
+ stopText: Ref<string | undefined>;
2981
+ /**
2982
+ * 提交内容
2983
+ */
2984
+ submit: () => void;
2985
+ /**
2986
+ * 清空内容
2987
+ */
2988
+ clear: () => void;
2989
+ /**
2990
+ * 取消操作
2991
+ *
2992
+ * 在 loading 状态下触发,用于取消正在进行的操作
2993
+ */
2994
+ cancel: () => void;
2995
+ /**
2996
+ * 聚焦编辑器
2997
+ */
2998
+ focus: () => void;
2999
+ /**
3000
+ * 失焦编辑器
3001
+ */
3002
+ blur: () => void;
3003
+ /**
3004
+ * 设置编辑器内容
3005
+ *
3006
+ * @param content - 内容(HTML 或 JSON)
3007
+ */
3008
+ setContent: (content: string) => void;
3009
+ /**
3010
+ * 获取编辑器内容
3011
+ *
3012
+ * @returns 内容(HTML)
3013
+ */
3014
+ getContent: () => string;
3015
+ }
3016
+
3017
+ /**
3018
+ * Chat-Input 组件 Emits
3019
+ */
3020
+ export declare interface SenderEmits {
3021
+ /**
3022
+ * 更新输入内容
3023
+ *
3024
+ * @param e - 事件名
3025
+ * @param value - 新内容
3026
+ */
2924
3027
  (e: 'update:modelValue', value: string): void;
2925
- (e: 'update:templateData', value: UserItem[]): void;
2926
- (e: 'submit', value: string): void;
2927
- (e: 'clear'): void;
2928
- (e: 'speech-start'): void;
2929
- (e: 'speech-end', transcript?: string): void;
2930
- (e: 'speech-interim', transcript: string): void;
2931
- (e: 'speech-error', error: Error): void;
2932
- (e: 'suggestion-select', value: string): void;
3028
+ /**
3029
+ * 提交内容(增强版)
3030
+ *
3031
+ * @param e - 事件名
3032
+ * @param textContent - 提交的内容(纯文本,如 "帮我分析 @张三 的周报")
3033
+ * @param structuredData - 结构化数据(可选)
3034
+ *
3035
+ * @example
3036
+ * ```typescript
3037
+ * function handleSubmit(text: string, data?: StructuredData) {
3038
+ * console.log('纯文本:', text)
3039
+ *
3040
+ * if (data?.template) {
3041
+ * // Template 场景
3042
+ * console.log('模板数据:', data.template)
3043
+ * }
3044
+ *
3045
+ * if (data?.mentions) {
3046
+ * // Mention 场景
3047
+ * console.log('提及的人:', data.mentions)
3048
+ * }
3049
+ * }
3050
+ * ```
3051
+ */
3052
+ (e: 'submit', textContent: string, structuredData?: StructuredData): void;
3053
+ /**
3054
+ * 聚焦事件
3055
+ *
3056
+ * @param e - 事件名
3057
+ * @param event - 原生事件
3058
+ */
2933
3059
  (e: 'focus', event: FocusEvent): void;
3060
+ /**
3061
+ * 失焦事件
3062
+ *
3063
+ * @param e - 事件名
3064
+ * @param event - 原生事件
3065
+ */
2934
3066
  (e: 'blur', event: FocusEvent): void;
2935
- (e: 'escape-press'): void;
3067
+ /**
3068
+ * 清空事件
3069
+ *
3070
+ * @param e - 事件名
3071
+ */
3072
+ (e: 'clear'): void;
3073
+ /**
3074
+ * 取消事件
3075
+ *
3076
+ * 在 loading 状态下点击停止按钮时触发
3077
+ * 用于取消正在进行的操作(如 AI 响应)
3078
+ *
3079
+ * @param e - 事件名
3080
+ */
2936
3081
  (e: 'cancel'): void;
2937
- (e: 'reset-template'): void;
2938
- (e: 'files-selected', files: File[]): void;
2939
- };
3082
+ /**
3083
+ * 输入事件
3084
+ *
3085
+ * @param e - 事件名
3086
+ * @param value - 当前内容
3087
+ */
3088
+ (e: 'input', value: string): void;
3089
+ }
2940
3090
 
3091
+ /**
3092
+ * Chat-Input 组件 Props
3093
+ */
2941
3094
  export declare interface SenderProps {
3095
+ /**
3096
+ * 输入内容(双向绑定)
3097
+ *
3098
+ * 支持 v-model
3099
+ */
3100
+ modelValue?: string;
3101
+ /**
3102
+ * 默认值
3103
+ *
3104
+ * 仅在初始化时使用
3105
+ */
3106
+ defaultValue?: string;
3107
+ /**
3108
+ * 占位符文本
3109
+ *
3110
+ * @default '请输入内容...'
3111
+ */
3112
+ placeholder?: string;
3113
+ /**
3114
+ * 是否禁用
3115
+ *
3116
+ * @default false
3117
+ */
3118
+ disabled?: boolean;
3119
+ /**
3120
+ * 是否加载中
3121
+ *
3122
+ * 加载状态下显示停止按钮
3123
+ *
3124
+ * @default false
3125
+ */
3126
+ loading?: boolean;
3127
+ /**
3128
+ * 是否自动聚焦
3129
+ *
3130
+ * @default false
3131
+ */
2942
3132
  autofocus?: boolean;
3133
+ /**
3134
+ * 输入模式
3135
+ *
3136
+ * - single: 单行模式
3137
+ * - multiple: 多行模式
3138
+ *
3139
+ * @default 'single'
3140
+ */
3141
+ mode?: InputMode;
3142
+ /**
3143
+ * 自动调整高度
3144
+ *
3145
+ * - false: 不自动调整
3146
+ * - true: 自动调整(默认 1-3 行)
3147
+ * - { minRows, maxRows }: 自定义行数范围
3148
+ *
3149
+ * 仅在 mode === 'multiple' 时有效
3150
+ *
3151
+ * @default { minRows: 1, maxRows: 3 }
3152
+ */
2943
3153
  autoSize?: AutoSize;
3154
+ /**
3155
+ * 最大字符数
3156
+ *
3157
+ * @default Infinity
3158
+ */
3159
+ maxLength?: number;
3160
+ /**
3161
+ * 是否显示字数限制
3162
+ *
3163
+ * 仅在 maxLength 有值时有效
3164
+ *
3165
+ * @default false
3166
+ */
3167
+ showWordLimit?: boolean;
3168
+ /**
3169
+ * 是否显示清空按钮
3170
+ *
3171
+ * @default false
3172
+ */
3173
+ clearable?: boolean;
3174
+ /**
3175
+ * Tiptap 扩展配置
3176
+ *
3177
+ * 用于添加增强输入能力,如 Template、Mention、Suggestion 等
3178
+ *
3179
+ * @example 基础使用
3180
+ * ```typescript
3181
+ * import { Template } from '@tiny-robot/components/chat-input/extensions'
3182
+ *
3183
+ * <ChatInput :extensions="[Template]" />
3184
+ * ```
3185
+ *
3186
+ * @example 带配置的扩展(响应式推荐)
3187
+ * ```typescript
3188
+ * import { Mention, Suggestion } from '@tiny-robot/components/chat-input/extensions'
3189
+ *
3190
+ * const mentions = ref([...])
3191
+ * const suggestions = ref([...])
3192
+ *
3193
+ * const extensions = [
3194
+ * Mention.configure({ items: mentions }),
3195
+ * Suggestion.configure({ items: suggestions })
3196
+ * ]
3197
+ *
3198
+ * <ChatInput :extensions="extensions" />
3199
+ * ```
3200
+ */
3201
+ extensions?: Extension[] | any[];
3202
+ /**
3203
+ * 组件尺寸
3204
+ *
3205
+ * - normal: 正常尺寸(默认)
3206
+ * - small: 紧凑模式,更小的字体、间距和图标
3207
+ *
3208
+ * @default 'normal'
3209
+ */
3210
+ size?: 'normal' | 'small';
3211
+ /**
3212
+ * 停止按钮文字
3213
+ *
3214
+ * @default '停止响应'
3215
+ */
3216
+ stopText?: string;
3217
+ /**
3218
+ * 默认操作按钮配置
3219
+ *
3220
+ * 用于统一配置默认按钮(Clear、Submit)的状态和提示
3221
+ *
3222
+ * @example 基础使用
3223
+ * ```vue
3224
+ * <ChatInput
3225
+ * :actions-config="{
3226
+ * submit: { disabled: !isValid, tooltip: '请完善表单' }
3227
+ * }"
3228
+ * />
3229
+ * ```
3230
+ *
3231
+ * @example 动态配置
3232
+ * ```vue
3233
+ * <script setup>
3234
+ * const defaultActions = computed(() => ({
3235
+ * submit: {
3236
+ * disabled: !canSubmit.value,
3237
+ * tooltip: canSubmit.value ? '发送' : '请输入内容'
3238
+ * },
3239
+ * clear: { tooltip: '清空输入' }
3240
+ * }))
3241
+ * </script>
3242
+ *
3243
+ * <template>
3244
+ * <ChatInput :actions-config="defaultActions" />
3245
+ * </template>
3246
+ * ```
3247
+ *
3248
+ * @default undefined
3249
+ */
3250
+ defaultActions?: DefaultActions;
3251
+ /**
3252
+ * 提交触发方式
3253
+ *
3254
+ * @default 'enter'
3255
+ */
3256
+ submitType?: SubmitTrigger;
3257
+ }
3258
+
3259
+ declare interface SenderProps_2 {
3260
+ autofocus?: boolean;
3261
+ autoSize?: AutoSize_2;
2944
3262
  allowSpeech?: boolean;
2945
3263
  allowFiles?: boolean;
2946
3264
  clearable?: boolean;
@@ -2948,11 +3266,11 @@ export declare interface SenderProps {
2948
3266
  defaultValue?: string | null;
2949
3267
  loading?: boolean;
2950
3268
  modelValue?: string;
2951
- mode?: InputMode;
3269
+ mode?: InputMode_2;
2952
3270
  maxLength?: number;
2953
3271
  buttonGroup?: ButtonGroupConfig;
2954
- submitType?: SubmitTrigger;
2955
- speech?: boolean | SpeechConfig;
3272
+ submitType?: SubmitTrigger_2;
3273
+ speech?: boolean | SpeechConfig_2;
2956
3274
  placeholder?: string;
2957
3275
  showWordLimit?: boolean;
2958
3276
  suggestions?: ISuggestionItem[];
@@ -2963,6 +3281,105 @@ export declare interface SenderProps {
2963
3281
  stopText?: string;
2964
3282
  }
2965
3283
 
3284
+ /**
3285
+ * Chat-Input 组件 Slots
3286
+ */
3287
+ export declare interface SenderSlots {
3288
+ /**
3289
+ * 头部插槽
3290
+ */
3291
+ header?: () => unknown;
3292
+ /**
3293
+ * 前缀插槽
3294
+ */
3295
+ prefix?: () => unknown;
3296
+ /**
3297
+ * 内容插槽
3298
+ *
3299
+ * @param props - 插槽属性
3300
+ * @param props.editor - 编辑器实例
3301
+ */
3302
+ content?: (props: {
3303
+ editor: unknown;
3304
+ }) => unknown;
3305
+ /**
3306
+ * 单行模式内联操作按钮插槽
3307
+ *
3308
+ * @example
3309
+ * ```vue
3310
+ * <chat-input>
3311
+ * <template #actions-inline="{ insert, focus, disabled }">
3312
+ * <voice-input @result="insert" :disabled="disabled" />
3313
+ * <file-upload @select="handleFiles" />
3314
+ * </template>
3315
+ * </chat-input>
3316
+ * ```
3317
+ */
3318
+ 'actions-inline'?: (scope: ChatInputSlotScope) => unknown;
3319
+ /**
3320
+ * 底部插槽(多行模式)
3321
+ */
3322
+ footer?: (scope: ChatInputSlotScope) => unknown;
3323
+ /**
3324
+ * 底部右侧插槽(多行模式)
3325
+ */
3326
+ 'footer-right'?: (scope: ChatInputSlotScope) => unknown;
3327
+ }
3328
+
3329
+ /**
3330
+ * 建议项类型
3331
+ *
3332
+ * @example
3333
+ * ```typescript
3334
+ * // 自动匹配
3335
+ * { content: 'ECS-云服务器' }
3336
+ *
3337
+ * // 精确指定高亮
3338
+ * {
3339
+ * content: 'ECS-云服务器',
3340
+ * highlights: ['ECS', '云服务器']
3341
+ * }
3342
+ *
3343
+ * // 自定义高亮函数
3344
+ * {
3345
+ * content: 'ECS-云服务器',
3346
+ * highlights: (text, query) => [
3347
+ * { text: 'ECS', isMatch: true },
3348
+ * { text: '-云服务器', isMatch: false }
3349
+ * ]
3350
+ * }
3351
+ * ```
3352
+ */
3353
+ export declare interface SenderSuggestionItem {
3354
+ /**
3355
+ * 建议项内容(必填)
3356
+ */
3357
+ content: string;
3358
+ /**
3359
+ * 显示标签(可选)
3360
+ *
3361
+ * 默认使用 content
3362
+ */
3363
+ label?: string;
3364
+ /**
3365
+ * 高亮方式(可选)
3366
+ *
3367
+ * - undefined: 自动匹配(默认)
3368
+ * - string[]: 精确指定高亮片段
3369
+ * - function: 自定义高亮逻辑
3370
+ */
3371
+ highlights?: string[] | HighlightFunction;
3372
+ /**
3373
+ * 自定义数据(可选)
3374
+ *
3375
+ * 用于扩展功能
3376
+ */
3377
+ data?: Record<string, unknown>;
3378
+ }
3379
+
3380
+ /**
3381
+ * 语音识别相关类型定义
3382
+ */
2966
3383
  export declare interface SpeechCallbacks {
2967
3384
  onStart: () => void;
2968
3385
  onInterim: (transcript: string) => void;
@@ -2971,6 +3388,14 @@ export declare interface SpeechCallbacks {
2971
3388
  onError: (error: Error) => void;
2972
3389
  }
2973
3390
 
3391
+ declare interface SpeechCallbacks_2 {
3392
+ onStart: () => void;
3393
+ onInterim: (transcript: string) => void;
3394
+ onFinal: (transcript: string) => void;
3395
+ onEnd: (transcript?: string) => void;
3396
+ onError: (error: Error) => void;
3397
+ }
3398
+
2974
3399
  export declare interface SpeechConfig {
2975
3400
  customHandler?: SpeechHandler;
2976
3401
  lang?: string;
@@ -2980,12 +3405,27 @@ export declare interface SpeechConfig {
2980
3405
  onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
2981
3406
  }
2982
3407
 
3408
+ declare interface SpeechConfig_2 {
3409
+ customHandler?: SpeechHandler_2;
3410
+ lang?: string;
3411
+ continuous?: boolean;
3412
+ interimResults?: boolean;
3413
+ autoReplace?: boolean;
3414
+ onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
3415
+ }
3416
+
2983
3417
  export declare interface SpeechHandler {
2984
3418
  start: (callbacks: SpeechCallbacks) => Promise<void> | void;
2985
3419
  stop: () => Promise<void> | void;
2986
3420
  isSupported: () => boolean;
2987
3421
  }
2988
3422
 
3423
+ declare interface SpeechHandler_2 {
3424
+ start: (callbacks: SpeechCallbacks_2) => Promise<void> | void;
3425
+ stop: () => Promise<void> | void;
3426
+ isSupported: () => boolean;
3427
+ }
3428
+
2989
3429
  export declare interface SpeechHandlerResult {
2990
3430
  speechState: SpeechState;
2991
3431
  start: () => void;
@@ -3006,8 +3446,85 @@ export declare interface SpeechState {
3006
3446
  error?: Error;
3007
3447
  }
3008
3448
 
3449
+ /**
3450
+ * 结构化数据(联合类型)
3451
+ *
3452
+ * Submit 事件的第二个参数,根据使用的扩展直接返回对应的数据数组
3453
+ *
3454
+ * **设计理念**:
3455
+ * - 第一个参数 `text`:纯文本内容,适用于简单场景
3456
+ * - 第二个参数 `data`:结构化数据数组,直接使用无需解包
3457
+ *
3458
+ * **类型说明**:
3459
+ * - `TemplateItem[]`: 使用 Template 扩展时返回(混合结构)
3460
+ * - `MentionStructuredItem[]`: 使用 Mention 扩展时返回(混合结构)
3461
+ *
3462
+ * @example Template 场景
3463
+ * ```typescript
3464
+ * function handleSubmit(text: string, data?: StructuredData) {
3465
+ * // text: "帮我分析 的周报"
3466
+ * // data: [
3467
+ * // { type: 'text', content: '帮我分析 ' },
3468
+ * // { type: 'template', content: '张三' },
3469
+ * // { type: 'text', content: ' 的周报' }
3470
+ * // ]
3471
+ *
3472
+ * if (data && data[0]?.type === 'template') {
3473
+ * const templates = data.filter(item => item.type === 'template')
3474
+ * console.log('模板变量:', templates)
3475
+ * }
3476
+ * }
3477
+ * ```
3478
+ *
3479
+ * @example Mention 场景
3480
+ * ```typescript
3481
+ * function handleSubmit(text: string, data?: StructuredData) {
3482
+ * // text: "帮我分析 @张三 的周报"
3483
+ * // data: [
3484
+ * // { type: 'text', content: '帮我分析 ' },
3485
+ * // { type: 'mention', content: '张三', value: '...' },
3486
+ * // { type: 'text', content: ' 的周报' }
3487
+ * // ]
3488
+ *
3489
+ * // 统一使用 content 属性
3490
+ * const allContent = data?.map(item => item.content).join('')
3491
+ * console.log('完整内容:', allContent)
3492
+ *
3493
+ * // 提取 mention
3494
+ * if (data && data[0]?.type === 'mention') {
3495
+ * const mentions = data.filter(item => item.type === 'mention')
3496
+ * console.log('提及的人:', mentions.map(m => m.content))
3497
+ * console.log('关联值:', mentions.map(m => m.value))
3498
+ * }
3499
+ * }
3500
+ * ```
3501
+ */
3502
+ export declare type StructuredData = TemplateItem[] | MentionStructuredItem[];
3503
+
3504
+ /**
3505
+ * 提交触发方式
3506
+ * - enter: Enter 键提交
3507
+ * - ctrlEnter: Ctrl+Enter 提交
3508
+ * - shiftEnter: Shift+Enter 提交
3509
+ */
3009
3510
  export declare type SubmitTrigger = 'enter' | 'ctrlEnter' | 'shiftEnter';
3010
3511
 
3512
+ declare type SubmitTrigger_2 = 'enter' | 'ctrlEnter' | 'shiftEnter';
3513
+
3514
+ /**
3515
+ * 创建 Suggestion 扩展的便捷函数
3516
+ *
3517
+ * @param items - 建议项列表
3518
+ * @param options - 其他配置项
3519
+ *
3520
+ * @example
3521
+ * ```typescript
3522
+ * const extensions = [suggestion(suggestions)]
3523
+ * const extensions = [suggestion(suggestions, { popupWidth: 500 })]
3524
+ * ```
3525
+ */
3526
+ declare function suggestion(items: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>, options?: Partial<Omit<SuggestionOptions, 'items'>>): Extension<SuggestionOptions, any>;
3527
+
3011
3528
  export declare interface SuggestionBaseItem {
3012
3529
  id: string;
3013
3530
  text: string;
@@ -3024,7 +3541,121 @@ export declare interface SuggestionGroup<T = Record<string, unknown>> {
3024
3541
 
3025
3542
  export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
3026
3543
 
3027
- declare const SuggestionPillButton: typeof _default_31 & {
3544
+ /**
3545
+ * 插件配置选项
3546
+ */
3547
+ export declare interface SuggestionOptions {
3548
+ /**
3549
+ * 建议项列表(必填)
3550
+ *
3551
+ * @example
3552
+ * ```typescript
3553
+ * const items = ref([
3554
+ * { content: 'ECS-云服务器' },
3555
+ * { content: 'RDS-数据库' }
3556
+ * ])
3557
+ * ```
3558
+ */
3559
+ items?: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>;
3560
+ /**
3561
+ * 自定义过滤函数(可选)
3562
+ *
3563
+ * - 不传:不过滤,直接显示所有项
3564
+ * - 传入:使用自定义过滤逻辑
3565
+ *
3566
+ * @default undefined(不过滤)
3567
+ *
3568
+ * @example 模糊匹配过滤
3569
+ * ```typescript
3570
+ * filterFn: (items, query) => {
3571
+ * return items.filter(item =>
3572
+ * item.content.toLowerCase().includes(query.toLowerCase())
3573
+ * )
3574
+ * }
3575
+ * ```
3576
+ *
3577
+ * @example 前缀匹配过滤
3578
+ * ```typescript
3579
+ * filterFn: (items, query) => {
3580
+ * return items.filter(item =>
3581
+ * item.content.toLowerCase().startsWith(query.toLowerCase())
3582
+ * )
3583
+ * }
3584
+ * ```
3585
+ */
3586
+ filterFn?: (suggestions: SenderSuggestionItem[], query: string) => SenderSuggestionItem[];
3587
+ /**
3588
+ * 选中建议项的按键
3589
+ *
3590
+ * 注意:Tab 键用于自动补全,不受此配置控制
3591
+ *
3592
+ * @default ['Enter']
3593
+ *
3594
+ * @example 只允许 Enter 选中
3595
+ * ```typescript
3596
+ * activeSuggestionKeys: ['Enter']
3597
+ * ```
3598
+ *
3599
+ * @example 允许 Enter 和 Space 选中
3600
+ * ```typescript
3601
+ * activeSuggestionKeys: ['Enter', ' '] // 注意:空格键是 ' '
3602
+ * ```
3603
+ *
3604
+ * @example 禁用所有选中按键(只能点击)
3605
+ * ```typescript
3606
+ * activeSuggestionKeys: []
3607
+ * ```
3608
+ */
3609
+ activeSuggestionKeys?: string[];
3610
+ /**
3611
+ * 弹窗宽度
3612
+ *
3613
+ * @default 400
3614
+ */
3615
+ popupWidth?: number | string;
3616
+ /**
3617
+ * 是否显示自动补全提示
3618
+ *
3619
+ * @default true
3620
+ */
3621
+ showAutoComplete?: boolean;
3622
+ /**
3623
+ * 选中建议项的回调
3624
+ *
3625
+ * @param item - 选中的建议项(包含完整的 SuggestionItem 信息)
3626
+ * @returns 返回 false 可阻止默认回填行为
3627
+ *
3628
+ * @example 默认行为(自动回填)
3629
+ * ```typescript
3630
+ * onSelect: (item) => {
3631
+ * console.log('Selected:', item)
3632
+ * // 不返回 false,内容会自动回填
3633
+ * }
3634
+ * ```
3635
+ *
3636
+ * @example 阻止默认行为并自定义回填
3637
+ * ```typescript
3638
+ * onSelect: (item) => {
3639
+ * editor.commands.setContent(`前缀-${item.content}-后缀`)
3640
+ * return false // 阻止默认回填
3641
+ * }
3642
+ * ```
3643
+ *
3644
+ * @example 条件性阻止
3645
+ * ```typescript
3646
+ * onSelect: (item) => {
3647
+ * if (item.data?.needsValidation) {
3648
+ * validateAndFill(item)
3649
+ * return false
3650
+ * }
3651
+ * // 否则使用默认回填
3652
+ * }
3653
+ * ```
3654
+ */
3655
+ onSelect?: (item: SenderSuggestionItem) => void | false;
3656
+ }
3657
+
3658
+ declare const SuggestionPillButton: typeof _default_38 & {
3028
3659
  install: typeof installPillButton;
3029
3660
  };
3030
3661
  export { SuggestionPillButton }
@@ -3152,19 +3783,232 @@ export declare interface SuggestionPopoverSlots {
3152
3783
  body?: () => VNode | VNode[];
3153
3784
  }
3154
3785
 
3786
+ /**
3787
+ * 插件状态
3788
+ *
3789
+ * 管理建议列表的显示、过滤、选中等状态
3790
+ */
3791
+ export declare interface SuggestionState {
3792
+ /**
3793
+ * 是否激活(有匹配的建议项)
3794
+ */
3795
+ active: boolean;
3796
+ /**
3797
+ * 匹配范围
3798
+ *
3799
+ * 全局模式:整个文档范围
3800
+ * 字符模式:触发字符到光标的范围
3801
+ */
3802
+ range: {
3803
+ from: number;
3804
+ to: number;
3805
+ } | null;
3806
+ /**
3807
+ * 查询文本
3808
+ *
3809
+ * 全局模式:整个输入内容
3810
+ * 字符模式:触发字符后的文本
3811
+ */
3812
+ query: string;
3813
+ /**
3814
+ * 过滤后的建议项
3815
+ */
3816
+ filteredSuggestions: SenderSuggestionItem[];
3817
+ /**
3818
+ * 当前选中的建议项索引
3819
+ *
3820
+ * -1 表示未选中
3821
+ */
3822
+ selectedIndex: number;
3823
+ /**
3824
+ * 自动补全文本
3825
+ *
3826
+ * 选中项的剩余部分
3827
+ */
3828
+ autoCompleteText: string;
3829
+ /**
3830
+ * 是否显示 Tab 提示
3831
+ */
3832
+ showTabIndicator: boolean;
3833
+ }
3834
+
3835
+ /**
3836
+ * Suggestion 插件类型定义
3837
+ *
3838
+ * 包含建议项、高亮、插件配置和状态等类型定义
3839
+ */
3840
+ /**
3841
+ * 高亮文本片段
3842
+ */
3155
3843
  export declare interface SuggestionTextPart {
3156
3844
  text: string;
3157
3845
  isMatch: boolean;
3158
3846
  }
3159
3847
 
3160
- declare interface TemplateItem extends BaseTextItem {
3161
- type: 'template';
3162
- prefix: string;
3163
- suffix: string;
3848
+ declare interface SuggestionTextPart_2 {
3849
+ text: string;
3850
+ isMatch: boolean;
3851
+ }
3852
+
3853
+ /**
3854
+ * 创建 Template 扩展的便捷函数
3855
+ *
3856
+ * @param items - 模板项列表
3857
+ * @param options - 其他配置项
3858
+ *
3859
+ * @example
3860
+ * ```typescript
3861
+ * const extensions = [template(templates)]
3862
+ * const extensions = [template(templates, { HTMLAttributes: { class: 'custom' } })]
3863
+ * ```
3864
+ */
3865
+ declare function template(items: TemplateItem[] | Ref<TemplateItem[]>, options?: Partial<Omit<TemplateOptions, 'items'>>): Extension<TemplateOptions, any>;
3866
+
3867
+ /**
3868
+ * Template 节点属性
3869
+ */
3870
+ export declare interface TemplateAttrs {
3871
+ /**
3872
+ * 模板块 ID
3873
+ */
3874
+ id: string;
3875
+ /**
3876
+ * 模板块内容
3877
+ */
3878
+ content: string;
3164
3879
  }
3165
3880
 
3166
- declare interface TextItem extends BaseTextItem {
3881
+ /**
3882
+ * 模板项(用户侧)
3883
+ *
3884
+ * 用户传入的模板数据格式
3885
+ * 组件内部会转换为 Tiptap 节点格式
3886
+ */
3887
+ export declare type TemplateItem = {
3888
+ /**
3889
+ * 模板 ID,可选
3890
+ * 如果不提供,组件会自动生成
3891
+ */
3892
+ id?: string;
3893
+ /**
3894
+ * 类型:普通文本
3895
+ */
3167
3896
  type: 'text';
3897
+ /**
3898
+ * 内容
3899
+ */
3900
+ content: string;
3901
+ } | {
3902
+ /**
3903
+ * 模板 ID,可选
3904
+ * 如果不提供,组件会自动生成
3905
+ */
3906
+ id?: string;
3907
+ /**
3908
+ * 类型:模板块(可编辑)
3909
+ */
3910
+ type: 'block';
3911
+ /**
3912
+ * 内容
3913
+ */
3914
+ content: string;
3915
+ } | {
3916
+ /**
3917
+ * 模板 ID,可选
3918
+ * 如果不提供,组件会自动生成
3919
+ */
3920
+ id?: string;
3921
+ /**
3922
+ * 类型:选择器
3923
+ */
3924
+ type: 'select';
3925
+ /**
3926
+ * 内容(选中的值)
3927
+ */
3928
+ content: string;
3929
+ /**
3930
+ * 占位文字(未选择时显示)
3931
+ */
3932
+ placeholder?: string;
3933
+ /**
3934
+ * 选项列表
3935
+ */
3936
+ options?: SelectOption[];
3937
+ /**
3938
+ * 当前选中的值
3939
+ */
3940
+ value?: string;
3941
+ };
3942
+
3943
+ declare interface TemplateItem_2 {
3944
+ id: string;
3945
+ type: 'template' | 'block';
3946
+ content: string;
3947
+ }
3948
+
3949
+ /**
3950
+ * Template 配置选项
3951
+ */
3952
+ export declare interface TemplateOptions {
3953
+ /**
3954
+ * 模板数据列表(推荐使用 ref 实现响应式)
3955
+ *
3956
+ * 支持两种配置方式:
3957
+ * 1. 传入 ref(推荐):自动双向绑定,解决时序问题
3958
+ * 2. 传入数组:仅用于静态初始化
3959
+ *
3960
+ * @example 响应式配置(推荐)
3961
+ * ```typescript
3962
+ * const items = ref<TemplateItem[]>([
3963
+ * { type: 'text', content: '帮我分析' },
3964
+ * { type: 'template', content: '' }
3965
+ * ])
3966
+ * Template.configure({ items }) // 传入 ref,自动双向绑定
3967
+ * ```
3968
+ *
3969
+ * @example 静态配置
3970
+ * ```typescript
3971
+ * Template.configure({
3972
+ * items: [
3973
+ * { type: 'text', content: '帮我分析' },
3974
+ * { type: 'template', content: '' }
3975
+ * ]
3976
+ * })
3977
+ * ```
3978
+ */
3979
+ items?: TemplateItem[] | Ref<TemplateItem[], TemplateItem[]>;
3980
+ /**
3981
+ * HTML 属性
3982
+ */
3983
+ HTMLAttributes?: Record<string, unknown>;
3984
+ }
3985
+
3986
+ /**
3987
+ * TemplateSelect 节点属性
3988
+ */
3989
+ export declare interface TemplateSelectAttrs {
3990
+ /**
3991
+ * 唯一标识
3992
+ */
3993
+ id: string;
3994
+ /**
3995
+ * 占位文字(未选择时显示)
3996
+ */
3997
+ placeholder: string;
3998
+ /**
3999
+ * 选项列表
4000
+ */
4001
+ options: SelectOption_2[];
4002
+ /**
4003
+ * 当前选中的值(可选)
4004
+ */
4005
+ value?: string;
4006
+ }
4007
+
4008
+ declare interface TextItem {
4009
+ id: string;
4010
+ type: 'text';
4011
+ content: string;
3168
4012
  }
3169
4013
 
3170
4014
  export declare interface ThemeProviderProps {
@@ -3186,10 +4030,14 @@ export declare interface ThemeProviderProps {
3186
4030
 
3187
4031
  export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
3188
4032
 
4033
+ declare type ThemeType = 'light' | 'dark';
4034
+
3189
4035
  /**
3190
- * 组件核心类型定义
4036
+ * Tooltip 内容类型
4037
+ * - string: 简单文本
4038
+ * - () => string | VNode: 渲染函数,支持复杂内容
3191
4039
  */
3192
- export declare type ThemeType = 'light' | 'dark';
4040
+ export declare type TooltipContent = string | (() => string | VNode);
3193
4041
 
3194
4042
  declare interface TooltipContentProps {
3195
4043
  show?: boolean;
@@ -3201,7 +4049,71 @@ declare interface TooltipContentProps {
3201
4049
  delayClose?: number;
3202
4050
  }
3203
4051
 
3204
- export declare type TooltipRender = () => VNode | string;
4052
+ /**
4053
+ * Tooltip 位置
4054
+ *
4055
+ * 支持 TinyTooltip 的所有位置选项
4056
+ */
4057
+ export declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
4058
+
4059
+ declare type TooltipRender = () => VNode | string;
4060
+
4061
+ export declare interface UploadButtonEmits {
4062
+ /**
4063
+ * 文件选择
4064
+ */
4065
+ (e: 'select', files: File[]): void;
4066
+ /**
4067
+ * 文件验证失败
4068
+ */
4069
+ (e: 'error', error: Error, file?: File): void;
4070
+ }
4071
+
4072
+ export declare interface UploadButtonProps {
4073
+ /**
4074
+ * 是否禁用
4075
+ */
4076
+ disabled?: boolean;
4077
+ /**
4078
+ * 接受的文件类型
4079
+ * @default '*'
4080
+ */
4081
+ accept?: string;
4082
+ /**
4083
+ * 是否支持多选
4084
+ * @default false
4085
+ */
4086
+ multiple?: boolean;
4087
+ /**
4088
+ * 是否在选择文件后重置 input
4089
+ * @default true
4090
+ */
4091
+ reset?: boolean;
4092
+ /**
4093
+ * 文件大小限制(MB)
4094
+ */
4095
+ maxSize?: number;
4096
+ /**
4097
+ * 最大文件数量
4098
+ */
4099
+ maxCount?: number;
4100
+ /**
4101
+ * 按钮提示文本
4102
+ */
4103
+ tooltip?: TooltipContent;
4104
+ /**
4105
+ * 按钮尺寸
4106
+ */
4107
+ size?: number | string;
4108
+ /**
4109
+ * 自定义图标
4110
+ */
4111
+ icon?: Component;
4112
+ /**
4113
+ * Tooltip 位置
4114
+ */
4115
+ tooltipPlacement?: TooltipPlacement;
4116
+ }
3205
4117
 
3206
4118
  export declare interface UrlAttachment extends BaseAttachment {
3207
4119
  url: string;
@@ -3209,16 +4121,31 @@ export declare interface UrlAttachment extends BaseAttachment {
3209
4121
  rawFile?: File;
3210
4122
  }
3211
4123
 
3212
- export declare type UserItem = UserTextItem | UserTemplateItem;
4124
+ declare type UserItem = UserTextItem | UserTemplateItem;
3213
4125
 
3214
- export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
3215
- id?: TemplateItem['id'];
4126
+ declare type UserTemplateItem = Omit<Pick<TemplateItem_2, 'type' | 'content'>, 'id'> & {
4127
+ id?: TemplateItem_2['id'];
3216
4128
  };
3217
4129
 
3218
- export declare type UserTextItem = Omit<TextItem, 'id'> & {
4130
+ declare type UserTextItem = Omit<TextItem, 'id'> & {
3219
4131
  id?: TextItem['id'];
3220
4132
  };
3221
4133
 
4134
+ /**
4135
+ * 获取 ChatInput Context
4136
+ */
4137
+ export declare function useSenderContext(): SenderContext;
4138
+
4139
+ /**
4140
+ * 语音识别处理 Hook
4141
+ * 支持内置 Web Speech API 和自定义语音处理器
4142
+ * 通过 customHandler 参数切换实现,默认使用内置的 Web Speech API
4143
+ *
4144
+ * @param options 语音识别配置
4145
+ * @returns 语音识别控制器
4146
+ */
4147
+ export declare function useSpeechHandler(options: SpeechHookOptions): SpeechHandlerResult;
4148
+
3222
4149
  export declare const useTheme: () => {
3223
4150
  theme: Ref<string, string> | undefined;
3224
4151
  colorMode: Ref<ColorMode, ColorMode> | undefined;
@@ -3244,6 +4171,96 @@ declare interface VoiceButtonConfig {
3244
4171
  icon?: VNode | Component;
3245
4172
  }
3246
4173
 
4174
+ /**
4175
+ * VoiceButton 组件 Emits
4176
+ */
4177
+ export declare interface VoiceButtonEmits {
4178
+ (e: 'speech-start'): void;
4179
+ (e: 'speech-interim', transcript: string): void;
4180
+ (e: 'speech-final', transcript: string): void;
4181
+ (e: 'speech-end', transcript?: string): void;
4182
+ (e: 'speech-error', error: Error): void;
4183
+ }
4184
+
4185
+ /**
4186
+ * VoiceButton 组件 Props
4187
+ */
4188
+ export declare interface VoiceButtonProps {
4189
+ /**
4190
+ * 自定义图标
4191
+ */
4192
+ icon?: VNode | Component;
4193
+ /**
4194
+ * 是否禁用(会与 Context 的 disabled 合并)
4195
+ */
4196
+ disabled?: boolean;
4197
+ /**
4198
+ * 按钮尺寸
4199
+ */
4200
+ size?: 'small' | 'normal';
4201
+ /**
4202
+ * Tooltip 文本
4203
+ */
4204
+ tooltip?: TooltipContent;
4205
+ /**
4206
+ * Tooltip 位置
4207
+ */
4208
+ tooltipPlacement?: TooltipPlacement;
4209
+ /**
4210
+ * 语音配置
4211
+ */
4212
+ speechConfig?: SpeechConfig;
4213
+ /**
4214
+ * 是否自动插入识别结果到编辑器
4215
+ * @default true
4216
+ */
4217
+ autoInsert?: boolean;
4218
+ /**
4219
+ * 按钮点击拦截器(用于自定义 UI)
4220
+ */
4221
+ onButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
4222
+ }
4223
+
4224
+ /**
4225
+ * 内置 Web Speech API 处理器
4226
+ * 基于浏览器原生 Web Speech API 实现的语音识别
4227
+ */
4228
+ export declare class WebSpeechHandler implements SpeechHandler {
4229
+ private recognition?;
4230
+ private options;
4231
+ /**
4232
+ * 初始化语音识别实例
4233
+ */
4234
+ private initialize;
4235
+ constructor(options: SpeechConfig);
4236
+ /**
4237
+ * 检查浏览器是否支持 Web Speech API
4238
+ */
4239
+ static isSupported(): boolean;
4240
+ /**
4241
+ * 检查浏览器是否支持 Web Speech API(实例方法)
4242
+ */
4243
+ isSupported(): boolean;
4244
+ /**
4245
+ * 设置语音识别事件处理器
4246
+ * @param callbacks 语音识别回调函数集合
4247
+ */
4248
+ private setupEventHandlers;
4249
+ /**
4250
+ * 清理事件监听器
4251
+ */
4252
+ private cleanup;
4253
+ /**
4254
+ * 开始语音识别
4255
+ * @param callbacks 语音识别回调函数集合
4256
+ */
4257
+ start(callbacks: SpeechCallbacks): void;
4258
+ /**
4259
+ * 停止语音识别并清理资源
4260
+ */
4261
+ stop(): void;
4262
+ }
4263
+
3247
4264
  export declare interface WelcomeProps {
3248
4265
  title: string;
3249
4266
  description: string;
@@ -3256,3 +4273,53 @@ export declare interface WelcomeSlots {
3256
4273
  }
3257
4274
 
3258
4275
  export { }
4276
+
4277
+
4278
+ /**
4279
+ * 扩展 Tiptap Commands 接口
4280
+ *
4281
+ * 使 TypeScript 能够识别自定义命令
4282
+ */
4283
+ declare module '@tiptap/core' {
4284
+ interface Commands<ReturnType> {
4285
+ mention: {
4286
+ /**
4287
+ * 插入 mention 节点
4288
+ */
4289
+ insertMention: (attrs: Partial<MentionAttrs>) => ReturnType;
4290
+ /**
4291
+ * 删除 mention 节点
4292
+ */
4293
+ deleteMention: (id: string) => ReturnType;
4294
+ };
4295
+ }
4296
+ }
4297
+
4298
+
4299
+ /**
4300
+ * 扩展 Tiptap Commands 接口
4301
+ *
4302
+ * 使 TypeScript 能够识别自定义命令
4303
+ */
4304
+ declare module '@tiptap/core' {
4305
+ interface Commands<ReturnType> {
4306
+ template: {
4307
+ /**
4308
+ * 设置模板数据(批量)
4309
+ */
4310
+ setTemplateData: (items: TemplateItem[]) => ReturnType;
4311
+ /**
4312
+ * 插入模板块
4313
+ */
4314
+ insertTemplate: (attrs: Partial<TemplateAttrs>) => ReturnType;
4315
+ /**
4316
+ * 聚焦到第一个模板块
4317
+ */
4318
+ focusFirstTemplate: () => ReturnType;
4319
+ /**
4320
+ * 插入选择器
4321
+ */
4322
+ insertTemplateSelect: (attrs: Partial<TemplateSelectAttrs>) => ReturnType;
4323
+ };
4324
+ }
4325
+ }