@vunk/plus 1.11.1 → 1.11.3

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.
@@ -50,7 +50,7 @@ function useAgent(request) {
50
50
  request
51
51
  });
52
52
  }
53
- function initAgentChat(request, parser) {
53
+ function initAgentChat(request, parser, formatSend) {
54
54
  const [agent] = useAgent(request);
55
55
  const chat = useXChat({
56
56
  agent: agent.value,
@@ -58,10 +58,8 @@ function initAgentChat(request, parser) {
58
58
  parser
59
59
  });
60
60
  const onRequest = (message) => {
61
- chat.onRequest({
62
- role: Role.User,
63
- content: message
64
- });
61
+ const userMessage = formatSend(message);
62
+ chat.onRequest(userMessage);
65
63
  };
66
64
  const items = computed(() => {
67
65
  return chat.parsedMessages.value.map((item) => {
@@ -100,6 +98,9 @@ var _sfc_main = defineComponent({
100
98
  },
101
99
  parser: {
102
100
  type: Function
101
+ },
102
+ formatSend: {
103
+ type: Function
103
104
  }
104
105
  },
105
106
  emits: {
@@ -176,9 +177,16 @@ var _sfc_main = defineComponent({
176
177
  ];
177
178
  return list;
178
179
  };
180
+ const formatSend = (message) => {
181
+ return {
182
+ role: Role.User,
183
+ content: message
184
+ };
185
+ };
179
186
  const agentChat = initAgentChat(
180
187
  props.request ?? request,
181
- props.parser ?? parser
188
+ props.parser ?? parser,
189
+ props.formatSend ?? formatSend
182
190
  );
183
191
  emit("load", agentChat);
184
192
  return slots.default;
@@ -7,6 +7,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
7
7
  parser: {
8
8
  type: PropType<AnyFunc>;
9
9
  };
10
+ formatSend: {
11
+ type: PropType<AnyFunc>;
12
+ };
10
13
  }>, import("vue").Slot<any> | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
14
  load: null;
12
15
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -16,6 +19,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
16
19
  parser: {
17
20
  type: PropType<AnyFunc>;
18
21
  };
22
+ formatSend: {
23
+ type: PropType<AnyFunc>;
24
+ };
19
25
  }>> & Readonly<{
20
26
  onLoad?: ((...args: any[]) => any) | undefined;
21
27
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,8 +1,8 @@
1
1
  import type { __VkBubbleTemplates } from '@vunk/plus/components/bubble-templates';
2
+ import type { BubbleProps } from '@vunk/plus/element/bubble';
2
3
  import type { MaybeArray, Media, NormalObject } from '@vunk/shared';
3
4
  import type { RequestFn, SSEOutput, useXChat, XAgent, XRequestParams } from 'ant-design-x-vue';
4
5
  import type { ComputedRef } from 'vue';
5
- import type { BubbleListItemProps } from 'vue-element-plus-x/types/components/BubbleList/types';
6
6
  import type { MessageView } from './MessageView';
7
7
  export type RequestParams<Message> = Omit<XRequestParams, 'message'> & {
8
8
  message: Message;
@@ -18,6 +18,7 @@ export interface AgentChatContext {
18
18
  }
19
19
  export type Request = RequestFn<AgentMessage, RequestParams<AgentMessage>, RequestOutput>;
20
20
  export type Parser = (message: Partial<AgentMessage>) => MaybeArray<BubbleMessage>;
21
+ export type formatSend = (message: string) => AgentMessage;
21
22
  export type RequestOutput = AgentMessage & SSEOutput;
22
23
  /**
23
24
  * @description useXAgent request onSuccess 发送的数据
@@ -30,7 +31,7 @@ export type AgentMessage = Partial<BubbleMessage> & {
30
31
  /**
31
32
  * @description useXChat parser 解析数据
32
33
  */
33
- export type BubbleMessage = Partial<BubbleListItemProps> & {
34
+ export type BubbleMessage = Partial<BubbleProps> & {
34
35
  role: string;
35
36
  content: string;
36
37
  /**
@@ -1,6 +1,6 @@
1
1
  import type { SSEOutput } from 'ant-design-x-vue';
2
- import type { AgentChatContext, AgentMessage, Parser, Request, RequestParams } from './types';
2
+ import type { AgentChatContext, AgentMessage, formatSend, Parser, Request, RequestParams } from './types';
3
3
  import { useXAgent } from 'ant-design-x-vue';
4
4
  export declare function useAgent(request: Request): ReturnType<typeof useXAgent<AgentMessage, RequestParams<AgentMessage>, AgentMessage & SSEOutput>>;
5
- export declare function initAgentChat(request: Request, parser: Parser): AgentChatContext;
5
+ export declare function initAgentChat(request: Request, parser: Parser, formatSend: formatSend): AgentChatContext;
6
6
  export declare function useAgentChat(): AgentChatContext;
@@ -9,6 +9,138 @@ import { c as commonjsGlobal } from '../_commonjsHelpers.mjs';
9
9
  import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
10
10
  import { Deferred } from '@vunk/shared/promise';
11
11
 
12
+ var __defProp = Object.defineProperty;
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
15
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
16
+
17
+ // src/lib/_AsyncQueueEntry.ts
18
+ var _AsyncQueueEntry = class _AsyncQueueEntry {
19
+ constructor(queue) {
20
+ __publicField(this, "promise");
21
+ __publicField(this, "resolve");
22
+ __publicField(this, "reject");
23
+ __publicField(this, "queue");
24
+ __publicField(this, "signal", null);
25
+ __publicField(this, "signalListener", null);
26
+ this.queue = queue;
27
+ this.promise = new Promise((resolve, reject) => {
28
+ this.resolve = resolve;
29
+ this.reject = reject;
30
+ });
31
+ }
32
+ setSignal(signal) {
33
+ if (signal.aborted) return this;
34
+ this.signal = signal;
35
+ this.signalListener = () => {
36
+ const index = this.queue["promises"].indexOf(this);
37
+ if (index !== -1) this.queue["promises"].splice(index, 1);
38
+ this.reject(new Error("Request aborted manually"));
39
+ };
40
+ this.signal.addEventListener("abort", this.signalListener);
41
+ return this;
42
+ }
43
+ use() {
44
+ this.dispose();
45
+ this.resolve();
46
+ return this;
47
+ }
48
+ abort() {
49
+ this.dispose();
50
+ this.reject(new Error("Request aborted manually"));
51
+ return this;
52
+ }
53
+ dispose() {
54
+ if (this.signal) {
55
+ this.signal.removeEventListener("abort", this.signalListener);
56
+ this.signal = null;
57
+ this.signalListener = null;
58
+ }
59
+ }
60
+ };
61
+ __name(_AsyncQueueEntry, "AsyncQueueEntry");
62
+ var AsyncQueueEntry = _AsyncQueueEntry;
63
+
64
+ // src/lib/AsyncQueue.ts
65
+ var _AsyncQueue = class _AsyncQueue {
66
+ constructor() {
67
+ /**
68
+ * The promises array
69
+ */
70
+ __publicField(this, "promises", []);
71
+ }
72
+ /**
73
+ * The amount of entries in the queue, including the head.
74
+ * @seealso {@link queued} for the queued count.
75
+ */
76
+ get remaining() {
77
+ return this.promises.length;
78
+ }
79
+ /**
80
+ * The amount of queued entries.
81
+ * @seealso {@link remaining} for the count with the head.
82
+ */
83
+ get queued() {
84
+ return this.remaining === 0 ? 0 : this.remaining - 1;
85
+ }
86
+ /**
87
+ * Waits for last promise and queues a new one
88
+ * @example
89
+ * ```typescript
90
+ * const queue = new AsyncQueue();
91
+ * async function request(url, options) {
92
+ * await queue.wait({ signal: options.signal });
93
+ * try {
94
+ * const result = await fetch(url, options);
95
+ * // Do some operations with 'result'
96
+ * } finally {
97
+ * // Remove first entry from the queue and resolve for the next entry
98
+ * queue.shift();
99
+ * }
100
+ * }
101
+ *
102
+ * request(someUrl1, someOptions1); // Will call fetch() immediately
103
+ * request(someUrl2, someOptions2); // Will call fetch() after the first finished
104
+ * request(someUrl3, someOptions3); // Will call fetch() after the second finished
105
+ * ```
106
+ */
107
+ wait(options) {
108
+ const entry = new AsyncQueueEntry(this);
109
+ if (this.promises.length === 0) {
110
+ this.promises.push(entry);
111
+ return Promise.resolve();
112
+ }
113
+ this.promises.push(entry);
114
+ if (options?.signal) entry.setSignal(options.signal);
115
+ return entry.promise;
116
+ }
117
+ /**
118
+ * Unlocks the head lock and transfers the next lock (if any) to the head.
119
+ */
120
+ shift() {
121
+ if (this.promises.length === 0) return;
122
+ if (this.promises.length === 1) {
123
+ this.promises.shift();
124
+ return;
125
+ }
126
+ this.promises.shift();
127
+ this.promises[0].use();
128
+ }
129
+ /**
130
+ * Aborts all the pending promises.
131
+ * @note To avoid race conditions, this does **not** unlock the head lock.
132
+ */
133
+ abortAll() {
134
+ if (this.queued === 0) return;
135
+ for (let i = 1; i < this.promises.length; ++i) {
136
+ this.promises[i].abort();
137
+ }
138
+ this.promises.length = 1;
139
+ }
140
+ };
141
+ __name(_AsyncQueue, "AsyncQueue");
142
+ var AsyncQueue = _AsyncQueue;
143
+
12
144
  function markdownToPlainText(md) {
13
145
  return md.replace(/!\[.*?\]\(.*?\)/g, "").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/^#{1,6}\s+/gm, "").replace(/\*\*(.*?)\*\*/g, "$1").replace(/__(.*?)__/g, "$1").replace(/\*(.*?)\*/g, "$1").replace(/_(.*?)_/g, "$1").replace(/`(.*?)`/g, "$1").replace(/```[\s\S]*?```/g, "").replace(/\n{2,}/g, "\n").replace(/-{3,}/g, "").replace(/^\s*-\s+/gm, "").replace(/\|/g, "").trim();
14
146
  }
@@ -3398,7 +3530,6 @@ function useHowlerParagraph(props, emit) {
3398
3530
  return new howler.Howl({
3399
3531
  src: [url2],
3400
3532
  format: ["mp3", "wav", "aac"],
3401
- // 事件处理
3402
3533
  onplay: () => {
3403
3534
  broadcast.value = TickerStatus.playing;
3404
3535
  },
@@ -4070,6 +4201,7 @@ var _sfc_main = defineComponent({
4070
4201
  const [theData, handleSetData] = useDataComputed({
4071
4202
  default: []
4072
4203
  }, props2, emit);
4204
+ const queue = new AsyncQueue();
4073
4205
  const addParagraph = (paragraph) => {
4074
4206
  const k = theData.value.length;
4075
4207
  if (k === 0) {
@@ -4080,7 +4212,7 @@ var _sfc_main = defineComponent({
4080
4212
  v: paragraph
4081
4213
  });
4082
4214
  };
4083
- const processingParagraph = (paragraph) => {
4215
+ const processingParagraph = async (paragraph) => {
4084
4216
  if (!props2.textToSpeech) {
4085
4217
  return;
4086
4218
  }
@@ -4091,7 +4223,9 @@ var _sfc_main = defineComponent({
4091
4223
  if (!value) {
4092
4224
  return;
4093
4225
  }
4094
- return props2.textToSpeech(`${value}`).then(async (res) => {
4226
+ const resPromise = props2.textToSpeech(value);
4227
+ await queue.wait();
4228
+ return resPromise.then(async (res) => {
4095
4229
  if (res instanceof Blob) {
4096
4230
  paragraph.blob = res;
4097
4231
  paragraph.url = await blobToDataURL(res);
@@ -4101,6 +4235,7 @@ var _sfc_main = defineComponent({
4101
4235
  }
4102
4236
  }).then(async () => {
4103
4237
  await props2.processing?.(paragraph);
4238
+ queue.shift();
4104
4239
  });
4105
4240
  };
4106
4241
  const currentIndex = ref(0);
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
80
80
  theData: import("vue").ComputedRef<Paragraph[]>;
81
81
  ParagraphStatus: typeof ParagraphStatus;
82
82
  fulfilledTextValue: import("vue").ComputedRef<string>;
83
- processingParagraph: (paragraph: Paragraph) => Promise<void> | undefined;
83
+ processingParagraph: (paragraph: Paragraph) => Promise<void>;
84
84
  setData: (obj: any, e: import("@vunk/core").SetDataEvent) => void;
85
85
  Broadcast: typeof TickerStatus;
86
86
  isParagraphEnabled: (currentIndex: number) => boolean;
@@ -4,7 +4,7 @@ import { ElAutoResizer } from 'element-plus';
4
4
  import { a as arrow_down_bold_default } from '../index2.mjs';
5
5
  import { useResizeObserver } from '@vueuse/core';
6
6
  import { VkScrollbar } from '@vunk/plus/components/scrollbar';
7
- import { Bubble } from 'vue-element-plus-x';
7
+ import { Bubble } from '@vunk/plus/element/bubble';
8
8
  import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
9
9
  import { noop } from '@vunk/shared/function';
10
10
  export { Role } from '@vunk/plus/components/agent-chat-provider';
@@ -917,164 +917,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
917
917
  tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
918
918
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
919
919
  readonly Bubble: {
920
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue-element-plus-x/./types/Bubble").BubbleProps> & Readonly<{
921
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
922
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
923
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
924
- onAvatarError?: ((e: Event) => any) | undefined;
925
- }>, {
926
- interrupt: () => void;
927
- continue: () => void;
928
- restart: () => void;
929
- destroy: () => void;
930
- renderedContent: ComputedRef<string>;
931
- isTyping: Ref<boolean>;
932
- progress: ComputedRef<number>;
933
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
934
- start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
935
- finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
936
- writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
937
- avatarError: (e: Event) => any;
938
- }, import("vue").PublicProps, {
939
- maxWidth: string;
940
- noStyle: boolean;
941
- content: string;
942
- placement: "start" | "end";
943
- avatar: string;
944
- variant: "filled" | "borderless" | "outlined" | "shadow";
945
- avatarSize: string;
946
- avatarGap: string;
947
- avatarShape: "circle" | "square";
948
- avatarSrcSet: string;
949
- avatarAlt: string;
950
- avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
951
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {
952
- typewriterRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue-element-plus-x/./types/Typewriter").TypewriterProps> & Readonly<{
953
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
954
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
955
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
956
- }>, {
957
- interrupt: () => void;
958
- continue: () => void;
959
- restart: () => void;
960
- destroy: () => void;
961
- renderedContent: ComputedRef<string>;
962
- isTyping: Ref<boolean>;
963
- progress: ComputedRef<number>;
964
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
965
- start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
966
- finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
967
- writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
968
- }, import("vue").PublicProps, {
969
- content: string;
970
- isMarkdown: boolean;
971
- typing: boolean | import("vue-element-plus-x/./types/Typewriter").TypingConfig;
972
- isFog: boolean | import("vue-element-plus-x/./types/Typewriter").TypingFogfig;
973
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {
974
- typeWriterRef: HTMLDivElement;
975
- markdownContentRef: HTMLDivElement;
976
- }, HTMLDivElement, import("vue").ComponentProvideOptions, {
977
- P: {};
978
- B: {};
979
- D: {};
980
- C: {};
981
- M: {};
982
- Defaults: {};
983
- }, Readonly<import("vue-element-plus-x/./types/Typewriter").TypewriterProps> & Readonly<{
984
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
985
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
986
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
987
- }>, {
988
- interrupt: () => void;
989
- continue: () => void;
990
- restart: () => void;
991
- destroy: () => void;
992
- renderedContent: ComputedRef<string>;
993
- isTyping: Ref<boolean>;
994
- progress: ComputedRef<number>;
995
- }, {}, {}, {}, {
996
- content: string;
997
- isMarkdown: boolean;
998
- typing: boolean | import("vue-element-plus-x/./types/Typewriter").TypingConfig;
999
- isFog: boolean | import("vue-element-plus-x/./types/Typewriter").TypingFogfig;
1000
- }> | null;
1001
- }, any, import("vue").ComponentProvideOptions, {
1002
- P: {};
1003
- B: {};
1004
- D: {};
1005
- C: {};
1006
- M: {};
1007
- Defaults: {};
1008
- }, Readonly<import("vue-element-plus-x/./types/Bubble").BubbleProps> & Readonly<{
1009
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1010
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1011
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1012
- onAvatarError?: ((e: Event) => any) | undefined;
1013
- }>, {
1014
- interrupt: () => void;
1015
- continue: () => void;
1016
- restart: () => void;
1017
- destroy: () => void;
1018
- renderedContent: ComputedRef<string>;
1019
- isTyping: Ref<boolean>;
1020
- progress: ComputedRef<number>;
1021
- }, {}, {}, {}, {
1022
- maxWidth: string;
1023
- noStyle: boolean;
1024
- content: string;
1025
- placement: "start" | "end";
1026
- avatar: string;
1027
- variant: "filled" | "borderless" | "outlined" | "shadow";
1028
- avatarSize: string;
1029
- avatarGap: string;
1030
- avatarShape: "circle" | "square";
1031
- avatarSrcSet: string;
1032
- avatarAlt: string;
1033
- avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
1034
- }>;
920
+ new (...args: any[]): any;
1035
921
  __isFragment?: never;
1036
922
  __isTeleport?: never;
1037
923
  __isSuspense?: never;
1038
- } & import("vue").ComponentOptionsBase<Readonly<import("vue-element-plus-x/./types/Bubble").BubbleProps> & Readonly<{
1039
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1040
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1041
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1042
- onAvatarError?: ((e: Event) => any) | undefined;
1043
- }>, {
1044
- interrupt: () => void;
1045
- continue: () => void;
1046
- restart: () => void;
1047
- destroy: () => void;
1048
- renderedContent: ComputedRef<string>;
1049
- isTyping: Ref<boolean>;
1050
- progress: ComputedRef<number>;
1051
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1052
- start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1053
- finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1054
- writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1055
- avatarError: (e: Event) => any;
1056
- }, string, {
1057
- maxWidth: string;
1058
- noStyle: boolean;
1059
- content: string;
1060
- placement: "start" | "end";
1061
- avatar: string;
1062
- variant: "filled" | "borderless" | "outlined" | "shadow";
1063
- avatarSize: string;
1064
- avatarGap: string;
1065
- avatarShape: "circle" | "square";
1066
- avatarSrcSet: string;
1067
- avatarAlt: string;
1068
- avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
1069
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
1070
- $slots: {
1071
- avatar?(_: {}): any;
1072
- header?(_: {}): any;
1073
- content?(_: {}): any;
1074
- loading?(_: {}): any;
1075
- footer?(_: {}): any;
1076
- };
1077
- });
924
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<Record<string | symbol, any>>>, Record<string | symbol, any>, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
925
+ [x: string]: any;
926
+ [x: symbol]: any;
927
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
928
+ install(app: import("vue").App): void;
929
+ };
1078
930
  loadingBg: {
1079
931
  new (...args: any[]): any;
1080
932
  __isFragment?: never;
@@ -1249,164 +1249,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1249
1249
  tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
1250
1250
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1251
1251
  readonly Bubble: {
1252
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue-element-plus-x/./types/Bubble").BubbleProps> & Readonly<{
1253
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1254
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1255
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1256
- onAvatarError?: ((e: Event) => any) | undefined;
1257
- }>, {
1258
- interrupt: () => void;
1259
- continue: () => void;
1260
- restart: () => void;
1261
- destroy: () => void;
1262
- renderedContent: ComputedRef<string>;
1263
- isTyping: Ref<boolean>;
1264
- progress: ComputedRef<number>;
1265
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1266
- start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1267
- finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1268
- writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1269
- avatarError: (e: Event) => any;
1270
- }, import("vue").PublicProps, {
1271
- maxWidth: string;
1272
- noStyle: boolean;
1273
- content: string;
1274
- placement: "start" | "end";
1275
- avatar: string;
1276
- variant: "filled" | "borderless" | "outlined" | "shadow";
1277
- avatarSize: string;
1278
- avatarGap: string;
1279
- avatarShape: "circle" | "square";
1280
- avatarSrcSet: string;
1281
- avatarAlt: string;
1282
- avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
1283
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {
1284
- typewriterRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue-element-plus-x/./types/Typewriter").TypewriterProps> & Readonly<{
1285
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1286
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1287
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1288
- }>, {
1289
- interrupt: () => void;
1290
- continue: () => void;
1291
- restart: () => void;
1292
- destroy: () => void;
1293
- renderedContent: ComputedRef<string>;
1294
- isTyping: Ref<boolean>;
1295
- progress: ComputedRef<number>;
1296
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
1297
- start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1298
- finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1299
- writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1300
- }, import("vue").PublicProps, {
1301
- content: string;
1302
- isMarkdown: boolean;
1303
- typing: boolean | import("vue-element-plus-x/./types/Typewriter").TypingConfig;
1304
- isFog: boolean | import("vue-element-plus-x/./types/Typewriter").TypingFogfig;
1305
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {
1306
- typeWriterRef: HTMLDivElement;
1307
- markdownContentRef: HTMLDivElement;
1308
- }, HTMLDivElement, import("vue").ComponentProvideOptions, {
1309
- P: {};
1310
- B: {};
1311
- D: {};
1312
- C: {};
1313
- M: {};
1314
- Defaults: {};
1315
- }, Readonly<import("vue-element-plus-x/./types/Typewriter").TypewriterProps> & Readonly<{
1316
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1317
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1318
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1319
- }>, {
1320
- interrupt: () => void;
1321
- continue: () => void;
1322
- restart: () => void;
1323
- destroy: () => void;
1324
- renderedContent: ComputedRef<string>;
1325
- isTyping: Ref<boolean>;
1326
- progress: ComputedRef<number>;
1327
- }, {}, {}, {}, {
1328
- content: string;
1329
- isMarkdown: boolean;
1330
- typing: boolean | import("vue-element-plus-x/./types/Typewriter").TypingConfig;
1331
- isFog: boolean | import("vue-element-plus-x/./types/Typewriter").TypingFogfig;
1332
- }> | null;
1333
- }, any, import("vue").ComponentProvideOptions, {
1334
- P: {};
1335
- B: {};
1336
- D: {};
1337
- C: {};
1338
- M: {};
1339
- Defaults: {};
1340
- }, Readonly<import("vue-element-plus-x/./types/Bubble").BubbleProps> & Readonly<{
1341
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1342
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1343
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1344
- onAvatarError?: ((e: Event) => any) | undefined;
1345
- }>, {
1346
- interrupt: () => void;
1347
- continue: () => void;
1348
- restart: () => void;
1349
- destroy: () => void;
1350
- renderedContent: ComputedRef<string>;
1351
- isTyping: Ref<boolean>;
1352
- progress: ComputedRef<number>;
1353
- }, {}, {}, {}, {
1354
- maxWidth: string;
1355
- noStyle: boolean;
1356
- content: string;
1357
- placement: "start" | "end";
1358
- avatar: string;
1359
- variant: "filled" | "borderless" | "outlined" | "shadow";
1360
- avatarSize: string;
1361
- avatarGap: string;
1362
- avatarShape: "circle" | "square";
1363
- avatarSrcSet: string;
1364
- avatarAlt: string;
1365
- avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
1366
- }>;
1252
+ new (...args: any[]): any;
1367
1253
  __isFragment?: never;
1368
1254
  __isTeleport?: never;
1369
1255
  __isSuspense?: never;
1370
- } & import("vue").ComponentOptionsBase<Readonly<import("vue-element-plus-x/./types/Bubble").BubbleProps> & Readonly<{
1371
- onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1372
- onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1373
- onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
1374
- onAvatarError?: ((e: Event) => any) | undefined;
1375
- }>, {
1376
- interrupt: () => void;
1377
- continue: () => void;
1378
- restart: () => void;
1379
- destroy: () => void;
1380
- renderedContent: ComputedRef<string>;
1381
- isTyping: Ref<boolean>;
1382
- progress: ComputedRef<number>;
1383
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1384
- start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1385
- finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1386
- writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
1387
- avatarError: (e: Event) => any;
1388
- }, string, {
1389
- maxWidth: string;
1390
- noStyle: boolean;
1391
- content: string;
1392
- placement: "start" | "end";
1393
- avatar: string;
1394
- variant: "filled" | "borderless" | "outlined" | "shadow";
1395
- avatarSize: string;
1396
- avatarGap: string;
1397
- avatarShape: "circle" | "square";
1398
- avatarSrcSet: string;
1399
- avatarAlt: string;
1400
- avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
1401
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
1402
- $slots: {
1403
- avatar?(_: {}): any;
1404
- header?(_: {}): any;
1405
- content?(_: {}): any;
1406
- loading?(_: {}): any;
1407
- footer?(_: {}): any;
1408
- };
1409
- });
1256
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<Record<string | symbol, any>>>, Record<string | symbol, any>, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
1257
+ [x: string]: any;
1258
+ [x: symbol]: any;
1259
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
1260
+ install(app: import("vue").App): void;
1261
+ };
1410
1262
  loadingBg: {
1411
1263
  new (...args: any[]): any;
1412
1264
  __isFragment?: never;